vendor: 4,837 bytes, lines 1-9
1var SI=Object.defineProperty;var Ub=e=>{throw TypeError(e)};var _I=(e,t,r)=>t in e?SI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var es=(e,t,r)=>_I(e,typeof t!="symbol"?t+"":t,r),zf=(e,t,r)=>t.has(e)||Ub("Cannot "+r);var C=(e,t,r)=>(zf(e,t,"read from private field"),r?r.call(e):t.get(e)),ge=(e,t,r)=>t.has(e)?Ub("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),X=(e,t,r,n)=>(zf(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ee=(e,t,r)=>(zf(e,t,"access private method"),r);var iu=(e,t,r,n)=>({set _(s){X(e,t,s,r)},get _(){return C(e,t,n)}});function NI(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const a=Object.getOwnPropertyDescriptor(n,s);a&&Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>n[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"]'))n(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(s){if(s.ep)return;s.ep=!0;const a=r(s);fetch(s.href,a)}})();function $d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var d_={exports:{}},Cm={},u_={exports:{}},Ce={};/** 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 Fd=Symbol.for("react.element"),CI=Symbol.for("react.portal"),AI=Symbol.for("react.fragment"),TI=Symbol.for("react.strict_mode"),EI=Symbol.for("react.profiler"),RI=Symbol.for("react.provider"),PI=Symbol.for("react.context"),II=Symbol.for("react.forward_ref"),OI=Symbol.for("react.suspense"),MI=Symbol.for("react.memo"),DI=Symbol.for("react.lazy"),Vb=Symbol.iterator;function LI(e){return e===null||typeof e!="object"?null:(e=Vb&&e[Vb]||e["@@iterator"],typeof e=="function"?e:null)}var h_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m_=Object.assign,f_={};function Rl(e,t,r){this.props=e,this.context=t,this.refs=f_,this.updater=r||h_}Rl.prototype.isReactComponent={};Rl.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")};Rl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function p_(){}p_.prototype=Rl.prototype;function Jx(e,t,r){this.props=e,this.context=t,this.refs=f_,this.updater=r||h_}var Qx=Jx.prototype=new p_;Qx.constructor=Jx;m_(Qx,Rl.prototype);Qx.isPureReactComponent=!0;var Hb=Array.isArray,g_=Object.prototype.hasOwnProperty,Zx={current:null},y_={key:!0,ref:!0,__self:!0,__source:!0};function x_(e,t,r){var n,s={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)g_.call(t,n)&&!y_.hasOwnProperty(n)&&(s[n]=t[n]);var l=arguments.length-2;if(l===1)s.children=r;else if(1<l){for(var c=Array(l),d=0;d<l;d++)c[d]=arguments[d+2];s.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)s[n]===void 0&&(s[n]=l[n]);return{$$typeof:Fd,type:e,key:a,ref:o,props:s,_owner:Zx.current}}function $I(e,t){return{$$typeof:Fd,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Xx(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fd}function FI(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var zb=/\/+/g;function Wf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?FI(""+e.key):t.toString(36)}function Gu(e,t,r,n,s){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Fd:case CI:o=!0}}if(o)return o=e,s=s(o),e=n===""?"."+Wf(o,0):n,Hb(s)?(r="",e!=null&&(r=e.replace(zb,"$&/")+"/"),Gu(s,t,r,"",function(d){return d})):s!=null&&(Xx(s)&&(s=$I(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(zb,"$&/")+"/")+e)),t.push(s)),1;if(o=0,n=n===""?".":n+":",Hb(e))for(var l=0;l<e.length;l++){a=e[l];var c=n+Wf(a,l);
vendor: 4,252 bytes, lines 9-17
9o+=Gu(a,t,r,c,s)}else if(c=LI(e),typeof c=="function")for(e=c.call(e),l=0;!(a=e.next()).done;)a=a.value,c=n+Wf(a,l++),o+=Gu(a,t,r,c,s);else if(a==="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 au(e,t,r){if(e==null)return e;var n=[],s=0;return Gu(e,n,"","",function(a){return t.call(r,a,s++)}),n}function BI(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var or={current:null},Ku={transition:null},UI={ReactCurrentDispatcher:or,ReactCurrentBatchConfig:Ku,ReactCurrentOwner:Zx};function v_(){throw Error("act(...) is not supported in production builds of React.")}Ce.Children={map:au,forEach:function(e,t,r){au(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return au(e,function(){t++}),t},toArray:function(e){return au(e,function(t){return t})||[]},only:function(e){if(!Xx(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ce.Component=Rl;Ce.Fragment=AI;Ce.Profiler=EI;Ce.PureComponent=Jx;Ce.StrictMode=TI;Ce.Suspense=OI;Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=UI;Ce.act=v_;Ce.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=m_({},e.props),s=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=Zx.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)g_.call(t,c)&&!y_.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){l=Array(c);for(var d=0;d<c;d++)l[d]=arguments[d+2];n.children=l}return{$$typeof:Fd,type:e.type,key:s,ref:a,props:n,_owner:o}};Ce.createContext=function(e){return e={$$typeof:PI,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:RI,_context:e},e.Consumer=e};Ce.createElement=x_;Ce.createFactory=function(e){var t=x_.bind(null,e);return t.type=e,t};Ce.createRef=function(){return{current:null}};Ce.forwardRef=function(e){return{$$typeof:II,render:e}};Ce.isValidElement=Xx;Ce.lazy=function(e){return{$$typeof:DI,_payload:{_status:-1,_result:e},_init:BI}};Ce.memo=function(e,t){return{$$typeof:MI,type:e,compare:t===void 0?null:t}};Ce.startTransition=function(e){var t=Ku.transition;Ku.transition={};try{e()}finally{Ku.transition=t}};Ce.unstable_act=v_;Ce.useCallback=function(e,t){return or.current.useCallback(e,t)};Ce.useContext=function(e){return or.current.useContext(e)};Ce.useDebugValue=function(){};Ce.useDeferredValue=function(e){return or.current.useDeferredValue(e)};Ce.useEffect=function(e,t){return or.current.useEffect(e,t)};Ce.useId=function(){return or.current.useId()};Ce.useImperativeHandle=function(e,t,r){return or.current.useImperativeHandle(e,t,r)};Ce.useInsertionEffect=function(e,t){return or.current.useInsertionEffect(e,t)};Ce.useLayoutEffect=function(e,t){return or.current.useLayoutEffect(e,t)};Ce.useMemo=function(e,t){return or.current.useMemo(e,t)};Ce.useReducer=function(e,t,r){return or.current.useReducer(e,t,r)};Ce.useRef=function(e){return or.current.useRef(e)};Ce.useState=function(e){return or.current.useState(e)};Ce.useSyncExternalStore=function(e,t,r){return or.current.useSyncExternalStore(e,t,r)};Ce.useTransition=function(){return or.current.useTransition()};Ce.version="18.3.1";u_.exports=Ce;var p=u_.exports;const D=$d(p),ev=NI({__proto__:null,default:D},[p]);/** 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 VI=p,HI=Symbol.for("react.element"),zI=Symbol.for("react.fragment"),WI=Object.prototype.hasOwnProperty,qI=VI.__SECRET_INT
vendor: 8,877 bytes, lines 17-33
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,GI={key:!0,ref:!0,__self:!0,__source:!0};function w_(e,t,r){var n,s={},a=null,o=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)WI.call(t,n)&&!GI.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:HI,type:e,key:a,ref:o,props:s,_owner:qI.current}}Cm.Fragment=zI;Cm.jsx=w_;Cm.jsxs=w_;d_.exports=Cm;var i=d_.exports,b_={exports:{}},Rr={},j_={exports:{}},k_={};/** 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(R,O){var V=R.length;R.push(O);e:for(;0<V;){var he=V-1>>>1,ne=R[he];if(0<s(ne,O))R[he]=O,R[V]=ne,V=he;else break e}}function r(R){return R.length===0?null:R[0]}function n(R){if(R.length===0)return null;var O=R[0],V=R.pop();if(V!==O){R[0]=V;e:for(var he=0,ne=R.length,xe=ne>>>1;he<xe;){var me=2*(he+1)-1,We=R[me],Ze=me+1,Y=R[Ze];if(0>s(We,V))Ze<ne&&0>s(Y,We)?(R[he]=Y,R[Ze]=V,he=Ze):(R[he]=We,R[me]=V,he=me);else if(Ze<ne&&0>s(Y,V))R[he]=Y,R[Ze]=V,he=Ze;else break e}}return O}function s(R,O){var V=R.sortIndex-O.sortIndex;return V!==0?V:R.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],d=[],u=1,h=null,m=3,f=!1,y=!1,x=!1,b=typeof setTimeout=="function"?setTimeout:null,g=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(R){for(var O=r(d);O!==null;){if(O.callback===null)n(d);else if(O.startTime<=R)n(d),O.sortIndex=O.expirationTime,t(c,O);else break;O=r(d)}}function j(R){if(x=!1,w(R),!y)if(r(c)!==null)y=!0,W(k);else{var O=r(d);O!==null&&q(j,O.startTime-R)}}function k(R,O){y=!1,x&&(x=!1,g(N),N=-1),f=!0;var V=m;try{for(w(O),h=r(c);h!==null&&(!(h.expirationTime>O)||R&&!A());){var he=h.callback;if(typeof he=="function"){h.callback=null,m=h.priorityLevel;var ne=he(h.expirationTime<=O);O=e.unstable_now(),typeof ne=="function"?h.callback=ne:h===r(c)&&n(c),w(O)}else n(c);h=r(c)}if(h!==null)var xe=!0;else{var me=r(d);me!==null&&q(j,me.startTime-O),xe=!1}return xe}finally{h=null,m=V,f=!1}}var S=!1,_=null,N=-1,T=5,P=-1;function A(){return!(e.unstable_now()-P<T)}function M(){if(_!==null){var R=e.unstable_now();P=R;var O=!0;try{O=_(!0,R)}finally{O?z():(S=!1,_=null)}}else S=!1}var z;if(typeof v=="function")z=function(){v(M)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,ae=$.port2;$.port1.onmessage=M,z=function(){ae.postMessage(null)}}else z=function(){b(M,0)};function W(R){_=R,S||(S=!0,z())}function q(R,O){N=b(function(){R(e.unstable_now())},O)}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(R){R.callback=null},e.unstable_continueExecution=function(){y||f||(y=!0,W(k))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(R){switch(m){case 1:case 2:case 3:var O=3;break;default:O=m}var V=m;m=O;try{return R()}finally{m=V}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,O){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var V=m;m=R;try{return O()}finally{m=V}},e.unstable_scheduleCallback=function(R,O,V){var he=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?he+V:he):V=he,R){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=V+ne,R={id:u++,callback:O,priorityLevel:R,startTime:V,expirationTime:ne,sortIndex:-1},V>he?(R.sortIndex=V,t(d,R),r(c)===null&&R===r(d)&&(x?(g(N),N=-1):x=!0,q(j,V-he))):(R.sortIndex=ne,t(c,R),y||f||(y=!0,W(k))),R},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(R){var O=m;return function(){var V=m;m=O;try{return R.apply(this,arguments)}finally{m=V}}}})(k_);j_.exports=k_;var KI=j_.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 YI=p,Ar=KI;function U(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 S_=new Set,Gc={};function za(e,t){ll(e,t),ll(e+"Capture",t)}function ll(e,t){for(Gc[e]=t,e=0;e<t.length;e++)S_.add(t[e])}var vs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jg=Object.prototype.hasOwnProperty,JI=/^[: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]*$/,Wb={},qb={};function QI(e){return jg.call(qb,e)?!0:jg.call(Wb,e)?!1:JI.test(e)?qb[e]=!0:(Wb[e]=!0,!1)}function ZI(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function XI(e,t,r,n){if(t===null||typeof t>"u"||ZI(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function lr(e,t,r,n,s,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var Ft={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ft[e]=new lr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ft[t]=new lr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ft[e]=new lr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ft[e]=new lr(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){Ft[e]=new lr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ft[e]=new lr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ft[e]=new lr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ft[e]=new lr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ft[e]=new lr(e,5,!1,e.toLowerCase(),null,!1,!1)});var tv=/[\-:]([a-z])/g;function rv(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
33-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(tv,rv);Ft[t]=new lr(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(tv,rv);Ft[t]=new lr(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(tv,rv);Ft[t]=new lr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ft[e]=new lr(e,1,!1,e.toLowerCase(),null,!1,!1)});Ft.xlinkHref=new lr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ft[e]=new lr(e,1,!1,e.toLowerCase(),null,!0,!0)});function nv(e,t,r,n){var s=Ft.hasOwnProperty(t)?Ft[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(XI(t,r,s,n)&&(r=null),n||s===null?QI(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Es=YI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ou=Symbol.for("react.element"),go=Symbol.for("react.portal"),yo=Symbol.for("react.fragment"),sv=Symbol.for("react.strict_mode"),kg=Symbol.for("react.profiler"),__=Symbol.for("react.provider"),N_=Symbol.for("react.context"),iv=Symbol.for("react.forward_ref"),Sg=Symbol.for("react.suspense"),_g=Symbol.for("react.suspense_list"),av=Symbol.for("react.memo"),Ks=Symbol.for("react.lazy"),C_=Symbol.for("react.offscreen"),Gb=Symbol.iterator;function Xl(e){return e===null||typeof e!="object"?null:(e=Gb&&e[Gb]||e["@@iterator"],typeof e=="function"?e:null)}var ht=Object.assign,qf;function yc(e){if(qf===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);qf=t&&t[1]||""}return` 34`+qf+e}var Gf=!1;function Kf(e,t){if(!e||Gf)return"";Gf=!0;var r=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(d){var n=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){n=d}e.call(t.prototype)}else{try{throw Error()}catch(d){n=d}e()}}catch(d){if(d&&n&&typeof d.stack=="string"){for(var s=d.stack.split(` 35`),a=n.stack.split(` 36`),o=s.length-1,l=a.length-1;1<=o&&0<=l&&s[o]!==a[l];)l--;for(;1<=o&&0<=l;o--,l--)if(s[o]!==a[l]){if(o!==1||l!==1)do if(o--,l--,0>l||s[o]!==a[l]){var c=` 37`+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{Gf=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?yc(e):""}function eO(e){switch(e.tag){case 5:return yc(e.type);case 16:return yc("Lazy");case 13:return yc("Suspense");case 19:return yc("SuspenseList");case 0:case 2:case 15:return e=Kf(e.type,!1),e;case 11:return e=Kf(e.type.render,!1),e;case 1:return e=Kf(e.type,!0),e;default:return""}}function Ng(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 yo:return"Fragment";case go:return"Portal";case kg:return"Profiler";case sv:return"StrictMode";case Sg:return"Suspense";case _g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case N_:return(e.displayName||"Context")+".Consumer";case __:return(e._context.displayName||"Context")+".Provider";case iv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case av:return t=e.displayName||null,t!==null?t:Ng(e.type)||"Memo";case Ks:t=e._payload,e=e._init;try{return Ng(e(t))}catch{}}return null}function tO(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 Ng(t);case 8:return t===sv?"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 Ti(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function A_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rO(e){var t=A_(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function lu(e){e._valueTracker||(e._valueTracker=rO(e))}function T_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=A_(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function jh(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 Cg(e,t){var r=t.checked;return ht({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Kb(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Ti(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function E_(e,t){t=t.checked,t!=null&&nv(e,"checked",t,!1)}function Ag(e,t){E_(e,t);var r=Ti(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Tg(e,t.type,r):t.hasOwnProperty("defaultValue")&&Tg(e,t.type,Ti(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yb(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Tg(e,t,r){(t!=="number"||jh(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var xc=Array.isArray;function Oo(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Ti(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Eg(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return ht({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Jb(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(U(92));if(xc(r)){if(1<r.length)throw Error(U(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Ti(r)}}function R_(e,t){var r=Ti(t.value),n=Ti(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function Qb(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function P_(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 Rg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?P_(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var cu,I_=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(cu=cu||document.createElement("div"),cu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=cu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Kc(e,t){if(t){var r=e.firstChild;
vendor: 10,374 bytes, line 37
37if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Tc={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},nO=["Webkit","ms","Moz","O"];Object.keys(Tc).forEach(function(e){nO.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Tc[t]=Tc[e]})});function O_(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Tc.hasOwnProperty(e)&&Tc[e]?(""+t).trim():t+"px"}function M_(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=O_(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var sO=ht({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 Pg(e,t){if(t){if(sO[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function Ig(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Og=null;function ov(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Mg=null,Mo=null,Do=null;function Zb(e){if(e=Vd(e)){if(typeof Mg!="function")throw Error(U(280));var t=e.stateNode;t&&(t=Pm(t),Mg(e.stateNode,e.type,t))}}function D_(e){Mo?Do?Do.push(e):Do=[e]:Mo=e}function L_(){if(Mo){var e=Mo,t=Do;if(Do=Mo=null,Zb(e),t)for(e=0;e<t.length;e++)Zb(t[e])}}function $_(e,t){return e(t)}function F_(){}var Yf=!1;function B_(e,t,r){if(Yf)return e(t,r);Yf=!0;try{return $_(e,t,r)}finally{Yf=!1,(Mo!==null||Do!==null)&&(F_(),L_())}}function Yc(e,t){var r=e.stateNode;if(r===null)return null;var n=Pm(r);if(n===null)return null;r=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(U(231,t,typeof r));return r}var Dg=!1;if(vs)try{var ec={};Object.defineProperty(ec,"passive",{get:function(){Dg=!0}}),window.addEventListener("test",ec,ec),window.removeEventListener("test",ec,ec)}catch{Dg=!1}function iO(e,t,r,n,s,a,o,l,c){var d=Array.prototype.slice.call(arguments,3);try{t.apply(r,d)}catch(u){this.onError(u)}}var Ec=!1,kh=null,Sh=!1,Lg=null,aO={onError:function(e){Ec=!0,kh=e}};function oO(e,t,r,n,s,a,o,l,c){Ec=!1,kh=null,iO.apply(aO,arguments)}function lO(e,t,r,n,s,a,o,l,c){if(oO.apply(this,arguments),Ec){if(Ec){var d=kh;Ec=!1,kh=null}else throw Error(U(198));Sh||(Sh=!0,Lg=d)}}function Wa(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function U_(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 Xb(e){if(Wa(e)!==e)throw Error(U(188))}function cO(e){var t=e.alternate;if(!t){if(t=Wa(e),t===null)throw Error(U(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var a=s.alternate;if(a===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===a.child){for(a=s.child;a;){if(a===r)return Xb(s),e;if(a===n)return Xb(s),t;a=a.sibling}throw Error(U(188))}if(r.return!==n.return)r=s,n=a;else{for(var o=!1,l=s.child;l;){if(l===r){o=!0,r=s,n=a;break}if(l===n){o=!0,n=s,r=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===r){o=!0,r=a,n=s;break}if(l===n){o=!0,n=a,r=s;break}l=l.sibling}if(!o)throw Error(U(189))}}if(r.alternate!==n)throw Error(U(190))}if(r.tag!==3)throw Error(U(188));return r.stateNode.current===r?e:t}function V_(e){return e=cO(e),e!==null?H_(e):null}function H_(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=H_(e);if(t!==null)return t;e=e.sibling}return null}var z_=Ar.unstable_scheduleCallback,e0=Ar.unstable_cancelCallback,dO=Ar.unstable_shouldYield,uO=Ar.unstable_requestPaint,vt=Ar.unstable_now,hO=Ar.unstable_getCurrentPriorityLevel,lv=Ar.unstable_ImmediatePriority,W_=Ar.unstable_UserBlockingPriority,_h=Ar.unstable_NormalPriority,mO=Ar.unstable_LowPriority,q_=Ar.unstable_IdlePriority,Am=null,$n=null;function fO(e){if($n&&typeof $n.onCommitFiberRoot=="function")try{$n.onCommitFiberRoot(Am,e,void 0,(e.current.flags&128)===128)}catch{}}var fn=Math.clz32?Math.clz32:yO,pO=Math.log,gO=Math.LN2;function yO(e){return e>>>=0,e===0?32:31-(pO(e)/gO|0)|0}var du=64,uu=4194304;function vc(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 Nh(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var l=o&~s;l!==0?n=vc(l):(a&=o,a!==0&&(n=vc(a)))}else o=r&~s,o!==0?n=vc(o):a!==0&&(n=vc(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,a=t&-t,s>=a||s===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-fn(t),s=1<<r,n|=e[r],t&=~s;return n}function xO(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 vO(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-fn(a),l=1<<o,c=s[o];c===-1?(!(l&r)||l&n)&&(s[o]=xO(l,t)):c<=t&&(e.expiredLanes|=l),a&=~l}}function $g(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function G_(){var e=du;return du<<=1,!(du&4194240)&&(du=64),e}function Jf(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Bd(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-fn(t),e[t]=r}function wO(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-fn(r),a=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~a}}function cv(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-fn(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var Ve=0;function K_(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Y_,dv,J_,Q_,Z_,Fg=!1,hu=[],gi=null,yi=null,xi=null,Jc=new Map,Qc=new Map,Qs=[],bO="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function t0(e,t){switch(e){case"focusin":case"focusout":gi=null;break;case"dragenter":case"dragleave":yi=null;break;case"mouseover":case"mouseout":xi=null;break;case"pointerover":case"pointerout":Jc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qc.delete(t.pointerId)}}function tc(e,t,r,n,s,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[s]},t!==null&&(t=Vd(t),t!==null&&dv(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function jO(e,t,r,n,s){switch(t){case"focusin":return gi=tc(gi,e,t,r,n,s),!0;case"dragenter":return yi=tc(yi,e,t,r,n,s),!0;case"mouseover":return xi=tc(xi,e,t,r,n,s),!0;case"pointerover":var a=s.pointerId;return Jc.set(a,tc(Jc.get(a)||null,e,t,r,n,s)),!0;case"gotpointercapture":return a=s.pointerId,Qc.set(a,tc(Qc.get(a)||null,e,t,r,n,s)),!0}return!1}function X_(e){var t=aa(e.target);if(t!==null){var r=Wa(t);if(r!==null){if(t=r.tag,t===13){if(t=U_(r),t!==null){e.blockedOn=t,Z_(e.priority,function(){J_(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Yu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Bg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Og=n,r.target.dispatchEvent(n),Og=null}else return t=Vd(r),t!==null&&dv(t),e.blockedOn=r,!1;t.shift()}return!0}function r0(e,t,r){Yu(e)&&r.delete(t)}function kO(){Fg=!1,gi!==null&&Yu(gi)&&(gi=null),yi!==null&&Yu(yi)&&(yi=null),xi!==null&&Yu(xi)&&(xi=null),Jc.forEach(r0),Qc.forEach(r0)}function rc(e,t){e.blockedOn===t&&(e.blockedOn=null,Fg||(Fg=!0,Ar.unstable_scheduleCallback(Ar.unstable_NormalPriority,kO)))}function Zc(e){function t(s){return rc(s,e)}if(0<hu.length){rc(hu[0],e);for(var r=1;r<hu.length;r++){var n=hu[r];n.blockedOn===e&&(n.blockedOn=null)}}for(gi!==null&&rc(gi,e),yi!==null&&rc(yi,e),xi!==null&&rc(xi,e),Jc.forEac
vendor: 8,922 bytes, line 37
37h(t),Qc.forEach(t),r=0;r<Qs.length;r++)n=Qs[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Qs.length&&(r=Qs[0],r.blockedOn===null);)X_(r),r.blockedOn===null&&Qs.shift()}var Lo=Es.ReactCurrentBatchConfig,Ch=!0;function SO(e,t,r,n){var s=Ve,a=Lo.transition;Lo.transition=null;try{Ve=1,uv(e,t,r,n)}finally{Ve=s,Lo.transition=a}}function _O(e,t,r,n){var s=Ve,a=Lo.transition;Lo.transition=null;try{Ve=4,uv(e,t,r,n)}finally{Ve=s,Lo.transition=a}}function uv(e,t,r,n){if(Ch){var s=Bg(e,t,r,n);if(s===null)ap(e,t,n,Ah,r),t0(e,n);else if(jO(s,e,t,r,n))n.stopPropagation();else if(t0(e,n),t&4&&-1<bO.indexOf(e)){for(;s!==null;){var a=Vd(s);if(a!==null&&Y_(a),a=Bg(e,t,r,n),a===null&&ap(e,t,n,Ah,r),a===s)break;s=a}s!==null&&n.stopPropagation()}else ap(e,t,n,null,r)}}var Ah=null;function Bg(e,t,r,n){if(Ah=null,e=ov(n),e=aa(e),e!==null)if(t=Wa(e),t===null)e=null;else if(r=t.tag,r===13){if(e=U_(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ah=e,null}function eN(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(hO()){case lv:return 1;case W_:return 4;case _h:case mO:return 16;case q_:return 536870912;default:return 16}default:return 16}}var ci=null,hv=null,Ju=null;function tN(){if(Ju)return Ju;var e,t=hv,r=t.length,n,s="value"in ci?ci.value:ci.textContent,a=s.length;for(e=0;e<r&&t[e]===s[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===s[a-n];n++);return Ju=s.slice(e,1<n?1-n:void 0)}function Qu(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 mu(){return!0}function n0(){return!1}function Pr(e){function t(r,n,s,a,o){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(a):a[l]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?mu:n0,this.isPropagationStopped=n0,this}return ht(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=mu)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=mu)},persist:function(){},isPersistent:mu}),t}var Pl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mv=Pr(Pl),Ud=ht({},Pl,{view:0,detail:0}),NO=Pr(Ud),Qf,Zf,nc,Tm=ht({},Ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fv,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!==nc&&(nc&&e.type==="mousemove"?(Qf=e.screenX-nc.screenX,Zf=e.screenY-nc.screenY):Zf=Qf=0,nc=e),Qf)},movementY:function(e){return"movementY"in e?e.movementY:Zf}}),s0=Pr(Tm),CO=ht({},Tm,{dataTransfer:0}),AO=Pr(CO),TO=ht({},Ud,{relatedTarget:0}),Xf=Pr(TO),EO=ht({},Pl,{animationName:0,elapsedTime:0,pseudoElement:0}),RO=Pr(EO),PO=ht({},Pl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),IO=Pr(PO),OO=ht({},Pl,{data:0}),i0=Pr(OO),MO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},DO={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"},LO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $O(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=LO[e])?!!t[e]:!1}function fv(){return $O}var FO=ht({},Ud,{key:function(e){if(e.key){var t=MO[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?DO[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fv,charCode:function(e){return e.type==="keypress"?Qu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),BO=Pr(FO),UO=ht({},Tm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),a0=Pr(UO),VO=ht({},Ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fv}),HO=Pr(VO),zO=ht({},Pl,{propertyName:0,elapsedTime:0,pseudoElement:0}),WO=Pr(zO),qO=ht({},Tm,{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}),GO=Pr(qO),KO=[9,13,27,32],pv=vs&&"CompositionEvent"in window,Rc=null;vs&&"documentMode"in document&&(Rc=document.documentMode);var YO=vs&&"TextEvent"in window&&!Rc,rN=vs&&(!pv||Rc&&8<Rc&&11>=Rc),o0=" ",l0=!1;function nN(e,t){switch(e){case"keyup":return KO.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sN(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xo=!1;function JO(e,t){switch(e){case"compositionend":return sN(t);case"keypress":return t.which!==32?null:(l0=!0,o0);case"textInput":return e=t.data,e===o0&&l0?null:e;default:return null}}function QO(e,t){if(xo)return e==="compositionend"||!pv&&nN(e,t)?(e=tN(),Ju=hv=ci=null,xo=!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 rN&&t.locale!=="ko"?null:t.data;default:return null}}var ZO={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 c0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ZO[e.type]:t==="textarea"}function iN(e,t,r,n){D_(n),t=Th(t,"onChange"),0<t.length&&(r=new mv("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Pc=null,Xc=null;function XO(e){gN(e,0)}function Em(e){var t=bo(e);if(T_(t))return e}function e4(e,t){if(e==="change")return t}var aN=!1;if(vs){var ep;if(vs){var tp="oninput"in document;if(!tp){var d0=document.createElement("div");d0.setAttribute("oninput","return;"),tp=typeof d0.oninput=="function"}ep=tp}else ep=!1;aN=ep&&(!document.documentMode||9<document.documentMode)}function u0(){Pc&&(Pc.detachEvent("onpropertychange",oN),Xc=Pc=null)}function oN(e){if(e.propertyName==="value"&&Em(Xc)){var t=[];iN(t,Xc,e,ov(e)),B_(XO,t)}}function t4(e,t,r){e==="focusin"?(u0(),Pc=t,Xc=r,Pc.attachEvent("onpropertychange",oN)):e==="focusout"&&u0()}function r4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Em(Xc)}function n4(e,t){if(e==="click")return Em(t)}function s4(e,t){if(e==="input"||e==="change")return Em(t)}function i4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vn=typeof Object.is=="function"?Object.is:i4;function ed(e,t){if(vn(e,t))return!0;
vendor: 4,808 bytes, line 37
37if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!jg.call(t,s)||!vn(e[s],t[s]))return!1}return!0}function h0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function m0(e,t){var r=h0(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=h0(r)}}function lN(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?lN(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function cN(){for(var e=window,t=jh();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=jh(e.document)}return t}function gv(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 a4(e){var t=cN(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&lN(r.ownerDocument.documentElement,r)){if(n!==null&&gv(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,a=Math.min(n.start,s);n=n.end===void 0?a:Math.min(n.end,s),!e.extend&&a>n&&(s=n,n=a,a=s),s=m0(r,a);var o=m0(r,n);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(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var o4=vs&&"documentMode"in document&&11>=document.documentMode,vo=null,Ug=null,Ic=null,Vg=!1;function f0(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Vg||vo==null||vo!==jh(n)||(n=vo,"selectionStart"in n&&gv(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ic&&ed(Ic,n)||(Ic=n,n=Th(Ug,"onSelect"),0<n.length&&(t=new mv("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=vo)))}function fu(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var wo={animationend:fu("Animation","AnimationEnd"),animationiteration:fu("Animation","AnimationIteration"),animationstart:fu("Animation","AnimationStart"),transitionend:fu("Transition","TransitionEnd")},rp={},dN={};vs&&(dN=document.createElement("div").style,"AnimationEvent"in window||(delete wo.animationend.animation,delete wo.animationiteration.animation,delete wo.animationstart.animation),"TransitionEvent"in window||delete wo.transitionend.transition);function Rm(e){if(rp[e])return rp[e];if(!wo[e])return e;var t=wo[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in dN)return rp[e]=t[r];return e}var uN=Rm("animationend"),hN=Rm("animationiteration"),mN=Rm("animationstart"),fN=Rm("transitionend"),pN=new Map,p0="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 Li(e,t){pN.set(e,t),za(t,[e])}for(var np=0;np<p0.length;np++){var sp=p0[np],l4=sp.toLowerCase(),c4=sp[0].toUpperCase()+sp.slice(1);Li(l4,"on"+c4)}Li(uN,"onAnimationEnd");Li(hN,"onAnimationIteration");Li(mN,"onAnimationStart");Li("dblclick","onDoubleClick");Li("focusin","onFocus");Li("focusout","onBlur");Li(fN,"onTransitionEnd");ll("onMouseEnter",["mouseout","mouseover"]);ll("onMouseLeave",["mouseout","mouseover"]);ll("onPointerEnter",["pointerout","pointerover"]);ll("onPointerLeave",["pointerout","pointerover"]);za("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,533 bytes, line 37
37za("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));za("onBeforeInput",["compositionend","keypress","textInput","paste"]);za("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));za("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));za("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wc="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(" "),d4=new Set("cancel close invalid load scroll toggle".split(" ").concat(wc));function g0(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,lO(n,t,void 0,e),e.currentTarget=null}function gN(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var o=n.length-1;0<=o;o--){var l=n[o],c=l.instance,d=l.currentTarget;if(l=l.listener,c!==a&&s.isPropagationStopped())break e;g0(s,l,d),a=c}else for(o=0;o<n.length;o++){if(l=n[o],c=l.instance,d=l.currentTarget,l=l.listener,c!==a&&s.isPropagationStopped())break e;g0(s,l,d),a=c}}}if(Sh)throw e=Lg,Sh=!1,Lg=null,e}function et(e,t){var r=t[Gg];r===void 0&&(r=t[Gg]=new Set);var n=e+"__bubble";r.has(n)||(yN(t,e,2,!1),r.add(n))}function ip(e,t,r){var n=0;t&&(n|=4),yN(r,e,n,t)}var pu="_reactListening"+Math.random().toString(36).slice(2);function td(e){if(!e[pu]){e[pu]=!0,S_.forEach(function(r){r!=="selectionchange"&&(d4.has(r)||ip(r,!1,e),ip(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[pu]||(t[pu]=!0,ip("selectionchange",!1,t))}}function yN(e,t,r,n){switch(eN(t)){case 1:var s=SO;break;case 4:s=_O;break;default:s=uv}r=s.bind(null,t,r,e),s=void 0,!Dg||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function ap(e,t,r,n,s){var a=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var l=n.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(o===4)for(o=n.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;o=o.return}for(;l!==null;){if(o=aa(l),o===null)return;if(c=o.tag,c===5||c===6){n=a=o;continue e}l=l.parentNode}}n=n.return}B_(function(){var d=a,u=ov(r),h=[];e:{var m=pN.get(e);if(m!==void 0){var f=mv,y=e;switch(e){case"keypress":if(Qu(r)===0)break e;case"keydown":case"keyup":f=BO;break;case"focusin":y="focus",f=Xf;break;case"focusout":y="blur",f=Xf;break;case"beforeblur":case"afterblur":f=Xf;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=s0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=AO;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=HO;break;case uN:case hN:case mN:f=RO;break;case fN:f=WO;break;case"scroll":f=NO;break;case"wheel":f=GO;break;case"copy":case"cut":case"paste":f=IO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=a0}var x=(t&4)!==0,b=!x&&e==="scroll",g=x?m!==null?m+"Capture":null:m;x=[];for(var v=d,w;v!==null;){w=v;var j=w.stateNode;if(w.tag===5&&j!==null&&(w=j,g!==null&&(j=Yc(v,g),j!=null&&x.push(rd(v,j,w)))),b)break;v=v.return}0<x.length&&(m=new f(m,y,null,r,u),h.push({event:m,listeners:x}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",m&&r!==Og&&(y=r.relatedTarget||r.fromElement)&&(aa(y)||y[ws]))break e;if((f||m)&&(m=u.window===u?u:(m=u.ownerDocument)?m.defaultView||m.parentWindow:window,f?(y=r.relatedTarget||r.toElement,f=d,y=y?aa(y):null,y!==null&&(b=Wa(y),y!==b||y.tag!==5&&y.tag!==6)&&(y=null)):(f=null,y=d),f!==y)){if(x=s0,j="onMouseLeave",g="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(x=a0,j="onPointerLeave",g="onPointerEnter",v="pointer"),b=f==null?m:bo(f),w=y==null?m:bo(y),m=new x(j,v+"leave",f,r,u),m.target=b,m.relatedTarget=w,j=null,aa(u)===d&&(x=new x(g,v+"enter",y,r,u),x.target=w,x.relatedTarget=b,j=x),b=j,f&&y)t:{for(x=f,g=y,v=0,w=x;w;
vendor: 5,643 bytes, lines 37-38
37w=Za(w))v++;for(w=0,j=g;j;j=Za(j))w++;for(;0<v-w;)x=Za(x),v--;for(;0<w-v;)g=Za(g),w--;for(;v--;){if(x===g||g!==null&&x===g.alternate)break t;x=Za(x),g=Za(g)}x=null}else x=null;f!==null&&y0(h,m,f,x,!1),y!==null&&b!==null&&y0(h,b,y,x,!0)}}e:{if(m=d?bo(d):window,f=m.nodeName&&m.nodeName.toLowerCase(),f==="select"||f==="input"&&m.type==="file")var k=e4;else if(c0(m))if(aN)k=s4;else{k=r4;var S=t4}else(f=m.nodeName)&&f.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(k=n4);if(k&&(k=k(e,d))){iN(h,k,r,u);break e}S&&S(e,m,d),e==="focusout"&&(S=m._wrapperState)&&S.controlled&&m.type==="number"&&Tg(m,"number",m.value)}switch(S=d?bo(d):window,e){case"focusin":(c0(S)||S.contentEditable==="true")&&(vo=S,Ug=d,Ic=null);break;case"focusout":Ic=Ug=vo=null;break;case"mousedown":Vg=!0;break;case"contextmenu":case"mouseup":case"dragend":Vg=!1,f0(h,r,u);break;case"selectionchange":if(o4)break;case"keydown":case"keyup":f0(h,r,u)}var _;if(pv)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else xo?nN(e,r)&&(N="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(N="onCompositionStart");N&&(rN&&r.locale!=="ko"&&(xo||N!=="onCompositionStart"?N==="onCompositionEnd"&&xo&&(_=tN()):(ci=u,hv="value"in ci?ci.value:ci.textContent,xo=!0)),S=Th(d,N),0<S.length&&(N=new i0(N,e,null,r,u),h.push({event:N,listeners:S}),_?N.data=_:(_=sN(r),_!==null&&(N.data=_)))),(_=YO?JO(e,r):QO(e,r))&&(d=Th(d,"onBeforeInput"),0<d.length&&(u=new i0("onBeforeInput","beforeinput",null,r,u),h.push({event:u,listeners:d}),u.data=_))}gN(h,t)})}function rd(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Th(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,a=s.stateNode;s.tag===5&&a!==null&&(s=a,a=Yc(e,r),a!=null&&n.unshift(rd(e,a,s)),a=Yc(e,t),a!=null&&n.push(rd(e,a,s))),e=e.return}return n}function Za(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function y0(e,t,r,n,s){for(var a=t._reactName,o=[];r!==null&&r!==n;){var l=r,c=l.alternate,d=l.stateNode;if(c!==null&&c===n)break;l.tag===5&&d!==null&&(l=d,s?(c=Yc(r,a),c!=null&&o.unshift(rd(r,c,l))):s||(c=Yc(r,a),c!=null&&o.push(rd(r,c,l)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var u4=/\r\n?/g,h4=/\u0000|\uFFFD/g;function x0(e){return(typeof e=="string"?e:""+e).replace(u4,` 38`).replace(h4,"")}function gu(e,t,r){if(t=x0(t),x0(e)!==t&&r)throw Error(U(425))}function Eh(){}var Hg=null,zg=null;function Wg(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 qg=typeof setTimeout=="function"?setTimeout:void 0,m4=typeof clearTimeout=="function"?clearTimeout:void 0,v0=typeof Promise=="function"?Promise:void 0,f4=typeof queueMicrotask=="function"?queueMicrotask:typeof v0<"u"?function(e){return v0.resolve(null).then(e).catch(p4)}:qg;function p4(e){setTimeout(function(){throw e})}function op(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),Zc(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Zc(t)}function vi(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 w0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Il=Math.random().toString(36).slice(2),Mn="__reactFiber$"+Il,nd="__reactProps$"+Il,ws="__reactContainer$"+Il,Gg="__reactEvents$"+Il,g4="__reactListeners$"+Il,y4="__reactHandles$"+Il;function aa(e){var t=e[Mn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[ws]||r[Mn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=w0(e);e!==null;){if(r=e[Mn])return r;e=w0(e)}return t}e=r,r=e.parentNode}return null}function Vd(e){return e=e[Mn]||e[ws],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function bo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function Pm(e){return e[nd]||null}var Kg=[],jo=-1;function $i(e){return{current:e}}function tt(e){0>jo||(e.current=Kg[jo],Kg[jo]=null,jo--)}function Je(e,t){jo++,Kg[jo]=e.current,e.current=t}var Ei={},Zt=$i(Ei),yr=$i(!1),Ta=Ei;function cl(e,t){var r=e.type.contextTypes;if(!r)return Ei;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},a;for(a in r)s[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function xr(e){return e=e.childContextTypes,e!=null}function Rh(){tt(yr),tt(Zt)}function b0(e,t,r){if(Zt.current!==Ei)throw Error(U(168));Je(Zt,t),Je(yr,r)}function xN(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(U(108,tO(e)||"Unknown",s));return ht({},r,n)}function Ph(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ei,Ta=Zt.current,Je(Zt,e),Je(yr,yr.current),!0}function j0(e,t,r){var n=e.stateNode;if(!n)throw Error(U(169));r?(e=xN(e,t,Ta),n.__reactInternalMemoizedMergedChildContext=e,tt(yr),tt(Zt),Je(Zt,e)):tt(yr),Je(yr,r)}var ls=null,Im=!1,lp=!1;function vN(e){ls===null?ls=[e]:ls.push(e)}function x4(e){Im=!0,vN(e)}function Fi(){if(!lp&&ls!==null){lp=!0;var e=0,t=Ve;try{var r=ls;
vendor: 15,472 bytes, line 38
38for(Ve=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}ls=null,Im=!1}catch(s){throw ls!==null&&(ls=ls.slice(e+1)),z_(lv,Fi),s}finally{Ve=t,lp=!1}}return null}var ko=[],So=0,Ih=null,Oh=0,$r=[],Fr=0,Ea=null,hs=1,ms="";function ea(e,t){ko[So++]=Oh,ko[So++]=Ih,Ih=e,Oh=t}function wN(e,t,r){$r[Fr++]=hs,$r[Fr++]=ms,$r[Fr++]=Ea,Ea=e;var n=hs;e=ms;var s=32-fn(n)-1;n&=~(1<<s),r+=1;var a=32-fn(t)+s;if(30<a){var o=s-s%5;a=(n&(1<<o)-1).toString(32),n>>=o,s-=o,hs=1<<32-fn(t)+s|r<<s|n,ms=a+e}else hs=1<<a|r<<s|n,ms=e}function yv(e){e.return!==null&&(ea(e,1),wN(e,1,0))}function xv(e){for(;e===Ih;)Ih=ko[--So],ko[So]=null,Oh=ko[--So],ko[So]=null;for(;e===Ea;)Ea=$r[--Fr],$r[Fr]=null,ms=$r[--Fr],$r[Fr]=null,hs=$r[--Fr],$r[Fr]=null}var _r=null,Sr=null,it=!1,un=null;function bN(e,t){var r=Br(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function k0(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,_r=e,Sr=vi(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,_r=e,Sr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Ea!==null?{id:hs,overflow:ms}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Br(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,_r=e,Sr=null,!0):!1;default:return!1}}function Yg(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Jg(e){if(it){var t=Sr;if(t){var r=t;if(!k0(e,t)){if(Yg(e))throw Error(U(418));t=vi(r.nextSibling);var n=_r;t&&k0(e,t)?bN(n,r):(e.flags=e.flags&-4097|2,it=!1,_r=e)}}else{if(Yg(e))throw Error(U(418));e.flags=e.flags&-4097|2,it=!1,_r=e}}}function S0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_r=e}function yu(e){if(e!==_r)return!1;if(!it)return S0(e),it=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Wg(e.type,e.memoizedProps)),t&&(t=Sr)){if(Yg(e))throw jN(),Error(U(418));for(;t;)bN(e,t),t=vi(t.nextSibling)}if(S0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Sr=vi(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Sr=null}}else Sr=_r?vi(e.stateNode.nextSibling):null;return!0}function jN(){for(var e=Sr;e;)e=vi(e.nextSibling)}function dl(){Sr=_r=null,it=!1}function vv(e){un===null?un=[e]:un.push(e)}var v4=Es.ReactCurrentBatchConfig;function sc(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(U(309));var n=r.stateNode}if(!n)throw Error(U(147,e));var s=n,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var l=s.refs;o===null?delete l[a]:l[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(U(284));if(!r._owner)throw Error(U(290,e))}return e}function xu(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function _0(e){var t=e._init;return t(e._payload)}function kN(e){function t(g,v){if(e){var w=g.deletions;w===null?(g.deletions=[v],g.flags|=16):w.push(v)}}function r(g,v){if(!e)return null;for(;v!==null;)t(g,v),v=v.sibling;return null}function n(g,v){for(g=new Map;v!==null;)v.key!==null?g.set(v.key,v):g.set(v.index,v),v=v.sibling;return g}function s(g,v){return g=ki(g,v),g.index=0,g.sibling=null,g}function a(g,v,w){return g.index=w,e?(w=g.alternate,w!==null?(w=w.index,w<v?(g.flags|=2,v):w):(g.flags|=2,v)):(g.flags|=1048576,v)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function l(g,v,w,j){return v===null||v.tag!==6?(v=pp(w,g.mode,j),v.return=g,v):(v=s(v,w),v.return=g,v)}function c(g,v,w,j){var k=w.type;return k===yo?u(g,v,w.props.children,j,w.key):v!==null&&(v.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Ks&&_0(k)===v.type)?(j=s(v,w.props),j.ref=sc(g,v,w),j.return=g,j):(j=sh(w.type,w.key,w.props,null,g.mode,j),j.ref=sc(g,v,w),j.return=g,j)}function d(g,v,w,j){return v===null||v.tag!==4||v.stateNode.containerInfo!==w.containerInfo||v.stateNode.implementation!==w.implementation?(v=gp(w,g.mode,j),v.return=g,v):(v=s(v,w.children||[]),v.return=g,v)}function u(g,v,w,j,k){return v===null||v.tag!==7?(v=ka(w,g.mode,j,k),v.return=g,v):(v=s(v,w),v.return=g,v)}function h(g,v,w){if(typeof v=="string"&&v!==""||typeof v=="number")return v=pp(""+v,g.mode,w),v.return=g,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ou:return w=sh(v.type,v.key,v.props,null,g.mode,w),w.ref=sc(g,null,v),w.return=g,w;case go:return v=gp(v,g.mode,w),v.return=g,v;case Ks:var j=v._init;return h(g,j(v._payload),w)}if(xc(v)||Xl(v))return v=ka(v,g.mode,w,null),v.return=g,v;xu(g,v)}return null}function m(g,v,w,j){var k=v!==null?v.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return k!==null?null:l(g,v,""+w,j);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ou:return w.key===k?c(g,v,w,j):null;case go:return w.key===k?d(g,v,w,j):null;case Ks:return k=w._init,m(g,v,k(w._payload),j)}if(xc(w)||Xl(w))return k!==null?null:u(g,v,w,j,null);xu(g,w)}return null}function f(g,v,w,j,k){if(typeof j=="string"&&j!==""||typeof j=="number")return g=g.get(w)||null,l(v,g,""+j,k);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case ou:return g=g.get(j.key===null?w:j.key)||null,c(v,g,j,k);case go:return g=g.get(j.key===null?w:j.key)||null,d(v,g,j,k);case Ks:var S=j._init;return f(g,v,w,S(j._payload),k)}if(xc(j)||Xl(j))return g=g.get(w)||null,u(v,g,j,k,null);xu(v,j)}return null}function y(g,v,w,j){for(var k=null,S=null,_=v,N=v=0,T=null;_!==null&&N<w.length;N++){_.index>N?(T=_,_=null):T=_.sibling;var P=m(g,_,w[N],j);if(P===null){_===null&&(_=T);break}e&&_&&P.alternate===null&&t(g,_),v=a(P,v,N),S===null?k=P:S.sibling=P,S=P,_=T}if(N===w.length)return r(g,_),it&&ea(g,N),k;if(_===null){for(;N<w.length;N++)_=h(g,w[N],j),_!==null&&(v=a(_,v,N),S===null?k=_:S.sibling=_,S=_);return it&&ea(g,N),k}for(_=n(g,_);N<w.length;N++)T=f(_,g,N,w[N],j),T!==null&&(e&&T.alternate!==null&&_.delete(T.key===null?N:T.key),v=a(T,v,N),S===null?k=T:S.sibling=T,S=T);return e&&_.forEach(function(A){return t(g,A)}),it&&ea(g,N),k}function x(g,v,w,j){var k=Xl(w);if(typeof k!="function")throw Error(U(150));if(w=k.call(w),w==null)throw Error(U(151));for(var S=k=null,_=v,N=v=0,T=null,P=w.next();_!==null&&!P.done;N++,P=w.next()){_.index>N?(T=_,_=null):T=_.sibling;var A=m(g,_,P.value,j);if(A===null){_===null&&(_=T);break}e&&_&&A.alternate===null&&t(g,_),v=a(A,v,N),S===null?k=A:S.sibling=A,S=A,_=T}if(P.done)return r(g,_),it&&ea(g,N),k;if(_===null){for(;!P.done;N++,P=w.next())P=h(g,P.value,j),P!==null&&(v=a(P,v,N),S===null?k=P:S.sibling=P,S=P);return it&&ea(g,N),k}for(_=n(g,_);!P.done;N++,P=w.next())P=f(_,g,N,P.value,j),P!==null&&(e&&P.alternate!==null&&_.delete(P.key===null?N:P.key),v=a(P,v,N),S===null?k=P:S.sibling=P,S=P);return e&&_.forEach(function(M){return t(g,M)}),it&&ea(g,N),k}function b(g,v,w,j){if(typeof w=="object"&&w!==null&&w.type===yo&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ou:e:{for(var k=w.key,S=v;S!==null;){if(S.key===k){if(k=w.type,k===yo){if(S.tag===7){r(g,S.sibling),v=s(S,w.props.children),v.return=g,g=v;break e}}else if(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Ks&&_0(k)===S.type){r(g,S.sibling),v=s(S,w.props),v.ref=sc(g,S,w),v.return=g,g=v;break e}r(g,S);break}else t(g,S);S=S.sibling}w.type===yo?(v=ka(w.props.children,g.mode,j,w.key),v.return=g,g=v):(j=sh(w.type,w.key,w.props,null,g.mode,j),j.ref=sc(g,v,w),j.return=g,g=j)}return o(g);case go:e:{for(S=w.key;v!==null;){if(v.key===S)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){r(g,v.sibling),v=s(v,w.children||[]),v.return=g,g=v;break e}else{r(g,v);break}else t(g,v);v=v.sibling}v=gp(w,g.mode,j),v.return=g,g=v}return o(g);case Ks:return S=w._init,b(g,v,S(w._payload),j)}if(xc(w))return y(g,v,w,j);if(Xl(w))return x(g,v,w,j);xu(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(r(g,v.sibling),v=s(v,w),v.return=g,g=v):(r(g,v),v=pp(w,g.mode,j),v.return=g,g=v),o(g)):r(g,v)}return b}var ul=kN(!0),SN=kN(!1),Mh=$i(null),Dh=null,_o=null,wv=null;function bv(){wv=_o=Dh=null}function jv(e){var t=Mh.current;tt(Mh),e._currentValue=t}function Qg(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function $o(e,t){Dh=e,wv=_o=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(gr=!0),e.firstContext=null)}function zr(e){var t=e._currentValue;if(wv!==e)if(e={context:e,memoizedValue:t,next:null},_o===null){if(Dh===null)throw Error(U(308));_o=e,Dh.dependencies={lanes:0,firstContext:e}}else _o=_o.next=e;return t}var oa=null;function kv(e){oa===null?oa=[e]:oa.push(e)}function _N(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,kv(t)):(r.next=s.next,s.next=r),t.interleaved=r,bs(e,n)}function bs(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Ys=!1;function Sv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function NN(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 ys(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function wi(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Ie&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,bs(e,r)}return s=n.interleaved,s===null?(t.next=t,kv(n)):(t.next=s.next,s.next=t),n.interleaved=t,bs(e,r)}function Zu(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,cv(e,r)}}function N0(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?s=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?s=a=t:a=a.next=t}else s=a=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Lh(e,t,r,n){var s=e.updateQueue;Ys=!1;var a=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,d=c.next;c.next=null,o===null?a=d:o.next=d,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,l=u.lastBaseUpdate,l!==o&&(l===null?u.firstBaseUpdate=d:l.next=d,u.lastBaseUpdate=c))}if(a!==null){var h=s.baseState;o=0,u=d=c=null,l=a;do{var m=l.lane,f=l.eventTime;if((n&m)===m){u!==null&&(u=u.next={eventTime:f,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,x=l;switch(m=t,f=r,x.tag){case 1:if(y=x.payload,typeof y=="function"){h=y.call(f,h,m);break e}h=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,m=typeof y=="function"?y.call(f,h,m):y,m==null)break e;h=ht({},h,m);break e;case 2:Ys=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,m=s.effects,m===null?s.effects=[l]:m.push(l))}else f={eventTime:f,lane:m,tag:l.tag,payload:l.payload,callback:l.callback,next:null},u===null?(d=u=f,c=h):u=u.next=f,o|=m;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;m=l,l=m.next,m.next=null,s.lastBaseUpdate=m,s.shared.pending=null}}while(!0);if(u===null&&(c=h),s.baseState=c,s.firstBaseUpdate=d,s.lastBaseUpdate=u,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else a===null&&(s.shared.lanes=0);Pa|=o,e.lanes=o,e.memoizedState=h}}function C0(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(U(191,s));s.call(n)}}}var Hd={},Fn=$i(Hd),sd=$i(Hd),id=$i(Hd);function la(e){if(e===Hd)throw Error(U(174));return e}function _v(e,t){switch(Je(id,t),Je(sd,e),Je(Fn,Hd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Rg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Rg(t,e)}tt(Fn),Je(Fn,t)}function hl(){tt(Fn),tt(sd),tt(id)}function CN(e){la(id.current);var t=la(Fn.current),r=Rg(t,e.type);t!==r&&(Je(sd,e),Je(Fn,r))}function Nv(e){sd.current===e&&(tt(Fn),tt(sd))}var lt=$i(0);function $h(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.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 cp=[];function Cv(){for(var e=0;e<cp.length;e++)cp[e]._workInProgressVersionPrimary=null;cp.length=0}var Xu=Es.ReactCurrentDispatcher,dp=Es.ReactCurrentBatchConfig,Ra=0,dt=null,Ct=null,Rt=null,Fh=!1,Oc=!1,ad=0,w4=0;function Ht(){throw Error(U(321))}function Av(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!vn(e[r],t[r]))return!1;return!0}function Tv(e,t,r,n,s,a){if(Ra=a,dt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xu.current=e===null||e.memoizedState===null?S4:_4,e=r(n,s),Oc){a=0;do{if(Oc=!1,ad=0,25<=a)throw Error(U(301));a+=1,Rt=Ct=null,t.updateQueue=null,Xu.current=N4,e=r(n,s)}while(Oc)}if(Xu.current=Bh,t=Ct!==null&&Ct.next!==null,Ra=0,Rt=Ct=dt=null,Fh=!1,t)throw Error(U(300));return e}function Ev(){var e=ad!==0;return ad=0,e}function Cn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rt===null?dt.memoizedState=Rt=e:Rt=Rt.next=e,Rt}function Wr(){if(Ct===null){var e=dt.alternate;e=e!==null?e.memoizedState:null}else e=Ct.next;var t=Rt===null?dt.memoizedState:Rt.next;if(t!==null)Rt=t,Ct=e;else{if(e===null)throw Error(U(310));Ct=e,e={memoizedState:Ct.memoizedState,baseState:Ct.baseState,baseQueue:Ct.baseQueue,queue:Ct.queue,next:null},Rt===null?dt.memoizedState=Rt=e:Rt=Rt.next=e}return Rt}function od(e,t){return typeof t=="function"?t(e):t}function up(e){var t=Wr(),r=t.queue;if(r===null)throw Error(U(311));r.lastRenderedReducer=e;var n=Ct,s=n.baseQueue,a=r.pending;if(a!==null){if(s!==null){var o=s.next;s.next=a.next,a.next=o}n.baseQueue=s=a,r.pending=null}if(s!==null){a=s.next,n=n.baseState;var l=o=null,c=null,d=a;do{var u=d.lane;if((Ra&u)===u)c!==null&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),n=d.hasEagerState?d.eagerState:e(n,d.action);else{var h={lane:u,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};c===null?(l=c=h,o=n):c=c.next=h,dt.lanes|=u,Pa|=u}d=d.next}while(d!==null&&d!==a);c===null?o=n:c.next=l,vn(n,t.memoizedState)||(gr=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do a=s.lane,dt.lanes|=a,Pa|=a,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);
vendor: 4,900 bytes, line 38
38return[t.memoizedState,r.dispatch]}function hp(e){var t=Wr(),r=t.queue;if(r===null)throw Error(U(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,a=t.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do a=e(a,o.action),o=o.next;while(o!==s);vn(a,t.memoizedState)||(gr=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function AN(){}function TN(e,t){var r=dt,n=Wr(),s=t(),a=!vn(n.memoizedState,s);if(a&&(n.memoizedState=s,gr=!0),n=n.queue,Rv(PN.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||Rt!==null&&Rt.memoizedState.tag&1){if(r.flags|=2048,ld(9,RN.bind(null,r,n,s,t),void 0,null),Pt===null)throw Error(U(349));Ra&30||EN(r,t,s)}return s}function EN(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=dt.updateQueue,t===null?(t={lastEffect:null,stores:null},dt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function RN(e,t,r,n){t.value=r,t.getSnapshot=n,IN(t)&&ON(e)}function PN(e,t,r){return r(function(){IN(t)&&ON(e)})}function IN(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!vn(e,r)}catch{return!0}}function ON(e){var t=bs(e,1);t!==null&&pn(t,e,1,-1)}function A0(e){var t=Cn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:od,lastRenderedState:e},t.queue=e,e=e.dispatch=k4.bind(null,dt,e),[t.memoizedState,e]}function ld(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=dt.updateQueue,t===null?(t={lastEffect:null,stores:null},dt.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function MN(){return Wr().memoizedState}function eh(e,t,r,n){var s=Cn();dt.flags|=e,s.memoizedState=ld(1|t,r,void 0,n===void 0?null:n)}function Om(e,t,r,n){var s=Wr();n=n===void 0?null:n;var a=void 0;if(Ct!==null){var o=Ct.memoizedState;if(a=o.destroy,n!==null&&Av(n,o.deps)){s.memoizedState=ld(t,r,a,n);return}}dt.flags|=e,s.memoizedState=ld(1|t,r,a,n)}function T0(e,t){return eh(8390656,8,e,t)}function Rv(e,t){return Om(2048,8,e,t)}function DN(e,t){return Om(4,2,e,t)}function LN(e,t){return Om(4,4,e,t)}function $N(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 FN(e,t,r){return r=r!=null?r.concat([e]):null,Om(4,4,$N.bind(null,t,e),r)}function Pv(){}function BN(e,t){var r=Wr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Av(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function UN(e,t){var r=Wr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Av(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function VN(e,t,r){return Ra&21?(vn(r,t)||(r=G_(),dt.lanes|=r,Pa|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,gr=!0),e.memoizedState=r)}function b4(e,t){var r=Ve;Ve=r!==0&&4>r?r:4,e(!0);var n=dp.transition;dp.transition={};try{e(!1),t()}finally{Ve=r,dp.transition=n}}function HN(){return Wr().memoizedState}function j4(e,t,r){var n=ji(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},zN(e))WN(t,r);else if(r=_N(e,t,r,n),r!==null){var s=ir();pn(r,e,n,s),qN(r,t,n)}}function k4(e,t,r){var n=ji(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(zN(e))WN(t,s);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,l=a(o,r);if(s.hasEagerState=!0,s.eagerState=l,vn(l,o)){var c=t.interleaved;c===null?(s.next=s,kv(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}r=_N(e,t,s,n),r!==null&&(s=ir(),pn(r,e,n,s),qN(r,t,n))}}function zN(e){var t=e.alternate;return e===dt||t!==null&&t===dt}function WN(e,t){Oc=Fh=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function qN(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,cv(e,r)}}var Bh={readContext:zr,useCallback:Ht,useContext:Ht,useEffect:Ht,useImperativeHandle:Ht,useInsertionEffect:Ht,useLayoutEffect:Ht,useMemo:Ht,useReducer:Ht,useRef:Ht,useState:Ht,useDebugValue:Ht,useDeferredValue:Ht,useTransition:Ht,useMutableSource:Ht,useSyncExternalStore:Ht,useId:Ht,unstable_isNewReconciler:!1},S4={readContext:zr,useCallback:function(e,t){return Cn().memoizedState=[e,t===void 0?null:t],e},useContext:zr,useEffect:T0,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,eh(4194308,4,$N.bind(null,t,e),r)},useLayoutEffect:function(e,t){return eh(4194308,4,e,t)},useInsertionEffect:function(e,t){return eh(4,2,e,t)},useMemo:function(e,t){var r=Cn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Cn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=j4.bind(null,dt,e),[n.memoizedState,e]}
vendor: 5,744 bytes, lines 38-40
38,useRef:function(e){var t=Cn();return e={current:e},t.memoizedState=e},useState:A0,useDebugValue:Pv,useDeferredValue:function(e){return Cn().memoizedState=e},useTransition:function(){var e=A0(!1),t=e[0];return e=b4.bind(null,e[1]),Cn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=dt,s=Cn();if(it){if(r===void 0)throw Error(U(407));r=r()}else{if(r=t(),Pt===null)throw Error(U(349));Ra&30||EN(n,t,r)}s.memoizedState=r;var a={value:r,getSnapshot:t};return s.queue=a,T0(PN.bind(null,n,a,e),[e]),n.flags|=2048,ld(9,RN.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=Cn(),t=Pt.identifierPrefix;if(it){var r=ms,n=hs;r=(n&~(1<<32-fn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=ad++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=w4++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},_4={readContext:zr,useCallback:BN,useContext:zr,useEffect:Rv,useImperativeHandle:FN,useInsertionEffect:DN,useLayoutEffect:LN,useMemo:UN,useReducer:up,useRef:MN,useState:function(){return up(od)},useDebugValue:Pv,useDeferredValue:function(e){var t=Wr();return VN(t,Ct.memoizedState,e)},useTransition:function(){var e=up(od)[0],t=Wr().memoizedState;return[e,t]},useMutableSource:AN,useSyncExternalStore:TN,useId:HN,unstable_isNewReconciler:!1},N4={readContext:zr,useCallback:BN,useContext:zr,useEffect:Rv,useImperativeHandle:FN,useInsertionEffect:DN,useLayoutEffect:LN,useMemo:UN,useReducer:hp,useRef:MN,useState:function(){return hp(od)},useDebugValue:Pv,useDeferredValue:function(e){var t=Wr();return Ct===null?t.memoizedState=e:VN(t,Ct.memoizedState,e)},useTransition:function(){var e=hp(od)[0],t=Wr().memoizedState;return[e,t]},useMutableSource:AN,useSyncExternalStore:TN,useId:HN,unstable_isNewReconciler:!1};function an(e,t){if(e&&e.defaultProps){t=ht({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Zg(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ht({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Mm={isMounted:function(e){return(e=e._reactInternals)?Wa(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=ir(),s=ji(e),a=ys(n,s);a.payload=t,r!=null&&(a.callback=r),t=wi(e,a,s),t!==null&&(pn(t,e,s,n),Zu(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=ir(),s=ji(e),a=ys(n,s);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=wi(e,a,s),t!==null&&(pn(t,e,s,n),Zu(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=ir(),n=ji(e),s=ys(r,n);s.tag=2,t!=null&&(s.callback=t),t=wi(e,s,n),t!==null&&(pn(t,e,n,r),Zu(t,e,n))}};function E0(e,t,r,n,s,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,o):t.prototype&&t.prototype.isPureReactComponent?!ed(r,n)||!ed(s,a):!0}function GN(e,t,r){var n=!1,s=Ei,a=t.contextType;return typeof a=="object"&&a!==null?a=zr(a):(s=xr(t)?Ta:Zt.current,n=t.contextTypes,a=(n=n!=null)?cl(e,s):Ei),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Mm,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=a),t}function R0(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Mm.enqueueReplaceState(t,t.state,null)}function Xg(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Sv(e);var a=t.contextType;typeof a=="object"&&a!==null?s.context=zr(a):(a=xr(t)?Ta:Zt.current,s.context=cl(e,a)),s.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Zg(e,t,a,r),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&&Mm.enqueueReplaceState(s,s.state,null),Lh(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function ml(e,t){try{var r="",n=t;do r+=eO(n),n=n.return;while(n);var s=r}catch(a){s=` 39Error generating stack: `+a.message+` 40`+a.stack}return{value:e,source:t,stack:s,digest:null}}function mp(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function ey(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var C4=typeof WeakMap=="function"?WeakMap:Map;function KN(e,t,r){r=ys(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Vh||(Vh=!0,dy=n),ey(e,t)},r}function YN(e,t,r){r=ys(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){ey(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){ey(e,t),typeof n!="function"&&(bi===null?bi=new Set([this]):bi.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function P0(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new C4;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=U4.bind(null,e,t,r),t.then(e,e))}function I0(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 O0(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=ys(-1,1),t.tag=2,
vendor: 6,398 bytes, line 40
40wi(r,t,1))),r.lanes|=1),e)}var A4=Es.ReactCurrentOwner,gr=!1;function rr(e,t,r,n){t.child=e===null?SN(t,null,r,n):ul(t,e.child,r,n)}function M0(e,t,r,n,s){r=r.render;var a=t.ref;return $o(t,s),n=Tv(e,t,r,n,a,s),r=Ev(),e!==null&&!gr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,js(e,t,s)):(it&&r&&yv(t),t.flags|=1,rr(e,t,n,s),t.child)}function D0(e,t,r,n,s){if(e===null){var a=r.type;return typeof a=="function"&&!Bv(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,JN(e,t,a,n,s)):(e=sh(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&s)){var o=a.memoizedProps;if(r=r.compare,r=r!==null?r:ed,r(o,n)&&e.ref===t.ref)return js(e,t,s)}return t.flags|=1,e=ki(a,n),e.ref=t.ref,e.return=t,t.child=e}function JN(e,t,r,n,s){if(e!==null){var a=e.memoizedProps;if(ed(a,n)&&e.ref===t.ref)if(gr=!1,t.pendingProps=n=a,(e.lanes&s)!==0)e.flags&131072&&(gr=!0);else return t.lanes=e.lanes,js(e,t,s)}return ty(e,t,r,n,s)}function QN(e,t,r){var n=t.pendingProps,s=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Je(Co,br),br|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Je(Co,br),br|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Je(Co,br),br|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,Je(Co,br),br|=n;return rr(e,t,s,r),t.child}function ZN(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function ty(e,t,r,n,s){var a=xr(r)?Ta:Zt.current;return a=cl(t,a),$o(t,s),r=Tv(e,t,r,n,a,s),n=Ev(),e!==null&&!gr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,js(e,t,s)):(it&&n&&yv(t),t.flags|=1,rr(e,t,r,s),t.child)}function L0(e,t,r,n,s){if(xr(r)){var a=!0;Ph(t)}else a=!1;if($o(t,s),t.stateNode===null)th(e,t),GN(t,r,n),Xg(t,r,n,s),n=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,d=r.contextType;typeof d=="object"&&d!==null?d=zr(d):(d=xr(r)?Ta:Zt.current,d=cl(t,d));var u=r.getDerivedStateFromProps,h=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==n||c!==d)&&R0(t,o,n,d),Ys=!1;var m=t.memoizedState;o.state=m,Lh(t,n,o,s),c=t.memoizedState,l!==n||m!==c||yr.current||Ys?(typeof u=="function"&&(Zg(t,r,u,n),c=t.memoizedState),(l=Ys||E0(t,r,l,n,m,c,d))?(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=n,t.memoizedState=c),o.props=n,o.state=c,o.context=d,n=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,NN(e,t),l=t.memoizedProps,d=t.type===t.elementType?l:an(t.type,l),o.props=d,h=t.pendingProps,m=o.context,c=r.contextType,typeof c=="object"&&c!==null?c=zr(c):(c=xr(r)?Ta:Zt.current,c=cl(t,c));var f=r.getDerivedStateFromProps;(u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==h||m!==c)&&R0(t,o,n,c),Ys=!1,m=t.memoizedState,o.state=m,Lh(t,n,o,s);var y=t.memoizedState;l!==h||m!==y||yr.current||Ys?(typeof f=="function"&&(Zg(t,r,f,n),y=t.memoizedState),(d=Ys||E0(t,r,d,n,m,y,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,y,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,y,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=y),o.props=n,o.state=y,o.context=c,n=d):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),n=!1)}return ry(e,t,r,n,a,s)}function ry(e,t,r,n,s,a){ZN(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&j0(t,r,!1),js(e,t,a);n=t.stateNode,A4.current=t;var l=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=ul(t,e.child,null,a),t.child=ul(t,null,l,a)):rr(e,t,l,a),t.memoizedState=n.state,s&&j0(t,r,!0),t.child}function XN(e){var t=e.stateNode;t.pendingContext?b0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&b0(e,t.context,!1),_v(e,t.containerInfo)}function $0(e,t,r,n,s){return dl(),vv(s),t.flags|=256,rr(e,t,r,n),t.child}var ny={dehydrated:null,treeContext:null,retryLane:0};function sy(e){return{baseLanes:e,cachePool:null,transitions:null}}function eC(e,t,r){var n=t.pendingProps,s=lt.current,a=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Je(lt,s&1),e===null)return Jg(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=n.children,e=n.fallback,a?(n=t.mode,a=t.child,o={mode:"hidden",children:o},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=$m(o,n,0,null),e=ka(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=sy(r),t.memoizedState=ny,e):Iv(t,o));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return T4(e,t,o,n,l,s,r);if(a){a=n.fallback,o=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:n.children};return!(o&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=ki(s,c),n.subtreeFlags=s.subtreeFlags&14680064),l!==null?a=ki(l,a):(a=ka(a,o,r,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,o=e.child.memoizedState,o=o===null?sy(r):{base
vendor: 8,918 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~r,t.memoizedState=ny,n}return a=e.child,e=a.sibling,n=ki(a,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Iv(e,t){return t=$m({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function vu(e,t,r,n){return n!==null&&vv(n),ul(t,e.child,null,r),e=Iv(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function T4(e,t,r,n,s,a,o){if(r)return t.flags&256?(t.flags&=-257,n=mp(Error(U(422))),vu(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,s=t.mode,n=$m({mode:"visible",children:n.children},s,0,null),a=ka(a,s,o,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,t.mode&1&&ul(t,e.child,null,o),t.child.memoizedState=sy(o),t.memoizedState=ny,a);if(!(t.mode&1))return vu(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var l=n.dgst;return n=l,a=Error(U(419)),n=mp(a,n,void 0),vu(e,t,o,n)}if(l=(o&e.childLanes)!==0,gr||l){if(n=Pt,n!==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&(n.suspendedLanes|o)?0:s,s!==0&&s!==a.retryLane&&(a.retryLane=s,bs(e,s),pn(n,e,s,-1))}return Fv(),n=mp(Error(U(421))),vu(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=V4.bind(null,e),s._reactRetry=t,null):(e=a.treeContext,Sr=vi(s.nextSibling),_r=t,it=!0,un=null,e!==null&&($r[Fr++]=hs,$r[Fr++]=ms,$r[Fr++]=Ea,hs=e.id,ms=e.overflow,Ea=t),t=Iv(t,n.children),t.flags|=4096,t)}function F0(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Qg(e.return,t,r)}function fp(e,t,r,n,s){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=s)}function tC(e,t,r){var n=t.pendingProps,s=n.revealOrder,a=n.tail;if(rr(e,t,n.children,r),n=lt.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&F0(e,r,t);else if(e.tag===19)F0(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Je(lt,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&$h(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),fp(t,!1,s,r,a);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&$h(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}fp(t,!0,r,null,a);break;case"together":fp(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function th(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function js(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Pa|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,r=ki(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=ki(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function E4(e,t,r){switch(t.tag){case 3:XN(t),dl();break;case 5:CN(t);break;case 1:xr(t.type)&&Ph(t);break;case 4:_v(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;Je(Mh,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Je(lt,lt.current&1),t.flags|=128,null):r&t.child.childLanes?eC(e,t,r):(Je(lt,lt.current&1),e=js(e,t,r),e!==null?e.sibling:null);Je(lt,lt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return tC(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Je(lt,lt.current),n)break;return null;case 22:case 23:return t.lanes=0,QN(e,t,r)}return js(e,t,r)}var rC,iy,nC,sC;rC=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};iy=function(){};nC=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,la(Fn.current);var a=null;switch(r){case"input":s=Cg(e,s),n=Cg(e,n),a=[];break;case"select":s=ht({},s,{value:void 0}),n=ht({},n,{value:void 0}),a=[];break;case"textarea":s=Eg(e,s),n=Eg(e,n),a=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Eh)}Pg(r,n);var o;r=null;for(d in s)if(!n.hasOwnProperty(d)&&s.hasOwnProperty(d)&&s[d]!=null)if(d==="style"){var l=s[d];for(o in l)l.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(Gc.hasOwnProperty(d)?a||(a=[]):(a=a||[]).push(d,null));for(d in n){var c=n[d];if(l=s!=null?s[d]:void 0,n.hasOwnProperty(d)&&c!==l&&(c!=null||l!=null))if(d==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(r||(r={}),r[o]=c[o])}else r||(a||(a=[]),a.push(d,r)),r=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(a=a||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(Gc.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&et("scroll",e),a||l===c||(a=[])):(a=a||[]).push(d,c))}r&&(a=a||[]).push("style",r);var d=a;(t.updateQueue=d)&&(t.flags|=4)}};sC=function(e,t,r,n){r!==n&&(t.flags|=4)};function ic(e,t){if(!it)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function zt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function R4(e,t,r){var n=t.pendingProps;switch(xv(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zt(t),null;case 1:return xr(t.type)&&Rh(),zt(t),null;case 3:return n=t.stateNode,hl(),tt(yr),tt(Zt),Cv(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(yu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,un!==null&&(my(un),un=null))),iy(e,t),zt(t),null;case 5:Nv(t);var s=la(id.current);if(r=t.type,e!==null&&t.stateNode!=null)nC(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(U(166));return zt(t),null}if(e=la(Fn.current),yu(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[Mn]=t,n[nd]=a,e=(t.mode&1)!==0,r){case"dialog":et("cancel",n),et("close",n);break;case"iframe":case"object":case"embed":et("load",n);break;case"video":case"audio":for(s=0;s<wc.length;s++)et(wc[s],n);break;case"source":et("error",n);break;case"img":case"image":case"link":et("error",n),et("load",n);break;case"details":et("toggle",n);break;case"input":Kb(n,a),et("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},et("invalid",n);break;case"textarea":Jb(n,a),et("invalid",n)}Pg(r,a),s=null;for(var o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="children"?typeof l=="string"?n.textContent!==l&&(a.suppressHydrationWarning!==!0&&gu(n.textContent,l,e),s=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(a.suppressHydrationWarning!==!0&&gu(n.textContent,l,e),s=["children",""+l]):Gc.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&et("scroll",n)}switch(r){case"input":lu(n),Yb(n,a,!0);break;case"textarea":lu(n),Qb(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=Eh)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=P_(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>
40",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Mn]=t,e[nd]=n,rC(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ig(r,n),r){case"dialog":et("cancel",e),et("close",e),s=n;break;case"iframe":case"object":case"embed":et("load",e),s=n;break;case"video":case"audio":for(s=0;s<wc.length;s++)et(wc[s],e);s=n;break;case"source":et("error",e),s=n;break;case"img":case"image":case"link":et("error",e),et("load",e),s=n;break;case"details":et("toggle",e),s=n;break;case"input":Kb(e,n),s=Cg(e,n),et("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=ht({},n,{value:void 0}),et("invalid",e);break;case"textarea":Jb(e,n),s=Eg(e,n),et("invalid",e);break;default:s=n}Pg(r,s),l=s;for(a in l)if(l.hasOwnProperty(a)){var c=l[a];a==="style"?M_(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&I_(e,c)):a==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&Kc(e,c):typeof c=="number"&&Kc(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Gc.hasOwnProperty(a)?c!=null&&a==="onScroll"&&et("scroll",e):c!=null&&nv(e,a,c,o))}switch(r){case"input":lu(e),Yb(e,n,!1);break;case"textarea":lu(e),Qb(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Ti(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?Oo(e,!!n.multiple,a,!1):n.defaultValue!=null&&Oo(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Eh)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return zt(t),null;case 6:if(e&&t.stateNode!=null)sC(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(U(166));if(r=la(id.current),la(Fn.current),yu(t)){if(n=t.stateNode,r=t.memoizedProps,n[Mn]=t,(a=n.nodeValue!==r)&&(e=_r,e!==null))switch(e.tag){case 3:gu(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&gu(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Mn]=t,t.stateNode=n}return zt(t),null;case 13:if(tt(lt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(it&&Sr!==null&&t.mode&1&&!(t.flags&128))jN(),dl(),t.flags|=98560,a=!1;else if(a=yu(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(U(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(U(317));a[Mn]=t}else dl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;zt(t),a=!1}else un!==null&&(my(un),un=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||lt.current&1?At===0&&(At=3):Fv())),t.updateQueue!==null&&(t.flags|=4),zt(t),null);case 4:return hl(),iy(e,t),e===null&&td(t.stateNode.containerInfo),zt(t),null;case 10:return jv(t.type._context),zt(t),null;case 17:return xr(t.type)&&Rh(),zt(t),null;case 19:if(tt(lt),a=t.memoizedState,a===null)return zt(t),null;if(n=(t.flags&128)!==0,o=a.rendering,o===null)if(n)ic(a,!1);else{if(At!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=$h(e),o!==null){for(t.flags|=128,ic(a,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)a=r,e=n,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Je(lt,lt.current&1|2),t.child}e=e.sibling}a.tail!==null&&vt()>fl&&(t.flags|=128,n=!0,ic(a,!1),t.lanes=4194304)}else{if(!n)if(e=$h(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ic(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!it)return zt(t),null}else 2*vt()-a.renderingStartTime>fl&&r!==1073741824&&(t.flags|=128,n=!0,ic(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=vt(),t.sibling=null,r=lt.current,Je(lt,n?r&1|2:r&1),t):(zt(t),null);case 22:case 23:return $v(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?br&1073741824&&(zt(t),t.subtreeFlags&6&&(t.flags|=8192)):zt(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function P4(e,t){switch(xv(t),t.tag){case 1:return xr(t.type)&&Rh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 26,878 bytes, line 40
40case 3:return hl(),tt(yr),tt(Zt),Cv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nv(t),null;case 13:if(tt(lt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));dl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tt(lt),null;case 4:return hl(),null;case 10:return jv(t.type._context),null;case 22:case 23:return $v(),null;case 24:return null;default:return null}}var wu=!1,Yt=!1,I4=typeof WeakSet=="function"?WeakSet:Set,Z=null;function No(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){gt(e,t,n)}else r.current=null}function ay(e,t,r){try{r()}catch(n){gt(e,t,n)}}var B0=!1;function O4(e,t){if(Hg=Ch,e=cN(),gv(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,l=-1,c=-1,d=0,u=0,h=e,m=null;t:for(;;){for(var f;h!==r||s!==0&&h.nodeType!==3||(l=o+s),h!==a||n!==0&&h.nodeType!==3||(c=o+n),h.nodeType===3&&(o+=h.nodeValue.length),(f=h.firstChild)!==null;)m=h,h=f;for(;;){if(h===e)break t;if(m===r&&++d===s&&(l=o),m===a&&++u===n&&(c=o),(f=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=f}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(zg={focusedElem:e,selectionRange:r},Ch=!1,Z=t;Z!==null;)if(t=Z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Z=e;else for(;Z!==null;){t=Z;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 x=y.memoizedProps,b=y.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?x:an(t.type,x),b);g.__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(U(163))}}catch(j){gt(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,Z=e;break}Z=t.return}return y=B0,B0=!1,y}function Mc(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var a=s.destroy;s.destroy=void 0,a!==void 0&&ay(t,r,a)}s=s.next}while(s!==n)}}function Dm(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function oy(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function iC(e){var t=e.alternate;t!==null&&(e.alternate=null,iC(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mn],delete t[nd],delete t[Gg],delete t[g4],delete t[y4])),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 aC(e){return e.tag===5||e.tag===3||e.tag===4}function U0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||aC(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 ly(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Eh));else if(n!==4&&(e=e.child,e!==null))for(ly(e,t,r),e=e.sibling;e!==null;)ly(e,t,r),e=e.sibling}function cy(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(cy(e,t,r),e=e.sibling;e!==null;)cy(e,t,r),e=e.sibling}var Ot=null,dn=!1;function Us(e,t,r){for(r=r.child;r!==null;)oC(e,t,r),r=r.sibling}function oC(e,t,r){if($n&&typeof $n.onCommitFiberUnmount=="function")try{$n.onCommitFiberUnmount(Am,r)}catch{}switch(r.tag){case 5:Yt||No(r,t);case 6:var n=Ot,s=dn;Ot=null,Us(e,t,r),Ot=n,dn=s,Ot!==null&&(dn?(e=Ot,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ot.removeChild(r.stateNode));break;case 18:Ot!==null&&(dn?(e=Ot,r=r.stateNode,e.nodeType===8?op(e.parentNode,r):e.nodeType===1&&op(e,r),Zc(e)):op(Ot,r.stateNode));break;case 4:n=Ot,s=dn,Ot=r.stateNode.containerInfo,dn=!0,Us(e,t,r),Ot=n,dn=s;break;case 0:case 11:case 14:case 15:if(!Yt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var a=s,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&ay(r,t,o),s=s.next}while(s!==n)}Us(e,t,r);break;case 1:if(!Yt&&(No(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){gt(r,t,l)}Us(e,t,r);break;case 21:Us(e,t,r);break;case 22:r.mode&1?(Yt=(n=Yt)||r.memoizedState!==null,Us(e,t,r),Yt=n):Us(e,t,r);break;default:Us(e,t,r)}}function V0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new I4),t.forEach(function(n){var s=H4.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Zr(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var a=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:Ot=l.stateNode,dn=!1;break e;case 3:Ot=l.stateNode.containerInfo,dn=!0;break e;case 4:Ot=l.stateNode.containerInfo,dn=!0;break e}l=l.return}if(Ot===null)throw Error(U(160));oC(a,o,s),Ot=null,dn=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(d){gt(s,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)lC(t,e),t=t.sibling}function lC(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Zr(t,e),Nn(e),n&4){try{Mc(3,e,e.return),Dm(3,e)}catch(x){gt(e,e.return,x)}try{Mc(5,e,e.return)}catch(x){gt(e,e.return,x)}}break;case 1:Zr(t,e),Nn(e),n&512&&r!==null&&No(r,r.return);break;case 5:if(Zr(t,e),Nn(e),n&512&&r!==null&&No(r,r.return),e.flags&32){var s=e.stateNode;try{Kc(s,"")}catch(x){gt(e,e.return,x)}}if(n&4&&(s=e.stateNode,s!=null)){var a=e.memoizedProps,o=r!==null?r.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&a.type==="radio"&&a.name!=null&&E_(s,a),Ig(l,o);var d=Ig(l,a);for(o=0;o<c.length;o+=2){var u=c[o],h=c[o+1];u==="style"?M_(s,h):u==="dangerouslySetInnerHTML"?I_(s,h):u==="children"?Kc(s,h):nv(s,u,h,d)}switch(l){case"input":Ag(s,a);break;case"textarea":R_(s,a);break;case"select":var m=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!a.multiple;var f=a.value;f!=null?Oo(s,!!a.multiple,f,!1):m!==!!a.multiple&&(a.defaultValue!=null?Oo(s,!!a.multiple,a.defaultValue,!0):Oo(s,!!a.multiple,a.multiple?[]:"",!1))}s[nd]=a}catch(x){gt(e,e.return,x)}}break;case 6:if(Zr(t,e),Nn(e),n&4){if(e.stateNode===null)throw Error(U(162));s=e.stateNode,a=e.memoizedProps;try{s.nodeValue=a}catch(x){gt(e,e.return,x)}}break;case 3:if(Zr(t,e),Nn(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Zc(t.containerInfo)}catch(x){gt(e,e.return,x)}break;case 4:Zr(t,e),Nn(e);break;case 13:Zr(t,e),Nn(e),s=e.child,s.flags&8192&&(a=s.memoizedState!==null,s.stateNode.isHidden=a,!a||s.alternate!==null&&s.alternate.memoizedState!==null||(Dv=vt())),n&4&&V0(e);break;case 22:if(u=r!==null&&r.memoizedState!==null,e.mode&1?(Yt=(d=Yt)||u,Zr(t,e),Yt=d):Zr(t,e),Nn(e),n&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!u&&e.mode&1)for(Z=e,u=e.child;u!==null;){for(h=Z=u;Z!==null;){switch(m=Z,f=m.child,m.tag){case 0:case 11:case 14:case 15:Mc(4,m,m.return);break;case 1:No(m,m.return);var y=m.stateNode;if(typeof y.componentWillUnmount=="function"){n=m,r=m.return;try{t=n,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(x){gt(n,r,x)}}break;case 5:No(m,m.return);break;case 22:if(m.memoizedState!==null){z0(h);continue}}f!==null?(f.return=m,Z=f):z0(h)}u=u.sibling}e:for(u=null,h=e;;){if(h.tag===5){if(u===null){u=h;try{s=h.stateNode,d?(a=s.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(l=h.stateNode,c=h.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=O_("display",o))}catch(x){gt(e,e.return,x)}}}else if(h.tag===6){if(u===null)try{h.stateNode.nodeValue=d?"":h.memoizedProps}catch(x){gt(e,e.return,x)}}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;u===h&&(u=null),h=h.return}u===h&&(u=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Zr(t,e),Nn(e),n&4&&V0(e);break;case 21:break;default:Zr(t,e),Nn(e)}}function Nn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(aC(r)){var n=r;break e}r=r.return}throw Error(U(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(Kc(s,""),n.flags&=-33);var a=U0(e);cy(e,a,s);break;case 3:case 4:var o=n.stateNode.containerInfo,l=U0(e);ly(e,l,o);break;default:throw Error(U(161))}}catch(c){gt(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function M4(e,t,r){Z=e,cC(e)}function cC(e,t,r){for(var n=(e.mode&1)!==0;Z!==null;){var s=Z,a=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||wu;if(!o){var l=s.alternate,c=l!==null&&l.memoizedState!==null||Yt;l=wu;var d=Yt;if(wu=o,(Yt=c)&&!d)for(Z=s;Z!==null;)o=Z,c=o.child,o.tag===22&&o.memoizedState!==null?W0(s):c!==null?(c.return=o,Z=c):W0(s);for(;a!==null;)Z=a,cC(a),a=a.sibling;Z=s,wu=l,Yt=d}H0(e)}else s.subtreeFlags&8772&&a!==null?(a.return=s,Z=a):H0(e)}}function H0(e){for(;Z!==null;){var t=Z;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Yt||Dm(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Yt)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:an(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&C0(t,a,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}C0(t,o,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var u=d.memoizedState;if(u!==null){var h=u.dehydrated;h!==null&&Zc(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}Yt||t.flags&512&&oy(t)}catch(m){gt(t,t.return,m)}}if(t===e){Z=null;break}if(r=t.sibling,r!==null){r.return=t.return,Z=r;break}Z=t.return}}function z0(e){for(;Z!==null;){var t=Z;if(t===e){Z=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Z=r;break}Z=t.return}}function W0(e){for(;Z!==null;){var t=Z;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Dm(4,t)}catch(c){gt(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(c){gt(t,s,c)}}var a=t.return;try{oy(t)}catch(c){gt(t,a,c)}break;case 5:var o=t.return;try{oy(t)}catch(c){gt(t,o,c)}}}catch(c){gt(t,t.return,c)}if(t===e){Z=null;break}var l=t.sibling;if(l!==null){l.return=t.return,Z=l;break}Z=t.return}}var D4=Math.ceil,Uh=Es.ReactCurrentDispatcher,Ov=Es.ReactCurrentOwner,Vr=Es.ReactCurrentBatchConfig,Ie=0,Pt=null,St=null,$t=0,br=0,Co=$i(0),At=0,cd=null,Pa=0,Lm=0,Mv=0,Dc=null,fr=null,Dv=0,fl=1/0,ss=null,Vh=!1,dy=null,bi=null,bu=!1,di=null,Hh=0,Lc=0,uy=null,rh=-1,nh=0;function ir(){return Ie&6?vt():rh!==-1?rh:rh=vt()}function ji(e){return e.mode&1?Ie&2&&$t!==0?$t&-$t:v4.transition!==null?(nh===0&&(nh=G_()),nh):(e=Ve,e!==0||(e=window.event,e=e===void 0?16:eN(e.type)),e):1}function pn(e,t,r,n){if(50<Lc)throw Lc=0,uy=null,Error(U(185));Bd(e,r,n),(!(Ie&2)||e!==Pt)&&(e===Pt&&(!(Ie&2)&&(Lm|=r),At===4&&Zs(e,$t)),vr(e,n),r===1&&Ie===0&&!(t.mode&1)&&(fl=vt()+500,Im&&Fi()))}function vr(e,t){var r=e.callbackNode;vO(e,t);var n=Nh(e,e===Pt?$t:0);if(n===0)r!==null&&e0(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&e0(r),t===1)e.tag===0?x4(q0.bind(null,e)):vN(q0.bind(null,e)),f4(function(){!(Ie&6)&&Fi()}),r=null;else{switch(K_(n)){case 1:r=lv;break;case 4:r=W_;break;case 16:r=_h;break;case 536870912:r=q_;break;default:r=_h}r=yC(r,dC.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function dC(e,t){if(rh=-1,nh=0,Ie&6)throw Error(U(327));var r=e.callbackNode;if(Fo()&&e.callbackNode!==r)return null;var n=Nh(e,e===Pt?$t:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=zh(e,n);else{t=n;var s=Ie;Ie|=2;var a=hC();(Pt!==e||$t!==t)&&(ss=null,fl=vt()+500,ja(e,t));do try{F4();break}catch(l){uC(e,l)}while(!0);bv(),Uh.current=a,Ie=s,St!==null?t=0:(Pt=null,$t=0,t=At)}if(t!==0){if(t===2&&(s=$g(e),s!==0&&(n=s,t=hy(e,s))),t===1)throw r=cd,ja(e,0),Zs(e,n),vr(e,vt()),r;if(t===6)Zs(e,n);else{if(s=e.current.alternate,!(n&30)&&!L4(s)&&(t=zh(e,n),t===2&&(a=$g(e),a!==0&&(n=a,t=hy(e,a))),t===1))throw r=cd,ja(e,0),Zs(e,n),vr(e,vt()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(U(345));case 2:ta(e,fr,ss);break;case 3:if(Zs(e,n),(n&130023424)===n&&(t=Dv+500-vt(),10<t)){if(Nh(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){ir(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=qg(ta.bind(null,e,fr,ss),t);break}ta(e,fr,ss);break;case 4:if(Zs(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var o=31-fn(n);a=1<<o,o=t[o],o>s&&(s=o),n&=~a}if(n=s,n=vt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*D4(n/1960))-n,10<n){e.timeoutHandle=qg(ta.bind(null,e,fr,ss),n);break}ta(e,fr,ss);break;case 5:ta(e,fr,ss);break;default:throw Error(U(329))}}}return vr(e,vt()),e.callbackNode===r?dC.bind(null,e):null}function hy(e,t){var r=Dc;return e.current.memoizedState.isDehydrated&&(ja(e,t).flags|=256),e=zh(e,t),e!==2&&(t=fr,fr=r,t!==null&&my(t)),e}function my(e){fr===null?fr=e:fr.push.apply(fr,e)}function L4(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],a=s.getSnapshot;s=s.value;try{if(!vn(a(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Zs(e,t){for(t&=~Mv,t&=~Lm,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-fn(t),n=1<<r;e[r]=-1,t&=~n}}function q0(e){if(Ie&6)throw Error(U(327));Fo();var t=Nh(e,0);if(!(t&1))return vr(e,vt()),null;var r=zh(e,t);if(e.tag!==0&&r===2){var n=$g(e);n!==0&&(t=n,r=hy(e,n))}if(r===1)throw r=cd,ja(e,0),Zs(e,t),vr(e,vt()),r;if(r===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ta(e,fr,ss),vr(e,vt()),null}function Lv(e,t){var r=Ie;Ie|=1;try{return e(t)}finally{Ie=r,Ie===0&&(fl=vt()+500,Im&&Fi())}}function Ia(e){di!==null&&di.tag===0&&!(Ie&6)&&Fo();var t=Ie;Ie|=1;var r=Vr.transition,n=Ve;try{if(Vr.transition=null,Ve=1,e)return e()}finally{Ve=n,Vr.transition=r,Ie=t,!(Ie&6)&&Fi()}}function $v(){br=Co.current,tt(Co)}function ja(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,m4(r)),St!==null)for(r=St.return;r!==null;){var n=r;switch(xv(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Rh();break;case 3:hl(),tt(yr),tt(Zt),Cv();break;case 5:Nv(n);break;case 4:hl();break;case 13:tt(lt);break;case 19:tt(lt);break;case 10:jv(n.type._context);break;case 22:case 23:$v()}r=r.return}if(Pt=e,St=e=ki(e.current,null),$t=br=t,At=0,cd=null,Mv=Lm=Pa=0,fr=Dc=null,oa!==null){for(t=0;t<oa.length;t++)if(r=oa[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,a=r.pending;if(a!==null){var o=a.next;a.next=s,n.next=o}r.pending=n}oa=null}return e}function uC(e,t){do{var r=St;try{if(bv(),Xu.current=Bh,Fh){for(var n=dt.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Fh=!1}if(Ra=0,Rt=Ct=dt=null,Oc=!1,ad=0,Ov.current=null,r===null||r.return===null){At=1,cd=t,St=null;break}e:{var a=e,o=r.return,l=r,c=t;if(t=$t,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=c,u=l,h=u.tag;if(!(u.mode&1)&&(h===0||h===11||h===15)){var m=u.alternate;m?(u.updateQueue=m.updateQueue,u.memoizedState=m.memoizedState,u.lanes=m.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=I0(o);if(f!==null){f.flags&=-257,O0(f,o,l,a,t),f.mode&1&&P0(a,d,t),t=f,c=d;var y=t.updateQueue;if(y===null){var x=new Set;x.add(c),t.updateQueue=x}else y.add(c);break e}else{if(!(t&1)){P0(a,d,t),Fv();break e}c=Error(U(426))}}else if(it&&l.mode&1){var b=I0(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),O0(b,o,l,a,t),vv(ml(c,l));break e}}a=c=ml(c,l),At!==4&&(At=2),Dc===null?Dc=[a]:Dc.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var g=KN(a,c,t);N0(a,g);break e;case 1:l=c;var v=a.type,w=a.stateNode;if(!(a.flags&128)&&(typeof v.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(bi===null||!bi.has(w)))){a.flags|=65536,t&=-t,a.lanes|=t;var j=YN(a,l,t);N0(a,j);break e}}a=a.return}while(a!==null)}fC(r)}catch(k){t=k,St===r&&r!==null&&(St=r=r.return);continue}break}while(!0)}function hC(){var e=Uh.current;return Uh.current=Bh,e===null?Bh:e}function Fv(){(At===0||At===3||At===2)&&(At=4),Pt===null||!(Pa&268435455)&&!(Lm&268435455)||Zs(Pt,$t)}function zh(e,t){var r=Ie;Ie|=2;var n=hC();(Pt!==e||$t!==t)&&(ss=null,ja(e,t));do try{$4();break}catch(s){uC(e,s)}while(!0);if(bv(),Ie=r,Uh.current=n,St!==null)throw Error(U(261));return Pt=null,$t=0,At}function $4(){for(;St!==null;)mC(St)}function F4(){for(;St!==null&&!dO();)mC(St)}function mC(e){var t=gC(e.alternate,e,br);e.memoizedProps=e.pendingProps,t===null?fC(e):St=t,Ov.current=null}function fC(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=P4(r,t),r!==null){r.flags&=32767,St=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{At=6,St=null;return}}else if(r=R4(r,t,br),r!==null){St=r;return}if(t=t.sibling,t!==null){St=t;return}St=t=e}while(t!==null);At===0&&(At=5)}function ta(e,t,r){var n=Ve,s=Vr.transition;try{Vr.transition=null,Ve=1,B4(e,t,r,n)}finally{Vr.transition=s,Ve=n}return null}function B4(e,t,r,n){do Fo();while(di!==null);if(Ie&6)throw Error(U(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(U(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(wO(e,a),e===Pt&&(St=Pt=null,$t=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||bu||(bu=!0,yC(_h,function(){return Fo(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=Vr.transition,Vr.transition=null;var o=Ve;Ve=1;var l=Ie;Ie|=4,Ov.current=null,O4(e,r),lC(r,e),a4(zg),Ch=!!Hg,zg=Hg=null,e.current=r,M4(r),uO(),Ie=l,Ve=o,Vr.transition=a}else e.current=r;if(bu&&(bu=!1,di=e,Hh=s),a=e.pendingLanes,a===0&&(bi=null),fO(r.stateNode),vr(e,vt()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(Vh)throw Vh=!1,e=dy,dy=null,e;return Hh&1&&e.tag!==0&&Fo(),a=e.pendingLanes,a&1?e===uy?Lc++:(Lc=0,uy=e):Lc=0,Fi(),null}function Fo(){if(di!==null){var e=K_(Hh),t=Vr.transition,r=Ve;try{if(Vr.transition=null,Ve=16>e?16:e,di===null)var n=!1;else{if(e=di,di=null,Hh=0,Ie&6)throw Error(U(331));var s=Ie;for(Ie|=4,Z=e.current;Z!==null;){var a=Z,o=a.child;if(Z.flags&16){var l=a.deletions;if(l!==null){for(var c=0;c<l.length;c++){var d=l[c];for(Z=d;Z!==null;){var u=Z;switch(u.tag){case 0:case 11:case 15:Mc(8,u,a)}var h=u.child;if(h!==null)h.return=u,Z=h;else for(;Z!==null;){u=Z;var m=u.sibling,f=u.return;if(iC(u),u===d){Z=null;break}if(m!==null){m.return=f,Z=m;break}Z=f}}}var y=a.alternate;if(y!==null){var x=y.child;if(x!==null){y.child=null;do{var b=x.sibling;x.sibling=null,x=b}while(x!==null)}}Z=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,Z=o;else e:for(;Z!==null;){if(a=Z,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Mc(9,a,a.return)}var g=a.sibling;if(g!==null){g.return=a.return,Z=g;break e}Z=a.return}}var v=e.current;for(Z=v;Z!==null;){o=Z;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,Z=w;else e:for(o=v;Z!==null;){if(l=Z,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Dm(9,l)}}catch(k){gt(l,l.return,k)}if(l===o){Z=null;break e}var j=l.sibling;if(j!==null){j.return=l.return,Z=j;break e}Z=l.return}}if(Ie=s,Fi(),$n&&typeof $n.onPostCommitFiberRoot=="function")try{$n.onPostCommitFiberRoot(Am,e)}catch{}n=!0}return n}finally{Ve=r,Vr.transition=t}}return!1}function G0(e,t,r){t=ml(r,t),t=KN(e,t,1),e=wi(e,t,1),t=ir(),e!==null&&(Bd(e,1,t),vr(e,t))}function gt(e,t,r){if(e.tag===3)G0(e,e,r);else for(;t!==null;){if(t.tag===3){G0(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(bi===null||!bi.has(n))){e=ml(r,e),e=YN(t,e,1),t=wi(t,e,1),e=ir(),t!==null&&(Bd(t,1,e),vr(t,e));break}}t=t.return}}function U4(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=ir(),e.pingedLanes|=e.suspendedLanes&r,Pt===e&&($t&r)===r&&(At===4||At===3&&($t&130023424)===$t&&500>vt()-Dv?ja(e,0):Mv|=r),vr(e,t)}function pC(e,t){t===0&&(e.mode&1?(t=uu,uu<<=1,!(uu&130023424)&&(uu=4194304)):t=1);var r=ir();e=bs(e,t),e!==null&&(Bd(e,t,r),vr(e,r))}function V4(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),pC(e,r)}function H4(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(U(314))}n!==null&&n.delete(t),pC(e,r)}var gC;gC=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||yr.current)gr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return gr=!1,E4(e,t,r);gr=!!(e.flags&131072)}else gr=!1,it&&t.flags&1048576&&wN(t,Oh,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;th(e,t),e=t.pendingProps;var s=cl(t,Zt.current);$o(t,r),s=Tv(null,t,n,e,s,r);var a=Ev();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,xr(n)?(a=!0,Ph(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Sv(t),s.updater=Mm,t.stateNode=s,s._reactInternals=t,Xg(t,n,e,r),t=ry(null,t,n,!0,a,r)):(t.tag=0,it&&a&&yv(t),rr(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(th(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=W4(n),e=an(n,e),s){case 0:t=ty(null,t,n,e,r);break e;case 1:t=L0(null,t,n,e,r);break e;case 11:t=M0(null,t,n,e,r);break e;case 14:t=D0(null,t,n,an(n.type,e),r);break e}throw Error(U(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:an(n,s),ty(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:an(n,s),L0(e,t,n,s,r);case 3:e:{if(XN(t),e===null)throw Error(U(387));n=t.pendingProps,a=t.memoizedState,s=a.element,NN(e,t),Lh(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){s=ml(Error(U(423)),t),t=$0(e,t,n,r,s);break e}else if(n!==s){s=ml(Error(U(424)),t),t=$0(e,t,n,r,s);break e}else for(Sr=vi(t.stateNode.containerInfo.firstChild),_r=t,it=!0,un=null,r=SN(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(dl(),n===s){t=js(e,t,r);break e}rr(e,t,n,r)}t=t.child}return t;case 5:return CN(t),e===null&&Jg(t),n=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,o=s.children,Wg(n,s)?o=null:a!==null&&Wg(n,a)&&(t.flags|=32),ZN(e,t),rr(e,t,o,r),t.child;case 6:return e===null&&Jg(t),null;case 13:return eC(e,t,r);case 4:return _v(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ul(t,null,n,r):rr(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:an(n,s),M0(e,t,n,s,r);case 7:return rr(e,t,t.pendingProps,r),t.child;case 8:return rr(e,t,t.pendingProps.children,r),t.child;case 12:return rr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,a=t.memoizedProps,o=s.value,Je(Mh,n._currentValue),n._currentValue=o,a!==null)if(vn(a.value,o)){if(a.children===s.children&&!yr.current){t=js(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){o=a.child;for(var c=l.firstContext;c!==null;){if(c.context===n){if(a.tag===1){c=ys(-1,r&-r),c.tag=2;var d=a.updateQueue;if(d!==null){d=d.shared;var u=d.pending;u===null?c.next=c:(c.next=u.next,u.next=c),d.pending=c}}a.lanes|=r,c=a.alternate,c!==null&&(c.lanes|=r),Qg(a.return,r,t),l.lanes|=r;break}c=c.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(U(341));o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),Qg(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}rr(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,$o(t,r),s=zr(s),n=n(s),t.flags|=1,rr(e,t,n,r),t.child;case 14:return n=t.type,s=an(n,t.pendingProps),s=an(n.type,s),D0(e,t,n,s,r);case 15:return JN(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:an(n,s),th(e,t),t.tag=1,xr(n)?(e=!0,Ph(t)):e=!1,$o(t,r),GN(t,n,s),Xg(t,n,s,r),ry(null,t,n,!0,e,r);case 19:return tC(e,t,r);case 22:return QN(e,t,r)}throw Error(U(156,t.tag))};function yC(e,t){return z_(e,t)}function z4(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Br(e,t,r,n){return new z4(e,t,r,n)}function Bv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function W4(e){if(typeof e=="function")return Bv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===iv)return 11;if(e===av)return 14}return 2}function ki(e,t){var r=e.alternate;return r===null?(r=Br(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.depen
vendor: 5,005 bytes, line 40
40dencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function sh(e,t,r,n,s,a){var o=2;if(n=e,typeof e=="function")Bv(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case yo:return ka(r.children,s,a,t);case sv:o=8,s|=8;break;case kg:return e=Br(12,r,t,s|2),e.elementType=kg,e.lanes=a,e;case Sg:return e=Br(13,r,t,s),e.elementType=Sg,e.lanes=a,e;case _g:return e=Br(19,r,t,s),e.elementType=_g,e.lanes=a,e;case C_:return $m(r,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case __:o=10;break e;case N_:o=9;break e;case iv:o=11;break e;case av:o=14;break e;case Ks:o=16,n=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=Br(o,r,t,s),t.elementType=e,t.type=n,t.lanes=a,t}function ka(e,t,r,n){return e=Br(7,e,n,t),e.lanes=r,e}function $m(e,t,r,n){return e=Br(22,e,n,t),e.elementType=C_,e.lanes=r,e.stateNode={isHidden:!1},e}function pp(e,t,r){return e=Br(6,e,null,t),e.lanes=r,e}function gp(e,t,r){return t=Br(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function q4(e,t,r,n,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=Jf(0),this.expirationTimes=Jf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jf(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Uv(e,t,r,n,s,a,o,l,c){return e=new q4(e,t,r,l,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Br(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Sv(a),e}function G4(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:go,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function xC(e){if(!e)return Ei;e=e._reactInternals;e:{if(Wa(e)!==e||e.tag!==1)throw Error(U(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(xr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(U(171))}if(e.tag===1){var r=e.type;if(xr(r))return xN(e,r,t)}return t}function vC(e,t,r,n,s,a,o,l,c){return e=Uv(r,n,!0,e,s,a,o,l,c),e.context=xC(null),r=e.current,n=ir(),s=ji(r),a=ys(n,s),a.callback=t??null,wi(r,a,s),e.current.lanes=s,Bd(e,s,n),vr(e,n),e}function Fm(e,t,r,n){var s=t.current,a=ir(),o=ji(s);return r=xC(r),t.context===null?t.context=r:t.pendingContext=r,t=ys(a,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=wi(s,t,o),e!==null&&(pn(e,s,o,a),Zu(e,s,o)),o}function Wh(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 K0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Vv(e,t){K0(e,t),(e=e.alternate)&&K0(e,t)}function K4(){return null}var wC=typeof reportError=="function"?reportError:function(e){console.error(e)};function Hv(e){this._internalRoot=e}Bm.prototype.render=Hv.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));Fm(e,t,null,null)};Bm.prototype.unmount=Hv.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ia(function(){Fm(null,e,null,null)}),t[ws]=null}};function Bm(e){this._internalRoot=e}Bm.prototype.unstable_scheduleHydration=function(e){if(e){var t=Q_();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Qs.length&&t!==0&&t<Qs[r].priority;r++);Qs.splice(r,0,e),r===0&&X_(e)}};function zv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Um(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Y0(){}function Y4(e,t,r,n,s){if(s){if(typeof n=="function"){var a=n;n=function(){var d=Wh(o);a.call(d)}}var o=vC(t,n,e,0,null,!1,!1,"",Y0);return e._reactRootContainer=o,e[ws]=o.current,td(e.nodeType===8?e.parentNode:e),Ia(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var l=n;n=function(){var d=Wh(c);l.call(d)}}var c=Uv(e,0,!1,null,null,!1,!1,"",Y0);return e._reactRootContainer=c,e[ws]=c.current,td(e.nodeType===8?e.parentNode:e),Ia(function(){Fm(t,c,r,n)}),c}function Vm(e,t,r,n,s){var a=r._reactRootContainer;if(a){var o=a;if(typeof s=="function"){var l=s;s=function(){var c=Wh(o);l.call(c)}}Fm(t,o,e,s)}else o=Y4(r,t,e,s,n);return Wh(o)}Y_=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=vc(t.pendingLanes);r!==0&&(cv(t,r|1),vr(t,vt()),!(Ie&6)&&(fl=vt()+500,Fi()))}break;case 13:Ia(function(){var n=bs(e,1);
vendor: 4,206 bytes, line 40
40if(n!==null){var s=ir();pn(n,e,1,s)}}),Vv(e,1)}};dv=function(e){if(e.tag===13){var t=bs(e,134217728);if(t!==null){var r=ir();pn(t,e,134217728,r)}Vv(e,134217728)}};J_=function(e){if(e.tag===13){var t=ji(e),r=bs(e,t);if(r!==null){var n=ir();pn(r,e,t,n)}Vv(e,t)}};Q_=function(){return Ve};Z_=function(e,t){var r=Ve;try{return Ve=e,t()}finally{Ve=r}};Mg=function(e,t,r){switch(t){case"input":if(Ag(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=Pm(n);if(!s)throw Error(U(90));T_(n),Ag(n,s)}}}break;case"textarea":R_(e,r);break;case"select":t=r.value,t!=null&&Oo(e,!!r.multiple,t,!1)}};$_=Lv;F_=Ia;var J4={usingClientEntryPoint:!1,Events:[Vd,bo,Pm,D_,L_,Lv]},ac={findFiberByHostInstance:aa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Q4={bundleType:ac.bundleType,version:ac.version,rendererPackageName:ac.rendererPackageName,rendererConfig:ac.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Es.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=V_(e),e===null?null:e.stateNode},findFiberByHostInstance:ac.findFiberByHostInstance||K4,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 ju=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ju.isDisabled&&ju.supportsFiber)try{Am=ju.inject(Q4),$n=ju}catch{}}Rr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J4;Rr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!zv(t))throw Error(U(200));return G4(e,t,null,r)};Rr.createRoot=function(e,t){if(!zv(e))throw Error(U(299));var r=!1,n="",s=wC;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Uv(e,1,!1,null,null,r,!1,n,s),e[ws]=t.current,td(e.nodeType===8?e.parentNode:e),new Hv(t)};Rr.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(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=V_(t),e=e===null?null:e.stateNode,e};Rr.flushSync=function(e){return Ia(e)};Rr.hydrate=function(e,t,r){if(!Um(t))throw Error(U(200));return Vm(null,e,t,!0,r)};Rr.hydrateRoot=function(e,t,r){if(!zv(e))throw Error(U(405));var n=r!=null&&r.hydratedSources||null,s=!1,a="",o=wC;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=vC(t,null,e,1,r??null,s,!1,a,o),e[ws]=t.current,td(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new Bm(t)};Rr.render=function(e,t,r){if(!Um(t))throw Error(U(200));return Vm(null,e,t,!1,r)};Rr.unmountComponentAtNode=function(e){if(!Um(e))throw Error(U(40));return e._reactRootContainer?(Ia(function(){Vm(null,null,e,!1,function(){e._reactRootContainer=null,e[ws]=null})}),!0):!1};Rr.unstable_batchedUpdates=Lv;Rr.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Um(r))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return Vm(e,t,r,!1,n)};Rr.version="18.3.1-next-f1338f8080-20240426";function bC(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bC)}catch(e){console.error(e)}}bC(),b_.exports=Rr;var qa=b_.exports;const jC=$d(qa);var kC,J0=qa;kC=J0.createRoot,J0.hydrateRoot;var Z4=typeof Element<"u",X4=typeof Map=="function",eM=typeof Set=="function",tM=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ih(e,t){if(e===t)return!0;
40if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,s;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!ih(e[n],t[n]))return!1;return!0}var a;if(X4&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;for(a=e.entries();!(n=a.next()).done;)if(!ih(n.value[1],t.get(n.value[0])))return!1;return!0}if(eM&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(tM&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])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),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;if(Z4&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((s[n]==="_owner"||s[n]==="__v"||s[n]==="__o")&&e.$$typeof)&&!ih(e[s[n]],t[s[n]]))return!1;return!0}return e!==e&&t!==t}var rM=function(t,r){try{return ih(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const nM=$d(rM);var sM=function(e,t,r,n,s,a,o,l){if(!e){var c;if(t===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[r,n,s,a,o,l],u=0;c=new Error(t.replace(/%s/g,function(){return d[u++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},iM=sM;const Q0=$d(iM);var aM=function(t,r,n,s){var a=n?n.call(s,t,r):void 0;if(a!==void 0)return!!a;if(t===r)return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var o=Object.keys(t),l=Object.keys(r);if(o.length!==l.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(r),d=0;d<o.length;d++){var u=o[d];if(!c(u))return!1;var h=t[u],m=r[u];if(a=n?n.call(s,h,m,u):void 0,a===!1||a===void 0&&h!==m)return!1}return!0};const oM=$d(aM);var SC=(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))(SC||{}),yp={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"]}},Z0=Object.values(SC),Hm={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},_C=Object.entries(Hm).reduce((e,[t,r])=>(e[r]=t,e),{}),mn="data-rh",Bo={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Uo=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},lM=e=>{let t=Uo(e,"title");const r=Uo(e,Bo.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=Uo(e,Bo.DEFAULT_TITLE);return t||n||void 0},cM=e=>Uo(e,Bo.ON_CHANGE_CLIENT_STATE)||(()=>{}),xp=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),dM=(e,t)=>t.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const s=Object.keys(n);for(let a=0;a<s.length;a+=1){const l=s[a].toLowerCase();if(e.indexOf(l)!==-1&&n[l])return r.concat(n)}}return r},[]),uM=e=>console&&typeof console.warn=="function"&&console.warn(e),oc=(e,t,r)=>{const n={};return r.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&uM(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,a)=>{const o={};a.filter(c=>{let d;const u=Object.keys(c);for(let m=0;m<u.length;m+=1){const f=u[m],y=f.toLowerCase();t.indexOf(y)!==-1&&!(d==="rel"&&c[d].toLowerCase()==="canonical")&&!(y==="rel"&&c[y].toLowerCase()==="stylesheet")&&(d=y),t.indexOf(f)!==-1&&(f==="innerHTML"||f==="cssText"||f==="itemprop")&&(d=f)}if(!d||!c[d])return!1;const h=c[d].toLowerCase();return n[d]||(n[d]={}),o[d]||(o[d]={}),n[d][h]?!1:(o[d][h]=!0,!0)}
40).reverse().forEach(c=>s.push(c));const l=Object.keys(o);for(let c=0;c<l.length;c+=1){const d=l[c],u={...n[d],...o[d]};n[d]=u}return s},[]).reverse()},hM=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},mM=e=>({baseTag:dM(["href"],e),bodyAttributes:xp("bodyAttributes",e),defer:Uo(e,Bo.DEFER),encode:Uo(e,Bo.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:xp("htmlAttributes",e),linkTags:oc("link",["rel","href"],e),metaTags:oc("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:oc("noscript",["innerHTML"],e),onChangeClientState:cM(e),scriptTags:oc("script",["src","innerHTML"],e),styleTags:oc("style",["cssText"],e),title:lM(e),titleAttributes:xp("titleAttributes",e),prioritizeSeoTags:hM(e,Bo.PRIORITIZE_SEO_TAGS)}),NC=e=>Array.isArray(e)?e.join(""):e,fM=(e,t)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(t[r[n]]&&t[r[n]].includes(e[r[n]]))return!0;return!1},vp=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(fM(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},X0=(e,t)=>({...e,[t]:void 0}),pM=["noscript","script","style"],fy=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),CC=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),gM=(e,t,r,n)=>{const s=CC(r),a=NC(t);return s?`<${e} ${mn}="true" ${s}>${fy(a,n)}</${e}>`:`<${e} ${mn}="true">${fy(a,n)}</${e}>`},yM=(e,t,r=!0)=>t.reduce((n,s)=>{const a=s,o=Object.keys(a).filter(d=>!(d==="innerHTML"||d==="cssText")).reduce((d,u)=>{const h=typeof a[u]>
40"u"?u:`${u}="${fy(a[u],r)}"`;return d?`${d} ${h}`:h},""),l=a.innerHTML||a.cssText||"",c=pM.indexOf(e)===-1;return`${n}<${e} ${mn}="true" ${o}${c?"/>":`>${l}</${e}>`}`},""),AC=(e,t={})=>Object.keys(e).reduce((r,n)=>{const s=Hm[n];return r[s||n]=e[n],r},t),xM=(e,t,r)=>{const n={key:t,[mn]:!0},s=AC(r,n);return[D.createElement("title",s,t)]},ah=(e,t)=>t.map((r,n)=>{const s={key:n,[mn]:!0};return Object.keys(r).forEach(a=>{const l=Hm[a]||a;if(l==="innerHTML"||l==="cssText"){const c=r.innerHTML||r.cssText;s.dangerouslySetInnerHTML={__html:c}}else s[l]=r[a]}),D.createElement(e,s)}),Or=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>xM(e,t.title,t.titleAttributes),toString:()=>gM(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>AC(t),toString:()=>CC(t)};default:return{toComponent:()=>ah(e,t),toString:()=>yM(e,t,r)}}},vM=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const s=vp(e,yp.meta),a=vp(t,yp.link),o=vp(r,yp.script);return{priorityMethods:{toComponent:()=>[...ah("meta",s.priority),...ah("link",a.priority),...ah("script",o.priority)],toString:()=>`${Or("meta",s.priority,n)} ${Or("link",a.priority,n)} ${Or("script",o.priority,n)}`},metaTags:s.default,linkTags:a.default,scriptTags:o.default}},wM=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:s,noscriptTags:a,styleTags:o,title:l="",titleAttributes:c,prioritizeSeoTags:d}=e;let{linkTags:u,metaTags:h,scriptTags:m}=e,f={toComponent:()=>[],toString:()=>""};return d&&({priorityMethods:f,linkTags:u,metaTags:h,scriptTags:m}=vM(e)),{priority:f,base:Or("base",t,n),bodyAttributes:Or("bodyAttributes",r,n),htmlAttributes:Or("htmlAttributes",s,n),link:Or("link",u,n),meta:Or("meta",h,n),noscript:Or("noscript",a,n),script:Or("script",m,n),style:Or("style",o,n),title:Or("title",{title:l,titleAttributes:c},n)}},py=wM,ku=[],Wv=!!(typeof window<"u"&&window.document&&window.document.createElement),gy=class{constructor(e,t){es(this,"instances",[]);es(this,"canUseDOM",Wv);es(this,"context");es(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?ku:this.instances,add:e=>{(this.canUseDOM?ku:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?ku:this.instances).indexOf(e);(this.canUseDOM?ku:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=py({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},bM=parseInt(D.version.split(".")[0],10),yy=bM>=19,jM={},TC=D.createContext(jM),ha,EC=(ha=class extends p.Component{constructor(r){super(r);es(this,"helmetData");yy?this.helmetData=null:this.helmetData=new gy(this.props.context||{},ha.canUseDOM)}render(){return yy?D.createElement(D.Fragment,null,this.props.children):D.createElement(TC.Provider,{value:this.helmetData.value},this.props.children)}},es(ha,"canUseDOM",Wv),ha),Xa=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${mn}]`),s=[].slice.call(n),a=[];let o;return t&&t.length&&t.forEach(l=>{const c=document.createElement(e);for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d))if(d==="innerHTML")c.innerHTML=l.innerHTML;else if(d==="cssText"){const u=l.cssText;c.appendChild(document.createTextNode(u))}else{const u=d,h=typeof l[u]>"u"?"":l[u];c.setAttribute(d,h)}c.setAttribute(mn,"true"),s.some((d,u)=>(o=u,c.isEqualNode(d)))?s.splice(o,1):a.push(c)}),s.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)}),a.forEach(l=>r.appendChild(l)),{oldTags:s,newTags:a}},xy=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(mn),s=n?n.split(","):[],a=[...s],o=Object.keys(t);for(const l of o){const c=t[l]||"";r.getAttribute(l)!==c&&r.setAttribute(l,c),s.indexOf(l)===-1&&s.push(l);const d=a.indexOf(l);d!==-1&&a.splice(d,1)}for(let l=a.length-1;l>=0;l-=1)r.removeAttribute(a[l]);s.length===a.length?r.removeAttribute(mn):r.getAttribute(mn)!==o.join(",")&&r.setAttribute(mn,o.join(","))},kM=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=NC(e)),xy("title",t)},ej=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:s,linkTags:a,metaTags:o,noscriptTags:l,onChangeClientState:c,scriptTags:d,styleTags:u,title:h,titleAttributes:m}=e;xy("body",n),xy("html",s),kM(h,m);const f={baseTag:Xa("base",r),linkTags:Xa("link",a),metaTags:Xa("meta",o),noscriptTags:Xa("noscript",l),scriptTags:Xa("script",d),styleTags:Xa("style",u)},y={},x={};Object.keys(f).forEach(b=>{const{newTags:g,oldTags:v}=f[b];g.length&&(y[b]=g),v.length&&(x[b]=f[b].oldTags)}),t&&t(),c(e,y,x)},lc=null,SM=e=>{lc&&cancelAnimationFrame(lc),e.defer?lc=requestAnimationFrame(()=>{ej(e,()=>{lc=null})}):(ej(e),lc=null)},_M=SM,tj=class extends p.Component{constructor(){super(...arguments);es(this,"rendered",!1)}shouldComponentUpdate(t){return!oM(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const s=mM(t.get().map(a=>{const{context:o,...l}=a.props;return l}));EC.canUseDOM?_M(s):py&&(n=py(s)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},oh=[],rj=e=>{const t={};for(const r of Object.keys(e))t[_C[r]||r]=e[r];return t},Ji=e=>{const t={};for(const r of Object.keys(e)){const n=Hm[r];t[n||r]=e[r]}return t},nj=(e,t)=>{if(!Wv)return;const r=document.getElementsByTagName(e)[0];if(!r)return;const n="data-rh-managed",s=r.getAttribute(n),a=s?s.split(","):[],o=Object.keys(t);for(const l of a)o.includes(l)||r.removeAttribute(l);for(const l of o){const c=t[l];c==null||c===!1?r.removeAttribute(l):c===!0?r.setAttribute(l,""):r.setAttribute(l,String(c))}o.length>0?r.setAttribute(n,o.join(",")):r.removeAttribute(n)},wp=()=>{const e={},t={};for(const r of oh){const{htmlAttributes:n,bodyAttributes:s}=r.props;n&&Object.assign(e,rj(n)),s&&Object.assign(t,rj(s))}nj("html",e),nj("body",t)},NM=class extends p.Component{componentDidMount(){oh.push(this),wp()}componentDidUpdate(){wp()}componentWillUnmount(){const e=oh.indexOf(this);e!==-1&&oh.splice(e,1),wp()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:r}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||r||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return D.createElement("title",Ji(t),e)}renderBase(){const{base:e}=this.props;return e?D.createElement("base",Ji(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>D.createElement("meta",{key:r,...Ji(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>D.createElement("link",{key:r,...Ji(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{innerHTML:n,...s}=t,a=Ji(s);return n&&(a.dangerouslySetInnerHTML={__html:n}),D.createElement("script",{key:r,...a})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{cssText:n,...s}=t,a=Ji(s);return n&&(a.dangerouslySetInnerHTML={__html:n}),D.createElement("style",{key:r,...a})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{innerHTML:n,...s}=t,a=Ji(s);return n&&(a.dangerouslySetInnerHTML={__html:n}),D.createElement("noscript",{key:r,...a})})}render(){return D.createElement(D.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},bg,CM=(bg=class extends p.Component{shouldComponentUpdate(e){return!nM(X0(this.props,"helmetData"),X0(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,r,n){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return{...t,[e.type]:n,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}
40warnOnInvalidChildren(e,t){return Q0(Z0.some(r=>e.type===r),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 ${Z0.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),Q0(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="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 r={};return D.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:s,...a}=n.props,o=Object.keys(a).reduce((c,d)=>(c[_C[d]||d]=a[d],c),{});let{type:l}=n;switch(typeof l=="symbol"?l=l.toString():this.warnOnInvalidChildren(n,s),l){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,o,s);break;default:t=this.mapObjectTypeChildren(n,t,o,s);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof gy)){const s=n;n=new gy(s.context,!0),delete r.helmetData}return yy?D.createElement(NM,{...r}):n?D.createElement(tj,{...r,context:n.value}):D.createElement(TC.Consumer,null,s=>D.createElement(tj,{...r,context:s}))}},es(bg,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),bg);const AM=1,TM=1e6;let bp=0;function EM(){return bp=(bp+1)%Number.MAX_SAFE_INTEGER,bp.toString()}const jp=new Map,sj=e=>{if(jp.has(e))return;const t=setTimeout(()=>{jp.delete(e),$c({type:"REMOVE_TOAST",toastId:e})},TM);jp.set(e,t)},RM=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,AM)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?sj(r):e.toasts.forEach(n=>{sj(n.id)}),{...e,toasts:e.toasts.map(n=>
vendor: 13,905 bytes, line 40
40n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},lh=[];let ch={toasts:[]};function $c(e){ch=RM(ch,e),lh.forEach(t=>{t(ch)})}function dh({...e}){const t=EM(),r=s=>$c({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>$c({type:"DISMISS_TOAST",toastId:t});return $c({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function PM(){const[e,t]=p.useState(ch);return p.useEffect(()=>(lh.push(t),()=>{const r=lh.indexOf(t);r>-1&&lh.splice(r,1)}),[e]),{...e,toast:dh,dismiss:r=>$c({type:"DISMISS_TOAST",toastId:r})}}function de(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function ij(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function RC(...e){return t=>{let r=!1;const n=e.map(s=>{const a=ij(s,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let s=0;s<n.length;s++){const a=n[s];typeof a=="function"?a():ij(e[s],null)}}}}function Le(...e){return p.useCallback(RC(...e),e)}function IM(e,t){const r=p.createContext(t),n=a=>{const{children:o,...l}=a,c=p.useMemo(()=>l,Object.values(l));return i.jsx(r.Provider,{value:c,children:o})};n.displayName=e+"Provider";function s(a){const o=p.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,s]}function wr(e,t=[]){let r=[];function n(a,o){const l=p.createContext(o),c=r.length;r=[...r,o];const d=h=>{var g;const{scope:m,children:f,...y}=h,x=((g=m==null?void 0:m[e])==null?void 0:g[c])||l,b=p.useMemo(()=>y,Object.values(y));return i.jsx(x.Provider,{value:b,children:f})};d.displayName=a+"Provider";function u(h,m){var x;const f=((x=m==null?void 0:m[e])==null?void 0:x[c])||l,y=p.useContext(f);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[d,u]}const s=()=>{const a=r.map(o=>p.createContext(o));return function(l){const c=(l==null?void 0:l[e])||a;return p.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[n,OM(s,...t)]}function OM(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(a){const o=n.reduce((l,{useScope:c,scopeName:d})=>{const h=c(a)[`__scope${d}`];return{...l,...h}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function pl(e){const t=DM(e),r=p.forwardRef((n,s)=>{const{children:a,...o}=n,l=p.Children.toArray(a),c=l.find($M);if(c){const d=c.props.children,u=l.map(h=>h===c?p.Children.count(d)>1?p.Children.only(null):p.isValidElement(d)?d.props.children:null:h);return i.jsx(t,{...o,ref:s,children:p.isValidElement(d)?p.cloneElement(d,void 0,u):null})}return i.jsx(t,{...o,ref:s,children:a})});return r.displayName=`${e}.Slot`,r}var MM=pl("Slot");function DM(e){const t=p.forwardRef((r,n)=>{const{children:s,...a}=r;if(p.isValidElement(s)){const o=BM(s),l=FM(a,s.props);return s.type!==p.Fragment&&(l.ref=n?RC(n,o):o),p.cloneElement(s,l)}return p.Children.count(s)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var PC=Symbol("radix.slottable");function LM(e){const t=({children:r})=>i.jsx(i.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=PC,t}function $M(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===PC}function FM(e,t){const r={...t};for(const n in t){const s=e[n],a=t[n];/^on[A-Z]/.test(n)?s&&a?r[n]=(...l)=>{const c=a(...l);return s(...l),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...a}:n==="className"&&(r[n]=[s,a].filter(Boolean).join(" "))}return{...e,...r}}function BM(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function zm(e){const t=e+"CollectionProvider",[r,n]=wr(t),[s,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=x=>{const{scope:b,children:g}=x,v=D.useRef(null),w=D.useRef(new Map).current;return i.jsx(s,{scope:b,itemMap:w,collectionRef:v,children:g})};o.displayName=t;const l=e+"CollectionSlot",c=pl(l),d=D.forwardRef((x,b)=>{const{scope:g,children:v}=x,w=a(l,g),j=Le(b,w.collectionRef);return i.jsx(c,{ref:j,children:v})});d.displayName=l;const u=e+"CollectionItemSlot",h="data-radix-collection-item",m=pl(u),f=D.forwardRef((x,b)=>{const{scope:g,children:v,...w}=x,j=D.useRef(null),k=Le(b,j),S=a(u,g);return D.useEffect(()=>(S.itemMap.set(j,{ref:j,...w}),()=>void S.itemMap.delete(j))),i.jsx(m,{[h]:"",ref:k,children:v})});f.displayName=u;function y(x){const b=a(e+"CollectionConsumer",x);return D.useCallback(()=>{const v=b.collectionRef.current;if(!v)return[];const w=Array.from(v.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((S,_)=>w.indexOf(S.ref.current)-w.indexOf(_.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:d,ItemSlot:f},y,n]}var UM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],le=UM.reduce((e,t)=>{const r=pl(`Primitive.${t}`),n=p.forwardRef((s,a)=>{const{asChild:o,...l}=s,c=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function IC(e,t){e&&qa.flushSync(()=>e.dispatchEvent(t))}function Tr(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function VM(e,t=globalThis==null?void 0:globalThis.document){const r=Tr(e);p.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var HM="DismissableLayer",vy="dismissableLayer.update",zM="dismissableLayer.pointerDownOutside",WM="dismissableLayer.focusOutside",aj,OC=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zd=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:o,onDismiss:l,...c}=e,d=p.useContext(OC),[u,h]=p.useState(null),m=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=p.useState({}),y=Le(t,_=>h(_)),x=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),g=x.indexOf(b),v=u?x.indexOf(u):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,j=v>=g,k=GM(_=>{const N=_.target,T=[...d.branches].some(P=>P.contains(N));!j||T||(s==null||s(_),o==null||o(_),_.defaultPrevented||l==null||l())},m),S=KM(_=>{const N=_.target;[...d.branches].some(P=>P.contains(N))||(a==null||a(_),o==null||o(_),_.defaultPrevented||l==null||l())},m);return VM(_=>{v===d.layers.size-1&&(n==null||n(_),!_.defaultPrevented&&l&&(_.preventDefault(),l()))},m),p.useEffect(()=>{if(u)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(aj=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),oj(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=aj)}},[u,m,r,d]),p.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),oj())},[u,d]),p.useEffect(()=>{const _=()=>f({});return document.addEventListener(vy,_),()=>document.removeEventListener(vy,_)},[]),i.jsx(le.div,{...c,ref:y,style:{pointerEvents:w?j?"auto":"none":void 0,...e.style},onFocusCapture:de(e.onFocusCapture,S.onFocusCapture),onBlurCapture:de(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:de(e.onPointerDownCapture,k.onPointerDownCapture)})});zd.displayName=HM;var qM="DismissableLayerBranch",MC=p.forwardRef((e,t)=>{const r=p.useContext(OC),n=p.useRef(null),s=Le(t,n);return p.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),i.jsx(le.div,{...e,ref:s})});MC.displayName=qM;function GM(e,t=globalThis==null?void 0:globalThis.document){const r=Tr(e),n=p.useRef(!1),s=p.useRef(()=>{});return p.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let c=function(){DC(zM,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function KM(e,t=globalThis==null?void 0:globalThis.document){const r=Tr(e),n=p.useRef(!1);return p.useEffect(()=>{const s=a=>{a.target&&!n.current&&DC(WM,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function oj(){const e=new CustomEvent(vy);document.dispatchEvent(e)}function DC(e,t,r,{discrete:n}){const s=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?IC(s,a):s.dispatchEvent(a)}var YM=zd,JM=MC,wt=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},QM="Portal",Wm=p.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[s,a]=p.useState(!1);wt(()=>a(!0),[]);const o=r||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?jC.createPortal(i.jsx(le.div,{...n,ref:t}),o):null});Wm.displayName=QM;function ZM(e,t){return p.useReducer((r,n)=>t[r][n]??r,e)}var Rs=e=>{const{present:t,children:r}=e,n=XM(t),s=typeof r=="function"?r({present:n.isPresent}):p.Children.only(r),a=Le(n.ref,eD(s));return typeof r=="function"||n.isPresent?p.cloneElement(s,{ref:a}):null};Rs.displayName="Presence";function XM(e){const[t,r]=p.useState(),n=p.useRef(null),s=p.useRef(e),a=p.useRef("none"),o=e?"mounted":"unmounted",[l,c]=ZM(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const d=Su(n.current);a.current=l==="mounted"?d:"none"},[l]),wt(()=>{const d=n.current,u=s.current;if(u!==e){const m=a.current,f=Su(d);e?c("MOUNT"):f==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(u&&m!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),wt(()=>{if(t){let d;const u=t.ownerDocument.defaultView??window,h=f=>{const x=Su(n.current).includes(f.animationName);if(f.target===t&&x&&(c("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=f=>{f.target===t&&(a.current=Su(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{u.clearTimeout(d),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function Su(e){return(e==null?void 0:e.animationName)||"none"}function eD(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var tD=ev[" useInsertionEffect ".trim().toString()]||wt;function wn({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,a,o]=rD({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:s;{const u=p.useRef(e!==void 0);p.useEffect(()=>{const h=u.current;h!==l&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${l?"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.`),u.current=l},[l,n])}const d=p.useCallback(u=>{var h;if(l){const m=nD(u)?u(e):u;m!==e&&((h=o.current)==null||h.call(o,m))}else a(u)},[l,e,a,o]);return[c,d]}function rD({defaultProp:e,onChange:t}){const[r,n]=p.useState(e),s=p.useRef(r),a=p.useRef(t);return tD(()=>{a.current=t},[t]),p.useEffect(()=>{var o;s.current!==r&&((o=a.current)==null||o.call(a,r),s.current=r)},[r,s]),[r,n,a]}function nD(e){return typeof e=="function"}var LC=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"}),sD="VisuallyHidden",qm=p.forwardRef((e,t)=>i.jsx(le.span,{...e,ref:t,style:{...LC,...e.style}}));qm.displayName=sD;var iD=qm,qv="ToastProvider",[Gv,aD,oD]=zm("Toast"),[$C,YQ]=wr("Toast",[oD]),[lD,Gm]=$C(qv),FC=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:a=50,children:o}=e,[l,c]=p.useState(null),[d,u]=p.useState(0),h=p.useRef(!1),m=p.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${qv}\`. Expected non-empty \`string\`.`),i.jsx(Gv.Provider,{scope:t,children:i.jsx(lD,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:a,toastCount:d,viewport:l,onViewportChange:c,onToastAdd:p.useCallback(()=>u(f=>f+1),[]),onToastRemove:p.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:m,children:o})})};FC.displayName=qv;var BC="ToastViewport",cD=["F8"],wy="toast.viewportPause",by="toast.viewportResume",UC=p.forwardRef((e,t)=>
40{const{__scopeToast:r,hotkey:n=cD,label:s="Notifications ({hotkey})",...a}=e,o=Gm(BC,r),l=aD(r),c=p.useRef(null),d=p.useRef(null),u=p.useRef(null),h=p.useRef(null),m=Le(t,h,o.onViewportChange),f=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;p.useEffect(()=>{const b=g=>{var w;n.length!==0&&n.every(j=>g[j]||g.code===j)&&((w=h.current)==null||w.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]),p.useEffect(()=>{const b=c.current,g=h.current;if(y&&b&&g){const v=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(wy);g.dispatchEvent(S),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(by);g.dispatchEvent(S),o.isClosePausedRef.current=!1}},j=S=>{!b.contains(S.relatedTarget)&&w()},k=()=>{b.contains(document.activeElement)||w()};return b.addEventListener("focusin",v),b.addEventListener("focusout",j),b.addEventListener("pointermove",v),b.addEventListener("pointerleave",k),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{b.removeEventListener("focusin",v),b.removeEventListener("focusout",j),b.removeEventListener("pointermove",v),b.removeEventListener("pointerleave",k),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[y,o.isClosePausedRef]);const x=p.useCallback(({tabbingDirection:b})=>{const v=l().map(w=>{const j=w.ref.current,k=[j,...jD(j)];return b==="forwards"?k:k.reverse()});return(b==="forwards"?v.reverse():v).flat()},[l]);return p.useEffect(()=>{const b=h.current;if(b){const g=v=>{var k,S,_;const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const N=document.activeElement,T=v.shiftKey;if(v.target===b&&T){(k=d.current)==null||k.focus();return}const M=x({tabbingDirection:T?"backwards":"forwards"}),z=M.findIndex($=>$===N);kp(M.slice(z+1))?v.preventDefault():T?(S=d.current)==null||S.focus():(_=u.current)==null||_.focus()}};return b.addEventListener("keydown",g),()=>b.removeEventListener("keydown",g)}},[l,x]),i.jsxs(JM,{ref:c,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&i.jsx(jy,{ref:d,onFocusFromOutsideViewport:()=>{const b=x({tabbingDirection:"forwards"});kp(b)}}),i.jsx(Gv.Slot,{scope:r,children:i.jsx(le.ol,{tabIndex:-1,...a,ref:m})}),y&&i.jsx(jy,{ref:u,onFocusFromOutsideViewport:()=>{const b=x({tabbingDirection:"backwards"});kp(b)}})]})});UC.displayName=BC;var VC="ToastFocusProxy",jy=p.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,a=Gm(VC,r);return i.jsx(qm,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var d;const l=o.relatedTarget;!((d=a.viewport)!=null&&d.contains(l))&&n()}})});jy.displayName=VC;var Wd="Toast",dD="toast.swipeStart",uD="toast.swipeMove",hD="toast.swipeCancel",mD="toast.swipeEnd",HC=p.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:a,...o}=e,[l,c]=wn({prop:n,defaultProp:s??!0,onChange:a,caller:Wd});return i.jsx(Rs,{present:r||l,children:i.jsx(gD,{open:l,...o,ref:t,onClose:()=>c(!1),onPause:Tr(e.onPause),onResume:Tr(e.onResume),onSwipeStart:de(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:de(e.onSwipeMove,d=>{const{x:u,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:de(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:de(e.onSwipeEnd,d=>{const{x:u,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});HC.displayName=Wd;var[fD,pD]=$C(Wd,{onClose(){}}),gD=p.forwardRef((e,t)=>
40{const{__scopeToast:r,type:n="foreground",duration:s,open:a,onClose:o,onEscapeKeyDown:l,onPause:c,onResume:d,onSwipeStart:u,onSwipeMove:h,onSwipeCancel:m,onSwipeEnd:f,...y}=e,x=Gm(Wd,r),[b,g]=p.useState(null),v=Le(t,$=>g($)),w=p.useRef(null),j=p.useRef(null),k=s||x.duration,S=p.useRef(0),_=p.useRef(k),N=p.useRef(0),{onToastAdd:T,onToastRemove:P}=x,A=Tr(()=>{var ae;(b==null?void 0:b.contains(document.activeElement))&&((ae=x.viewport)==null||ae.focus()),o()}),M=p.useCallback($=>{!$||$===1/0||(window.clearTimeout(N.current),S.current=new Date().getTime(),N.current=window.setTimeout(A,$))},[A]);p.useEffect(()=>{const $=x.viewport;if($){const ae=()=>{M(_.current),d==null||d()},W=()=>{const q=new Date().getTime()-S.current;_.current=_.current-q,window.clearTimeout(N.current),c==null||c()};return $.addEventListener(wy,W),$.addEventListener(by,ae),()=>{$.removeEventListener(wy,W),$.removeEventListener(by,ae)}}},[x.viewport,k,c,d,M]),p.useEffect(()=>{a&&!x.isClosePausedRef.current&&M(k)},[a,k,x.isClosePausedRef,M]),p.useEffect(()=>(T(),()=>P()),[T,P]);const z=p.useMemo(()=>b?JC(b):null,[b]);return x.viewport?i.jsxs(i.Fragment,{children:[z&&i.jsx(yD,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:z}),i.jsx(fD,{scope:r,onClose:A,children:qa.createPortal(i.jsx(Gv.ItemSlot,{scope:r,children:i.jsx(YM,{asChild:!0,onEscapeKeyDown:de(l,()=>{x.isFocusedToastEscapeKeyDownRef.current||A(),x.isFocusedToastEscapeKeyDownRef.current=!1}),children:i.jsx(le.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":x.swipeDirection,...y,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:de(e.onKeyDown,$=>{$.key==="Escape"&&(l==null||l($.nativeEvent),$.nativeEvent.defaultPrevented||(x.isFocusedToastEscapeKeyDownRef.current=!0,A()))}),onPointerDown:de(e.onPointerDown,$=>{$.button===0&&(w.current={x:$.clientX,y:$.clientY})}),onPointerMove:de(e.onPointerMove,$=>{if(!w.current)return;const ae=$.clientX-w.current.x,W=$.clientY-w.current.y,q=!!j.current,R=["left","right"].includes(x.swipeDirection),O=["left","up"].includes(x.swipeDirection)?Math.min:Math.max,V=R?O(0,ae):0,he=R?0:O(0,W),ne=$.pointerType==="touch"?10:2,xe={x:V,y:he},me={originalEvent:$,delta:xe};q?(j.current=xe,_u(uD,h,me,{discrete:!1})):lj(xe,x.swipeDirection,ne)?(j.current=xe,_u(dD,u,me,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(ae)>ne||Math.abs(W)>ne)&&(w.current=null)}),onPointerUp:de(e.onPointerUp,$=>{const ae=j.current,W=$.target;if(W.hasPointerCapture($.pointerId)&&W.releasePointerCapture($.pointerId),j.current=null,w.current=null,ae){const q=$.currentTarget,R={originalEvent:$,delta:ae};lj(ae,x.swipeDirection,x.swipeThreshold)?_u(mD,f,R,{discrete:!0}):_u(hD,m,R,{discrete:!0}),q.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),x.viewport)})]}):null}),yD=e=>{const{__scopeToast:t,children:r,...n}=e,s=Gm(Wd,t),[a,o]=p.useState(!1),[l,c]=p.useState(!1);return wD(()=>o(!0)),p.useEffect(()=>{const d=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(d)},[]),l?null:i.jsx(Wm,{asChild:!0,children:i.jsx(qm,{...n,children:a&&i.jsxs(i.Fragment,{children:[s.label," ",r]})})})},xD="ToastTitle",zC=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return i.jsx(le.div,{...n,ref:t})});zC.displayName=xD;var vD="ToastDescription",WC=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return i.jsx(le.div,{...n,ref:t})});WC.displayName=vD;var qC="ToastAction",GC=p.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?i.jsx(YC,{altText:r,asChild:!0,children:i.jsx(Kv,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${qC}\`. Expected non-empty \`string\`.`),null)});GC.displayName=qC;var KC="ToastClose",Kv=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=pD(KC,r);return i.jsx(YC,{asChild:!0,children:i.jsx(le.button,{type:"button",...n,ref:t,onClick:de(e.onClick,s.onClose)})})});Kv.displayName=KC;var YC=p.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return i.jsx(le.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function JC(e){const t=[];
vendor: 6,636 bytes, lines 40-99
40return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),bD(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",a=n.dataset.radixToastAnnounceExclude==="";if(!s)if(a){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...JC(n))}}),t}function _u(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?IC(s,a):s.dispatchEvent(a)}var lj=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),a=n>s;return t==="left"||t==="right"?a&&n>r:!a&&s>r};function wD(e=()=>{}){const t=Tr(e);wt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function bD(e){return e.nodeType===e.ELEMENT_NODE}function jD(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function kp(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var kD=FC,QC=UC,ZC=HC,XC=zC,e2=WC,t2=GC,r2=Kv;function n2(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=n2(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function s2(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=n2(e))&&(n&&(n+=" "),n+=t);return n}const cj=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,dj=s2,Km=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return dj(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:a}=t,o=Object.keys(s).map(d=>{const u=r==null?void 0:r[d],h=a==null?void 0:a[d];if(u===null)return null;const m=cj(u)||cj(h);return s[d][m]}),l=r&&Object.entries(r).reduce((d,u)=>{let[h,m]=u;return m===void 0||(d[h]=m),d},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,u)=>{let{class:h,className:m,...f}=u;return Object.entries(f).every(y=>{let[x,b]=y;return Array.isArray(b)?b.includes({...a,...l}[x]):{...a,...l}[x]===b})?[...d,h,m]:d},[]);return dj(e,o,c,r==null?void 0:r.class,r==null?void 0:r.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 SD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),i2=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).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 _D={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 ND=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:a,iconNode:o,...l},c)=>p.createElement("svg",{ref:c,..._D,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:i2("lucide",s),...l},[...o.map(([d,u])=>p.createElement(d,u)),...Array.isArray(a)?a:[a]]));/** 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 K=(e,t)=>{const r=p.forwardRef(({className:n,...s},a)=>p.createElement(ND,{ref:a,iconNode:t,className:i2(`lucide-${SD(e)}`,n),...s}));return r.displayName=`${e}`,r};/** 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 CD=K("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/** 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 Wn=K("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 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 xt=K("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 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 AD=K("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/** 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 Oa=K("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"}]]);/** 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 a2=K("BadgeCheck",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 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 Ym=K("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** 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 TD=K("Cake",[["path",{d:"M20 21v-8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8",key:"1w3rig"}],["path",{d:"M4 16s.5-1 2-1 2.5 2 4 2 2.5-2 4-2 2.5 2 4 2 2-1 2-1",key:"n2jgmb"}],["path",{d:"M2 21h20",key:"1nyx9w"}],["path",{d:"M7 8v3",key:"1qtyvj"}],["path",{d:"M12 8v3",key:"hwp4zt"}],["path",{d:"M17 8v3",key:"1i6e5u"}],["path",{d:"M7 4h.01",key:"1bh4kh"}],["path",{d:"M12 4h.01",key:"1ujb9j"}],["path",{d:"M17 4h.01",key:"1upcoc"}]]);/** 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 ED=K("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/** 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 Bn=K("CalendarDays",[["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"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/** 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 RD=K("CalendarPlus",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M16 19h6",key:"xwg31i"}],["path",{d:"M19 16v6",key:"tddt3s"}]]);/** 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 PD=K("CalendarX",[["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"}],["path",{d:"m14 14-4 4",key:"rymu2i"}],["path",{d:"m10 14 4 4",key:"3sz06r"}]]);/** 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 pr=K("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"}]]);/** 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 Ps=K("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 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 Jm=K("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 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 ID=K("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 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 qh=K("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 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 Yv=K("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 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 Qm=K("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 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 ky=K("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** 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 OD=K("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 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 Nr=K("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 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 MD=K("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/** 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 Jv=K("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** 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 Zm=K("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** 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 Qv=K("Dumbbell",[["path",{d:"M14.4 14.4 9.6 9.6",key:"ic80wn"}],["path",{d:"M18.657 21.485a2 2 0 1 1-2.829-2.828l-1.767 1.768a2 2 0 1 1-2.829-2.829l6.364-6.364a2 2 0 1 1 2.829 2.829l-1.768 1.767a2 2 0 1 1 2.828 2.829z",key:"nnl7wr"}],["path",{d:"m21.5 21.5-1.4-1.4",key:"1f1ice"}],["path",{d:"M3.9 3.9 2.5 2.5",key:"1evmna"}],["path",{d:"M6.404 12.768a2 2 0 1 1-2.829-2.829l1.768-1.767a2 2 0 1 1-2.828-2.829l2.828-2.828a2 2 0 1 1 2.829 2.828l1.767-1.768a2 2 0 1 1 2.829 2.829z",key:"yhosts"}]]);/** 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 In=K("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 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 DD=K("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** 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 Sy=K("FilePenLine",[["path",{d:"m18 5-2.414-2.414A2 2 0 0 0 14.172 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2",key:"142zxg"}],["path",{d:"M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"2t3380"}],["path",{d:"M8 18h1",key:"13wk12"}]]);/** 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 LD=K("Footprints",[["path",{d:"M4 16v-2.38C4 11.5 2.97 10.5 3 8c.03-2.72 1.49-6 4.5-6C9.37 2 10 3.8 10 5.5c0 3.11-2 5.66-2 8.68V16a2 2 0 1 1-4 0Z",key:"1dudjm"}],["path",{d:"M20 20v-2.38c0-2.12 1.03-3.12 1-5.62-.03-2.72-1.49-6-4.5-6C14.63 6 14 7.8 14 9.5c0 3.11 2 5.66 2 8.68V20a2 2 0 1 0 4 0Z",key:"l2t8xc"}],["path",{d:"M16 17h4",key:"1dejxt"}],["path",{d:"M4 13h4",key:"1bwh8b"}]]);/** 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 $D=K("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 216 * @license lucide-react v0.462.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const FD=K("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/** 221 * @license lucide-react v0.462.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const BD=K("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"}]]);/** 226 * @license lucide-react v0.462.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const UD=K("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** 231 * @license lucide-react v0.462.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const VD=K("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"}]]);/** 236 * @license lucide-react v0.462.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree.
240 */const HD=K("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** 241 * @license lucide-react v0.462.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const Be=K("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 246 * @license lucide-react v0.462.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const zD=K("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** 251 * @license lucide-react v0.462.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree. 255 */const WD=K("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"}]]);/** 256 * @license lucide-react v0.462.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree. 260 */const o2=K("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"}]]);/** 261 * @license lucide-react v0.462.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const Ol=K("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"}]]);/** 266 * @license lucide-react v0.462.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree. 270 */const qD=K("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/** 271 * @license lucide-react v0.462.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const GD=K("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"}]]);/** 276 * @license lucide-react v0.462.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const uj=K("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 281 * @license lucide-react v0.462.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const KD=K("MonitorCheck",[["path",{d:"m9 10 2 2 4-4",key:"1gnqz4"}],["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}]]);/** 286 * @license lucide-react v0.462.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const Sp=K("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/** 291 * @license lucide-react v0.462.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const YD=K("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/** 296 * @license lucide-react v0.462.0 - ISC 297 * 298 * This source code is licensed under the ISC license. 299 * See the LICENSE file in the root directory of this source tree. 300 */const JD=K("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** 301 * @license lucide-react v0.462.0 - ISC 302 * 303 * This source code is licensed under the ISC license. 304 * See the LICENSE file in the root directory of this source tree. 305 */const Zv=K("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"}]]);/** 306 * @license lucide-react v0.462.0 - ISC 307 * 308 * This source code is licensed under the ISC license. 309 * See the LICENSE file in the root directory of this source tree. 310 */const Xm=K("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 311 * @license lucide-react v0.462.0 - ISC 312 * 313 * This source code is licensed under the ISC license. 314 * See the LICENSE file in the root directory of this source tree. 315 */const QD=K("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/** 316 * @license lucide-react v0.462.0 - ISC 317 * 318 * This source code is licensed under the ISC license. 319 * See the LICENSE file in the root directory of this source tree. 320 */const l2=K("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 321 * @license lucide-react v0.462.0 - ISC 322 * 323 * This source code is licensed under the ISC license. 324 * See the LICENSE file in the root directory of this source tree. 325 */const _y=K("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** 326 * @license lucide-react v0.462.0 - ISC 327 * 328 * This source code is licensed under the ISC license. 329 * See the LICENSE file in the root directory of this source tree. 330 */const ZD=K("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 331 * @license lucide-react v0.462.0 - ISC 332 * 333 * This source code is licensed under the ISC license. 334 * See the LICENSE file in the root directory of this source tree. 335 */const XD=K("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** 336 * @license lucide-react v0.462.0 - ISC 337 * 338 * This source code is licensed under the ISC license. 339 * See the LICENSE file in the root directory of this source tree. 340 */const eL=K("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 341 * @license lucide-react v0.462.0 - ISC 342 * 343 * This source code is licensed under the ISC license. 344 * See the LICENSE file in the root directory of this source tree. 345 */const Sa=K("ShieldCheck",[["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",ke
345y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 346 * @license lucide-react v0.462.0 - ISC 347 * 348 * This source code is licensed under the ISC license. 349 * See the LICENSE file in the root directory of this source tree. 350 */const qn=K("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"}]]);/** 351 * @license lucide-react v0.462.0 - ISC 352 * 353 * This source code is licensed under the ISC license. 354 * See the LICENSE file in the root directory of this source tree. 355 */const tL=K("Shirt",[["path",{d:"M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z",key:"1wgbhj"}]]);/** 356 * @license lucide-react v0.462.0 - ISC 357 * 358 * This source code is licensed under the ISC license. 359 * See the LICENSE file in the root directory of this source tree. 360 */const gl=K("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/** 361 * @license lucide-react v0.462.0 - ISC 362 * 363 * This source code is licensed under the ISC license. 364 * See the LICENSE file in the root directory of this source tree. 365 */const rL=K("Smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/** 366 * @license lucide-react v0.462.0 - ISC 367 * 368 * This source code is licensed under the ISC license. 369 * See the LICENSE file in the root directory of this source tree. 370 */const ef=K("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 371 * @license lucide-react v0.462.0 - ISC 372 * 373 * This source code is licensed under the ISC license. 374 * See the LICENSE file in the root directory of this source tree. 375 */const Ma=K("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** 376 * @license lucide-react v0.462.0 - ISC 377 * 378 * This source code is licensed under the ISC license. 379 * See the LICENSE file in the root directory of this source tree. 380 */const Xv=K("Sword",[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}]]);/** 381 * @license lucide-react v0.462.0 - ISC 382 * 383 * This source code is licensed under the ISC license. 384 * See the LICENSE file in the root directory of this source tree. 385 */const qe=K("Swords",[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}],["polyline",{points:"14.5 6.5 18 3 21 3 21 6 17.5 9.5",key:"hbey2j"}],["line",{x1:"5",x2:"9",y1:"14",y2:"18",key:"1hf58s"}],["line",{x1:"7",x2:"4",y1:"17",y2:"20",key:"pidxm4"}],["line",{x1:"3",x2:"5",y1:"19",y2:"21",key:"1pehsh"}]]);/** 386 * @license lucide-react v0.462.0 - ISC 387 * 388 * This source code is licensed under the ISC license. 389 * See the LICENSE file in the root directory of this source tree. 390 */const ew=K("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"}]]);/** 391 * @license lucide-react v0.462.0 - ISC 392 * 393 * This source code is licensed under the ISC license. 394 * See the LICENSE file in the root directory of this source tree. 395 */const hj=K("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);/** 396 * @license lucide-react v0.462.0 - ISC 397 * 398 * This source code is licensed under the ISC license. 399 * See the LICENSE file in the root directory of this source tree. 400 */const nL=K("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
vendor: 8,995 bytes, lines 400-440
400],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 401 * @license lucide-react v0.462.0 - ISC 402 * 403 * This source code is licensed under the ISC license. 404 * See the LICENSE file in the root directory of this source tree. 405 */const c2=K("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** 406 * @license lucide-react v0.462.0 - ISC 407 * 408 * This source code is licensed under the ISC license. 409 * See the LICENSE file in the root directory of this source tree. 410 */const d2=K("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"}]]);/** 411 * @license lucide-react v0.462.0 - ISC 412 * 413 * This source code is licensed under the ISC license. 414 * See the LICENSE file in the root directory of this source tree. 415 */const sL=K("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/** 416 * @license lucide-react v0.462.0 - ISC 417 * 418 * This source code is licensed under the ISC license. 419 * See the LICENSE file in the root directory of this source tree. 420 */const u2=K("UserPlus",[["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"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** 421 * @license lucide-react v0.462.0 - ISC 422 * 423 * This source code is licensed under the ISC license. 424 * See the LICENSE file in the root directory of this source tree. 425 */const ar=K("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"}]]);/** 426 * @license lucide-react v0.462.0 - ISC 427 * 428 * This source code is licensed under the ISC license. 429 * See the LICENSE file in the root directory of this source tree. 430 */const Da=K("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 431 * @license lucide-react v0.462.0 - ISC 432 * 433 * This source code is licensed under the ISC license. 434 * See the LICENSE file in the root directory of this source tree. 435 */const iL=K("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);/** 436 * @license lucide-react v0.462.0 - ISC 437 * 438 * This source code is licensed under the ISC license. 439 * See the LICENSE file in the root directory of this source tree. 440 */const aL=K("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),tw="-",oL=e=>{const t=cL(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const l=o.split(tw);return l[0]===""&&l.length!==1&&l.shift(),h2(l,t)||lL(o)},getConflictingClassGroupIds:(o,l)=>{const c=r[o]||[];return l&&n[o]?[...c,...n[o]]:c}}},h2=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?h2(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const a=e.join(tw);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},mj=/^\[(.+)\]$/,lL=e=>{if(mj.test(e)){const t=mj.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},cL=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return uL(Object.entries(e.classGroups),r).forEach(([a,o])=>{Ny(o,n,a,t)}),n},Ny=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const a=s===""?t:fj(t,s);a.classGroupId=r;return}if(typeof s=="function"){if(dL(s)){Ny(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([a,o])=>{Ny(o,fj(t,a),r,n)})})},fj=(e,t)=>{let r=e;return t.split(tw).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},dL=e=>e.isThemeGetter,uL=(e,t)=>t?e.map(([r,n])=>{const s=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,l])=>[t+o,l])):a);return[r,s]}):e,hL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(a,o)=>{r.set(a,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let o=r.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return s(a,o),o},set(a,o){r.has(a)?r.set(a,o):s(a,o)}}},m2="!",mL=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],a=t.length,o=l=>{const c=[];let d=0,u=0,h;for(let b=0;b<l.length;b++){let g=l[b];if(d===0){if(g===s&&(n||l.slice(b,b+a)===t)){c.push(l.slice(u,b)),u=b+a;continue}if(g==="/"){h=b;continue}}g==="["?d++:g==="]"&&d--}const m=c.length===0?l:l.substring(u),f=m.startsWith(m2),y=f?m.substring(1):m,x=h&&h>u?h-u:void 0;return{modifiers:c,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:x}};return r?l=>r({className:l,parseClassName:o}):o},fL=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},pL=e=>({cache:hL(e.cacheSize),parseClassName:mL(e),...oL(e)}),gL=/\s+/,yL=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,a=[],o=e.trim().split(gL);let l="";for(let c=o.length-1;c>=0;c-=1){const d=o[c],{modifiers:u,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:f}=r(d);let y=!!f,x=n(y?m.substring(0,f):m);if(!x){if(!y){l=d+(l.length>0?" "+l:l);continue}if(x=n(m),!x){l=d+(l.length>0?" "+l:l);continue}y=!1}const b=fL(u).join(":"),g=h?b+m2:b,v=g+x;if(a.includes(v))continue;a.push(v);const w=s(x,y);for(let j=0;j<w.length;++j){const k=w[j];a.push(g+k)}l=d+(l.length>0?" "+l:l)}return l};function xL(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=f2(t))&&(n&&(n+=" "),n+=r);return n}const f2=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=f2(e[n]))&&(r&&(r+=" "),r+=t);return r};function vL(e,...t){let r,n,s,a=o;function o(c){const d=t.reduce((u,h)=>h(u),e());return r=pL(d),n=r.cache.get,s=r.cache.set,a=l,l(c)}function l(c){const d=n(c);if(d)return d;const u=yL(c,r);return s(c,u),u}return function(){return a(xL.apply(null,arguments))}}const Xe=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},p2=/^\[(?:([a-z-]+):)?(.+)\]$/i,wL=/^\d+\/\d+$/,bL=new Set(["px","full","screen"]),jL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kL=/\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$/,SL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,_L=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,NL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ts=e=>Vo(e)||bL.has(e)||wL.test(e),Vs=e=>Ml(e,"length",OL),Vo=e=>!!e&&!Number.isNaN(Number(e)),_p=e=>Ml(e,"number",Vo),cc=e=>!!e&&Number.isInteger(Number(e)),CL=e=>e.endsWith("%")&&Vo(e.slice(0,-1)),Se=e=>p2.test(e),Hs=e=>jL.test(e),AL=new Set(["length","size","percentage"]),TL=e=>Ml(e,AL,g2),EL=e=>Ml(e,"position",g2),RL=new Set(["image","url"]),PL=e=>Ml(e,RL,DL),IL=e=>Ml(e,"",ML),dc=()=>!0,Ml=(e,t,r)=>{const n=p2.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},OL=e=>kL.test(e)&&!SL.test(e),g2=()=>!1,ML=e=>_L.test(e),DL=e=>NL.test(e),LL=()=>{const e=Xe("colors"),t=Xe("spacing"),r=Xe("blur"),n=Xe("brightness"),s=Xe("borderColor"),a=Xe("borderRadius"),o=Xe("borderSpacing"),l=Xe("borderWidth"),c=Xe("contrast"),d=Xe("grayscale"),u=Xe("hueRotate"),h=Xe("invert"),m=Xe("gap"),f=Xe("gradientColorStops"),y=Xe("gradientColorStopPositions"),x=Xe("inset"),b=Xe("margin"),g=Xe("opacity"),v=Xe("padding"),w=Xe("saturate"),j=Xe("scale"),k=Xe("sepia"),S=Xe("skew"),_=Xe("space"),N=Xe("translate"),T=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto",Se,t],M=()=>[Se,t],z=()=>["",ts,Vs],$=()=>["auto",Vo,Se],ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",Se],V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],he=()=>[Vo,Se];return{cacheSize:500,separator:":",theme:{colors:[dc],spacing:[ts,Vs],blur:["none","",Hs,Se],brightness:he(),borderColor:[e],borderRadius:["n
440one","","full",Hs,Se],borderSpacing:M(),borderWidth:z(),contrast:he(),grayscale:O(),hueRotate:he(),invert:O(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[CL,Vs],inset:A(),margin:A(),opacity:he(),padding:M(),saturate:he(),scale:he(),sepia:O(),skew:he(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",Se]}],container:["container"],columns:[{columns:[Hs]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"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:[...ae(),Se]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",cc,Se]}],basis:[{basis:A()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Se]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",cc,Se]}],"grid-cols":[{"grid-cols":[dc]}],"col-start-end":[{col:["auto",{span:["full",cc,Se]},Se]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[dc]}],"row-start-end":[{row:["auto",{span:[cc,Se]},Se]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Se]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"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":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Se,t]}],"min-w":[{"min-w":[Se,t,"min","max","fit"]}],"max-w":[{"max-w":[Se,t,"none","full","min","max","fit","prose",{screen:[Hs]},Hs]}],h:[{h:[Se,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Se,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Se,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Se,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Hs,Vs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",_p]}],"font-family":[{font:[dc]}],"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",Se]}],"line-clamp":[{"line-clamp":["none",Vo,_p]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ts,Se]}],"list-image":[{"list-image":["none",Se]}],"list-style-type":[{list:["none","disc","decimal",Se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ts,Vs]}],"underline-offset":[{"underline-offset":["auto",ts,Se]}],"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:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se]}],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",Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ae(),EL]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",TL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},PL]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}
vendor: 5,182 bytes, line 440
440],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:W()}],"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:["",...W()]}],"outline-offset":[{"outline-offset":[ts,Se]}],"outline-w":[{outline:[ts,Vs]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[ts,Vs]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Hs,IL]}],"shadow-color":[{shadow:[dc]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Hs,Se]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"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",Se]}],duration:[{duration:he()}],ease:[{ease:["linear","in","out","in-out",Se]}],delay:[{delay:he()}],animate:[{animate:["none","spin","ping","pulse","bounce",Se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[cc,Se]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Se]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","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",Se]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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"]}
vendor: 4,642 bytes, line 440
440],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",Se]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ts,Vs,_p]}],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"]}}},$L=vL(LL);function Q(...e){return $L(s2(e))}const FL=kD,y2=p.forwardRef(({className:e,...t},r)=>i.jsx(QC,{ref:r,className:Q("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}));y2.displayName=QC.displayName;const BL=Km("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"}}),x2=p.forwardRef(({className:e,variant:t,...r},n)=>i.jsx(ZC,{ref:n,className:Q(BL({variant:t}),e),...r}));x2.displayName=ZC.displayName;const UL=p.forwardRef(({className:e,...t},r)=>i.jsx(t2,{ref:r,className:Q("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}));UL.displayName=t2.displayName;const v2=p.forwardRef(({className:e,...t},r)=>i.jsx(r2,{ref:r,className:Q("absolute right-2 top-2 rounded-md p-1 text-foreground
440/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:i.jsx(Da,{className:"h-4 w-4"})}));v2.displayName=r2.displayName;const w2=p.forwardRef(({className:e,...t},r)=>i.jsx(XC,{ref:r,className:Q("text-sm font-semibold",e),...t}));w2.displayName=XC.displayName;const b2=p.forwardRef(({className:e,...t},r)=>i.jsx(e2,{ref:r,className:Q("text-sm opacity-90",e),...t}));b2.displayName=e2.displayName;function VL(){const{toasts:e}=PM();return i.jsxs(FL,{children:[e.map(function({id:t,title:r,description:n,action:s,...a}){return i.jsxs(x2,{...a,children:[i.jsxs("div",{className:"grid gap-1",children:[r&&i.jsx(w2,{children:r}),n&&i.jsx(b2,{children:n})]}),s,i.jsx(v2,{})]},t)}),i.jsx(y2,{})]})}var pj=["light","dark"],HL="(prefers-color-scheme: dark)",zL=p.createContext(void 0),WL={setTheme:e=>{},themes:[]},qL=()=>{var e;return(e=p.useContext(zL))!=null?e:WL};p.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:a,value:o,attrs:l,nonce:c})=>{let d=a==="system",u=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,h=s?pj.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",m=(y,x=!1,b=!0)=>{let g=o?o[y]:y,v=x?y+"|| ''":`'${g}'`,w="";return s&&b&&!x&&pj.includes(y)&&(w+=`d.style.colorScheme = '${y}';`),r==="class"?x||g?w+=`c.add(${v})`:w+="null":g&&(w+=`d[s](n,${v})`),w},f=e?`!function(){${u}${m(e)}}()`:n?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${d})){var t='${HL}',m=window.matchMedia(t);if(m.media!==t||m.matches){${m("dark")}}else{${m("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${m(o?"x[e]":"e",!0)}}${d?"":"else{"+m(a,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${m(o?"x[e]":"e",!0)}}else{${m(a,!1,!1)};}${h}}catch(t){}}();`;return p.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:f}})});var GL=e=>{switch(e){case"success":return JL;case"info":return ZL;case"warning":return QL;case"error":return XL;default:return null}},KL=Array(12).fill(0),YL=({visible:e,className:t})=>D.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},D.createElement("div",{className:"sonner-spinner"},KL.map((r,n)=>D.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),JL=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},D.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"})),QL=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},D.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"})),ZL=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},D.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"})),XL=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},D.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"})),e5=D.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"},D.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),D.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),t5=()=>{let[e,t]=D.useState(document.hidden);return D.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Cy=1,r5=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
vendor: 1,050 bytes, line 440
440{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Cy++,a=this.toasts.find(l=>l.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:r}),{...l,...e,id:s,dismissible:o,title:r}):l):this.addToast({title:r,...n,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({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)=>
440this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,a,o=n.then(async c=>{if(a=["resolve",c],D.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(s5(c)&&!c.ok){s=!1;let d=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:r,type:"error",message:d,description:u})}else if(t.success!==void 0){s=!1;let d=typeof t.success=="function"?await t.success(c):t.success,u=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"success",message:d,description:u})}}).catch(async c=>{if(a=["reject",c],t.error!==void 0){s=!1;let d=typeof t.error=="function"?await t.error(c):t.error,u=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"error",message:d,description:u})}}).finally(()=>{var c;s&&(this.dismiss(r),r=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,d)=>o.then(()=>a[0]==="reject"?d(a[1]):c(a[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Cy++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},hr=new r5,n5=(e,t)=>{let r=(t==null?void 0:t.id)||Cy++;return hr.addToast({title:e,...t,id:r}),r},s5=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",i5=n5,a5=()=>hr.toasts,o5=()=>hr.getActiveToasts(),ce=Object.assign(i5,{success:hr.success,info:hr.info,warning:hr.warning,error:hr.error,custom:hr.custom,message:hr.message,promise:hr.promise,dismiss:hr.dismiss,loading:hr.loading},{getHistory:a5,getToasts:o5});function l5(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}l5(`: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;
440left: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}
440: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%);
440--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%)} 441`);function Nu(e){return e.label!==void 0}var c5=3,d5="32px",u5="16px",gj=4e3,h5=356,m5=14,f5=20,p5=200;function Xr(...e){return e.filter(Boolean).join(" ")}function g5(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var y5=e=>{var t,r,n,s,a,o,l,c,d,u,h;let{invert:m,toast:f,unstyled:y,interacting:x,setHeights:b,visibleToasts:g,heights:v,index:w,toasts:j,expanded:k,removeToast:S,defaultRichColors:_,closeButton:N,style:T,cancelButtonStyle:P,actionButtonStyle:A,className:M="",descriptionClassName:z="",duration:$,position:ae,gap:W,loadingIcon:q,expandByDefault:R,classNames:O,icons:V,
441closeButtonAriaLabel:he="Close toast",pauseWhenPageIsHidden:ne}=e,[xe,me]=D.useState(null),[We,Ze]=D.useState(null),[Y,Fe]=D.useState(!1),[nt,Te]=D.useState(!1),[_e,Ae]=D.useState(!1),[_t,It]=D.useState(!1),[Gr,cr]=D.useState(!1),[Zn,qi]=D.useState(0),[Ls,ru]=D.useState(0),Gi=D.useRef(f.duration||$||gj),nu=D.useRef(null),Xn=D.useRef(null),Uf=w===0,Zl=w+1<=g,Bt=f.type,Ut=f.dismissible!==!1,su=f.className||"",Vf=f.descriptionClassName||"",Ya=D.useMemo(()=>v.findIndex(ke=>ke.toastId===f.id)||0,[v,f.id]),Ja=D.useMemo(()=>{var ke;return(ke=f.closeButton)!=null?ke:N},[f.closeButton,N]),E=D.useMemo(()=>f.duration||$||gj,[f.duration,$]),ue=D.useRef(0),se=D.useRef(0),He=D.useRef(0),bt=D.useRef(null),[Ki,Qa]=ae.split("-"),Vt=D.useMemo(()=>v.reduce((ke,ze,st)=>st>=Ya?ke:ke+ze.height,0),[v,Ya]),Kr=t5(),jI=f.invert||m,Hf=Bt==="loading";se.current=D.useMemo(()=>Ya*W+Vt,[Ya,Vt]),D.useEffect(()=>{Gi.current=E},[E]),D.useEffect(()=>{Fe(!0)},[]),D.useEffect(()=>{let ke=Xn.current;if(ke){let ze=ke.getBoundingClientRect().height;return ru(ze),b(st=>[{toastId:f.id,height:ze,position:f.position},...st]),()=>b(st=>st.filter(Yr=>Yr.toastId!==f.id))}},[b,f.id]),D.useLayoutEffect(()=>{if(!Y)return;let ke=Xn.current,ze=ke.style.height;ke.style.height="auto";let st=ke.getBoundingClientRect().height;ke.style.height=ze,ru(st),b(Yr=>Yr.find(Jr=>Jr.toastId===f.id)?Yr.map(Jr=>Jr.toastId===f.id?{...Jr,height:st}:Jr):[{toastId:f.id,height:st,position:f.position},...Yr])},[Y,f.title,f.description,b,f.id]);let $s=D.useCallback(()=>{Te(!0),qi(se.current),b(ke=>ke.filter(ze=>ze.toastId!==f.id)),setTimeout(()=>{S(f)},p5)},[f,S,b,se]);D.useEffect(()=>{if(f.promise&&Bt==="loading"||f.duration===1/0||f.type==="loading")return;let ke;return k||x||ne&&Kr?(()=>{if(He.current<ue.current){let ze=new Date().getTime()-ue.current;Gi.current=Gi.current-ze}He.current=new Date().getTime()})():Gi.current!==1/0&&(ue.current=new Date().getTime(),ke=setTimeout(()=>{var ze;(ze=f.onAutoClose)==null||ze.call(f,f),$s()},Gi.current)),()=>clearTimeout(ke)},[k,x,f,Bt,ne,Kr,$s]),D.useEffect(()=>{f.delete&&$s()},[$s,f.delete]);function kI(){var ke,ze,st;return V!=null&&V.loading?D.createElement("div",{className:Xr(O==null?void 0:O.loader,(ke=f==null?void 0:f.classNames)==null?void 0:ke.loader,"sonner-loader"),"data-visible":Bt==="loading"},V.loading):q?D.createElement("div",{className:Xr(O==null?void 0:O.loader,(ze=f==null?void 0:f.classNames)==null?void 0:ze.loader,"sonner-loader"),"data-visible":Bt==="loading"},q):D.createElement(YL,{className:Xr(O==null?void 0:O.loader,(st=f==null?void 0:f.classNames)==null?void 0:st.loader),visible:Bt==="loading"})}return D.createElement("li",{tabIndex:0,ref:Xn,className:Xr(M,su,O==null?void 0:O.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,O==null?void 0:O.default,O==null?void 0:O[Bt],(r=f==null?void 0:f.classNames)==null?void 0:r[Bt]),"data-sonner-toast":"","data-rich-colors":(n=f.richColors)!=null?n:_,"data-styled":!(f.jsx||f.unstyled||y),"data-mounted":Y,"data-promise":!!f.promise,"data-swiped":Gr,"data-removed":nt,"data-visible":Zl,"data-y-position":Ki,"data-x-position":Qa,"data-index":w,"data-front":Uf,"data-swiping":_e,"data-dismissible":Ut,"data-type":Bt,"data-invert":jI,"data-swipe-out":_t,"data-swipe-direction":We,"data-expanded":!!(k||R&&Y),style:{"--index":w,"--toasts-before":w,"--z-index":j.length-w,"--offset":`${nt?Zn:se.current}px`,"--initial-height":R?"auto":`${Ls}px`,...T,...f.style},onDragEnd:()=>{Ae(!1),me(null),bt.current=null},onPointerDown:ke=>{Hf||!Ut||(nu.current=new Date,qi(se.current),ke.target.setPointerCapture(ke.pointerId),ke.target.tagName!=="BUTTON"&&(Ae(!0),bt.current={x:ke.clientX,y:ke.clientY}))},onPointerUp:()=>{var ke,ze,st,Yr;if(_t||!Ut)return;bt.current=null;let Jr=Number(((ke=Xn.current)==null?void 0:ke.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Fs=Number(((ze=Xn.current)==null?void 0:ze.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Yi=new Date().getTime()-((st=nu.current)==null?void 0:st.getTime()),Qr=xe==="x"?Jr:Fs,Bs=Math.abs(Qr)/Yi;if(Math.abs(Qr)>=f5||Bs>.11){qi(se.current),(Yr=f.onDismiss)==null||Yr.call(f,f),Ze(xe==="x"?Jr>0?"right":"left":Fs>0?"down":"up"),$s(),It(!0),cr(!1);return}Ae(!1),me(null)},onPointerMove:ke=>{var ze,st,Yr,Jr;if(!bt.current||!Ut||((ze=window.getSelection())==null?void 0:ze.toString().length)>0)return;let Fs=ke.clientY-bt.current.y,Yi=ke.clientX-bt.current.x,Qr=(st=e.swipeDirections)!=null?st:g5(ae);!xe&&(Math.abs(Yi)>1||Math.abs(Fs)>1)&&me(Math.abs(Yi)>Math.abs(Fs)?"x":"y");let Bs={x:0,y:0};xe==="y"?(Qr.includes("top")||Qr.includes("bottom"))&&(Qr.includes("top")&&Fs<0||Qr.includes("bottom")&&Fs>0)&&(Bs.y=Fs):xe==="x"&&(Qr.includes("left")||Qr.includes("right"))&&(Qr.includes("left")&&Yi<0||Qr.includes("right")&&Yi>0)&&(Bs.x=Yi),(Math.abs(Bs.x)>0||Math.abs(Bs.y)>0)&&cr(!0),(Yr=Xn.current)==null||Yr.style.setProperty("--swipe-amount-x",`${Bs.x}px`),(Jr=Xn.current)==null||Jr.style.setProperty("--swipe-amount-y",`${Bs.y}px`)}},Ja&&!f.jsx?D.createElement("button",{"aria-label":he,"data-disabled":Hf,"data-close-button":!0,onClick:Hf||!Ut?()=>{}:()=>{var ke;$s(),(ke=f.onDismiss)==null||ke.call(f,f)},className:Xr(O==null?void 0:O.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(a=V==null?void 0:V.close)!=null?a:e5):null,f.jsx||p.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:D.createElement(D.Fragment,null,Bt||f.icon||f.promise?D.createElement("div",{"data-icon":"",className:Xr(O==null?void 0:O.icon,(o=f==null?void 0:f.classNames)==null?void 0:o.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||kI():null,f.type!=="loading"?f.icon||(V==null?void 0:V[Bt])||GL(Bt):null):null,D.createElement("div",{"data-content":"",className:Xr(O==null?void 0:O.content,(l=f==null?void 0:f.classNames)==null?void 0:l.content)},D.createElement("div",{"data-title":"",className:Xr(O==null?void 0:O.title,(c=f==null?void 0:f.classNames)==null?void 0:c.title)},typeof f.title=="function"?f.title():f.title),f.description?D.createElement("div",{"data-description":"",className:Xr(z,Vf,O==null?void 0:O.de
441scription,(d=f==null?void 0:f.classNames)==null?void 0:d.description)},typeof f.description=="function"?f.description():f.description):null),p.isValidElement(f.cancel)?f.cancel:f.cancel&&Nu(f.cancel)?D.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||P,onClick:ke=>{var ze,st;Nu(f.cancel)&&Ut&&((st=(ze=f.cancel).onClick)==null||st.call(ze,ke),$s())},className:Xr(O==null?void 0:O.cancelButton,(u=f==null?void 0:f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,p.isValidElement(f.action)?f.action:f.action&&Nu(f.action)?D.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||A,onClick:ke=>{var ze,st;Nu(f.action)&&((st=(ze=f.action).onClick)==null||st.call(ze,ke),!ke.defaultPrevented&&$s())},className:Xr(O==null?void 0:O.actionButton,(h=f==null?void 0:f.classNames)==null?void 0:h.actionButton)},f.action.label):null))};function yj(){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 x5(e,t){let r={};return[e,t].forEach((n,s)=>{let a=s===1,o=a?"--mobile-offset":"--offset",l=a?u5:d5;function c(d){["top","right","bottom","left"].forEach(u=>{r[`${o}-${u}`]=typeof d=="number"?`${d}px`:d})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(d=>{n[d]===void 0?r[`${o}-${d}`]=l:r[`${o}-${d}`]=typeof n[d]=="number"?`${n[d]}px`:n[d]}):c(l)}),r}var v5=p.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:a,closeButton:o,className:l,offset:c,mobileOffset:d,theme:u="light",richColors:h,duration:m,style:f,visibleToasts:y=c5,toastOptions:x,dir:b=yj(),gap:g=m5,loadingIcon:v,icons:w,containerAriaLabel:j="Notifications",pauseWhenPageIsHidden:k}=e,[S,_]=D.useState([]),N=D.useMemo(()=>Array.from(new Set([n].concat(S.filter(ne=>ne.position).map(ne=>ne.position)))),[S,n]),[T,P]=D.useState([]),[A,M]=D.useState(!1),[z,$]=D.useState(!1),[ae,W]=D.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=D.useRef(null),R=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=D.useRef(null),V=D.useRef(!1),he=D.useCallback(ne=>{_(xe=>{var me;return(me=xe.find(We=>We.id===ne.id))!=null&&me.delete||hr.dismiss(ne.id),xe.filter(({id:We})=>We!==ne.id)})},[]);return D.useEffect(()=>hr.subscribe(ne=>{if(ne.dismiss){_(xe=>xe.map(me=>me.id===ne.id?{...me,delete:!0}:me));return}setTimeout(()=>{jC.flushSync(()=>{_(xe=>{let me=xe.findIndex(We=>We.id===ne.id);return me!==-1?[...xe.slice(0,me),{...xe[me],...ne},...xe.slice(me+1)]:[ne,...xe]})})})}),[]),D.useEffect(()=>{if(u!=="system"){W(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let ne=window.matchMedia("(prefers-color-scheme: dark)");try{ne.addEventListener("change",({matches:xe})=>{W(xe?"dark":"light")})}catch{ne.addListener(({matches:me})=>{try{W(me?"dark":"light")}catch(We){console.error(We)}})}},[u]),D.useEffect(()=>{S.length<=1&&M(!1)},[S]),D.useEffect(()=>{let ne=xe=>{var me,We;s.every(Ze=>xe[Ze]||xe.code===Ze)&&(M(!0),(me=q.current)==null||me.focus()),xe.code==="Escape"&&(document.activeElement===q.current||(We=q.current)!=null&&We.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[s]),D.useEffect(()=>{if(q.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,V.current=!1)}},[q.current]),D.createElement("section",{ref:t,"aria-label":`${j} ${R}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((ne,xe)=>{var me;let[We,Ze]=ne.split("-");return S.length?D.createElement("ol",{key:ne,dir:b==="auto"?yj():b,tabIndex:-1,ref:q,className:l,"data-sonner-toaster":!0,"data-theme":ae,"data-y-position":We,"data-lifted":A&&S.length>1&&!a,"data-x-position":Ze,style:{"--front-toast-height":`${((me=T[0])==null?void 0:me.height)||0}px`,"--width":`${h5}px`,"--gap":`${g}px`,...f,...x5(c,d)},onBlur:Y=>{V.current&&!Y.currentTarget.contains(Y.relatedTarget)&&(V.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||V.current||(V.current=!0,O.current=Y.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{z||M(!1)},onDragEnd:()=>M(!1),onPointerDown:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||$(!0)},onPointerUp:()=>$(!1)},S.filter(Y=>!Y.position&&xe===0||Y.position===ne).map((Y,Fe)=>{var nt,Te;return D.createElement(y5,{key:Y.id,icons:w,index:Fe,toast:Y,defaultRichColors:h,duration:(nt=x==null?void 0:x.duration)!=null?nt:m,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:r,visibleToasts:y,closeButton:(Te=x==null?void 0:x.closeButton)!=null?Te:o,interacting:z,position:ne,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,removeToast:he,toasts:S.filter(_e=>_e.position==Y.position),heights:T.filter(_e=>_e.position==Y.position),setHeights:P,expandByDefault:a,gap:g,loadingIcon:v,expanded:A,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const w5=({...e})=>{const{theme:t="system"}=qL();return i.jsx(v5,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var b5=ev[" useId ".trim().toString()]||(()=>{}),j5=0;function Un(e){const[t,r]=p.useState(b5());return wt(()=>{r(n=>n??String(j5++))},[e]),t?`radix-${t}`:""}const k5=["top","right","bottom","left"],Ri=Math.min,jr=Math.max,Gh=Math.round,Cu=Math.floor,Vn=e=>({x:e,y:e}
vendor: 11,929 bytes, line 441
441),S5={left:"right",right:"left",bottom:"top",top:"bottom"},_5={start:"end",end:"start"};function Ay(e,t,r){return jr(e,Ri(t,r))}function ks(e,t){return typeof e=="function"?e(t):e}function Ss(e){return e.split("-")[0]}function Dl(e){return e.split("-")[1]}function rw(e){return e==="x"?"y":"x"}function nw(e){return e==="y"?"height":"width"}const N5=new Set(["top","bottom"]);function Ln(e){return N5.has(Ss(e))?"y":"x"}function sw(e){return rw(Ln(e))}function C5(e,t,r){r===void 0&&(r=!1);const n=Dl(e),s=sw(e),a=nw(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Kh(o)),[o,Kh(o)]}function A5(e){const t=Kh(e);return[Ty(e),t,Ty(t)]}function Ty(e){return e.replace(/start|end/g,t=>_5[t])}const xj=["left","right"],vj=["right","left"],T5=["top","bottom"],E5=["bottom","top"];function R5(e,t,r){switch(e){case"top":case"bottom":return r?t?vj:xj:t?xj:vj;case"left":case"right":return t?T5:E5;default:return[]}}function P5(e,t,r,n){const s=Dl(e);let a=R5(Ss(e),r==="start",n);return s&&(a=a.map(o=>o+"-"+s),t&&(a=a.concat(a.map(Ty)))),a}function Kh(e){return e.replace(/left|right|bottom|top/g,t=>S5[t])}function I5(e){return{top:0,right:0,bottom:0,left:0,...e}}function j2(e){return typeof e!="number"?I5(e):{top:e,right:e,bottom:e,left:e}}function Yh(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function wj(e,t,r){let{reference:n,floating:s}=e;const a=Ln(t),o=sw(t),l=nw(o),c=Ss(t),d=a==="y",u=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,m=n[l]/2-s[l]/2;let f;switch(c){case"top":f={x:u,y:n.y-s.height};break;case"bottom":f={x:u,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:h};break;case"left":f={x:n.x-s.width,y:h};break;default:f={x:n.x,y:n.y}}switch(Dl(t)){case"start":f[o]-=m*(r&&d?-1:1);break;case"end":f[o]+=m*(r&&d?-1:1);break}return f}const O5=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:a=[],platform:o}=r,l=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let d=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:h}=wj(d,n,c),m=n,f={},y=0;for(let x=0;x<l.length;x++){const{name:b,fn:g}=l[x],{x:v,y:w,data:j,reset:k}=await g({x:u,y:h,initialPlacement:n,placement:m,strategy:s,middlewareData:f,rects:d,platform:o,elements:{reference:e,floating:t}});u=v??u,h=w??h,f={...f,[b]:{...f[b],...j}},k&&y<=50&&(y++,typeof k=="object"&&(k.placement&&(m=k.placement),k.rects&&(d=k.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:u,y:h}=wj(d,m,c)),x=-1)}return{x:u,y:h,placement:m,strategy:s,middlewareData:f}};async function dd(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:a,rects:o,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:m=!1,padding:f=0}=ks(t,e),y=j2(f),b=l[m?h==="floating"?"reference":"floating":h],g=Yh(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(b)))==null||r?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:d,rootBoundary:u,strategy:c})),v=h==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),j=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},k=Yh(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:w,strategy:c}):v);return{top:(g.top-k.top+y.top)/j.y,bottom:(k.bottom-g.bottom+y.bottom)/j.y,left:(g.left-k.left+y.left)/j.x,right:(k.right-g.right+y.right)/j.x}}const M5=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:a,platform:o,elements:l,middlewareData:c}=t,{element:d,padding:u=0}=ks(e,t)||{};if(d==null)return{};const h=j2(u),m={x:r,y:n},f=sw(s),y=nw(f),x=await o.getDimensions(d),b=f==="y",g=b?"top":"left",v=b?"bottom":"right",w=b?"clientHeight":"clientWidth",j=a.reference[y]+a.reference[f]-m[f]-a.floating[y],k=m[f]-a.reference[f],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d));let _=S?S[w]:0;(!_||!await(o.isElement==null?void 0:o.isElement(S)))&&(_=l.floating[w]||a.floating[y]);const N=j/2-k/2,T=_/2-x[y]/2-1,P=Ri(h[g],T),A=Ri(h[v],T),M=P,z=_-x[y]-A,$=_/2-x[y]/2+N,ae=Ay(M,$,z),W=!c.arrow&&Dl(s)!=null&&$!==ae&&a.reference[y]/2-($<M?P:A)-x[y]/2<0,q=W?$<M?$-M:$-z:0;return{[f]:m[f]+q,data:{[f]:ae,centerOffset:$-ae-q,...W&&{alignmentOffset:q}},reset:W}}}),D5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:a,rects:o,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:x=!0,...b}=ks(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const g=Ss(s),v=Ln(l),w=Ss(l)===l,j=await(c.isRTL==null?void 0:c.isRTL(d.floating)),k=m||(w||!x?[Kh(l)]:A5(l)),S=y!=="none";!m&&S&&k.push(...P5(l,x,y,j));const _=[l,...k],N=await dd(t,b),T=[];let P=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&T.push(N[g]),h){const $=C5(s,o,j);T.push(N[$[0]],N[$[1]])}if(P=[...P,{placement:s,overflows:T}],!T.every($=>$<=0)){var A,M;const $=(((A=a.flip)==null?void 0:A.index)||0)+1,ae=_[$];if(ae&&(!(h==="alignment"?v!==Ln(ae):!1)||P.every(R=>R.overflows[0]>0&&Ln(R.placement)===v)))return{data:{index:$,overflows:P},reset:{placement:ae}};let W=(M=P.filter(q=>q.overflows[0]<=0).sort((q,R)=>q.overflows[1]-R.overflows[1])[0])==null?void 0:M.placement;if(!W)switch(f){case"bestFit":{var z;const q=(z=P.filter(R=>{if(S){const O=Ln(R.placement);return O===v||O==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(O=>O>0).reduce((O,V)=>O+V,0)]).sort((R,O)=>R[1]-O[1])[0])==null?void 0:z[0];q&&(W=q);break}case"initialPlacement":W=l;break}if(s!==W)return{reset:{placement:W}}}return{}}}};function bj(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jj(e){return k5.some(t=>e[t]>=0)}const L5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=ks(e,t);switch(n){case"referenceHidden":{const a=await dd(t,{...s,elementContext:"reference"}),o=bj(a,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:jj(o)}}}case"escaped":{const a=await dd(t,{...s,altBoundary:!0}),o=bj(a,r.floating);return{data:{escapedOffsets:o,escaped:jj(o)}}}default:return{}}}}},k2=new Set(["left","top"]);async function $5(e,t){const{placement:r,platform:n,elements:s}=e,a=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Ss(r),l=Dl(r),c=Ln(r)==="y",d=k2.has(o)?-1:1,u=a&&c?-1:1,h=ks(t,e);let{mainAxis:m,crossAxis:f,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof y=="number"&&(f=l==="end"?y*-1:y),c?{x:f*u,y:m*d}:{x:m*d,y:f*u}}const F5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:a,placement:o,middlewareData:l}=t,c=await $5(t,e);return o===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:a+c.y,data:{...c,placement:o}}}}},B5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:b=>{let{x:g,y:v}=b;return{x:g,y:v}}},...c}=ks(e,t),d={x:r,y:n},u=await dd(t,c),h=Ln(Ss(s)),m=rw(h);let f=d[m],y=d[h];if(a){const b=m==="y"?"top":"left",g=m==="y"?"bottom":"right",v=f+u[b],w=f-u[g];f=Ay(v,f,w)}if(o){const b=h==="y"?"top":"left",g=h==="y"?"bottom":"right",v=y+u[b],w=y-u[g];y=Ay(v,y,w)}const x=l.fn({...t,[m]:f,[h]:y});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[m]:a,[h]:o}}}}}},U5=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:a,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:d=!0}=ks(e,t),u={x:r,y:n},h=Ln(s),m=rw(h);let f=u[m],y=u[h];const x=ks(l,t),b=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(c){const w=m==="y"?"height":"width",j=a.reference[m]-a.floating[w]+b.mainAxis,k=a.reference[m]+a.reference[w]-b.mainAxis;f<j?f=j:f>k&&(f=k)}if(d){var g,v;const w=m==="y"?"width":"height",j=k2.has(Ss(s)),k=a.reference[h]-a.floating[w]+(j&&((g=o.offset)==null?void 0:g[h])||0)+(j?0:b.crossAxis),S=a.reference[h]+a.reference[w]+(j?0:((v=o.offset)==null?void 0:v[h])||0)-(j?b.crossAxis:0);y<k?y=k:y>S&&(y=S)}return{[m]:f,[h]:y}}}},V5=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:a,platform:o,elements:l}=t,{apply:c=()=>{},...d}=ks(e,t),u=await dd(t,d),h=Ss(s),m=Dl(s),f=Ln(s)==="y",{width:y,height:x}=a.floating;let b,g;h==="top"||h==="bottom"?(b=h,g=m===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(g=h,b=m==="end"?"top":"bottom");const v=x-u.top-u.bottom,w=y-u.left-u.right,j=Ri(x-u[b],v),k=Ri(y-u[g],w),S=!t.middlewareData.shift;let _=j,N=k;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(_=v),S&&!m){const P=jr(u.left,0),A=jr(u.right,0),M=jr(u.top,0),z=jr(u.bottom,0);f?N=y-2*(P!==0||A!==0?P+A:jr(u.left,u.right)):_=x-2*(M!==0||z!==0?M+z:jr(u.top,u.bottom))}await c({...t,availableWidth:N,availableHeight:_});const T=await o.getDimensions(l.floating);return y!==T.width||x!==T.height?{reset:{rects:!0}}:{}}}};function tf(){return typeof window<"u"}function Ll(e){return S2(e)?(e.nodeName||"").toLowerCase():"#document"}function Cr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yn(e){var t;return(t=(S2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function S2(e){return tf()?e instanceof Node||e instanceof Cr(e).Node:!1}function bn(e){return tf()?e instanceof Element||e instanceof Cr(e).Element:!1}function Gn(e){return tf()?e instanceof HTMLElement||e instanceof Cr(e).HTMLElement:!1}function kj(e){return!tf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cr(e).ShadowRoot}const H5=new Set(["inline","contents"]);function qd(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=jn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!H5.has(s)}const z5=new Set(["table","td","th"]);function W5(e){return z5.has(Ll(e))}const q5=[":popover-open",":modal"];function rf(e){return q5.some(t=>{try{return e.matches(t)}catch{return!1}})}const G5=["transform","translate","scale","rotate","perspective"],K5=["transform","translate","scale","rotate","perspective","filter"],Y5=["paint","layout","strict","content"];function iw(e){const t=aw(),r=bn(e)?jn(e):e;return G5.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||K5.some(n=>(r.willChange||"").includes(n))||Y5.some(n=>(r.contain||"").includes(n))}function J5(e){let t=Pi(e);for(;Gn(t)&&!yl(t);){if(iw(t))return t;if(rf(t))return null;t=Pi(t)}return null}function aw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Q5=new Set(["html","body","#document"]);function yl(e){return Q5.has(Ll(e))}function jn(e){return Cr(e).getComputedStyle(e)}function nf(e){return bn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pi(e){if(Ll(e)==="html")return e;const t=e.assignedSlot||e.parentNode||kj(e)&&e.host||Yn(e);return kj(t)?t.host:t}function _2(e){const t=Pi(e);return yl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gn(t)&&qd(t)?t:_2(t)}function ud(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=_2(e),a=s===((n=e.ownerDocument)==null?void 0:n.body),o=Cr(s);if(a){const l=Ey(o);
vendor: 4,772 bytes, line 441
441return t.concat(o,o.visualViewport||[],qd(s)?s:[],l&&r?ud(l):[])}return t.concat(s,ud(s,[],r))}function Ey(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function N2(e){const t=jn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Gn(e),a=s?e.offsetWidth:r,o=s?e.offsetHeight:n,l=Gh(r)!==a||Gh(n)!==o;return l&&(r=a,n=o),{width:r,height:n,$:l}}function ow(e){return bn(e)?e:e.contextElement}function Ho(e){const t=ow(e);if(!Gn(t))return Vn(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:a}=N2(t);let o=(a?Gh(r.width):r.width)/n,l=(a?Gh(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const Z5=Vn(0);function C2(e){const t=Cr(e);return!aw()||!t.visualViewport?Z5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function X5(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Cr(e)?!1:t}function La(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),a=ow(e);let o=Vn(1);t&&(n?bn(n)&&(o=Ho(n)):o=Ho(e));const l=X5(a,r,n)?C2(a):Vn(0);let c=(s.left+l.x)/o.x,d=(s.top+l.y)/o.y,u=s.width/o.x,h=s.height/o.y;if(a){const m=Cr(a),f=n&&bn(n)?Cr(n):n;let y=m,x=Ey(y);for(;x&&n&&f!==y;){const b=Ho(x),g=x.getBoundingClientRect(),v=jn(x),w=g.left+(x.clientLeft+parseFloat(v.paddingLeft))*b.x,j=g.top+(x.clientTop+parseFloat(v.paddingTop))*b.y;c*=b.x,d*=b.y,u*=b.x,h*=b.y,c+=w,d+=j,y=Cr(x),x=Ey(y)}}return Yh({width:u,height:h,x:c,y:d})}function lw(e,t){const r=nf(e).scrollLeft;return t?t.left+r:La(Yn(e)).left+r}function A2(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:lw(e,n)),a=n.top+t.scrollTop;return{x:s,y:a}}function e3(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const a=s==="fixed",o=Yn(n),l=t?rf(t.floating):!1;if(n===o||l&&a)return r;let c={scrollLeft:0,scrollTop:0},d=Vn(1);const u=Vn(0),h=Gn(n);if((h||!h&&!a)&&((Ll(n)!=="body"||qd(o))&&(c=nf(n)),Gn(n))){const f=La(n);d=Ho(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}const m=o&&!h&&!a?A2(o,c,!0):Vn(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+u.x+m.x,y:r.y*d.y-c.scrollTop*d.y+u.y+m.y}}function t3(e){return Array.from(e.getClientRects())}function r3(e){const t=Yn(e),r=nf(e),n=e.ownerDocument.body,s=jr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=jr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+lw(e);const l=-r.scrollTop;return jn(n).direction==="rtl"&&(o+=jr(t.clientWidth,n.clientWidth)-s),{width:s,height:a,x:o,y:l}}function n3(e,t){const r=Cr(e),n=Yn(e),s=r.visualViewport;let a=n.clientWidth,o=n.clientHeight,l=0,c=0;if(s){a=s.width,o=s.height;const d=aw();(!d||d&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:a,height:o,x:l,y:c}}const s3=new Set(["absolute","fixed"]);function i3(e,t){const r=La(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,a=Gn(e)?Ho(e):Vn(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,c=s*a.x,d=n*a.y;return{width:o,height:l,x:c,y:d}}function Sj(e,t,r){let n;if(t==="viewport")n=n3(e,r);else if(t==="document")n=r3(Yn(e));else if(bn(t))n=i3(t,r);else{const s=C2(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Yh(n)}function T2(e,t){const r=Pi(e);return r===t||!bn(r)||yl(r)?!1:jn(r).position==="fixed"||T2(r,t)}function a3(e,t){const r=t.get(e);if(r)return r;let n=ud(e,[],!1).filter(l=>bn(l)&&Ll(l)!=="body"),s=null;const a=jn(e).position==="fixed";let o=a?Pi(e):e;for(;bn(o)&&!yl(o);){const l=jn(o),c=iw(o);!c&&l.position==="fixed"&&(s=null),(a?!c&&!s:!c&&l.position==="static"&&!!s&&s3.has(s.position)||qd(o)&&!c&&T2(e,o))?n=n.filter(u=>u!==o):s=l,o=Pi(o)}return t.set(e,n),n}function o3(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?rf(t)?[]:a3(t,this._c):[].concat(r),n],l=o[0],c=o.reduce((d,u)=>{const h=Sj(t,u,s);return d.top=jr(h.top,d.top),d.right=Ri(h.right,d.right),d.bottom=Ri(h.bottom,d.bottom),d.left=jr(h.left,d.left),d},Sj(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function l3(e){const{width:t,height:r}=N2(e);return{width:t,height:r}}function c3(e,t,r){const n=Gn(t),s=Yn(t),a=r==="fixed",o=La(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=Vn(0);function d(){c.x=lw(s)}if(n||!n&&!a)if((Ll(t)!=="body"||qd(s))&&(l=nf(t)),n){const f=La(t,!0,a,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else s&&d();a&&!n&&s&&d();const u=s&&!n&&!a?A2(s,l):Vn(0),h=o.left+l.scrollLeft-c.x-u.x,m=o.top+l.scrollTop-c.y-u.y;return{x:h,y:m,width:o.width,height:o.height}}function Np(e){return jn(e).position==="static"}function _j(e,t){if(!Gn(e)||jn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Yn(e)===r&&(r=r.ownerDocument.body),r}function E2(e,t){const r=Cr(e);
vendor: 9,154 bytes, line 441
441if(rf(e))return r;if(!Gn(e)){let s=Pi(e);for(;s&&!yl(s);){if(bn(s)&&!Np(s))return s;s=Pi(s)}return r}let n=_j(e,t);for(;n&&W5(n)&&Np(n);)n=_j(n,t);return n&&yl(n)&&Np(n)&&!iw(n)?r:n||J5(e)||r}const d3=async function(e){const t=this.getOffsetParent||E2,r=this.getDimensions,n=await r(e.floating);return{reference:c3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function u3(e){return jn(e).direction==="rtl"}const h3={convertOffsetParentRelativeRectToViewportRelativeRect:e3,getDocumentElement:Yn,getClippingRect:o3,getOffsetParent:E2,getElementRects:d3,getClientRects:t3,getDimensions:l3,getScale:Ho,isElement:bn,isRTL:u3};function R2(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function m3(e,t){let r=null,n;const s=Yn(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const d=e.getBoundingClientRect(),{left:u,top:h,width:m,height:f}=d;if(l||t(),!m||!f)return;const y=Cu(h),x=Cu(s.clientWidth-(u+m)),b=Cu(s.clientHeight-(h+f)),g=Cu(u),w={rootMargin:-y+"px "+-x+"px "+-b+"px "+-g+"px",threshold:jr(0,Ri(1,c))||1};let j=!0;function k(S){const _=S[0].intersectionRatio;if(_!==c){if(!j)return o();_?o(!1,_):n=setTimeout(()=>{o(!1,1e-7)},1e3)}_===1&&!R2(d,e.getBoundingClientRect())&&o(),j=!1}try{r=new IntersectionObserver(k,{...w,root:s.ownerDocument})}catch{r=new IntersectionObserver(k,w)}r.observe(e)}return o(!0),a}function f3(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,d=ow(e),u=s||a?[...d?ud(d):[],...ud(t)]:[];u.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),a&&g.addEventListener("resize",r)});const h=d&&l?m3(d,r):null;let m=-1,f=null;o&&(f=new ResizeObserver(g=>{let[v]=g;v&&v.target===d&&f&&(f.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),r()}),d&&!c&&f.observe(d),f.observe(t));let y,x=c?La(e):null;c&&b();function b(){const g=La(e);x&&!R2(x,g)&&r(),x=g,y=requestAnimationFrame(b)}return r(),()=>{var g;u.forEach(v=>{s&&v.removeEventListener("scroll",r),a&&v.removeEventListener("resize",r)}),h==null||h(),(g=f)==null||g.disconnect(),f=null,c&&cancelAnimationFrame(y)}}const p3=F5,g3=B5,y3=D5,x3=V5,v3=L5,Nj=M5,w3=U5,b3=(e,t,r)=>{const n=new Map,s={platform:h3,...r},a={...s.platform,_c:n};return O5(e,t,{...s,platform:a})};var j3=typeof document<"u",k3=function(){},uh=j3?p.useLayoutEffect:k3;function Jh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Jh(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const a=s[n];if(!(a==="_owner"&&e.$$typeof)&&!Jh(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function P2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Cj(e,t){const r=P2(e);return Math.round(t*r)/r}function Cp(e){const t=p.useRef(e);return uh(()=>{t.current=e}),t}function S3(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[u,h]=p.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,f]=p.useState(n);Jh(m,n)||f(n);const[y,x]=p.useState(null),[b,g]=p.useState(null),v=p.useCallback(R=>{R!==S.current&&(S.current=R,x(R))},[]),w=p.useCallback(R=>{R!==_.current&&(_.current=R,g(R))},[]),j=a||y,k=o||b,S=p.useRef(null),_=p.useRef(null),N=p.useRef(u),T=c!=null,P=Cp(c),A=Cp(s),M=Cp(d),z=p.useCallback(()=>{if(!S.current||!_.current)return;const R={placement:t,strategy:r,middleware:m};A.current&&(R.platform=A.current),b3(S.current,_.current,R).then(O=>{const V={...O,isPositioned:M.current!==!1};$.current&&!Jh(N.current,V)&&(N.current=V,qa.flushSync(()=>{h(V)}))})},[m,t,r,A,M]);uh(()=>{d===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,h(R=>({...R,isPositioned:!1})))},[d]);const $=p.useRef(!1);uh(()=>($.current=!0,()=>{$.current=!1}),[]),uh(()=>{if(j&&(S.current=j),k&&(_.current=k),j&&k){if(P.current)return P.current(j,k,z);z()}},[j,k,z,P,T]);const ae=p.useMemo(()=>({reference:S,floating:_,setReference:v,setFloating:w}),[v,w]),W=p.useMemo(()=>({reference:j,floating:k}),[j,k]),q=p.useMemo(()=>{const R={position:r,left:0,top:0};if(!W.floating)return R;const O=Cj(W.floating,u.x),V=Cj(W.floating,u.y);return l?{...R,transform:"translate("+O+"px, "+V+"px)",...P2(W.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:V}},[r,l,W.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:z,refs:ae,elements:W,floatingStyles:q}),[u,z,ae,W,q])}const _3=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Nj({element:n.current,padding:s}).fn(r):{}:n?Nj({element:n,padding:s}).fn(r):{}}}},N3=(e,t)=>({...p3(e),options:[e,t]}),C3=(e,t)=>({...g3(e),options:[e,t]}),A3=(e,t)=>({...w3(e),options:[e,t]}),T3=(e,t)=>({...y3(e),options:[e,t]}),E3=(e,t)=>({...x3(e),options:[e,t]}),R3=(e,t)=>({...v3(e),options:[e,t]}),P3=(e,t)=>({..._3(e),options:[e,t]});var I3="Arrow",I2=p.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...a}=e;return i.jsx(le.svg,{...a,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});I2.displayName=I3;var O3=I2;function cw(e){const[t,r]=p.useState(void 0);return wt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let o,l;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;o=d.inlineSize,l=d.blockSize}else o=e.offsetWidth,l=e.offsetHeight;r({width:o,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var dw="Popper",[O2,sf]=wr(dw),[M3,M2]=O2(dw),D2=e=>{const{__scopePopper:t,children:r}=e,[n,s]=p.useState(null);return i.jsx(M3,{scope:t,anchor:n,onAnchorChange:s,children:r})};D2.displayName=dw;var L2="PopperAnchor",$2=p.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,a=M2(L2,r),o=p.useRef(null),l=Le(t,o);return p.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:i.jsx(le.div,{...s,ref:l})});$2.displayName=L2;var uw="PopperContent",[D3,L3]=O2(uw),F2=p.forwardRef((e,t)=>{var Y,Fe,nt,Te,_e,Ae;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:a="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:f="optimized",onPlaced:y,...x}=e,b=M2(uw,r),[g,v]=p.useState(null),w=Le(t,_t=>v(_t)),[j,k]=p.useState(null),S=cw(j),_=(S==null?void 0:S.width)??0,N=(S==null?void 0:S.height)??0,T=n+(a!=="center"?"-"+a:""),P=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},A=Array.isArray(d)?d:[d],M=A.length>0,z={padding:P,boundary:A.filter(F3),altBoundary:M},{refs:$,floatingStyles:ae,placement:W,isPositioned:q,middlewareData:R}=S3({strategy:"fixed",placement:T,whileElementsMounted:(..._t)=>f3(..._t,{animationFrame:f==="always"}),elements:{reference:b.anchor},middleware:[N3({mainAxis:s+N,alignmentAxis:o}),c&&C3({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?A3():void 0,...z}),c&&T3({...z}),E3({...z,apply:({elements:_t,rects:It,availableWidth:Gr,availableHeight:cr})=>{const{width:Zn,height:qi}=It.reference,Ls=_t.floating.style;Ls.setProperty("--radix-popper-available-width",`${Gr}px`),Ls.setProperty("--radix-popper-available-height",`${cr}px`),Ls.setProperty("--radix-popper-anchor-width",`${Zn}px`),Ls.setProperty("--radix-popper-anchor-height",`${qi}px`)}}),j&&P3({element:j,padding:l}),B3({arrowWidth:_,arrowHeight:N}),m&&R3({strategy:"referenceHidden",...z})]}),[O,V]=V2(W),he=Tr(y);wt(()=>{q&&(he==null||he())},[q,he]);const ne=(Y=R.arrow)==null?void 0:Y.x,xe=(Fe=R.arrow)==null?void 0:Fe.y,me=((nt=R.arrow)==null?void 0:nt.centerOffset)!==0,[We,Ze]=p.useState();return wt(()=>{g&&Ze(window.getComputedStyle(g).zIndex)},[g]),i.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:q?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:We,"--radix-popper-transform-origin":[(Te=R.transformOrigin)==null?void 0:Te.x,(_e=R.transformOrigin)==null?void 0:_e.y].join(" "),...((Ae=R.hide)==null?void 0:Ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(D3,{scope:r,placedSide:O,onArrowChange:k,arrowX:ne,arrowY:xe,shouldHideArrow:me,children:i.jsx(le.div,{"data-side":O,"data-align":V,...x,ref:w,style:{...x.style,animation:q?void 0:"none"}})})})});F2.displayName=uw;var B2="PopperArrow",$3={top:"bottom",right:"left",bottom:"top",left:"r
441ight"},U2=p.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,a=L3(B2,n),o=$3[a.placedSide];return i.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:i.jsx(O3,{...s,ref:r,style:{...s.style,display:"block"}})})});U2.displayName=B2;function F3(e){return e!==null}var B3=e=>({name:"transformOrigin",options:e,fn(t){var b,g,v;const{placement:r,rects:n,middlewareData:s}=t,o=((b=s.arrow)==null?void 0:b.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[d,u]=V2(r),h={start:"0%",center:"50%",end:"100%"}[u],m=(((g=s.arrow)==null?void 0:g.x)??0)+l/2,f=(((v=s.arrow)==null?void 0:v.y)??0)+c/2;let y="",x="";return d==="bottom"?(y=o?h:`${m}px`,x=`${-c}px`):d==="top"?(y=o?h:`${m}px`,x=`${n.floating.height+c}px`):d==="right"?(y=`${-c}px`,x=o?h:`${f}px`):d==="left"&&(y=`${n.floating.width+c}px`,x=o?h:`${f}px`),{data:{x:y,y:x}}}});function V2(e){const[t,r="center"]=e.split("-");return[t,r]}var U3=D2,H2=$2,z2=F2,W2=U2,[af,JQ]=wr("Tooltip",[sf]),hw=sf(),q2="TooltipProvider",V3=700,Aj="tooltip.open",[H3,G2]=af(q2),K2=e=>{const{__scopeTooltip:t,delayDuration:r=V3,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:a}=e,o=p.useRef(!0),l=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),i.jsx(H3,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:p.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:p.useCallback(d=>{l.current=d},[]),disableHoverableContent:s,children:a})};K2.displayName=q2;var Y2="Tooltip",[QQ,of]=af(Y2),Ry="TooltipTrigger",z3=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=of(Ry,r),a=G2(Ry,r),o=hw(r),l=p.useRef(null),c=Le(t,l,s.onTriggerChange),d=p.useRef(!1),u=p.useRef(!1),h=p.useCallback(()=>d.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),i.jsx(H2,{asChild:!0,...o,children:i.jsx(le.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:c,onPointerMove:de(e.onPointerMove,m=>{m.pointerType!=="touch"&&!u.current&&!a.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:de(e.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:de(e.onPointerDown,()=>{s.open&&s.onClose(),d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:de(e.onFocus,()=>{d.current||s.onOpen()}),onBlur:de(e.onBlur,s.onClose),onClick:de(e.onClick,s.onClose)})})});z3.displayName=Ry;var W3="TooltipPortal",[ZQ,q3]=af(W3,{forceMount:void 0}),xl="TooltipContent",J2=p.forwardRef((e,t)=>{const r=q3(xl,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...a}=e,o=of(xl,e.__scopeTooltip);return i.jsx(Rs,{present:n||o.open,children:o.disableHoverableContent?i.jsx(Q2,{side:s,...a,ref:t}):i.jsx(G3,{side:s,...a,ref:t})})}),G3=p.forwardRef((e,t)=>{const r=of(xl,e.__scopeTooltip),n=G2(xl,e.__scopeTooltip),s=p.useRef(null),a=Le(t,s),[o,l]=p.useState(null),{trigger:c,onClose:d}=r,u=s.current,{onPointerInTransitChange:h}=n,m=p.useCallback(()=>{l(null),h(!1)},[h]),f=p.useCallback((y,x)=>{const b=y.currentTarget,g={x:y.clientX,y:y.clientY},v=Z3(g,b.getBoundingClientRect()),w=X3(g,v),j=e$(x.getBoundingClientRect()),k=r$([...w,...j]);l(k),h(!0)},[h]);return p.useEffect(()=>()=>m(),[m]),p.useEffect(()=>{if(c&&u){const y=b=>f(b,u),x=b=>f(b,c);return c.addEventListener("pointerleave",y),u.addEventListener("pointerleave",x),()=>{c.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",x)}}},[c,u,f,m]),p.useEffect(()=>{if(o){const y=x=>{const b=x.target,g={x:x.clientX,y:x.clientY},v=(c==null?void 0:c.contains(b))||(u==null?void 0:u.contains(b)),w=!t$(g,o);v?m():w&&(m(),d())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,u,o,d,m]),i.jsx(Q2,{...e,ref:a})}),[K3,Y3]=af(Y2,{isInside:!1}),J3=LM("TooltipContent"),Q2=p.forwardRef((e,t)=>
vendor: 4,097 bytes, line 441
441{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:a,onPointerDownOutside:o,...l}=e,c=of(xl,r),d=hw(r),{onClose:u}=c;return p.useEffect(()=>(document.addEventListener(Aj,u),()=>document.removeEventListener(Aj,u)),[u]),p.useEffect(()=>{if(c.trigger){const h=m=>{const f=m.target;f!=null&&f.contains(c.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,u]),i.jsx(zd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:u,children:i.jsxs(z2,{"data-state":c.stateAttribute,...d,...l,ref:t,style:{...l.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:[i.jsx(J3,{children:n}),i.jsx(K3,{scope:r,isInside:!0,children:i.jsx(iD,{id:c.contentId,role:"tooltip",children:s||n})})]})})});J2.displayName=xl;var Z2="TooltipArrow",Q3=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=hw(r);return Y3(Z2,r).isInside?null:i.jsx(W2,{...s,...n,ref:t})});Q3.displayName=Z2;function Z3(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,s,a)){case a:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function X3(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function e$(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function t$(e,t){const{x:r,y:n}=e;let s=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const l=t[a],c=t[o],d=l.x,u=l.y,h=c.x,m=c.y;u>n!=m>n&&r<(h-d)*(n-u)/(m-u)+d&&(s=!s)}return s}function r$(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),n$(t)}function n$(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(s.y-o.y)>=(a.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const a=r[r.length-1],o=r[r.length-2];if((a.x-o.x)*(s.y-o.y)>=(a.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var s$=K2,X2=J2;const i$=s$,a$=p.forwardRef(({className:e,sideOffset:t=4,...r},n)=>i.jsx(X2,{ref:n,sideOffset:t,className:Q("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]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));a$.displayName=X2.displayName;var Gd=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(){}},$a=typeof window>"u"||"Deno"in globalThis;function mr(){}function o$(e,t){return typeof e=="function"?e(t):e}function Py(e){return typeof e=="number"&&e>=0&&e!==1/0}function eA(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Si(e,t){return typeof e=="function"?e(t):e}function Lr(e,t){return typeof e=="function"?e(t):e}function Tj(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:a,queryKey:o,stale:l}=e;
vendor: 14,890 bytes, line 441
441if(o){if(n){if(t.queryHash!==mw(o,t.options))return!1}else if(!md(t.queryKey,o))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||a&&!a(t))}function Ej(e,t){const{exact:r,status:n,predicate:s,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(hd(t.options.mutationKey)!==hd(a))return!1}else if(!md(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function mw(e,t){return((t==null?void 0:t.queryKeyHashFn)||hd)(e)}function hd(e){return JSON.stringify(e,(t,r)=>Oy(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function md(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>md(e[r],t[r])):!1}function tA(e,t){if(e===t)return e;const r=Rj(e)&&Rj(t);if(r||Oy(e)&&Oy(t)){const n=r?e:Object.keys(e),s=n.length,a=r?t:Object.keys(t),o=a.length,l=r?[]:{},c=new Set(n);let d=0;for(let u=0;u<o;u++){const h=r?u:a[u];(!r&&c.has(h)||r)&&e[h]===void 0&&t[h]===void 0?(l[h]=void 0,d++):(l[h]=tA(e[h],t[h]),l[h]===e[h]&&e[h]!==void 0&&d++)}return s===o&&d===s?e:l}return t}function Iy(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Rj(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Oy(e){if(!Pj(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Pj(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Pj(e){return Object.prototype.toString.call(e)==="[object Object]"}function l$(e){return new Promise(t=>{setTimeout(t,e)})}function My(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?tA(e,t):t}function c$(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function d$(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var fw=Symbol();function rA(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===fw?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function u$(e,t){return typeof e=="function"?e(...t):!!e}var ma,ti,Jo,t_,h$=(t_=class extends Gd{constructor(){super();ge(this,ma);ge(this,ti);ge(this,Jo);X(this,Jo,t=>{if(!$a&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){C(this,ti)||this.setEventListener(C(this,Jo))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,ti))==null||t.call(this),X(this,ti,void 0))}setEventListener(t){var r;X(this,Jo,t),(r=C(this,ti))==null||r.call(this),X(this,ti,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){C(this,ma)!==t&&(X(this,ma,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof C(this,ma)=="boolean"?C(this,ma):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ma=new WeakMap,ti=new WeakMap,Jo=new WeakMap,t_),pw=new h$,Qo,ri,Zo,r_,m$=(r_=class extends Gd{constructor(){super();ge(this,Qo,!0);ge(this,ri);ge(this,Zo);X(this,Zo,t=>{if(!$a&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){C(this,ri)||this.setEventListener(C(this,Zo))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,ri))==null||t.call(this),X(this,ri,void 0))}setEventListener(t){var r;X(this,Zo,t),(r=C(this,ri))==null||r.call(this),X(this,ri,t(this.setOnline.bind(this)))}setOnline(t){C(this,Qo)!==t&&(X(this,Qo,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return C(this,Qo)}},Qo=new WeakMap,ri=new WeakMap,Zo=new WeakMap,r_),Qh=new m$;function Dy(){let e,t;const r=new Promise((s,a)=>{e=s,t=a});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function f$(e){return Math.min(1e3*2**e,3e4)}function nA(e){return(e??"online")==="online"?Qh.isOnline():!0}var sA=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ap(e){return e instanceof sA}function iA(e){let t=!1,r=0,n=!1,s;const a=Dy(),o=x=>{var b;n||(m(new sA(x)),(b=e.abort)==null||b.call(e))},l=()=>{t=!0},c=()=>{t=!1},d=()=>pw.isFocused()&&(e.networkMode==="always"||Qh.isOnline())&&e.canRun(),u=()=>nA(e.networkMode)&&e.canRun(),h=x=>{var b;n||(n=!0,(b=e.onSuccess)==null||b.call(e,x),s==null||s(),a.resolve(x))},m=x=>{var b;n||(n=!0,(b=e.onError)==null||b.call(e,x),s==null||s(),a.reject(x))},f=()=>new Promise(x=>{var b;s=g=>{(n||d())&&x(g)},(b=e.onPause)==null||b.call(e)}).then(()=>{var x;s=void 0,n||(x=e.onContinue)==null||x.call(e)}),y=()=>{if(n)return;let x;const b=r===0?e.initialPromise:void 0;try{x=b??e.fn()}catch(g){x=Promise.reject(g)}Promise.resolve(x).then(h).catch(g=>{var S;if(n)return;const v=e.retry??($a?0:3),w=e.retryDelay??f$,j=typeof w=="function"?w(r,g):w,k=v===!0||typeof v=="number"&&r<v||typeof v=="function"&&v(r,g);if(t||!k){m(g);return}r++,(S=e.onFail)==null||S.call(e,r,g),l$(j).then(()=>d()?void 0:f()).then(()=>{t?m(g):y()})})};return{promise:a,cancel:o,continue:()=>(s==null||s(),a),cancelRetry:l,continueRetry:c,canStart:u,start:()=>(u()?y():f().then(y),a)}}var p$=e=>setTimeout(e,0);function g$(){let e=[],t=0,r=l=>{l()},n=l=>{l()},s=p$;const a=l=>{t?e.push(l):s(()=>{r(l)})},o=()=>{const l=e;e=[],l.length&&s(()=>{n(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{a(()=>{l(...c)})},schedule:a,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{s=l}}}var Lt=g$(),fa,n_,aA=(n_=class{constructor(){ge(this,fa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Py(this.gcTime)&&X(this,fa,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??($a?1/0:5*60*1e3))}clearGcTimeout(){C(this,fa)&&(clearTimeout(C(this,fa)),X(this,fa,void 0))}},fa=new WeakMap,n_),Xo,pa,Mr,ga,qt,Od,ya,ln,ns,s_,y$=(s_=class extends aA{constructor(t){super();ge(this,ln);ge(this,Xo);ge(this,pa);ge(this,Mr);ge(this,ga);ge(this,qt);ge(this,Od);ge(this,ya);X(this,ya,!1),X(this,Od,t.defaultOptions),this.setOptions(t.options),this.observers=[],X(this,ga,t.client),X(this,Mr,C(this,ga).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,X(this,Xo,x$(this.options)),this.state=t.state??C(this,Xo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,qt))==null?void 0:t.promise}setOptions(t){this.options={...C(this,Od),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,Mr).remove(this)}setData(t,r){const n=My(this.state.data,t,this.options);return Ee(this,ln,ns).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Ee(this,ln,ns).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=C(this,qt))==null?void 0:n.promise;return(s=C(this,qt))==null||s.cancel(t),r?r.then(mr).catch(mr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Xo))}isActive(){return this.observers.some(t=>Lr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fw||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Si(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:!eA(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=C(this,qt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=C(this,qt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,Mr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(C(this,qt)&&(C(this,ya)?C(this,qt).cancel({revert:!0}):C(this,qt).cancelRetry()),this.scheduleGc()),C(this,Mr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ee(this,ln,ns).call(this,{type:"invalidate"})}fetch(t,r){var d,u,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(C(this,qt))return C(this,qt).continueRetry(),C(this,qt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(f=>f.options.queryFn);m&&this.setOptions(m.options)}const n=new AbortController,s=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(X(this,ya,!0),n.signal)})},a=()=>{const m=rA(this.options,r),y=(()=>{const x={client:C(this,ga),queryKey:this.queryKey,meta:this.meta};return s(x),x})();return X(this,ya,!1),this.options.persister?this.options.persister(m,y,this):m(y)},l=(()=>{const m={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:C(this,ga),state:this.state,fetchFn:a};return s(m),m})();(d=this.options.behavior)==null||d.onFetch(l,this),X(this,pa,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=l.fetchOptions)==null?void 0:u.meta))&&Ee(this,ln,ns).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta});const c=m=>{var f,y,x,b;Ap(m)&&m.silent||Ee(this,ln,ns).call(this,{type:"error",error:m}),Ap(m)||((y=(f=C(this,Mr).config).onError)==null||y.call(f,m,this),(b=(x=C(this,Mr).config).onSettled)==null||b.call(x,this.state.data,m,this)),this.scheduleGc()};return X(this,qt,iA({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,abort:n.abort.bind(n),onSuccess:m=>{var f,y,x,b;if(m===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(g){c(g);return}(y=(f=C(this,Mr).config).onSuccess)==null||y.call(f,m,this),(b=(x=C(this,Mr).config).onSettled)==null||b.call(x,m,this.state.error,this),this.scheduleGc()},onError:c,onFail:(m,f)=>{Ee(this,ln,ns).call(this,{type:"failed",failureCount:m,error:f})},onPause:()=>{Ee(this,ln,ns).call(this,{type:"pause"})},onContinue:()=>{Ee(this,ln,ns).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),C(this,qt).start()}},Xo=new WeakMap,pa=new WeakMap,Mr=new WeakMap,ga=new WeakMap,qt=new WeakMap,Od=new WeakMap,ya=new WeakMap,ln=new WeakSet,ns=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...oA(n.data,this.options),fetchMeta:t.meta??null};case"success":return X(this,pa,void 0),{...n,data:t.data,dataUpdateCount:n.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 Ap(s)&&s.revert&&C(this,pa)?{...C(this,pa),fetchStatus:"idle"}:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Lt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),C(this,Mr).notify({query:this,type:"updated",action:t})})},s_);function oA(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nA(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function x$(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var En,i_,v$=(i_=class extends Gd{constructor(t={}){super();ge(this,En);this.config=t,X(this,En,new Map)}build(t,r,n){const s=r.queryKey,a=r.queryHash??mw(s,r);let o=this.get(a);return o||(o=new y$({client:t,queryKey:s,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){C(this,En).has(t.queryHash)||(C(this,En).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=C(this,En).get(t.queryHash);r&&(t.destroy(),r===t&&C(this,En).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Lt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,En).get(t)}getAll(){return[...C(this,En).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Tj(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Tj(t,n)):r}notify(t){Lt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Lt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Lt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},En=new WeakMap,i_),Rn,er,xa,Pn,zs,a_,w$=(a_=class extends aA{constructor(t){super();ge(this,Pn);ge(this,Rn);ge(this,er);ge(this,xa);this.mutationId=t.mutationId,X(this,er,t.mutationCache),X(this,Rn,[]),this.state=t.state||b$(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,Rn).includes(t)||(C(this,Rn).push(t),this.clearGcTimeout(),C(this,er).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){X(this,Rn,C(this,Rn).filter(r=>r!==t)),this.scheduleGc(),C(this,er).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,Rn).length||(this.state.status==="pending"?this.scheduleGc():C(this,er).remove(this))}continue(){var t;return((t=C(this,xa))==null?void 0:t.continue())??this.execute(this.state.variables)}
441async execute(t){var a,o,l,c,d,u,h,m,f,y,x,b,g,v,w,j,k,S,_,N;const r=()=>{Ee(this,Pn,zs).call(this,{type:"continue"})};X(this,xa,iA({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(T,P)=>{Ee(this,Pn,zs).call(this,{type:"failed",failureCount:T,error:P})},onPause:()=>{Ee(this,Pn,zs).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,er).canRun(this)}));const n=this.state.status==="pending",s=!C(this,xa).canStart();try{if(n)r();else{Ee(this,Pn,zs).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(a=C(this,er).config).onMutate)==null?void 0:o.call(a,t,this));const P=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));P!==this.state.context&&Ee(this,Pn,zs).call(this,{type:"pending",context:P,variables:t,isPaused:s})}const T=await C(this,xa).start();return await((u=(d=C(this,er).config).onSuccess)==null?void 0:u.call(d,T,t,this.state.context,this)),await((m=(h=this.options).onSuccess)==null?void 0:m.call(h,T,t,this.state.context)),await((y=(f=C(this,er).config).onSettled)==null?void 0:y.call(f,T,null,this.state.variables,this.state.context,this)),await((b=(x=this.options).onSettled)==null?void 0:b.call(x,T,null,t,this.state.context)),Ee(this,Pn,zs).call(this,{type:"success",data:T}),T}catch(T){try{throw await((v=(g=C(this,er).config).onError)==null?void 0:v.call(g,T,t,this.state.context,this)),await((j=(w=this.options).onError)==null?void 0:j.call(w,T,t,this.state.context)),await((S=(k=C(this,er).config).onSettled)==null?void 0:S.call(k,void 0,T,this.state.variables,this.state.context,this)),await((N=(_=this.options).onSettled)==null?void 0:N.call(_,void 0,T,t,this.state.context)),T}finally{Ee(this,Pn,zs).call(this,{type:"error",error:T})}}finally{C(this,er).runNext(this)}}},Rn=new WeakMap,er=new WeakMap,xa=new WeakMap,Pn=new WeakSet,zs=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Lt.batch(()=>{C(this,Rn).forEach(n=>{n.onMutationUpdate(t)}),C(this,er).notify({mutation:this,type:"updated",action:t})})},a_);function b$(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var cs,cn,Md,o_,j$=(o_=class extends Gd{constructor(t={}){super();ge(this,cs);ge(this,cn);ge(this,Md);this.config=t,X(this,cs,new Set),X(this,cn,new Map),X(this,Md,0)}build(t,r,n){const s=new w$({mutationCache:this,mutationId:++iu(this,Md)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){C(this,cs).add(t);const r=Au(t);if(typeof r=="string"){const n=C(this,cn).get(r);n?n.push(t):C(this,cn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,cs).delete(t)){const r=Au(t);if(typeof r=="string"){const n=C(this,cn).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&C(this,cn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Au(t);if(typeof r=="string"){const n=C(this,cn).get(r),s=n==null?void 0:n.find(a=>a.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=Au(t);if(typeof r=="string"){const s=(n=C(this,cn).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Lt.batch(()=>{C(this,cs).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,cs).clear(),C(this,cn).clear()})}getAll(){return Array.from(C(this,cs))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Ej(r,n))}findAll(t={}){return this.getAll().filter(r=>Ej(t,r))}notify(t){Lt.batch(()=>
vendor: 14,841 bytes, line 441
441{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Lt.batch(()=>Promise.all(t.map(r=>r.continue().catch(mr))))}},cs=new WeakMap,cn=new WeakMap,Md=new WeakMap,o_);function Au(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ij(e){return{onFetch:(t,r)=>{var u,h,m,f,y;const n=t.options,s=(m=(h=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,a=((f=t.state.data)==null?void 0:f.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const d=async()=>{let x=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},g=rA(t.options,t.fetchOptions),v=async(w,j,k)=>{if(x)return Promise.reject();if(j==null&&w.pages.length)return Promise.resolve(w);const _=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:j,direction:k?"backward":"forward",meta:t.options.meta};return b(A),A})(),N=await g(_),{maxPages:T}=t.options,P=k?d$:c$;return{pages:P(w.pages,N,T),pageParams:P(w.pageParams,j,T)}};if(s&&a.length){const w=s==="backward",j=w?k$:Oj,k={pages:a,pageParams:o},S=j(n,k);l=await v(k,S,w)}else{const w=e??a.length;do{const j=c===0?o[0]??n.initialPageParam:Oj(n,l);if(c>0&&j==null)break;l=await v(l,j),c++}while(c<w)}return l};t.options.persister?t.fetchFn=()=>{var x,b;return(b=(x=t.options).persister)==null?void 0:b.call(x,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function Oj(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function k$(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var mt,ni,si,el,tl,ii,rl,nl,l_,S$=(l_=class{constructor(e={}){ge(this,mt);ge(this,ni);ge(this,si);ge(this,el);ge(this,tl);ge(this,ii);ge(this,rl);ge(this,nl);X(this,mt,e.queryCache||new v$),X(this,ni,e.mutationCache||new j$),X(this,si,e.defaultOptions||{}),X(this,el,new Map),X(this,tl,new Map),X(this,ii,0)}mount(){iu(this,ii)._++,C(this,ii)===1&&(X(this,rl,pw.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,mt).onFocus())})),X(this,nl,Qh.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,mt).onOnline())})))}unmount(){var e,t;iu(this,ii)._--,C(this,ii)===0&&((e=C(this,rl))==null||e.call(this),X(this,rl,void 0),(t=C(this,nl))==null||t.call(this),X(this,nl,void 0))}isFetching(e){return C(this,mt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,ni).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=C(this,mt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=C(this,mt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Si(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return C(this,mt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=C(this,mt).get(n.queryHash),a=s==null?void 0:s.state.data,o=o$(t,a);if(o!==void 0)return C(this,mt).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Lt.batch(()=>C(this,mt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=C(this,mt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=C(this,mt);Lt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=C(this,mt);return Lt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Lt.batch(()=>C(this,mt).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(mr).catch(mr)}invalidateQueries(e,t={}){return Lt.batch(()=>(C(this,mt).findAll(e).forEach(r=>{r.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 r={...t,cancelRefetch:t.cancelRefetch??!0},n=Lt.batch(()=>C(this,mt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let a=s.fetch(void 0,r);return r.throwOnError||(a=a.catch(mr)),s.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(mr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=C(this,mt).build(this,t);return r.isStaleByTime(Si(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(mr).catch(mr)}fetchInfiniteQuery(e){return e.behavior=Ij(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(mr).catch(mr)}ensureInfiniteQueryData(e){return e.behavior=Ij(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Qh.isOnline()?C(this,ni).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,mt)}getMutationCache(){return C(this,ni)}getDefaultOptions(){return C(this,si)}setDefaultOptions(e){X(this,si,e)}setQueryDefaults(e,t){C(this,el).set(hd(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,el).values()],r={};return t.forEach(n=>{md(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){C(this,tl).set(hd(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,tl).values()],r={};return t.forEach(n=>{md(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,si).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=mw(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===fw&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,si).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,mt).clear(),C(this,ni).clear()}},mt=new WeakMap,ni=new WeakMap,si=new WeakMap,el=new WeakMap,tl=new WeakMap,ii=new WeakMap,rl=new WeakMap,nl=new WeakMap,l_),ur,Re,Dd,tr,va,sl,ai,oi,Ld,il,al,wa,ba,li,ol,Ue,bc,Ly,$y,Fy,By,Uy,Vy,Hy,lA,c_,_$=(c_=class extends Gd{constructor(t,r){super();ge(this,Ue);ge(this,ur);ge(this,Re);ge(this,Dd);ge(this,tr);ge(this,va);ge(this,sl);ge(this,ai);ge(this,oi);ge(this,Ld);ge(this,il);ge(this,al);ge(this,wa);ge(this,ba);ge(this,li);ge(this,ol,new Set);this.options=r,X(this,ur,t),X(this,oi,null),X(this,ai,Dy()),this.options.experimental_prefetchInRender||C(this,ai).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,Re).addObserver(this),Mj(C(this,Re),this.options)?Ee(this,Ue,bc).call(this):this.updateResult(),Ee(this,Ue,By).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zy(C(this,Re),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zy(C(this,Re),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ee(this,Ue,Uy).call(this),Ee(this,Ue,Vy).call(this),C(this,Re).removeObserver(this)}setOptions(t){const r=this.options,n=C(this,Re);if(this.options=C(this,ur).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Lr(this.options.enabled,C(this,Re))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ee(this,Ue,Hy).call(this),C(this,Re).setOptions(this.options),r._defaulted&&!Iy(this.options,r)&&C(this,ur).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,Re),observer:this});const s=this.hasListeners();s&&Dj(C(this,Re),n,this.options,r)&&Ee(this,Ue,bc).call(this),this.updateResult(),s&&(C(this,Re)!==n||Lr(this.options.enabled,C(this,Re))!==Lr(r.enabled,C(this,Re))||Si(this.options.staleTime,C(this,Re))!==Si(r.staleTime,C(this,Re)))&&Ee(this,Ue,Ly).call(this);const a=Ee(this,Ue,$y).call(this);s&&(C(this,Re)!==n||Lr(this.options.enabled,C(this,Re))!==Lr(r.enabled,C(this,Re))||a!==C(this,li))&&Ee(this,Ue,Fy).call(this,a)}getOptimisticResult(t){const r=C(this,ur).getQueryCache().build(C(this,ur),t),n=this.createResult(r,t);return C$(this,n)&&(X(this,tr,n),X(this,sl,this.options),X(this,va,C(this,Re).state)),n}getCurrentResult(){return C(this,tr)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),Reflect.get(n,s))})}trackProp(t){C(this,ol).add(t)}getCurrentQuery(){return C(this,Re)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=C(this,ur).defaultQueryOptions(t),n=C(this,ur).getQueryCache().build(C(this,ur),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Ee(this,Ue,bc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,tr)))}createResult(t,r){var T;const n=C(this,Re),s=this.options,a=C(this,tr),o=C(this,va),l=C(this,sl),d=t!==n?t.state:C(this,Dd),{state:u}=t;let h={...u},m=!1,f;if(r._optimisticResults){const P=this.hasListeners(),A=!P&&Mj(t,r),M=P&&Dj(t,n,r,s);(A||M)&&(h={...h,...oA(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:y,errorUpdatedAt:x,status:b}=h;f=h.data;let g=!1;if(r.placeholderData!==void 0&&f===void 0&&b==="pending"){let P;a!=null&&a.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(P=a.data,g=!0):P=typeof r.placeholderData=="function"?r.placeholderData((T=C(this,al))==null?void 0:T.state.data,C(this,al)):r.placeholderData,P!==void 0&&(b="success",f=My(a==null?void 0:a.data,P,r),m=!0)}if(r.select&&f!==void 0&&!g)if(a&&f===(o==null?void 0:o.data)&&r.select===C(this,Ld))f=C(this,il);else try{X(this,Ld,r.select),f=r.select(f),f=My(a==null?void 0:a.data,f,r),X(this,il,f),X(this,oi,null)}catch(P){X(this,oi,P)}C(this,oi)&&(y=C(this,oi),f=C(this,il),x=Date.now(),b="error");const v=h.fetchStatus==="fetching",w=b==="pending",j=b==="error",k=w&&v,S=f!==void 0,N={status:b,fetchStatus:h.fetchStatus,isPending:w,isSuccess:b==="success",isError:j,isInitialLoading:k,isLoading:k,data:f,dataUpdatedAt:h.dataUpdatedAt,error:y,errorUpdatedAt:x,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>d.dataUpdateCount||h.errorUpdateCount>d.errorUpdateCount,isFetching:v,isRefetching:v&&!w,isLoadingError:j&&!S,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:j&&S,isStale:gw(t,r),refetch:this.refetch,promise:C(this,ai),isEnabled:Lr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=z=>{N.status==="error"?z.reject(N.error):N.data!==void 0&&z.resolve(N.data)},A=()=>{const z=X(this,ai,N.promise=Dy());P(z)},M=C(this,ai);switch(M.status){case"pending":t.queryHash===n.queryHash&&P(M);break;case"fulfilled":(N.status==="error"||N.data!==M.value)&&A();break;case"rejected":(N.status!=="error"||N.error!==M.reason)&&A();break}}return N}updateResult(){const t=C(this,tr),r=this.createResult(C(this,Re),this.options);if(X(this,va,C(this,Re).state),X(this,sl,this.options),C(this,va).data!==void 0&&X(this,al,C(this,Re)),Iy(r,t))return;X(this,tr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!C(this,ol).size)return!0;const o=new Set(a??C(this,ol));return this.options.throwOnError&&o.add("error"),Object.keys(C(this,tr)).some(l=>{const c=l;return C(this,tr)[c]!==t[c]&&o.has(c)})};Ee(this,Ue,lA).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ee(this,Ue,By).call(this)}},ur=new WeakMap,Re=new WeakMap,Dd=new WeakMap,tr=new WeakMap,va=new WeakMap,sl=new WeakMap,ai=new WeakMap,oi=new WeakMap,Ld=new WeakMap,il=new WeakMap,al=new WeakMap,wa=new WeakMap,ba=new WeakMap,li=new WeakMap,ol=new WeakMap,Ue=new WeakSet,bc=function(t){Ee(this,Ue,Hy).call(this);let r=C(this,Re).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(mr)),r},Ly=function(){Ee(this,Ue,Uy).call(this);const t=Si(this.options.staleTime,C(this,Re));if($a||C(this,tr).isStale||!Py(t))return;const n=eA(C(this,tr).dataUpdatedAt,t)+1;X(this,wa,setTimeout(()=>{C(this,tr).isStale||this.updateResult()},n))},$y=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,Re)):this.options.refetchInterval)??!1},Fy=function(t){Ee(this,Ue,Vy).call(this),X(this,li,t),!($a||Lr(this.options.enabled,C(this,Re))===!1||!Py(C(this,li))||C(this,li)===0)&&X(this,ba,setInterval(()=>{(this.options.refetchIntervalInBackground||pw.isFocused())&&Ee(this,Ue,bc).call(this)},C(this,li)))},By=function(){Ee(this,Ue,Ly).call(this),Ee(this,Ue,Fy).call(this,Ee(this,Ue,$y).call(this))},Uy=function(){C(this,wa)&&(clearTimeout(C(this,wa)),X(this,wa,void 0))},Vy=function(){C(this,ba)&&(clearInterval(C(this,ba)),X(this,ba,void 0))},Hy=function(){const t=C(this,ur).getQueryCache().build(C(this,ur),this.options);if(t===C(this,Re))return;const r=C(this,Re);X(this,Re,t),X(this,Dd,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},lA=function(t){Lt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(C(this,tr))}),C(this,ur).getQueryCache().notify({query:C(this,Re),type:"observerResultsUpdated"})})},c_);function N$(e,t){return Lr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Mj(e,t){return N$(e,t)||e.state.data!==void 0&&zy(e,t,t.refetchOnMount)}function zy(e,t,r){if(Lr(t.enabled,e)!==!1&&Si(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&gw(e,t)}return!1}function Dj(e,t,r,n){return(e!==t||Lr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&gw(e,r)}function gw(e,t){return Lr(t.enabled,e)!==!1&&e.isStaleByTime(Si(t.staleTime,e))}function C$(e,t){return!Iy(e.getCurrentResult(),t)}var cA=p.createContext(void 0),yw=e=>{const t=p.useContext(cA);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},A$=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),i.jsx(cA.Provider,{value:e,children:t})),dA=p.createContext(!1),T$=()=>p.useContext(dA);dA.Provider;function E$(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
441var R$=p.createContext(E$()),P$=()=>p.useContext(R$),I$=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},O$=e=>{p.useEffect(()=>{e.clearReset()},[e])},M$=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||u$(r,[e.error,n])),D$=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},L$=(e,t)=>e.isLoading&&e.isFetching&&!t,$$=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Lj=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function F$(e,t,r){var h,m,f,y,x;const n=T$(),s=P$(),a=yw(),o=a.defaultQueryOptions(e);(m=(h=a.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||m.call(h,o),o._optimisticResults=n?"isRestoring":"optimistic",D$(o),I$(o,s),O$(s);const l=!a.getQueryCache().get(o.queryHash),[c]=p.useState(()=>new t(a,o)),d=c.getOptimisticResult(o),u=!n&&e.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(b=>{const g=u?c.subscribe(Lt.batchCalls(b)):mr;return c.updateResult(),g},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setOptions(o)},[o,c]),$$(o,d))throw Lj(o,c,s);if(M$({result:d,errorResetBoundary:s,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw d.error;if((y=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||y.call(f,o,d),o.experimental_prefetchInRender&&!$a&&L$(d,n)){const b=l?Lj(o,c,s):(x=a.getQueryCache().get(o.queryHash))==null?void 0:x.promise;b==null||b.catch(mr).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?d:c.trackResult(d)}function hh(e,t){return F$(e,_$)}/** 442 * @remix-run/router v1.23.0 443 * 444 * Copyright (c) Remix Software Inc. 445 * 446 * This source code is licensed under the MIT license found in the 447 * LICENSE.md file in the root directory of this source tree. 448 * 449 * @license MIT 450 */function fd(){return fd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fd.apply(this,arguments)}var ui;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ui||(ui={}));const $j="popstate";function B$(e){e===void 0&&(e={});function t(n,s){let{pathname:a,search:o,hash:l}=n.location;return Wy("",{pathname:a,search:o,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:Zh(s)}return V$(t,r,null,e)}function ut(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function uA(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function U$(){return Math.random().toString(36).substr(2,8)}function Fj(e,t){return{usr:e.state,key:e.key,idx:t}}function Wy(e,t,r,n){return r===void 0&&(r=null),fd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?$l(t):t,{state:r,key:t&&t.key||n||U$()})}function Zh(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function $l(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function V$(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:a=!1}=n,o=s.history,l=ui.Pop,c=null,d=u();d==null&&(d=0,o.replaceState(fd({},o.state,{idx:d}),""));function u(){return(o.state||{idx:null}).idx}function h(){l=ui.Pop;let b=u(),g=b==null?null:b-d;d=b,c&&c({action:l,location:x.location,delta:g})}function m(b,g){l=ui.Push;let v=Wy(x.location,b,g);d=u()+1;let w=Fj(v,d),j=x.createHref(v);try{o.pushState(w,"",j)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(j)}a&&c&&c({action:l,location:x.location,delta:1})}function f(b,g){l=ui.Replace;let v=Wy(x.location,b,g);d=u();let w=Fj(v,d),j=x.createHref(v);o.replaceState(w,"",j),a&&c&&c({action:l,location:x.location,delta:0})}function y(b){let g=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof b=="string"?b:Zh(b);return v=v.replace(/ $/,"%20"),ut(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let x={get action(){return l},get location(){return e(s,o)},listen(b){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener($j,h),c=b,()=>{s.removeEventListener($j,h),c=null}},createHref(b){return t(s,b)},createURL:y,encodeLocation(b){let g=y(b);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:m,replace:f,go(b){return o.go(b)}};return x}var Bj;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Bj||(Bj={}));function H$(e,t,r){return r===void 0&&(r="/"),z$(e,t,r,!1)}function z$(e,t,r,n){let s=typeof t=="string"?$l(t):t,a=vl(s.pathname||"/",r);if(a==null)return null;let o=hA(e);W$(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let d=rF(a);l=eF(o[c],d,n)}return l}function hA(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(a,o,l)=>{let c={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};c.relativePath.startsWith("/")&&(ut(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not val
450id. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let d=_i([n,c.relativePath]),u=r.concat(c);a.children&&a.children.length>0&&(ut(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),hA(a.children,t,u,d)),!(a.path==null&&!a.index)&&t.push({path:d,score:Z$(d,a.index),routesMeta:u})};return e.forEach((a,o)=>{var l;if(a.path===""||!((l=a.path)!=null&&l.includes("?")))s(a,o);else for(let c of mA(a.path))s(a,o,c)}),t}function mA(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return s?[a,""]:[a];let o=mA(n.join("/")),l=[];return l.push(...o.map(c=>c===""?a:[a,c].join("/"))),s&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function W$(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:X$(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const q$=/^:[\w-]+$/,G$=3,K$=2,Y$=1,J$=10,Q$=-2,Uj=e=>e==="*";function Z$(e,t){let r=e.split("/"),n=r.length;return r.some(Uj)&&(n+=Q$),t&&(n+=K$),r.filter(s=>!Uj(s)).reduce((s,a)=>s+(q$.test(a)?G$:a===""?Y$:J$),n)}function X$(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function eF(e,t,r){let{routesMeta:n}=e,s={},a="/",o=[];for(let l=0;l<n.length;++l){let c=n[l],d=l===n.length-1,u=a==="/"?t:t.slice(a.length)||"/",h=Xh({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},u),m=c.route;if(!h&&d&&r&&!n[n.length-1].route.index&&(h=Xh({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},u)),!h)return null;
vendor: 9,390 bytes, lines 450-459
450Object.assign(s,h.params),o.push({params:s,pathname:_i([a,h.pathname]),pathnameBase:aF(_i([a,h.pathnameBase])),route:m}),h.pathnameBase!=="/"&&(a=_i([a,h.pathnameBase]))}return o}function Xh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=tF(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let a=s[0],o=a.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:n.reduce((d,u,h)=>{let{paramName:m,isOptional:f}=u;if(m==="*"){let x=l[h]||"";o=a.slice(0,a.length-x.length).replace(/(.)\/+$/,"$1")}const y=l[h];return f&&!y?d[m]=void 0:d[m]=(y||"").replace(/%2F/g,"/"),d},{}),pathname:a,pathnameBase:o,pattern:e}}function tF(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),uA(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(n.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function rF(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return uA(!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 vl(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function nF(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?$l(e):e;return{pathname:r?r.startsWith("/")?r:sF(r,t):t,search:oF(n),hash:lF(s)}}function sF(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function Tp(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function iF(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function xw(e,t){let r=iF(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function vw(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=$l(e):(s=fd({},e),ut(!s.pathname||!s.pathname.includes("?"),Tp("?","pathname","search",s)),ut(!s.pathname||!s.pathname.includes("#"),Tp("#","pathname","hash",s)),ut(!s.search||!s.search.includes("#"),Tp("#","search","hash",s)));let a=e===""||s.pathname==="",o=a?"/":s.pathname,l;if(o==null)l=r;else{let h=t.length-1;if(!n&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),h-=1;s.pathname=m.join("/")}l=h>=0?t[h]:"/"}let c=nF(s,l),d=o&&o!=="/"&&o.endsWith("/"),u=(a||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(d||u)&&(c.pathname+="/"),c}const _i=e=>e.join("/").replace(/\/\/+/g,"/"),aF=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),oF=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,lF=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function cF(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const fA=["post","put","patch","delete"];new Set(fA);const dF=["get",...fA];new Set(dF);/** 451 * React Router v6.30.1 452 * 453 * Copyright (c) Remix Software Inc. 454 * 455 * This source code is licensed under the MIT license found in the 456 * LICENSE.md file in the root directory of this source tree. 457 * 458 * @license MIT 459 */function pd(){return pd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pd.apply(this,arguments)}const lf=p.createContext(null),pA=p.createContext(null),Is=p.createContext(null),cf=p.createContext(null),Jn=p.createContext({outlet:null,matches:[],isDataRoute:!1}),gA=p.createContext(null);function uF(e,t){let{relative:r}=t===void 0?{}:t;Fl()||ut(!1);let{basename:n,navigator:s}=p.useContext(Is),{hash:a,pathname:o,search:l}=df(e,{relative:r}),c=o;return n!=="/"&&(c=o==="/"?n:_i([n,o])),s.createHref({pathname:c,search:l,hash:a})}function Fl(){return p.useContext(cf)!=null}function kn(){return Fl()||ut(!1),p.useContext(cf).location}function yA(e){p.useContext(Is).static||p.useLayoutEffect(e)}function Bi(){let{isDataRoute:e}=p.useContext(Jn);return e?NF():hF()}function hF(){Fl()||ut(!1);let e=p.useContext(lf),{basename:t,future:r,navigator:n}=p.useContext(Is),{matches:s}=p.useContext(Jn),{pathname:a}=kn(),o=JSON.stringify(xw(s,r.v7_relativeSplatPath)),l=p.useRef(!1);return yA(()=>{l.current=!0}),p.useCallback(function(d,u){if(u===void 0&&(u={}),!l.current)return;if(typeof d=="number"){n.go(d);return}let h=vw(d,JSON.parse(o),a,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:_i([t,h.pathname])),(u.replace?n.replace:n.push)(h,u.state,u)},[t,n,o,a,e])}const mF=p.createContext(null);function fF(e){let t=p.useContext(Jn).outlet;return t&&p.createElement(mF.Provider,{value:e},t)}function Kd(){let{matches:e}=p.useContext(Jn),t=e[e.length-1];return t?t.params:{}}function df(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=p.useContext(Is),{matches:s}=p.useContext(Jn),{pathname:a}=kn(),o=JSON.stringify(xw(s,n.v7_relativeSplatPath));return p.useMemo(()=>vw(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function pF(e,t){return gF(e,t)}function gF(e,t,r,n){Fl()||ut(!1);let{navigator:s}=p.useContext(Is),{matches:a}=p.useContext(Jn),o=a[a.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let d=kn(),u;if(t){var h;let b=typeof t=="string"?$l(t):t;c==="/"||(h=b.pathname)!=null&&h.startsWith(c)||ut(!1),u=b}else u=d;let m=u.pathname||"/",f=m;if(c!=="/"){let b=c.replace(/^\//,"").split("/");f="/"+m.replace(/^\//,"").split("/").slice(b.length).join("/")}let y=H$(e,{pathname:f}),x=bF(y&&y.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:_i([c,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?c:_i([c,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),a,r,n);return t&&x?p.createElement(cf.Provider,{value:{location:pd({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:ui.Pop}},x):x}function yF(){let e=_F(),t=cF(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),r?p.createElement("pre",{style:s},r):null,null)}const xF=p.createElement(yF,null);class vF extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?p.createElement(Jn.Provider,{value:this.props.routeContext},p.createElement(gA.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function wF(e){let{routeContext:t,match:r,children:n}=e,s=p.useContext(lf);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),p.createElement(Jn.Provider,{value:t},n)}function bF(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,l=(s=r)==null?void 0:s.errors;if(l!=null){let u=o.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);u>=0||ut(!1),o=o.slice(0,Math.min(o.length,u+1))}let c=!1,d=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u<o.length;u++){let h=o[u];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(d=u),h.route.id){let{loaderData:m,errors:f}=r,y=h.route.loader&&m[h.route.id]===void 0&&(!f||f[h.route.id]===void 0);if(h.route.lazy||y){c=!0,d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}return o.reduceRight((u,h,m)=>{let f,y=!1,x=null,b=null;r&&(f=l&&h.route.id?l[h.route.id]:void 0,x=h.route.errorElement||xF,c&&(d<0&&m===0?(y=!0,b=null):d===m&&(y=!0,b=h.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,m+1)),v=()=>{let w;return f?w=x:y?w=b:h.route.Component?w=p.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=u,p.createElement(wF,{match:h,routeC
459ontext:{outlet:u,matches:g,isDataRoute:r!=null},children:w})};return r&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?p.createElement(vF,{location:r.location,revalidation:r.revalidation,component:x,error:f,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var xA=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(xA||{}),em=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}(em||{});function jF(e){let t=p.useContext(lf);return t||ut(!1),t}function kF(e){let t=p.useContext(pA);return t||ut(!1),t}function SF(e){let t=p.useContext(Jn);return t||ut(!1),t}function vA(e){let t=SF(),r=t.matches[t.matches.length-1];return r.route.id||ut(!1),r.route.id}function _F(){var e;let t=p.useContext(gA),r=kF(em.UseRouteError),n=vA(em.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function NF(){let{router:e}=jF(xA.UseNavigateStable),t=vA(em.UseNavigateStable),r=p.useRef(!1);return yA(()=>{r.current=!0}),p.useCallback(function(s,a){a===void 0&&(a={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,pd({fromRouteId:t},a)))},[e,t])}function CF(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function qy(e){let{to:t,replace:r,state:n,relative:s}=e;Fl()||ut(!1);let{future:a,static:o}=p.useContext(Is),{matches:l}=p.useContext(Jn),{pathname:c}=kn(),d=Bi(),u=vw(t,xw(l,a.v7_relativeSplatPath),c,s==="path"),h=JSON.stringify(u);return p.useEffect(()=>d(JSON.parse(h),{replace:r,state:n,relative:s}),[d,h,s,r,n]),null}function AF(e){return fF(e.context)}function ve(e){ut(!1)}function TF(e){let{basename:t="/",children:r=null,location:n,navigationType:s=ui.Pop,navigator:a,static:o=!1,future:l}=e;Fl()&&ut(!1);let c=t.replace(/^\/*/,"/"),d=p.useMemo(()=>({basename:c,navigator:a,static:o,future:pd({v7_relativeSplatPath:!1},l)}),[c,l,a,o]);typeof n=="string"&&(n=$l(n));let{pathname:u="/",search:h="",hash:m="",state:f=null,key:y="default"}=n,x=p.useMemo(()=>{let b=vl(u,c);return b==null?null:{location:{pathname:b,search:h,hash:m,state:f,key:y},navigationType:s}},[c,u,h,m,f,y,s]);return x==null?null:p.createElement(Is.Provider,{value:d},p.createElement(cf.Provider,{children:r,value:x}))}function EF(e){let{children:t,location:r}=e;return pF(Gy(t),r)}new Promise(()=>{});function Gy(e,t){t===void 0&&(t=[]);let r=[];return p.Children.forEach(e,(n,s)=>{if(!p.isValidElement(n))return;let a=[...t,s];if(n.type===p.Fragment){r.push.apply(r,Gy(n.props.children,a));return}n.type!==ve&&ut(!1),!n.props.index||!n.props.children||ut(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Gy(n.props.children,a)),r.push(o)}),r}/** 460 * React Router DOM v6.30.1 461 * 462 * Copyright (c) Remix Software Inc. 463 * 464 * This source code is licensed under the MIT license found in the 465 * LICENSE.md file in the root directory of this source tree. 466 * 467 * @license MIT 468 */function tm(){return tm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tm.apply(this,arguments)}function wA(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,a;for(a=0;a<n.length;a++)s=n[a],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function RF(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function PF(e,t){return e.button===0&&(!t||t==="_self")&&!RF(e)}const IF=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],OF=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],MF="6";try{window.__reactRouterVersion=MF}catch{}const DF=p.createContext({isTransitioning:!1}),LF="startTransition",Vj=ev[LF];function $F(e){let{basename:t,children:r,future:n,window:s}=e,a=p.useRef();a.current==null&&(a.current=B$({window:s,v5Compat:!0}));let o=a.current,[l,c]=p.useState({action:o.action,location:o.location}),{v7_startTransition:d}=n||{},u=p.useCallback(h=>{d&&Vj?Vj(()=>c(h)):c(h)},[c,d]);return p.useLayoutEffect(()=>o.listen(u),[o,u]),p.useEffect(()=>
468CF(n),[n]),p.createElement(TF,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:o,future:n})}const FF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",BF=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,B=p.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:a,replace:o,state:l,target:c,to:d,preventScrollReset:u,viewTransition:h}=t,m=wA(t,IF),{basename:f}=p.useContext(Is),y,x=!1;if(typeof d=="string"&&BF.test(d)&&(y=d,FF))try{let w=new URL(window.location.href),j=d.startsWith("//")?new URL(w.protocol+d):new URL(d),k=vl(j.pathname,f);j.origin===w.origin&&k!=null?d=k+j.search+j.hash:x=!0}catch{}let b=uF(d,{relative:s}),g=HF(d,{replace:o,state:l,target:c,preventScrollReset:u,relative:s,viewTransition:h});function v(w){n&&n(w),w.defaultPrevented||g(w)}return p.createElement("a",tm({},m,{href:y||b,onClick:x||a?n:v,ref:r,target:c}))}),UF=p.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:s=!1,className:a="",end:o=!1,style:l,to:c,viewTransition:d,children:u}=t,h=wA(t,OF),m=df(c,{relative:h.relative}),f=kn(),y=p.useContext(pA),{navigator:x,basename:b}=p.useContext(Is),g=y!=null&&zF(m)&&d===!0,v=x.encodeLocation?x.encodeLocation(m).pathname:m.pathname,w=f.pathname,j=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;s||(w=w.toLowerCase(),j=j?j.toLowerCase():null,v=v.toLowerCase()),j&&b&&(j=vl(j,b)||j);const k=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let S=w===v||!o&&w.startsWith(v)&&w.charAt(k)==="/",_=j!=null&&(j===v||!o&&j.startsWith(v)&&j.charAt(v.length)==="/"),N={isActive:S,isPending:_,isTransitioning:g},T=S?n:void 0,P;typeof a=="function"?P=a(N):P=[a,S?"active":null,_?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let A=typeof l=="function"?l(N):l;return p.createElement(B,tm({},h,{"aria-current":T,className:P,ref:r,style:A,to:c,viewTransition:d}),typeof u=="function"?u(N):u)});var Ky;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ky||(Ky={}));var Hj;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Hj||(Hj={}));function VF(e){let t=p.useContext(lf);return t||ut(!1),t}function HF(e,t){let{target:r,replace:n,state:s,preventScrollReset:a,relative:o,viewTransition:l}=t===void 0?{}:t,c=Bi(),d=kn(),u=df(e,{relative:o});return p.useCallback(h=>{if(PF(h,r)){h.preventDefault();let m=n!==void 0?n:Zh(d)===Zh(u);c(e,{replace:m,state:s,preventScrollReset:a,relative:o,viewTransition:l})}},[d,c,u,n,s,r,e,a,o,l])}function zF(e,t){t===void 0&&(t={});let r=p.useContext(DF);r==null&&ut(!1);let{basename:n}=VF(Ky.useViewTransitionState),s=df(e,{relative:t.relative});if(!r.isTransitioning)return!1;let a=vl(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=vl(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Xh(s.pathname,o)!=null||Xh(s.pathname,a)!=null}const WF=Km("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_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"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),I=p.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},a)=>{const o=n?MM:"button";return i.jsx(o,{className:Q(WF({variant:t,size:r,className:e})),ref:a,...s})});I.displayName="Button";const uf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAAAAACreq1xAAAAAmJLR0QA/4ePzL8AAAAHdElNRQfqAxgWMBPqVT8LAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDI2LTAzLTI0VDIyOjIxOjU2KzAwOjAwwJr+3AAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyNi0wMy0yNFQyMjoyMTo1NiswMDowMLHHRmAAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjYtMDMtMjRUMjI6NDg6MTkrMDA6MDCAcPglAAAAAW9yTlQBz6J3mgAAChNJREFUWMOtmXlcVdUWx9fe917mWRCUQSUxjAAxfcogCiYfxAl4aqVi1ifMfJg9C7VXaS8bNNOeykutTBNTU58pin4qBkfEiYdg4IDgwDwIyHDn83t/3Avce7gM9Vp/wDlrrf09a6+19t733MtAf67wP5lHUrGivp4ACCSAAIAACAIBAgT9HXR/BAgQbCZbicYz0ZTxTioHASAi6GzG/wwGgGksT4T0EWHtr97xxDgnLmGcMeKMc6YXzjmRhBjpdJwkD97OFAMJxvKL7dfov7RNmtQiUomLctYq+HdUwCqy8HbvVX5yJsD799Q0Qnu+d+DdWxFWfUFgUEc/nwxFr8Dzmgl9RlWZ2XXtGJFX2htQle3j1ycwI6W96yay9UJvwPt5YY59TVeZdvFul2LUkExNL8CrTRG9R6c4Jr95seFKl8J1wuUHPQOFLLfRvQPVKd+frEGu0KWJMsSTaKXUXAoeJEYINUUlbuEdiWirWCcjKmxy6rSPcct4gfcEzC9PlhjjNAU/1MpSn4keHexFRES1jbWMCxU1XcBBIReq3I3T3CXJg4qM11HrpoWOUjsJI1nAfg0AHDHjnDPrDAOfVJvjhkMMgU3jp8oNbaqMeDt7Ceecc05OhwDgPeKcM7ssA687nkk9AS85bjCKL9+biHE2zIVxzll8I9AeTZxztqTd8LF/HVXbw+ZwkYUbJXCou8SKESyiOSNiHozowU0iEiLetzTwkj1fesN02yiyfHyJSHXtdJ1OYff6d8sFYs3jBvpzEoplRLnVnIQRnxsVgcIss00D7+dPdCDS7pkR92oZERExM7l6hAQyB9VYb4FuVZAmQ0Nw3WhRZAR8alRWk0lg7pNJRNRYWK9Kj/9MTkQUOHy4uYbCyxusAy0dH5fTgxxZtNvHfsvvGAEto24XmwIKWR6BROT0rBbIX7dTICJ5+rZCWWzwt2QvlT5PtZRVNmXd5qi3z4madQLLNgWsyh3vRkRcPmTedDv5P9c/pprckYLTisANJcNG5MsDvdTKI0NWj45cncZFB5GvX1abicZOs9kLALhyCFX+jCSTNp4onWm1JNaMRm2dy6Tbns/KHJ76Vd48zsx/Fp0ja5zzTPThCo/bAABNO1p27f1XMFHix5IAf5LGfxnGySM19Nqyrza7jZGQWXSJCHjWflt3YMOYGQoDH/XfyfzzQLLjLDzRmWjgp6/F5ezf5EDEAnY8Fh9+DaO7xnamo7hkvrlBXtTDPOXCPakKDuq9Sh4659qx7Q556R5N7gmLh+k8tIKsw9kp4kCZr/66E3iOhxr1wrJxB6xdB5Qo5dfVPDxsZ9HLo087H77zc2KQvoz1R68Ez+tYMZN35viKitIeFdosmoi2INGdcc6Z10xbmlHb0gQo1TqToFC0lf/NbEuHa+UzL2lEOSx0fVfEU56YbEGcc85drZjsoKHp0uvRMXNme1NUx+YkLB5WJgJ+Yyvqhaoke+KcWQzmnHMu3W5gKvLjTtZERMnaDtURm4PGQPWLz1Qb8cpmMcY4yWYFEOeck/ehrq0ylV64ef7zGaEruobc907UGgEfeCcKndaa9EPbQhiT+piN2rTKXL/B2sXuua3fBi8NiFUAihZt1/PVC0ZWGgF/sjnQaWxbYC5lRBS76/WHxV66NHLOSOY5ffsjANBsGLBf3Ip7bE8aAZd53e20PfImzixc/a43NaJ5LjHeIUSSMZkAIE8KFTf3Lfe3DIH1QXGqTlvdC15kvanorhYA7s+3IUPm5CcAkPf0EY0xUBkbVGcAPGO/1SAfdZmrE+r1N/KrH88KGGjJ9VDyKgWATJsElSjEFP3JpVsp52RhXYtE6hwZ0WCvu65cmc29xg5AY1NOFSMi1nrLU0q/fWqWICNjmWCRHdG5UlojJjyBSdlMxIhZugxZO15XHQf3+FVLR1is14g9WyeHNHdGeO+3JbZkUlqJEyOFgjVWMCISfDdd3n2UaEyMROxpHbWheFzH5pCjmGiaR1E7qhgxS4VE2UZExF6OiXkxp875OZ/uruHrz4zTT1k1O1B/VCu7zXk+cYpNf06SaM8455I96FGaQqa0Q3fQP7oW7KJ7yoVTWsOHas9kPyLQ5JgRY0OkRETaH6upJ7GPvHFHH+Fhm8O6hzyM8/6wTv9ATaUaSF0wTeI+PbHlt6oqf11RZpeirVwwGWKWXYq+D98YWgYAuD7F6/t33mgDAOG/b/mtbYGyLIlvVJ5uBrCWEeec0dhtiwJzTALrRsUqAQJq/eeqANTvDxqXsPM1l/MAgPMuZD5zyRx/Gd8NQQBQu9RFQkxmI+FE75vO4gqPW4CUqOBenIyIWk7RTvkij2jdJ8tcpVSZRlyqphvEiIhcNr96s0E20HlrGhdkJpNYV1dT9DQRkOs/KEUOoCll+Rzfm+2ZtQA06bsdopIXH0yL5Qu1hlEc8WBcdthUfAVTbd6s1uXw5kyrxIcAtFc/++bJnpBjAgDURZ+GANTvyzMc1Rpnx7lsa3ec9qjv4J0KfVHQ8J5DiC51revizumXfVGZiTDUJSfdyP5kN/2TTxzHnQE6gNAc8hm8Qw6gYPRWlQaNlypNd4ZG3pbuPOLrSrH+3jzLhfd1lx0v6Df+cTbhg8GkLS60K29oqlVudzCR9vzN1e13a9/ZKNZnryxNTrIxPpdRv9puwkUAqFiz7IMF78tva7oHuEZCxGi+yKLYMXjk8c7KdX1YUv/wlOe3SgBqzcqYul9CvlZ1A2assnJhPMF4xVcnWU8r7Lo1fAvIi7JOqgSAlGOpYVvWn+4e4vUNJ4O+rDBS5U2xTa6DaSBq3raNvAKgeXfgvspF68ovdyuySlusNqrSj8M9dxtNxfhLDNXeoUP2qIC2o58sWpSRNP1EO3qVprUOIReMVeJvRS5H2qyoBVDzMPfFsO9+vaE9VdUz785cq1ceoncgqpfbRF0FgJ+mHsxqkWeOnHa9J94vQc5ftKIvIBTfenr/oAZQdvyB+iOPwI+W72oxhZOnuD6b3r3/yYTrpYl2K+sAoOpdt7/MOluxanNbd6eKJVaxRSYGmwKiYqn11HwAJYs+rC7IqjlZ2t3lyiT71Q3oLxCKHe4+B9WAWgs0rZhaJF686n3Dhu5To/9A4Hyo3XuPAaB2acLtmjczjZLV+A/b8NweBvYERPli6xkFAB7takTGxLfOGhCL460XV+D3AtH+70FP/0cLQJ0ac7y9qRMopPsP3NJzw/cMBM6Md/ywEWg/YDi91k3OQT/3Mqg3IO6/ahUnao2Hr1jOvoM/CkT7
468Fle/NMND6mKY/ZrH+ONAIGOM07rONyLVbs/hP2rwfwFR+rLVXP0c65Jtp1zvy79PIFq/cA5IFwAUTLNeVt2ne99ACKeDBqxvwfGRg75S9O3dDyBw9yWr+R84j83uj2+/gGhe7yydf69frqx/Py7gVNlCu3559hPYf/nTf634HxltyrTI5uLeAAAAAElFTkSuQmCC",zj=[{label:"Home",path:"/"},{label:"Classes",children:[{label:"Youth Classes",path:"/programs/youth"},{label:"Adult Classes",path:"/programs/adult"},{label:"Schedule",path:"/schedule"}]},{label:"Instructors",path:"/coaches"},{label:"Gear",path:"/gear"},{label:"Memberships",path:"/memberships"},{label:"Shop",path:"https://bladefit.shop",external:!0},{label:"Events",path:"/events"},{label:"Contact",path:"/contact"}];function qF(){const[e,t]=p.useState(!1),[r,n]=p.useState(null),s=kn(),a=p.useRef(null),o=p.useRef([]),l=h=>s.pathname===h,c=p.useCallback(()=>n(null),[]);p.useEffect(()=>{const h=m=>{a.current&&!a.current.contains(m.target)&&c()};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[c]),p.useEffect(()=>{c(),t(!1)},[s.pathname,c]);const d=(h,m)=>{if(m.filter(f=>f.path!==""),h.key==="Escape"){c(),h.currentTarget.focus();return}h.key==="ArrowDown"&&(h.preventDefault(),r||(n("Classes"),setTimeout(()=>{var f;return(f=o.current[0])==null?void 0:f.focus()},0))),(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),r?c():(n("Classes"),setTimeout(()=>{var f;return(f=o.current[0])==null?void 0:f.focus()},0)))},u=(h,m,f)=>{var x,b,g,v;const y=f.filter(w=>w.path!=="");if(h.key==="Escape"){c(),(b=(x=a.current)==null?void 0:x.querySelector("button"))==null||b.focus();return}if(h.key==="ArrowDown"){h.preventDefault();const w=(m+1)%y.length;(g=o.current[w])==null||g.focus()}if(h.key==="ArrowUp"){h.preventDefault();const w=(m-1+y.length)%y.length;(v=o.current[w])==null||v.focus()}h.key==="Tab"&&c()};return i.jsxs("header",{className:"fixed top-0 left-0 right-0 z-50 border-b border-border/50 bg-background/90 backdrop-blur-md",children:[i.jsxs("nav",{className:"container mx-auto flex h-16 items-center justify-between px-4 lg:px-8","aria-label":"Main navigation",children:[i.jsxs(B,{to:"/",className:"flex items-center gap-2.5",children:[i.jsx("img",{src:uf,alt:"BladeFit Academy",className:"h-10 w-10 object-contain"}),i.jsxs("div",{className:"flex flex-col leading-none",children:[i.jsx("span",{className:"font-heading text-lg font-bold tracking-wider text-foreground",children:"BLADEFIT"}),i.jsx("span",{className:"font-heading text-[10px] tracking-[0.25em] text-muted-foreground",children:"ACADEMY"})]})]}),i.jsxs("div",{className:"hidden items-center gap-1 lg:flex",children:[zj.map(h=>h.children?i.jsxs("div",{className:"relative",ref:a,onMouseEnter:()=>n(h.label),onMouseLeave:()=>n(null),children:[i.jsxs("button",{"aria-expanded":r===h.label,"aria-haspopup":"true",onKeyDown:m=>d(m,h.children),className:Q("flex items-center gap-1 rounded-md px-2 py-2 text-sm font-medium transition-colors hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",h.children.some(m=>m.path&&l(m.path))?"text-primary":"text-foreground/80"),children:[h.label,i.jsx(Jm,{className:Q("h-3.5 w-3.5 transition-transform",r===h.label&&"rotate-180")})]}),r===h.label&&i.jsx("div",{className:"absolute left-0 top-full w-52 pt-1",role:"presentation",children:i.jsx("div",{className:"rounded-md border border-border bg-popover p-1 shadow-lg",role:"menu",children:h.children.map((m,f)=>{if(m.path==="")return i.jsx("p",{className:"px-3 py-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground",role:"presentation",children:m.label.replace(/â/g,"").trim()},f);const y=h.children.filter(x=>x.path!=="").indexOf(m);return i.jsx(B,{to:m.path,role:"menuitem",ref:x=>{o.current[y]=x},onKeyDown:x=>u(x,y,h.children),className:Q("block rounded-sm px-3 py-2 text-sm transition-colors hover:bg-accent hover:text-primary focus-visible:bg-accent focus-visible:text-primary focus-visible:outline-none",l(m.path)&&"text-primary"),children:m.label},m.path)})})})]},h.label):h.external?i.jsx("a",{href:h.path,target:"_blank",rel:"noopener noreferrer",className:Q("rounded-md px-2 py-2 text-sm font-medium transition-colors hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","text-foreground
468/80"),children:h.label},h.path):i.jsx(B,{to:h.path,className:Q("rounded-md px-2 py-2 text-sm font-medium transition-colors hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",l(h.path)?"text-primary":"text-foreground/80"),children:h.label},h.path)),i.jsx("a",{href:"https://bladefit-academy.gymdesk.com/login",target:"_blank",rel:"noopener noreferrer",className:"ml-1",children:i.jsxs(I,{variant:"outline",size:"sm",className:"border-primary/30 text-sm font-medium hover:border-primary hover:text-primary",children:[i.jsx(zD,{className:"mr-1.5 h-3.5 w-3.5"})," Member Login"]})}),i.jsx(B,{to:"/trial",className:"ml-1",children:i.jsx(I,{className:"bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:"Try a Class"})})]}),i.jsxs("div",{className:"flex items-center gap-2 lg:hidden",children:[i.jsx(B,{to:"/trial",children:i.jsx(I,{size:"sm",className:"bg-gradient-gold text-xs font-semibold text-primary-foreground shadow-gold",children:"Try a Class"})}),i.jsx("button",{onClick:()=>t(!e),className:"rounded-md p-2 text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","aria-label":e?"Close menu":"Open menu","aria-expanded":e,children:e?i.jsx(Da,{className:"h-5 w-5"}):i.jsx(GD,{className:"h-5 w-5"})})]})]}),e&&i.jsx("div",{className:"border-t border-border bg-background lg:hidden max-h-[80vh] overflow-y-auto",role:"menu",children:i.jsxs("div",{className:"container mx-auto space-y-1 px-4 py-4",children:[zj.map(h=>h.children?i.jsxs("div",{children:[i.jsx("p",{className:"px-3 py-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:h.label}),h.children.map((m,f)=>m.path===""?i.jsx("p",{className:"px-6 pt-3 pb-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:m.label.replace(/â/g,"").trim()},f):i.jsx(B,{to:m.path,role:"menuitem",onClick:()=>t(!1),className:"block rounded-md px-6 py-2 text-sm text-foreground/80 transition-colors hover:text-primary focus-visible:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:m.label},m.path))]},h.label):h.external?i.jsx("a",{href:h.path,target:"_blank",rel:"noopener noreferrer",role:"menuitem",onClick:()=>t(!1),className:"block rounded-md px-3 py-2 text-sm font-medium text-foreground/80 transition-colors hover:text-primary focus-visible:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:h.label},h.path):i.jsx(B,{to:h.path,role:"menuitem",onClick:()=>t(!1),className:"block rounded-md px-3 py-2 text-sm font-medium text-foreground/80 transition-colors hover:text-primary focus-visible:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:h.label},h.path)),i.jsx("a",{href:"https://bladefit-academy.gymdesk.com/login",target:"_blank",rel:"noopener noreferrer",role:"menuitem",onClick:()=>t(!1),className:"block rounded-md px-3 py-2 text-sm font-medium text-foreground/80 transition-colors hover:text-primary",children:"Member Login"})]})})]})}function GF(){return i.jsx("footer",{className:"border-t border-border bg-card",children:i.jsxs("div",{className:"container mx-auto px-4 py-12 lg:px-8",children:[i.jsxs("div",{className:"grid gap-8 md:grid-cols-4",children:[i.jsxs("div",{className:"md:col-span-1",children:[i.jsxs(B,{to:"/",className:"inline-flex items-center gap-2.5",children:[i.jsx("img",{src:uf,alt:"BladeFit Academy",className:"h-9 w-9 object-contain"}),i.jsxs("div",{className:"flex flex-col leading-none",children:[i.jsx("span",{className:"font-heading text-lg font-bold tracking-wider text-foreground",children:"BLADEFIT"}),i.jsx("span",{className:"font-heading text-[10px] tracking-[0.25em] text-muted-foreground",children:"ACADEMY"})]})]}),i.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:"Movement. Confidence. Discipline."}),i.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Youth & Adult Sword Training"}),i.jsxs("div",{className:"mt-4 flex gap-3",children:[i.jsx("a",{href:"https://www.facebook.com/Bladefitadventures/",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground transition-colors hover:text-primary",children:i.jsx(DD,{className:"h-5 w-5"})}),i.jsx("a",{href:"https://www.instagram.com/bladefit_adventure",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground transition-colors hover:text-primary",children:i.jsx(VD,{className:"h-5 w-5"})}),i.jsx("a",{href:"https://www.youtube.com/@BladeFitAcademy",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground transition-colors hover:text-primary",children:i.jsx(iL,{className:"h-5 w-5"})}),i.jsx("a",{href:"https://www.tiktok.com/@bladefit.academy",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground transition-colors hover:text-primary",children:i.jsx("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"
468currentColor",children:i.jsx("path",{d:"M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-2.88 2.5 2.89 2.89 0 0 1-2.89-2.89 2.89 2.89 0 0 1 2.89-2.89c.28 0 .54.04.79.1V9.01a6.27 6.27 0 0 0-.79-.05 6.34 6.34 0 0 0-6.34 6.34 6.34 6.34 0 0 0 6.34 6.34 6.34 6.34 0 0 0 6.34-6.34V8.75a8.18 8.18 0 0 0 3.76.92V6.69Z"})})})]})]}),i.jsxs("div",{children:[i.jsx("h4",{className:"mb-3 font-heading text-sm font-semibold uppercase tracking-wider text-foreground",children:"Classes"}),i.jsxs("ul",{className:"space-y-2",children:[i.jsx("li",{children:i.jsx(B,{to:"/programs/youth",className:"text-sm text-muted-foreground transition-colors hover:text-primary",children:"Youth Classes"})}),i.jsx("li",{children:i.jsx(B,{to:"/programs/adult",className:"text-sm text-muted-foreground transition-colors hover:text-primary",children:"Adult Classes"})}),i.jsx("li",{children:i.jsx(B,{to:"/schedule",className:"text-sm text-muted-foreground transition-colors hover:text-primary",children:"Class Schedule"})})]})]}),i.jsxs("div",{children:[i.jsx("h4",{className:"mb-3 font-heading text-sm font-semibold uppercase tracking-wider text-foreground",children:"Quick Links"}),i.jsxs("ul",{className:"space-y-2",children:[i.jsx("li",{children:i.jsx("a",{href:"https://bladefit-academy.gymdesk.com/login",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-muted-foreground transition-colors hover:text-primary",children:"Member Login"})}),i.jsx("li",{children:i.jsx(B,{to:"/memberships",className:"text-sm text-muted-foreground transition-colors hover:text-primary",children:"Memberships"})}),i.jsx("li",{children:i.jsx(B,{to:"/trial",className:"text-sm text-muted-foreground transition-colors hover:text-primary",children:"Trial"})}),i.jsx("li",{children:i.jsx(B,{to:"/gear",className:"text-sm text-muted-foreground transition-colors hover:text-primary",children:"Student Gear"})}),i.jsx("li",{children:i.jsx(B,{to:"/faq",className:"text-sm text-muted-foreground transition-colors hover:text-primary",children:"FAQ"})}),i.jsx("li",{children:i.jsx(B,{to:"/contact",className:"text-sm text-muted-foreground transition-colors hover:text-primary",children:"Contact"})})]})]}),i.jsxs("div",{children:[i.jsx("h4",{className:"mb-3 font-heading text-sm font-semibold uppercase tracking-wider text-foreground",children:"Contact"}),i.jsxs("ul",{className:"space-y-2 text-sm text-muted-foreground",children:[i.jsxs("li",{children:["7588 Delaware Lane",i.jsx("br",{}),"Vancouver, WA 98684"]}),i.jsx("li",{children:i.jsx("a",{href:"mailto:[email protected]",className:"transition-colors hover:text-primary",children:"[email protected]"})}),i.jsx("li",{children:i.jsx("a",{href:"tel:+13602070252",className:"transition-colors hover:text-primary",children:"(360) 207-0252"})})]})]})]}),i.jsxs("div",{className:"mt-10 border-t border-border pt-6",children:[i.jsxs("div",{className:"flex flex-wrap justify-center gap-4 mb-4 text-xs text-muted-foreground",children:[i.jsx(B,{to:"/policies/adult",className:"transition-colors hover:text-primary",children:"Adult Policies"}),i.jsx("span",{className:"text-border",children:"·"}),i.jsx(B,{to:"/policies/youth",className:"transition-colors hover:text-primary",children:"Youth Policies"}),i.jsx("span",{className:"text-border",children:"·"}),i.jsx(B,{to:"/policies/payment",className:"transition-colors hover:text-primary",children:"Payment Policy"}),i.jsx("span",{className:"text-border",children:"·"}),i.jsx(B,{to:"/policies/etiquette",className:"transition-colors hover:text-primary",children:"Safety Policies"})]}),i.jsxs("p",{className:"text-xs text-muted-foreground text-center",children:["© ",new Date().getFullYear()," BladeFit Academy. All rights reserved."]})]})]})})}function KF({children:e}){const{pathname:t}=kn();return p.useEffect(()=>{window.scrollTo(0,0)},[t]),i.jsxs("div",{className:"flex min-h-screen flex-col",children:[i.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-[100] focus:rounded-md focus:bg-primary focus:px-4 focus:py-2 focus:text-primary-foreground focus:shadow-lg",children:"Skip to main content"}),i.jsx(qF,{}),i.jsx("main",{id:"main-content",className:"flex-1 pt-16",children:e}),i.jsx(GF,{})]})}const ww=p.createContext({});function bw(e){const t=p.useRef(null);return t.current===null&&(t.current=e()),t.current}const bA=typeof window<"u",jA=bA?p.useLayoutEffect:p.useEffect,hf=p.createContext(null);function jw(e,t){e.indexOf(t)===-1&&e.push(t)}function kw(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const Kn=(e,t,r)=>r>t?t:r<e?e:r;let mf=()=>{},wl=()=>{};const _s={},kA=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function SA(e){return typeof e=="object"&&e!==null}const _A=e=>/^0[^.\s]+$/u.test(e);function Sw(e){let t;return()=>(t===void 0&&(t=e()),t)}const Hr=e=>e,YF=(e,t)=>r=>
vendor: 8,916 bytes, line 468
468t(e(r)),Yd=(...e)=>e.reduce(YF),gd=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n};class _w{constructor(){this.subscriptions=[]}add(t){return jw(this.subscriptions,t),()=>kw(this.subscriptions,t)}notify(t,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,r,n);else for(let a=0;a<s;a++){const o=this.subscriptions[a];o&&o(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const gn=e=>e*1e3,Ur=e=>e/1e3;function NA(e,t){return t?e*(1e3/t):0}const CA=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,JF=1e-7,QF=12;function ZF(e,t,r,n,s){let a,o,l=0;do o=t+(r-t)/2,a=CA(o,n,s)-e,a>0?r=o:t=o;while(Math.abs(a)>JF&&++l<QF);return o}function Jd(e,t,r,n){if(e===t&&r===n)return Hr;const s=a=>ZF(a,0,1,e,r);return a=>a===0||a===1?a:CA(s(a),t,n)}const AA=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,TA=e=>t=>1-e(1-t),EA=Jd(.33,1.53,.69,.99),Nw=TA(EA),RA=AA(Nw),PA=e=>(e*=2)<1?.5*Nw(e):.5*(2-Math.pow(2,-10*(e-1))),Cw=e=>1-Math.sin(Math.acos(e)),IA=TA(Cw),OA=AA(Cw),XF=Jd(.42,0,1,1),eB=Jd(0,0,.58,1),MA=Jd(.42,0,.58,1),tB=e=>Array.isArray(e)&&typeof e[0]!="number",DA=e=>Array.isArray(e)&&typeof e[0]=="number",Wj={linear:Hr,easeIn:XF,easeInOut:MA,easeOut:eB,circIn:Cw,circInOut:OA,circOut:IA,backIn:Nw,backInOut:RA,backOut:EA,anticipate:PA},rB=e=>typeof e=="string",qj=e=>{if(DA(e)){wl(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,r,n,s]=e;return Jd(t,r,n,s)}else if(rB(e))return wl(Wj[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Wj[e];return e},Tu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Gj={value:null,addProjectionMetrics:null};function nB(e,t){let r=new Set,n=new Set,s=!1,a=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function d(h){o.has(h)&&(u.schedule(h),e()),c++,h(l)}const u={schedule:(h,m=!1,f=!1)=>{const x=f&&s?r:n;return m&&o.add(h),x.has(h)||x.add(h),h},cancel:h=>{n.delete(h),o.delete(h)},process:h=>{if(l=h,s){a=!0;return}s=!0,[r,n]=[n,r],r.forEach(d),t&&Gj.value&&Gj.value.frameloop[t].push(c),c=0,r.clear(),s=!1,a&&(a=!1,u.process(h))}};return u}const sB=40;function LA(e,t){let r=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,o=Tu.reduce((w,j)=>(w[j]=nB(a,t?j:void 0),w),{}),{setup:l,read:c,resolveKeyframes:d,preUpdate:u,update:h,preRender:m,render:f,postRender:y}=o,x=()=>{const w=_s.useManualTiming?s.timestamp:performance.now();r=!1,_s.useManualTiming||(s.delta=n?1e3/60:Math.max(Math.min(w-s.timestamp,sB),1)),s.timestamp=w,s.isProcessing=!0,l.process(s),c.process(s),d.process(s),u.process(s),h.process(s),m.process(s),f.process(s),y.process(s),s.isProcessing=!1,r&&t&&(n=!1,e(x))},b=()=>{r=!0,n=!0,s.isProcessing||e(x)};return{schedule:Tu.reduce((w,j)=>{const k=o[j];return w[j]=(S,_=!1,N=!1)=>(r||b(),k.schedule(S,_,N)),w},{}),cancel:w=>{for(let j=0;j<Tu.length;j++)o[Tu[j]].cancel(w)},state:s,steps:o}}const{schedule:Qe,cancel:Ii,state:Mt,steps:Ep}=LA(typeof requestAnimationFrame<"u"?requestAnimationFrame:Hr,!0);let mh;function iB(){mh=void 0}const nr={now:()=>(mh===void 0&&nr.set(Mt.isProcessing||_s.useManualTiming?Mt.timestamp:performance.now()),mh),set:e=>{mh=e,queueMicrotask(iB)}},$A=e=>t=>typeof t=="string"&&t.startsWith(e),FA=$A("--"),aB=$A("var(--"),Aw=e=>aB(e)?oB.test(e.split("/*")[0].trim()):!1,oB=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Kj(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Bl={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},yd={...Bl,transform:e=>Kn(0,1,e)},Eu={...Bl,default:1},Fc=e=>Math.round(e*1e5)/1e5,Tw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function lB(e){return e==null}const cB=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ew=(e,t)=>r=>!!(typeof r=="string"&&cB.test(r)&&r.startsWith(e)||t&&!lB(r)&&Object.prototype.hasOwnProperty.call(r,t)),BA=(e,t,r)=>n=>{if(typeof n!="string")return n;const[s,a,o,l]=n.match(Tw);return{[e]:parseFloat(s),[t]:parseFloat(a),[r]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},dB=e=>Kn(0,255,e),Rp={...Bl,transform:e=>Math.round(dB(e))},ca={test:Ew("rgb","red"),parse:BA("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Rp.transform(e)+", "+Rp.transform(t)+", "+Rp.transform(r)+", "+Fc(yd.transform(n))+")"};function uB(e){let t="",r="",n="",s="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),s=e.substring(4,5),t+=t,r+=r,n+=n,s+=s),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const Yy={test:Ew("#"),parse:uB,transform:ca.transform},Qd=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ws=Qd("deg"),Hn=Qd("%"),ee=Qd("px"),hB=Qd("vh"),mB=Qd("vw"),Yj={...Hn,parse:e=>Hn.parse(e)/100,transform:e=>Hn.transform(e*100)},Ao={test:Ew("hsl","hue"),parse:BA("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Hn.transform(Fc(t))+", "+Hn.transform(Fc(r))+", "+Fc(yd.transform(n))+")"},kt={test:e=>ca.test(e)||Yy.test(e)||Ao.test(e),parse:e=>ca.test(e)?ca.parse(e):Ao.test(e)?Ao.parse(e):Yy.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ca.transform(e):Ao.transform(e),getAnimatableNone:e=>{const t=kt.parse(e);return t.alpha=0,kt.transform(t)}},fB=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function pB(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Tw))==null?void 0:t.length)||0)+(((r=e.match(fB))==null?void 0:r.length)||0)>0}const UA="number",VA="color",gB="var",yB="var(",Jj="${}",xB=/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 xd(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},s=[];let a=0;const l=t.replace(xB,c=>(kt.test(c)?(n.color.push(a),s.push(VA),r.push(kt.parse(c))):c.startsWith(yB)?(n.var.push(a),s.push(gB),r.push(c)):(n.number.push(a),s.push(UA),r.push(parseFloat(c))),++a,Jj)).split(Jj);return{values:r,split:l,indexes:n,types:s}}function HA(e){return xd(e).values}function zA(e){const{split:t,types:r}=xd(e),n=t.length;return s=>{let a="";for(let o=0;o<n;o++)if(a+=t[o],s[o]!==void 0){const l=r[o];l===UA?a+=Fc(s[o]):l===VA?a+=kt.transform(s[o]):a+=s[o]}return a}}const vB=e=>typeof e=="number"?0:kt.test(e)?kt.getAnimatableNone(e):e;function wB(e){const t=HA(e);return zA(e)(t.map(vB))}const Oi={test:pB,parse:HA,createTransformer:zA,getAnimatableNone:wB};function Pp(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function bB({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let s=0,a=0,o=0;if(!t)s=a=o=r;else{const l=r<.5?r*(1+t):r+t-r*t,c=2*r-l;s=Pp(c,l,e+1/3),a=Pp(c,l,e),o=Pp(c,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:n}}function rm(e,t){return r=>r>0?t:e}const ct=(e,t,r)=>e+(t-e)*r,Ip=(e,t,r)=>{const n=e*e,s=r*(t*t-n)+n;return s<0?0:Math.sqrt(s)},jB=[Yy,ca,Ao],kB=e=>jB.find(t=>t.test(e));function Qj(e){const t=kB(e);if(mf(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===Ao&&(r=bB(r)),r}const Zj=(e,t)=>{const r=Qj(e),n=Qj(t);if(!r||!n)return rm(e,t);const s={...r};return a=>(s.red=Ip(r.red,n.red,a),s.green=Ip(r.green,n.green,a),s.blue=Ip(r.blue,n.blue,a),s.alpha=ct(r.alpha,n.alpha,a),ca.transform(s))},Jy=new Set(["none","hidden"]);function SB(e,t){return Jy.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function _B(e,t){return r=>ct(e,t,r)}function Rw(e){return typeof e=="number"?_B:typeof e=="string"?Aw(e)?rm:kt.test(e)?Zj:AB:Array.isArray(e)?WA:typeof e=="object"?kt.test(e)?Zj:NB:rm}function WA(e,t){const r=[...e],n=r.length,s=e.map((a,o)=>Rw(a)(a,t[o]));return a=>{for(let o=0;o<n;o++)r[o]=s[o](a);return r}}function NB(e,t){const r={...e,...t},n={};for(const s in r)e[s]!==void 0&&t[s]!==void 0&&(n[s]=Rw(e[s])(e[s],t[s]));return s=>{for(const a in n)r[a]=n[a](s);return r}}function CB(e,t){const r=[],n={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const a=t.types[s],o=e.indexes[a][n[a]],l=e.values[o]??0;r[s]=l,n[a]++}return r}const AB=(e,t)=>{const r=Oi.createTransformer(t),n=xd(e),s=xd(t);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?Jy.has(e)&&!s.values.length||Jy.has(t)&&!n.values.length?SB(e,t):Yd(WA(CB(n,s),s.values),r):(mf(!0,`Complex values '${e}' and '${t}
468' 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"),rm(e,t))};function qA(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?ct(e,t,r):Rw(e)(e,t)}const TB=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>Qe.update(t,r),stop:()=>Ii(t),now:()=>Mt.isProcessing?Mt.timestamp:nr.now()}},GA=(e,t,r=10)=>{let n="";const s=Math.max(Math.round(t/r),2);for(let a=0;a<s;a++)n+=Math.round(e(a/(s-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},nm=2e4;function Pw(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<nm;)t+=r,n=e.next(t);return t>=nm?1/0:t}function EB(e,t=100,r){const n=r({...e,keyframes:[0,t]}),s=Math.min(Pw(n),nm);return{type:"keyframes",ease:a=>n.next(s*a).value/t,duration:Ur(s)}}const RB=5;function KA(e,t,r){const n=Math.max(t-RB,0);return NA(r-e(n),t-n)}const at={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},Op=.001;function PB({duration:e=at.duration,bounce:t=at.bounce,velocity:r=at.velocity,mass:n=at.mass}){let s,a;mf(e<=gn(at.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Kn(at.minDamping,at.maxDamping,o),e=Kn(at.minDuration,at.maxDuration,Ur(e)),o<1?(s=d=>{const u=d*o,h=u*e,m=u-r,f=Qy(d,o),y=Math.exp(-h);return Op-m/f*y},a=d=>{const h=d*o*e,m=h*r+r,f=Math.pow(o,2)*Math.pow(d,2)*e,y=Math.exp(-h),x=Qy(Math.pow(d,2),o);return(-s(d)+Op>0?-1:1)*((m-f)*y)/x}):(s=d=>{const u=Math.exp(-d*e),h=(d-r)*e+1;return-Op+u*h},a=d=>{const u=Math.exp(-d*e),h=(r-d)*(e*e);return u*h});const l=5/e,c=OB(s,a,l);if(e=gn(e),isNaN(c))return{stiffness:at.stiffness,damping:at.damping,duration:e};{const d=Math.pow(c,2)*n;return{stiffness:d,damping:o*2*Math.sqrt(n*d),duration:e}}}const IB=12;function OB(e,t,r){let n=r;for(let s=1;s<IB;s++)n=n-e(n)/t(n);return n}function Qy(e,t){return e*Math.sqrt(1-t*t)}const MB=["duration","bounce"],DB=["stiffness","damping","mass"];function Xj(e,t){return t.some(r=>e[r]!==void 0)}function LB(e){let t={velocity:at.velocity,stiffness:at.stiffness,damping:at.damping,mass:at.mass,isResolvedFromDuration:!1,...e};if(!Xj(e,DB)&&Xj(e,MB))if(e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(r*1.2),s=n*n,a=2*Kn(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:at.mass,stiffness:s,damping:a}}else{const r=PB(e);t={...t,...r,mass:at.mass},t.isResolvedFromDuration=!0}return t}function sm(e=at.visualDuration,t=at.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:s}=r;const a=r.keyframes[0],o=r.keyframes[r.keyframes.length-1],l={done:!1,value:a},{stiffness:c,damping:d,mass:u,duration:h,velocity:m,isResolvedFromDuration:f}=LB({...r,velocity:-Ur(r.velocity||0)}),y=m||0,x=d/(2*Math.sqrt(c*u)),b=o-a,g=Ur(Math.sqrt(c/u)),v=Math.abs(b)<5;n||(n=v?at.restSpeed.granular:at.restSpeed.default),s||(s=v?at.restDelta.granular:at.restDelta.default);let w;if(x<1){const k=Qy(g,x);w=S=>{const _=Math.exp(-x*g*S);return o-_*((y+x*g*b)/k*Math.sin(k*S)+b*Math.cos(k*S))}}else if(x===1)w=k=>o-Math.exp(-g*k)*(b+(y+g*b)*k);
vendor: 16,376 bytes, line 468
468else{const k=g*Math.sqrt(x*x-1);w=S=>{const _=Math.exp(-x*g*S),N=Math.min(k*S,300);return o-_*((y+x*g*b)*Math.sinh(N)+k*b*Math.cosh(N))/k}}const j={calculatedDuration:f&&h||null,next:k=>{const S=w(k);if(f)l.done=k>=h;else{let _=k===0?y:0;x<1&&(_=k===0?gn(y):KA(w,k,S));const N=Math.abs(_)<=n,T=Math.abs(o-S)<=s;l.done=N&&T}return l.value=l.done?o:S,l},toString:()=>{const k=Math.min(Pw(j),nm),S=GA(_=>j.next(k*_).value,k,30);return k+"ms "+S},toTransition:()=>{}};return j}sm.applyToOptions=e=>{const t=EB(e,100,sm);return e.ease=t.ease,e.duration=gn(t.duration),e.type="keyframes",e};function Zy({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:a=500,modifyTarget:o,min:l,max:c,restDelta:d=.5,restSpeed:u}){const h=e[0],m={done:!1,value:h},f=N=>l!==void 0&&N<l||c!==void 0&&N>c,y=N=>l===void 0?c:c===void 0||Math.abs(l-N)<Math.abs(c-N)?l:c;let x=r*t;const b=h+x,g=o===void 0?b:o(b);g!==b&&(x=g-h);const v=N=>-x*Math.exp(-N/n),w=N=>g+v(N),j=N=>{const T=v(N),P=w(N);m.done=Math.abs(T)<=d,m.value=m.done?g:P};let k,S;const _=N=>{f(m.value)&&(k=N,S=sm({keyframes:[m.value,y(m.value)],velocity:KA(w,N,m.value),damping:s,stiffness:a,restDelta:d,restSpeed:u}))};return _(0),{calculatedDuration:null,next:N=>{let T=!1;return!S&&k===void 0&&(T=!0,j(N),_(N)),k!==void 0&&N>=k?S.next(N-k):(!T&&j(N),m)}}}function $B(e,t,r){const n=[],s=r||_s.mix||qA,a=e.length-1;for(let o=0;o<a;o++){let l=s(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Hr:t;l=Yd(c,l)}n.push(l)}return n}function FB(e,t,{clamp:r=!0,ease:n,mixer:s}={}){const a=e.length;if(wl(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=$B(t,n,s),c=l.length,d=u=>{if(o&&u<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(u<e[h+1]);h++);const m=gd(e[h],e[h+1],u);return l[h](m)};return r?u=>d(Kn(e[0],e[a-1],u)):d}function BB(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const s=gd(0,t,n);e.push(ct(r,1,s))}}function UB(e){const t=[0];return BB(t,e.length-1),t}function VB(e,t){return e.map(r=>r*t)}function HB(e,t){return e.map(()=>t||MA).splice(0,e.length-1)}function Bc({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const s=tB(n)?n.map(qj):qj(n),a={done:!1,value:t[0]},o=VB(r&&r.length===t.length?r:UB(t),e),l=FB(o,t,{ease:Array.isArray(s)?s:HB(t,s)});return{calculatedDuration:e,next:c=>(a.value=l(c),a.done=c>=e,a)}}const zB=e=>e!==null;function Iw(e,{repeat:t,repeatType:r="loop"},n,s=1){const a=e.filter(zB),l=s<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!l||n===void 0?a[l]:n}const WB={decay:Zy,inertia:Zy,tween:Bc,keyframes:Bc,spring:sm};function YA(e){typeof e.type=="string"&&(e.type=WB[e.type])}class Ow{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const qB=e=>e/100;class Mw extends Ow{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,s;const{motionValue:r}=this.options;r&&r.updatedAt!==nr.now()&&this.tick(nr.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(n=this.options).onStop)==null||s.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;YA(t);const{type:r=Bc,repeat:n=0,repeatDelay:s=0,repeatType:a,velocity:o=0}=t;let{keyframes:l}=t;const c=r||Bc;c!==Bc&&typeof l[0]!="number"&&(this.mixKeyframes=Yd(qB,qA(l[0],l[1])),l=[0,100]);const d=c({...t,keyframes:l});a==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=Pw(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=d}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:n,totalDuration:s,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:d=0,keyframes:u,repeat:h,repeatType:m,repeatDelay:f,type:y,onUpdate:x,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)),r?this.currentTime=t:this.updateTime(t);const g=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let w=this.currentTime,j=n;if(h){const N=Math.min(this.currentTime,s)/l;let T=Math.floor(N),P=N%1;!P&&N>=1&&(P=1),P===1&&T--,T=Math.min(T,h+1),!!(T%2)&&(m==="reverse"?(P=1-P,f&&(P-=f/l)):m==="mirror"&&(j=o)),w=Kn(0,1,P)*l}const k=v?{done:!1,value:u[0]}:j.next(w);a&&(k.value=a(k.value));let{done:S}=k;!v&&c!==null&&(S=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return _&&y!==Zy&&(k.value=Iw(u,this.options,b,this.speed)),x&&x(k.value),_&&this.finish(),k}then(t,r){return this.finished.then(t,r)}get duration(){return Ur(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ur(t)}get time(){return Ur(this.currentTime)}set time(t){var r;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),(r=this.driver)==null||r.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(nr.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Ur(this.currentTime))}play(){var s,a;if(this.isStopped)return;const{driver:t=TB,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(a=(s=this.options).onPlay)==null||a.call(s);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),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(nr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(t=this.options).onComplete)==null||r.call(t)}cancel(){var t,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(t=this.options).onCancel)==null||r.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 r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),t.observe(this)}}function GB(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const da=e=>e*180/Math.PI,Xy=e=>{const t=da(Math.atan2(e[1],e[0]));return ex(t)},KB={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Xy,rotateZ:Xy,skewX:e=>da(Math.atan(e[1])),skewY:e=>da(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ex=e=>(e=e%360,e<0&&(e+=360),e),e1=Xy,t1=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),r1=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),YB={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:t1,scaleY:r1,scale:e=>(t1(e)+r1(e))/2,rotateX:e=>ex(da(Math.atan2(e[6],e[5]))),rotateY:e=>ex(da(Math.atan2(-e[2],e[0]))),rotateZ:e1,rotate:e1,skewX:e=>da(Math.atan(e[4])),skewY:e=>da(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function tx(e){return e.includes("scale")?1:0}function rx(e,t){if(!e||e==="none")return tx(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,s;if(r)n=YB,s=r;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=KB,s=l}if(!s)return tx(t);const a=n[t],o=s[1].split(",").map(QB);return typeof a=="function"?a(o):o[a]}const JB=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return rx(r,t)};function QB(e){return parseFloat(e.trim())}const Ul=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Vl=new Set(Ul),n1=e=>e===Bl||e===ee,ZB=new Set(["x","y","z"]),XB=Ul.filter(e=>!ZB.has(e));function e6(e){const t=[];return XB.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const hi={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),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})=>rx(t,"x"),y:(e,{transform:t})=>rx(t,"y")};hi.translateX=hi.x;hi.translateY=hi.y;const _a=new Set;let nx=!1,sx=!1,ix=!1;function JA(){if(sx){const e=Array.from(_a).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const s=e6(n);s.length&&(r.set(n,s),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const s=r.get(n);s&&s.forEach(([a,o])=>{var l;(l=n.getValue(a))==null||l.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}sx=!1,nx=!1,_a.forEach(e=>e.complete(ix)),_a.clear()}function QA(){_a.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(sx=!0)})}function t6(){ix=!0,QA(),JA(),ix=!1}class Dw{constructor(t,r,n,s,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=s,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(_a.add(this),nx||(nx=!0,Qe.read(QA),Qe.resolveKeyframes(JA))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:s}=this;if(t[0]===null){const a=s==null?void 0:s.get(),o=t[t.length-1];if(a!==void 0)t[0]=a;else if(n&&r){const l=n.readValue(r,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),s&&a===void 0&&s.set(t[0])}GB(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),_a.delete(this)}cancel(){this.state==="scheduled"&&(_a.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const r6=e=>e.startsWith("--");function n6(e,t,r){r6(t)?e.style.setProperty(t,r):e.style[t]=r}const s6=Sw(()=>window.ScrollTimeline!==void 0),i6={};function a6(e,t){const r=Sw(e);return()=>i6[t]??r()}const ZA=a6(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),jc=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,s1={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:jc([0,.65,.55,1]),circOut:jc([.55,0,1,.45]),backIn:jc([.31,.01,.66,-.59]),backOut:jc([.33,1.53,.69,.99])};function XA(e,t){if(e)return typeof e=="function"?ZA()?GA(e,t):"ease-out":DA(e)?jc(e):Array.isArray(e)?e.map(r=>XA(r,t)||s1.easeOut):s1[e]}function o6(e,t,r,{delay:n=0,duration:s=300,repeat:a=0,repeatType:o="loop",ease:l="easeOut",times:c}={},d=void 0){const u={[t]:r};c&&(u.offset=c);const h=XA(l,s);Array.isArray(h)&&(u.easing=h);const m={delay:n,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"};return d&&(m.pseudoElement=d),e.animate(u,m)}function eT(e){return typeof e=="function"&&"applyToOptions"in e}function l6({type:e,...t}){return eT(e)&&ZA()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class c6 extends Ow{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:r,name:n,keyframes:s,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=t,wl(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=l6(t);this.animation=o6(r,n,s,d,a),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const u=Iw(s,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(u):n6(r,n,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,r;(r=(t=this.animation).finish)==null||r.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 r,n,s;const t=(r=this.options)==null?void 0:r.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(n=this.animation).commitStyles)==null||s.call(n))}get duration(){var r,n;const t=((n=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:n.call(r).duration)||0;return Ur(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ur(t)}get time(){return Ur(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=gn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&s6()?(this.animation.timeline=t,Hr):r(this)}}const tT={anticipate:PA,backInOut:RA,circInOut:OA};function d6(e){return e in tT}function u6(e){typeof e.ease=="string"&&d6(e.ease)&&(e.ease=tT[e.ease])}const Mp=10;class h6 extends c6{constructor(t){u6(t),YA(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:n,onComplete:s,element:a,...o}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const l=new Mw({...o,autoplay:!1}),c=Math.max(Mp,nr.now()-this.startTime),d=Kn(0,Mp,c-Mp);r.setWithVelocity(l.sample(Math.max(0,c-d)).value,l.sample(c).value,d),l.stop()}}const i1=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Oi.test(e)||e==="0")&&!e.startsWith("url("));function m6(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function f6(e,t,r,n){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=i1(s,t),l=i1(a,t);return mf(o===l,`You are trying to animate ${t} from "${s}" to "${a}". "${o?a:s}" is not an animatable value.`,"value-not-animatable"),!o||!l?!1:m6(e)||(r==="spring"||eT(r))&&n}function ax(e){e.duration=0,e.type="keyframes"}const p6=new Set(["opacity","clipPath","filter","transform"]),g6=Sw(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function y6(e){var u;const{motionValue:t,name:r,repeatDelay:n,repeatType:s,damping:a,type:o}=e;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return g6()&&r&&p6.has(r)&&(r!=="transform"||!d)&&!c&&!n&&s!=="mirror"&&a!==0&&o!=="inertia"}const x6=40;class v6 extends Ow{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:s=0,repeatDelay:a=0,repeatType:
468o="loop",keyframes:l,name:c,motionValue:d,element:u,...h}){var y;super(),this.stop=()=>{var x,b;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=nr.now();const m={autoplay:t,delay:r,type:n,repeat:s,repeatDelay:a,repeatType:o,name:c,motionValue:d,element:u,...h},f=(u==null?void 0:u.KeyframeResolver)||Dw;this.keyframeResolver=new f(l,(x,b,g)=>this.onKeyframesResolved(x,b,m,!g),c,d,u),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,r,n,s){var b,g;this.keyframeResolver=void 0;const{name:a,type:o,velocity:l,delay:c,isHandoff:d,onUpdate:u}=n;this.resolvedAt=nr.now(),f6(t,a,o,l)||((_s.instantAnimations||!c)&&(u==null||u(Iw(t,n,r))),t[0]=t[t.length-1],ax(n),n.repeat=0);const m={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>x6?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},f=!d&&y6(m),y=(g=(b=m.motionValue)==null?void 0:b.owner)==null?void 0:g.current,x=f?new h6({...m,element:y}):new Mw(m);x.finished.then(()=>{this.notifyFinished()}).catch(Hr),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),t6()),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 rT(e,t,r,n=0,s=1){const a=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),o=e.size,l=(o-1)*n;return typeof r=="function"?r(a,o):s===1?a*n:l-a*n}const w6=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function b6(e){const t=w6.exec(e);if(!t)return[,];const[,r,n,s]=t;return[`--${r??n}`,s]}const j6=4;function nT(e,t,r=1){wl(r<=j6,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,s]=b6(e);if(!n)return;const a=window.getComputedStyle(t).getPropertyValue(n);if(a){const o=a.trim();return kA(o)?parseFloat(o):o}return Aw(s)?nT(s,t,r+1):s}const k6={type:"spring",stiffness:500,damping:25,restSpeed:10},S6=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),_6={type:"keyframes",duration:.8},N6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},C6=(e,{keyframes:t})=>t.length>2?_6:Vl.has(e)?e.startsWith("scale")?S6(t[1]):k6:N6,A6=e=>e!==null;function T6(e,{repeat:t,repeatType:r="loop"},n){const s=e.filter(A6),a=t&&r!=="loop"&&t%2===1?0:s.length-1;return!a||n===void 0?s[a]:n}function sT(e,t){if(e!=null&&e.inherit&&t){const{inherit:r,...n}=e;return{...t,...n}}return e}function Lw(e,t){const r=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return r!==e?sT(r,e):r}function E6({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:a,repeatType:o,repeatDelay:l,from:c,elapsed:d,...u}){return!!Object.keys(u).length}const $w=(e,t,r,n={},s,a)=>o=>{const l=Lw(n,e)||{},c=l.delay||n.delay||0;let{elapsed:d=0}=n;d=d-gn(c);const u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-d,onUpdate:m=>{t.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:s};E6(l)||Object.assign(u,C6(e,u)),u.duration&&(u.duration=gn(u.duration)),u.repeatDelay&&(u.repeatDelay=gn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ax(u),u.delay===0&&(h=!0)),(_s.instantAnimations||_s.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(h=!0,ax(u),u.delay=0),u.allowFlatten=!l.type&&!l.ease,h&&!a&&t.get()!==void 0){const m=T6(u.keyframes,l);if(m!==void 0){Qe.update(()=>{u.onUpdate(m),u.onComplete()});return}}return l.isSync?new Mw(u):new v6(u)};function a1(e){const t=[{},{}];
vendor: 5,720 bytes, line 468
468return e==null||e.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function Fw(e,t,r,n){if(typeof t=="function"){const[s,a]=a1(n);t=t(r!==void 0?r:e.custom,s,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,a]=a1(n);t=t(r!==void 0?r:e.custom,s,a)}return t}function zo(e,t,r){const n=e.getProps();return Fw(n,t,r!==void 0?r:n.custom,e)}const iT=new Set(["width","height","top","left","right","bottom",...Ul]),o1=30,R6=e=>!isNaN(parseFloat(e));class P6{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var a;const s=nr.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=nr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=R6(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new _w);const n=this.events[t].add(r);return t==="change"?()=>{n(),Qe.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&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=nr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>o1)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,o1);return NA(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),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,r;(t=this.dependents)==null||t.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function bl(e,t){return new P6(e,t)}const ox=e=>Array.isArray(e);function I6(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,bl(r))}function O6(e){return ox(e)?e[e.length-1]||0:e}function M6(e,t){const r=zo(e,t);let{transitionEnd:n={},transition:s={},...a}=r||{};a={...a,...n};for(const o in a){const l=O6(a[o]);I6(e,o,l)}}const Qt=e=>!!(e&&e.getVelocity);function D6(e){return!!(Qt(e)&&e.add)}function lx(e,t){const r=e.getValue("willChange");if(D6(r))return r.add(t);if(!r&&_s.WillChange){const n=new _s.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function Bw(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const L6="framerAppearId",aT="data-"+Bw(L6);function oT(e){return e.props[aT]}function $6({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function lT(e,t,{delay:r=0,transitionOverride:n,type:s}={}){let{transition:a,transitionEnd:o,...l}=t;const c=e.getDefaultTransition();a=a?sT(a,c):c;const d=a==null?void 0:a.reduceMotion;n&&(a=n);const u=[],h=s&&e.animationState&&e.animationState.getState()[s];for(const m in l){const f=e.getValue(m,e.latestValues[m]??null),y=l[m];if(y===void 0||h&&$6(h,m))continue;const x={delay:r,...Lw(a||{},m)},b=f.get();if(b!==void 0&&!f.isAnimating&&!Array.isArray(y)&&y===b&&!x.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const j=oT(e);if(j){const k=window.MotionHandoffAnimation(j,m,Qe);k!==null&&(x.startTime=k,g=!0)}}lx(e,m);const v=d??e.shouldReduceMotion;f.start($w(m,f,y,v&&iT.has(m)?{type:!1}:x,e,g));const w=f.animation;w&&u.push(w)}if(o){const m=()=>Qe.update(()=>{o&&M6(e,o)});u.length?Promise.all(u).then(m):m()}return u}function cx(e,t,r={}){var c;const n=zo(e,t,r.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(s=r.transitionOverride);const a=n?()=>Promise.all(lT(e,n,r)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:m}=s;return F6(e,t,d,u,h,m,r)}:()=>Promise.resolve(),{when:l}=s;if(l){const[d,u]=l==="beforeChildren"?[a,o]:[o,a];return d().then(()=>u())}else return Promise.all([a(),o(r.delay)])}function F6(e,t,r=0,n=0,s=0,a=1,o){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(cx(c,t,{...o,delay:r+(typeof n=="function"?0:n)+rT(e.variantChildren,c,n,s,a)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function B6(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const s=t.map(a=>cx(e,a,r));n=Promise.all(s)}else if(typeof t=="string")n=cx(e,t,r);else{const s=typeof t=="function"?zo(e,t,r.custom):t;n=Promise.all(lT(e,s,r))}return n.then(()=>
vendor: 3,820 bytes, line 468
468{e.notify("AnimationComplete",t)})}const U6={test:e=>e==="auto",parse:e=>e},cT=e=>t=>t.test(e),dT=[Bl,ee,Hn,Ws,mB,hB,U6],l1=e=>dT.find(cT(e));function V6(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||_A(e):!0}const H6=new Set(["brightness","contrast","saturate","opacity"]);function z6(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(Tw)||[];if(!n)return e;const s=r.replace(n,"");let a=H6.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+s+")"}const W6=/\b([a-z-]*)\(.*?\)/gu,dx={...Oi,getAnimatableNone:e=>{const t=e.match(W6);return t?t.map(z6).join(" "):e}},c1={...Bl,transform:Math.round},q6={rotate:Ws,rotateX:Ws,rotateY:Ws,rotateZ:Ws,scale:Eu,scaleX:Eu,scaleY:Eu,scaleZ:Eu,skew:Ws,skewX:Ws,skewY:Ws,distance:ee,translateX:ee,translateY:ee,translateZ:ee,x:ee,y:ee,z:ee,perspective:ee,transformPerspective:ee,opacity:yd,originX:Yj,originY:Yj,originZ:ee},Uw={borderWidth:ee,borderTopWidth:ee,borderRightWidth:ee,borderBottomWidth:ee,borderLeftWidth:ee,borderRadius:ee,borderTopLeftRadius:ee,borderTopRightRadius:ee,borderBottomRightRadius:ee,borderBottomLeftRadius:ee,width:ee,maxWidth:ee,height:ee,maxHeight:ee,top:ee,right:ee,bottom:ee,left:ee,inset:ee,insetBlock:ee,insetBlockStart:ee,insetBlockEnd:ee,insetInline:ee,insetInlineStart:ee,insetInlineEnd:ee,padding:ee,paddingTop:ee,paddingRight:ee,paddingBottom:ee,paddingLeft:ee,paddingBlock:ee,paddingBlockStart:ee,paddingBlockEnd:ee,paddingInline:ee,paddingInlineStart:ee,paddingInlineEnd:ee,margin:ee,marginTop:ee,marginRight:ee,marginBottom:ee,marginLeft:ee,marginBlock:ee,marginBlockStart:ee,marginBlockEnd:ee,marginInline:ee,marginInlineStart:ee,marginInlineEnd:ee,fontSize:ee,backgroundPositionX:ee,backgroundPositionY:ee,...q6,zIndex:c1,fillOpacity:yd,strokeOpacity:yd,numOctaves:c1},G6={...Uw,color:kt,backgroundColor:kt,outlineColor:kt,fill:kt,stroke:kt,borderColor:kt,borderTopColor:kt,borderRightColor:kt,borderBottomColor:kt,borderLeftColor:kt,filter:dx,WebkitFilter:dx},uT=e=>G6[e];function hT(e,t){let r=uT(e);return r!==dx&&(r=Oi),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const K6=new Set(["auto","none","0"]);function Y6(e,t,r){let n=0,s;for(;n<e.length&&!s;){const a=e[n];typeof a=="string"&&!K6.has(a)&&xd(a).values.length&&(s=e[n]),n++}if(s&&r)for(const a of t)e[a]=hT(r,s)}class J6 extends Dw{constructor(t,r,n,s,a){super(t,r,n,s,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let h=t[u];if(typeof h=="string"&&(h=h.trim(),Aw(h))){const m=nT(h,r.current);m!==void 0&&(t[u]=m),u===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!iT.has(n)||t.length!==2)return;const[s,a]=t,o=l1(s),l=l1(a),c=Kj(s),d=Kj(a);if(c!==d&&hi[n]){this.needsMeasurement=!0;return}if(o!==l)if(n1(o)&&n1(l))for(let u=0;u<t.length;u++){const h=t[u];typeof h=="string"&&(t[u]=parseFloat(h))}else hi[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,n=[];for(let s=0;s<t.length;s++)(t[s]===null||V6(t[s]))&&n.push(s);n.length&&Y6(t,n,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=hi[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const s=r[r.length-1];s!==void 0&&t.getValue(n,s).jump(s,!1)}measureEndState(){var l;const{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const s=t.getValue(r);s&&s.jump(this.measuredOrigin,!1);const a=n.length-1,o=n[a];n[a]=hi[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEac
vendor: 7,417 bytes, line 468
468h(([c,d])=>{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function mT(e,t,r){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(n=>n!=null)}const fT=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ux(e){return SA(e)&&"offsetHeight"in e}const{schedule:Vw,cancel:XQ}=LA(queueMicrotask,!1),rn={x:!1,y:!1};function pT(){return rn.x||rn.y}function Q6(e){return e==="x"||e==="y"?rn[e]?null:(rn[e]=!0,()=>{rn[e]=!1}):rn.x||rn.y?null:(rn.x=rn.y=!0,()=>{rn.x=rn.y=!1})}function gT(e,t){const r=mT(e),n=new AbortController,s={passive:!0,...t,signal:n.signal};return[r,s,()=>n.abort()]}function Z6(e){return!(e.pointerType==="touch"||pT())}function X6(e,t,r={}){const[n,s,a]=gT(e,r);return n.forEach(o=>{let l=!1,c=!1,d;const u=()=>{o.removeEventListener("pointerleave",y)},h=b=>{d&&(d(b),d=void 0),u()},m=b=>{l=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),c&&(c=!1,h(b))},f=()=>{l=!0,window.addEventListener("pointerup",m,s),window.addEventListener("pointercancel",m,s)},y=b=>{if(b.pointerType!=="touch"){if(l){c=!0;return}h(b)}},x=b=>{if(!Z6(b))return;c=!1;const g=t(o,b);typeof g=="function"&&(d=g,o.addEventListener("pointerleave",y,s))};o.addEventListener("pointerenter",x,s),o.addEventListener("pointerdown",f,s)}),a}const yT=(e,t)=>t?e===t?!0:yT(e,t.parentElement):!1,Hw=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,e8=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function t8(e){return e8.has(e.tagName)||e.isContentEditable===!0}const r8=new Set(["INPUT","SELECT","TEXTAREA"]);function n8(e){return r8.has(e.tagName)||e.isContentEditable===!0}const fh=new WeakSet;function d1(e){return t=>{t.key==="Enter"&&e(t)}}function Dp(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const s8=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=d1(()=>{if(fh.has(r))return;Dp(r,"down");const s=d1(()=>{Dp(r,"up")}),a=()=>Dp(r,"cancel");r.addEventListener("keyup",s,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function u1(e){return Hw(e)&&!pT()}const h1=new WeakSet;function i8(e,t,r={}){const[n,s,a]=gT(e,r),o=l=>{const c=l.currentTarget;if(!u1(l)||h1.has(l))return;fh.add(c),r.stopPropagation&&h1.add(l);const d=t(c,l),u=(f,y)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",m),fh.has(c)&&fh.delete(c),u1(f)&&typeof d=="function"&&d(f,{success:y})},h=f=>{u(f,c===window||c===document||r.useGlobalTarget||yT(c,f.target))},m=f=>{u(f,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",m,s)};return n.forEach(l=>{(r.useGlobalTarget?window:l).addEventListener("pointerdown",o,s),ux(l)&&(l.addEventListener("focus",d=>s8(d,s)),!t8(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}function zw(e){return SA(e)&&"ownerSVGElement"in e}const ph=new WeakMap;let qs;const xT=(e,t,r)=>(n,s)=>s&&s[0]?s[0][e+"Size"]:zw(n)&&"getBBox"in n?n.getBBox()[t]:n[r],a8=xT("inline","width","offsetWidth"),o8=xT("block","height","offsetHeight");function l8({target:e,borderBoxSize:t}){var r;(r=ph.get(e))==null||r.forEach(n=>{n(e,{get width(){return a8(e,t)},get height(){return o8(e,t)}})})}function c8(e){e.forEach(l8)}function d8(){typeof ResizeObserver>"u"||(qs=new ResizeObserver(c8))}function u8(e,t){qs||d8();const r=mT(e);return r.forEach(n=>{let s=ph.get(n);s||(s=new Set,ph.set(n,s)),s.add(t),qs==null||qs.observe(n)}),()=>{r.forEach(n=>{const s=ph.get(n);s==null||s.delete(t),s!=null&&s.size||qs==null||qs.unobserve(n)})}}const gh=new Set;let To;function h8(){To=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};gh.forEach(t=>t(e))},window.addEventListener("resize",To)}function m8(e){return gh.add(e),To||h8(),()=>{gh.delete(e),!gh.size&&typeof To=="function"&&(window.removeEventListener("resize",To),To=void 0)}}function m1(e,t){return typeof e=="function"?m8(e):u8(e,t)}function f8(e){return zw(e)&&e.tagName==="svg"}const p8=[...dT,kt,Oi],g8=e=>p8.find(cT(e)),f1=()=>({translate:0,scale:1,origin:0,originPoint:0}),Eo=()=>({x:f1(),y:f1()}),p1=()=>({min:0,max:0}),Nt=()=>({x:p1(),y:p1()}),hx={current:null},vT={current:!1},y8=typeof window<"u";function x8(){if(vT.current=!0,!!y8)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>hx.current=e.matches;e.addEventListener("change",t),t()}else hx.current=!1}const v8=new WeakMap;function ff(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function vd(e){return typeof e=="string"||Array.isArray(e)}const Ww=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qw=["initial",...Ww];function pf(e){return ff(e.animate)||qw.some(t=>vd(e[t]))}function wT(e){return!!(pf(e)||e.variants)}function w8(e,t,r){for(const n in t){const s=t[n],a=r[n];if(Qt(s))e.addValue(n,s);else if(Qt(a))e.addValue(n,bl(s,{owner:e}));else if(a!==s)if(e.hasValue(n)){const o=e.getValue(n);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(n);e.addValue(n,bl(o!==void 0?o:s,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const g1=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let im={};function bT(e){im=e}function b8(){return im}class j8{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:s,skipAnimations:a,blockInitialAnimation:o,visualState:l},c={}){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=Dw,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 f=nr.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Qe.render(this.render,!1,!0))};const{latestValues:d,renderState:u}=l;this.latestValues=d,this.baseTarget={...d},this.initialValues=r.initial?{...d}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=a,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=pf(r),this.isVariantNode=wT(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...m}=this.scrapeMotionValuesFromProps(r,{},this);for(const f in m){const y=m[f];d[f]!==void 0&&Qt(y)&&y.set(d[f])}}mount(t){var r,n;if(this.hasBeenMounted)for(const s in this.initialValues)(r=this.values.get(s))==null||r.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,v8.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.forEac
vendor: 10,159 bytes, line 468
468h((s,a)=>this.bindToMotionValue(a,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(vT.current||x8(),this.shouldReduceMotion=hx.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Ii(this.notifyUpdate),Ii(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const r in this.events)this.events[r].clear();for(const r in this.features){const n=this.features[r];n&&(n.unmount(),n.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,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Vl.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=r.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Qe.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{s(),a&&a(),r.owner&&r.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 im){const r=im[t];if(!r)continue;const{isEnabled:n,Feature:s}=r;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Nt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<g1.length;n++){const s=g1[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const a="on"+s,o=t[a];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=w8(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 r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=bl(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(kA(n)||_A(n))?n=parseFloat(n):!g8(n)&&Oi.test(r)&&(n=hT(t,r)),this.setBaseTarget(t,Qt(n)?n.get():n)),Qt(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var a;const{initial:r}=this.props;let n;if(typeof r=="string"||typeof r=="object"){const o=Fw(this.props,r,(a=this.presenceContext)==null?void 0:a.custom);o&&(n=o[t])}if(r&&n!==void 0)return n;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Qt(s)?s:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new _w),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){Vw.render(this.render)}}class jT extends j8{constructor(){super(...arguments),this.KeyframeResolver=J6}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){const n=t.style;return n?n[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Qt(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}class Ui{constructor(t){this.isMounted=!1,this.node=t}update(){}}function kT({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function k8({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function S8(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function Lp(e){return e===void 0||e===1}function mx({scale:e,scaleX:t,scaleY:r}){return!Lp(e)||!Lp(t)||!Lp(r)}function ra(e){return mx(e)||ST(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ST(e){return y1(e.x)||y1(e.y)}function y1(e){return e&&e!=="0%"}function am(e,t,r){const n=e-r,s=t*n;return r+s}function x1(e,t,r,n,s){return s!==void 0&&(e=am(e,s,n)),am(e,r,n)+t}function fx(e,t=0,r=1,n,s){e.min=x1(e.min,t,r,n,s),e.max=x1(e.max,t,r,n,s)}function _T(e,{x:t,y:r}){fx(e.x,t.translate,t.scale,t.originPoint),fx(e.y,r.translate,r.scale,r.originPoint)}const v1=.999999999999,w1=1.0000000000001;function _8(e,t,r,n=!1){const s=r.length;if(!s)return;t.x=t.y=1;let a,o;for(let l=0;l<s;l++){a=r[l],o=a.projectionDelta;const{visualElement:c}=a.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Po(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,_T(e,o)),n&&ra(a.latestValues)&&Po(e,a.latestValues))}t.x<w1&&t.x>v1&&(t.x=1),t.y<w1&&t.y>v1&&(t.y=1)}function Ro(e,t){e.min=e.min+t,e.max=e.max+t}function b1(e,t,r,n,s=.5){const a=ct(e.min,e.max,s);fx(e,t,r,a,n)}function Po(e,t){b1(e.x,t.x,t.scaleX,t.scale,t.originX),b1(e.y,t.y,t.scaleY,t.scale,t.originY)}function NT(e,t){return kT(S8(e.getBoundingClientRect(),t))}function N8(e,t,r){const n=NT(e,r),{scroll:s}=t;return s&&(Ro(n.x,s.offset.x),Ro(n.y,s.offset.y)),n}const C8={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},A8=Ul.length;function T8(e,t,r){let n="",s=!0;for(let a=0;a<A8;a++){const o=Ul[a],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(o.startsWith("scale")?1:0);else{const d=parseFloat(l);c=o.startsWith("scale")?d===1:d===0}if(!c||r){const d=fT(l,Uw[o]);if(!c){s=!1;const u=C8[o]||o;n+=`${u}(${d}) `}r&&(t[o]=d)}}return n=n.trim(),r?n=r(t,s?"":n):s&&(n="none"),n}function Gw(e,t,r){const{style:n,vars:s,transformOrigin:a}=e;let o=!1,l=!1;for(const c in t){const d=t[c];if(Vl.has(c)){o=!0;continue}else if(FA(c)){s[c]=d;continue}else{const u=fT(d,Uw[c]);c.startsWith("origin")?(l=!0,a[c]=u):n[c]=u}}if(t.transform||(o||r?n.transform=T8(t,e.transform,r):n.transform&&(n.transform="none")),l){const{originX:c="50%",originY:d="50%",originZ:u=0}=a;n.transformOrigin=`${c} ${d} ${u}`}}function CT(e,{style:t,vars:r},n,s){const a=e.style;let o;for(o in t)a[o]=t[o];s==null||s.applyProjectionStyles(a,n);for(o in r)a.setProperty(o,r[o])}function j1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const uc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ee.test(e))e=parseFloat(e);else return e;const r=j1(e,t.target.x),n=j1(e,t.target.y);return`${r}% ${n}%`}},E8={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,s=Oi.parse(e);if(s.length>5)return n;const a=Oi.createTransformer(e),o=typeof s[0]!="number"?1:0,l=r.x.scale*t.x,c=r.y.scale*t.y;s[0+o]/=l,s[1+o]/=c;const d=ct(l,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=d),typeof s[3+o]=="number"&&(s[3+o]/=d),a(s)}},px={borderRadius:{...uc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:uc,borderTopRightRadius:uc,borderBottomLeftRadius:uc,borderBottomRightRadius:uc,boxShadow:E8};function AT(e,{layout:t,layoutId:r}){return Vl.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!px[e]||e==="opacity")}function Kw(e,t,r){var o;const n=e.style,s=t==null?void 0:t.style,a={};if(!n)return a;for(const l in n)(Qt(n[l])||s&&Qt(s[l])||AT(l,e)||((o=r==null?void 0:r.getValue(l))==null?void 0:o.liveStyle)!==void 0)&&(a[l]=n[l]);return a}function R8(e){return window.getComputedStyle(e)}class P8 extends jT{constructor(){super(...arguments),this.type="html",this.renderInstance=CT}readValueFromInstance(t,r){var n;if(Vl.has(r))return(n=this.projection)!=null&&n.isProjecting?tx(r):JB(t,r);{const s=R8(t),a=(FA(r)?s.getPropertyValue(r):s[r])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:r}){return NT(t,r)}build(t,r,n){Gw(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return Kw(t,r,n)}}const I8={offset:"stroke-dashoffset",array:"stroke-dasharray"},O8={offset:"strokeDashoffset",array:"strokeDasharray"};function M8(e,t,r=1,n=0,s=!0){e.pathLength=1;const a=s?I8:O8;e[a.offset]=`${-n}`,e[a.array]=`${t} ${r}`}const D8=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function TT(e,{attrX:t,attrY:r,attrScale:n,pathLength:s,pathSpacing:a=1,pathOffset:o=0,...l}
vendor: 1,571 bytes, line 468
468,c,d,u){if(Gw(e,l,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:m}=e;h.transform&&(m.transform=h.transform,delete h.transform),(m.transform||h.transformOrigin)&&(m.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),m.transform&&(m.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete h.transformBox);for(const f of D8)h[f]!==void 0&&(m[f]=h[f],delete h[f]);t!==void 0&&(h.x=t),r!==void 0&&(h.y=r),n!==void 0&&(h.scale=n),s!==void 0&&M8(h,s,a,o,!1)}const ET=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"]),RT=e=>typeof e=="string"&&e.toLowerCase()==="svg";function L8(e,t,r,n){CT(e,t,void 0,n);for(const s in t.attrs)e.setAttribute(ET.has(s)?s:Bw(s),t.attrs[s])}function PT(e,t,r){const n=Kw(e,t,r);for(const s in e)if(Qt(e[s])||Qt(t[s])){const a=Ul.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[a]=e[s]}return n}class $8 extends jT{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Nt}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Vl.has(r)){const n=uT(r);return n&&n.default||0}return r=ET.has(r)?r:Bw(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return PT(t,r,n)}
vendor: 24,425 bytes, line 468
468build(t,r,n){TT(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,s){L8(t,r,n,s)}mount(t){this.isSVGTag=RT(t.tagName),super.mount(t)}}const F8=qw.length;function IT(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?IT(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<F8;r++){const n=qw[r],s=e.props[n];(vd(s)||s===!1)&&(t[n]=s)}return t}function OT(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}const B8=[...Ww].reverse(),U8=Ww.length;function V8(e){return t=>Promise.all(t.map(({animation:r,options:n})=>B6(e,r,n)))}function H8(e){let t=V8(e),r=k1(),n=!0;const s=c=>(d,u)=>{var m;const h=zo(e,u,c==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(h){const{transition:f,transitionEnd:y,...x}=h;d={...d,...x,...y}}return d};function a(c){t=c(e)}function o(c){const{props:d}=e,u=IT(e.parent)||{},h=[],m=new Set;let f={},y=1/0;for(let b=0;b<U8;b++){const g=B8[b],v=r[g],w=d[g]!==void 0?d[g]:u[g],j=vd(w),k=g===c?v.isActive:null;k===!1&&(y=b);let S=w===u[g]&&w!==d[g]&&j;if(S&&n&&e.manuallyAnimateOnMount&&(S=!1),v.protectedKeys={...f},!v.isActive&&k===null||!w&&!v.prevProp||ff(w)||typeof w=="boolean")continue;const _=z8(v.prevProp,w);let N=_||g===c&&v.isActive&&!S&&j||b>y&&j,T=!1;const P=Array.isArray(w)?w:[w];let A=P.reduce(s(g),{});k===!1&&(A={});const{prevResolvedValues:M={}}=v,z={...M,...A},$=q=>{N=!0,m.has(q)&&(T=!0,m.delete(q)),v.needsAnimating[q]=!0;const R=e.getValue(q);R&&(R.liveStyle=!1)};for(const q in z){const R=A[q],O=M[q];if(f.hasOwnProperty(q))continue;let V=!1;ox(R)&&ox(O)?V=!OT(R,O):V=R!==O,V?R!=null?$(q):m.add(q):R!==void 0&&m.has(q)?$(q):v.protectedKeys[q]=!0}v.prevProp=w,v.prevResolvedValues=A,v.isActive&&(f={...f,...A}),n&&e.blockInitialAnimation&&(N=!1);const ae=S&&_;N&&(!ae||T)&&h.push(...P.map(q=>{const R={type:g};if(typeof q=="string"&&n&&!ae&&e.manuallyAnimateOnMount&&e.parent){const{parent:O}=e,V=zo(O,q);if(O.enteringChildren&&V){const{delayChildren:he}=V.transition||{};R.delay=rT(O.enteringChildren,e,he)}}return{animation:q,options:R}}))}if(m.size){const b={};if(typeof d.initial!="boolean"){const g=zo(e,Array.isArray(d.initial)?d.initial[0]:d.initial);g&&g.transition&&(b.transition=g.transition)}m.forEach(g=>{const v=e.getBaseTarget(g),w=e.getValue(g);w&&(w.liveStyle=!0),b[g]=v??null}),h.push({animation:b})}let x=!!h.length;return n&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(x=!1),n=!1,x?t(h):Promise.resolve()}function l(c,d){var h;if(r[c].isActive===d)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(m=>{var f;return(f=m.animationState)==null?void 0:f.setActive(c,d)}),r[c].isActive=d;const u=o(c);for(const m in r)r[m].protectedKeys={};return u}return{animateChanges:o,setActive:l,setAnimateFunction:a,getState:()=>r,reset:()=>{r=k1()}}}function z8(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!OT(t,e):!1}function Qi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function k1(){return{animate:Qi(!0),whileInView:Qi(),whileHover:Qi(),whileTap:Qi(),whileDrag:Qi(),whileFocus:Qi(),exit:Qi()}}function S1(e,t){e.min=t.min,e.max=t.max}function en(e,t){S1(e.x,t.x),S1(e.y,t.y)}function _1(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const MT=1e-4,W8=1-MT,q8=1+MT,DT=.01,G8=0-DT,K8=0+DT;function sr(e){return e.max-e.min}function Y8(e,t,r){return Math.abs(e-t)<=r}function N1(e,t,r,n=.5){e.origin=n,e.originPoint=ct(t.min,t.max,e.origin),e.scale=sr(r)/sr(t),e.translate=ct(r.min,r.max,e.origin)-e.originPoint,(e.scale>=W8&&e.scale<=q8||isNaN(e.scale))&&(e.scale=1),(e.translate>=G8&&e.translate<=K8||isNaN(e.translate))&&(e.translate=0)}function Uc(e,t,r,n){N1(e.x,t.x,r.x,n?n.originX:void 0),N1(e.y,t.y,r.y,n?n.originY:void 0)}function C1(e,t,r){e.min=r.min+t.min,e.max=e.min+sr(t)}function J8(e,t,r){C1(e.x,t.x,r.x),C1(e.y,t.y,r.y)}function A1(e,t,r){e.min=t.min-r.min,e.max=e.min+sr(t)}function om(e,t,r){A1(e.x,t.x,r.x),A1(e.y,t.y,r.y)}function T1(e,t,r,n,s){return e-=t,e=am(e,1/r,n),s!==void 0&&(e=am(e,1/s,n)),e}function Q8(e,t=0,r=1,n=.5,s,a=e,o=e){if(Hn.test(t)&&(t=parseFloat(t),t=ct(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=ct(a.min,a.max,n);e===a&&(l-=t),e.min=T1(e.min,t,r,l,s),e.max=T1(e.max,t,r,l,s)}function E1(e,t,[r,n,s],a,o){Q8(e,t[r],t[n],t[s],t.scale,a,o)}const Z8=["x","scaleX","originX"],X8=["y","scaleY","originY"];function R1(e,t,r,n){E1(e.x,t,Z8,r?r.x:void 0,n?n.x:void 0),E1(e.y,t,X8,r?r.y:void 0,n?n.y:void 0)}function P1(e){return e.translate===0&&e.scale===1}function LT(e){return P1(e.x)&&P1(e.y)}function I1(e,t){return e.min===t.min&&e.max===t.max}function eU(e,t){return I1(e.x,t.x)&&I1(e.y,t.y)}function O1(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function $T(e,t){return O1(e.x,t.x)&&O1(e.y,t.y)}function M1(e){return sr(e.x)/sr(e.y)}function D1(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function An(e){return[e("x"),e("y")]}function tU(e,t,r){let n="";const s=e.x.translate/t.x,a=e.y.translate/t.y,o=(r==null?void 0:r.z)||0;if((s||a||o)&&(n=`translate3d(${s}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:d,rotate:u,rotateX:h,rotateY:m,skewX:f,skewY:y}=r;d&&(n=`perspective(${d}px) ${n}`),u&&(n+=`rotate(${u}deg) `),h&&(n+=`rotateX(${h}deg) `),m&&(n+=`rotateY(${m}deg) `),f&&(n+=`skewX(${f}deg) `),y&&(n+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(n+=`scale(${l}, ${c})`),n||"none"}const FT=["TopLeft","TopRight","BottomLeft","BottomRight"],rU=FT.length,L1=e=>typeof e=="string"?parseFloat(e):e,$1=e=>typeof e=="number"||ee.test(e);function nU(e,t,r,n,s,a){s?(e.opacity=ct(0,r.opacity??1,sU(n)),e.opacityExit=ct(t.opacity??1,0,iU(n))):a&&(e.opacity=ct(t.opacity??1,r.opacity??1,n));for(let o=0;o<rU;o++){const l=`border${FT[o]}Radius`;let c=F1(t,l),d=F1(r,l);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||$1(c)===$1(d)?(e[l]=Math.max(ct(L1(c),L1(d),n),0),(Hn.test(d)||Hn.test(c))&&(e[l]+="%")):e[l]=d}(t.rotate||r.rotate)&&(e.rotate=ct(t.rotate||0,r.rotate||0,n))}function F1(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const sU=BT(0,.5,IA),iU=BT(.5,.95,Hr);function BT(e,t,r){return n=>n<e?0:n>t?1:r(gd(e,t,n))}function aU(e,t,r){const n=Qt(e)?e:bl(e);return n.start($w("",n,t,r)),n.animation}function wd(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}const oU=(e,t)=>e.depth-t.depth;class lU{constructor(){this.children=[],this.isDirty=!1}add(t){jw(this.children,t),this.isDirty=!0}remove(t){kw(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(oU),this.isDirty=!1,this.children.forEach(t)}}function cU(e,t){const r=nr.now(),n=({timestamp:s})=>{const a=s-r;a>=t&&(Ii(n),e(a-t))};return Qe.setup(n,!0),()=>Ii(n)}function yh(e){return Qt(e)?e.get():e}class dU{constructor(){this.members=[]}add(t){jw(this.members,t),t.scheduleRender()}remove(t){if(kw(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(s=>t===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const a=this.members[s];if(a.isPresent!==!1){n=a;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender();const s=n.options.layoutDependency,a=t.options.layoutDependency;s!==void 0&&a!==void 0&&s===a||(t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:l}=t.options;l===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const xh={hasAnimatedSinceResize:!0,hasEverUpdated:!1},$p=["","X","Y","Z"],uU=1e3;let hU=0;function Fp(e,t,r,n){const{latestValues:s}=t;s[e]&&(r[e]=s[e],t.setStaticValue(e,0),n&&(n[e]=0))}function UT(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=oT(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:s,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Qe,!(s||a))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&UT(n)}function VT({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o={},l=t==null?void 0:t()){this.id=hU++,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(pU),this.nodes.forEach(vU),this.nodes.forEach(wU),this.nodes.forEach(gU)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new lU)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new _w),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=zw(o)&&!f8(o),this.instance=o;const{layoutId:l,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let u,h=0;const m=()=>this.root.updateBlockedByResize=!1;Qe.read(()=>{h=window.innerWidth}),e(o,()=>{const f=window.innerWidth;f!==h&&(h=f,this.root.updateBlockedByResize=!0,u&&u(),u=cU(m,250),xh.hasAnimatedSinceResize&&(xh.hasAnimatedSinceResize=!1,this.nodes.forEach(V1)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:m,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||d.getDefaultTransition()||_U,{onLayoutAnimationStart:x,onLayoutAnimationComplete:b}=d.getProps(),g=!this.targetLayout||!$T(this.targetLayout,f),v=!h&&m;if(this.options.layoutRoot||this.resumeFrom||v||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Lw(y,"layout"),onPlay:x,onComplete:b};(d.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,v)}else h||V1(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}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(),Ii(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(bU),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&&UT(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(B1);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(U1);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(xU),this.nodes.forEach(mU),this.nodes.forEach(fU)):this.nodes.forEach(U1),this.clearAllSnapshots();const l=nr.now();Mt.delta=Kn(0,1e3/60,l-Mt.timestamp),Mt.timestamp=l,Mt.isProcessing=!0,Ep.update.process(Mt),Ep.preRender.process(Mt),Ep.render.process(Mt),Mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vw.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yU),this.sharedNodes.forEach(jU)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Qe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Qe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!sr(this.snapshot.measuredBox.x)&&!sr(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Nt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!LT(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;o&&this.instance&&(l||ra(this.latestValues)||u)&&(s(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),NU(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:o}=this.options;if(!o)return Nt();const l=o.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(CU))){const{scroll:u}=this.root;u&&(Ro(l.x,u.offset.x),Ro(l.y,u.offset.y))}return l}removeElementScroll(o){var c;const l=Nt();if(en(l,o),(c=this.scroll)!=null&&c.wasRoot)return l;for(let d=0;d<this.path.length;d++){const u=this.path[d],{scroll:h,options:m}=u;u!==this.root&&h&&m.layoutScroll&&(h.wasRoot&&en(l,o),Ro(l.x,h.offset.x),Ro(l.y,h.offset.y))}return l}applyTransform(o,l=!1){const c=Nt();en(c,o);for(let d=0;d<this.path.length;d++){const u=this.path[d];!l&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Po(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),ra(u.latestValues)&&Po(c,u.latestValues)}return ra(this.latestValues)&&Po(c,this.latestValues),c}removeTransform(o){const l=Nt();en(l,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!ra(d.latestValues))continue;mx(d.latestValues)&&d.updateSnapshot();const u=Nt(),h=d.measurePageBox();en(u,h),R1(l,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,u)}return ra(this.latestValues)&&R1(l,this.latestValues),l}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!==Mt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=Mt.timestamp;const m=this.getClosestProjectingParent();m&&this.linkedParentVersion!==m.layoutVersion&&!m.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(m&&m.layout?this.createRelativeTarget(m,this.layout.layoutBox,m.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Nt(),this.targetWithTransforms=Nt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),J8(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):en(this.target,this.layout.layoutBox),_T(this.target,this.targetDelta)):en(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?this.createRelativeTarget(m,this.target,m.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||mx(this.parent.latestValues)||ST(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,l,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Nt(),this.relativeTargetOrigin=Nt(),om(this.relativeTargetOrigin,l,c),en(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var y;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Mt.timestamp&&(c=!1),c)return;const{layout:d,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||u))return;en(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;_8(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Nt());const{target:f}=o;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(_1(this.prevProjectionDelta.x,this.projectionDelta.x),_1(this.prevProjectionDelta.y,this.projectionDelta.y)),Uc(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==m||!D1(this.projectionDelta.x,this.prevProjectionDelta.x)||!D1(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Eo(),this.projectionDelta=Eo(),this.projectionDeltaWithTransform=Eo()}setAnimationOrigin(o,l=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},h=Eo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const m=Nt(),f=c?c.source:void 0,y=this.layout?this.layout.source:void 0,x=f!==y,b=this.getStack(),g=!b||b.members.length<=1,v=!!(x&&!g&&this.options.crossfade===!0&&!this.path.some(SU));this.animationProgress=0;let w;this.mixTargetDelta=j=>{const k=j/1e3;H1(h.x,o.x,k),H1(h.y,o.y,k),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(om(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kU(this.relativeTarget,this.relativeTargetOrigin,m,k),w&&eU(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Nt()),en(w,this.relativeTarget)),x&&(this.animationValues=u,nU(u,d,this.latestValues,k,v,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,c,d;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(d=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||d.stop(),this.pendingAnimation&&(Ii(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Qe.update(()=>{xh.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=bl(0)),this.currentAnimation=aU(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},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(uU),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:d,latestValues:u}=o;if(!(!l||!c||!d)){if(this!==o&&this.layout&&d&&HT(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||Nt();const h=sr(this.layout.layoutBox.x);
vendor: 5,324 bytes, line 468
468c.x.min=o.target.x.min,c.x.max=c.x.min+h;const m=sr(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+m}en(l,c),Po(l,u),Uc(this.projectionDeltaWithTransform,this.layoutCorrected,l,u)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new dU),this.sharedNodes.get(o).add(l);const d=l.options.initialPromotionConfig;l.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const d={};c.z&&Fp("z",o,d,this.animationValues);for(let u=0;u<$p.length;u++)Fp(`rotate${$p[u]}`,o,d,this.animationValues),Fp(`skew${$p[u]}`,o,d,this.animationValues);o.render();for(const u in d)o.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);o.scheduleRender()}applyProjectionStyles(o,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=yh(l==null?void 0:l.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=yh(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!ra(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=tU(this.projectionDeltaWithTransform,this.treeScale,u);c&&(h=c(u,h)),o.transform=h;const{x:m,y:f}=this.projectionDelta;o.transformOrigin=`${m.origin*100}% ${f.origin*100}% 0`,d.animationValues?o.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const y in px){if(u[y]===void 0)continue;const{correct:x,applyTo:b,isCSSVariable:g}=px[y],v=h==="none"?u[y]:x(u[y],d);if(b){const w=b.length;for(let j=0;j<w;j++)o[b[j]]=v}else g?this.options.visualElement.renderState.vars[y]=v:o[y]=v}this.options.layoutId&&(o.pointerEvents=d===this?yh(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(B1),this.root.sharedNodes.clear()}}}function mU(e){e.updateLayout()}function fU(e){var r;const t=((r=e.resumeFrom)==null?void 0:r.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;a==="size"?An(h=>{const m=o?t.measuredBox[h]:t.layoutBox[h],f=sr(m);m.min=n[h].min,m.max=m.min+f}):HT(a,t.layoutBox,n)&&An(h=>{const m=o?t.measuredBox[h]:t.layoutBox[h],f=sr(n[h]);m.max=m.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+f)});const l=Eo();Uc(l,n,t.layoutBox);const c=Eo();o?Uc(c,e.applyTransform(s,!0),t.measuredBox):Uc(c,n,t.layoutBox);const d=!LT(l);let u=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:m,layout:f}=h;if(m&&f){const y=Nt();om(y,t.layoutBox,m.layoutBox);const x=Nt();om(x,n,f.layoutBox),$T(y,x)||(u=!0),h.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=y,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:d,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function pU(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 gU(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yU(e){e.clearSnapshot()}function B1(e){e.clearMeasurements()}function U1(e){e.isLayoutDirty=!1}function xU(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 vU(e){e.resolveTargetDelta()}function wU(e){e.calcProjection()}
vendor: 11,636 bytes, lines 468-476
468function bU(e){e.resetSkewAndRotation()}function jU(e){e.removeLeadSnapshot()}function H1(e,t,r){e.translate=ct(t.translate,0,r),e.scale=ct(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function z1(e,t,r,n){e.min=ct(t.min,r.min,n),e.max=ct(t.max,r.max,n)}function kU(e,t,r,n){z1(e.x,t.x,r.x,n),z1(e.y,t.y,r.y,n)}function SU(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const _U={duration:.45,ease:[.4,0,.1,1]},W1=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),q1=W1("applewebkit/")&&!W1("chrome/")?Math.round:Hr;function G1(e){e.min=q1(e.min),e.max=q1(e.max)}function NU(e){G1(e.x),G1(e.y)}function HT(e,t,r){return e==="position"||e==="preserve-aspect"&&!Y8(M1(t),M1(r),.2)}function CU(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const AU=VT({attachResizeListener:(e,t)=>wd(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}),Bp={current:void 0},zT=VT({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bp.current){const e=new AU({});e.mount(window),e.setOptions({layoutScroll:!0}),Bp.current=e}return Bp.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Yw=p.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function K1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function TU(...e){return t=>{let r=!1;const n=e.map(s=>{const a=K1(s,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let s=0;s<n.length;s++){const a=n[s];typeof a=="function"?a():K1(e[s],null)}}}}function EU(...e){return p.useCallback(TU(...e),e)}class RU extends p.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const n=r.offsetParent,s=ux(n)&&n.offsetWidth||0,a=ux(n)&&n.offsetHeight||0,o=this.props.sizeRef.current;o.height=r.offsetHeight||0,o.width=r.offsetWidth||0,o.top=r.offsetTop,o.left=r.offsetLeft,o.right=s-o.width-o.left,o.bottom=a-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function PU({children:e,isPresent:t,anchorX:r,anchorY:n,root:s,pop:a}){var m;const o=p.useId(),l=p.useRef(null),c=p.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=p.useContext(Yw),u=((m=e.props)==null?void 0:m.ref)??(e==null?void 0:e.ref),h=EU(l,u);return p.useInsertionEffect(()=>{const{width:f,height:y,top:x,left:b,right:g,bottom:v}=c.current;if(t||a===!1||!l.current||!f||!y)return;const w=r==="left"?`left: ${b}`:`right: ${g}`,j=n==="bottom"?`bottom: ${v}`:`top: ${x}`;l.current.dataset.motionPopId=o;const k=document.createElement("style");d&&(k.nonce=d);const S=s??document.head;return S.appendChild(k),k.sheet&&k.sheet.insertRule(` 469 [data-motion-pop-id="${o}"] { 470 position: absolute !important; 471 width: ${f}px !important; 472 height: ${y}px !important; 473 ${w}px !important; 474 ${j}px !important; 475 } 476 `),()=>{S.contains(k)&&S.removeChild(k)}},[t]),i.jsx(RU,{isPresent:t,childRef:l,sizeRef:c,pop:a,children:a===!1?e:p.cloneElement(e,{ref:h})})}const IU=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:s,presenceAffectsLayout:a,mode:o,anchorX:l,anchorY:c,root:d})=>{const u=bw(OU),h=p.useId();let m=!0,f=p.useMemo(()=>(m=!1,{id:h,initial:t,isPresent:r,custom:s,onExitComplete:y=>{u.set(y,!0);for(const x of u.values())if(!x)return;n&&n()},register:y=>(u.set(y,!1),()=>u.delete(y))}),[r,u,n]);return a&&m&&(f={...f}),p.useMemo(()=>{u.forEach((y,x)=>u.set(x,!1))},[r]),p.useEffect(()=>{!r&&!u.size&&n&&n()},[r]),e=i.jsx(PU,{pop:o==="popLayout",isPresent:r,anchorX:l,anchorY:c,root:d,children:e}),i.jsx(hf.Provider,{value:f,children:e})};function OU(){return new Map}function WT(e=!0){const t=p.useContext(hf);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:s}=t,a=p.useId();p.useEffect(()=>{if(e)return s(a)},[e]);const o=p.useCallback(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,o]:[!0]}const Ru=e=>e.key||"";function Y1(e){const t=[];return p.Children.forEach(e,r=>{p.isValidElement(r)&&t.push(r)}),t}const MU=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:s=!0,mode:a="sync",propagate:o=!1,anchorX:l="left",anchorY:c="top",root:d})=>{const[u,h]=WT(o),m=p.useMemo(()=>Y1(e),[e]),f=o&&!u?[]:m.map(Ru),y=p.useRef(!0),x=p.useRef(m),b=bw(()=>new Map),g=p.useRef(new Set),[v,w]=p.useState(m),[j,k]=p.useState(m);jA(()=>{y.current=!1,x.current=m;for(let N=0;N<j.length;N++){const T=Ru(j[N]);f.includes(T)?(b.delete(T),g.current.delete(T)):b.get(T)!==!0&&b.set(T,!1)}},[j,f.length,f.join("-")]);const S=[];if(m!==v){let N=[...m];for(let T=0;T<j.length;T++){const P=j[T],A=Ru(P);f.includes(A)||(N.splice(T,0,P),S.push(P))}return a==="wait"&&S.length&&(N=S),k(Y1(N)),w(m),null}const{forceRender:_}=p.useContext(ww);return i.jsx(i.Fragment,{children:j.map(N=>{const T=Ru(N),P=o&&!u?!1:m===j||f.includes(T),A=()=>{if(g.current.has(T))return;if(g.current.add(T),b.has(T))b.set(T,!0);else return;let M=!0;b.forEach(z=>{z||(M=!1)}),M&&(_==null||_(),k(x.current),o&&(h==null||h()),n&&n())};return i.jsx(IU,{isPresent:P,initial:!y.current||r?void 0:!1,custom:t,presenceAffectsLayout:s,mode:a,root:d,onExitComplete:P?void 0:A,anchorX:l,anchorY:c,children:N},T)})})},qT=p.createContext({strict:!1}),J1={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 Q1=!1;function DU(){if(Q1)return;const e={};for(const t in J1)e[t]={isEnabled:r=>J1[t].some(n=>!!r[n])};bT(e),Q1=!0}function GT(){return DU(),b8()}function LU(e){const t=GT();for(const r in e)t[r]={...t[r],...e[r]};bT(t)}const $U=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 lm(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||$U.has(e)}let KT=e=>!lm(e);function FU(e){typeof e=="function"&&(KT=t=>t.startsWith("on")?!lm(t):e(t))}try{FU(require("@emotion/is-prop-valid").default)}catch{}function BU(e,t,r){const n={};for(const s in e)s==="values"&&typeof e.values=="object"||(KT(s)||r===!0&&lm(s)||!t&&!lm(s)||e.draggable&&s.startsWith("onDrag"))&&(n[s]=e[s]);return n}const gf=p.createContext({});function UU(e,t){if(pf(e)){const{initial:r,animate:n}=e;return{initial:r===!1||vd(r)?r:void 0,animate:vd(n)?n:void 0}}return e.inherit!==!1?t:{}}function VU(e){const{initial:t,animate:r}=UU(e,p.useContext(gf));return p.useMemo(()=>({initial:t,animate:r}),[Z1(t),Z1(r)])}function Z1(e){return Array.isArray(e)?e.join(" "):e}const Jw=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function YT(e,t,r){for(const n in t)!Qt(t[n])&&!AT(n,r)&&(e[n]=t[n])}function HU({transformTemplate:e},t){return p.useMemo(()=>{const r=Jw();return Gw(r,t,e),Object.assign({},r.vars,r.style)},[t])}function zU(e,t){const r=e.style||{},n={};return YT(n,r,e),Object.assign(n,HU(e,t)),n}function WU(e,t){const r={},n=zU(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const JT=()=>({...Jw(),attrs:{}});function qU(e,t,r,n){const s=p.useMemo(()=>{const a=JT();return TT(a,t,RT(n),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};YT(a,e.style,e),s.style={...a,...s.style}}return s}const GU=["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 Qw(e){return typeof e!="string"||e.includes("-")?!1:!!(GU.indexOf(e)>-1||/[A-Z]/u.test(e))}function KU(e,t,r,{latestValues:n},s,a=!1,o){const c=(o??Qw(e)?qU:WU)(t,n,s,e),d=BU(t,typeof e=="string",a),u=e!==p.Fragment?{...d,...c,ref:r}:{},{children:h}=t,m=p.useMemo(()=>Qt(h)?h.get():h,[h]);return p.createElement(e,{...u,children:m})}function YU({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,s){return{latestValues:JU(r,n,s,e),renderState:t()}}function JU(e,t,r,n){const s={},a=n(e,{});for(const m in a)s[m]=yh(a[m]);let{initial:o,animate:l}=e;const c=pf(e),d=wT(e);t&&d&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let u=r?r.initial===!1:!1;u=u||o===!1;const h=u?l:o;if(h&&typeof h!="boolean"&&!ff(h)){const m=Array.isArray(h)?h:[h];for(let f=0;f<m.length;f++){const y=Fw(e,m[f]);if(y){const{transitionEnd:x,transition:b,...g}=y;for(const v in g){let w=g[v];if(Array.isArray(w)){const j=u?w.length-1:0;w=w[j]}w!==null&&(s[v]=w)}for(const v in x)s[v]=x[v]}}}return s}const QT=e=>(t,r)=>{const n=p.useContext(gf),s=p.useContext(hf),a=()=>YU(e,t,n,s);return r?a():bw(a)},QU=QT({scrapeMotionValuesFromProps:Kw,createRenderState:Jw}),ZU=QT({scrapeMotionValuesFromProps:PT,createRenderState:JT}),XU=Symbol.for("motionComponentSymbol");function eV(e,t,r){const n=p.useRef(r);p.useInsertionEffect(()=>{n.current=r});const s=p.useRef(null);return p.useCallback(a=>{var l;a&&((l=e.onMount)==null||l.call(e,a)),t&&(a?t.mount(a):t.unmount());const o=n.current;if(typeof o=="function")if(a){const c=o(a);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):o(a);else o&&(o.current=a)},[t])}const ZT=p.createContext({});function uo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function tV(e,t,r,n,s,a){var w,j;const{visualElement:o}=p.useContext(gf),l=p.useContext(qT),c=p.useContext(hf),d=p.useContext(Yw),u=d.reducedMotion,h=d.skipAnimations,m=p.useRef(null),f=p.useRef(!1);n=n||l.renderer,!m.current&&n&&(m.current=n(e,{visualState:t,parent:o,props:r,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:h,isSVG:a}),f.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const y=m.current,x=p.useContext(ZT);y&&!y.projection&&s&&(y.type==="html"||y.type==="svg")&&rV(m.current,r,s,x);const b=p.useRef(!1);p.useInsertionEffect(()=>{y&&b.current&&y.update(r,c)});const g=r[aT],v=p.useRef(!!g&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,g))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,g)));return jA(()=>{f.current=!0,y&&(b.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),v.current&&y.animationState&&y.animationState.animateChanges())}),p.useEffect(()=>{y&&(!v.current&&y.animationState&&y.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var k;(k=window.MotionHandoffMarkAsComplete)==null||k.call(window,g)}
vendor: 22,537 bytes, line 476
476),v.current=!1),y.enteringChildren=void 0)}),y}function rV(e,t,r,n){const{layoutId:s,layout:a,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:d,layoutCrossfade:u}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:XT(e.parent)),e.projection.setOptions({layoutId:s,layout:a,alwaysMeasureLayout:!!o||l&&uo(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:c,layoutRoot:d})}function XT(e){if(e)return e.options.allowProjection!==!1?e.projection:XT(e.parent)}function Up(e,{forwardMotionProps:t=!1,type:r}={},n,s){n&&LU(n);const a=r?r==="svg":Qw(e),o=a?ZU:QU;function l(d,u){let h;const m={...p.useContext(Yw),...d,layoutId:nV(d)},{isStatic:f}=m,y=VU(d),x=o(d,f);if(!f&&bA){sV();const b=iV(m);h=b.MeasureLayout,y.visualElement=tV(e,x,m,s,b.ProjectionNode,a)}return i.jsxs(gf.Provider,{value:y,children:[h&&y.visualElement?i.jsx(h,{visualElement:y.visualElement,...m}):null,KU(e,d,eV(x,y.visualElement,u),x,f,t,a)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=p.forwardRef(l);return c[XU]=e,c}function nV({layoutId:e}){const t=p.useContext(ww).id;return t&&e!==void 0?t+"-"+e:e}function sV(e,t){p.useContext(qT).strict}function iV(e){const t=GT(),{drag:r,layout:n}=t;if(!r&&!n)return{};const s={...r,...n};return{MeasureLayout:r!=null&&r.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function aV(e,t){if(typeof Proxy>"u")return Up;const r=new Map,n=(a,o)=>Up(a,o,e,t),s=(a,o)=>n(a,o);return new Proxy(s,{get:(a,o)=>o==="create"?n:(r.has(o)||r.set(o,Up(o,void 0,e,t)),r.get(o))})}const oV=(e,t)=>t.isSVG??Qw(e)?new $8(t):new P8(t,{allowProjection:e!==p.Fragment});class lV extends Ui{constructor(t){super(t),t.animationState||(t.animationState=H8(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ff(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let cV=0;class dV extends Ui{constructor(){super(...arguments),this.id=cV++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const s=this.node.animationState.setActive("exit",!t);r&&!t&&s.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const uV={animation:{Feature:lV},exit:{Feature:dV}};function Zd(e){return{point:{x:e.pageX,y:e.pageY}}}const hV=e=>t=>Hw(t)&&e(t,Zd(t));function Vc(e,t,r,n){return wd(e,t,hV(r),n)}const eE=({current:e})=>e?e.ownerDocument.defaultView:null,X1=(e,t)=>Math.abs(e-t);function mV(e,t){const r=X1(e.x,t.x),n=X1(e.y,t.y);return Math.sqrt(r**2+n**2)}const ek=new Set(["auto","scroll"]);class tE{constructor(t,r,{transformPagePoint:n,contextWindow:s=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Hp(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,x=mV(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!x)return;const{point:b}=f,{timestamp:g}=Mt;this.history.push({...b,timestamp:g});const{onStart:v,onMove:w}=this.handlers;y||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,f)},this.handlePointerMove=(f,y)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Vp(y,this.transformPagePoint),Qe.update(this.updatePoint,!0)},this.handlePointerUp=(f,y)=>{this.end();const{onEnd:x,onSessionEnd:b,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Hp(f.type==="pointercancel"?this.lastMoveEventInfo:Vp(y,this.transformPagePoint),this.history);this.startEvent&&x&&x(f,v),b&&b(f,v)},!Hw(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=s||window;const c=Zd(t),d=Vp(c,this.transformPagePoint),{point:u}=d,{timestamp:h}=Mt;this.history=[{...u,timestamp:h}];const{onSessionStart:m}=r;m&&m(t,Hp(d,this.history)),this.removeListeners=Yd(Vc(this.contextWindow,"pointermove",this.handlePointerMove),Vc(this.contextWindow,"pointerup",this.handlePointerUp),Vc(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let r=t.parentElement;for(;r;){const n=getComputedStyle(r);(ek.has(n.overflowX)||ek.has(n.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const r=this.scrollPositions.get(t);if(!r)return;const n=t===window,s=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},a={x:s.x-r.x,y:s.y-r.y};a.x===0&&a.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(t,s),Qe.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ii(this.updatePoint)}}function Vp(e,t){return t?{point:t(e.point)}:e}function tk(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Hp({point:e},t){return{point:e,delta:tk(e,rE(t)),offset:tk(e,fV(t)),velocity:pV(t,.1)}}function fV(e){return e[0]}function rE(e){return e[e.length-1]}function pV(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const s=rE(e);for(;r>=0&&(n=e[r],!(s.timestamp-n.timestamp>gn(t)));)r--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&s.timestamp-n.timestamp>gn(t)*2&&(n=e[1]);const a=Ur(s.timestamp-n.timestamp);if(a===0)return{x:0,y:0};const o={x:(s.x-n.x)/a,y:(s.y-n.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function gV(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?ct(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?ct(r,e,n.max):Math.min(e,r)),e}function rk(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function yV(e,{top:t,left:r,bottom:n,right:s}){return{x:rk(e.x,r,s),y:rk(e.y,t,n)}}function nk(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function xV(e,t){return{x:nk(e.x,t.x),y:nk(e.y,t.y)}}function vV(e,t){let r=.5;const n=sr(e),s=sr(t);return s>n?r=gd(t.min,t.max-n,e.min):n>s&&(r=gd(e.min,e.max-s,t.min)),Kn(0,1,r)}function wV(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const gx=.35;function bV(e=gx){return e===!1?e=0:e===!0&&(e=gx),{x:sk(e,"left","right"),y:sk(e,"top","bottom")}}function sk(e,t,r){return{min:ik(e,t),max:ik(e,r)}}function ik(e,t){return typeof e=="number"?e:e[t]||0}const jV=new WeakMap;class kV{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=Nt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const a=h=>{r&&this.snapToCursor(Zd(h).point),this.stopAnimation()},o=(h,m)=>{const{drag:f,dragPropagation:y,onDragStart:x}=this.getProps();if(f&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Q6(f),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),An(g=>{let v=this.getAxisMotionValue(g).get()||0;if(Hn.test(v)){const{projection:w}=this.visualElement;if(w&&w.layout){const j=w.layout.layoutBox[g];j&&(v=sr(j)*(parseFloat(v)/100))}}this.originPoint[g]=v}),x&&Qe.update(()=>x(h,m),!1,!0),lx(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},l=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m;const{dragPropagation:f,dragDirectionLock:y,onDirectionLock:x,onDrag:b}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:g}=m;if(y&&this.currentDirection===null){this.currentDirection=_V(g),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",m.point,g),this.updateAxis("y",m.point,g),this.visualElement.render(),b&&Qe.update(()=>b(h,m),!1,!0)},c=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m,this.stop(h,m),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new tE(t,{onSessionStart:a,onStart:o,onMove:l,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:eE(this.visualElement),element:this.visualElement.current})}stop(t,r){const n=t||this.latestPointerEvent,s=r||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!s||!n)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&Qe.postRender(()=>l(n,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,r,n){const{drag:s}=this.getProps();if(!n||!Pu(t,s,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=gV(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,s=this.constraints;t&&uo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=yV(n.layoutBox,t):this.constraints=!1,this.elastic=bV(r),s!==this.constraints&&!uo(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&An(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=wV(n.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!uo(t))return!1;const n=t.current;wl(n!==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 a=N8(n,s.root,this.visualElement.getTransformPagePoint());let o=xV(s.layout.layoutBox,a);if(r){const l=r(k8(o));this.hasMutatedConstraints=!!l,l&&(o=kT(l))}return o}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},d=An(u=>{if(!Pu(u,r,this.currentDirection))return;let h=c&&c[u]||{};o&&(h={min:0,max:0});const m=s?200:1e6,f=s?40:1e7,y={type:"inertia",velocity:n?t[u]:0,bounceStiffness:m,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(u,y)});return Promise.all(d).then(l)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return lx(this.visualElement,t),n.start($w(t,n,0,r,this.visualElement,!1))}stopAnimation(){An(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),s=n[r];return s||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){An(r=>{const{drag:n}=this.getProps();if(!Pu(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,a=this.getAxisMotionValue(r);if(s&&s.layout){const{min:o,max:l}=s.layout.layoutBox[r],c=a.get()||0;a.set(t[r]-ct(o,l,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!uo(r)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};An(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();s[o]=vV({min:c,max:c},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),An(o=>{if(!Pu(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:d}=this.constraints[o];l.set(ct(c,d,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;jV.set(this.visualElement,this);const t=this.visualElement.current,r=Vc(t,"pointerdown",d=>{const{drag:u,dragListener:h=!0}=this.getProps(),m=d.target,f=m!==t&&n8(m);u&&h&&!f&&this.start(d)});let n;const s=()=>{const{dragConstraints:d}=this.getProps();uo(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),n||(n=SV(t,d.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,o=a.addEventListener("measure",s);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Qe.read(s);const l=wd(window,"resize",()=>this.scalePositionWithinConstraints()),c=a.addEventListener("didUpdate",({delta:d,hasLayoutChanged:u})=>{this.isDragging&&u&&(An(h=>{const m=this.getAxisMotionValue(h);m&&(this.originPoint[h]+=d[h].translate,m.set(m.get()+d[h].translate))}),this.visualElement.render())});return()=>{l(),r(),o(),c&&c(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:a=!1,dragElastic:o=gx,dragMomentum:l=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:a,dragElastic:o,dragMomentum:l}}}function ak(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function SV(e,t,r){const n=m1(e,ak(r)),s=m1(t,ak(r));return()=>{n(),s()}}function Pu(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function _V(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class NV extends Ui{constructor(t){super(t),this.removeGroupControls=Hr,this.removeListeners=Hr,this.controls=new kV(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Hr}update(){const{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const zp=e=>(t,r)=>{e&&Qe.update(()=>e(t,r),!1,!0)};class CV extends Ui{constructor(){super(...arguments),this.removePointerDownListener=Hr}onPointerDown(t){this.session=new tE(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:eE(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:zp(t),onStart:zp(r),onMove:zp(n),onEnd:(a,o)=>{delete this.session,s&&Qe.postRender(()=>s(a,o))}}}mount(){this.removePointerDownListener=Vc(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 Wp=!1;class AV extends p.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:a}=t;a&&(r.group&&r.group.add(a),n&&n.register&&s&&n.register(a),Wp&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),xh.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:s,isPresent:a}=this.props,{projection:o}=n;return o&&(o.isPresent=a,t.layoutDependency!==r&&o.setOptions({...o.options,layoutDependency:r}),Wp=!0,s||t.layoutDependency!==r||r===void 0||t.isPresent!==a?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||Qe.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Vw.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:s}=t;Wp=!0,s&&(s.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function nE(e){const[t,r]=WT(),n=p.useContext(ww);return i.jsx(AV,{...e,layoutGroup:n,switchLayoutGroup:p.useContext(ZT),isPresent:t,safeToRemove:r})}const TV={pan:{Feature:CV},drag:{Feature:NV,ProjectionNode:zT,MeasureLayout:nE}};function ok(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const s="onHover"+r,a=n[s];a&&Qe.postRender(()=>a(t,Zd(t)))}class EV extends Ui{mount(){const{current:t}=this.node;t&&(this.unmount=X6(t,(r,n)=>(ok(this.node,n,"Start"),s=>ok(this.node,s,"End"))))}unmount(){}}class RV extends Ui{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=Yd(wd(this.node.current,"focus",()=>this.onFocus()),wd(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function lk(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const s="onTap"+(r==="End"?"":r),a=n[s];a&&Qe.postRender(()=>a(t,Zd(t)))}class PV extends Ui{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:r,propagate:n}=this.node.props;this.unmount=i8(t,(s,a)=>(lk(this.node,a,"Start"),(o,{success:l})=>lk(this.node,o,l?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:(n==null?void 0:n.tap)===!1})}unmount(){}}const yx=new WeakMap,qp=new WeakMap,IV=e=>{const t=yx.get(e.target);t&&t(e)},OV=e=>{e.forEach(IV)};function MV({root:e,...t}){const r=e||document;qp.has(r)||qp.set(r,{});const n=qp.get(r),s=JSON.stringify(t);return n[s]||(n[s]=new IntersectionObserver(OV,{root:e,...t})),n[s]}function DV(e,t,r){const n=MV(t);return yx.set(e,r),n.observe(e),()=>{yx.delete(e),n.unobserve(e)}}const LV={some:0,all:1};class $V extends Ui{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:s="some",once:a}=t,o={root:r?r.current:void 0,rootMargin:n,threshold:typeof s=="number"?s:LV[s]},l=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,a&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),m=d?u:h;m&&m(c)};return DV(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(FV(t,r))&&this.startObserver()}unmount(){}}function FV({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const BV={inView:{Feature:$V},tap:{Feature:PV},focus:{Feature:RV},hover:{Feature:EV}},UV={layout:{ProjectionNode:zT,MeasureLayout:nE}},VV={...uV,...BV,...TV,...UV},L=aV(VV,oV),HV="/assets/youth-sparring-gear-zTmR_0R6.jpg",zV="/assets/staff-sparring-bMpBf565.jpg",WV="/assets/youth-training-ULFl3cvs.jpg",qV="/assets/longsword-sparring-BUDh_y0f.jpg",GV="/assets/singlestick-sparring-SRS1tONC.jpg",sE="/hero-sparring.jpg",KV="/hero-sparring.webp",eo=[{src:sE,alt:"HEMA longsword sparring",position:"object-center"},{src:HV,alt:"Youth students sparring in full protective gear",position:"object-center"},{src:zV,alt:"Staff sparring drill during adult class",position:"object-center"},{src:WV,alt:"Youth training session at BladeFit Academy",position:"object-top"},{src:qV,alt:"Longsword sparring match in full gear",position:"object-center"},{src:GV,alt:"Singlestick training with protective equipment",position:"object-center"}];function YV(){const[e,t]=p.useState(0);return p.useEffect(()=>{const r=setInterval(()=>{t(n=>(n+1)%eo.length)},6e3);return()=>clearInterval(r)},[]),i.jsxs("section",{className:"relative flex min-h-[85vh] items-center overflow-hidden",children:[i.jsxs("div",{className:"absolute inset-0",children:[i.jsxs("picture",{children:[i.jsx("source",{srcSet:KV,type:"image/webp"}),i.jsx("img",{src:sE,alt:eo[0].alt,width:1200,height:676,loading:"eager",decoding:"sync",fetchPriority:"high",className:`absolute inset-0 h-full w-full object-contain sm:object-cover ${eo[0].position}`})]}),i.jsx(MU,{mode:"popLayout",children:e!==0&&i.jsx(L.img,{src:eo[e].src,alt:eo[e].alt,loading:"lazy",decoding:"async",className:`absolute inset-0 h-full w-full object-contain sm:object-cover ${eo[e].position}`,initial:{opacity:0}
476,animate:{opacity:1},exit:{opacity:0},transition:{duration:1.2,ease:"easeInOut"}},e)}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-black/80 via-black/60 to-black/30"})]}),i.jsx("div",{className:"container relative z-10 mx-auto px-4 lg:px-8",children:i.jsxs("div",{className:"max-w-3xl",children:[i.jsx(L.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"mb-4 font-heading text-sm font-semibold uppercase tracking-[0.3em] text-primary",children:"Movement · Confidence · Discipline · Fun"}),i.jsxs(L.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.1},className:"mb-6 font-heading text-5xl font-bold leading-tight tracking-tight text-white md:text-7xl",children:["Learn the Art of"," ",i.jsx("span",{className:"text-primary",children:"the Sword"})]}),i.jsx(L.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},className:"mb-10 max-w-xl text-lg text-white/80 md:text-xl",children:"Youth & Adult Sword Training in Vancouver, WA. Historical European martial arts, movement, fitness, and fun through structured programs for all ages."}),i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.3},className:"flex flex-wrap gap-4",children:[i.jsx(B,{to:"/trial",children:i.jsxs(I,{size:"lg",className:"bg-gradient-gold text-base font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:[i.jsx(qe,{className:"mr-2 h-5 w-5"}),"Try a Trial Class"]})}),i.jsx(B,{to:"/schedule",children:i.jsxs(I,{size:"lg",variant:"outline",className:"border-white/30 bg-transparent text-base text-white hover:border-white hover:bg-white/10 hover:text-white",children:[i.jsx(pr,{className:"mr-2 h-5 w-5"}),"View Class Schedule"]})})]})]})})]})}const JV="/assets/community-collage-DQxrjmHb.jpg",QV=[{icon:qn,title:"Discipline",description:"Structured martial training builds self-discipline that carries into every area of life."},{icon:ew,title:"Focus",description:"Sword arts demand concentration and presence â skills that sharpen the mind as much as the body."},{icon:c2,title:"Growth",description:"Progressive skill development ensures every student is challenged and advancing at their own pace."},{icon:ar,title:"Community",description:"Training together builds trust and real friendships. BladeFit is the place you look forward to showing up to â not just for the workout, but for the people."}];function ZV(){return i.jsx("section",{className:"border-y border-border bg-card py-20",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs("div",{className:"grid items-center gap-12 lg:grid-cols-2",children:[i.jsxs(L.div,{initial:{opacity:0,x:-30},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6},children:[i.jsx("h2",{className:"font-heading text-3xl font-bold md:text-4xl",children:"More Than a Fitness Class"}),i.jsx("p",{className:"mt-4 text-muted-foreground leading-relaxed",children:"BladeFit Academy teaches historical European martial arts, movement, and fitness through structured youth and adult programs. This isn't just exercise â it's about building capable, confident humans through the discipline of the sword."}),i.jsx("p",{className:"mt-3 text-muted-foreground leading-relaxed",children:"We meet you where you are and guide you forward â whether you're here for personal growth, preparing for competition, or simply looking for something different and fun. From foam swords to full steel, there's a place for you here."}),i.jsx("div",{className:"mt-6 overflow-hidden rounded-lg",children:i.jsx("img",{src:JV,alt:"BladeFit Academy community â youth and adult students training, sparring, and building friendships",className:"w-full h-auto object-cover rounded-lg",loading:"lazy",width:1200,height:600})})]}),i.jsx(L.div,{initial:{opacity:0,x:30},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6},className:"space-y-6",children:QV.map(e=>i.jsxs("div",{className:"flex gap-4",children:[i.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-lg bg-primary/10",children:i.jsx(e.icon,{className:"h-5 w-5 text-primary"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-heading text-lg font-semibold",children:e.title}),i.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e.description})]})]},e.title))})]})})})}const yn=[{slug:"cubs-club",name:"Cubs Club",category:"youth",ageRange:"Ages 6â10",shortDe
476scription:"A fun introduction to movement, coordination, and soft combat for young warriors.",fullDescription:"Cubs Club is where the journey begins. Young students are introduced to fundamental movement patterns, coordination, and basic sword play using safe foam equipment. Through structured games, drills, and activities, cubs develop body awareness, listening skills, and the foundations of martial discipline â all while having a blast.",whyWeTrain:"We believe movement is the foundation of everything. At this age, training isn't about perfecting technique â it's about building confident, capable movers who love to learn. Our approach draws from historical martial arts traditions adapted for young bodies and minds, emphasizing play-based learning that builds real skills.",gearRecommendations:["Loaner gear available on a first-come, first-served basis (limited)"],gearItems:[{name:"BladeFit Cubs Club Tee â Youth Uniform (Ages 5â7)",description:"Official youth uniform tee for Cubs Club students ages 5â7.",price:"$20.00",category:"Youth Uniform",image:"https://bladefit1.myshopify.com/cdn/shop/files/youth-classic-tee-black-front-67e0578366e7a.jpg?v=1752173160&width=533",link:"https://bladefit1.myshopify.com/products/cubs-club-youth-uniform"},{name:"BladeFit Paige Uniform Tee â Adult Fit (For Ages 8â10)",description:"Page rank uniform tee in Carolina Blue. Adult fit sized for ages 8â10.",price:"$25.00",category:"Youth Uniform",image:"https://bladefit1.myshopify.com/cdn/shop/files/unisex-sports-tee-carolina-blue-front-67f56bc67e3ad.jpg?v=1752173158&width=533",link:"https://bladefit1.myshopify.com/products/paige-uniform-dryblend%C2%AE-t-shirt"},{name:"Soft Warrior Sparta Helmet",description:"Approved helmet option for Cubs Club. Includes neck protection.",category:"Safety Gear",image:"https://sparta.training/wp-content/uploads/2021/03/helmet_blue_2-1-525x295.jpeg",link:"https://sparta.training/product/helmet-with-neck-protection-3/"},{name:"Safety Sparring Chest Protector",description:"Lightweight chest protector for younger kids. Available in Child Small, Child Medium, and Child Large.",category:"Safety Gear",image:"https://m.media-amazon.com/images/I/61APyWlGGHL._AC_SY355_.jpg",link:"https://www.amazon.com/dp/B0CNH5XCW6"},{name:"JHOFIF Reversible Chest Guard",description:"Reversible chest guard for smaller kids. Available in sizes 1â5 in Blue and Red.",category:"Safety Gear",image:"https://m.media-amazon.com/images/I/714RG5WckJL._AC_SY355_.jpg",link:"https://www.amazon.com/dp/B0G4RJFV2V"},{name:"Wesing Chest Protector (Ages 10â17)",description:"Chest guard sized for bigger kids and teenagers. Available in Black, Blue, or Red.",category:"Safety Gear",image:"/images/wesing-chest-protector.jpg",link:"https://www.amazon.com/dp/B0B5QHNZ4D/?coliid=I2FH93UIXA9BK&colid=1QREH0G2L6D4K&ref_=list_c_wl_lv_ov_lig_dp_it&th=1"},{name:"Sword For Kids (Ages 5â7)",description:"Select 'Kid 5-7 y.o.' size. Many in class use the smaller size temporarily.",category:"Swords & Shields",image:"https://sparta.training/wp-content/uploads/2020/06/IMG_2240-scaled-525x525.jpg",link:"https://sparta.training/product/sword-for-kids/"},{name:"Sword For Kids (Ages 8â11)",description:"Select 'Kid 8-11 y.o.' size. 8â11 year olds should graduate to the 70cm variant sooner than later.",category:"Swords & Shields",image:"https://sparta.training/wp-content/uploads/2020/06/IMG_2240-scaled-525x525.jpg",link:"https://sparta.training/product/sword-for-kids/"},{name:"Heraldic Shield for Kids",description:"Shield for ages 5â7.",category:"Swords & Shields",image:"https://sparta.training/wp-content/uploads/2021/11/%D0%B4%D0%B5%D1%82%D1%81%D0%BA%D0%B8%D0%B9-%D1%89%D0%B8%D1%82-scaled-525x786.jpg",link:"https://sparta.training/product/heraldic-shield-for-kids/"}],coachRecommendations:[],currentlyRunning:!0,nextSessionDate:"Starts Friday, September 4, 2026",schedule:["Fridays 6:00 PM @ Leroy Haagen Park"],icon:"âï¸"},{slug:"youth-soft-sword",name:"Youth Soft Sword",category:"youth",ageRange:"Ages 11â18",shortDescription:"Master one of the most iconic forms of historical swordplay â building coordination, agility, and confidence.",fullDescription:"Youth Soft Sword is BladeFit Academy's sword-and-shield training program for ages 11â18. Students master one of the most iconic and dynamic forms of historical swordplay using safe, modern training equipment, developing coordination, agility, and timing while learning authentic combat concepts based on medieval and renaissance traditions. Classes emphasize teamwork, confidence, and control â giving teens a chance to move, think, and train like martial artists while having fun in a supportive community.",whyWeTrain:"Every class combines athletic movement, strategy, and technical practice â helping teens build physical skills and mental focus at the same time. Sessions include warm-ups and mobility drills, footwork and guard training, partner exercises for timing and teamwork, sword and shield techniques focused on defense, control, and counterattacks, and controlled sparring and games to apply what they've learned in fun, safe scenarios. Coaches guide every drill to ensure safety and good form, giving students both freedom and feedback as they progress.",historicRoots:"The sword-and-shield curriculum taught in Youth Soft Sword is inspired by the techniques of medieval and renaissance sword masters. Students explore how historical warriors balanced power and precision â reimagined through safe, modern training. This class connects teens to Europe's martial heritage while focusing on physical growth, teamwork, and self-discipline.",historicRootsImage:"youth-sword-shield-historic",gearRecommendations:["Loaner gear available on a first-come, first-served basis (limited)","Fencing mask","Chest gear","Groin protection","Neck protection"],gearItems:[],coachRecommendations:[],currentlyRunning:!0,schedule:["Mondays 6:00 PM â 7:00 PM"],icon:"ð¡ï¸"},{slug:"bladefit-games",name:"BladeFit Games",category:"youth",ageRange:"Ages 11â18",shortDe
476scription:"Outdoor field games applying the principles learned in Youth Soft Sword â culminating in an end-of-season tournament.",fullDescription:"BladeFit Games takes the principles learned in our Monday Youth Soft Sword class outside to the park for game-focused training. Students apply footwork, timing, and combat fundamentals through team field games, capture-the-flag style scenarios, and skirmish play designed to build athleticism and tactical thinking in a fun, social setting. The season culminates in a tournament where students put their skills to the test.",whyWeTrain:"Games are how young martial artists develop intuition. Outdoor, game-based training reinforces the techniques from Monday class while building endurance, teamwork, and the confidence to make decisions under pressure â all in an open, low-pressure environment.",gearRecommendations:["Loaner gear available on a first-come, first-served basis (limited)","Encouraged to buy your own gear once you commit","Fencing mask","Athletic clothing for outdoor activity","Indoor/outdoor athletic shoes","Water bottle"],gearItems:[],coachRecommendations:[],currentlyRunning:!1,nextSessionDate:"Returns for the 2027 outdoor season",previousSessionNote:"The summer 2026 outdoor season has concluded. BladeFit Games is not currently meeting.",icon:"ð"},{slug:"youth-mixed-stick",name:"Youth Mixed Stick Fighting",category:"youth",ageRange:"Ages 14â18",shortDescription:"Outdoor stick fighting for teens â single stick, stick & targe, and mixed weapon games.",fullDescription:"Youth Mixed Stick Fighting brings teen students outdoors for stick combat training at Leroy Haagen Park. Students learn single stick fundamentals and progress into mixed scenarios, applying the same coordination and timing principles from our youth soft sword program â now with rattan sticks and protective gear. Classes emphasize controlled sparring, footwork, and tactical decision-making in a fun, supportive environment.",whyWeTrain:"Stick fighting is one of the most accessible entry points into weapon-based martial arts. It builds wrist strength, distance management, and reflexes while letting teens train safely with real-feel impact. Mixed stick formats keep training fresh and challenge students to adapt â preparing them for higher-level HEMA progression.",gearRecommendations:["Loaner gear available on a first-come, first-served basis (limited)",'Rattan stick (3/4" x 36")',"Fencing mask (required)","Gorget / throat protection","Groin protection","Heavy sweatshirt or padded jacket (youth class padded gear works)","Athletic clothing & athletic shoes"],gearItems:[{name:'Rattan Single Stick (2 count) â 3/4" x 36"',description:"Quality rattan sticks for Youth Mixed Stick Fighting. Sold in pairs.",price:"$24.00",category:"Training Essential",image:"https://files.gymdesk.com/11688/products/product69338-74234e3e-large.jpg",link:"https://bladefit.shop/product/2-count-3-4-x-36-rattan-single-stick"},{name:"Absolute Force HEMA Basic Fencing Mask",description:"Required for all stick sparring.",category:"Training Essential",image:"https://www.woodenswords.com/v/vspfiles/photos/af.mask.basic-2.jpg",link:"https://www.woodenswords.com/Absolute_Force_HEMA_Basic_Fencing_Mask_p/af.mask.basic.htm"},{name:"PHA Basic Gorget",description:"Throat protection required for stick sparring.",category:"Safety Gear",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Gorget.Basic-2.jpg",link:"https://www.woodenswords.com/product_p/pha.gorget.basic.htm"},{name:"Shock Doctor Groin Protection w/ Jock Strap",description:"Required for all sparring.",category:"Safety Gear",image:"/images/gear/shock-doctor-groin.jpg",link:"https://www.amazon.com/s?k=shock+doctor+groin+protection+jock+strap"}],coachRecommendations:[],currentlyRunning:!1,nextSessionDate:"return date to be announced",previousSessionNote:"The summer 2026 outdoor session at Leroy Haagen Park has ended. Friday stick fighting is not currently meeting.",icon:"ð¥¢"},{slug:"youth-longsword",name:"Youth Longsword",category:"youth",ageRange:"Ages 14â18",shortDescription:"Teen longsword training rooted in historical European martial arts techniques.",fullDescription:"Youth Longsword introduces teenager
476s to authentic historical European martial arts (HEMA) longsword techniques. Students study guards, cuts, thrusts, and wrestling from historical sources while developing the strength, timing, and tactical thinking required for steel combat. This is real martial arts â grounded in 600 years of European tradition. This program is not currently running and is not accepting enrolments; the return date and training location have not been announced.",whyWeTrain:"The longsword is the cornerstone of HEMA. Training with the longsword teaches students to think tactically, manage distance, and commit to decisive action. We draw from the Liechtenauer tradition, connecting modern students to a living lineage of European martial excellence.",historicRoots:"Our longsword curriculum is rooted in the medieval German tradition of Johannes Liechtenauer, whose verse treatise â the Zettel â became the foundation of an entire lineage of swordsmanship spanning the 14th through 16th centuries. Liechtenauer's system emphasizes efficient movement, initiative (Vor), and the seamless integration of cuts, thrusts, and wrestling into a unified fighting art. His teachings were passed down and expanded by masters such as Sigmund Ringeck, Peter von Danzig, and Hans Talhoffer, creating one of the most well-documented martial traditions in European history.",historicRootsImage:"longsword-manuscript",gearRecommendations:["Loaner gear available on a first-come, first-served basis (limited)","Athletic clothing","Indoor athletic shoes","Fencing mask (required)","Chest protector","Light sparring gloves","Shinai (with cross guard)"],gearItems:[{name:"Absolute Force HEMA Basic Fencing Mask",description:"Required for all youth longsword sparring. Via Purpleheart Armoury.",category:"Training Essential",image:"https://www.woodenswords.com/v/vspfiles/photos/af.mask.basic-2.jpg",link:"https://www.woodenswords.com/Absolute_Force_HEMA_Basic_Fencing_Mask_p/af.mask.basic.htm"},{name:"Shinai",description:"Bamboo training sword for youth longsword classes. Cross guard provided separately.",price:"$30.00",category:"Training Essential",image:"https://files.gymdesk.com/11688/products/product92424-1388f510.jpg",link:"https://www.e-bogu.com/Complete-Kendo-Shinai-with-leather-parts-Size-39-p/hay-ken-shi-hqcomp-39.htm"},{name:"Absolute Force Chest Protector",description:"Required for sparring. Fits all ages and genders with adjustable velcro straps.",category:"Training Essential",image:"https://www.woodenswords.com/v/vspfiles/photos/AF.Chest-2.jpg",link:"https://www.woodenswords.com/Absolute_Force_Chest_Protector_p/af.chest.htm"},{name:"PHA Basic Gorget",description:"Throat protection required for longsword sparring.",category:"Safety Gear",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Gorget.Basic-2.jpg",link:"https://www.woodenswords.com/product_p/pha.gorget.basic.htm"},{name:"Shock Doctor Groin Protection w/ Jock Strap",description:"Required for all sparring.",category:"Safety Gear",image:"/images/gear/shock-doctor-groin.jpg",link:"https://www.amazon.com/s?k=shock+doctor+groin+protection+jock+strap"},{name:"Supfen HEMA Hoodie 350N",description:"Newton-rated HEMA hoodie with removable foam inserts and rigid throat protector. Great for training and light sparring.",category:"Jackets & Body Protection",image:"https://145776573.cdn6.editmysite.com/uploads/1/4/5/7/145776573/QX4ESY4ZEA2736CJEZN74HY7.jpeg?width=2400&optimize=medium",link:"https://www.swordshop.ca/product/Supfen-Training-HEMA-Hoodie-350N/79"},{name:"Supfen Angelo 800N Jacket",description:"Medium jacket from Swordshop (prices in $CAD).",category:"Jackets & Body Protection",image:"/images/gear/angelo-800n-jacket.jpeg",link:"https://www.swordshop.ca/product/Supfen-Angelo-800N/67?cp=true&sa=false&sbp=false&q=false&category_id=8"},{name:"Lacrosse Arm Pads",description:"Elbow and forearm protection for longsword sparring. Check Sideline Swap for affordable used options.",category:"Elbow & Arm Protection",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Forearm.EL.Std-2.jpg",link:"https://sidelineswap.com/shop/lacrosse/
476protective/arm-pads/l457"},{name:"Hockey Shin Pads",description:"Hard knee and shin protection for sparring. Check Sideline Swap for affordable used options.",category:"Knee & Shin Protection",image:"/images/gear/hockey-shin-pads.jpg",link:"https://sidelineswap.com/shop/hockey/protective/shin-pads/l96"}],coachRecommendations:[],currentlyRunning:!1,nextSessionDate:"return date to be announced",locationNote:"Historical location: the most recent session met at Illahee Elementary School in Camas, WA. That was a seasonal, school-hosted location and is not a currently active BladeFit Academy training site. The location for any future session has not been confirmed.",previousSessionNote:"The most recent session concluded with the Running the Gauntlet tournament in Salem, OR on Saturday, May 30, 2026. That date is a completed, historical event â not an upcoming class date.",icon:"âï¸"}],xn=[{slug:"beginner-longsword",name:"Beginner Longsword",category:"adult",ageRange:"Ages 18+",shortDescription:"Learn the fundamentals of historical longsword â no experience required.",fullDescription:"The Beginner Longsword class is the perfect entry point into historical European martial arts at BladeFit Academy. Students learn guards, cuts, thrusts, and striking mechanics rooted in the German longsword tradition using custom-adapted wooden shinai fitted with a cross guard unique to BladeFit. Classes focus on foundational mechanics, partner drills, and coached sparring in a supportive environment. Loaner gear is available to get started right away â no prior experience needed.",whyWeTrain:"The longsword is the most complete weapon system in HEMA. Our beginner curriculum is grounded in the medieval Liechtenauer tradition, drawing from principles preserved in historical treatises and brought to life through modern coaching. Training develops distance management, timing, body mechanics, and martial decision-making â building the foundation for everything else in HEMA.",historicRoots:"Our longsword curriculum is rooted in the medieval German tradition of Johannes Liechtenauer, whose verse treatise â the Zettel â became the foundation of an entire lineage of swordsmanship spanning the 14th through 16th centuries. Liechtenauer's system emphasizes efficient movement, initiative (Vor), and the seamless integration of cuts, thrusts, and wrestling into a unified fighting art. His teachings were passed down and expanded by masters such as Sigmund Ringeck, Peter von Danzig, and Hans Talhoffer, creating one of the most well-documented martial traditions in European history.",historicRootsImage:"longsword-manuscript",gearRecommendations:["Athletic clothing","Indoor athletic shoes","Fencing mask (loaner available â first-come, first-served, limited)","Chest protector (loaner available â first-come, first-served, limited)","Shinai (with cross guard)"],gearItems:[],tieredGear:[{category:"Fencing Mask & Back of Head Protection",description:"If you already own a fencing mask, you only need to add the SPES back of head protection. If you don't have a mask yet, watch this short video to understand the choices first.",videoId:"m7FI7LdRxWY",tiers:[{tier:"Good",description:"AF Basic Mask paired with SPES back of head protection.",items:[{name:"AF Basic Fencing Mask",image:"https://www.woodenswords.com/v/vspfiles/photos/af.mask.basic-2.jpg",link:"https://www.woodenswords.com/Absolute_Force_HEMA_Basic_Fencing_Mask_p/af.mask.basic.htm"},{name:"PHA Back of Head Plate",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.BOH.BLK-2.jpg",link:"https://www.woodenswords.com/HEMA_Back_of_the_Head_s/1926.htm"}]},{tier:"Better",description:"AF Coaches Mask paired with SPES back of head protection.",items:[{name:"AF Coaches Mask",image:"https://www.woodenswords.com/v/vspfiles/photos/AF.Mask.Coach-2.jpg",link:"https://www.woodenswords.com/product_p/af.mask.coach.htm"},{name:"PHA Back of Head Plate",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.BOH.BLK-2.jpg",link:"https://www.woodenswords.com/HEMA_Back_of_the_Head_s/1926.htm"}]},{tier:"Best",description:"AF Deluxe HEMA fencing mask â integrated back of head protection.",items:[{name:"AF Deluxe HEMA Fencing Mask",image:"/images/gear/af-deluxe-hema-mask.webp",link:"https://www.woodenswords.com/HEMA_Fencing_Mask_p/af.mask.deluxe.htm"}]}]},{category:"Gorget",description:"A gorget protects your larynx from heavy thrusts. A mask bib alone is not enough to deflect the force of a stiff thrust to the Adam's apple.",tiers:[{tier:"Good",items:[{name:"PHA Basic Gorget",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Gorget.Basic-2.jpg",link:"https://www.woodenswords.com/product_p/pha.gorget.basic.htm"}]},{tier:"Best",items:[{name:"Vectir Light Gorget",image:"https://www.woodenswords.com/v/vspfiles/photos/V.Gorget.LT-2.jpg",link:"https://www.woodenswords.com/product_p/v.gorget.lt.htm"}]}]},{category:"Padded Gloves",description:"Protect your hands and wrists.",tiers:[{tier:"Good",description:'Used lacrosse gloves at Play-it-Again Sports or online at Sideline Swap. Most will need a size 13" or 14".',items:[{name:"Used Lacrosse Gloves (Sideline Swap)",image:"https://sidelineswap.com/img/sidelineswap-og.png",link:"https://sidelineswap.com/shop/lacrosse/gloves/l87"}]},{tier:"Better",description:"Warrior Glove â designed for stick fighting outside a basket hilt. Price
476s are in $CAD (as of writing, $1 CAD â $0.69 USD). New tariffs may affect total.",items:[{name:"Warrior Gloves",image:"/images/gear/warrior-gloves.jpg",link:"https://www.swordshop.ca/product/Warrior-Gloves/94?cp=true&sa=false&sbp=false&q=false&category_id=12"}]},{tier:"Best",items:[{name:"Rapier / Singlestick Gloves",image:"https://www.woodenswords.com/v/vspfiles/photos/Glove.Rapier-2.jpg",link:"https://www.woodenswords.com/Gloves_Rapier_and_Singlestick_p/glove.rapier.htm"}]}]},{category:"Forearm & Elbow Protection",videoId:"KOm6-Xm0-QM",tiers:[{tier:"Good",description:"Lacrosse elbow pads with some forearm and bicep protection. Best if used with long cuff rapier/singlestick padded gloves.",items:[{name:"Lacrosse Arm Pads (Sideline Swap)",image:"https://sidelineswap.com/img/sidelineswap-og.png",link:"https://sidelineswap.com/shop/lacrosse/protective/arm-pads/l457"}]},{tier:"Better",description:"Standard length forearm guard with elbow. Works with all protective gloves except the rapier/singlestick glove, which has a long cuff that extends over the forearm.",items:[{name:"PHA Standard Forearm Guard w/ Elbow",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Forearm.EL.Std-2.jpg",link:"https://www.woodenswords.com/product_p/pha.forearm.el.std.htm"}]},{tier:"Best",description:"Best option when paired with the rapier/singlestick glove (long cuff), or if your forearm is short. Otherwise there may be a gap in forearm protection.",items:[{name:"PHA Short Forearm Guard w/ Elbow",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Forearm.EL.Short-2.jpg",link:"https://www.woodenswords.com/Economy_Forearm_Guards_Short_p/pha.forearm.el.short.htm"}]}]},{category:"Chest Gear / Fencing Jacket",description:"Athletes should wear minimal gear suited to their personal comfort level. Heavy fencing jackets are too hot for warm-weather games and overkill for singlestick â but too little protection isn't much fun either.",tiers:[{tier:"Good",description:"Wearing a plastron underneath a stick fighting hoodie or fencing coach vest. The plastron covers the front of the rib cage.",items:[{name:"Absolute Force Chest Protector",description:"Underarm chest protector.",image:"https://www.woodenswords.com/v/vspfiles/photos/af.chest-2.jpg",link:"https://www.woodenswords.com/Absolute_Force_Chest_Protector_p/af.chest.htm"},{name:"Fencing Coach Vest",description:"Light protective vest for coaching and sparring."},{name:"Swordshop HEMA Hoodie",description:"Newton-rated HEMA hoodie with removable foam inserts throughout the arms and a rigid removable throat protector. Excellent for impromptu bouting and light training.",link:"https://www.swordshop.ca"}]},{tier:"Better",description:"Light/medium fencing jacket. More overall protection than the vest and thicker material than the hoodie.",items:[{name:"Leonark Light Fencing Jacket",image:"/images/gear/leonark-light-jacket.jpg",link:"https://www.amazon.com/s?k=leonark+fencing+jacket"},{name:"Supfen Angelo 800N Jacket",description:"Medium jacket from Swordshop (prices in $CAD).",image:"/images/gear/angelo-800n-jacket.jpeg",link:"https://www.swordshop.ca/product/Supfen-Angelo-800N/67?cp=true&sa=false&sbp=false&q=false&category_id=8"},{name:"SPES Officers Jacket 350N",image:"/images/gear/spes-officers-jacket.webp",link:"https://www.woodenswords.com/SPES_Officers_Jacket_350N_p/spes-j.officer.htm"}]},{tier:"Best",description:"Plastron worn underneath any of the above light/medium fencing jackets for maximum protection.",items:[]}]}],coachRecommendations:[],currentlyRunning:!0,schedule:["Mondays 7:00 PM â 9:00 PM"],icon:"âï¸"}
476,{slug:"intermediate-longsword",name:"Intermediate Longsword",category:"adult",ageRange:"Ages 18+",shortDescription:"Deepen your longsword skills with advanced drills, steel fencing, and open sparring.",fullDescription:"The Intermediate Longsword class builds on the foundations learned in Beginner Longsword. Students progress from shinai to steel feders, developing more advanced techniques, tactical thinking, and controlled sparring intensity. The class follows a two-hour format: the first hour covers instruction, drills, and coached sparring, while the second hour opens up for free fencing where experienced students test themselves in open sparring. Students should complete the Beginner class before joining Intermediate.",whyWeTrain:"The longsword is the most complete weapon system in HEMA. Our curriculum is grounded in the medieval Liechtenauer tradition, drawing from principles preserved in historical treatises and brought to life through modern coaching. This approach connects students directly to the lineage of European swordmasters while keeping lessons practical and relevant. Training develops distance management, timing, body mechanics, and martial decision-making in ways that translate to every other weapon â preserving and evolving a 600-year tradition of European martial excellence.",historicRoots:"Our longsword curriculum is rooted in the medieval German tradition of Johannes Liechtenauer, whose verse treatise â the Zettel â became the foundation of an entire lineage of swordsmanship spanning the 14th through 16th centuries. Liechtenauer's system emphasizes efficient movement, initiative (Vor), and the seamless integration of cuts, thrusts, and wrestling into a unified fighting art. His teachings were passed down and expanded by masters such as Sigmund Ringeck, Peter von Danzig, and Hans Talhoffer, creating one of the most well-documented martial traditions in European history. At BladeFit, we study these sources not as museum pieces but as living instruction â applying their principles to modern training, sparring, and competition.",historicRootsImage:"longsword-manuscript",gearRecommendations:["Fencing mask","Chest protector","Heavy sparring gloves","Gorget (throat protection)","Standard Feder (Regenyei Armory)","Back of the head protection","Athletic clothing"],gearItems:[],tieredGear:[{category:"Forearm & Elbow Protection",videoId:"KOm6-Xm0-QM",tiers:[{tier:"Better",description:"Standard length forearm guard with elbow. Works with all protective gloves except the rapier/singlestick glove, which has a long cuff that extends over the forearm.",items:[{name:"PHA Standard Forearm Guard w/ Elbow",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Forearm.EL.Std-2.jpg",link:"https://www.woodenswords.com/product_p/pha.forearm.el.std.htm"}]},{tier:"Best",description:"Best option when paired with the rapier/singlestick glove (long cuff), or if your forearm is short. Otherwise there may be a gap in forearm protection.",items:[{name:"PHA Short Forearm Guard w/ Elbow",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Forearm.EL.Short-2.jpg",link:"https://www.woodenswords.com/Economy_Forearm_Guards_Short_p/pha.forearm.el.short.htm"}]}]}],coachRecommendations:[],currentlyRunning:!0,schedule:["Mondays 7:00 PM â 9:00 PM"],icon:"âï¸"},{slug:"military-saber",name:"Military Saber",category:"adult",ageRange:"Adults 18+",shortDescription:"19th century cavalry saber â powerful cuts and martial tradition.",fullDescription:"Military Saber training draws from 19th century cavalry and infantry manuals, teaching students the art of the curved cutting sword. Students learn powerful cuts, parries, and the aggressive tactical mindset of military swordsmanship. This weapon rewards bold action, physical fitness, and decisive striking.",whyWeTrain:"The military saber represents the last great era of practical swordsmanship. Its techniques were developed for real battlefield use and refined through extensive military research. Training with the saber builds explosive power, courage, and the ability to commit to decisive action under pressure.",historicRoots:"Our military saber curriculum draws from 19th-century British and European cavalry manuals, including the works of Henry Angelo and other masters who codified saber technique for military training. These systems were designed for real combat and refined through generations of military practice.",historicRootsImage:"military-saber-historic",gearRecommendations:["Light gloves","Gorget (throat protection)","Elbow protection","Saber simulator or steel saber","Fencing mask with back of head protection","Chest gear / fencing jacket","Hard knee & shin pads","Groin protection (mandatory)"],gearItems:[],coachRecommendations:[{heading:"Sabers",items:[{name:"VB Gym Saber VS 5",note:"Nate's favorite",link:"https://www.woodenswords.com/product_p/vb.sabre.gym.htm",image:"https://www.woodenswords.com/v/vspfiles/photos/VB.Sabre.Gym-2.jpg"},{name:"VB Gym Saber VS 5 â Straight Blade Variation",link:"https://www.woodenswords.com/product_p/vb.sabre.gym.straight.htm",image:"https://www.woodenswords.com/v/vspfiles/photos/VB.Sabre.Gym.Straight-2.jpg"},{name:"Castille Armory Economy Dueling Saber â Customize Your Own",link:"https://castillearmory.com/product/dueling-sabre-2/",image:"https://castillearmory.com/wp-content/uploads/CPLT-BKSP-LRG-20-900x900.jpg"},{name:"Regenyei Duelist Saber",note:"David's saber",link:"https://regenyei.com/product/duelist-saber/#blade",image:"https://regenyei.com/wp-content/uploads/2020/04/RA-sbr-duel-img04-800x532.jpg"},{name:"Castille Trooper Sabers",note:"Draco's saber",link:"https://castillearmory.com/product/dueling-sabre/",image:"https://castillearmory.com/wp-content/uploads/IMG_6110-900x900.jpg"}]},{heading:"Olympic Practice Saber",items:[{name:"Absolute Fencing Practice Saber",note:"Good for home practice only.",link:"https://www.absolutefencinggear.com/"}]}],tieredGear:[{category:"Fencing Mask & Back of Head Protection",description:"If you already own a fencing mask, you only need to add the SPES back of head protection. If you don't have a mask yet, watch this short video to understand the choices first.",videoId:"m7FI7LdRxWY",tiers:[{tier:"Good",description:"AF Basic Mask paired with SPES back of head protection.",items:[{name:"AF Basic Fencing Mask",image:"https://www.woodenswords.com/v/vspfiles/photos/af.mask.basic-2.jpg",link:"https://www.woodenswords.com/Absolute_Force_HEMA_Basic_Fencing_Mask_p/af.mask.basic.htm"},{name:"PHA Back of Head Plate",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.BOH.BLK-2.jpg",link:"https://www.woodenswords.com/HEMA_Back_of_the_Head_s/1926.htm"}]},{tier:"Better",description:"AF Coaches Mask paired with SPES back of head protection.",items:[{name:"AF Coaches Mask",image:"https://www.woodenswords.com/v/vspfiles/photos/AF.Mask.Coach-2.jpg",link:"https://www.woodenswords.com/product_p/af.mask.coach.htm"},{name:"PHA Back of Head Plate",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.BOH.BLK-2.jpg",link:"https://www.woodenswords.com/HEMA_Back_of_the_Head_s/1926.htm"}]},{tier:"Best",description:"AF Deluxe HEMA fencing mask â integrated back of head protection.",items:[{name:"AF Deluxe HEMA Fencing Mask",image:"/images/gear/af-deluxe-hema-mask.webp",link:"https://www.woodenswords.com/HEMA_Fencing_Mask_p/af.mask.deluxe.htm"}]}]},{category:"Gorget",description:"A gorget protects your larynx from heavy thrusts. A mask bib alone is not enough to deflect the force of a stiff thrust to the Adam's apple.",tiers:[{tier:"Good",items:[{name:"PHA Basic Gorget",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Gorget.Basic-2.jpg",link:"https://www.woodenswords.com/product_p/pha.gorget.basic.htm"}]},{tier:"Best",items:[{name:"Vectir Light Gorget",image:"https://www.woodenswords.com/v/vspfiles/photos/V.Gorget.LT-2.jpg",link:"https://www.woodenswords.com/product_p/v.gorget.lt.htm"}]}]},{category:"Padded Gloves",description:"Protect your hands and wrists.",tiers:[{tier:"Good",description:'Used lacrosse gloves at Play-it-Again Sports or online at Sideline Swap. Most will need a size 13" or 14".',items:[{name:"Used Lacrosse Gloves (Sideline Swap)",image:"https://sidelineswap.com/img/sidelineswap-og.png",link:"https://sidelineswap.com/shop/lacrosse/gloves/l87"}]},{tier:"Better",description:"Warrior Glove â designed for stick fighting outside a basket hilt. Price
476s are in $CAD (as of writing, $1 CAD â $0.69 USD). New tariffs may affect total.",items:[{name:"Warrior Gloves",image:"/images/gear/warrior-gloves.jpg",link:"https://www.swordshop.ca/product/Warrior-Gloves/94?cp=true&sa=false&sbp=false&q=false&category_id=12"}]},{tier:"Best",items:[{name:"Rapier / Singlestick Gloves",image:"https://www.woodenswords.com/v/vspfiles/photos/Glove.Rapier-2.jpg",link:"https://www.woodenswords.com/Gloves_Rapier_and_Singlestick_p/glove.rapier.htm"}]}]},{category:"Forearm & Elbow Protection",videoId:"KOm6-Xm0-QM",tiers:[{tier:"Better",description:"Standard length forearm guard with elbow. Works with all protective gloves except the rapier/singlestick glove, which has a long cuff that extends over the forearm.",items:[{name:"PHA Standard Forearm Guard w/ Elbow",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Forearm.EL.Std-2.jpg",link:"https://www.woodenswords.com/product_p/pha.forearm.el.std.htm"}]},{tier:"Best",description:"Best option when paired with the rapier/singlestick glove (long cuff), or if your forearm is short. Otherwise there may be a gap in forearm protection.",items:[{name:"PHA Short Forearm Guard w/ Elbow",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Forearm.EL.Short-2.jpg",link:"https://www.woodenswords.com/Economy_Forearm_Guards_Short_p/pha.forearm.el.short.htm"}]}]},{category:"Chest Gear / Fencing Jacket",description:"Athletes should wear minimal gear suited to their personal comfort level. Heavy fencing jackets are too hot for warm-weather games and overkill for saber â but too little protection isn't much fun either.",tiers:[{tier:"Good",description:"Wearing a plastron underneath a stick fighting hoodie or fencing coach vest. The plastron covers the front of the rib cage.",items:[{name:"Absolute Force Chest Protector",description:"Underarm chest protector via Purpleheart Armoury.",image:"https://www.woodenswords.com/v/vspfiles/photos/AF.Chest-2.jpg",link:"https://www.woodenswords.com/Absolute_Force_Chest_Protector_p/af.chest.htm"},{name:"Fencing Coach Vest",description:"Light protective vest for coaching and sparring."},{name:"Swordshop HEMA Hoodie",description:"Newton-rated HEMA hoodie with removable foam inserts throughout the arms and a rigid removable throat protector. Excellent for impromptu bouting and light training.",link:"https://www.swordshop.ca"}]},{tier:"Better",description:"Light/medium fencing jacket. More overall protection than the vest and thicker material than the hoodie.",items:[{name:"Leonark Light Fencing Jacket",image:"/images/gear/leonark-light-jacket.jpg",link:"https://www.amazon.com/s?k=leonark+fencing+jacket"},{name:"Supfen Angelo 800N Jacket",description:"Medium jacket from Swordshop (prices in $CAD).",image:"/images/gear/angelo-800n-jacket.jpeg",link:"https://www.swordshop.ca/product/Supfen-Angelo-800N/67?cp=true&sa=false&sbp=false&q=false&category_id=8"},{name:"SPES Officers Jacket 350N",image:"/images/gear/spes-officers-jacket.webp",link:"https://www.woodenswords.com/SPES_Officers_Jacket_350N_p/spes-j.officer.htm"}]},{tier:"Best",description:"Plastron worn underneath any of the above light/medium fencing jackets for maximum protection.",items:[]}]},{category:"Knee & Shin Protection",description:"Hard knee and shin pads.",tiers:[{tier:"Good",description:"Hockey shin pads or baseball catcher's leg guards.",items:[{name:"Hockey Shin Pads (Sideline Swap)",image:"/images/gear/hockey-shin-pads.jpg",link:"https://sidelineswap.com/shop/hockey/protective/shin-pads/l96"}]}]},{category:"Groin Protection",description:"Mandatory equipment!",tiers:[{tier:"Good",items:[{name:"Shock Doctor Groin Protection w/ Jock Strap",image:"/images/gear/shock-doctor-groin.jpg",link:"https://www.amazon.com/s?k=shock+doctor+groin+protection+jock+strap"},{name:"Venum Groin Protection w/ Jock Strap",image:"/images/gear/venum-groin.jpg",link:"https://www.amazon.com/s?k=venum+groin+protection+jock+strap"}]}]}],currentlyRunning:!0,schedule:["Thursdays 7:00 PM â 9:00 PM"],icon:"âï¸"},{slug:"rapier",name:"Rapier",category:"adult",ageRange:"Adults 18+",shortDe
476scription:"The thrust-focused civilian sword of the 16th and 17th centuries â precision, measure, and elegant technique.",fullDescription:"Rapier joins the adult curriculum this October. This class focuses on the refined art of thrust-oriented fencing with the long-bladed civilian sidearm of Renaissance Europe. Students develop precise footwork, blade control, measure, and tactical subtlety in a supportive environment. No prior experience with rapier is required.",whyWeTrain:"The rapier represents one of the most sophisticated expressions of personal defense in European martial arts. Its emphasis on timing, distance, and minimal movement creates fencers of exceptional precision. Rapier training also provides excellent cross-training benefits for other weapon systems and deepens understanding of fencing theory.",gearRecommendations:["Fencing mask","Chest protector","Light fencing gloves","Rapier simulator"],currentlyRunning:!1,nextSessionDate:"Starts October 2026 · Thursdays 7:00â9:00 PM",gymDeskProgramId:"KaV9R",waitlistNavigateDate:"October 1",icon:"ð¤º"},{slug:"smallsword",name:"Smallsword",category:"adult",ageRange:"Adults 18+",shortDescription:"The gentleman's weapon â precision, finesse, and elegant technique.",fullDescription:"The smallsword was the everyday sidearm of 17th and 18th century Europe. This class focuses on the refined art of thrust-based fencing, teaching students precise footwork, blade control, and tactical subtlety. Smallsword training develops exceptional hand-eye coordination and the ability to read an opponent's intentions.",whyWeTrain:"Smallsword represents the pinnacle of individual weapon refinement. Its emphasis on timing, measure, and minimal movement creates fencers of exceptional precision. Training in smallsword also provides excellent cross-training benefits for other weapon systems and deepens understanding of fencing theory.",gearRecommendations:["Fencing mask","Chest protector","Light fencing gloves","Smallsword or foil simulator"],currentlyRunning:!1,icon:"ð¤º"},{slug:"stick-and-targe",name:"Stick & Targe",category:"adult",ageRange:"Ages 18+",shortDescription:"Highland-inspired martial arts using stick and small shield.",fullDescription:"Stick & Targe draws from the Scottish Highland tradition of fighting with a short stick (or sword) and a small round shield (targe). This dynamic system teaches students to attack and defend simultaneously, developing ambidexterity, quick reflexes, and aggressive tactical thinking. It's fast, physical, and deeply rewarding.",whyWeTrain:"The targe tradition represents one of the most practical and adaptable fighting systems in European history. Training with sword and shield develops coordination between offense and defense that no single-weapon system can match. Highland martial arts connect us to a fierce warrior tradition that valued courage, speed, and adaptability.",historicRoots:"Stick & Targe draws from the Scottish Highland tradition of sword-and-shield combat. Highland warriors carried the targe â a small, studded round shield â paired with a basket-hilted broadsword. This system was central to clan warfare and was famously wielded at battles like Killiecrankie and Culloden. At BladeFit, we preserve these techniques through safe, modern training.",historicRootsImage:"stick-and-targe-historic",gearRecommendations:["Fencing mask","Chest protector","Light gloves","Rattan single stick","Athletic clothing","Sticks and targes provided for beginners"],gearItems:[],currentlyRunning:!1,icon:"ð¡ï¸"},{slug:"beginner-single-stick",name:"Beginner Single Stick",category:"adult",ageRange:"Adults 18+",shortDescription:"Beginners start with a single stick inside the Military Saber class â the fundamentals of cutting, timing, and footwork.",fullDescription:"Beginner Single Stick runs as a joint class with Military Saber â new students start with a single stick in that same class and move to steel saber when they're ready. Using a simple stick, students learn fundamental striking, blocking, footwork, and timing in a low-pressure environment. This class emphasizes building confidence and basic martial skills that transfer to every other weapon system.",whyWeTrain:"The single stick strips martial arts down to its essentials: timing, distance, and intent. Without complex equipment or techniques, students can focus on developing genuine martial awareness and body mechanics. It's the fastest path from 'I've never done this' to 'I can handle myself.'",gearRecommendations:["Fencing mask with back of head protection","Gorget (throat protection)","Padded gloves","Forearm & elbow protection","Chest gear / fencing jacket","Hard knee & shin pads","Groin protection (mandatory)","Rattan single stick"],gearItems:[{name:'Rattan Single Stick (2 count) â 3/4" x 36"',description:"Quality rattan sticks for single stick and stick & targe training. Sold in pairs.",price:"$24.00",category:"Training Essential",image:"https://files.gymdesk.com/11688/products/product69338-74234e3e-large.jpg",link:"https://bladefit.shop/product/2-count-3-4-x-36-rattan-single-stick"}],tieredGear:[{category:"Fencing Mask & Back of Head Protection",description:"If you already own a fencing mask, you only need to add the SPES back of head protection. If you don't have a mask yet, watch this short video to understand the choices first.",videoId:"m7FI7LdRxWY",tiers:[{tier:"Good",description:"AF Basic Mask paired with SPES back of head protection.",items:[{name:"AF Basic Fencing Mask",image:"https://www.woodenswords.com/v/vspfiles/photos/af.mask.basic-2.jpg",link:"https://www.woodenswords.com/Absolute_Force_HEMA_Basic_Fencing_Mask_p/af.mask.basic.htm"},{name:"PHA Back of Head Plate",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.BOH.BLK-2.jpg",link:"https://www.woodenswords.com/HEMA_Back_of_the_Head_s/1926.htm"}]},{tier:"Better",description:"AF Coaches Mask paired with SPES back of head protection.",items:[{name:"AF Coaches Mask",image:"https://www.woodenswords.com/v/vspfiles/photos/AF.Mask.Coach-2.jpg",link:"https://www.woodenswords.com/product_p/af.mask.coach.htm"},{name:"PHA Back of Head Plate",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.BOH.BLK-2.jpg",link:"https://www.woodenswords.com/HEMA_Back_of_the_Head_s/1926.htm"}]},{tier:"Best",description:"AF Deluxe HEMA fencing mask â integrated back of head protection.",items:[{name:"AF Deluxe HEMA Fencing Mask",image:"/images/gear/af-deluxe-hema-mask.webp",link:"https://www.woodenswords.com/HEMA_Fencing_Mask_p/af.mask.deluxe.htm"}]}]},{category:"Gorget",description:"A gorget protects your larynx from heavy thrusts. A mask bib alone is not enough to deflect the force of a stiff thrust to the Adam's apple.",tiers:[{tier:"Good",items:[{name:"PHA Basic Gorget",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Gorget.Basic-2.jpg",link:"https://www.woodenswords.com/product_p/pha.gorget.basic.htm"}]},{tier:"Best",items:[{name:"Vectir Light Gorget",image:"https://www.woodenswords.com/v/vspfiles/photos/V.Gorget.LT-2.jpg",link:"https://www.woodenswords.com/product_p/v.gorget.lt.htm"}]}]},{category:"Padded Gloves",description:"Protect your hands and wrists.",tiers:[{tier:"Good",description:'Used lacrosse gloves at Play-it-Again Sports or online at Sideline Swap. Most will need a size 13" or 14".',items:[{name:"Used Lacrosse Gloves (Sideline Swap)",image:"https://sidelineswap.com/img/sidelineswap-og.png",link:"https://sidelineswap.com/shop/lacrosse/gloves/l87"}]},{tier:"Better",description:"Warrior Glove â designed for stick fighting outside a basket hilt. Price
476s are in $CAD (as of writing, $1 CAD â $0.69 USD). New tariffs may affect total.",items:[{name:"Warrior Gloves",image:"/images/gear/warrior-gloves.jpg",link:"https://www.swordshop.ca/product/Warrior-Gloves/94?cp=true&sa=false&sbp=false&q=false&category_id=12"}]},{tier:"Best",items:[{name:"Rapier / Singlestick Gloves",image:"https://www.woodenswords.com/v/vspfiles/photos/Glove.Rapier-2.jpg",link:"https://www.woodenswords.com/Gloves_Rapier_and_Singlestick_p/glove.rapier.htm"}]}]},{category:"Forearm & Elbow Protection",videoId:"KOm6-Xm0-QM",tiers:[{tier:"Good",description:"Lacrosse elbow pads with some forearm and bicep protection. Best if used with long cuff rapier/singlestick padded gloves.",items:[{name:"Lacrosse Arm Pads (Sideline Swap)",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Forearm.EL.Std-2.jpg",link:"https://sidelineswap.com/shop/lacrosse/protective/arm-pads/l457"}]},{tier:"Better",description:"Standard length forearm guard with elbow. Works with all protective gloves except the rapier/singlestick glove, which has a long cuff that extends over the forearm.",items:[{name:"PHA Standard Forearm Guard w/ Elbow",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Forearm.EL.Std-2.jpg",link:"https://www.woodenswords.com/product_p/pha.forearm.el.std.htm"}]},{tier:"Best",description:"Best option when paired with the rapier/singlestick glove (long cuff), or if your forearm is short. Otherwise there may be a gap in forearm protection.",items:[{name:"PHA Short Forearm Guard w/ Elbow",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Forearm.EL.Short-2.jpg",link:"https://www.woodenswords.com/Economy_Forearm_Guards_Short_p/pha.forearm.el.short.htm"}]}]},{category:"Chest Gear / Fencing Jacket",description:"Athletes should wear minimal gear suited to their personal comfort level. Heavy fencing jackets are too hot for warm-weather games and overkill for singlestick â but too little protection isn't much fun either.",tiers:[{tier:"Good",description:"Wearing a plastron underneath a stick fighting hoodie or fencing coach vest. The plastron covers the front of the rib cage.",items:[{name:"Leonark Fencing Plastron",description:"Underarm chest protector.",image:"/images/gear/leonark-plastron.jpg",link:"https://www.amazon.com/s?k=leonark+fencing+plastron"},{name:"Fencing Coach Vest",description:"Light protective vest for coaching and sparring."},{name:"Swordshop HEMA Hoodie",description:"Newton-rated HEMA hoodie with removable foam inserts throughout the arms and a rigid removable throat protector. Excellent for impromptu bouting and light training.",link:"https://www.swordshop.ca"}]},{tier:"Better",description:"Light/medium fencing jacket. More overall protection than the vest and thicker material than the hoodie.",items:[{name:"Leonark Light Fencing Jacket",image:"/images/gear/leonark-light-jacket.jpg",link:"https://www.amazon.com/s?k=leonark+fencing+jacket"},{name:"Supfen Angelo 800N Jacket",description:"Medium jacket from Swordshop (prices in $CAD).",image:"/images/gear/angelo-800n-jacket.jpeg",link:"https://www.swordshop.ca/product/Supfen-Angelo-800N/67?cp=true&sa=false&sbp=false&q=false&category_id=8"},{name:"SPES Officers Jacket 350N",image:"/images/gear/spes-officers-jacket.webp",link:"https://www.woodenswords.com/SPES_Officers_Jacket_350N_p/spes-j.officer.htm"}]},{tier:"Best",description:"Plastron worn underneath any of the above light/medium fencing jackets for maximum protection.",items:[]}]},{category:"Knee & Shin Protection",description:"Hard knee and shin pads.",tiers:[{tier:"Good",description:"Hockey shin pads or baseball catcher's leg guards.",items:[{name:"Hockey Shin Pads (Sideline Swap)",image:"/images/gear/hockey-shin-pads.jpg",link:"https://sidelineswap.com/shop/hockey/protective/shin-pads/l96"}]}]},{category:"Groin Protection",description:"Mandatory equipment!",tiers:[{tier:"Good",items:[{name:"Shock Doctor Groin Protection w/ Jock Strap",image:"/images/gear/shock-doctor-groin.jpg",link:"https://www.amazon.com/s?k=shock+doctor+groin+protection+jock+strap"},{name:"Venum Groin Protection w/ Jock Strap",image:"/images/gear/venum-groin.jpg",link:"https://www.amazon.com/s?k=venum+groin+protection+jock+strap"}]}]}],currentlyRunning:!0,schedule:["Thursdays 7:00 PM â 9:00 PM (joint with Military Saber)"],icon:"ð"},{slug:"adult-soft-combat",name:"Adult Soft Combat",category:"adult",ageRange:"Adults 18+",shortDe
476scription:"Sport sword fighting with padded weapons â athletic, fun, and competitive.",fullDescription:"Adult Soft Combat (Sport Sword) is fast-paced competitive fighting using padded weapons. This class focuses on athletic sword fighting with an emphasis on speed, strategy, and competitive awareness. It's perfect for those who want the thrill of sword fighting with lighter protective gear requirements.",whyWeTrain:"Soft combat provides an accessible entry point to martial arts and a high-intensity competitive outlet. The lighter gear requirements make it easy to get started, while the fast pace and full-contact nature build genuine fighting skills, cardio fitness, and mental resilience.",gearRecommendations:[],gearItems:[{name:"Sword 90cm / 2â² 11â³",description:"Standard one-handed soft sword.",category:"Weapons",image:"https://sparta.training/wp-content/uploads/2019/12/MKD03627-525x787.jpg",link:"https://sparta.training/product/sword/"},{name:"Sword 70cm / 2â² 4â³",description:"Short sword for close-in work.",category:"Weapons",image:"https://sparta.training/wp-content/uploads/2020/07/MKD03632-scaled-525x787.jpg",link:"https://sparta.training/product/sword-70-cm/"},{name:"Soft Saber",description:"Foam saber for saber-style fencing.",category:"Weapons",image:"https://sparta.training/wp-content/uploads/2020/10/MKD03590-scaled-525x787.jpg",link:"https://sparta.training/product/soft-saber/"},{name:"Two-Handed Sword",description:"Soft two-handed longsword.",category:"Weapons",image:"https://sparta.training/wp-content/uploads/2020/03/MKD03601-525x787.jpg",link:"https://sparta.training/product/two-handed-sword/"},{name:'"Pernach" Mace',description:"One-handed blunt weapon â great for grapplers and runners.",category:"Weapons",image:"https://sparta.training/wp-content/uploads/2024/05/4P7Q1333-1-525x406.jpg",link:"https://sparta.training/product/pernach-mace/"},{name:"Drop Shield",description:"Practical for buhurt and pro fight categories.",category:"Shields",image:"https://sparta.training/wp-content/uploads/2020/03/IMG_2253-scaled-e1631289740275-1024x1024.jpg",link:"https://sparta.training/product/drop-shield/"},{name:"Trapeze Shield",description:"Practical for buhurt and pro fight categories.",category:"Shields",image:"https://sparta.training/wp-content/uploads/2020/03/IMG_2262-scaled-525x525.jpg",link:"https://sparta.training/product/trapeze-shield/"},{name:"Heraldic Shield",description:"Standard medium shield for sword & shield.",category:"Shields",image:"https://sparta.training/wp-content/uploads/2024/01/photo1704964729-525x616.jpeg",link:"https://sparta.training/product/heraldic-shield-2/"},{name:"Buckler Shield",description:'~12" diameter â for fencing categories.',category:"Shields",image:"https://sparta.training/wp-content/uploads/2024/01/2025-06-13-17.12.23-731x1024.jpg",link:"https://sparta.training/product/buckler-shield-2/"},{name:"Buckler Mini",description:'~9.8" â block and grapple easily.',category:"Shields",image:"https://sparta.training/wp-content/uploads/2023/02/MKD03723-1-scaled-525x787.jpg",link:"https://sparta.training/product/buckler-mini/"},{name:"Absolute Force HEMA Basic Fencing Mask",description:"Required for all sparring classes. A solid entry-level HEMA fencing mask via Purpleheart Armoury.",category:"Safety Gear",image:"https://www.woodenswords.com/v/vspfiles/photos/af.mask.basic-2.jpg",link:"https://www.woodenswords.com/Absolute_Force_HEMA_Basic_Fencing_Mask_p/af.mask.basic.htm"},{name:"Helmet With Neck Protection",description:"Secures well to the face â good for shield edge contact.",category:"Safety Gear",image:"https://sparta.training/wp-content/uploads/2021/03/helmet_blue_2-1-525x295.jpeg",link:"https://sparta.training/product/helmet-with-neck-protection-3/"},{name:"Wesing Chest Protector",description:"Chest guard for soft combat. Available in multiple sizes.",category:"Safety Gear",image:"/images/wesing-chest-protector.jpg",link:"https://www.amazon.com/Martial-Boxing-Protector-63-39in-67in-123lb-132lb/dp/B01MYW6YEA/"},{name:"Shock Doctor Groin Protection w/ Jock Strap",description:"Required for all sparring.",category:"Safety Gear",image:"/images/gear/shock-doctor-groin.jpg",link:"https://www.amazon.com/s?k=shock+doctor+groin+protection+jock+strap"},{name:"Venum Groin Protection w/ Jock Strap",description:"Alternative groin protection option.",category:"Safety Gear",image:"/images/gear/venum-groin.jpg",link:"https://www.amazon.com/s?k=venum+groin+protection+jock+strap"}],coachRecommendations:[],currentlyRunning:!1,icon:"ð¤º"}],xs=[...yn,...xn];function bd(e){return xs.find(t=>t.slug===e)}function ck({classes:e}){return i.jsx("div",{className:"mx-auto max-w-3xl space-y-4",children:e.map(t=>{var r;return i.jsx(L.div,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4},children:i.jsxs(B,{to:`/classes/${t.slug}
476`,className:"flex flex-col gap-4 rounded-lg border border-border bg-card p-6 transition-all hover:border-primary/40 hover:shadow-gold sm:flex-row sm:items-center sm:justify-between",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("span",{className:"text-2xl",children:t.icon}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-heading text-lg font-semibold",children:t.name}),i.jsx("p",{className:"text-sm text-muted-foreground",children:t.ageRange})]})]}),i.jsx("div",{className:"space-y-1 pl-11 sm:pl-0 sm:text-right",children:(r=t.schedule)==null?void 0:r.map(n=>i.jsxs("p",{className:"flex items-center gap-1.5 text-sm text-muted-foreground sm:justify-end",children:[i.jsx(Nr,{className:"h-3.5 w-3.5"}),n]},n))})]})},t.slug)})})}function XV(){const e=yn.filter(r=>r.currentlyRunning&&r.schedule),t=xn.filter(r=>r.currentlyRunning&&r.schedule);return i.jsx("section",{className:"py-20",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsxs(L.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"mb-10 text-center",children:[i.jsx("h2",{className:"font-heading text-3xl font-bold md:text-4xl",children:"Current Class Schedule"}),i.jsx("p",{className:"mt-3 text-muted-foreground",children:"Find the right class for you â times shown are for the current term"})]}),i.jsxs(L.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.1},children:[i.jsx("h3",{className:"mb-6 text-center font-heading text-2xl font-semibold",children:"Adult Classes"}),i.jsx(ck,{classes:t})]}),i.jsxs(L.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.2},className:"mt-16 border-t border-border pt-16",children:[i.jsx("h3",{className:"mb-6 text-center font-heading text-2xl font-semibold",children:"Youth Classes"}),i.jsx(ck,{classes:e})]}),i.jsx("div",{className:"mt-12 text-center",children:i.jsx(B,{to:"/schedule",children:i.jsxs(I,{variant:"outline",className:"border-primary/30 hover:border-primary hover:text-primary",children:[i.jsx(pr,{className:"mr-2 h-4 w-4"}),"View Full Schedule"]})})})]})})}const eH=[{name:"Charlie C.",source:"Google",text:"Bladefit Academy has made learning sword fighting both fun and cool. Coach Nate is a very good teacher, knowledgeable, kind and helpful. There's great camaraderie in class â never a dull moment. My daughter has learned a lot and continues to enjoy taking lessons every week. We are very happy we found Bladefit Academy.",highlight:"parent"},{name:"Angelyka C.",source:"Google",text:"Coach Nate is excellent at instructing, and a very nice, patient, and knowledgeable person. You can tell that he is passionate about what he does. Classes tend to consist of both practicing techniques and utilizing them in sparring and fun games. Good community. I'd love to keep coming here as much as I can.",highlight:"adult"},{name:"Tim R.",source:"Facebook",text:"BladeFit Academy is where I started my fitness journey, from watching TV all day to exercising, touching grass and enjoying my life. The coach is very friendly and knowledgeable. There are many amazing people to train with, young and old. If you wanna swordfight, get fit, and have fun, this is a great community for it!",highlight:"adult"},{name:"Colton S.",source:"Google",text:"Bladefit is phenomenal. They have a friendly welcoming atmosphere, a top notch instructor, and a program that makes learning quick and intuitive. This is also a GREAT workout. Plenty of time is allotted to sparring and games. I highly recommend reaching out and joining a class!",highlight:"adult"},{name:"Devyn J.",source:"Google",text:"I had never thought about HEMA as a Martial Art, but now I understand what the old books meant about a code and how beautiful swordsmanship can be. A great place to learn and a great place to just be yourself in a community oriented environment. Come be a part of the family that is BladeFit Academy!",highlight:"adult"},{name:"Salem Z.",source:"Google",text:"Friendly and helpful coach. A thoroughly enjoyable class.",highlight:"adult"}],tH={hidden:{},show:{transition:{staggerChildren:.08}}},rH={hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:{duration:.5}}};function nH(){return i.jsx("section",{className:"py-20",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsxs(L.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"mb-12 text-center",children:[i.jsxs("div",{className:"mx-auto mb-6 inline-flex items-center gap-2 rounded-full border border-border bg-card px-5 py-2.5 shadow-sm",children:[i.jsx("div",{className:"flex gap-0.5",children:[...Array(5)].map((e,t)=>i.jsx(Ma,{className:`h-4 w-4 ${t<4?"fill-primary text-primary":"fill-primary/60 text-primary/60"}`},t))}),i.jsx("span",{className:"text-sm font-semibold",children:"4.7"}),i.jsx("span",{className:"text-sm text-muted-foreground",children:"on Google"})]}),i.jsx("h2",{className:"font-heading text-3xl font-bold md:text-4xl",children:"What Our Students Say"}),i.jsx("p",{className:"mt-3 text-muted-foreground",children:"Real reviews from real members of the BladeFit community"})]}
476),i.jsx(L.div,{variants:tH,initial:"hidden",whileInView:"show",viewport:{once:!0,margin:"-50px"},className:"mx-auto grid max-w-6xl gap-5 sm:grid-cols-2 lg:grid-cols-3",children:eH.map(e=>i.jsxs(L.div,{variants:rH,className:"relative flex flex-col rounded-lg border border-border bg-card p-6",children:[i.jsx(QD,{className:"mb-3 h-5 w-5 text-primary/40"}),i.jsxs("p",{className:"flex-1 text-sm leading-relaxed text-muted-foreground",children:['"',e.text,'"']}),i.jsxs("div",{className:"mt-5 flex items-center justify-between border-t border-border pt-4",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-semibold",children:e.name}),i.jsxs("p",{className:"text-xs text-muted-foreground",children:[e.source," Review"]})]}),i.jsx("div",{className:"flex gap-0.5",children:[...Array(5)].map((t,r)=>i.jsx(Ma,{className:"h-3 w-3 fill-primary text-primary"},r))})]})]},e.name))})]})})}function sH(){return i.jsxs("section",{className:"relative overflow-hidden border-t border-border py-20",children:[i.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_bottom_left,hsl(32_80%_37%/0.05),transparent_60%)]"}),i.jsxs(L.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"container relative z-10 mx-auto px-4 text-center lg:px-8",children:[i.jsx("h2",{className:"font-heading text-3xl font-bold md:text-4xl",children:"Ready to Start Your Journey?"}),i.jsx("p",{className:"mx-auto mt-4 max-w-lg text-muted-foreground",children:"Try a trial class for $5. No experience needed â just show up in comfortable clothes with a willingness to learn."}),i.jsx(B,{to:"/trial",className:"mt-8 inline-block",children:i.jsxs(I,{size:"lg",className:"bg-gradient-gold text-base font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:[i.jsx(qe,{className:"mr-2 h-5 w-5"}),"Try a Trial Class"]})})]})]})}const iH=1,aH="62544e55-c9bc-4fef-b02b-e4ea6e0076d3",oH="32565fbf-e4e6-44cc-b23c-87c113644be1",lH="/__l5e/assets-v1/62544e55-c9bc-4fef-b02b-e4ea6e0076d3/apparel-hoodie.jpg",cH="a/v1/32565fbf-e4e6-44cc-b23c-87c113644be1/62544e55-c9bc-4fef-b02b-e4ea6e0076d3/apparel-hoodie.jpg",dH="apparel-hoodie.jpg",uH=416568,hH="image/jpeg",mH="2026-06-29T20:36:23Z",fH={version:iH,asset_id:aH,project_id:oH,url:lH,r2_key:cH,original_filename:dH,size:uH,content_type:hH,created_at:mH},pH=1,gH="fe09ef82-84ae-4523-bc9e-96cd205db22d",yH="32565fbf-e4e6-44cc-b23c-87c113644be1",xH="/__l5e/assets-v1/fe09ef82-84ae-4523-bc9e-96cd205db22d/apparel-fiore.jpg",vH="a/v1/32565fbf-e4e6-44cc-b23c-87c113644be1/fe09ef82-84ae-4523-bc9e-96cd205db22d/apparel-fiore.jpg",wH="apparel-fiore.jpg",bH=573416,jH="image/jpeg",kH="2026-06-29T20:36:26Z",SH={version:pH,asset_id:gH,project_id:yH,url:xH,r2_key:vH,original_filename:wH,size:bH,content_type:jH,created_at:kH},_H=1,NH="13dc47e7-3d78-4061-8d1d-7069ce68ffc1",CH="32565fbf-e4e6-44cc-b23c-87c113644be1",AH="/__l5e/assets-v1/13dc47e7-3d78-4061-8d1d-7069ce68ffc1/apparel-tee.jpg",TH="a/v1/32565fbf-e4e6-44cc-b23c-87c113644be1/13dc47e7-3d78-4061-8d1d-7069ce68ffc1/apparel-tee.jpg",EH="apparel-tee.jpg",RH=350447,PH="image/jpeg",IH="2026-06-29T20:36:29Z",OH={version:_H,asset_id:NH,project_id:CH,url:AH,r2_key:TH,original_filename:EH,size:RH,content_type:PH,created_at:IH},MH=[{src:fH.url,alt:"BladeFit all-over-print zip hoodie with skull, snake, and roses back design"},{src:SH.url,alt:"BladeFit Fiore t-shirt front and back with the four virtues: Prudence, Celerity, Fortitude, Audacity",hideOnMobile:!0},{src:OH.url,alt:"BladeFit navy 'live laugh Liechtenauer' fitted t-shirt",hideOnMobile:!0}];function DH(){return i.jsxs("section",{className:"relative overflow-hidden border-t border-border py-20",children:[i.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_top_right,hsl(32_80%_37%/0.06),transparent_60%)]"}),i.jsxs(L.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"container relative z-10 mx-auto px-4 text-center lg:px-8",children:[i.jsx("div",{className:"mx-auto mb-5 inline-flex h-14 w-14 items-center justify-center rounded-lg bg-gradient-to-br from-primary/20 to-primary/5",children:i.jsx(gl,{className:"h-7 w-7 text-primary"})}),i.jsx("h2",{className:"font-heading text-3xl font-bold md:text-4xl",children:"Shop BladeFit Apparel"}),i.jsx("p",{className:"mx-auto mt-4 max-w-lg text-muted-foreground",children:"Represent the academy with official BladeFit gear and apparel. Visit our online store to browse the latest drops."}),i.jsx("div",{className:"mx-auto mt-12 grid max-w-sm grid-cols-1 gap-6 sm:max-w-4xl sm:grid-cols-3",children:MH.map(e=>i.jsx("div",{className:`overflow-hidden rounded-xl border border-border bg-card ${e.hideOnMobile?"hidden sm:block":""}`,children:i.jsx("img",{src:e.src,alt:e.alt,loading:"lazy",className:"aspect-square w-full object-cover"})},e.src))}),i.jsx("a",{href:"https://bladefit.shop",target:"_blank",rel:"noopener noreferrer",className:"mt-8 inl
476ine-block",children:i.jsxs(I,{size:"lg",className:"bg-gradient-gold text-base font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:["Visit BladeFit.shop",i.jsx(xt,{className:"ml-2 h-5 w-5"})]})})]})]})}function iE(){return i.jsx("section",{className:"border-y border-primary/30 bg-primary/5 py-12",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs(L.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.5},className:"flex flex-col items-start gap-5 md:flex-row md:items-center md:justify-between",children:[i.jsxs("div",{className:"max-w-2xl",children:[i.jsxs("p",{className:"mb-2 flex items-center gap-2 font-heading text-sm font-semibold uppercase tracking-[0.2em] text-primary",children:[i.jsx(a2,{className:"h-4 w-4"}),"Wellhub Affiliated Gym"]}),i.jsx("h2",{className:"font-heading text-2xl font-bold md:text-3xl",children:"Have Wellhub? Your classes may be covered."}),i.jsx("p",{className:"mt-2 text-muted-foreground leading-relaxed",children:"BladeFit Academy is a Wellhub-affiliated gym. If you have Wellhub through your workplace, your sword training can be paid for through your benefit."})]}),i.jsx(I,{asChild:!0,size:"lg",className:"shrink-0",children:i.jsxs(B,{to:"/wellhub",children:["Find Out More",i.jsx(xt,{className:"ml-2 h-4 w-4"})]})})]})})})}const jl=[{slug:"uniforms",name:"Uniforms",shortDescription:"Rank-based uniform tees for Youth Soft Sword students.",image:"https://bladefit1.myshopify.com/cdn/shop/files/unisex-sports-tee-kelly-green-front-681baef39b463.jpg?v=1752173120&width=533",classSections:[{classSlug:"youth-soft-sword",className:"Youth Soft Sword",description:"Each rank has its own uniform color. Students receive their rank tee as they progress through the program.",items:[{name:"BladeFit Squire Uniform Tee â Green Initiate Edition",description:"Squire rank uniform tee in Kelly Green for initiates.",price:"$25.00",category:"Squire",image:"https://bladefit1.myshopify.com/cdn/shop/files/unisex-sports-tee-kelly-green-front-681baef39b463.jpg?v=1752173120&width=533",link:"https://bladefit1.myshopify.com/products/bladefit-squire-uniform-tee-green-initiate-edition"},{name:"BladeFit Knight Uniform Tee â Red Resolve Edition",description:"Knight rank uniform tee in Red. DryBlend® performance fabric.",price:"$25.00",category:"Knight",image:"https://bladefit1.myshopify.com/cdn/shop/files/unisex-sports-tee-red-front-67f56abd45343.jpg?v=1752173156&width=533",link:"https://bladefit1.myshopify.com/products/knight-dryblend%C2%AE-t-shirt"},{name:"Cavalier Uniform DryBlend® T-Shirt",description:"Cavalier rank uniform tee in Royal Blue. DryBlend® performance fabric.",price:"$25.00",category:"Cavalier",image:"https://bladefit1.myshopify.com/cdn/shop/files/unisex-sports-tee-royal-front-67f5669ebb0a6.jpg?v=1752173154&width=533",link:"https://bladefit1.myshopify.com/products/cavalier-uniform-dryblend%C2%AE-t-shirt"}]}]},{slug:"helmets",name:"Helmets",shortDescription:"Fencing masks and back-of-head protection for every discipline.",image:"https://www.woodenswords.com/v/vspfiles/photos/af.mask.basic-2.jpg",classSections:[{classSlug:"intermediate-longsword",className:"Intermediate Longsword",items:[{name:"Absolute Force HEMA Basic Fencing Mask",description:"Required for all sparring classes. A solid entry-level HEMA fencing mask via Purpleheart Armoury.",category:"Training Essential",image:"https://www.woodenswords.com/v/vspfiles/photos/af.mask.basic-2.jpg",link:"https://www.woodenswords.com/Absolute_Force_HEMA_Basic_Fencing_Mask_p/af.mask.basic.htm"},{name:"Back of the Head Protection",description:"Required for longsword sparring. Multiple options available.",category:"Safety Gear",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.BOH.BLK-2.jpg",link:"https://www.woodenswords.com/HEMA_Back_of_the_Head_s/1926.htm"}]},{classSlug:"stick-and-targe",className:"Stick & Targe",items:[{name:"Absolute Force HEMA Basic Fencing Mask",description:"Required for all sparring classes. A solid entry-level HEMA fencing mask via Purpleheart Armoury.",category:"Training Essential",image:"https://www.woodenswords.com/v/vspfiles/photos/af.mask.basic-2.jpg",link:"https://www.woodenswords.com/Absolute_Force_HEMA_Basic_Fencing_Mask_p/af.mask.basic.htm"}]},{classSlug:"youth-soft-sword",className:"Youth Soft Sword",description:"Two approved helmet options for ages 11+.",items:[{name:"Absolute Force HEMA Basic Fencing Mask",description:"Required for all youth ages 11+. Via Purpleheart Armoury.",category:"Fencing Mask",image:"https://www.woodenswords.com/v/vspfiles/photos/af.mask.basic-2.jpg",link:"https://www.woodenswords.com/Absolute_Force_HEMA_Basic_Fencing_Mask_p/af.mask.basic.htm"},{name:"Soft Warrior Sparta Helmet",description:"Alternative helmet option for all youth ages 11+. Includes neck protection.",category:"Sparta Helmet",image:"https://sparta.training/wp-content/uploads/2021/03/helmet_blue_2-1-525x295.jpeg",link:"https://sparta.training/product/helmet-with-neck-protection-3/"}]},{classSlug:"bladefit-games",className:"BladeFit Games",description:"Same helmet requirements as Youth Soft Sword.",items:[{name:"Absolute Force HEMA Basic Fencing Mask",description:"Required for all youth ages 11+. Via Purpleheart Armoury.",category:"Fencing Mask",image:"https://www.woodenswords.com/v/vspfiles/photos/af.mask.basic-2.jpg",link:"https://www.woodenswords.com/Absolute_Force_HEMA_Basic_Fencing_Mask_p/af.mask.basic.htm"},{name:"Soft Warrior Sparta Helmet",description:"Alternative helmet option for all youth ages 11+. Includes neck protection.",category:"Sparta Helmet",image:"https://sparta.training/wp-content/uploads/2021/03/helmet_blue_2-1-525x295.jpeg",link:"https://sparta.training/product/helmet-with-neck-protection-3/"}]}]}
476,{slug:"jackets",name:"Jackets & Chest Protection",shortDescription:"Fencing jackets, plastrons, and chest protectors by discipline.",image:"/images/gear/leonark-light-jacket.jpg",classSections:[{classSlug:"intermediate-longsword",className:"Intermediate Longsword",items:[{name:"SPES Officers Jacket",description:"Heavy-duty HEMA fencing jacket with excellent protection for steel longsword sparring.",category:"Jackets & Body Protection",image:"/images/gear/spes-officers-jacket.webp",link:"https://www.woodenswords.com/SPES_Officers_Jacket_350N_p/spes-j.officer.htm"},{name:"Supfen Angelo 800N Jacket",description:"800N-rated HEMA jacket. Excellent protection for steel sparring (prices in $CAD).",category:"Jackets & Body Protection",image:"/images/gear/angelo-800n-jacket.jpeg",link:"https://www.swordshop.ca/product/Supfen-Angelo-800N/67?cp=true&sa=false&sbp=false&q=false&category_id=8"}]},{classSlug:"stick-and-targe",className:"Stick & Targe",items:[{name:"Absolute Force Chest Protector",description:"Recommended for all adult sparring classes. Durable chest protection via Purpleheart Armoury.",category:"Chest Protection",image:"https://www.woodenswords.com/v/vspfiles/photos/af.chest-2.jpg",link:"https://www.woodenswords.com/Absolute_Force_Chest_Protector_p/af.chest.htm"}]},{classSlug:"youth-soft-sword",className:"Youth Soft Sword",items:[{name:"Wesing Chest Protector (Ages 10â17)",description:"Chest guard for youth soft combat. Available in Black, Blue, or Red.",category:"Chest Protection",image:"/images/wesing-chest-protector.jpg",link:"https://www.amazon.com/dp/B0B5QHNZ4D/?coliid=I2FH93UIXA9BK&colid=1QREH0G2L6D4K&ref_=list_c_wl_lv_ov_lig_dp_it&th=1"}]},{classSlug:"bladefit-games",className:"BladeFit Games",items:[{name:"Wesing Chest Protector (Ages 10â17)",description:"Chest guard for youth soft combat. Available in Black, Blue, or Red.",category:"Chest Protection",image:"/images/wesing-chest-protector.jpg",link:"https://www.amazon.com/dp/B0B5QHNZ4D/?coliid=I2FH93UIXA9BK&colid=1QREH0G2L6D4K&ref_=list_c_wl_lv_ov_lig_dp_it&th=1"}]}]},{slug:"longswords",name:"Longswords & Training Swords",shortDescription:"Shinai, feders, and training swords for longsword classes.",image:"https://www.woodenswords.com/v/vspfiles/photos/RA.LS.F.Spiky.Std.MED-2.jpg",classSections:[{classSlug:"beginner-longsword",className:"Beginner Longsword",items:[{name:"Shinai",description:"Bamboo training sword for beginner longsword. Cross guard provided separately.",category:"Training Essential",image:"https://files.gymdesk.com/11688/products/product92424-1388f510.jpg",link:"https://www.e-bogu.com/Complete-Kendo-Shinai-with-leather-parts-Size-39-p/hay-ken-shi-hqcomp-39.htm",price:"$30.00"}]},{classSlug:"intermediate-longsword",className:"Intermediate Longsword",items:[{name:"Standard Feder (Regenyei Armory)",description:"The standard longsword for HEMA training. Via Purpleheart Armoury.",category:"Training Essential",image:"https://www.woodenswords.com/v/vspfiles/photos/RA.LS.F.Spiky.Std.MED-2.jpg",link:"https://www.woodenswords.com/product_p/ra.ls.f.spiky.std.med.htm"}]}]},{slug:"youth-swords-shields",name:"Swords & Shields",shortDescription:"Age-appropriate soft swords, sabers, and shields for Youth Soft Sword.",image:"https://sparta.training/wp-content/uploads/2020/07/MKD03632-scaled-525x787.jpg",classSections:[{classSlug:"youth-soft-sword",className:"Youth Soft Sword",description:"Weapons are sized by age group. Shields should be the 5cm thick version.",items:[{name:"Sword 80cm for Ages 12â13",description:"One-handed sword for 12â13 year olds. Weight: 450g, Full length: 80cm, Blade: 67cm.",category:"Weapons (Ages 12â13)",image:"https://sparta.training/wp-content/uploads/2020/06/IMG_2240-scaled-525x525.jpg",link:"https://sparta.training/product/sword-for-kids-12-13-years/"},{name:"Hand Guarded Saber (Ages 12â13)",description:"Standard hand guarded saber for 12â13 year olds. Weight: 1.0lb, Blade: 26â³, Total: 31.3â³.",category:"Weapons (Ages 12â13)",image:"https://www.woodenswords.com/v/vspfiles/photos/pad.saber.std-2.jpg",link:"https://www.woodenswords.com/product_p/pad.saber.std.htm"},{name:"Sword 90cm / 2â² 11â³ (Ages 14â17)",description:"One-handed sword for 14â17 year olds. Weight: 0.750kg / 1.65 lbs.",category:"Weapons (Ages 14â17)",image:"https://sparta.training/wp-content/uploads/2019/12/MKD03627-525x787.jpg",link:"https://sparta.training/product/sword/"},{name:"Soft Saber 95cm (Ages 14â17)",description:"Saber for 14â17 year olds. Length: 95cm / 2â² 21â³, Weight: 0.750kg / 1.65 lbs.",category:"Weapons (Ages 14â17)",image:"https://sparta.training/wp-content/uploads/2019/12/MKD03627-525x787.jpg",link:"https://sparta.training/product/soft-saber/"},{name:"Hand Guarded Saber (Ages 14â17)",description:"For 14â17 year olds. Weight: 1.2lb, Blade: 30.7â³, Total: 37â³.",category:"Weapons (Ages 14â17)",image:"https://www.woodenswords.com/v/vspfiles/photos/pad.saber.h-2.jpg",link:"https://www.woodenswords.com/product_p/pad.saber.h.htm"},{name:"Heraldic Shield (Heater Shield)",description:"For all youth ages 11+. Order the 5cm thick ver
476sion (not the 3cm).",category:"Shields",image:"https://cdn-cmalk.nitrocdn.com/YkroMshTXcwhhfUHkzRimXGfdxmnOYeW/assets/images/optimized/rev-4b7ef57/sparta.training/wp-content/uploads/2020/03/IMG_2276-1024x1024.jpg",link:"https://sparta.training/product/heater-shield/"}]},{classSlug:"bladefit-games",className:"BladeFit Games",description:"Same swords and shields as Youth Soft Sword.",items:[{name:"Sword 80cm for Ages 12â13",description:"One-handed sword for 12â13 year olds. Weight: 450g, Full length: 80cm, Blade: 67cm.",category:"Weapons (Ages 12â13)",image:"https://sparta.training/wp-content/uploads/2020/06/IMG_2240-scaled-525x525.jpg",link:"https://sparta.training/product/sword-for-kids-12-13-years/"},{name:"Hand Guarded Saber (Ages 12â13)",description:"Standard hand guarded saber for 12â13 year olds. Weight: 1.0lb, Blade: 26â³, Total: 31.3â³.",category:"Weapons (Ages 12â13)",image:"https://www.woodenswords.com/v/vspfiles/photos/pad.saber.std-2.jpg",link:"https://www.woodenswords.com/product_p/pad.saber.std.htm"},{name:"Sword 90cm / 2â² 11â³ (Ages 14â17)",description:"One-handed sword for 14â17 year olds. Weight: 0.750kg / 1.65 lbs.",category:"Weapons (Ages 14â17)",image:"https://sparta.training/wp-content/uploads/2019/12/MKD03627-525x787.jpg",link:"https://sparta.training/product/sword/"},{name:"Soft Saber 95cm (Ages 14â17)",description:"Saber for 14â17 year olds. Length: 95cm / 2â² 21â³, Weight: 0.750kg / 1.65 lbs.",category:"Weapons (Ages 14â17)",image:"https://sparta.training/wp-content/uploads/2019/12/MKD03627-525x787.jpg",link:"https://sparta.training/product/soft-saber/"},{name:"Hand Guarded Saber (Ages 14â17)",description:"For 14â17 year olds. Weight: 1.2lb, Blade: 30.7â³, Total: 37â³.",category:"Weapons (Ages 14â17)",image:"https://www.woodenswords.com/v/vspfiles/photos/pad.saber.h-2.jpg",link:"https://www.woodenswords.com/product_p/pad.saber.h.htm"},{name:"Heraldic Shield (Heater Shield)",description:"For all youth ages 11+. Order the 5cm thick version (not the 3cm).",category:"Shields",image:"https://cdn-cmalk.nitrocdn.com/YkroMshTXcwhhfUHkzRimXGfdxmnOYeW/assets/images/optimized/rev-4b7ef57/sparta.training/wp-content/uploads/2020/03/IMG_2276-1024x1024.jpg",link:"https://sparta.training/product/heater-shield/"}]}]},{slug:"sticks-and-shields",name:"Sticks & Shields",shortDescription:"Rattan sticks, targes, and shields for stick-based classes.",image:"https://files.gymdesk.com/11688/products/product69338-74234e3e-large.jpg",classSections:[{classSlug:"stick-and-targe",className:"Stick & Targe",description:"Sticks and targes are provided for beginners. Purchase your own as you progress.",items:[{name:'Rattan Single Stick (2 count) â 3/4" x 36"',description:"Quality rattan sticks for single stick and stick & targe training. Sold in pairs.",category:"Training Essential",image:"https://files.gymdesk.com/11688/products/product69338-74234e3e-large.jpg",link:"https://bladefit.shop/product/2-count-3-4-x-36-rattan-single-stick",price:"$24.00"}]}]}
476,{slug:"gloves",name:"Gloves",shortDescription:"Heavy sparring gloves and hand protection for saber and longsword.",image:"/images/gear/warrior-gloves.jpg",classSections:[{classSlug:"intermediate-longsword",className:"Intermediate Longsword",description:"Heavy HEMA gloves required for intermediate longsword sparring with steel feders.",items:[{name:"HF Armory Black Knight HEMA Gloves",description:"Maximum protection gloves designed for longsword fencing. Polypropylene construction with leather palm grip. Under 1 kg per pair.",category:"gloves",image:"/images/gear/hf-armory-black-knight-gloves.jpg",link:"https://hf-armory.com/en/shop/protectors/hand-protection/fencing-gloves-black-knight/?alg_currency=USD",price:"$242.55"}]},{classSlug:"stick-and-targe",className:"Stick & Targe",description:"Light gloves recommended for stick & targe sparring."}]},{slug:"gorgets",name:"Gorgets",shortDescription:"Throat protection for saber and steel weapon sparring.",image:"https://www.woodenswords.com/v/vspfiles/photos/V.Gorget.LT-2.jpg",classSections:[{classSlug:"intermediate-longsword",className:"Intermediate Longsword",description:"Gorget (throat protection) required for longsword sparring.",items:[{name:"PHA Basic Gorget",description:"Throat protection required for longsword sparring.",category:"Safety Gear",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Gorget.Basic-2.jpg",link:"https://www.woodenswords.com/product_p/pha.gorget.basic.htm"},{name:"Veneto Gorget",description:"Lightweight throat protection option. Via Purpleheart Armoury.",category:"Safety Gear",image:"https://www.woodenswords.com/v/vspfiles/photos/V.Gorget.LT-2.jpg",link:"https://www.woodenswords.com/product_p/v.gorget.lt.htm"}]}]},{slug:"elbow-protection",name:"Elbow & Arm Protection",shortDescription:"Forearm guards and elbow pads for stick and saber sparring.",image:"https://www.woodenswords.com/v/vspfiles/photos/PHA.Forearm.EL.Std-2.jpg",classSections:[]},{slug:"knee-shin-protection",name:"Knee & Shin Protection",shortDescription:"Hard knee and shin pads for stick fighting and contact sparring.",image:"/images/gear/hockey-shin-pads.jpg",classSections:[]},{slug:"groin-protection",name:"Groin Protection",shortDescription:"Mandatory groin protection for stick fighting and contact sparring.",image:"/images/gear/shock-doctor-groin.jpg",classSections:[{classSlug:"youth-soft-sword",className:"Youth Soft Sword",items:[{name:"Shock Doctor Groin Protection w/ Jock Strap",description:"Required for all youth sparring.",category:"Groin Protection",image:"/images/gear/shock-doctor-groin.jpg",link:"https://www.amazon.com/s?k=shock+doctor+groin+protection+jock+strap"}]},{classSlug:"bladefit-games",className:"BladeFit Games",items:[{name:"Shock Doctor Groin Protection w/ Jock Strap",description:"Required for all youth sparring.",category:"Groin Protection",image:"/images/gear/shock-doctor-groin.jpg",link:"https://www.amazon.com/s?k=shock+doctor+groin+protection+jock+strap"}]},{classSlug:"beginner-longsword",className:"Beginner Longsword",items:[{name:"Shock Doctor Groin Protection w/ Jock Strap",description:"Required for longsword sparring.",category:"Groin Protection",image:"/images/gear/shock-doctor-groin.jpg",link:"https://www.amazon.com/s?k=shock+doctor+groin+protection+jock+strap"},{name:"Venum Groin Protection w/ Jock Strap",description:"Alternative groin protection option.",category:"Groin Protection",image:"/images/gear/venum-groin.jpg",link:"https://www.amazon.com/s?k=venum+groin+protection+jock+strap"}]},{classSlug:"intermediate-longsword",className:"Intermediate Longsword",items:[{name:"Shock Doctor Groin Protection w/ Jock Strap",description:"Required for longsword sparring.",category:"Groin Protection",image:"/images/gear/shock-doctor-groin.jpg",link:"https://www.amazon.com/s?k=shock+doctor+groin+protection+jock+strap"},{name:"Venum Groin Protection w/ Jock Strap",description:"Alternative groin protection option.",category:"Groin Protection",image:"/images/gear/venum-groin.jpg",link:"https://www.amazon.com/s?k=venum+groin+protection+jock+strap"}]}]}];function LH(e){return jl.find(t=>t.slug===e)}function Zw(e){return jl.filter(t=>t.classSections.some(r=>r.classSlug===e))}const Wo=[{name:"Nathan McBride",photoKey:"nathan",titles:["Head Instructor","Order of the Red Sash"],bio:`Nathan McBride brings a modern athletics approach to
476sword training, with over 16 years of daily sword practice and experience with training adults and kids of all ages. He is passionate about fostering a Medieval Sword Club for the modern era. 477 478Originally Coach Nate was certified in programming for the International Federation of Modern Sword Fighting (IFMSF). In addition he has been dedicated to the study of putting together modern coaching pedagogy towards the original HEMA sources (Historic European Martial Arts). Nathan is well positioned to provide the glorious learning experience for those of all ages wishing to learn the panache and power of swordsmanship. 479 480BladeFit Academy is unique in that the club is evenly split between adults and youth, serving each's need as befitting their place in the journey of life. 481 482Today's kids especially need broader sporting outlets that foster healthy lifestyles in both mind and body. Nate wants to help kids everywhere get active in a challenging sport, provide a positive peer group with a common interest, balance the digital world with an achievement-based physical one, and reinforce classic western virtues of sportsmanship, honor, and fair play.`},{name:"Lisa McBride",photoKey:"lisa",titles:["Program Director"],bio:"With 5 years of sword experience and over 15 years of business management experience, Lisa brings a unique set of skills to our team. Lisa has had several decades of experience motivating kids in numerous volunteer capacities, helping them to improve towards end goals. When she's not playing mom and coaching she can be found swinging a sword, working out, hiking, studying fitness, diet, and alternative healing methods."},{name:"Eric Kuhta",photoKey:"eric",titles:["Longsword Instructor"],bio:"Eric's passion for HEMA started in college when he saw an exhibition match at a county fair. For the past three years he has pursued the sport, always seeking new challenges to further his knowledge. Now he joins the coaching team at BladeFit where his background in teaching helps him break down the concepts to be understandable by students of any experience level."},{name:"Draco Hinman",photoKey:"draco",titles:["Military Saber Instructor","Smallsword Instructor"],bio:"Draco began his martial journey in 2004 with foam fighting through Amtgard, where he first discovered the joy of fast-paced swordplay. In 2009, a trip to Pennsic War introduced him to SCA rapier, sparking a deeper study of historical fencing. By 2012, he expanded into formal training with both the Ãpée and Kendo clubs, blending historical and modern approaches to the sword. Today, Draco actively competes in Ãpéeâwhere he holds a C ratingâand occasionally in Sabre, with an E rating. His teaching emphasizes precision, adaptability, and the connection between historical practice and modern competitive fencing."},{name:"Zane McBride",photoKey:"zane",titles:["Juniors Instructor","Knights Master","Order of the Red Sash"],bio:"Zane has been competing in soft swords for 7 years. He recently placed 2nd in the 1st Annual Soft Combat Sports Youth Invitational. He competes in stick against adult competitors and is a fierce opponent. He is expanding to synthetics and steel currently. He has been on coaching staff for the past 3 years and is a fantastic instructor to the youth."},{name:"Daniel Spurlock",photoKey:"daniel",titles:["Rapier Instructor"],bio:`Daniel started fencing in college in 2006. He has a foundation in foil and epee with a blend of classical French and Italian influences. He volunteered as an assistant coach with the college fencing club for 2 years after graduating. 483 484Daniel's interest in how swords were used in their historical context led to him joining BladeFit in 2023. With smallsword, longsword and rapier now part of his repertoire, Daniel brings his experience to the BladeFit coaching team.`},{name:"Michael Winderman",photoKey:"michael",titles:["Workshop Instructor","Maitre en Fait d'Armes"],bio:"Maestro Winderman apprenticed under Fencing Masters Gary W. Williams and William Gruner. He was given the title of Maitre en Fait d'Armes (Fencing Master) after passing Master Adjudications and his final Master's Adjudication from Maestro F. Braun McAsh in 1998. A Founding Member of the Coeur d'Escrime Fencing Club and Charter Member of the International Order of the Sword and Pen, he has collaborated extensively on the historical roots of Filipino Martial Arts and their connection to Esgrima, the Original Systems of Fencing from Spain."}],kl=[{q:"What age can my child start training?",a:"Our Cubs Club accepts students from age 6. We have age-appropriate programs all the way through age 18 â Cubs Club (ages 6â10), Youth Soft Sword and BladeFit Games (ages 11â18), and Youth Mixed Stick Fighting and Youth Longsword (ages 14â18). Adults 18+ can join at any age."},{q:"Do I need prior martial arts experience?",a:"Not at all! All of our programs are designed for beginners. We'll teach you everything you need to know from day one."},{q:"What should I wear to my first class?",a:"Comfortable athletic clothing is all you need. Indoor athletic shoes are recommended for all students. All training equipment is provided for your first class."},{q:"How do I sign up for a trial class?",a:"Visit our Trial Class page and select whether you're signing up for a youth or adult class. The trial is $5 for every program, including Cubs Club, and loaner gear is provided. You can also contact us directly and we'll help you find the right class."},{q:"What equipment do I need?",a:"For your first class, nothing â we provide everything. As you continue training, you'll need a fencing mask and gloves at minimum. Check our Gear page for recommended equipment, or ask your instructor."},{q:"How much do classes cost?",a:"Individual memberships start at $80/month for one class per week and $100/month for two. Family plans, quarterly plans, and punch cards are also available â see the Memberships page for the full list. Every program uses the same trial policy: a one-time $5 trial class, with loaner gear included."},{q:"What is HEMA?",a:"HEMA stands for Historical European Martial Arts. It's the study and practice of European fighting systems from historical sources, including longsword, saber, smallsword, and many other weapons. It's a real martial art with a rich 600+ year history."},{q:"Is sword fighting dangerous?",a:"Safety is our top priority. We use appropriate protective gear and carefully structured training progressions. Youth classes use foam and padded weapons. Adult classes follow strict safety protocols for sparring."},{q:"Do adult classes rotate?",a:"Yes, some adult weapon classes rotate seasonally. Our core classes (Longsword, Stick & Targe) run consistently, while other weapons are offered on a rotating basis. Check the schedule for current offerings."},{q:"Where are you located?",a:"BladeFit Academy is at 7588 Delaware Lane, Vancouver, WA 98684. Some youth classes meet outdoors at Leroy Haagen Memorial Park. Call (360) 207-0252 or email [email protected]."}
484],$H=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function xx(e){const[t,r,n]=e.split("-").map(Number);return new Date(Date.UTC(t,r-1,n))}function Gp(e){return $H[xx(e).getUTCDay()]}function hc(e,t){const r=xx(e),n=o=>o.toLocaleDateString("en-US",{month:"long",timeZone:"UTC"});if(!t||t===e)return`${Gp(e)}, ${n(r)} ${r.getUTCDate()}, ${r.getUTCFullYear()}`;const s=xx(t),a=`${Gp(e)}â${Gp(t)}`;return r.getUTCMonth()===s.getUTCMonth()?`${a}, ${n(r)} ${r.getUTCDate()}â${s.getUTCDate()}, ${s.getUTCFullYear()}`:`${a}, ${n(r)} ${r.getUTCDate()} â ${n(s)} ${s.getUTCDate()}, ${s.getUTCFullYear()}`}const yf=[{slug:"womens-self-defense",title:"Women's Self-Defense & Combatives",date:hc("2026-09-12"),startDate:"2026-09-12",time:"3:00 PM â 5:30 PM",location:"BladeFit Academy · 7588 Delaware Lane, Vancouver, WA 98684",description:"A special 2.5-hour Women's Self-Defense & Combatives Course led by guest instructor Jim Epperly of Black Feather Group.",details:`This hands-on class focuses on practical self-defense, situational awareness, and combative principles designed to help women feel more prepared to recognize, avoid, and respond to dangerous situations. 485 486Seminar topics include situational awareness and verbal skills, basics if you are taken to the ground, standing back up safely, personal safety tools and improvised weapons, and escalation of force and responding under pressure. 487 488Guest instructor Jim Epperly is the Head Instructor at Blackbird Training Group and a co-founder and lead instructor at Blackfeather Broadsword Academy. His martial arts journey began in 1997, and his experience includes a black belt in Aiki-Jujutsu, a brown belt in Judo, Pekiti Tirsia Kali, and Level I Mentor certification in Regimental Broadsword. 489 490No previous martial arts or self-defense experience is required. Instructors are welcome. Space is limited and RSVP is required.`,price:"$10 for BladeFit members · $15 for non-members",hasBookingWidget:!0,bannerKey:"womensSelfDefense",tag:"One-Day Workshop",organizer:"Jim Epperly, Blackbird Training Group"},{slug:"battle-of-the-blades",title:"Battle of the Blades",date:"Date to be announced",location:"BladeFit Academy · 7588 Delaware Lane, Vancouver, WA 98684",description:"Cross steel. Test your edge. Meet the community.",details:"By popular demand after our last Battle of the Blades, we're bringing it back. Last time filled the room with great fights, new matchups, and a strong mix of styles â so we're opening the gym again for another round.",bannerKey:"battleOfTheBlades",tag:"Sparring Night",linkTo:"/events/battle-of-the-blades"},{slug:"black-light-fight-night",title:"Black Light Fight Night",date:hc("2026-10-26"),startDate:"2026-10-26",location:"BladeFit Academy · 7588 Delaware Lane, Vancouver, WA 98684",description:"Our annual Halloween tradition â sparring under black lights for a night of glowing steel and good fights.",details:"Black Light Fight Night is a fan-favorite community event. Gear up, glow up, and spar in the dark. Open to all students and guests. More details announced closer to Halloween.",bannerKey:"blackLightFightNight",tag:"Community Event"},{slug:"quarterstaff-intensive",title:"Quarterstaff Intensive",date:"Date to be announced",location:"BladeFit Academy · 7588 Delaware Lane, Vancouver, WA 98684",description:"A one-day deep dive into one of the oldest and most practical weapons in European martial history.",details:"Learn to wield the staff using historical English and Italian methods. This intensive covers whole-body power generation, range management, and the ability to strike from any angle. The quarterstaff teaches fundamental principles that apply to every weapon â leverage, timing, and body mechanics. Perfect for all experience levels.",bannerKey:"quarterstaff",tag:"Intensive Workshop"},{slug:"youth-tournament",title:"Youth Tournament",date:"Date to be announced",location:"BladeFit Academy · 7588 Delaware Lane, Vancouver, WA 98684",description:"Our annual youth tournament â a chance for young fighters to test their skills in a supportive competitive environment.",details:"Open to all youth program students. Structured bouts with age-appropriate rules, experienced referees, and a focus on sportsmanship. More details coming soon.",bannerKey:"youthTournament",tag:"Youth Tournament"},{slug:"battle-born-blades-2026",title:"Battle Born Blades",date:hc("2026-05-16","202
4906-05-17"),startDate:"2026-05-16",endDate:"2026-05-17",location:"Carson City, NV",description:"A two-day HEMA tournament featuring longsword, rapier, broadsword, and smallsword â hosted by Battle Born HEMA in Carson City, Nevada.",details:"Battle Born Blades is a HEMA tournament hosted by Battle Born HEMA near Reno in Carson City, NV, featuring tournaments in longsword, broadsword, rapier, and smallsword, plus workshops and free fencing.",bookingUrl:"https://fightbattleborn.com/",tag:"External Tournament",organizer:"Battle Born HEMA"},{slug:"running-the-gauntlet-2026",title:"Running the Gauntlet",date:hc("2026-05-30"),startDate:"2026-05-30",location:"Salem, OR",description:"A gauntlet-style HEMA tournament hosted by Seize the Vor â a school of medieval combat in Salem, Oregon.",details:"Running the Gauntlet is a HEMA tournament put on by Seize the Vor, led by HEMA Alliance certified instructor Moses Jones. The gauntlet format tests fighters' endurance, composure, and adaptability as they face opponent after opponent in rapid succession.",bookingUrl:"https://www.seizethevor.com/tourn
490aments",tag:"External Tournament",organizer:"Seize the Vor"},{slug:"tournament-of-roses-2026",title:"Tournament of Roses",date:hc("2026-06-27","2026-06-28"),startDate:"2026-06-27",endDate:"2026-06-28",location:"Portland, OR",description:"IFG's annual summer tournament â longsword, rapier, ringen, and more in the City of Roses.",details:"The Tournament of Roses is the annual HEMA tournament hosted by Indes Ferox Gladio (IFG) in Portland, Oregon â a two-day event featuring five tournaments plus a dedicated bay for mixed weapon free sparring.",bookingUrl:"https://indesferoxgladio.com/tournaments/tournament-of-roses-2026/",tag:"External Tournament",organizer:"Indes Ferox Gladio (IFG)"}];function FH(e){return e.endDate??e.startDate}function xf(e,t=new Date){const r=FH(e);if(!r)return"tbd";const n=t.toISOString().slice(0,10);return r<n?"completed":"scheduled"}function cm(e=new Date){return yf.filter(t=>xf(t,e)==="scheduled").sort((t,r)=>(t.startDate??"9999").localeCompare(r.startDate??"9999"))}function aE(e=new Date){return yf.filter(t=>xf(t,e)==="tbd").sort((t,r)=>t.title.localeCompare(r.title))}function BH(e,t=new Date){const r=xf(e,t);return r==="completed"?"Completed":r==="tbd"?"Planned â date to be announced":"Scheduled"}function Xw(e=new Date){return yf.filter(t=>xf(t,e)==="completed").sort((t,r)=>(r.startDate??"").localeCompare(t.startDate??""))}const ia={id:"trial",label:"Trial Class",amount:5,period:"one-time",category:"trial",scope:"individual",priceLabel:"$5"},qo=[{id:"ind-1day",title:"1 Day Per Week",amount:80,price:"$80",period:"/month",description:"Attend one scheduled class per week.",note:"Best for beginners or busy schedules."},{id:"ind-2day",title:"2 Days Per Week",amount:100,price:"$100",period:"/month",description:"Attend two scheduled classes per week.",note:"Ideal for faster progression.",popular:!0}],vf=[{tier:"1 Day Per Week",plans:[{id:"fam-1day-2",title:"Family of 2",amount:150,price:"$150",period:"/month"},{id:"fam-1day-3",title:"Family of 3",amount:210,price:"$210",period:"/month"},{id:"fam-1day-4",title:"Family of 4+",amount:260,price:"$260",period:"/month"}]},{tier:"2 Days Per Week",plans:[{id:"fam-2day-2",title:"Family of 2",amount:190,price:"$190",period:"/month"},{id:"fam-2day-3",title:"Family of 3",amount:270,price:"$270",period:"/month"},{id:"fam-2day-4",title:"Family of 4+",amount:340,price:"$340",period:"/month"}]}],jd=[{id:"qind-1",title:"1 Class Per Week",amount:220,price:"$220",period:"/quarter",description:"Attend one scheduled class per week.",note:"Save $20 vs. paying monthly.",popular:!1},{id:"qind-2",title:"2 Classes Per Week",amount:275,price:"$275",period:"/quarter",description:"Attend two scheduled classes per week.",note:"Save $25 vs. paying monthly.",popular:!0}],wf=[{tier:"1 Class Per Week",plans:[{id:"qfam-1-2",title:"Family of 2",amount:410,price:"$410",period:"/quarter",savings:"Save $40"},{id:"qfam-1-3",title:"Family of 3",amount:575,price:"$575",period:"/quarter",savings:"Save $55"},{id:"qfam-1-4",title:"Family of 4+",amount:710,price:"$710",period:"/quarter",savings:"Save $70"}]},{tier:"2 Classes Per Week",plans:[{id:"qfam-2-2",title:"Family of 2",amount:520,price:"$520",period:"/quarter",savings:"Save $50"},{id:"qfam-2-3",title:"Family of 3",amount:740,price:"$740",period:"/quarter",savings:"Save $70"},{id:"qfam-2-4",title:"Family of 4+",amount:930,price:"$930",period:"/quarter",savings:"Save $90"}]}],kd=[{id:"punch-5",title:"5-Class Punch Card",amount:110,price:"$110",details:["Valid for 12 months","Can be used for any eligible class","Average cost: $22 per class"]},{id:"punch-10",title:"10-Class Punch Card",amount:200,price:"$200",details:["Valid for 12 months","Can be used for any eligible class","Average cost: $20 per class"]},{id:"punch-spar",title:"5 Sparring Sessions",amount:50,price:"$50",details:["Valid for 12 months","For experienced swordsmen","Spar on Mondays or Thursdays (8â9 PM)","Last hour of class only","Average cost: $10 per session"]}],eb=[ia,...qo.map(e=>({id:e.id,label:e.title,amount:e.amount,period:"monthly",category:"individual",scope:"individual",priceLabel:`${e.price}${e.period}`})),...vf.flatMap(e=>e.plans.map(t=>({id:t.id,label:`${t.title} â ${e.tier}`,amount:t.amount,period:"monthly",category:"family",scope:"family",priceLabel:`${t.price}${t.period}`}))),...jd.map(e=>({id:e.id,label:e.title,amount:e.amount,period:"quarterly",category:"quarterly-individual",scope:"individual",priceLabel:`${e.price}${e.period}`})),...wf.flatMap(e=>e.plans.map(t=>({id:t.id,label:`${t.title} â ${e.tier}`,amount:t.amount,period:"quarterly",category:"quarterly-family",scope:"family",priceLabel:`${t.price}${t.period}`}))),...kd.map(e=>({id:e.id,label:e.title,amount:e.amount,period:"one-time",category:"punch-card",scope:"individual",priceLabel:e.price}))],dk={trial:"Trial",individual:"Monthly Individual",family:"Monthly Family","quarterly-individual":"Quarterly Individual","quarterly-family":"Quarterly Family","punch-card":"Punch Cards"};function UH(e){return eb.find(t=>
490t.id===e)}const ye="https://bladefitacademy.com",oe={name:"BladeFit Academy",legalName:"BladeFit Academy",url:ye,shopUrl:"https://bladefit.shop",bookingHost:"https://bladefit-academy.gymdesk.com",description:"BladeFit Academy teaches Historical European Martial Arts (HEMA), swordsmanship, movement, and fitness to youth and adults in Vancouver, Washington.",email:"[email protected]",phone:"+1-360-207-0252",phoneDisplay:"(360) 207-0252",logo:`${ye}/og-preview.jpg`,image:`${ye}/og-preview.jpg`,address:{street:"7588 Delaware Lane",locality:"Vancouver",region:"WA",postalCode:"98684",country:"US"},addressLine:"7588 Delaware Lane, Vancouver, WA 98684",geo:{latitude:45.6255,longitude:-122.5203},areaServed:["Vancouver, WA","Camas, WA","Battle Ground, WA","Portland, OR"],timeZone:"America/Los_Angeles",sameAs:["https://www.facebook.com/bladefitacademy","https://www.instagram.com/bladefitacademy","https://bladefit.shop"],outdoorLocation:"Leroy Haagen Memorial Park, Vancouver, WA"},ot={price:"$5",amount:5,currency:"USD",summary:"Every BladeFit Academy program uses the same trial policy: a one-time $5 paid trial class. Loaner gear is provided for the trial, so nothing needs to be purchased in advance.",appliesTo:"All youth and adult programs, including Cubs Club.",loanerGear:!0,signupUrls:{youth:"https://bladefit-academy.gymdesk.com/signup/v/AvJWW",adult:"https://bladefit-academy.gymdesk.com/signup/v/DLy7q"}},fs="Ages 6â18",Go="Ages 18+",Fa="2026-07-30";function VH(e=Fa){const[t,r,n]=e.split("-").map(Number);return new Date(Date.UTC(t,r-1,n)).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",timeZone:"UTC"})}const HH={"/free-trial":"/trial","/page/events":"/events","/pricing":"/memberships","/signup":"/trial"},zH={"@type":"PostalAddress",streetAddress:oe.address.street,addressLocality:oe.address.locality,addressRegion:oe.address.region,postalCode:oe.address.postalCode,addressCountry:oe.address.country},uk={"@context":"https://schema.org","@type":["SportsActivityLocation","EducationalOrganization","LocalBusiness"],"@id":`${ye}/#organization`,name:oe.name,legalName:oe.legalName,url:ye,logo:oe.logo,image:oe.image,description:oe.description,email:oe.email,telephone:oe.phone,priceRange:"$$",address:zH,geo:{"@type":"GeoCoordinates",latitude:oe.geo.latitude,longitude:oe.geo.longitude},areaServed:oe.areaServed.map(e=>({"@type":"Place",name:e})),sameAs:[...oe.sameAs],knowsAbout:["Historical European Martial Arts","Longsword","Military saber","Smallsword","Single stick","Youth martial arts"]},WH={"@context":"https://schema.org","@type":"WebSite","@id":`${ye}/#website`,url:ye,name:oe.name,description:oe.description,publisher:{"@id":`${ye}/#organization`},inLanguage:"en-US"};function qH(e){return{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:e.map((t,r)=>({"@type":"ListItem",position:r+1,name:t.name,item:`${ye}${t.path}`}))}}function Gt(e,t,r,n="WebPage"){return{"@context":"https://schema.org","@type":n,"@id":`${ye}${e}#webpage`,url:`${ye}${e}`,name:t,description:r,isPartOf:{"@id":`${ye}/#website`},about:{"@id":`${ye}/#organization`},inLanguage:"en-US",dateModified:Fa}}function tb(e){const t=e.name.toLowerCase();return t.includes("beginner")||t.includes("cubs")?"Beginner â no experience required":t.includes("intermediate")?"Intermediate â prior longsword experience expected":(e.category==="youth","All levels â beginners welcome")}function rb(e){return e.name.toLowerCase().includes("intermediate")?"Completion of Beginner Longsword or equivalent prior longsword training, plus instructor approval.":e.category==="youth"?`No prior experience required. Students must be within the ${e.ageRange??fs} age range.`:"No prior experience required. Students must be 18 or older."}function Ni(e){return e.location?e.location:!e.currentlyRunning&&e.locationNote?"Location to be announced":(e.schedule??[]).some(r=>r.includes("Leroy Haagen"))?oe.outdoorLocation:oe.addressLine}function Na(e){return e.currentlyRunning?"Currently running":e.nextSessionDate?`Not currently running â ${e.nextSessionDate}`:"Not currently running"}function Sl(e){var t;return(t=e.schedule)!=null&&t.length?e.schedule.join("; "):e.nextSessionDate??"Schedule to be announced"}function nb(e){return e.category==="youth"?ot.signupUrls.youth:ot.signupUrls.adult}function vx(e){if(!e)return{};const t=e.match(/(\d+)\s*\+/);if(t)return{min:Number(t[1])};const r=e.match(/(\d+)\s*[â-]\s*(\d+)/);return r?{min:Number(r[1]),max:Number(r[2])}:{}}
490function GH(e){const t=vx(e.ageRange);return{"@context":"https://schema.org","@type":"Course","@id":`${ye}/classes/${e.slug}#course`,name:e.name,description:e.fullDescription,url:`${ye}/classes/${e.slug}`,provider:{"@id":`${ye}/#organization`},educationalLevel:tb(e),coursePrerequisites:rb(e),audience:{"@type":"PeopleAudience",audienceType:e.category==="youth"?"Youth":"Adults",...t.min!==void 0?{suggestedMinAge:t.min}:{},...t.max!==void 0?{suggestedMaxAge:t.max}:{}},hasCourseInstance:{"@type":"CourseInstance",courseMode:"onsite",courseSchedule:Sl(e),location:{"@type":"Place",name:Ni(e),address:Ni(e)}},offers:{"@type":"Offer",name:"Trial class",price:String(ot.amount),priceCurrency:ot.currency,url:nb(e),availability:e.currentlyRunning?"https://schema.org/InStock":"https://schema.org/PreOrder",category:"Trial class"}}}const Kp=yn.filter(e=>e.currentlyRunning),Yp=xn.filter(e=>e.currentlyRunning);function to(e){return`${e.name} â ${e.ageRange??""} â ${Sl(e)} â ${Ni(e)} â ${Na(e)}`}const Kt={h2:"Contact and location",list:[`${oe.name}, ${oe.addressLine}`,`Phone: ${oe.phoneDisplay}`,`Email: ${oe.email}`,`Some youth classes meet outdoors at ${oe.outdoorLocation}`]},kc={h2:"Trial policy",body:[ot.summary,`Applies to: ${ot.appliesTo}`]},Xd=[{path:"/",title:"Sword Fighting & HEMA Classes in Vancouver, WA | BladeFit Academy",description:"BladeFit Academy teaches longsword, saber, and soft-sword classes for youth (ages 6â18) and adults in Vancouver, WA. $5 trial class with loaner gear provided.",changefreq:"weekly",priority:"1.0",ogType:"website",h1:"BladeFit Academy â Historical European Martial Arts in Vancouver, WA",intro:[oe.description,`Youth programs run ${fs.toLowerCase()}; adult programs are ${Go.toLowerCase()}. ${ot.summary}`],sections:[{h2:"Current youth classes",list:Kp.map(to),links:Kp.map(e=>({href:`/classes/${e.slug}`,label:e.name}))},{h2:"Current adult classes",list:Yp.map(to),links:Yp.map(e=>({href:`/classes/${e.slug}`,label:e.name}))},kc,{h2:"Membership pricing",list:[...qo.map(e=>`Individual, ${e.title}: ${e.price}${e.period}`),...kd.map(e=>`${e.title}: ${e.price}`)]},Kt],jsonLd:[uk,WH,Gt("/","BladeFit Academy",oe.description)],breadcrumbs:[{name:"Home",path:"/"}]},{path:"/programs/youth",title:`Youth Sword Classes ${fs} in Vancouver, WA | BladeFit Academy`,description:"Youth sword training for ages 6â18 in Vancouver, WA: Cubs Club, Youth Soft Sword, BladeFit Games, Mixed Stick Fighting, and Youth Longsword. $5 trial class.",changefreq:"weekly",priority:"0.9",h1:"Youth Sword Programs â Ages 6 to 18",intro:["BladeFit Academy's youth programs teach movement, discipline, and focus through age-appropriate sword training using safe, modern equipment.",`Youth classes span ${fs.toLowerCase()}. The youngest program is Cubs Club, which starts at age 6.`],sections:[{h2:"Youth classes and age ranges",list:yn.map(to),links:yn.map(e=>({href:`/classes/${e.slug}`,label:e.name}))},kc,Kt],jsonLd:[Gt("/programs/youth","Youth Sword Programs","Youth sword training for ages 6â18."),{"@context":"https://schema.org","@type":"ItemList",name:"BladeFit Academy youth programs",itemListElement:yn.map((e,t)=>({"@type":"ListItem",position:t+1,name:e.name,url:`${ye}/classes/${e.slug}`}))}],breadcrumbs:[{name:"Home",path:"/"},{name:"Youth Programs",path:"/programs/youth"}]},{path:"/programs/adult",title:"Adult HEMA & Longsword Classes in Vancouver, WA | BladeFit Academy",description:"Adult HEMA classes in Vancouver, WA â beginner and intermediate longsword, military saber, smallsword, and single stick. Ages 18+. $5 trial class, loaner gear included.",changefreq:"weekly",priority:"0.9",h1:"Adult HEMA Programs â Ages 18 and Up",intro:["BladeFit Academy's adult programs cover medieval longsword through 19th-century military saber, all grounded in historical source material and adapted for modern training.","Adult weapon classes rotate seasonally. Classes not currently running are listed with their return status."],sections:[{h2:"Adult classes",list:xn.map(to),links:xn.map(e=>({href:`/classes/${e.slug}`,label:e.name}))},kc,Kt],jsonLd:[Gt("/programs/adult","Adult HEMA Programs","Adult HEMA classes for ages 18+."),{"@context":"https://schema.org","@type":"ItemList",name:"BladeFit Academy adult programs",itemListElement:xn.map((e,t)=>({"@type":"ListItem",position:t+1,name:e.name,url:`${ye}/classes/${e.slug}`}))}],breadcrumbs:[{name:"Home",path:"/"},{name:"Adult Programs",path:"/programs/adult"}]},{path:"/schedule",title:"Youth and Adult Sword Class Schedule | BladeFit Academy",description:"Weekly class schedule for BladeFit Academy in Vancouver, WA â recurring youth and adult sword class days and times, plus current program status.",changefreq:"weekly",priority:"0.8",h1:"Class Schedule",intro:["All times below are recurring weekly classes. One-time tournaments, workshops, and community nights are listed on the events page.",`Last updated ${Fa}.`],sections:[{h2:"Adult classes (recurring weekly)",list:Yp.map(to)},{h2:"Youth classes (recurring weekly)",list:Kp.map(to)},{h2:"Not currently running",list:xs.filter(e=>!e.currentlyRunning).map(e=>`${e.name} â ${Na(e)}`)},Kt],jsonLd:[Gt("/schedule","Class Schedule","Weekly BladeFit Academy class schedule.")],breadcrumbs:[{name:"Home",path:"/"},{name:"Schedule",path:"/schedule"}]},{path:"/memberships",title:"Memberships and Sword Class Pricing | BladeFit Academy",description:"BladeFit Academy membership pricing in Vancouver, WA â individual plans from $80/month, family plans, quarterly options, and class punch cards. $5 trial class.",changefreq:"monthly",priority:"0.8",h1:"Memberships and Pricing",intro:["Membership options for youth and adult students at BladeFit Academy. All plans are recurring unless noted.",ot.summary],sections:[{h2:"Individual monthly memberships",list:qo.map(e=>`${e.title}: ${e.price}${e.period} â ${e.description}`)},{h2:"Family monthly memberships",list:vf.flatMap(e=>e.plans.map(t=>`${e.tier} â ${t.title}: ${t.price}${t.period}`))},{h2:"Quarterly memberships",list:[...jd.map(e=>`Individual, ${e.title}: ${e.price}${e.period}`),...wf.flatMap(e=>e.plans.map(t=>`Family, ${e.tier} â ${t.title}: ${t.price}${t.period}`))]},{h2:"Punch cards",list:kd.map(e=>`${e.title}: ${e.price} â ${e.details.join("; ")}`)},kc,Kt],jsonLd:[Gt("/memberships","Memberships and Pricing","Membership pricing at BladeFit Academy."),{"@context":"https://schema.org","@type":"ItemList",name:"BladeFit Academy memberships",itemListElement:[...qo.map(e=>({title:e.title,amount:e.amount,unit:"MONTH"})),...jd.map(e=>({title:e.title,amount:e.amount,unit:"QUARTER"}))].map((e,t)=>({"@type":"ListItem",position:t+1,item:{"@type":"Offer",name:e.title,price:String(e.amount),priceCurrency:"USD",url:`${ye}/memberships`,seller:{"@id":`${ye}/#organization`}}}
490))}],breadcrumbs:[{name:"Home",path:"/"},{name:"Memberships",path:"/memberships"}]},{path:"/trial",title:"$5 Trial Sword Class in Vancouver, WA | BladeFit Academy",description:"Book a $5 trial sword class at BladeFit Academy in Vancouver, WA. Same trial price for every youth and adult program, loaner gear provided, no commitment.",changefreq:"monthly",priority:"0.9",h1:"Trial Class â $5",intro:[ot.summary,"No commitment and no gear purchase required. Wear comfortable athletic clothing and indoor athletic shoes."],sections:[{h2:"Trial policy by program",list:xs.map(e=>`${e.name} (${e.ageRange??""}): $5 one-time trial class, loaner gear provided.`)},{h2:"How to book",list:[`Youth trial (${fs.toLowerCase()}): ${ot.signupUrls.youth}`,`Adult trial (${Go.toLowerCase()}): ${ot.signupUrls.adult}`]},{h2:"What to bring",list:["Comfortable athletic clothing","Water bottle","Indoor athletic shoes (required â bare feet are not permitted at any age)"]},Kt],jsonLd:[Gt("/trial","Trial Class","Book a $5 trial sword class."),{"@context":"https://schema.org","@type":"Offer",name:"BladeFit Academy trial class",description:ot.summary,price:String(ot.amount),priceCurrency:ot.currency,url:`${ye}/trial`,availability:"https://schema.org/InStock",seller:{"@id":`${ye}/#organization`}}],breadcrumbs:[{name:"Home",path:"/"},{name:"Trial Class",path:"/trial"}]},{path:"/contact",title:"Contact BladeFit Academy | Vancouver, WA",description:"Contact BladeFit Academy at 7588 Delaware Lane, Vancouver, WA 98684. Call (360) 207-0252 or email [email protected] about classes, memberships, and events.",changefreq:"monthly",priority:"0.7",h1:"Contact BladeFit Academy",intro:[`${oe.name} is located at ${oe.addressLine}. Call ${oe.phoneDisplay} or email ${oe.email}.`],sections:[Kt,{h2:"Quick links",links:[{href:"/trial",label:"Book a $5 trial class"},{href:"/schedule",label:"View the class schedule"},{href:"/memberships",label:"See membership pricing"}]}],jsonLd:[Gt("/contact","Contact BladeFit Academy","Contact details for BladeFit Academy.","ContactPage"),uk],breadcrumbs:[{name:"Home",path:"/"},{name:"Contact",path:"/contact"}]},{path:"/coaches",title:"Meet Our Sword Instructors and Coaches | BladeFit Academy",description:"Meet the BladeFit Academy coaching team in Vancouver, WA â head instructor Nathan McBride plus longsword, saber, smallsword, and youth instructors.",changefreq:"monthly",priority:"0.6",h1:"Coaches and Instructors",intro:["The BladeFit Academy coaching team teaches every youth and adult program."],sections:[{h2:"Coaching team",list:Wo.map(e=>`${e.name} â ${e.titles.join(", ")}`)},...Wo.map(e=>({h2:e.name,body:e.bio.split(` 491 492`)})),Kt],jsonLd:[Gt("/coaches","Coaches","BladeFit Academy coaching team.","AboutPage"),{"@context":"https://schema.org","@type":"ItemList",name:"BladeFit Academy coaching team",itemListElement:Wo.map((e,t)=>({"@type":"ListItem",position:t+1,item:{"@type":"Person",name:e.name,jobTitle:e.titles.join(", "),worksFor:{"@id":`${ye}/#organization`},description:e.bio.split(` 493 494`)[0]}}))}],breadcrumbs:[{name:"Home",path:"/"},{name:"Coaches",path:"/coaches"}]},{path:"/faq",title:"Sword Class FAQ â Ages, Gear, Safety, Pricing | BladeFit Academy",description:"Answers about ages, equipment, safety, trial pricing, and HEMA training at BladeFit Academy in Vancouver, WA â everything to know before a first sword class.",changefreq:"monthly",priority:"0.6",h1:"Frequently Asked Questions",intro:["Common questions about training at BladeFit Academy in Vancouver, WA."],sections:[...kl.map(e=>({h2:e.q,body:[e.a]})),Kt],jsonLd:[Gt("/faq","Frequently Asked Questions","BladeFit Academy FAQ."),{"@context":"https://schema.org","@type":"FAQPage",mainEntity:kl.map(e=>({"@type":"Question",name:e.q,acceptedAnswer:{"@type":"Answer",text:e.a}}))}],breadcrumbs:[{name:"Home",path:"/"},{name:"FAQ",path:"/faq"}]},{path:"/gear",title:"HEMA Gear Guide â Masks, Jackets, Swords | BladeFit Academy",description:"Recommended HEMA and youth sword gear for BladeFit Academy students â fencing masks, gorgets, gloves, jackets, and training weapons in Good/Better/Best tiers.",changefreq:"monthly",priority:"0.6",h1:"Gear Guide",intro:["Recommended equipment for BladeFit Academy students, organized by category and by class. Loaner gear is provided for trial classes, so nothing needs to be purchased in advance."],sections:[{h2:"Gear categories",list:jl.map(e=>`${e.name}
494 â ${e.shortDescription}`),links:jl.map(e=>({href:`/gear/${e.slug}`,label:e.name}))},{h2:"Gear by class",links:xs.map(e=>({href:`/gear/class/${e.slug}`,label:`${e.name} gear list`}))},Kt],jsonLd:[Gt("/gear","Gear Guide","HEMA gear recommendations.")],breadcrumbs:[{name:"Home",path:"/"},{name:"Gear",path:"/gear"}]},{path:"/events",title:"HEMA Tournaments & Sword Events | BladeFit Academy",description:"Upcoming HEMA tournaments, sparring nights, and workshops at BladeFit Academy in Vancouver, WA, plus an archive of past events.",changefreq:"weekly",priority:"0.7",h1:"Events",intro:["Tournaments, sparring nights, intensive workshops, and community events hosted by and attended by BladeFit Academy.",`Last updated ${Fa}.`],sections:[{h2:"Upcoming events",body:["Confirmed events with a scheduled calendar date."],list:cm().map(e=>`${e.title} â ${e.date} â ${e.location} â Organizer: ${e.organizer??oe.name} â Status: Scheduled${e.price?` â Price: ${e.price}`:""}${e.bookingUrl?` â Registration: ${e.bookingUrl}`:""} â ${e.description}`)},{h2:"Planned events â dates to be announced",body:["These events are planned but do not have a confirmed date yet. They are not scheduled for any past or upcoming month."],list:aE().map(e=>`${e.title} â Date to be announced â ${e.location} â Organizer: ${e.organizer??oe.name} â Status: Planned â ${e.description}`)},{h2:"Past events archive",body:["Events that have already taken place, kept for reference."],list:Xw().map(e=>`${e.title} â ${e.date} â ${e.location} â Organizer: ${e.organizer??oe.name} â Status: Completed`)},Kt],jsonLd:[Gt("/events","Events","BladeFit Academy events and tournaments."),...cm().filter(e=>e.startDate).map(e=>({"@context":"https://schema.org","@type":"Event",name:e.title,startDate:e.startDate,endDate:e.endDate??e.startDate,eventStatus:"https://schema.org/EventScheduled",eventAttendanceMode:"https://schema.org/OfflineEventAttendanceMode",description:e.description,location:{"@type":"Place",name:e.location,address:e.location},organizer:{"@type":"Organization",name:e.organizer??oe.name,url:e.bookingUrl??ye},...e.price?{offers:{"@type":"Offer",price:e.price,priceCurrency:"USD"}}:{},...e.bookingUrl?{url:e.bookingUrl}:{}}))],breadcrumbs:[{name:"Home",path:"/"},{name:"Events",path:"/events"}]},{path:"/events/battle-of-the-blades",title:"Battle of the Blades Sparring Night | BladeFit Academy",description:"Battle of the Blades is BladeFit Academy's open sparring night in Vancouver, WA â cross steel, test your edge, and meet the local HEMA community.",changefreq:"monthly",priority:"0.6",h1:"Battle of the Blades",intro:["Cross steel. Test your edge. Meet the community. Battle of the Blades is BladeFit Academy's open sparring night at 7588 Delaware Lane, Vancouver, WA 98684.","The next date has not been announced yet â check back or contact the academy to be notified."],sections:[Kt],jsonLd:[Gt("/events/battle-of-the-blades","Battle of the Blades","Open sparring night.")],breadcrumbs:[{name:"Home",path:"/"},{name:"Events",path:"/events"},{name:"Battle of the Blades",path:"/events/battle-of-the-blades"}]}];for(const e of xs){const t=e.ageRange??(e.category==="youth"?fs:Go);Xd.push({path:`/classes/${e.slug}`,title:`${e.name} Classes in Vancouver, WA | BladeFit Academy`,description:`${e.shortDescription} ${t}. ${e.currentlyRunning?Sl(e):Na(e)}. $5 trial class with loaner gear at BladeFit Academy in Vancouver, WA.`.slice(0,300),changefreq:"monthly",priority:"0.7",h1:`${e.name} â ${t}`,intro:[e.shortDescription,e.fullDescription],sections:[{h2:"Class details",list:[`Class name: ${e.name}`,`Program: ${e.category==="youth"?"Youth program":"Adult program"}`,`Ages: ${t}`,`Skill level: ${tb(e)}`,`Prerequisites: ${rb(e)}`,`Day and time: ${Sl(e)}`,`Time zone: Pacific (${oe.timeZone})`,`Location: ${Ni(e)}`,`Status: ${Na(e)}`,"Trial: $5 one-time trial class, loaner gear provided","Membership: covered by any BladeFit Academy membership or punch card",`Booking: ${nb(e)}`]},{h2:"Why we train this",body:[e.whyWeTrain]},...e.locationNote||e.previousSessionNote?[{h2:"Program status and history",body:[Na(e),...e.locationNote?[e.locationNote]:[],...e.previousSessionNote?[e.previousSessionNote]:[]]}]:[],...e.historicRoots?[{h2:"Historic roots",body:[e.historicRoots]}]:[],{h2:"Required and recommended equipment",body:["Loaner equipment is available for trial classes and for new students."],list:e.gearRecommendations,links:[{href:`/gear/class/${e.slug}`,label:`${e.name} gear list`}]},kc,Kt],jsonLd:[Gt(`/classes/${e.slug}
494`,e.name,e.shortDescription),GH(e)],breadcrumbs:[{name:"Home",path:"/"},{name:e.category==="youth"?"Youth Programs":"Adult Programs",path:e.category==="youth"?"/programs/youth":"/programs/adult"},{name:e.name,path:`/classes/${e.slug}`}]})}function KH(e){var r,n;const t=[];for(const s of e.classSections){for(const a of s.items??[])t.push(`${s.className}: ${a.name}${a.description?` â ${a.description}`:""}`);for(const a of((r=s.tiered)==null?void 0:r.tiers)??[])for(const o of a.items??[])t.push(`${s.className} (${a.tier}): ${o.name}${o.description?` â ${o.description}`:""}`);for(const a of((n=s.coachRecs)==null?void 0:n.items)??[])t.push(`${s.className} (coach pick): ${a.name}${a.note?` â ${a.note}`:""}`)}return[...new Set(t)]}for(const e of jl){const t=e.name;Xd.push({path:`/gear/${e.slug}`,title:`${t} â HEMA Gear Guide | BladeFit Academy`,description:`${e.shortDescription} Recommended by BladeFit Academy coaches in Vancouver, WA, with loaner gear available for new students.`.slice(0,300),changefreq:"monthly",priority:"0.5",h1:`${t} â Gear Guide`,intro:[e.shortDescription],sections:[{h2:"Recommended items",list:KH(e)},{h2:"Classes that use this gear",links:e.classSections.map(r=>({href:`/gear/class/${r.classSlug}`,label:`${r.className} gear list`}))},Kt],jsonLd:[Gt(`/gear/${e.slug}`,t,e.shortDescription)],breadcrumbs:[{name:"Home",path:"/"},{name:"Gear",path:"/gear"},{name:t,path:`/gear/${e.slug}`}]})}for(const e of xs)Xd.push({path:`/gear/class/${e.slug}`,title:`${e.name} Gear List | BladeFit Academy`,description:`Required and recommended equipment for ${e.name} (${e.ageRange??""}) at BladeFit Academy in Vancouver, WA. Loaner gear is available for new students.`.slice(0,300),changefreq:"monthly",priority:"0.5",h1:`${e.name} â Required and Recommended Gear`,intro:[`Equipment used in ${e.name} (${e.ageRange??""}). Loaner gear is available for trial classes and new students.`],sections:[{h2:"Gear list",list:e.gearRecommendations},{h2:"Class information",list:[`Ages: ${e.ageRange??""}`,`Schedule: ${Sl(e)}`,`Location: ${Ni(e)}`]},Kt],jsonLd:[Gt(`/gear/class/${e.slug}`,`${e.name} gear`,`Gear list for ${e.name}.`)],breadcrumbs:[{name:"Home",path:"/"},{name:"Gear",path:"/gear"},{name:`${e.name} gear`,path:`/gear/class/${e.slug}`}]});const YH={"/policies/adult":{title:"Adult Student Policies | BladeFit Academy",desc:"Attendance, safety, membership, and conduct policies for adult students at BladeFit Academy in Vancouver, WA.",h1:"Adult Student Policies"},"/policies/youth":{title:"Youth Student and Parent Policies | BladeFit Academy",desc:"Drop-off, supervision, safety, and conduct policies for youth students and parents at BladeFit Academy in Vancouver, WA.",h1:"Youth Student and Parent Policies"},"/policies/payment":{title:"Billing and Payment Policy | BladeFit Academy",desc:"Recurring billing, cancellation, freeze, and refund terms for BladeFit Academy memberships in Vancouver, WA.",h1:"Billing and Payment Policy"},"/policies/etiquette":{title:"Salle Etiquette and Code of Conduct | BladeFit Academy",desc:"Code of conduct and salle etiquette expected of every BladeFit Academy student, parent, and visitor in Vancouver, WA.",h1:"Salle Etiquette and Code of Conduct"}};for(const[e,t]of Object.entries(YH))Xd.push({path:e,title:t.title,description:t.desc,changefreq:"yearly",priority:"0.3",h1:t.h1,intro:[t.desc,"Indoor athletic shoes are required in the salle. Bare feet are not permitted for students of any age."],sections:[Kt],jsonLd:[Gt(e,t.h1,t.desc)],breadcrumbs:[{name:"Home",path:"/"},{name:t.h1,path:e}]});function JH(e){return Xd.find(t=>t.path===e)}const hk="https://bladefitacademy.com";function $e({title:e,description:t,path:r,jsonLd:n,noindex:s,image:a}){const o=JH(r),l=e??(o==null?void 0:o.title)??"BladeFit Academy",c=t??(o==null?void 0:o.description)??"",d=`${hk}${r}`,u=a?a.startsWith("http")?a:`${hk}${a.startsWith("/")?"":"/"}${a}`:void 0,h=n?Array.isArray(n)?n:[n]:[],m=o&&!s?[...o.jsonLd,qH(o.breadcrumbs),...h]:h;return i.jsxs(CM,{children:[i.jsx("title",{children:l}),i.jsx("meta",{name:"description",content:c}),s&&i.jsx("meta",{name:"robots",content:"noindex, nofollow"}),i.jsx("link",{rel:"canonical",href:d}),i.jsx("meta",{property:"og:title",content:l}),i.jsx("meta",{property:"og:description",content:c}),i.jsx("meta",{property:"og:url",content:d}),i.jsx("meta",{property:"og:type",content:"website"}),i.jsx("meta",{name:"twitter:title",content:l}),i.jsx("meta",{name:"twitter:description",content:c}),u&&i.jsx("meta",{property:"og:image",content:u}),u&&i.jsx("meta",{name:"twitter:image",content:u}),u&&i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),m.map((f,y)=>i.jsx("script",{type:"application/ld+json",children:JSON.stringify(f)},y))]})}const QH=()=>i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/"}),i.jsx(YV,{}),i.jsx(XV,{}),i.jsx(iE,{}),i.jsx("div",{className:"h-2 bg-background"}),i.jsx(ZV,{}),i.jsx(nH,{}),i.jsx(DH,{}),i.jsx(sH,{})]}
494),ZH="/assets/cubs-club-Cx9iZHUm.png",XH="/assets/youth-soft-sword-DTdtF1wL.png",ez="/assets/youth-longsword-BzkYtTpY.png",tz="/assets/longsword-KGVeaL6H.png",rz="/assets/beginner-longsword-Bfb61ruU.png",nz="/assets/military-saber-ByUgLThX.png",sz="/assets/smallsword-jgcJ9r2-.png",iz="/assets/rapier-C0AiEjYL.webp",az="/assets/beginner-single-stick-Dks_G7Sn.png",oz="/assets/stick-and-targe-n5Xq_mP1.png",lz="/assets/adult-soft-combat-BIpWfr1q.png",cz="/assets/bladefit-games-DyxlqVdq.png",dz="/assets/youth-mixed-stick-BFfGUaGm.png",_l={"cubs-club":ZH,"youth-soft-sword":XH,"youth-longsword":ez,"intermediate-longsword":tz,"beginner-longsword":rz,"military-saber":nz,smallsword:sz,rapier:iz,"beginner-single-stick":az,"stick-and-targe":oz,"adult-soft-combat":lz,"bladefit-games":cz,"youth-mixed-stick":dz},mk=[{numeral:"I",label:"Ages 6â10",title:"Start on foam",description:"Foundational footwork, focus drills, and safe foam build-ups. Where the journey begins.",slugs:["cubs-club"]},{numeral:"II",label:"Ages 11â18",title:"Build real technique",description:"Measure, paired drills, and sword-and-shield work with controlled contact â plus game days that keep it fun.",slugs:["youth-soft-sword","bladefit-games"]},{numeral:"III",label:"Ages 14â18",title:"Move up to stick & longsword",description:"Once a teen has time on the floor, they step up into stick fighting and youth longsword.",slugs:["youth-mixed-stick","youth-longsword"]}];function fk({cls:e}){return i.jsxs(B,{to:`/classes/${e.slug}`,className:"group relative flex h-full flex-col overflow-hidden rounded-lg border border-border bg-card transition-all hover:border-primary/40 hover:shadow-gold",children:[!e.currentlyRunning&&i.jsxs("div",{className:`absolute right-0 top-4 z-10 flex items-center gap-1.5 rounded-l-full px-4 py-1.5 text-sm font-semibold shadow-md backdrop-blur-sm ${e.nextSessionDate?"bg-primary/90 text-primary-foreground":"bg-destructive/90 text-destructive-foreground"}`,children:[i.jsx(Bn,{className:"h-3.5 w-3.5"}),e.nextSessionDate?"Coming Soon":"Not Currently Running"]}),_l[e.slug]?i.jsx("img",{src:_l[e.slug],alt:`${e.name} banner`,loading:"lazy",className:"h-auto w-full"}):i.jsx("div",{className:"px-6 pt-6",children:i.jsx("span",{className:"text-3xl",children:e.icon})}),i.jsxs("div",{className:"flex flex-1 flex-col p-6",children:[i.jsx("h4",{className:"font-heading text-xl font-semibold",children:e.name}),e.ageRange&&i.jsx("p",{className:"mt-1 text-sm font-medium text-primary",children:e.ageRange}),i.jsx("p",{className:"mt-3 flex-1 text-sm text-muted-foreground",children:e.shortDescription}),e.currentlyRunning&&e.schedule&&i.jsxs("div",{className:"mt-4 space-y-1",children:[e.schedule.map(t=>i.jsxs("p",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[i.jsx(Nr,{className:"h-3 w-3"}),t]},t)),e.endsDate&&i.jsxs("p",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[i.jsx(pr,{className:"h-3 w-3"}),e.endsDate]})]}),!e.currentlyRunning&&e.nextSessionDate&&i.jsxs("p",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-primary",children:[i.jsx(Bn,{className:"h-3 w-3"}),e.nextSessionDate]}),i.jsxs("div",{className:"mt-4 flex items-center text-sm font-medium text-primary",children:[e.currentlyRunning?`Learn about ${e.name}`:e.nextSessionDate?"View details & sign up":"View details & join the waitlist",i.jsx(xt,{className:"ml-1 h-4 w-4 transition-transform group-hover:translate-x-1"})]})]})]})}function uz(){const e=new Map(yn.map(n=>[n.slug,n])),t=new Set(mk.flatMap(n=>n.slugs)),r=yn.filter(n=>!t.has(n.slug));return i.jsx("section",{className:"border-b border-border py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsx("p",{className:"font-heading text-xs font-semibold uppercase tracking-[0.22em] text-primary",children:"Youth · Ages 6â18"}),i.jsx("h2",{className:"mt-2 font-heading text-2xl font-bold md:text-3xl",children:"The ladder â and the classes on each rung"}),i.jsx("p",{className:"mt-3 max-w-2xl text-muted-foreground",children:"Kids start on soft equipment and move up as skill and age allow, then step straight into the adult program instead of starting over. Current class times are listed on each card."}),i.jsxs("ol",{className:"mt-10 space-y-12",children:[mk.map(n=>{const s=n.slugs.map(a=>e.get(a)).filter(a=>!!a);return i.jsxs("li",{children:[i.jsxs("div",{className:"flex items-start gap-4 border-l-2 border-primary/30 pl-4 sm:pl-5",children:[i.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-primary/10 font-heading text-sm font-bold text-primary",children:n.numeral}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:n.label}),i.jsx("h3",{className:"mt-1 font-heading text-xl font-semibold",children:n.title}),i.jsx("p",{className:"mt-2 max-w-2xl text-sm leading-relaxed text-muted-foreground",children:n.description})]})]}),i.jsx("div",{className:"mt-6 grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:s.map(a=>i.jsx(fk,{cls:a},a.slug))})]},n.numeral)}),i.jsx("li",{children:i.jsxs("div",{className:"flex items-start gap-4 border-l-2 border-primary/30 pl-4 sm:pl-5",children:[i.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-primary/10 font-heading text-sm font-bold text-primary",children:"IV"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:"Ages 18+"}),i.jsx("h3",{className:"mt-1 font-heading text-xl font-semibold",children:"Straight into the adult program"}),i.jsx("p",{className:"mt-2 max-w-2xl text-sm leading-relaxed text-muted-foreground",children:"Graduating teens step into Intermediate Longsword or Saber & Mixed Stick â not back to square one."}),i.jsx("div",{className:"mt-3 flex flex-wrap gap-x-5 gap-y-2",children:i.jsxs(B,{to:"/programs/adult",className:"inline-flex items-center text-sm font-medium text-gold-strong hover:underline",children:["See the adult program"," ",i.jsx(xt,{className:"ml-1 h-3.5 w-3.5"})]})})]})]})})]}),r.length>0&&i.jsxs("div",{className:"mt-14 border-t border-border pt-10",children:[i.jsx("h3",{className:"font-heading text-xl font-semibold",children:"Other youth offerings"}),i.jsx("div",{className:"mt-6 grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:r.map(n=>i.jsx(fk,{cls:n},n.slug))})]})]})})}const hz=[{title:"Ages 6â10",body:"Cubs Club â short, structured, and parents are welcome to watch."},{title:"Ages 11â18",body:"Youth Soft Sword â paired drills and a real progression to move up through."},{title:"Safety",body:"Age-appropriate equipment and contact that ramps up over time, never on day one."},{title:"Community",body:"A year-round home, not a winter season that ends in February."}];function mz(){return i.jsx("section",{className:"border-t border-border py-20",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs("div",{className:"grid items-start gap-12 lg:grid-cols-2",children:[i.jsxs(L.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[i.jsx("p",{className:"font-heading text-xs font-semibold uppercase tracking-[0.22em] text-primary",children:"For parents"}),i.jsx("h2",{className:"mt-3 font-heading text-3xl font-bold md:text-4xl",children:"A discipline-forward alternative to the season that ended."}),i.jsx("p",{className:"mt-5 leading-relaxed text-muted-foreground",children:"Most parents find us because their kid burned out on a team sport â or never settled into one â and they want somewhere the focus is on the kid themselves, not a scoreboard. We teach real, physical skills that demand real attention."}),i.jsx("p",{className:"mt-3 leading-relaxed text-muted-foreground",children:"Footwork, measure, and working with a partner build habits that carry back into the classroom: a kid who can hold a line and listen to a partner learns how to wait their turn and finish what they started."}),i.jsx("dl",{className:"mt-8 grid gap-4 sm:grid-cols-2",children:hz.map(e=>i.jsxs("div",{className:"rounded-lg border border-border border-l-2 border-l-primary bg-card p-4",children:[i.jsx("dt",{className:"font-heading text-base font-semibold",children:e.title}),i.jsx("dd",{className:"mt-1 text-sm text-muted-foreground",children:e.body})]},e.title))})]}),i.jsxs(L.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6,delay:.1},className:"rounded-xl border border-border bg-gradient-to-br from-secondary to-accent p-7 md:p-9 lg:sticky lg:top-24",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"flex gap-0.5","aria-hidden":"true",children:[...Array(5)].map((e,t)=>i.jsx(Ma,{className:`h-3.5 w-3.5 ${t<4?"fill-primary text-primary":"fill-primary/50 text-primary/50"}`},t))}),i.jsx("span",{className:"font-heading text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:"4.7 Google reviews"})]}),i.jsx("blockquote",{className:"mt-5 font-heading text-xl font-semibold leading-snug md:text-2xl",children:"âCoac
494h Nate is a very good teacher â knowledgeable, kind and helpful. My daughter has learned a lot and continues to enjoy taking lessons every week.â"}),i.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:"Charlie C. · Google review from a BladeFit parent"}),i.jsx("p",{className:"mt-6 text-sm leading-relaxed text-muted-foreground",children:"Coach Nate leads most youth and adult classes on the floor, with intentionally low instructor-to-student ratios."}),i.jsx(B,{to:"/trial",className:"mt-7 inline-block",children:i.jsxs(I,{className:"bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:[i.jsx(qe,{className:"mr-2 h-4 w-4"}),"Bring your kid in for $5"]})})]})]})})})}const oE="/assets/youth-sparring-gear-zTmR_0R6.jpg";function fz(){return i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/programs/youth"}),i.jsx("section",{className:"relative border-b border-border overflow-hidden",children:i.jsxs("div",{className:"grid lg:grid-cols-2",children:[i.jsx("div",{className:"bg-card py-20 px-4 lg:px-8 flex items-center",children:i.jsx("div",{className:"container mx-auto",children:i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"max-w-xl",children:[i.jsx("p",{className:"mb-3 font-heading text-sm font-semibold uppercase tracking-[0.3em] text-primary",children:"Youth Classes"}),i.jsx("h1",{className:"font-heading text-4xl font-bold md:text-5xl",children:"Building Confident Young Warriors"}),i.jsx("p",{className:"mt-4 text-lg text-muted-foreground leading-relaxed",children:"Our youth programs teach movement, discipline, and focus through age-appropriate sword training. Using safe, modern equipment, students develop coordination, agility, and timing while learning authentic combat concepts based on medieval and renaissance traditions."}),i.jsx("p",{className:"mt-3 text-muted-foreground leading-relaxed",children:"Classes emphasize teamwork, confidence, and control â giving young warriors a chance to move, think, and train like martial artists while having fun in a supportive community."})]})})}),i.jsx("div",{className:"hidden lg:block",children:i.jsx("img",{src:oE,alt:"Youth sword training at BladeFit Academy",className:"h-full w-full object-cover"})})]})}),i.jsx(uz,{}),i.jsx(mz,{}),i.jsx("section",{className:"border-t border-border bg-card py-16",children:i.jsxs("div",{className:"container mx-auto px-4 text-center lg:px-8",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold md:text-3xl",children:"Ready to get your child started?"}),i.jsx("p",{className:"mx-auto mt-3 max-w-md text-muted-foreground",children:"Their first class is a $5 trial. No experience or equipment needed."}),i.jsx(B,{to:"/trial",className:"mt-6 inline-block",children:i.jsx(I,{className:"bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:"Try a Trial Class"})})]})})]})}const pk=[{numeral:"I",label:"Pick a starting point",title:"Start with any weapon",description:"Most people start in Beginner Longsword, but saber, single stick, or rapier are equally valid front doors. No background needed either way. Beginner Single Stick isn't a separate night â new students pick up a stick inside the Military Saber class and move to steel saber when they're ready.",slugs:["beginner-longsword","beginner-single-stick","rapier"]},{numeral:"II",label:"Build depth",title:"Get good at your weapon",description:"Whichever weapon you began with, the work deepens: binding and measure, steel fencing, and open sparring. Single stick and Military Saber share the same Thursday class, so stick students step up to steel without changing nights.",slugs:["intermediate-longsword","military-saber"]},{numeral:"III",label:"Broaden",title:"Add a second weapon",description:"Cross-train into cut-and-thrust saber, stick & targe, or rapier â the fundamentals transfer both ways.",slugs:["stick-and-targe","adult-soft-combat"]}];function gk({cls:e}){return i.jsxs(B,{to:`/classes/${e.slug}`,className:"group relative flex h-full flex-col overflow-hidden rounded-lg border border-border bg-card transition-all hover:border-primary/40 hover:shadow-gold",children:[!e.currentlyRunning&&i.jsxs("div",{className:`absolute right-0 top-4 z-10 flex items-center gap-1.5 rounded-l-full px-4 py-1.5 text-sm font-semibold shadow-md backdrop-blur-sm ${e.nextSessionDate?"bg-primary/90 text-primary-foreground":"bg-destructive/90 text-destructive-foreground"}`,children:[i.jsx(Bn,{className:"h-3.5 w-3.5"}),e.nextSessionDate?"Coming Soon":"Not Currently Running"]}),_l[e.slug]?i.jsx("img",{src:_l[e.slug],alt:`${e.name} banner`,loading:"lazy",className:"h-auto w-full"}):i.jsx("div",{className:"px-6 pt-6",children:i.jsx("span",{className:"text-3xl",children:e.icon})}),i.jsxs("div",{className:"flex flex-1 flex-col p-6",children:[i.jsx("h4",{className:"font-heading text-xl font-semibold",children:e.name}),e.ageRange&&i.jsx("p",{className:"mt-1 text-sm font-medium text-primary",children:e.ageRange}),i.jsx("p",{className:"mt-3 flex-1 text-sm text-muted-foreground",children:e.shortDe
494scription}),e.currentlyRunning&&e.schedule&&i.jsxs("div",{className:"mt-4 space-y-1",children:[e.schedule.map(t=>i.jsxs("p",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[i.jsx(Nr,{className:"h-3 w-3"}),t]},t)),e.endsDate&&i.jsxs("p",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[i.jsx(pr,{className:"h-3 w-3"}),e.endsDate]})]}),!e.currentlyRunning&&e.nextSessionDate&&i.jsxs("p",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-primary",children:[i.jsx(Bn,{className:"h-3 w-3"}),e.nextSessionDate]}),i.jsxs("div",{className:"mt-4 flex items-center text-sm font-medium text-primary",children:[e.currentlyRunning?`Learn about ${e.name}`:e.nextSessionDate?"View details & sign up":"View details & join the waitlist",i.jsx(xt,{className:"ml-1 h-4 w-4 transition-transform group-hover:translate-x-1"})]})]})]})}function pz(){const e=new Map(xn.map(n=>[n.slug,n])),t=new Set(pk.flatMap(n=>n.slugs)),r=xn.filter(n=>!t.has(n.slug));return i.jsx("section",{className:"border-b border-border py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsx("p",{className:"font-heading text-xs font-semibold uppercase tracking-[0.22em] text-primary",children:"Adults · Ages 18+"}),i.jsx("h2",{className:"mt-2 font-heading text-2xl font-bold md:text-3xl",children:"The ladder â and the classes on each rung"}),i.jsx("p",{className:"mt-3 max-w-2xl text-muted-foreground",children:"Pick a starting weapon, get genuinely good at it, then add a second. There is always a next thing to work on. Current class times are listed on each card."}),i.jsxs("ol",{className:"mt-10 space-y-12",children:[pk.map(n=>{const s=n.slugs.map(a=>e.get(a)).filter(a=>!!a);return i.jsxs("li",{children:[i.jsxs("div",{className:"flex items-start gap-4 border-l-2 border-primary/30 pl-4 sm:pl-5",children:[i.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-primary/10 font-heading text-sm font-bold text-primary",children:n.numeral}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:n.label}),i.jsx("h3",{className:"mt-1 font-heading text-xl font-semibold",children:n.title}),i.jsx("p",{className:"mt-2 max-w-2xl text-sm leading-relaxed text-muted-foreground",children:n.description})]})]}),i.jsx("div",{className:"mt-6 grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:s.map(a=>i.jsx(gk,{cls:a},a.slug))})]},n.numeral)}),i.jsx("li",{children:i.jsxs("div",{className:"flex items-start gap-4 border-l-2 border-primary/30 pl-4 sm:pl-5",children:[i.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-primary/10 font-heading text-sm font-bold text-primary",children:"IV"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:"Test yourself"}),i.jsx("h3",{className:"mt-1 font-heading text-xl font-semibold",children:"Tournaments & open floor"}),i.jsx("p",{className:"mt-2 max-w-2xl text-sm leading-relaxed text-muted-foreground",children:"Tournament prep, events, and the free-play classes that keep the training honest."}),i.jsx("div",{className:"mt-3 flex flex-wrap gap-x-5 gap-y-2",children:i.jsxs(B,{to:"/events",className:"inline-flex items-center text-sm font-medium text-gold-strong hover:underline",children:["See events ",i.jsx(xt,{className:"ml-1 h-3.5 w-3.5"})]})})]})]})})]}),r.length>0&&i.jsxs("div",{className:"mt-14 border-t border-border pt-10",children:[i.jsx("h3",{className:"font-heading text-xl font-semibold",children:"Other adult offerings"}),i.jsx("div",{className:"mt-6 grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:r.map(n=>i.jsx(gk,{cls:n},n.slug))})]})]})})}const gz="/assets/saber-sparring-2-Bp-aQdEb.jpg";function yz(){return i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/programs/adult"}),i.jsxs("section",{className:"relative border-b border-border bg-card py-20",children:[i.jsx("img",{src:gz,alt:"Adult students sparring with military sabers at BladeFit Academy",className:"absolute inset-0 h-full w-full object-cover object-[center_30%]"}),i.jsx("div",{"aria-hidden":"true",className:"absolute inset-0 bg-gradient-to-r from-background via-background/95 to-background/60"}),i.jsxs("div",{className:"relative container mx-auto px-4 lg:px-8",children:[i.jsxs(L.div,{initial:{opacity:0,y:20}
494,animate:{opacity:1,y:0},transition:{duration:.5},className:"max-w-2xl",children:[i.jsx("p",{className:"mb-3 font-heading text-sm font-semibold uppercase tracking-[0.3em] text-primary",children:"Adult Classes"}),i.jsx("h1",{className:"font-heading text-4xl font-bold md:text-5xl",children:"Master the Art of the Sword"}),i.jsx("p",{className:"mt-4 text-lg text-muted-foreground leading-relaxed",children:"BladeFit Academy teaches a wide range of historical European martial arts weapons. Our adult programs cover everything from medieval longsword to 19th century military saber â all grounded in historical source material and adapted for modern training."}),i.jsx("p",{className:"mt-3 text-sm text-muted-foreground italic",children:"Note: Adult classes rotate seasonally. Classes not currently running are marked below â join the waitlist to be notified when they return."})]}),i.jsxs("div",{className:"mt-12 grid gap-10 md:grid-cols-2",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"font-heading text-2xl font-bold",children:"Beginner-Friendly"}),i.jsx("p",{className:"mt-3 text-muted-foreground leading-relaxed",children:"New students start with minimal gear â often just a training sword or staff and basic safety equipment (loaners provided). As you progress, you'll add masks, gloves, and jackets at your own pace. There's no barrier to beginning your sword journey today."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-heading text-2xl font-bold",children:"Why We Train"}),i.jsx("p",{className:"mt-3 text-muted-foreground leading-relaxed",children:"By studying multiple weapon systems â from longsword to sabre to rapier and staff â we deepen our understanding of martial concepts: footwork, tactics, and philosophy. Like the masters before us, we train to become the best swordsmen we can be."})]})]})]})]}),i.jsx(pz,{}),i.jsx(iE,{}),i.jsx("section",{className:"border-t border-border bg-card py-16",children:i.jsxs("div",{className:"container mx-auto px-4 text-center lg:px-8",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold md:text-3xl",children:"From foam swords to full steel"}),i.jsx("p",{className:"mx-auto mt-3 max-w-md text-muted-foreground",children:"We meet you where you are. No experience needed â your first class is a $5 trial."}),i.jsx(B,{to:"/trial",className:"mt-6 inline-block",children:i.jsx(I,{className:"bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:"Try a Trial Class"})})]})})]})}const xz=[{icon:Nr,title:"Arrive 10 minutes early",body:"Meet a coach, sign your waiver, and get a quick tour of the salle. No paperwork to print ahead of time."},{icon:tL,title:"Wear what you already own",body:"Athletic clothes you can move in and clean indoor athletic shoes. Bare feet are not permitted at any age. We loan all the gear you need for your first class."},{icon:ar,title:"Warm-up and footwork together",body:"Every class starts as a group. You will not be singled out, tested, or asked to spar on day one."},{icon:qe,title:"Put a sword in your hand",body:"You will hold a training sword and drill real technique in your first session â that is the whole point of coming in."}];function vz({className:e}){return i.jsx("section",{className:e,children:i.jsxs("div",{className:"rounded-lg border border-border bg-card p-6 md:p-8",children:[i.jsx("h2",{className:"font-heading text-2xl font-semibold",children:"What happens at your first class"}),i.jsx("p",{className:"mt-2 text-muted-foreground",children:"No experience required. Here is exactly how a first visit goes."}),i.jsx("ol",{className:"mt-6 grid gap-5 sm:grid-cols-2",children:xz.map(t=>i.jsxs("li",{className:"flex gap-3",children:[i.jsx("div",{className:"mt-0.5 h-fit rounded-full bg-primary/10 p-2",children:i.jsx(t.icon,{className:"h-4 w-4 text-primary","aria-hidden":"true"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-heading text-base font-semibold",children:t.title}),i.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:t.body})]})]},t.title))}),i.jsxs("div",{className:"mt-7 flex flex-col gap-3 sm:flex-row",children:[i.jsx(B,{to:"/trial",children:i.jsxs(I,{className:"w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90 sm:w-auto",children:[i.jsx(qe,{className:"mr-2 h-4 w-4"}),"Book a $5 Trial Class"]})}),i.jsx(B,{to:"/faq",children:i.jsxs(I,{variant:"outline",className:"w-full border-primary/30 hover:border-primary hover:text-primary sm:w-auto",children:["More questions ",i.jsx(xt,{className:"ml-2 h-4 w-4"})]})})]})]})})}
494function sb({steps:e,heading:t="Next steps",className:r=""}){return e.length===0?null:i.jsx("section",{className:`border-t border-border py-14 ${r}`,children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsx("h2",{className:"mb-6 font-heading text-2xl font-semibold",children:t}),i.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(n=>i.jsxs(B,{to:n.to,className:"group flex flex-col rounded-lg border border-border bg-card p-5 transition-all hover:border-primary/50 hover:shadow-md",children:[i.jsx("div",{className:"mb-3 w-fit rounded-full bg-primary/10 p-2.5",children:i.jsx(n.icon,{className:"h-5 w-5 text-primary","aria-hidden":"true"})}),i.jsx("h3",{className:"font-heading text-base font-semibold transition-colors group-hover:text-primary",children:n.title}),i.jsx("p",{className:"mt-1 flex-1 text-sm text-muted-foreground",children:n.description}),i.jsxs("span",{className:"mt-3 inline-flex items-center text-sm font-medium text-primary",children:["Go ",i.jsx(xt,{className:"ml-1 h-3.5 w-3.5 transition-transform group-hover:translate-x-0.5"})]})]},n.to+n.title))})]})})}function lE({label:e,secondaryTo:t="/schedule",secondaryLabel:r="Schedule"}){return i.jsxs(i.Fragment,{children:[i.jsx("div",{"aria-hidden":"true",className:"h-20 lg:hidden"}),i.jsx("div",{className:"fixed inset-x-0 bottom-0 z-40 border-t border-border bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80 lg:hidden",children:i.jsxs("div",{className:"container mx-auto flex items-center gap-3 px-4 py-3",children:[i.jsx(B,{to:t,className:"shrink-0",children:i.jsx(I,{variant:"outline",className:"border-primary/30 hover:border-primary hover:text-primary",children:r})}),i.jsx(B,{to:"/trial",className:"flex-1",children:i.jsxs(I,{className:"w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:[i.jsx(qe,{className:"mr-2 h-4 w-4"}),e?`Try ${e} â $5`:"Book a $5 Trial"]})})]})})]})}const wz="/assets/adult-soft-combat-sparring-BJrGphwF.jpg",bz="/assets/longsword-drills-CLJVUl-r.jpg",jz="/assets/beginner-longsword-shinai-Ddt7C3Vt.jpg",kz="/assets/cubs-group-battle-B9nGteF0.jpg",ib="/assets/saber-sparring-1-2LbinoSX.jpg",Sz="/assets/youth-longsword-sparring-DQQsQwHp.jpg",_z="/assets/singlestick-sparring-CwAA9dBV.jpg",Nz={"adult-soft-combat":{src:wz,position:"object-center"},"intermediate-longsword":{src:bz,position:"object-[center_30%]"},"beginner-longsword":{src:jz,position:"object-[center_30%]"},"cubs-club":{src:kz,position:"object-center"},"military-saber":{src:ib,position:"object-[center_30%]"},"youth-longsword":{src:Sz,position:"object-center"},"beginner-single-stick":{src:_z,position:"object-center"},"youth-soft-sword":{src:oE,position:"object-center"},"stick-and-targe":{src:"/images/stick-and-targe-sparring.jpg",position:"object-center"}},Cz="/assets/longsword-manuscript-B8NuiohO.jpg",Az="/assets/youth-sword-shield-historic-C6JgWByh.jpg",Tz="/assets/stick-and-targe-historic-OmwDDADg.jpg",Ez="/assets/military-saber-historic-u6WGtW3d.jpg",yk={"longsword-manuscript":Cz,"youth-sword-shield-historic":Az,"stick-and-targe-historic":Tz,"military-saber-historic":Ez};function Rz(){const{slug:e}=Kd(),t=bd(e||""),r=e?Nz[e]:void 0,n=p.useRef(null),[s,a]=p.useState(!1),[o,l]=p.useState(!1),d=e?{"stick-and-targe":"/videos/stick-and-targe-sparring.mp4","intermediate-longsword":"/videos/longsword-sparring.mp4","youth-longsword":"/videos/youth-longsword-sparring.mp4"}[e]:void 0,u=p.useRef(Date.now());return p.useEffect(()=>{a(!1),l(!1)},[e]),p.useEffect(()=>{const h=n.current;h&&h.play().catch(()=>{h.muted=!0,h.play().catch(()=>{})})},[d]),t?i.jsxs(i.Fragment,{children:[i.jsx($e,{path:`/classes/${t.slug}`,image:r==null?void 0:r.src}),r||d?i.jsxs("section",{className:"relative flex min-h-[400px] items-end border-b border-border md:min-h-[480px]",children:[r&&i.jsx("img",{src:r.src,alt:`${t.name} action photo`,fetchPriority:"high",className:`absolute inset-0 h-full w-full object-contain sm:object-cover ${r.position||"object-center"}`}
494),d&&i.jsx("video",{ref:n,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"auto","aria-hidden":"true",src:`${d}?v=${u.current}`,onCanPlay:()=>a(!0),className:"absolute inset-0 h-full w-full object-contain sm:object-cover transition-opacity duration-700",style:{opacity:s?1:0}}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-black/20"}),i.jsxs("div",{className:"relative z-10 container mx-auto px-4 pb-10 pt-24 lg:px-8",children:[i.jsxs(B,{to:`/programs/${t.category}`,className:"mb-6 inline-flex items-center text-sm text-white/70 transition-colors hover:text-white",children:[i.jsx(Wn,{className:"mr-1 h-4 w-4"}),"Back to ",t.category==="youth"?"Youth":"Adult"," Programs"]}),i.jsxs("div",{children:[i.jsx("h1",{className:"font-heading text-4xl font-bold text-white md:text-5xl",children:t.name}),t.ageRange&&i.jsx("p",{className:"mt-2 text-lg font-medium text-amber-300",children:t.ageRange}),!t.currentlyRunning&&i.jsxs("div",{className:"mt-4 hidden flex-col items-start gap-3 sm:flex-row sm:items-center lg:flex",children:[i.jsx("div",{className:`rounded-md border px-4 py-2 text-sm font-semibold backdrop-blur-sm shadow-lg ${t.nextSessionDate?"border-primary/50 bg-primary/80 text-primary-foreground":"border-destructive/50 bg-destructive/80 text-destructive-foreground"}`,children:t.nextSessionDate?`ð Coming Soon · ${t.nextSessionDate}`:"â This class is not currently running"}),i.jsx(B,{to:t.gymDeskProgramId?`/classes/${t.slug}/signup`:"/trial",children:i.jsxs(I,{size:"sm",className:"bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:[i.jsx(qe,{className:"mr-2 h-4 w-4"}),t.nextSessionDate?"Sign Up Now":"Join the Waitlist"]})})]}),i.jsxs("div",{className:"mt-6 flex flex-col gap-4 sm:flex-row sm:items-start lg:hidden",children:[i.jsxs("div",{className:"rounded-lg border border-white/20 bg-black/40 backdrop-blur-sm p-4 flex-1",children:[i.jsx("h3",{className:"mb-2 font-heading text-sm font-semibold text-white",children:"Class Times"}),t.currentlyRunning&&t.schedule?i.jsxs("div",{className:"space-y-1",children:[t.schedule.map(h=>i.jsxs("p",{className:"flex items-center gap-2 text-sm text-white/80",children:[i.jsx(Nr,{className:"h-3.5 w-3.5 text-amber-300"}),h]},h)),t.endsDate&&i.jsxs("p",{className:"flex items-center gap-2 text-xs font-medium text-red-400",children:[i.jsx(pr,{className:"h-3.5 w-3.5"}),t.endsDate]})]}):t.nextSessionDate?i.jsxs("p",{className:"flex items-center gap-2 text-sm font-medium text-amber-300",children:[i.jsx(Bn,{className:"h-3.5 w-3.5 text-amber-300"}),t.nextSessionDate]}):i.jsx("p",{className:"text-xs text-white/60",children:"Not currently scheduled"})]}),i.jsx("div",{className:"flex flex-col gap-2 sm:shrink-0",children:t.currentlyRunning?i.jsx(B,{to:"/trial",children:i.jsxs(I,{size:"sm",className:"w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:[i.jsx(qe,{className:"mr-2 h-4 w-4"}),"Try a Trial Class"]})}):i.jsxs(i.Fragment,{children:[t.gymDeskProgramId&&i.jsx(B,{to:`/classes/${t.slug}/signup`,children:i.jsxs(I,{size:"sm",className:"w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:[i.jsx(qe,{className:"mr-2 h-4 w-4"}),"Join Waitlist"]})}),i.jsx(B,{to:"/trial",children:i.jsxs(I,{size:"sm",variant:"outline",className:"w-full border-primary/30 text-foreground hover:border-primary hover:text-primary",children:[i.jsx(qe,{className:"mr-2 h-4 w-4"}),"Book a Trial Class"]})})]})})]})]})]})]}):i.jsx("section",{className:"border-b border-border bg-card py-16 pt-20",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsxs(B,{to:`/programs/${t.category}`,className:"mb-6 inline-flex items-center text-sm text-muted-foreground transition-colors hover:text-primary",children:[i.jsx(Wn,{className:"mr-1 h-4 w-4"}),"Back to ",t.category==="youth"?"Youth":"Adult"," Programs"]}),i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[i.jsx("span",{className:"mb-3 block text-4xl",children:t.icon}),i.jsx("h1",{className:"font-heading text-4xl font-bold md:text-5xl",children:t.name}),t.ageRange&&i.jsx("p",{className:"mt-2 text-lg font-medium text-primary",children:t.ageRange}),!t.currentlyRunning&&i.jsxs("div",{className:"mt-4 hidden flex-col items-start gap-3 sm:flex-row sm:items-center lg:flex",children:[i.jsx("div",{className:`rounded-md border px-4 py-2 text-sm font-semibold shadow-lg ${t.nextSessionDate?"border-primary/50 bg-primary/90 text-primary-foreground":"border-destructive/50 bg-destructive/90 text-destructive-foreground"}`,children:t.nextSessionDate?`ð Coming Soon · ${t.nextSessionDate}`:"â This class is not currently running"}
494),i.jsx(B,{to:t.gymDeskProgramId?`/classes/${t.slug}/signup`:"/trial",children:i.jsxs(I,{size:"sm",className:"bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:[i.jsx(qe,{className:"mr-2 h-4 w-4"}),t.nextSessionDate?"Sign Up Now":"Join the Waitlist"]})})]}),i.jsxs("div",{className:"mt-6 flex flex-col gap-4 sm:flex-row sm:items-start lg:hidden",children:[i.jsxs("div",{className:"rounded-lg border border-border bg-muted/50 p-4 flex-1",children:[i.jsx("h3",{className:"mb-2 font-heading text-sm font-semibold",children:"Class Times"}),t.currentlyRunning&&t.schedule?i.jsxs("div",{className:"space-y-1",children:[t.schedule.map(h=>i.jsxs("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[i.jsx(Nr,{className:"h-3.5 w-3.5 text-primary"}),h]},h)),t.endsDate&&i.jsxs("p",{className:"flex items-center gap-2 text-xs font-medium text-destructive",children:[i.jsx(pr,{className:"h-3.5 w-3.5"}),t.endsDate]})]}):t.nextSessionDate?i.jsxs("p",{className:"flex items-center gap-2 text-sm font-medium text-primary",children:[i.jsx(Bn,{className:"h-3.5 w-3.5"}),t.nextSessionDate]}):i.jsx("p",{className:"text-xs text-muted-foreground",children:"Not currently scheduled"})]}),i.jsx("div",{className:"flex flex-col gap-2 sm:shrink-0",children:t.currentlyRunning?i.jsx(B,{to:"/trial",children:i.jsxs(I,{size:"sm",className:"w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:[i.jsx(qe,{className:"mr-2 h-4 w-4"}),"Try a Trial Class"]})}):i.jsxs(i.Fragment,{children:[t.gymDeskProgramId&&i.jsx(B,{to:`/classes/${t.slug}/signup`,children:i.jsxs(I,{size:"sm",className:"w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:[i.jsx(qe,{className:"mr-2 h-4 w-4"}),"Join Waitlist"]})}),i.jsx(B,{to:"/trial",children:i.jsxs(I,{size:"sm",variant:"outline",className:"w-full border-primary/30 hover:border-primary hover:text-primary",children:[i.jsx(qe,{className:"mr-2 h-4 w-4"}),"Book a Trial Class"]})})]})})]})]})]})}),i.jsx("section",{className:"py-16",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs("div",{className:"mx-auto grid max-w-4xl gap-12 lg:grid-cols-3",children:[i.jsxs("div",{className:"order-1 lg:col-span-2 space-y-10",children:[i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},children:[i.jsx("h2",{className:"mb-4 font-heading text-2xl font-semibold",children:"What You'll Learn"}),i.jsx("p",{className:"text-muted-foreground leading-relaxed",children:t.fullDescription})]}),i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.2},children:[i.jsx("h2",{className:"mb-4 font-heading text-2xl font-semibold",children:"Why We Train This Way"}),i.jsx("p",{className:"text-muted-foreground leading-relaxed",children:t.whyWeTrain})]}),(t.locationNote||t.previousSessionNote)&&i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.22},className:"rounded-lg border border-border bg-card p-6",children:[i.jsx("h2",{className:"mb-4 font-heading text-2xl font-semibold",children:"Program Status and History"}),i.jsx("p",{className:"text-muted-foreground leading-relaxed",children:t.currentlyRunning?"This program is currently running.":`This program is not currently running${t.nextSessionDate?` â ${t.nextSessionDate}.`:"."}`}),t.locationNote&&i.jsx("p",{className:"mt-3 text-muted-foreground leading-relaxed",children:t.locationNote}),t.previousSessionNote&&i.jsx("p",{className:"mt-3 text-muted-foreground leading-relaxed",children:t.previousSessionNote})]}),t.historicRoots&&i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.25},children:[i.jsxs("h2",{className:"mb-4 flex items-center gap-2 font-heading text-2xl font-semibold",children:[i.jsx(_y,{className:"h-5 w-5 text-primary"}),"Historic Roots"]}),i.jsxs("div",{className:t.historicRootsImage?"flex flex-col gap-6 sm:flex-row":"",children:[i.jsx("p",{className:"text-muted-foreground leading-relaxed",children:t.historicRoots}),t.historicRootsImage&&yk[t.historicRootsImage]&&i.jsx("div",{className:"w-full overflow-hidden rounded-lg shadow-md sm:w-64 sm:shrink-0 md:w-72 lg:w-80",children:i.jsx("img",{src:yk[t.historicRootsImage],alt:`${t.name} historic manuscript`,className:"h-72 w-full object-contain bg-[hsl(var(--muted))] sm:h-full"})})]})]})]}),i.jsxs(L.div,{initial:{opacity:0,y:20}
494,animate:{opacity:1,y:0},transition:{duration:.5,delay:.2},className:"order-2 hidden lg:block lg:row-span-2 space-y-6",children:[i.jsxs("div",{className:"rounded-lg border border-border bg-card p-6",children:[i.jsx("h3",{className:"mb-3 font-heading text-lg font-semibold",children:"Class Times"}),t.currentlyRunning&&t.schedule?i.jsxs("div",{className:"space-y-2",children:[t.schedule.map(h=>i.jsxs("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[i.jsx(Nr,{className:"h-4 w-4 text-primary"}),h]},h)),t.endsDate&&i.jsxs("p",{className:"flex items-center gap-2 text-sm font-medium text-destructive",children:[i.jsx(pr,{className:"h-4 w-4"}),t.endsDate]})]}):t.nextSessionDate?i.jsxs("div",{className:"space-y-2",children:[i.jsxs("p",{className:"flex items-center gap-2 text-sm font-medium text-primary",children:[i.jsx(Bn,{className:"h-4 w-4"}),t.nextSessionDate]}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Sign up below to reserve your spot when this class begins."})]}):i.jsx("p",{className:"text-sm text-muted-foreground",children:"This class is not currently on the schedule. It rotates seasonally â join the waitlist to be notified."}),i.jsx(B,{to:"/schedule",className:"mt-4 block",children:i.jsxs(I,{variant:"outline",className:"w-full border-primary/30 hover:border-primary hover:text-primary",children:[i.jsx(pr,{className:"mr-2 h-4 w-4"}),"View Full Schedule"]})})]}),i.jsxs("div",{className:"rounded-lg border border-primary/30 bg-primary/5 p-6",children:[i.jsx("h3",{className:"mb-2 font-heading text-lg font-semibold",children:t.currentlyRunning?"Try This Class":"Join the Waitlist"}),i.jsx("p",{className:"mb-4 text-sm text-muted-foreground",children:t.currentlyRunning?"Try a trial class for $5. No experience needed.":"Be the first to know when this class returns to the schedule."}),i.jsxs("div",{className:"space-y-3",children:[!t.currentlyRunning&&t.gymDeskProgramId&&i.jsx(B,{to:`/classes/${t.slug}/signup`,children:i.jsxs(I,{className:"w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:[i.jsx(qe,{className:"mr-2 h-4 w-4"}),"Join Waitlist"]})}),i.jsx(B,{to:"/trial",className:"block",children:i.jsxs(I,{variant:t.gymDeskProgramId?"outline":"default",className:t.gymDeskProgramId?"w-full border-primary/30 hover:border-primary hover:text-primary":"w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:[i.jsx(qe,{className:"mr-2 h-4 w-4"}),t.currentlyRunning?"Try a Trial Class":"Book a Trial Class"]})})]})]})]}),i.jsxs("div",{className:"order-3 lg:col-span-2 space-y-6",children:[t.gearRecommendations.length>0&&i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.3},className:"rounded-lg border border-border bg-card p-6",children:[i.jsx("h3",{className:"mb-4 font-heading text-lg font-semibold",children:"What to Bring"}),i.jsx("ul",{className:"space-y-2",children:t.gearRecommendations.map(h=>i.jsxs("li",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[i.jsx(qh,{className:"mt-0.5 h-4 w-4 shrink-0 text-primary"}),h]},h))})]}),(t.gearItems&&t.gearItems.length>0||t.tieredGear&&t.tieredGear.length>0||t.coachRecommendations&&t.coachRecommendations.length>0||Zw(t.slug).length>0)&&i.jsx(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.35},children:i.jsx(B,{to:`/gear/class/${t.slug}`,className:"group flex flex-col overflow-hidden rounded-lg border border-border bg-card transition-all hover:border-primary/50 hover:shadow-md",children:i.jsxs("div",{className:"flex items-center gap-4 p-6",children:[i.jsx("div",{className:"rounded-full bg-primary/10 p-3",children:i.jsx(gl,{className:"h-6 w-6 text-primary"})}),i.jsxs("div",{className:"flex-1",children:[i.jsxs("h2",{className:"font-heading text-xl font-semibold group-hover:text-primary transition-colors",children:[t.name," Gear & Equipment"]}),i.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"View all required gear, recommendations, and shop links for this class."})]}),i.jsx(xt,{className:"h-5 w-5 shrink-0 text-muted-foreground group-hover:text-primary transition-colors"})]})})})]})]})})}),i.jsx("section",{className:"border-t border-border py-14",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsx(vz,{})})}),i.jsx(sb,{steps:[{to:`/gear/class/${t.slug}`,title:`Gear for ${t.name}`,description:"Exactly what you need to own, what we loan you, and where to buy it.",icon:gl},{to:"/schedule",title:"See current class times",description:"Weekly recurring classes, upcoming changes, and the full calendar.",icon:pr},{to:"/memberships",title:"Memberships & pricing",description:"What it costs after your trial, and which option fits your training.",icon:_y}]}),i.jsx(lE,{label:t.name})]}):i.jsxs("div",{className:"container mx-auto flex min-h-[60vh] flex-col items-center justify-center px-4 text-center",children:[i.jsx("h1",{className:"font-heading text-3xl font-bold",children:"Class Not Found"}),i.jsx("p",{className:"mt-3 text-muted-foreground",children:"The class you're looking for doesn't exist."}),i.jsx(B,{to:"/",className:"mt-6",children:i.jsx(I,{variant:"outline",children:"Back to Home"})})]})}function Pz(e,t,r,n){function s(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function l(u){try{d(n.next(u))}catch(h){o(h)}}function c(u){try{d(n.throw(u))}catch(h){o(h)}}function d(u){u.done?a(u.value):s(u.value).then(l,c)}d((n=n.apply(e,t||[])).next())})}const Iz=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);
494class ab extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class Oz extends ab{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class xk extends ab{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class vk extends ab{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var wx;(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"})(wx||(wx={}));class Mz{constructor(t,{headers:r={},customFetch:n,region:s=wx.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=Iz(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return Pz(this,arguments,void 0,function*(r,n={}){var s;let a,o;try{const{headers:l,method:c,body:d,signal:u,timeout:h}=n;let m={},{region:f}=n;f||(f=this.region);const y=new URL(`${this.url}/${r}`);f&&f!=="any"&&(m["x-region"]=f,y.searchParams.set("forceFunctionRegion",f));let x;d&&(l&&!Object.prototype.hasOwnProperty.call(l,"Content-Type")||!l)?typeof Blob<"u"&&d instanceof Blob||d instanceof ArrayBuffer?(m["Content-Type"]="application/octet-stream",x=d):typeof d=="string"?(m["Content-Type"]="text/plain",x=d):typeof FormData<"u"&&d instanceof FormData?x=d:(m["Content-Type"]="application/json",x=JSON.stringify(d)):d&&typeof d!="string"&&!(typeof Blob<"u"&&d instanceof Blob)&&!(d instanceof ArrayBuffer)&&!(typeof FormData<"u"&&d instanceof FormData)?x=JSON.stringify(d):x=d;let b=u;h&&(o=new AbortController,a=setTimeout(()=>o.abort(),h),u?(b=o.signal,u.addEventListener("abort",()=>o.abort())):b=o.signal);const g=yield this.fetch(y.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},m),this.headers),l),body:x,signal:b}).catch(k=>{throw new Oz(k)}),v=g.headers.get("x-relay-error");if(v&&v==="true")throw new xk(g);if(!g.ok)throw new vk(g);let w=((s=g.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),j;return w==="application/json"?j=yield g.json():w==="application/octet-stream"||w==="application/pdf"?j=yield g.blob():w==="text/event-stream"?j=g:w==="multipart/form-data"?j=yield g.formData():j=yield g.text(),{data:j,error:null,response:g}}catch(l){return{data:null,error:l,response:l instanceof vk||l instanceof xk?l.context:void 0}}finally{a&&clearTimeout(a)}})}}const cE=3,wk=e=>Math.min(1e3*2**e,3e4),Dz=[520,503],dE=["GET","HEAD","OPTIONS"];var bk=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
494de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function jk(e,t){return new Promise(r=>{if(t!=null&&t.aborted){r();return}const n=setTimeout(()=>{t==null||t.removeEventListener("abort",s),r()},e);function s(){clearTimeout(n),r()}t==null||t.addEventListener("abort",s)})}function Lz(e,t,r,n){return!(!n||r>=cE||!dE.includes(e)||!Dz.includes(t))}var $z=class{constructor(e){var t,r,n,s,a;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=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=e.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(s=e.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(a=e.retry)!==null&&a!==void 0?a:!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 r=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 n=this.fetch;let a=(async()=>{let o=0;for(;;){const d={};r.headers.forEach((h,m)=>{d[m]=h}),o>0&&(d["X-Retry-Count"]=String(o));let u;try{u=await n(r.url.toString(),{method:r.method,headers:d,body:JSON.stringify(r.body,(h,m)=>typeof m=="bigint"?m.toString():m),signal:r.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!dE.includes(r.method))throw h;if(r.retryEnabled&&o<cE){const m=wk(o);o++,await jk(m,r.signal);continue}throw h}if(Lz(r.method,u.status,o,r.retryEnabled)){var l,c;const h=(l=(c=u.headers)===null||c===void 0?void 0:c.get("Retry-After"))!==null&&l!==void 0?l:null,m=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:wk(o);await u.text(),o++,await jk(m,r.signal);continue}return await r.processResponse(u)}})();return this.shouldThrowOnError||(a=a.catch(o=>{var l;let c="",d="",u="";const h=o==null?void 0:o.cause;if(h){var m,f,y,x;const v=(m=h==null?void 0:h.message)!==null&&m!==void 0?m:"",w=(f=h==null?void 0:h.code)!==null&&f!==void 0?f:"";c=`${(y=o==null?void 0:o.name)!==null&&y!==void 0?y:"FetchError"}: ${o==null?void 0:o.message}`,c+=` 495 496Caused by: ${(x=h==null?void 0:h.name)!==null&&x!==void 0?x:"Error"}: ${v}`,w&&(c+=` (${w})`),h!=null&&h.stack&&(c+=` 497${h.stack}`)}else{var b;c=(b=o==null?void 0:o.stack)!==null&&b!==void 0?b:""}const g=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(u="",d="Request was aborted (timeout or manual cancellation)",g>this.urlLengthLimit&&(d+=`. Note: Your request URL is ${g} 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")&&(u="",d="HTTP headers exceeded server limits (typically 16KB)",g>this.urlLengthLimit&&(d+=`. Your request URL is ${g} 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:`${(l=o==null?void 0:o.name)!==null&&l!==void 0?l:"FetchError"}: ${o==null?void 0:o.message}`,details:c,hint:d,code:u},data:null,count:null,status:0,statusText:""}}
497)),a.then(e,t)}async processResponse(e){var t=this;let r=null,n=null,s=null,a=e.status,o=e.statusText;if(e.ok){var l,c;if(t.method!=="HEAD"){var d;const m=await e.text();if(m!=="")if(t.headers.get("Accept")==="text/csv")n=m;else if(t.headers.get("Accept")&&(!((d=t.headers.get("Accept"))===null||d===void 0)&&d.includes("application/vnd.pgrst.plan+text")))n=m;else try{n=JSON.parse(m)}catch{if(r={message:m},n=null,t.shouldThrowOnError)throw new bk({message:m,details:"",hint:"",code:""})}}const u=(l=t.headers.get("Prefer"))===null||l===void 0?void 0:l.match(/count=(exact|planned|estimated)/),h=(c=e.headers.get("content-range"))===null||c===void 0?void 0:c.split("/");u&&h&&h.length>1&&(s=parseInt(h[1])),t.isMaybeSingle&&Array.isArray(n)&&(n.length>1?(r={code:"PGRST116",details:`Results contain ${n.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},n=null,s=null,a=406,o="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const u=await e.text();try{r=JSON.parse(u),Array.isArray(r)&&e.status===404&&(n=[],r=null,a=200,o="OK")}catch{e.status===404&&u===""?(a=204,o="No Content"):r={message:u}}if(r&&t.shouldThrowOnError)throw new bk(r)}return{success:r===null,error:r,data:n,count:s,status:a,statusText:o}}returns(){return this}overrideTypes(){return this}},Fz=class extends $z{throwOnError(){return super.throwOnError()}select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const a=s?`${s}.order`:"order",o=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,a=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(a,`${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:r=!1,buffers:n=!1,wal:s=!1,format:a="text"}={}){var o;const l=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${a}; for="${c}"; options=${l};`),a==="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 kk=new RegExp("[,()]");var ho=class extends Fz{throwOnError(){return super.throwOnError()}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 r=Array.from(new Set(t)).map(n=>typeof n=="string"&&kk.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&kk.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),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:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const a=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${a}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>
497r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},Bz=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:s=8e3,retry:a}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=s,this.retry=a}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let a=!1;const o=(e??"*").split("").map(d=>/\s/.test(d)&&!a?"":(d==='"'&&(a=!a),d)).join(""),{url:l,headers:c}=this.cloneRequestState();return l.searchParams.set("select",o),n&&c.append("Prefer",`count=${n}`),new ho({method:s,url:l,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST",{url:a,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),r||o.append("Prefer","missing=default"),Array.isArray(e)){const l=e.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(l.length>0){const c=[...new Set(l)].map(d=>`"${d}"`);a.searchParams.set("columns",c.join(","))}}return new ho({method:s,url:a,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var a;const o="POST",{url:l,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&l.searchParams.set("on_conflict",t),n&&c.append("Prefer",`count=${n}`),s||c.append("Prefer","missing=default"),Array.isArray(e)){const d=e.reduce((u,h)=>u.concat(Object.keys(h)),[]);if(d.length>0){const u=[...new Set(d)].map(h=>`"${h}"`);l.searchParams.set("columns",u.join(","))}}return new ho({method:o,url:l,headers:c,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:a}=this.cloneRequestState();return t&&a.append("Prefer",`count=${t}`),new ho({method:n,url:s,headers:a,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new ho({method:r,url:n,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Sd(e){"@babel/helpers - typeof";return Sd=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},Sd(e)}function Uz(e,t){if(Sd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Sd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vz(e){var t=Uz(e,"string");return Sd(t)=="symbol"?t:t+""}function Hz(e,t,r){return(t=Vz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Iu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sk(Object(r),!0).forEach(function(n){Hz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var zz=class uE{constructor(t,{headers:r={},schema:n,fetch:s,timeout:a,urlLengthLimit:o=8e3,retry:l}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const c=s??globalThis.fetch;a!==void 0&&a>0?this.fetch=(d,u)=>{const h=new AbortController,m=setTimeout(()=>h.abort(),a),f=u==null?void 0:u.signal;if(f){if(f.aborted)return clearTimeout(m),c(d,u);const y=()=>{clearTimeout(m),h.abort()};return f.addEventListener("abort",y,{once:!0}),c(d,Iu(Iu({},u),{},{signal:h.signal})).finally(()=>{clearTimeout(m),f.removeEventListener("abort",y)})}return c(d,Iu(Iu({},u),{},{signal:h.signal})).finally(()=>clearTimeout(m))}:this.fetch=c,this.retry=l}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new Bz(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 uE(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,r={},{head:n=!1,get:s=!1,count:a}={}){var o;let l;const c=new URL(`${this.url}/rpc/${t}`);let d;const u=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(u)),h=n&&Object.values(r).some(u);h?(l="POST",d=r):n||s?(l=n?"HEAD":"GET",Object.entries(r).filter(([f,y])=>y!==void 0).map(([f,y])=>[f,Array.isArray(y)?`{${y.join(",")}}`:`${y}
497`]).forEach(([f,y])=>{c.searchParams.append(f,y)})):(l="POST",d=r);const m=new Headers(this.headers);return h?m.set("Prefer",a?`count=${a},return=minimal`:"return=minimal"):a&&m.set("Prefer",`count=${a}`),new ho({method:l,url:c,headers:m,schema:this.schemaName,body:d,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class Wz{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const n=typeof global<"u"?global:void 0;if(n&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};if(typeof globalThis<"u"&&typeof r.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"&&r.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 a=s.versions;if(a&&a.node){const o=a.node,l=parseInt(o.replace(/^v/,"").split(".")[0]);return l>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${l} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${l} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 498import ws from "ws" 499new 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 r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=` 500 501Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const qz="2.108.2",Gz=`realtime-js/${qz}`,Kz="1.0.0",hE="2.0.0",Yz=hE,Jz=1e4,Qz=100,Xs={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},mE={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},bx={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class Zz{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,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,r,n){var s,a;const o=t.topic,l=(s=t.ref)!==null&&s!==void 0?s:"",c=(a=t.join_ref)!==null&&a!==void 0?a:"",d=t.payload.event,u=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(u).length===0?"":JSON.stringify(u);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`userEvent length ${d.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const m=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+l.length+o.length+d.length+h.length,f=new ArrayBuffer(this.HEADER_LENGTH+m);let y=new DataView(f),x=0;y.setUint8(x++,this.KINDS.userBroadcastPush),y.setUint8(x++,c.length),y.setUint8(x++,l.length),y.setUint8(x++,o.length),y.setUint8(x++,d.length),y.setUint8(x++,h.length),y.setUint8(x++,r),Array.from(c,g=>y.setUint8(x++,g.charCodeAt(0))),Array.from(l,g=>y.setUint8(x++,g.charCodeAt(0))),Array.from(o,g=>y.setUint8(x++,g.charCodeAt(0))),Array.from(d,g=>y.setUint8(x++,g.charCodeAt(0))),Array.from(h,g=>y.setUint8(x++,g.charCodeAt(0)));var b=new Uint8Array(f.byteLength+n.byteLength);return b.set(new Uint8Array(f),0),b.set(new Uint8Array(n),f.byteLength),b.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,a,o,l,c]=n;return r({join_ref:s,ref:a,topic:o,event:l,payload:c})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),a=r.getUint8(2),o=r.getUint8(3),l=r.getUint8(4);let c=this.HEADER_LENGTH+4;const d=n.decode(t.slice(c,c+s));c=c+s;const u=n.decode(t.slice(c,c+a));c=c+a;
501const h=n.decode(t.slice(c,c+o));c=c+o;const m=t.slice(c,t.byteLength),f=l===this.JSON_ENCODING?JSON.parse(n.decode(m)):m,y={type:this.BROADCAST_EVENT,event:u,payload:f};return o>0&&(y.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:d,event:this.BROADCAST_EVENT,payload:y}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}var Ge;(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"})(Ge||(Ge={}));const _k=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((a,o)=>(a[o]=Xz(o,e,t,s),a),{}):{}},Xz=(e,t,r,n)=>{const s=t.find(l=>
vendor: 5,523 bytes, line 501
501l.name===e),a=s==null?void 0:s.type,o=r[e];return a&&!n.includes(a)?fE(a,o):jx(o)},fE=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return nW(t,r)}switch(e){case Ge.bool:return eW(t);case Ge.float4:case Ge.float8:case Ge.int2:case Ge.int4:case Ge.int8:case Ge.numeric:case Ge.oid:return tW(t);case Ge.json:case Ge.jsonb:return rW(t);case Ge.timestamp:return sW(t);case Ge.abstime:case Ge.date:case Ge.daterange:case Ge.int4range:case Ge.int8range:case Ge.money:case Ge.reltime:case Ge.text:case Ge.time:case Ge.timestamptz:case Ge.timetz:case Ge.tsrange:case Ge.tstzrange:return jx(t);default:return jx(t)}},jx=e=>e,eW=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},tW=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},rW=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},nW=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let a;const o=e.slice(1,r);try{a=JSON.parse("["+o+"]")}catch{a=o?o.split(","):[]}return a.map(l=>fE(t,l))}return e},sW=e=>typeof e=="string"?e.replace(" ","T"):e,pE=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 Hc=e=>typeof e=="function"?e:function(){return e},iW=typeof self<"u"?self:null,mo=typeof window<"u"?window:null,Tn=iW||mo||globalThis,aW="2.0.0",oW=1e4,lW=1e3,On={connecting:0,open:1,closing:2,closed:3},dr={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"},kx={longpoll:"longpoll",websocket:"websocket"},cW={complete:4},Sx="base64url.bearer.phx.",Ou=class{constructor(e,t,r,n){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,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:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.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})}},gE=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))}},dW=class{constructor(e,t,r){this.state=dr.closed,this.topic=e,this.params=Hc(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Ou(this,is.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new gE(()=>{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=dr.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=dr.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=dr.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=dr.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 Ou(this,is.leave,Hc({}),this.timeout).send(),this.state=dr.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(is.reply,(n,s)=>{this.trigger(this.replyEventName(s),n)})}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 501
501teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=dr.closed,this.bindings=[]}onClose(e){this.on(is.close,e)}onError(e){return this.on(is.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=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 n=new Ou(this,e,function(){return t},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=dr.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(is.close,"leave")},r=new Ou(this,is.leave,Hc({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,n){return this.topic!==e?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=dr.joining,this.joinPush.resend(e))}trigger(e,t,r,n){let s=this.onMessage(e,t,r,n);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let a=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,r));for(let o=0;o<a.length;o++)a[o].callback(s,r,n||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===dr.closed}isErrored(){return this.state===dr.errored}isJoined(){return this.state===dr.joined}isJoining(){return this.state===dr.joining}isLeaving(){return this.state===dr.leaving}},dm=class{static request(e,t,r,n,s,a,o){if(Tn.XDomainRequest){let l=new Tn.XDomainRequest;return this.xdomainRequest(l,e,t,n,s,a,o)}else if(Tn.XMLHttpRequest){let l=new Tn.XMLHttpRequest;return this.xhrRequest(l,e,t,r,n,s,a,o)}else{if(Tn.fetch&&Tn.AbortController)return this.fetchRequest(e,t,r,n,s,a,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,n,s,a,o){let l={method:e,headers:r,body:n},c=null;return s&&(c=new AbortController,setTimeout(()=>c.abort(),s),l.signal=c.signal),Tn.fetch(t,l).then(d=>d.text()).then(d=>this.parseJSON(d)).then(d=>o&&o(d)).catch(d=>{d.name==="AbortError"&&a?a():o&&o(null)}),c}static xdomainRequest(e,t,r,n,s,a,o){return e.timeout=s,e.open(t,r),e.onload=()=>{let l=this.parseJSON(e.responseText);o&&o(l)},a&&(e.ontimeout=a),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,r,n,s,a,o,l){e.open(t,r,!0),e.timeout=a;for(let[c,d]of Object.entries(n))e.setRequestHeader(c,d);return e.onerror=()=>l&&l(null),e.onreadystatechange=()=>{if(e.readyState===cW.complete&&l){let c=this.parseJSON(e.responseText);l(c)}},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 r=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let s=t?`${t}[${n}]`:n,a=e[n];typeof a=="object"?r.push(this.serialize(a,s)):r.push(encodeURIComponent(s)+"="+encodeURIComponent(a))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},uW=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let s=0;s<n;s++)t+=String.fromCharCode(r[s]);return btoa(t)},ro=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Sx)&&(this.authToken=atob(t[1].slice(Sx.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=On.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+kx.websocket),"$1/"+kx.longpoll)}endpointURL(){return dm.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=On.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===On.open||this.readyState===On.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:r,token:n,messages:s}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else r=0;switch(r){case 200:s.forEach(a=>{setTimeout(()=>this.onmessage({data:a}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=On.open,this.onopen({}),this.poll();break;
501case 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 ${r}`)}})}send(e){typeof e!="string"&&(e=uW(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(` 502`),()=>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,r){for(let s of this.reqs)s.abort();this.readyState=On.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,r,n,s){let a,o=()=>{this.reqs.delete(a),n()};a=dm.request(e,this.endpointURL(),t,r,this.timeout,o,l=>{this.reqs.delete(a),this.isActive()&&s(l)}),this.reqs.add(a)}},hW=class Sc{constructor(t,r={}){let n=r.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(n.state,s=>{let{onJoin:a,onLeave:o,onSync:l}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Sc.syncState(this.state,s,a,o),this.pendingDiffs.forEach(c=>{this.state=Sc.syncDiff(this.state,c,a,o)}),this.pendingDiffs=[],l()}),this.channel.on(n.diff,s=>{let{onJoin:a,onLeave:o,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Sc.syncDiff(this.state,s,a,o),l())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Sc.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,n,s){let a=this.clone(t),o={},l={};return this.map(a,(c,d)=>{r[c]||(l[c]=d)}),this.map(r,(c,d)=>{let u=a[c];if(u){let h=d.metas.map(x=>x.phx_ref),m=u.metas.map(x=>x.phx_ref),f=d.metas.filter(x=>m.indexOf(x.phx_ref)<0),y=u.metas.filter(x=>h.indexOf(x.phx_ref)<0);f.length>0&&(o[c]=d,o[c].metas=f),y.length>0&&(l[c]=this.clone(u),l[c].metas=y)}else o[c]=d}),this.syncDiff(a,{joins:o,leaves:l},n,s)}static syncDiff(t,r,n,s){let{joins:a,leaves:o}=this.clone(r);return n||(n=function(){}),s||(s=function(){}),this.map(a,(l,c)=>{let d=t[l];if(t[l]=this.clone(c),d){let u=t[l].metas.map(m=>m.phx_ref),h=d.metas.filter(m=>u.indexOf(m.phx_ref)<0);t[l].metas.unshift(...h)}n(l,d,c)}),this.map(o,(l,c)=>{let d=t[l];if(!d)return;let u=c.metas.map(h=>h.phx_ref);d.metas=d.metas.filter(h=>u.indexOf(h.phx_ref)<0),s(l,d,c),d.metas.length===0&&delete t[l]}),t}static list(t,r){return r||(r=function(n,s){return s}),this.map(t,(n,s)=>r(n,s))}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Mu={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 r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,n,s,a,o]=JSON.parse(e);return t({join_ref:r,ref:n,topic:s,event:a,payload:o})}},binaryEncode(e){let{join_ref:t,ref:r,event:n,topic:s,payload:a}=e,o=this.META_LENGTH+t.length+r.length+s.length+n.length,l=new ArrayBuffer(this.HEADER_LENGTH+o),c=new DataView(l),d=0;c.setUint8(d++,this.KINDS.push),c.setUint8(d++,t.length),c.setUint8(d++,r.length),c.setUint8(d++,s.length),c.setUint8(d++,n.length),Array.from(t,h=>c.setUint8(d++,h.charCodeAt(0))),Array.from(r,h=>c.setUint8(d++,h.charCodeAt(0))),Array.from(s,h=>c.setUint8(d++,h.charCodeAt(0))),Array.from(n,h=>c.setUint8(d++,h.charCodeAt(0)));var u=new Uint8Array(l.byteLength+a.byteLength);return u.set(new Uint8Array(l),0),u.set(new Uint8Array(a),l.byteLength),u.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;
vendor: 8,661 bytes, line 502
502switch(r){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),a=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,l=r.decode(e.slice(o,o+n));o=o+n;let c=r.decode(e.slice(o,o+s));o=o+s;let d=r.decode(e.slice(o,o+a));o=o+a;let u=e.slice(o,e.byteLength);return{join_ref:l,ref:null,topic:c,event:d,payload:u}},decodeReply(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),l=this.HEADER_LENGTH+this.META_LENGTH,c=r.decode(e.slice(l,l+n));l=l+n;let d=r.decode(e.slice(l,l+s));l=l+s;let u=r.decode(e.slice(l,l+a));l=l+a;let h=r.decode(e.slice(l,l+o));l=l+o;let m=e.slice(l,e.byteLength),f={status:h,response:m};return{join_ref:c,ref:d,topic:u,event:is.reply,payload:f}},decodeBroadcast(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),a=this.HEADER_LENGTH+2,o=r.decode(e.slice(a,a+n));a=a+n;let l=r.decode(e.slice(a,a+s));a=a+s;let c=e.slice(a,e.byteLength);return{join_ref:null,ref:null,topic:o,event:l,payload:c}}},mW=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||oW,this.transport=t.transport||Tn.WebSocket||ro,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=Tn&&Tn.sessionStorage}catch{}this.sessionStore=t.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=Mu.encode.bind(Mu),this.defaultDecoder=Mu.decode.bind(Mu),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!==ro?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;mo&&mo.addEventListener&&(mo.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),n=this.connectClock)}),mo.addEventListener("pageshow",s=>{n===this.connectClock&&(n=null,this.connect())}),mo.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,a,o)=>{console.log(`${s}: ${a}`,o)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Hc(t.params||{}),this.endPoint=`${e}/${kx.websocket}`,this.vsn=t.vsn||aW,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new gE(()=>{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 ro}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=dm.appendParams(dm.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,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Hc(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ro?this.connectWithFallback(ro,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}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(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage(s=>{s.ref===t&&(this.off([n]),e(Date.now()-r))});return!0}transportName(e){switch(e){case ro:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Sx}${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 r=!1,n=!0,s,a,o=this.transportName(e),l=c=>{this.log("transport",`falling back to ${o}...`,c),this.off([s,a]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return l("memorized");this.fallbackTimer=setTimeout(l,t),a=this.onError(c=>{this.log("transport","error",c),n&&!r&&(clearTimeout(this.fallbackTimer),l(c))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let c=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${c}`,"true"),this.log("transport",`established ${c} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(l,t),this.ping(c=>{this.log("transport","connected to primary after",c),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(),lW,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const n=this.conn;this.waitForBufferDone(n,()=>{t?n.close(t,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===On.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}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,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError(e)}
vendor: 4,126 bytes, line 502
502triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(is.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case On.connecting:return"connecting";case On.open:return"open";case On.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(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new dW(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:n,ref:s,join_ref:a}=e;this.log("push",`${t} ${r} (${a}, ${s})`,n)}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:r,event:n,payload:s,ref:a,join_ref:o}=t;if(a&&a===this.pendingHeartbeatRef){const l=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",l)}catch(c){this.log("error","error in heartbeat callback",c)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${r} ${n} ${a&&"("+a+")"||""}`.trim(),s);for(let l=0;l<this.channels.length;l++){const c=this.channels[l];c.isMember(r,n,s,o)&&c.trigger(n,s,a,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,n])=>{try{n(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class zc{constructor(t,r){const n=pW(r);this.presence=new hW(t.getChannel(),n),this.presence.onJoin((s,a,o)=>{const l=zc.onJoinPayload(s,a,o);t.getChannel().trigger("presence",l)}),this.presence.onLeave((s,a,o)=>{const l=zc.onLeavePayload(s,a,o);t.getChannel().trigger("presence",l)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return zc.transformState(this.presence.state)}static transformState(t){return t=fW(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return r[n]=vh(s),r},{})}static onJoinPayload(t,r,n){const s=Nk(r),a=vh(n);return{event:"join",key:t,currentPresences:s,newPresences:a}}static onLeavePayload(t,r,n){const s=Nk(r),a=vh(n);return{event:"leave",key:t,currentPresences:s,leftPresences:a}}}function vh(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function fW(e){return JSON.parse(JSON.stringify(e))}function pW(e){return(e==null?void 0:e.events)&&{events:e.events}}function Nk(e){return e!=null&&e.metas?vh(e):[]}var Ck;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Ck||(Ck={}));class gW{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new zc(this.channel.channelAdapter,r)}}function yW(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
502if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const r=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${r}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class xW{constructor(t,r,n){const s=vW(n);this.channel=t.getSocket().channel(r,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,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}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,r,n){let s;try{s=this.channel.push(t,r,n)}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>Qz){const a=this.channel.pushBuffer.shift();a.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${a.event}`,a.payload())}return s}updateJoinPayload(t){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===Xs.joined}isJoined(){return this.state===Xs.joined}isJoining(){return this.state===Xs.joining}isClosed(){return this.state===Xs.closed}isLeaving(){return this.state===Xs.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function vW(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var Ak;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Ak||(Ak={}));var Io;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Io||(Io={}));var as;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(as||(as={}));class Wc{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,r={config:{}},n){var s,a;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new xW(this.socket.socketAdapter,t,this.params),this.presence=new gW(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=pE(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((a=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||a===void 0)&&a.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,r=this.timeout){var n,s,a;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:l,private:c}}=this.params,d=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(f=>f.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[Io.PRESENCE]&&this.bindings[Io.PRESENCE].length>0||((a=this.params.config.presence)===null||a===void 0?void 0:a.enabled)===!0,h={},m={broadcast:o,presence:Object.assign(Object.assign({},l),{enabled:u}),postgres_changes:d,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(f=>{t==null||t(as.CHANNEL_ERROR,yW(f))}),this._onClose(()=>t==null?void 0:t(as.CLOSED)),this.updateJoinPayload(Object.assign({config:m},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:f})=>{if(this.socket._isManualToken()||this.socket.setAuth(),f===void 0){t==null||t(as.SUBSCRIBED);return}this._updatePostgresBindings(f,t)}).receive("error",f=>{this.state=Xs.errored;const y=Object.values(f).join(", ")||"error";t==null||t(as.CHANNEL_ERROR,new Error(y,{cause:f}))}).receive("timeout",()=>{t==null||t(as.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var n;const s=this.bindings.postgres_changes,a=(n=s==null?void 0:s.length)!==null&&n!==void 0?n:0,o=[];for(let l=0;l<a;l++){const c=s[l],{filter:{event:d,schema:u,table:h,filter:m}}=c,f=t&&t[l];if(f&&f.event===d&&Wc.isFilterValueEqual(f.schema,u)&&Wc.isFilterValueEqual(f.table,h)&&Wc.isFilterValueEqual(f.filter,m))o.push(Object.assign(Object.assign({},c),{id:f.id}));else{this.unsubscribe(),this.state=Xs.errored,r==null||r(as.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Xs.errored&&r&&r(as.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),a=t===Io.PRESENCE||t===Io.POSTGRES_CHANGES;if(s&&a)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,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const a=r instanceof ArrayBuffer||ArrayBuffer.isView(r),o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":a?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l=new URL(this.broadcastEndpointURL);l.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&l.searchParams.set("private","true");const c={method:"POST",headers:o,body:a?r:JSON.stringify(r)},d=await this._fetchWithTimeout(l.toString(),c,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(d.status===202)return{success:!0};if(d.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realt
502ime-js/migrations/httpsend-server-version.md"));let u=d.statusText;try{const h=await d.json();u=h.error||h.message||u}catch{}return Promise.reject(new Error(u))}async send(t,r={}){var n,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:a,payload:o}=t,l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:l,body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:o,private:this.private}]})};try{const d=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=d.body)===null||s===void 0?void 0:s.cancel()),d.ok?"ok":"error"}catch(d){return d instanceof Error&&d.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var o,l,c;const d=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(o=this.params)===null||o===void 0?void 0:o.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&a("ok"),d.receive("ok",()=>a("ok")),d.receive("error",()=>a("error")),d.receive("timeout",()=>a("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,n){const s=new AbortController,a=setTimeout(()=>s.abort(),n),o=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(a),o}_on(t,r,n){const s=t.toLocaleLowerCase(),a=this.channelAdapter.on(t,n),o={type:s,filter:r,callback:n,ref:a};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,r,n)=>{var s,a,o,l,c,d,u;const h=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(h,n))return!1;const m=(s=this.bindings[h])===null||s===void 0?void 0:s.find(f=>f.ref===t.ref);if(!m)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in m){const f=m.id,y=(a=m.filter)===null||a===void 0?void 0:a.event;return f&&((o=r.ids)===null||o===void 0?void 0:o.includes(f))&&(y==="*"||(y==null?void 0:y.toLocaleLowerCase())===((l=r.data)===null||l===void 0?void 0:l.type.toLocaleLowerCase()))}else{const f=(d=(c=m==null?void 0:m.filter)===null||c===void 0?void 0:c.event)===null||d===void 0?void 0:d.toLocaleLowerCase();return f==="*"||f===((u=r==null?void 0:r.event)===null||u===void 0?void 0:u.toLocaleLowerCase())}else return m.type.toLocaleLowerCase()===h})}_notThisChannelEvent(t,r){const{close:n,error:s,leave:a,join:o}=mE;return r&&[n,s,a,o].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,n)=>{if(typeof r=="object"&&"ids"in r){const s=r.data,{schema:a,table:o,commit_timestamp:l,type:c,errors:d}=s;return Object.assign(Object.assign({},{schema:a,table:o,commit_timestamp:l,eventType:c,new:{},old:{},errors:d}),this._getPayloadRecords(s))}return r})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in t.bindings)for(const n of t.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=_k(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=_k(t.columns,t.old_record)),r}}class wW{constructor(t,r){this.socket=new mW(t,r)}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,r,n,s=1e4){return new Promise(a=>{setTimeout(()=>a("timeout"),s),this.socket.disconnect(()=>{t(),a("ok")},r,n)})}push(t){this.socket.push(t)}log(t,r,n){this.socket.log(t,r,n)}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()==bx.connecting}isDisconnecting(){return this.socket.connectionState()==bx.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Tk={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},bW=[1e3,2e3,5e3,1e4],jW=1e4;function kW(){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 r;return(r=Array.from(e.keys())[t])!==null&&r!==void 0?r:null},removeItem(t){e.delete(t)},setItem(t,r){e.set(t,String(r))}}}function SW(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return kW()}const _W=` 503 addEventListener("message", (e) => { 504 if (e.data.event === "start") { 505 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 506 } 507 });`;class NW{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,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
507,this.ref=0,this.serializer=new Zz,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=a=>a?(...o)=>a(...o):(...o)=>fetch(...o),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const s=this._initializeOptions(r);this.socketAdapter=new wW(t,s),this.httpEndpoint=pE(t),this.fetch=this._resolveFetch(r==null?void 0:r.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 r=t.message;throw r.includes("Node.js")?new Error(`${r} 508 509To use Realtime in Node.js, you need to provide a WebSocket implementation: 510 511Option 1: Use Node.js 22+ which has native WebSocket support 512Option 2: Install and provide the "ws" package: 513 514 npm install ws 515 516 import ws from "ws" 517 const client = new RealtimeClient(url, { 518 ...options, 519 transport: ws 520 })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),r}async removeAllChannels(){const t=this.channels.map(async n=>{const s=await n.unsubscribe();return n.teardown(),s}),r=await Promise.all(t);return await this.disconnect(),r}log(t,r,n){this.socketAdapter.log(t,r,n)}connectionState(){return this.socketAdapter.connectionState()||bx.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(a=>a.topic===n);if(s)return s;{const a=new Wc(`realtime:${t}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(a),a}}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(r=>r.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}
520this._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 r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const a={access_token:r,version:Gz};r&&s.updateJoinPayload(a),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(mE.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),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(r,n)=>{r=="sent"&&this._setAuthSafely(),t&&t(r,n)}}_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=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.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 r;if(t)r=t;else{const n=new Blob([_W],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,s,a,o,l,c,d,u,h,m,f;this.worker=(r=t==null?void 0:t.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=t==null?void 0:t.accessToken)!==null&&n!==void 0?n:null;const y={};y.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:Jz,y.heartbeatIntervalMs=(a=t==null?void 0:t.heartbeatIntervalMs)!==null&&a!==void 0?a:Tk.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=t==null?void 0:t.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((l=t==null?void 0:t.heartbeatIntervalMs)!==null&&l!==void 0?l:Tk.HEARTBEAT_INTERVAL),y.transport=(c=t==null?void 0:t.transport)!==null&&c!==void 0?c:Wz.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=(d=t==null?void 0:t.sessionStorage)!==null&&d!==void 0?d:SW(),y.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:v=>bW[v-1]||jW;let x,b;const g=(h=t==null?void 0:t.vsn)!==null&&h!==void 0?h:Yz;switch(g){case Kz:x=(v,w)=>w(JSON.stringify(v)),b=(v,w)=>w(JSON.parse(v));break;case hE:x=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=g,y.encode=(m=t==null?void 0:t.encode)!==null&&m!==void 0?m:x,y.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f: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()}}
520var _d=class extends Error{constructor(e,t){var r;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)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function CW(e,t,r){const n=new URL(t,e);if(r)for(const[s,a]of Object.entries(r))a!==void 0&&n.searchParams.set(s,a);return n.toString()}async function AW(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 TW(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:a,headers:o}){const l=CW(e.baseUrl,n,s),c=await AW(e.auth),d=await t(l,{method:r,headers:{...a?{"Content-Type":"application/json"}:{},...c,...o},body:a?JSON.stringify(a):void 0}),u=await d.text(),h=(d.headers.get("content-type")||"").includes("application/json"),m=h&&u?JSON.parse(u):u;if(!d.ok){const f=h?m:void 0,y=f==null?void 0:f.error;throw new _d((y==null?void 0:y.message)??`Request failed with status ${d.status}`,{status:d.status,icebergType:y==null?void 0:y.type,icebergCode:y==null?void 0:y.code,details:f})}return{status:d.status,headers:d.headers,data:m}}}}function Du(e){return e.join("�")}var EW=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Du(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Du(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Du(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Du(e.namespace)}`}),!0}catch(t){if(t instanceof _d&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof _d&&r.status===409)return;throw r}}};function no(e){return e.join("�")}var RW=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${no(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${no(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${no(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${no(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/${no(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/${no(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof _d&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof _d&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},PW=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=TW({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new EW(this.client,t),this.tableOps=new RW(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)}
520async 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 Nd(e){"@babel/helpers - typeof";return Nd=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},Nd(e)}function IW(e,t){if(Nd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Nd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OW(e){var t=IW(e,"string");return Nd(t)=="symbol"?t:t+""}function MW(e,t,r){return(t=OW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ek(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ek(Object(r),!0).forEach(function(n){MW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ek(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var bf=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function jf(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var _x=class extends bf{constructor(e,t,r,n="storage"){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return fe({},super.toJSON())}},yE=class extends bf{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function um(e,t,r){const n=fe({},e),s=t.toLowerCase();for(const a of Object.keys(n))a.toLowerCase()===s&&delete n[a];return n[s]=r,n}function DW(e){const t={};for(const[r,n]of Object.entries(e))t[r.toLowerCase()]=n;return t}const LW=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),$W=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)},Nx=e=>{if(Array.isArray(e))return e.map(r=>Nx(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));t[s]=Nx(n)}),t},FW=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Rk=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 r=t.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(e)},BW=async(e,t,r,n)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const s=e;let a=parseInt(String(s.status),10);Number.isFinite(a)||(a=500),s.json().then(o=>{const l=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||a+"";t(new _x(Rk(o),a,l,n))}).catch(()=>{const o=a+"";t(new _x(s.statusText||`HTTP ${a} error`,a,o,n))})}else t(new yE(Rk(e),e,n))},UW=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!n)return fe(fe({},s),r);if($W(n)){var a;const o=(t==null?void 0:t.headers)||{};let l;for(const[c,d]of Object.entries(o))c.toLowerCase()==="content-type"&&(l=d);s.headers=um(o,"Content-Type",(a=l)!==null&&a!==void 0?a:"application/json"),s.body=JSON.stringify(n)}else s.body=n;return t!=null&&t.duplex&&(s.duplex=t.duplex),fe(fe({},s),r)};async function mc(e,t,r,n,s,a,o){return new Promise((l,c)=>{e(r,UW(t,n,s,a)).then(d=>{if(!d.ok)throw d;if(n!=null&&n.noResolveJson)return d;if(o==="vectors"){const u=d.headers.get("content-type");if(d.headers.get("content-length")==="0"||d.status===204)return{};if(!u||!u.includes("application/json"))return{}}return d.json()}).then(d=>l(d)).catch(d=>BW(d,c,n,o))})}function xE(e="storage"){return{get:async(t,r,n,s)=>mc(t,"GET",r,n,s,void 0,e),post:async(t,r,n,s,a)=>mc(t,"POST",r,s,a,n,e),put:async(t,r,n,s,a)=>mc(t,"PUT",r,s,a,n,e),head:async(t,r,n,s)=>mc(t,"HEAD",r,fe(fe({},n),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,r,n,s,a)=>mc(t,"DELETE",r,s,a,n,e)}}const VW=xE("storage"),{get:Cd,post:on,put:Cx,head:HW,remove:ob}=VW,kr=xE("vectors");var Hl=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=DW(t),this.fetch=LW(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=um(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(jf(r))return{data:null,error:r};throw r}}};let vE;vE=Symbol.toStringTag;var zW=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[vE]="StreamDownloadBuilder",this.promise=null}
520then(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 e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(jf(t))return{data:null,error:t};throw t}}};let wE;wE=Symbol.toStringTag;var WW=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[wE]="BlobDownloadBuilder",this.promise=null}asStream(){return new zW(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(jf(t))return{data:null,error:t};throw t}}};const qW={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Pk={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var GW=class extends Hl{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var s=this;return s.handleOperation(async()=>{let a;const o=fe(fe({},Pk),n);let l=fe(fe({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const c=o.metadata;if(typeof Blob<"u"&&r instanceof Blob?(a=new FormData,a.append("cacheControl",o.cacheControl),c&&a.append("metadata",s.encodeMetadata(c)),a.append("",r)):typeof FormData<"u"&&r instanceof FormData?(a=r,a.has("cacheControl")||a.append("cacheControl",o.cacheControl),c&&!a.has("metadata")&&a.append("metadata",s.encodeMetadata(c))):(a=r,l["cache-control"]=`max-age=${o.cacheControl}`,l["content-type"]=o.contentType,c&&(l["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(typeof ReadableStream<"u"&&a instanceof ReadableStream||a&&typeof a=="object"&&"pipe"in a&&typeof a.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers)for(const[m,f]of Object.entries(n.headers))l=um(l,m,f);const d=s._removeEmptyFolders(t),u=s._getFinalPath(d),h=await(e=="PUT"?Cx:on)(s.fetch,`${s.url}/object/${u}`,a,fe({headers:l},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:d,id:h.Id,fullPath:h.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const a=s._removeEmptyFolders(e),o=s._getFinalPath(a),l=new URL(s.url+`/object/upload/sign/${o}`);return l.searchParams.set("token",t),s.handleOperation(async()=>{let c;const d=fe(fe({},Pk),n);let u=fe(fe({},s.headers),{"x-upsert":String(d.upsert)});const h=d.metadata;if(typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",d.cacheControl),h&&c.append("metadata",s.encodeMetadata(h)),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.has("cacheControl")||c.append("cacheControl",d.cacheControl),h&&!c.has("metadata")&&c.append("metadata",s.encodeMetadata(h))):(c=r,u["cache-control"]=`max-age=${d.cacheControl}`,u["content-type"]=d.contentType,h&&(u["x-metadata"]=s.toBase64(s.encodeMetadata(h))),(typeof ReadableStream<"u"&&c instanceof ReadableStream||c&&typeof c=="object"&&"pipe"in c&&typeof c.pipe=="function")&&!d.duplex&&(d.duplex="half")),n!=null&&n.headers)for(const[m,f]of Object.entries(n.headers))u=um(u,m,f);return{path:a,fullPath:(await Cx(s.fetch,l.toString(),c,fe({headers:u},d!=null&&d.duplex?{duplex:d.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const s=fe({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const a=await on(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),o=new URL(r.url+a.url),l=o.searchParams.get("token");if(!l)throw new bf("No token returned by API");return{signedUrl:o.toString(),path:e,token:l}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;return n.handleOperation(async()=>await on(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
520stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await on(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(e,t,r){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(e);const a=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let o=await on(n.fetch,`${n.url}/object/sign/${s}`,fe({expiresIn:t},a?{transform:r.transform}:{}),{headers:n.headers});const l=new URLSearchParams;r!=null&&r.download&&l.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&l.set("cacheNonce",String(r.cacheNonce));const c=l.toString();return{signedUrl:encodeURI(`${n.url}${o.signedURL}${c?`&${c}`:""}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const s=await on(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),a=new URLSearchParams;r!=null&&r.download&&a.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&a.set("cacheNonce",String(r.cacheNonce));const o=a.toString();return s.map(l=>fe(fe({},l),{},{signedUrl:l.signedURL?encodeURI(`${n.url}${l.signedURL}${o?`&${o}`:""}`):null}))})}download(e,t,r){const n=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 a=s.toString(),o=this._getFinalPath(e),l=()=>Cd(this.fetch,`${this.url}/${n}/${o}${a?`?${a}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new WW(l,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>Nx(await Cd(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await HW(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(jf(s)){var n;const a=s instanceof _x?s.status:s instanceof yE?(n=s.originalError)===null||n===void 0?void 0:n.status:void 0;if(a!==void 0&&[400,404].includes(a))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=new URLSearchParams;t!=null&&t.download&&n.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(n,t.transform),(t==null?void 0:t.cacheNonce)!=null&&n.set("cacheNonce",String(t.cacheNonce));const s=n.toString(),a=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}/${a}/public/${r}`)+(s?`?${s}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await ob(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const s=fe(fe(fe({},qW),t),{},{prefix:e||""});return await on(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=fe({},e);return await on(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.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 KW="2.108.2",eu={"X-Client-Info":`storage-js/${KW}`};var YW=class extends Hl{constructor(e,t={},r,n){const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const a=s.href.replace(/\/$/,""),o=fe(fe({},eu),t);super(a,o,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await Cd(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Cd(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await on(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await Cx(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await on(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ob(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():""}},JW=class extends Hl{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=fe(fe({},eu),t);super(n,s,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await on(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
520{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return await Cd(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ob(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!FW(e))throw new bf("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 r=new PW({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,a){const o=s[a];return typeof o!="function"?o:async(...l)=>{try{return{data:await o.apply(s,l),error:null}}catch(c){if(n)throw c;return{data:null,error:c}}}}})}},QW=class extends Hl{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=fe(fe({},eu),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await kr.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await kr.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await kr.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await kr.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},ZW=class extends Hl{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=fe(fe({},eu),{},{"Content-Type":"application/json"},t);super(n,s,r,"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 kr.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await kr.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 kr.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await kr.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 kr.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},XW=class extends Hl{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=fe(fe({},eu),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await kr.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await kr.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await kr.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await kr.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},e9=class extends XW{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new t9(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},t9=class extends QW{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName}))}
520async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new r9(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},r9=class extends ZW{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,fe(fe({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},n9=class extends YW{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new GW(this.url,this.headers,e,this.fetch)}get vectors(){return new e9(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new JW(this.url+"/iceberg",this.headers,this.fetch)}};function kf(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}const bE="2.108.2",os=30*1e3,_c=3,Jp=_c*os,s9=2*os,i9="http://localhost:9999",a9="supabase.auth.token",o9={"X-Client-Info":`gotrue-js/${bE}`},Ax="X-Supabase-Api-Version",jE={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},l9=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,c9=10*60*1e3;
520class Ad extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function G(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class d9 extends Ad{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function u9(e){return G(e)&&e.name==="AuthApiError"}class hn extends Ad{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class Qn extends Ad{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class Tt extends Qn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Lu(e){return G(e)&&e.name==="AuthSessionMissingError"}class so extends Qn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class $u extends Qn{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Fu extends Qn{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function h9(e){return G(e)&&e.name==="AuthImplicitGrantRedirectError"}class Ik extends Qn{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class m9 extends Qn{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 Tx extends Qn{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Ok(e){return G(e)&&e.name==="AuthRetryableFetchError"}class Mk extends Qn{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function f9(e){return G(e)&&e.name==="AuthRefreshDiscardedError"}class Dk extends Qn{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class hm extends Qn{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const mm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Lk=` 521\r=`.split(""),p9=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Lk.length;t+=1)e[Lk[t].charCodeAt(0)]=-2;for(let t=0;t<mm.length;t+=1)e[mm[t].charCodeAt(0)]=t;return e})();function $k(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(mm[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(mm[n]),t.queuedBits-=6}}function kE(e,t,r){const n=p9[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Fk(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},a=o=>{x9(o,n,r)};for(let o=0;o<e.length;o+=1)kE(e.charCodeAt(o),s,a);return t.join("")}function g9(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 y9(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}g9(n,t)}}function x9(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;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&&r(t.codepoint)}}function Ko(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;
521s+=1)kE(e.charCodeAt(s),r,n);return new Uint8Array(t)}function v9(e){const t=[];return y9(e,r=>t.push(r)),new Uint8Array(t)}function ua(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>$k(s,r,n)),$k(null,r,n),t.join("")}function w9(e){return Math.round(Date.now()/1e3)+e}function b9(){return Symbol("auth-callback")}const Wt=()=>typeof window<"u"&&typeof document<"u",Zi={tested:!1,writable:!1},SE=()=>{if(!Wt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Zi.tested)return Zi.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Zi.tested=!0,Zi.writable=!0}catch{Zi.tested=!0,Zi.writable=!1}return Zi.writable};function j9(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,a)=>{t[a]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const _E=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),k9=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",fo=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},tn=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return null}},yt=async(e,t)=>{await e.removeItem(t)};class Sf{constructor(){this.promise=new Sf.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Sf.promiseConstructor=Promise;function Bu(e){const t=e.split(".");if(t.length!==3)throw new hm("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!l9.test(t[n]))throw new hm("JWT not in base64url format");return{header:JSON.parse(Fk(t[0])),payload:JSON.parse(Fk(t[1])),signature:Ko(t[2]),raw:{header:t[0],payload:t[1]}}}async function S9(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function _9(e,t){return new Promise((n,s)=>{(async()=>{for(let a=0;a<1/0;a++)try{const o=await e(a);if(!t(a,null,o)){n(o);return}}catch(o){if(!t(a,o)){s(o);return}}})()})}function N9(e){return("0"+e.toString(16)).substr(-2)}function C9(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let a=0;a<56;a++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,N9).join("")}async function A9(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(a=>String.fromCharCode(a)).join("")}async function T9(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 r=await A9(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Xi(e,t,r=!1){const n=C9();let s=n;r&&(s+="/recovery"),await fo(e,`${t}-code-verifier`,s);const a=await T9(n);return[a,n===a?"plain":"s256"]}const E9=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function R9(e){const t=e.headers.get(Ax);if(!t||!t.match(E9))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function P9(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 I9(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 O9=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function rs(e){if(!O9.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function nn(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 Qp(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="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 "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function M9(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
521if(typeof n=="symbol"){const a=n.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)"||a==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="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(r,n,s)}})}function Bk(e){return JSON.parse(JSON.stringify(e))}const na=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)},D9=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function Uk(e){var t;if(!k9(e))throw new Tx(na(e),0);if(D9.includes(e.status))throw new Tx(na(e),e.status);let r;try{r=await e.json()}catch(a){throw new hn(na(a),a)}let n;const s=R9(e);if(s&&s.getTime()>=jE["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new Dk(na(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Tt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((a,o)=>a&&typeof o=="string",!0))throw new Dk(na(r),e.status,r.weak_password.reasons);throw new d9(na(r),e.status||500,n)}const L9=(e,t,r,n)=>{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(n),Object.assign(Object.assign({},s),r))};async function te(e,t,r,n){var s;const a=Object.assign({},n==null?void 0:n.headers);a[Ax]||(a[Ax]=jE["2024-01-01"].name),n!=null&&n.jwt&&(a.Authorization=`Bearer ${n.jwt}`);const o=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const l=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",c=await $9(e,t,r+l,{headers:a,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(c):{data:Object.assign({},c),error:null}}async function $9(e,t,r,n,s,a){const o=L9(t,n,s,a);let l;try{l=await e(r,Object.assign({},o))}catch(c){throw console.error(c),new Tx(na(c),0)}if(l.ok||await Uk(l),n!=null&&n.noResolveJson)return l;try{return await l.json()}catch(c){await Uk(c)}}function Ir(e){var t;let r=null;U9(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=w9(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:typeof(e==null?void 0:e.id)=="string"?e:null;return{data:{session:r,user:n},error:null}}function Vk(e){const t=Ir(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((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function ei(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function F9(e){return{data:e,error:null}}function B9(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:a}=e,o=kf(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:a},c=Object.assign({},o);return{data:{properties:l,user:c},error:null}}function Hk(e){return e}function U9(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Zp=["global","local","others"];class V9{constructor({url:t="",headers:r={},fetch:n,experimental:s}){this.url=t,this.headers=r,this.fetch=_E(n),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)}}
vendor: 4,766 bytes, line 521
521async signOut(t,r=Zp[0]){if(Zp.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Zp.join(", ")}`);try{return await te(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(G(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await te(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:ei})}catch(n){if(G(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=kf(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await te(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:B9,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(G(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await te(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:ei})}catch(r){if(G(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,a,o,l,c;try{const d={nextPage:null,lastPage:0,total:0},u=await te(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:""},xform:Hk});if(u.error)throw u.error;const h=await u.json(),m=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(c=(l=u.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return f.length>0&&(f.forEach(y=>{const x=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(y.split(";")[1].split("=")[1]);d[`${b}Page`]=x}),d.total=parseInt(m)),{data:Object.assign(Object.assign({},h),d),error:null}}catch(d){if(G(d))return{data:{users:[]},error:d};throw d}}async getUserById(t){rs(t);try{return await te(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:ei})}catch(r){if(G(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){rs(t);try{return await te(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:ei})}catch(n){if(G(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){rs(t);try{return await te(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:ei})}catch(n){if(G(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){rs(t.userId);try{const{data:r,error:n}=await te(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(G(r))return{data:null,error:r};throw r}}async _deleteFactor(t){rs(t.userId),rs(t.id);try{return{data:await te(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(G(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,a,o,l,c;try{const d={nextPage:null,lastPage:0,total:0},u=await te(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:""},xform:Hk});if(u.error)throw u.error;const h=await u.json(),m=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(c=(l=u.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return f.length>0&&(f.forEach(y=>{const x=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(y.split(";")[1].split("=")[1]);d[`${b}Page`]=x}),d.total=parseInt(m)),{data:Object.assign(Object.assign({},h),d),error:null}}catch(d){if(G(d))return{data:{clients:[]},error:d};throw d}}async _createOAuthClient(t){try{return await te(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(G(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await te(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(G(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await te(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(G(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await te(this.fetch,"DELET
521E",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(G(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await te(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(G(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await te(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var s;return{data:{providers:(s=n==null?void 0:n.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(r){if(G(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await te(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(G(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await te(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(G(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await te(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(G(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(t){try{return await te(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(G(r))return{data:null,error:r};throw r}}async _adminListPasskeys(t){nn(this.experimental),rs(t.userId);try{return await te(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(G(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(t){nn(this.experimental),rs(t.userId),rs(t.passkeyId);try{return await te(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(G(r))return{data:null,error:r};throw r}}}function zk(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}globalThis&&SE()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class H9 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function z9(){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 NE(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function W9(e){return parseInt(e,16)}function q9(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function G9(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:a=new Date,nonce:o,notBefore:l,requestId:c,resources:d,scheme:u,uri:h,version:m}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)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(m!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${m}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 522`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const f=NE(e.address),y=u?`${u}://${n}`:n,x=e.statement?`${e.statement} 523`:"",b=`${y}
523 wants you to sign in with your Ethereum account: 524${f} 525 526${x}`;let g=`URI: ${h} 527Version: ${m} 528Chain ID: ${r}${o?` 529Nonce: ${o}`:""} 530Issued At: ${a.toISOString()}`;if(s&&(g+=` 531Expiration Time: ${s.toISOString()}`),l&&(g+=` 532Not Before: ${l.toISOString()}`),c&&(g+=` 533Request ID: ${c}`),d){let v=` 534Resources:`;for(const w of d){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+=` 535- ${w}`}g+=v}return`${b} 536${g}`}class jt extends Error{constructor({message:t,code:r,cause:n,name:s}){var a;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(a=s??(n instanceof Error?n.name:void 0))!==null&&a!==void 0?a:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class fm extends jt{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function K9({error:e,options:t}){var r,n,s;const{publicKey:a}=t;if(!a)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new jt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=a.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new jt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=a.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new jt({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=a.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new jt({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 jt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new jt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return a.pubKeyCredParams.filter(l=>l.type==="public-key").length===0?new jt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new jt({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(CE(o)){if(a.rp.id!==o)return new jt({message:`The RP ID "${a.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new jt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(a.user.id.byteLength<1||a.user.id.byteLength>64)return new jt({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 jt({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 jt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function Y9({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new jt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new jt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(CE(n)){if(r.rpId!==n)return new jt({message:`The RP ID "${r.rpId}
536" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new jt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new jt({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 jt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class J9{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}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 Ex=new J9;function Wk(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:r,excludeCredentials:n}=e,s=kf(e,["challenge","user","excludeCredentials"]),a=Ko(t).buffer,o=Object.assign(Object.assign({},r),{id:Ko(r.id).buffer}),l=Object.assign(Object.assign({},s),{challenge:a,user:o});if(n&&n.length>0){l.excludeCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const d=n[c];l.excludeCredentials[c]=Object.assign(Object.assign({},d),{id:Ko(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return l}function qk(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:r}=e,n=kf(e,["challenge","allowCredentials"]),s=Ko(t).buffer,a=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){a.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const l=r[o];a.allowCredentials[o]=Object.assign(Object.assign({},l),{id:Ko(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return a}function Gk(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:ua(new Uint8Array(e.response.attestationObject)),clientDataJSON:ua(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Kk(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:ua(new Uint8Array(s.authenticatorData)),clientDataJSON:ua(new Uint8Array(s.clientDataJSON)),signature:ua(new Uint8Array(s.signature)),userHandle:s.userHandle?ua(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function CE(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function pm(){var e,t;return!!(Wt()&&"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 AE(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new fm("Browser returned unexpected credential type",t)}:{data:null,error:new fm("Empty credential response",t)}}catch(t){return{data:null,error:K9({error:t,options:e})}}}async function TE(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new fm("Browser returned unexpected credential type",t)}:{data:null,error:new fm("Empty credential response",t)}}
536catch(t){return{data:null,error:Y9({error:t,options:e})}}}const Q9={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},Z9={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function gm(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const a in s){const o=s[a];if(o!==void 0)if(Array.isArray(o))n[a]=o;else if(r(o))n[a]=o;else if(t(o)){const l=n[a];t(l)?n[a]=gm(l,o):n[a]=gm(o)}else n[a]=o}return n}function X9(e,t){return gm(Q9,e,t||{})}function e7(e,t){return gm(Z9,e,t||{})}class t7{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:r,friendlyName:n,signal:s},a){var o;try{const{data:l,error:c}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!l)return{data:null,error:c};const d=s??Ex.createNewAbortSignal();if(l.webauthn.type==="create"){const{user:u}=l.webauthn.credential_options.publicKey;if(!u.name){const h=n;if(h)u.name=`${u.id}:${h}`;else{const f=(await this.client.getUser()).data.user,y=((o=f==null?void 0:f.user_metadata)===null||o===void 0?void 0:o.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";u.name=`${u.id}:${y}`}}u.displayName||(u.displayName=u.name)}switch(l.webauthn.type){case"create":{const u=X9(l.webauthn.credential_options.publicKey,a==null?void 0:a.create),{data:h,error:m}=await AE({publicKey:u,signal:d});return h?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:h}},error:null}:{data:null,error:m}}case"request":{const u=e7(l.webauthn.credential_options.publicKey,a==null?void 0:a.request),{data:h,error:m}=await TE(Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:u,signal:d}));return h?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:h}},error:null}:{data:null,error:m}}}}catch(l){return G(l)?{data:null,error:l}:{data:null,error:new hn("Unexpected error in challenge",l)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},a){if(!r)return{data:null,error:new Ad("rpId is required for WebAuthn authentication")};try{if(!pm())return{data:null,error:new hn("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:a});if(!o)return{data:null,error:l};const{webauthn:c}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:c.type,rpId:r,rpOrigins:n,credential_response:c.credential_response}})}catch(o){return G(o)?{data:null,error:o}:{data:null,error:new hn("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},a){if(!r)return{data:null,error:new Ad("rpId is required for WebAuthn registration")};try{if(!pm())return{data:null,error:new hn("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(u=>{var h;return(h=u.data)===null||h===void 0?void 0:h.all.find(m=>m.factor_type==="webauthn"&&m.friendly_name===t&&m.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:l};const{data:c,error:d}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:a});return c?this._verify({factorId:o.id,challengeId:c.challengeId,webauthn:{rpId:r,rpOrigins:n,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:d}}catch(o){return G(o)?{data:null,error:o}:{data:null,error:new hn("Unexpected error in register",o)}}}}z9();const r7={url:i9,storageKey:a9,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:o9,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},io={};class Td{get jwks(){var t,r;return(r=(t=io[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){io[this.storageKey]=Object.assign(Object.assign({},io[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=io[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){io[this.storageKey]=Object.assign(Object.assign({},io[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const a=Object.assign(Object.assign({},r7),t);
536if(this.storageKey=a.storageKey,this.instanceID=(r=Td.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Td.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!a.debug,typeof a.debug=="function"&&(this.logger=a.debug),this.instanceID>0&&Wt()){const o=`${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(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=a.persistSession,this.autoRefreshToken=a.autoRefreshToken,this.experimental=(n=a.experimental)!==null&&n!==void 0?n:{},this.admin=new V9({url:a.url,headers:a.headers,fetch:a.fetch,experimental:this.experimental}),this.url=a.url,this.headers=a.headers,this.fetch=_E(a.fetch),this.detectSessionInUrl=a.detectSessionInUrl,this.flowType=a.flowType,this.hasCustomAuthorizationHeader=a.hasCustomAuthorizationHeader,this.throwOnError=a.throwOnError,this.lockAcquireTimeout=a.lockAcquireTimeout,a.lock!=null&&(this.lock=a.lock),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 t7(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?(a.storage?this.storage=a.storage:SE()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=zk(this.memoryStorage)),a.userStorage&&(this.userStorage=a.userStorage)):(this.memoryStorage={},this.storage=zk(this.memoryStorage)),Wt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),(o.data.event==="TOKEN_REFRESHED"||o.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}a.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${bE}) ${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()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(Wt()&&(r=j9(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Wt()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:a}=await this._getSessionFromURL(r,n);if(a){if(this._debug("#_initialize()","error detecting session from URL",a),h9(a)){const c=(t=a.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:a}}return{error:a}}const{session:o,redirectType:l}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",l),await this._saveSession(o),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return G(r)?this._returnResult({error:r}):this._returnResult({error:new hn("Unexpected error during initialization",r)}
536)}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const a=await te(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Ir}),{data:o,error:l}=a;if(l||!o)return this._returnResult({data:{user:null,session:null},error:l});const c=o.session,d=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:d,session:c},error:null})}catch(a){if(G(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signUp(t){var r,n,s;try{let a;if("email"in t){const{email:u,password:h,options:m}=t;let f=null,y=null;this.flowType==="pkce"&&([f,y]=await Xi(this.storage,this.storageKey)),a=await te(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:m==null?void 0:m.emailRedirectTo,body:{email:u,password:h,data:(r=m==null?void 0:m.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken},code_challenge:f,code_challenge_method:y},xform:Ir})}else if("phone"in t){const{phone:u,password:h,options:m}=t;a=await te(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:h,data:(n=m==null?void 0:m.data)!==null&&n!==void 0?n:{},channel:(s=m==null?void 0:m.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken}},xform:Ir})}else throw new $u("You must provide either an email or phone number and a password");const{data:o,error:l}=a;if(l||!o)return await yt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l});const c=o.session,d=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:d,session:c},error:null})}catch(a){if(await yt(this.storage,`${this.storageKey}-code-verifier`),G(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithPassword(t){try{let r;if("email"in t){const{email:a,password:o,options:l}=t;r=await te(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Vk})}else if("phone"in t){const{phone:a,password:o,options:l}=t;r=await te(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Vk})}else throw new $u("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const a=new so;return this._returnResult({data:{user:null,session:null},error:a})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(G(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,a;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(a=t.options)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t)):this._exchangeCodeForSession(t)}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,a,o,l,c,d,u,h,m;let f,y;if("message"in t)f=t.message,y=t.signature;else{const{chain:x,wallet:b,statement:g,options:v}=t;let w;if(Wt())if(typeof b=="object")w=b;else{const T=window;if("ethereum"in T&&typeof T.ethereum=="object"&&"request"in T.ethereum&&typeof T.ethereum.request=="function")w=T.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 j=new URL((r=v==null?void 0:v.url)!==null&&r!==void 0?r:window.location.href),k=await w.request({method:"eth_requestAccounts"}).then(T=>T).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 S=NE(k[0]);let _=(n=v==null?void 0:v.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!_){const T=await w.request({method:"eth_chainId"});_=W9(T)}const N={domain:j.host,address:S,statement:g,uri:j.href,version:"1",chainId:_,nonce:(s=v==null?void 0:v.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(a=v==null?void 0:v.signInWithEthereum)===null||a===void 0?void 0:a.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(l=v==null?void 0:v.signInWithEthereum)===null||l===void 0?void 0:l.expirationTime,notBefore:(c=v==null?void 0:v.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(d=v==null?void 0:v.signInWithEthereum)===null||d===void 0?void 0:d.requestId,resources:(u=v==null?void 0:v.signInWithEthereum)===null||u===void 0?void 0:u.resources};f=G9(N),y=await w.request({method:"personal_sign",params:[q9(f),S]})}try{const{data:x,error:b}=await te(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:y}
536,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(m=t.options)===null||m===void 0?void 0:m.captchaToken}}:null),xform:Ir});if(b)throw b;if(!x||!x.session||!x.user){const g=new so;return this._returnResult({data:{user:null,session:null},error:g})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:b})}catch(x){if(G(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async signInWithSolana(t){var r,n,s,a,o,l,c,d,u,h,m,f;let y,x;if("message"in t)y=t.message,x=t.signature;else{const{chain:b,wallet:g,statement:v,options:w}=t;let j;if(Wt())if(typeof g=="object")j=g;else{const S=window;if("solana"in S&&typeof S.solana=="object"&&("signIn"in S.solana&&typeof S.solana.signIn=="function"||"signMessage"in S.solana&&typeof S.solana.signMessage=="function"))j=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 g!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=g}const k=new URL((r=w==null?void 0:w.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in j&&j.signIn){const S=await j.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 _;if(Array.isArray(S)&&S[0]&&typeof S[0]=="object")_=S[0];else if(S&&typeof S=="object"&&"signedMessage"in S&&"signature"in S)_=S;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in _&&"signature"in _&&(typeof _.signedMessage=="string"||_.signedMessage instanceof Uint8Array)&&_.signature instanceof Uint8Array)y=typeof _.signedMessage=="string"?_.signedMessage:new TextDecoder().decode(_.signedMessage),x=_.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in j)||typeof j.signMessage!="function"||!("publicKey"in j)||typeof j!="object"||!j.publicKey||!("toBase58"in j.publicKey)||typeof j.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:`,j.publicKey.toBase58(),...v?["",v,""]:[""],"Version: 1",`URI: ${k.href}`,`Issued At: ${(s=(n=w==null?void 0:w.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((d=w==null?void 0:w.signInWithSolana)===null||d===void 0)&&d.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((h=(u=w==null?void 0:w.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||h===void 0)&&h.length?["Resources",...w.signInWithSolana.resources.map(_=>`- ${_}`)]:[]].join(` 537`);const S=await j.signMessage(new TextEncoder().encode(y),"utf8");if(!S||!(S instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");x=S}}try{const{data:b,error:g}=await te(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:ua(x)},!((m=t.options)===null||m===void 0)&&m.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Ir});if(g)throw g;if(!b||!b.session||!b.user){const v=new so;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:g})}catch(b){if(G(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(t){const r=await tn(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new m9;const{data:a,error:o}=await te(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Ir});if(await yt(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!a||!a.session||!a.user){const l=new so;return this._returnResult({data:{user:null,session:null,redirectType:null},error:l})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers(s==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",a.session)),this._returnResult({data:Object.assign(Object.assign({},a),{redirectType:s??null}),error:o})}catch(a){if(await yt(this.storage,`${this.storageKey}-code-verifier`),G(a))return this._returnResult({data:{user:null,session:null,redirectType:null},error:a});throw a}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:a,nonce:o}=t,l=await te(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:a,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Ir}),{data:c,error:d}=l;if(d)return this._returnResult({data:{user:null,session:null},error:d});if(!c||!c.session||!c.user){const u=new so;return this._returnResult({data:{user:null,session:null},error:u})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:d})}catch(r){if(G(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,a,o;try{if("email"in t){const{email:l,options:c}=t;let d=null,u=null;this.flowType==="pkce"&&([d,u]=await Xi(this.storage,this.storageKey));const{error:h}=await te(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(r=c==null?void 0:c.data)!==null&&r!==void 0?r:{},create_user:(n=c==null?void 0:c.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:d,code_challenge_method:u},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:l,options:c}=t,{data:d,error:u}=await te(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(a=c==null?void 0:c.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(o=c==null?void 0:c.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:d==null?void 0:d.message_id},error:u})}throw new $u("You must provide either an email or phone number.")}catch(l){if(await yt(this.storage,`${this.storageKey}-code-verifier`),G(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(t){var r,n;try{let s,a;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,a=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:l}=await te(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:a}}),redirectTo:s,xform:Ir});if(l)throw l;if(!o)throw new Error("An error occurred on token verification.");const c=o.session,d=o.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:d,session:c},error:null})}catch(s){if(G(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,a,o;try{let l=null,c=null;this.flowType==="pkce"&&([l,c]=await Xi(this.storage,this.storageKey));const d=await te(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:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n: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:l,code_challenge_method:c}),headers:this.headers,xform:F9});return!((a=d.data)===null||a===void 0)&&a.url&&Wt()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(d.data.url),this._returnResult(d)}catch(l){if(await yt(this.storage,`${this.storageKey}-code-verifier`),G(l))return this._returnResult({data:null,error:l});throw l}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new Tt;const{error:s}=await te(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(G(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:a}=t;let o=null,l=null;this.flowType==="pkce"&&([o,l]=await Xi(this.storage,this.storageKey));const{error:c}=await te(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}
537,code_challenge:o,code_challenge_method:l},redirectTo:a==null?void 0:a.emailRedirectTo});return c&&await yt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:c})}else if("phone"in t){const{phone:n,type:s,options:a}=t,{data:o,error:l}=await te(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:l})}throw new $u("You must provide either an email or phone number and a type")}catch(r){if(await yt(this.storage,`${this.storageKey}-code-verifier`),G(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();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 n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}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 r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await tn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<Jp:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await tn(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Qp()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=M9(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:a}=await this._callRefreshToken(t.refresh_token);if(a){if(!!(t.expires_at&&t.expires_at*1e3>Date.now())){const l=await tn(this.storage,this.storageKey);if(l&&l.refresh_token===t.refresh_token)return this._returnResult({data:{session:t},error:null})}return this._returnResult({data:{session:null},error:a})}return 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;let r;return this.lock!=null?r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):r=await this._getUser(),r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await te(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:ei}):await this._useSession(async r=>{var n,s,a;const{data:o,error:l}=r;if(l)throw l;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Tt}:await te(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&a!==void 0?a:void 0,xform:ei})})}catch(r){if(G(r))return Lu(r)&&(await this._removeSession(),await yt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r)):await this._updateUser(t,r)}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:a}=n;
537if(a)throw a;if(!s.session)throw new Tt;const o=s.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c]=await Xi(this.storage,this.storageKey));const{data:d,error:u}=await te(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:o.access_token,xform:ei});if(u)throw u;return o.user=d.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await yt(this.storage,`${this.storageKey}-code-verifier`),G(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t)):await this._setSession(t)}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Tt;const r=Date.now()/1e3;let n=r,s=!0,a=null;const{payload:o}=Bu(t.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:l,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l)return{data:{user:null,session:null},error:null};a=l}else{const{data:l,error:c}=await this._getUser(t.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});a={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return this._returnResult({data:{user:a.user,session:a},error:null})}catch(r){if(G(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:o,error:l}=r;if(l)throw l;t=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new Tt;const{data:s,error:a}=await this._callRefreshToken(t.refresh_token);return a?this._returnResult({data:{user:null,session:null},error:a}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(G(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){var n;try{if(!Wt())throw new Fu("No browser detected.");if(t.error||t.error_description||t.error_code)throw new Fu(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Ik("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Fu("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Ik("No code detected.");const{data:w,error:j}=await this._exchangeCodeForSession(t.code);if(j)throw j;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:(n=w.redirectType)!==null&&n!==void 0?n:null},error:null}}const{provider_token:s,provider_refresh_token:a,access_token:o,refresh_token:l,expires_in:c,expires_at:d,token_type:u}=t;if(!o||!c||!l||!u)throw new Fu("No session defined in URL");const h=Math.round(Date.now()/1e3),m=parseInt(c);let f=h+m;d&&(f=parseInt(d));const y=f-h;y*1e3<=os&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${y}s, should have been closer to ${m}s`);const x=f-m;h-x>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",x,f,h):h-x<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",x,f,h);const{data:b,error:g}=await this._getUser(o);if(g)throw g;const v={provider_token:s,provider_refresh_token:a,access_token:o,expires_in:m,expires_at:f,refresh_token:l,token_type:u,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(G(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||t.error_description||t.error_code)}
537async _isPKCECallback(t){const r=await tn(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:a}=r;if(a&&!Lu(a))return this._returnResult({error:a});const o=(n=s.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:l}=await this.admin.signOut(o,t);if(l&&!(u9(l)&&(l.status===404||l.status===401||l.status===403)||Lu(l)))return this._returnResult({error:l})}return t!=="others"&&(await this._removeSession(),await yt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=b9(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)}):await this._emitInitialSession(r)))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:a},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",a)),this._debug("INITIAL_SESSION","callback id",t,"session",a)}catch(a){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",a),Lu(a)?console.warn(a):console.error(a)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Xi(this.storage,this.storageKey,!0));try{return await te(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(a){if(await yt(this.storage,`${this.storageKey}-code-verifier`),G(a))return this._returnResult({data:null,error:a});throw a}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async a=>{var o,l,c,d,u;const{data:h,error:m}=a;if(m)throw m;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await te(this.fetch,"GET",f,{headers:this.headers,jwt:(u=(d=h.session)===null||d===void 0?void 0:d.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return Wt()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(G(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:a}}=r;if(s)throw s;const{options:o,provider:l,token:c,access_token:d,nonce:u}=t,h=await te(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=a==null?void 0:a.access_token)!==null&&n!==void 0?n:void 0,body:{provider:l,id_token:c,access_token:d,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Ir}),{data:m,error:f}=h;return f?this._returnResult({data:{user:null,session:null},error:f}):!m||!m.session||!m.user?this._returnResult({data:{user:null,session:null},error:new so}):(m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("USER_UPDATED",m.session)),this._returnResult({data:m,error:f}))}catch(s){if(await yt(this.storage,`${this.storageKey}-code-verifier`),G(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:a,error:o}=r;if(o)throw o;
537return await te(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=a.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r="#_refreshAccessToken()";this._debug(r,"begin");try{const n=Date.now();return await _9(async s=>(s>0&&await S9(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await te(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Ir})),(s,a)=>{const o=200*Math.pow(2,s);return a&&Ok(a)&&Date.now()+o-n<os})}catch(n){if(this._debug(r,"error",n),G(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),Wt()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await tn(this.storage,this.storageKey);if(s&&this.userStorage){let o=await tn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await fo(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Qp()}else if(s&&!s.user&&!s.user){const o=await tn(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await yt(this.storage,this.storageKey+"-user"),await fo(this.storage,this.storageKey,s)):s.user=Qp()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const a=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Jp;if(this._debug(n,`session has${a?"":" not"} expired with margin of ${Jp}s`),a){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(f9(o)?this._debug(n,"refresh discarded by commit guard",o):this._debug(n,"refresh failed",o))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:l}=await this._getUser(s.access_token);!l&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new Tt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===t&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const s="#_callRefreshToken()";this._debug(s,"begin");try{this.refreshingDeferred=new Sf;const a=await tn(this.storage,this.storageKey),{data:o,error:l}=await this._refreshAccessToken(t);if(l)throw l;if(!o.session)throw new Tt;const c=await tn(this.storage,this.storageKey);if(a!==null&&(c===null||c.refresh_token!==a.refresh_token)){this._debug(s,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:c?"replaced":"cleared"});const m={data:null,error:new Mk};return this.refreshingDeferred.resolve(m),m}const u=this._sessionRemovalEpoch;if(await this._saveSession(o.session),this._sessionRemovalEpoch!==u){this._debug(s,"commit guard (post-save): _removeSession ran during _saveSession, und
537oing write"),await yt(this.storage,this.storageKey),this.userStorage&&await yt(this.userStorage,this.storageKey+"-user");const m={data:null,error:new Mk};return this.refreshingDeferred.resolve(m),m}await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const h={data:o.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(h),h}catch(a){if(this._debug(s,"error",a),G(a)){const o={data:null,error:a};if(!Ok(a)){const l=await tn(this.storage,this.storageKey);!!(l!=null&&l.expires_at&&l.expires_at*1e3>Date.now())?this._debug(s,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:t,result:o,expiresAt:Date.now()+s9},(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(a),a}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const a=[],o=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,r)}catch(c){a.push(c)}});if(await Promise.all(o),a.length>0){for(let l=0;l<a.length;l+=1)console.error(a[l]);throw a[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await yt(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await fo(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const a=Bk(s);await fo(this.storage,this.storageKey,a)}else{const s=Bk(r);await fo(this.storage,this.storageKey,s)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await yt(this.storage,this.storageKey),await yt(this.storage,this.storageKey+"-code-verifier"),await yt(this.storage,this.storageKey+"-user"),this.userStorage&&await yt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Wt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),os);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/os);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${os}ms, refresh threshold is ${_c} ticks`),s<=_c&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof H9)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/os);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${os}ms, refresh threshold is ${_c} ticks`),s<=_c&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Wt()||!(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 r=`#_onVisibilityChanged(${t})`;if(this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
537{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(r,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[a,o]=await Xi(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(l.toString())}if(n!=null&&n.queryParams){const a=new URLSearchParams(n.queryParams);s.push(a.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:a}=r;return a?this._returnResult({data:null,error:a}):await te(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:a,error:o}=r;if(o)return this._returnResult({data:null,error:o});const l=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:d}=await te(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token});return d?this._returnResult({data:null,error:d}):(t.factorType==="totp"&&c.type==="totp"&&(!((s=c==null?void 0:c.totp)===null||s===void 0)&&s.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){const r=async()=>{try{return await this._useSession(async n=>{var s;const{data:a,error:o}=n;if(o)return this._returnResult({data:null,error:o});const l=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?Gk(t.webauthn.credential_response):Kk(t.webauthn.credential_response)})}:{code:t.code}),{data:c,error:d}=await te(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:l,headers:this.headers,jwt:(s=a==null?void 0:a.session)===null||s===void 0?void 0:s.access_token});return d?this._returnResult({data:null,error:d}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+c.expires_in},c)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",c),this._returnResult({data:c,error:d}))})}catch(n){if(G(n))return this._returnResult({data:null,error:n});throw n}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challenge(t){const r=async()=>{try{return await this._useSession(async n=>{var s;const{data:a,error:o}=n;if(o)return this._returnResult({data:null,error:o});const l=await te(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(s=a==null?void 0:a.session)===null||s===void 0?void 0:s.access_token});if(l.error)return l;const{data:c}=l;if(c.type!=="webauthn")return{data:c,error:null};switch(c.webauthn.type){case"create":return{data:Object.assign(Object.assign({},c),{webauthn:Object.assign(Object.assign({},c.webauthn),{credential_options:Object.assign(Object.assign({},c.webauthn.credential_options),{publicKey:Wk(c.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},c),{webauthn:Object.assign(Object.assign({},c.webauthn),{credential_options:Object.assign(Object.assign({},c.webauthn.credential_options),{publicKey:qk(c.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(G(n))return this._returnResult({data:null,error:n});throw n}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const a of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(a),a.status==="verified"&&s[a.factor_type].push(a);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,n,s,a;
537if(t)try{const{payload:f}=Bu(t);let y=null;f.aal&&(y=f.aal);let x=y;const{data:{user:b},error:g}=await this.getUser(t);if(g)return this._returnResult({data:null,error:g});((n=(r=b==null?void 0:b.factors)===null||r===void 0?void 0:r.filter(j=>j.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(x="aal2");const w=f.amr||[];return{data:{currentLevel:y,nextLevel:x,currentAuthenticationMethods:w},error:null}}catch(f){if(G(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:o},error:l}=await this.getSession();if(l)return this._returnResult({data:null,error:l});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=Bu(o.access_token);let d=null;c.aal&&(d=c.aal);let u=d;((a=(s=o.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(u="aal2");const m=c.amr||[];return{data:{currentLevel:d,nextLevel:u,currentAuthenticationMethods:m},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await te(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:a=>({data:a,error:null})}):this._returnResult({data:null,error:new Tt})})}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new Tt});const o=await te(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&Wt()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(G(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new Tt});const o=await te(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&Wt()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(G(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await te(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Tt})})}catch(t){if(G(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await te(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Tt})})}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(l=>l.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(l=>l.kid===t),n&&this.jwks_cached_at+c9>s)return n;const{data:a,error:o}=await te(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!a.keys||a.keys.length===0||(this.jwks=a,this.jwks_cached_at=s,n=a.keys.find(l=>l.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:f,error:y}
537=await this.getSession();if(y||!f.session)return this._returnResult({data:null,error:y});n=f.session.access_token}const{header:s,payload:a,signature:o,raw:{header:l,payload:c}}=Bu(n);if(!(r!=null&&r.allowExpired))try{P9(a.exp)}catch(f){throw new hm(f instanceof Error?f.message:"JWT validation failed")}const d=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!d){const{error:f}=await this.getUser(n);if(f)throw f;return{data:{claims:a,header:s,signature:o},error:null}}const u=I9(s.alg),h=await crypto.subtle.importKey("jwk",d,u,!0,["verify"]);if(!await crypto.subtle.verify(u,h,o,v9(`${l}.${c}`)))throw new hm("Invalid JWT signature");return{data:{claims:a,header:s,signature:o},error:null}}catch(n){if(G(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(t){var r,n,s;nn(this.experimental);try{if(!pm())return this._returnResult({data:null,error:new hn("Browser does not support WebAuthn",null)});const{data:a,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.captchaToken}});if(o||!a)return this._returnResult({data:null,error:o});const l=qk(a.options),c=(s=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.signal)!==null&&s!==void 0?s:Ex.createNewAbortSignal(),{data:d,error:u}=await TE({publicKey:l,signal:c});if(u||!d)return this._returnResult({data:null,error:u??new hn("WebAuthn ceremony failed",null)});const h=Kk(d);return this._verifyPasskeyAuthentication({challengeId:a.challenge_id,credential:h})}catch(a){if(G(a))return this._returnResult({data:null,error:a});throw a}}async registerPasskey(t){var r,n;nn(this.experimental);try{if(!pm())return this._returnResult({data:null,error:new hn("Browser does not support WebAuthn",null)});const{data:s,error:a}=await this._startPasskeyRegistration();if(a||!s)return this._returnResult({data:null,error:a});const o=Wk(s.options),l=(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:Ex.createNewAbortSignal(),{data:c,error:d}=await AE({publicKey:o,signal:l});if(d||!c)return this._returnResult({data:null,error:d??new hn("WebAuthn ceremony failed",null)});const u=Gk(c);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:u})}catch(s){if(G(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){nn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Tt});const{data:s,error:a}=await te(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:s,error:null})})}catch(t){if(G(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){nn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Tt});const{data:a,error:o}=await te(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:a,error:null})})}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(t){var r;nn(this.experimental);try{const{data:n,error:s}=await te(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:n,error:null})}catch(n){if(G(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(t){nn(this.experimental);try{const{data:r,error:n}=await te(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:Ir});return n?this._returnResult({data:null,error:n}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){nn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Tt});const{data:s,error:a}=await te(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})});return a?this._returnResult({data:null,error:a}):this._returnResult({data:s,error:null})})}catch(t){if(G(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){nn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Tt});const{data:a,error:o}=await te(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:t.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:a,error:null})})}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(t){nn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Tt});const{error:a}
537=await te(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return a?this._returnResult({data:null,error:a}):this._returnResult({data:null,error:null})})}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}}}Td.nextInstanceID={};const n7=Td,s7="2.108.2";let Nc="",ym;if(typeof Deno<"u"){var Xp;Nc="deno",ym=(Xp=Deno.version)===null||Xp===void 0?void 0:Xp.deno}else if(typeof document<"u")Nc="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Nc="react-native";else{var eg;Nc="node",ym=typeof process<"u"?(eg=process.version)===null||eg===void 0?void 0:eg.replace(/^v/,""):void 0}const EE=[`runtime=${Nc}`];ym&&EE.push(`runtime-version=${ym}`);const i7={"X-Client-Info":`supabase-js/${s7}; ${EE.join("; ")}`},a7={headers:i7},o7={schema:"public"},l7={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},c7={},d7={enabled:!1,respectSamplingDecision:!0};function u7(e,t,r,n){function s(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function l(u){try{d(n.next(u))}catch(h){o(h)}}function c(u){try{d(n.throw(u))}catch(h){o(h)}}function d(u){u.done?a(u.value):s(u.value).then(l,c)}d((n=n.apply(e,[])).next())})}let tg=null;const h7="@opentelemetry/api";function m7(){return tg===null&&(tg=import(h7).catch(()=>null)),tg}function f7(){return u7(this,void 0,void 0,function*(){try{const e=yield m7();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const r=t.traceparent;return r?{traceparent:r,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function p7(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[r,n,s,a]=t;if(r.length!==2||n.length!==32||s.length!==16||a.length!==2)return null;const o=/^[0-9a-f]+$/i;return!o.test(r)||!o.test(n)||!o.test(s)||!o.test(a)||n==="00000000000000000000000000000000"||s==="0000000000000000"?null:{version:r,traceId:n,parentId:s,traceFlags:a,isSampled:(parseInt(a,16)&1)===1}}function g7(e,t){if(!e||!t||t.length===0)return!1;let r;if(e instanceof URL)r=e;else try{r=new URL(e)}catch{return!1}for(const n of t)try{if(typeof n=="string"){if(y7(r.hostname,n))return!0}else if(n instanceof RegExp){if(n.test(r.hostname))return!0}else if(typeof n=="function"&&n(r))return!0}catch{continue}return!1}function y7(e,t){if(t===e)return!0;if(t.startsWith("*.")){const r=t.slice(2);if(e.endsWith(r)&&(e===r||e.endsWith("."+r)))return!0}return!1}function x7(e){const t=[];try{const r=new URL(e);t.push(r.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function Ed(e){"@babel/helpers - typeof";return Ed=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},Ed(e)}function v7(e,t){if(Ed(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ed(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function w7(e){var t=v7(e,"string");return Ed(t)=="symbol"?t:t+""}function b7(e,t,r){return(t=w7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yk(Object(r),!0).forEach(function(n){b7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const j7=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),k7=()=>Headers,S7=(e,t,r,n,s)=>{const a=j7(n),o=k7(),l=(s==null?void 0:s.enabled)===!0,c=(s==null?void 0:s.respectSamplingDecision)!==!1,d=l?x7(t):null;return async(u,h)=>{var m;const f=(m=await r())!==null&&m!==void 0?m:e;let y=new o(h==null?void 0:h.headers);if(y.has("apikey")||y.set("apikey",e),y.has("Authorization")||y.set("Authorization",`Bearer ${f}`),d){const x=await _7(u,d,c);x&&(x.traceparent&&!y.has("traceparent")&&y.set("traceparent",x.traceparent),x.tracestate&&!y.has("tracestate")&&y.set("tracestate",x.tracestate),x.baggage&&!y.has("baggage")&&y.set("baggage",x.baggage))}return a(u,ft(ft({},h),{},{headers:y}))}};async function _7(e,t,r){if(!g7(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const n=await f7();if(!n||!n.traceparent)return null;if(r){const s=p7(n.traceparent);if(s&&!s.isSampled)return null}return n}function Jk(e){return typeof e=="boolean"?{enabled:e}:e}function N7(e){return e.endsWith("/")?e:e+"/"}function C7(e,t){var r,n,s,a,o,l;const{db:c,auth:d,realtime:u,global:h}=e,{db:m,auth:f,realtime:y,global:x}=t,b=Jk(e.tracePropagation),g=Jk(t.tracePropagation),v={db:ft(ft({},m),c),auth:ft(ft({},f),d),realtime:ft(ft({},y),u),storage:{},global:ft(ft(ft({},x),h),{},{headers:ft(ft({},(r=x==null?void 0:x.headers)!==null&&r!==void 0?r:{}),(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{})}),tracePropagation:{enabled:(s=(a=b==null?void 0:b.enabled)!==null&&a!==void 0?a:g==null?void 0:g.enabled)!==null&&s!==void 0?s:!1,respectSamplingDecision:(o=(l=b==null?void 0:b.respectSamplingDecision)!==null&&l!==void 0?l:g==null?void 0:g.respectSamplingDecision)!==null&&o!==void 0?o:!0},accessToken:async()=>""};return e.accessToken?v.accessToken=e.accessToken:delete v.accessToken,v}function A7(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");
537if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(N7(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var T7=class extends n7{constructor(e){super(e)}},E7=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const a=A7(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const o=`sb-${a.hostname.split(".")[0]}-auth-token`,l={db:o7,realtime:c7,auth:ft(ft({},l7),{},{storageKey:o}),global:a7,tracePropagation:d7},c=C7(r??{},l);if(this.settings=c,this.storageKey=(n=c.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=c.global.headers)!==null&&s!==void 0?s:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(u,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 d;this.auth=this._initSupabaseAuthClient((d=c.auth)!==null&&d!==void 0?d:{},this.headers,c.global.fetch)}this.fetch=S7(t,e,this._getAccessToken.bind(this),c.global.fetch,c.tracePropagation),this.realtime=this._initRealtimeClient(ft({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new zz(new URL("rest/v1",a).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch,timeout:c.db.timeout,urlLengthLimit:c.db.urlLengthLimit}),this.storage=new n9(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new Mz(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={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}channel(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,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:a,flowType:o,lock:l,debug:c,throwOnError:d,experimental:u,lockAcquireTimeout:h,skipAutoInitialize:m},f,y){const x={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new T7({url:this.authUrl.href,headers:ft(ft({},x),f),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:l,debug:c,throwOnError:d,experimental:u,fetch:y,lockAcquireTimeout:h,skipAutoInitialize:m,hasCustomAuthorizationHeader:Object.keys(this.headers).some(b=>b.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new NW(this.realtimeUrl.href,ft(ft({},e),{},{params:ft(ft({},{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,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const R7=(e,t,r)=>new E7(e,t,r);function P7(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}P7()&&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 N
537ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function I7(){var b,g;if(typeof window>"u")return;const e=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(v=>e===v||e.endsWith("."+v)),n="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=r?((b=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+n+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:b[1])??((g=e.match(new RegExp("^("+n+")(?=[.-])","i")))==null?void 0:g[1]):void 0,a=window.parent&&window.parent!==window;if(!s||!a)return localStorage;const o=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),l=o?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,c=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),d=c&&l.test(c)?[c]:o?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],u="lovable-preview-auth:result",h=2e3,m=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),f=(v,w,j)=>new Promise(k=>{const S=m();let _=!1,N;const T=M=>{_||(_=!0,clearTimeout(N),window.removeEventListener("message",P),k(M))},P=M=>{if(d.indexOf(M.origin)<0)return;const z=M.data;z&&z.type===u&&z.requestId===S&&T(z)};window.addEventListener("message",P);const A={type:v,requestId:S,projectId:s,key:w};j!==void 0&&(A.value=j);for(const M of d)window.parent.postMessage(A,M);N=setTimeout(()=>T(null),h)});let y=!0;const x=250;return{getItem:async v=>{let w=await f("lovable-preview-auth:get",v);return!w&&y&&(await new Promise(j=>setTimeout(j,x)),w=await f("lovable-preview-auth:get",v)),y=!1,w&&w.ok&&typeof w.value=="string"?w.value===""?(localStorage.removeItem(v),null):w.value:localStorage.getItem(v)},setItem:(v,w)=>(localStorage.setItem(v,w),f("lovable-preview-auth:set",v,w).then(j=>{j&&j.ok&&typeof j.value=="string"&&localStorage.getItem(v)===w&&(j.value===""?localStorage.removeItem(v):localStorage.setItem(v,j.value))})),removeItem:v=>(localStorage.removeItem(v),f("lovable-preview-auth:remove",v).then(()=>{}))}}const O7="https://apmwtpoymcokjdqlrbjj.supabase.co",Qk="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFwbXd0cG95bWNva2pkcWxyYmpqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODIyMjY3MTIsImV4cCI6MjA5NzgwMjcxMn0.QXJP8iF7mLFjcg6KChfXYH2Fwoe1dNR3mYczUthVzTc";function M7(e){return e.startsWith("sb_publishable_")||e.startsWith("sb_secret_")}function D7(e){return(t,r)=>{const n=new Headers(typeof Request<"u"&&t instanceof Request?t.headers:void 0);return r!=null&&r.headers&&new Headers(r.headers).forEach((s,a)=>n.set(a,s)),M7(e)&&n.get("Authorization")===`Bearer ${e}`&&n.delete("Authorization"),n.set("apikey",e),fetch(t,{...r,headers:n})}}const F=R7(O7,Qk,{global:{fetch:D7(Qk)},auth:{storage:I7(),persistSession:!0,autoRefreshToken:!0}}),RE=p.createContext(void 0);function L7({children:e}){const[t,r]=p.useState(null),[n,s]=p.useState(null),[a,o]=p.useState([]),[l,c]=p.useState(!0);p.useEffect(()=>{const{data:f}=F.auth.onAuthStateChange((y,x)=>{s(x),r((x==null?void 0:x.user)??null),x!=null&&x.user?setTimeout(()=>d(x.user.id),0):o([])});return F.auth.getSession().then(({data:{session:y}})=>{s(y),r((y==null?void 0:y.user)??null),y!=null&&y.user?d(y.user.id).finally(()=>c(!1)):c(!1)}),()=>f.subscription.unsubscribe()},[]);async function d(f){const{data:y}=await F.from("user_roles").select("role").eq("user_id",f);o((y??[]).map(x=>x.role))}async function u(){await F.auth.signOut(),o([])}const h=a.includes("admin")||a.includes("instructor"),m=a.includes("admin");return i.jsx(RE.Provider,{value:{user:t,session:n,roles:a,isStaff:h,isAdmin:m,loading:l,signOut:u},children:e})}function Ga(){const e=p.useContext(RE);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}function Zk(e){const[t,r]=e.split(":");let n=parseInt(t,10);const s=r,a=n>=12?"PM":"AM";return n=n%12,n===0&&(n=12),`${n}:${s} ${a}`}function zl(e,t){return`${Zk(e)} â ${Zk(t)}`}function $7(e){const[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n).toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric"})}function lb(e){const[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"})}async function F7(){const e=new Date().toISOString().slice(0,10),{data:t,error:r}=await F.from("class_sessions").select("id, offering_id, session_date, start_time, end_time, capacity, location, status, notes, class_offerings(id, title, class_slug, category, location, capacity, trial_eligible)").gte("session_date",e).eq("status","scheduled").order("session_date",{ascending:!0}).order("start_time",{ascending:!0});if(r)throw r;return t??[]}async function B7(){const{data:e,error:t}=await F.rpc("get_session_availability");if(t)throw t;const r=new Map;
537return(e??[]).forEach(n=>r.set(n.session_id,n)),r}async function U7(e){const{data:t,error:r}=await F.from("bookings").select("id, session_id, status, position").eq("user_id",e).in("status",["reserved","waitlisted","checked_in","attended"]);if(r)throw r;return t??[]}async function V7(e,t){const{error:r}=await F.from("bookings").insert({session_id:t,user_id:e});if(r)throw r}async function PE(e){const{error:t}=await F.from("bookings").update({status:"cancelled"}).eq("id",e);if(t)throw t}const H7=Km("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 rt({className:e,variant:t,...r}){return i.jsx("div",{className:Q(H7({variant:t}),e),...r})}function z7({session:e,availability:t,myBooking:r,isLoggedIn:n,busy:s,onReserve:a,onCancel:o,onTrial:l,onSignIn:c}){const d=e.class_offerings,u=(t==null?void 0:t.reserved_count)??0,h=Math.max(e.capacity-u,0),m=h<=0;
vendor: 5,879 bytes, line 537
537return i.jsxs("div",{className:"flex flex-col gap-4 rounded-lg border border-border bg-card p-5 transition-colors hover:border-primary/40 sm:flex-row sm:items-center sm:justify-between",children:[i.jsxs("div",{className:"min-w-0",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsx("h3",{className:"font-heading text-lg font-semibold",children:(d==null?void 0:d.title)??"Class"}),(d==null?void 0:d.category)&&i.jsx(rt,{variant:"outline",className:"capitalize",children:d.category}),(d==null?void 0:d.trial_eligible)&&i.jsx(rt,{variant:"secondary",children:"Trial welcome"})]}),i.jsxs("div",{className:"mt-2 flex flex-wrap gap-x-5 gap-y-1 text-sm text-muted-foreground",children:[i.jsxs("span",{className:"flex items-center gap-1.5",children:[i.jsx(Nr,{className:"h-3.5 w-3.5"})," ",zl(e.start_time,e.end_time)]}),e.location&&i.jsxs("span",{className:"flex items-center gap-1.5",children:[i.jsx(Ol,{className:"h-3.5 w-3.5"})," ",e.location]}),i.jsxs("span",{className:"flex items-center gap-1.5",children:[i.jsx(ar,{className:"h-3.5 w-3.5"}),m?"Class full":`${h} spot${h===1?"":"s"} left`]})]})]}),i.jsx("div",{className:"shrink-0",children:r?i.jsxs("div",{className:"flex flex-col items-stretch gap-2 sm:items-end",children:[i.jsx(rt,{className:r.status==="waitlisted"?"justify-center bg-muted text-muted-foreground":"justify-center bg-primary/15 text-primary",children:r.status==="waitlisted"?`Waitlisted${r.position?` (#${r.position})`:""}`:i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(Ps,{className:"h-3 w-3"})," Reserved"]})}),i.jsx(I,{variant:"ghost",size:"sm",onClick:o,disabled:s,children:s?i.jsx(Be,{className:"h-4 w-4 animate-spin"}):"Cancel"})]}):n?i.jsxs(I,{onClick:a,disabled:s,variant:m?"outline":"default",className:m?"":"bg-gradient-gold font-semibold text-primary-foreground hover:opacity-90",children:[s?i.jsx(Be,{className:"mr-2 h-4 w-4 animate-spin"}):null,m?"Join waitlist":"Reserve"]}):d!=null&&d.trial_eligible?i.jsx(I,{onClick:l,className:"bg-gradient-gold font-semibold text-primary-foreground hover:opacity-90",children:"Book a trial"}):i.jsx(I,{variant:"outline",onClick:c,children:"Sign in to book"})})]})}var rg="focusScope.autoFocusOnMount",ng="focusScope.autoFocusOnUnmount",Xk={bubbles:!1,cancelable:!0},W7="FocusScope",cb=p.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...o}=e,[l,c]=p.useState(null),d=Tr(s),u=Tr(a),h=p.useRef(null),m=Le(t,x=>c(x)),f=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let x=function(w){if(f.paused||!l)return;const j=w.target;l.contains(j)?h.current=j:Gs(h.current,{select:!0})},b=function(w){if(f.paused||!l)return;const j=w.relatedTarget;j!==null&&(l.contains(j)||Gs(h.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const k of w)k.removedNodes.length>0&&Gs(l)};document.addEventListener("focusin",x),document.addEventListener("focusout",b);const v=new MutationObserver(g);return l&&v.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",b),v.disconnect()}}},[n,l,f.paused]),p.useEffect(()=>{if(l){tS.add(f);const x=document.activeElement;if(!l.contains(x)){const g=new CustomEvent(rg,Xk);l.addEventListener(rg,d),l.dispatchEvent(g),g.defaultPrevented||(q7(Q7(IE(l)),{select:!0}),document.activeElement===x&&Gs(l))}return()=>{l.removeEventListener(rg,d),setTimeout(()=>{const g=new CustomEvent(ng,Xk);l.addEventListener(ng,u),l.dispatchEvent(g),g.defaultPrevented||Gs(x??document.body,{select:!0}),l.removeEventListener(ng,u),tS.remove(f)},0)}}},[l,d,u,f]);const y=p.useCallback(x=>{if(!r&&!n||f.paused)return;const b=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,g=document.activeElement;if(b&&g){const v=x.currentTarget,[w,j]=G7(v);w&&j?!x.shiftKey&&g===j?(x.preventDefault(),r&&Gs(w,{select:!0})):x.shiftKey&&g===w&&(x.preventDefault(),r&&Gs(j,{select:!0})):g===v&&x.preventDefault()}},[r,n,f.paused]);return i.jsx(le.div,{tabIndex:-1,...o,ref:m,onKeyDown:y})});cb.displayName=W7;function q7(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Gs(n,{select:t}),document.activeElement!==r)return}function G7(e){const t=IE(e),r=eS(t,e),n=eS(t.reverse(),e);return[r,n]}function IE(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function eS(e,t){for(const r of e)if(!K7(r,{upTo:t}))return r}function K7(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 Y7(e){return e instanceof HTMLInputElement&&"select"in e}function Gs(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Y7(e)&&t&&e.select()}}var tS=J7();function J7(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=rS(e,t),e.unshift(t)},remove(t){var r;e=rS(e,t),(r=e[0])==null||r.resume()}}}function rS(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Q7(e){return e.filter(t=>t.tagName!=="A")}var sg=0;function OE(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??nS()),document.body.insertAdjacentElement("beforeend",e[1]??nS()),sg++,()=>{sg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),sg--}},[])}function nS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 5,651 bytes, lines 537-552
537style.position="fixed",e.style.pointerEvents="none",e}var Dn=function(){return Dn=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Dn.apply(this,arguments)};function ME(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function Z7(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,a;n<s;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var wh="right-scroll-bar-position",bh="width-before-scroll-bar",X7="with-scroll-bars-hidden",eq="--removed-body-scroll-bar-size";function ig(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function tq(e,t){var r=p.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var rq=typeof window<"u"?p.useLayoutEffect:p.useEffect,sS=new WeakMap;function nq(e,t){var r=tq(null,function(n){return e.forEach(function(s){return ig(s,n)})});return rq(function(){var n=sS.get(r);if(n){var s=new Set(n),a=new Set(e),o=r.current;s.forEach(function(l){a.has(l)||ig(l,null)}),a.forEach(function(l){s.has(l)||ig(l,o)})}sS.set(r,e)},[e]),r}function sq(e){return e}function iq(e,t){t===void 0&&(t=sq);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var o=t(a,n);return r.push(o),function(){r=r.filter(function(l){return l!==o})}},assignSyncMedium:function(a){for(n=!0;r.length;){var o=r;r=[],o.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var o=[];if(r.length){var l=r;r=[],l.forEach(a),o=r}var c=function(){var u=o;o=[],u.forEach(a)},d=function(){return Promise.resolve().then(c)};d(),r={push:function(u){o.push(u),d()},filter:function(u){return o=o.filter(u),r}}}};return s}function aq(e){e===void 0&&(e={});var t=iq(null);return t.options=Dn({async:!0,ssr:!1},e),t}var DE=function(e){var t=e.sideCar,r=ME(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return p.createElement(n,Dn({},r))};DE.isSideCarExport=!0;function oq(e,t){return e.useMedium(t),DE}var LE=aq(),ag=function(){},_f=p.forwardRef(function(e,t){var r=p.useRef(null),n=p.useState({onScrollCapture:ag,onWheelCapture:ag,onTouchMoveCapture:ag}),s=n[0],a=n[1],o=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,h=e.shards,m=e.sideCar,f=e.noRelative,y=e.noIsolation,x=e.inert,b=e.allowPinchZoom,g=e.as,v=g===void 0?"div":g,w=e.gapMode,j=ME(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=m,S=nq([r,t]),_=Dn(Dn({},j),s);return p.createElement(p.Fragment,null,u&&p.createElement(k,{sideCar:LE,removeScrollBar:d,shards:h,noRelative:f,noIsolation:y,inert:x,setCallbacks:a,allowPinchZoom:!!b,lockRef:r,gapMode:w}),o?p.cloneElement(p.Children.only(l),Dn(Dn({},_),{ref:S})):p.createElement(v,Dn({},_,{className:c,ref:S}),l))});_f.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};_f.classNames={fullWidth:bh,zeroRight:wh};var lq=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function cq(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=lq();return t&&e.setAttribute("nonce",t),e}function dq(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function uq(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var hq=function(){var e=0,t=null;return{add:function(r){e==0&&(t=cq())&&(dq(t,r),uq(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},mq=function(){var e=hq();return function(t,r){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},$E=function(){var e=mq(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},fq={left:0,top:0,right:0,gap:0},og=function(e){return parseInt(e||"",10)||0},pq=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[og(r),og(n),og(s)]},gq=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fq;var t=pq(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},yq=$E(),Yo="data-scroll-locked",xq=function(e,t,r,n){var s=e.left,a=e.top,o=e.right,l=e.gap;return r===void 0&&(r="margin"),` 538 .`.concat(X7,` { 539 overflow: hidden `).concat(n,`; 540 padding-right: `).concat(l,"px ").concat(n,`; 541 } 542 body[`).concat(Yo,`] { 543 overflow: hidden `).concat(n,`; 544 overscroll-behavior: contain; 545 `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` 546 padding-left: `.concat(s,`px; 547 padding-top: `).concat(a,`px; 548 padding-right: `).concat(o,`px; 549 margin-left:0; 550 margin-top:0; 551 margin-right: `).concat(l,"px ").concat(n,`; 552 `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";
552")].filter(Boolean).join(""),` 553 } 554 555 .`).concat(wh,` { 556 right: `).concat(l,"px ").concat(n,`; 557 } 558 559 .`).concat(bh,` { 560 margin-right: `).concat(l,"px ").concat(n,`; 561 } 562 563 .`).concat(wh," .").concat(wh,` { 564 right: 0 `).concat(n,`; 565 } 566 567 .`).concat(bh," .").concat(bh,` { 568 margin-right: 0 `).concat(n,`; 569 } 570 571 body[`).concat(Yo,`] { 572 `).concat(eq,": ").concat(l,`px; 573 } 574`)},iS=function(){var e=parseInt(document.body.getAttribute(Yo)||"0",10);return isFinite(e)?e:0},vq=function(){p.useEffect(function(){return document.body.setAttribute(Yo,(iS()+1).toString()),function(){var e=iS()-1;e<=0?document.body.removeAttribute(Yo):document.body.setAttribute(Yo,e.toString())}},[])},wq=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;vq();var a=p.useMemo(function(){return gq(s)},[s]);return p.createElement(yq,{styles:xq(a,!t,s,r?"":"!important")})},Rx=!1;if(typeof window<"u")try{var Uu=Object.defineProperty({},"passive",{get:function(){return Rx=!0,!0}});window.addEventListener("test",Uu,Uu),window.removeEventListener("test",Uu,Uu)}catch{Rx=!1}var ao=Rx?{passive:!1}:!1,bq=function(e){return e.tagName==="TEXTAREA"},FE=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!bq(e)&&r[t]==="visible")},jq=function(e){return FE(e,"overflowY")},kq=function(e){return FE(e,"overflowX")},aS=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=BE(e,n);if(s){var a=UE(e,n),o=a[1],l=a[2];if(o>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Sq=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},_q=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},BE=function(e,t){return e==="v"?jq(t):kq(t)},UE=function(e,t){return e==="v"?Sq(t):_q(t)},Nq=function(e,t){return e==="h"&&t==="rtl"?-1:1},Cq=function(e,t,r,n,s){var a=Nq(e,window.getComputedStyle(t).direction),o=a*n,l=r.target,c=t.contains(l),d=!1,u=o>0,h=0,m=0;do{if(!l)break;var f=UE(e,l),y=f[0],x=f[1],b=f[2],g=x-b-a*y;(y||g)&&BE(e,l)&&(h+=g,m+=y);var v=l.parentNode;l=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(u&&(Math.abs(h)<1||!s)||!u&&(Math.abs(m)<1||!s))&&(d=!0),d},Vu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oS=function(e){return[e.deltaX,e.deltaY]},lS=function(e){return e&&"current"in e?e.current:e},Aq=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Tq=function(e){return` 575 .block-interactivity-`.concat(e,` {pointer-events: none;} 576 .allow-interactivity-`).concat(e,` {pointer-events: all;} 577`)},Eq=0,oo=[];function Rq(e){var t=p.useRef([]),r=p.useRef([0,0]),n=p.useRef(),s=p.useState(Eq++)[0],a=p.useState($E)[0],o=p.useRef(e);p.useEffect(function(){o.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var x=Z7([e.lockRef.current],(e.shards||[]).map(lS),!0).filter(Boolean);return x.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),x.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=p.useCallback(function(x,b){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!o.current.allowPinchZoom;var g=Vu(x),v=r.current,w="deltaX"in x?x.deltaX:v[0]-g[0],j="deltaY"in x?x.deltaY:v[1]-g[1],k,S=x.target,_=Math.abs(w)>Math.abs(j)?"h":"v";if("touches"in x&&_==="h"&&S.type==="range")return!1;var N=aS(_,S);if(!N)return!0;if(N?k=_:(k=_==="v"?"h":"v",N=aS(_,S)),!N)return!1;if(!n.current&&"changedTouches"in x&&(w||j)&&(n.current=k),!k)return!0;var T=n.current||k;return Cq(T,b,x,T==="h"?w:j,!0)},[]),c=p.useCallback(function(x){var b=x;if(!(!oo.length||oo[oo.length-1]!==a)){var g="deltaY"in b?oS(b):Vu(b),v=t.current.filter(function(k){return k.name===b.type&&(k.target===b.target||b.target===k.shadowParent)&&Aq(k.delta,g)})[0];if(v&&v.should){b.cancelable&&b.preventDefault();return}
vendor: 4,333 bytes, line 577
577if(!v){var w=(o.current.shards||[]).map(lS).filter(Boolean).filter(function(k){return k.contains(b.target)}),j=w.length>0?l(b,w[0]):!o.current.noIsolation;j&&b.cancelable&&b.preventDefault()}}},[]),d=p.useCallback(function(x,b,g,v){var w={name:x,delta:b,target:g,should:v,shadowParent:Pq(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(j){return j!==w})},1)},[]),u=p.useCallback(function(x){r.current=Vu(x),n.current=void 0},[]),h=p.useCallback(function(x){d(x.type,oS(x),x.target,l(x,e.lockRef.current))},[]),m=p.useCallback(function(x){d(x.type,Vu(x),x.target,l(x,e.lockRef.current))},[]);p.useEffect(function(){return oo.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",c,ao),document.addEventListener("touchmove",c,ao),document.addEventListener("touchstart",u,ao),function(){oo=oo.filter(function(x){return x!==a}),document.removeEventListener("wheel",c,ao),document.removeEventListener("touchmove",c,ao),document.removeEventListener("touchstart",u,ao)}},[]);var f=e.removeScrollBar,y=e.inert;return p.createElement(p.Fragment,null,y?p.createElement(a,{styles:Tq(s)}):null,f?p.createElement(wq,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Pq(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Iq=oq(LE,Rq);var db=p.forwardRef(function(e,t){return p.createElement(_f,Dn({},e,{ref:t,sideCar:Iq}))});db.classNames=_f.classNames;var Oq=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},lo=new WeakMap,Hu=new WeakMap,zu={},lg=0,VE=function(e){return e&&(e.host||VE(e.parentNode))},Mq=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=VE(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Dq=function(e,t,r,n){var s=Mq(t,Array.isArray(e)?e:[e]);zu[r]||(zu[r]=new WeakMap);var a=zu[r],o=[],l=new Set,c=new Set(s),d=function(h){!h||l.has(h)||(l.add(h),d(h.parentNode))};s.forEach(d);var u=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(m){if(l.has(m))u(m);else try{var f=m.getAttribute(n),y=f!==null&&f!=="false",x=(lo.get(m)||0)+1,b=(a.get(m)||0)+1;lo.set(m,x),a.set(m,b),o.push(m),x===1&&y&&Hu.set(m,!0),b===1&&m.setAttribute(r,"true"),y||m.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",m,g)}})};return u(t),l.clear(),lg++,function(){o.forEach(function(h){var m=lo.get(h)-1,f=a.get(h)-1;lo.set(h,m),a.set(h,f),m||(Hu.has(h)||h.removeAttribute(n),Hu.delete(h)),f||h.removeAttribute(r)}),lg--,lg||(lo=new WeakMap,lo=new WeakMap,Hu=new WeakMap,zu={})}},HE=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=Oq(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),Dq(n,s,r,"aria-hidden")):function(){return null}},Nf="Dialog",[zE,tZ]=wr(Nf),[Lq,Sn]=zE(Nf),WE=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:a,modal:o=!0}=e,l=p.useRef(null),c=p.useRef(null),[d,u]=wn({prop:n,defaultProp:s??!1,onChange:a,caller:Nf});return i.jsx(Lq,{scope:t,triggerRef:l,contentRef:c,contentId:Un(),titleId:Un(),descriptionId:Un(),open:d,onOpenChange:u,onOpenToggle:p.useCallback(()=>u(h=>!h),[u]),modal:o,children:r})};WE.displayName=Nf;var qE="DialogTrigger",GE=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Sn(qE,r),a=Le(t,s.triggerRef);return i.jsx(le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":mb(s.open),...n,ref:a,onClick:de(e.onClick,s.onOpenToggle)})});GE.displayName=qE;var ub="DialogPortal",[$q,KE]=zE(ub,{forceMount:void 0}),YE=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,a=Sn(ub,t);return i.jsx($q,{scope:t,forceMount:r,children:p.Children.map(n,o=>i.jsx(Rs,{present:r||a.open,children:i.jsx(Wm,{asChild:!0,container:s,children:o})}))})};YE.displayName=ub;var xm="DialogOverlay",JE=p.forwardRef((e,t)=>{const r=KE(xm,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,a=Sn(xm,e.__scopeDialog);return a.modal?i.jsx(Rs,{present:n||a.open,children:i.jsx(Bq,{...s,ref:t})}):null});JE.displayName=xm;var Fq=pl("DialogOverlay.RemoveScroll"),Bq=p.forwardRef((e,t)=>
vendor: 4,638 bytes, lines 577-581
577{const{__scopeDialog:r,...n}=e,s=Sn(xm,r);return i.jsx(db,{as:Fq,allowPinchZoom:!0,shards:[s.contentRef],children:i.jsx(le.div,{"data-state":mb(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Ba="DialogContent",QE=p.forwardRef((e,t)=>{const r=KE(Ba,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,a=Sn(Ba,e.__scopeDialog);return i.jsx(Rs,{present:n||a.open,children:a.modal?i.jsx(Uq,{...s,ref:t}):i.jsx(Vq,{...s,ref:t})})});QE.displayName=Ba;var Uq=p.forwardRef((e,t)=>{const r=Sn(Ba,e.__scopeDialog),n=p.useRef(null),s=Le(t,r.contentRef,n);return p.useEffect(()=>{const a=n.current;if(a)return HE(a)},[]),i.jsx(ZE,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:de(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:de(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&a.preventDefault()}),onFocusOutside:de(e.onFocusOutside,a=>a.preventDefault())})}),Vq=p.forwardRef((e,t)=>{const r=Sn(Ba,e.__scopeDialog),n=p.useRef(!1),s=p.useRef(!1);return i.jsx(ZE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:a=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=a.target;((d=r.triggerRef.current)==null?void 0:d.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})}),ZE=p.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:a,...o}=e,l=Sn(Ba,r),c=p.useRef(null),d=Le(t,c);return OE(),i.jsxs(i.Fragment,{children:[i.jsx(cb,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:a,children:i.jsx(zd,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":mb(l.open),...o,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(Hq,{titleId:l.titleId}),i.jsx(Wq,{contentRef:c,descriptionId:l.descriptionId})]})]})}),hb="DialogTitle",XE=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Sn(hb,r);return i.jsx(le.h2,{id:s.titleId,...n,ref:t})});XE.displayName=hb;var eR="DialogDescription",tR=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Sn(eR,r);return i.jsx(le.p,{id:s.descriptionId,...n,ref:t})});tR.displayName=eR;var rR="DialogClose",nR=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Sn(rR,r);return i.jsx(le.button,{type:"button",...n,ref:t,onClick:de(e.onClick,()=>s.onOpenChange(!1))})});nR.displayName=rR;function mb(e){return e?"open":"closed"}var sR="DialogTitleWarning",[rZ,iR]=IM(sR,{contentName:Ba,titleName:hb,docsSlug:"dialog"}),Hq=({titleId:e})=>{const t=iR(sR),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 578 579If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 580 581For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},zq="DialogDescriptionWarning",Wq=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${iR(zq).contentName}}.`;return p.useEffect(()=>{var a;const s=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},qq=WE,Gq=GE,Kq=YE,aR=JE,oR=QE,lR=XE,cR=tR,Yq=nR;const Vi=qq,dR=Gq,Jq=Kq,uR=p.forwardRef(({className:e,...t},r)=>i.jsx(aR,{ref:r,className:Q("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}));uR.displayName=aR.displayName;const Os=p.forwardRef(({className:e,children:t,...r},n)=>i.jsxs(Jq,{children:[i.jsx(uR,{}),i.jsxs(oR,{ref:n,className:Q("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
581nded-lg",e),...r,children:[t,i.jsxs(Yq,{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:[i.jsx(Da,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Os.displayName=oR.displayName;const Ms=({className:e,...t})=>i.jsx("div",{className:Q("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ms.displayName="DialogHeader";const Ka=({className:e,...t})=>i.jsx("div",{className:Q("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ka.displayName="DialogFooter";const Ds=p.forwardRef(({className:e,...t},r)=>i.jsx(lR,{ref:r,className:Q("text-lg font-semibold leading-none tracking-tight",e),...t}));Ds.displayName=lR.displayName;const fb=p.forwardRef(({className:e,...t},r)=>i.jsx(cR,{ref:r,className:Q("text-sm text-muted-foreground",e),...t}));fb.displayName=cR.displayName;const we=p.forwardRef(({className:e,type:t,...r},n)=>i.jsx("input",{type:t,className:Q("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:n,...r}));we.displayName="Input";var Qq="Label",hR=p.forwardRef((e,t)=>i.jsx(le.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));hR.displayName=Qq;var mR=hR;const Zq=Km("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),pe=p.forwardRef(({className:e,...t},r)=>i.jsx(mR,{ref:r,className:Q(Zq(),e),...t}));pe.displayName=mR.displayName;function Xq({sessionId:e,className:t,open:r,onOpenChange:n,onBooked:s}){const[a,o]=p.useState(""),[l,c]=p.useState(""),[d,u]=p.useState(!1);async function h(m){if(m.preventDefault(),!e)return;u(!0);const{data:f,error:y}=await F.functions.invoke("book-trial-guest",{body:{session_id:e,guest_name:a.trim(),guest_email:l.trim()}});u(!1);const x=f==null?void 0:f.error;if(y||x){ce.error(x||"Could not book your trial. Please try again.");return}const b=f==null?void 0:f.status;ce.success(b==="waitlisted"?"Class is full â you're on the waitlist. We'll be in touch!":"You're booked! Check your email for details."),o(""),c(""),n(!1),s()}return i.jsx(Vi,{open:r,onOpenChange:n,children:i.jsxs(Os,{children:[i.jsxs(Ms,{children:[i.jsxs(Ds,{children:["Book a Trial â ",t]}),i.jsx(fb,{children:"No account needed. Enter your details and we'll save you a spot."})]}),i.jsxs("form",{onSubmit:h,className:"space-y-4",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"guest-name",children:"Your name"}),i.jsx(we,{id:"guest-name",value:a,required:!0,onChange:m=>o(m.target.value)})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"guest-email",children:"Email"}),i.jsx(we,{id:"guest-email",type:"email",value:l,required:!0,onChange:m=>c(m.target.value)})]}),i.jsx(Ka,{children:i.jsxs(I,{type:"submit",disabled:d,className:"bg-gradient-gold font-semibold text-primary-foreground hover:opacity-90",children:[d&&i.jsx(Be,{className:"mr-2 h-4 w-4 animate-spin"}),"Reserve my trial"]})})]})]})})}function eG({category:e,classSlug:t}){const{user:r}=Ga(),n=Bi(),s=yw(),[a,o]=p.useState(null),[l,c]=p.useState(null),d=hh({queryKey:["sessions"],queryFn:F7}),u=hh({queryKey:["availability"],queryFn:B7}),h=hh({queryKey:["my-bookings",r==null?void 0:r.id],queryFn:()=>U7(r.id),enabled:!!r}),m=p.useMemo(()=>{const v=new Map;return(h.data??[]).forEach(w=>v.set(w.session_id,w)),v},[h.data]);function f(){s.invalidateQueries({queryKey:["availability"]}),s.invalidateQueries({queryKey:["my-bookings"]})}async function y(v){if(r){o(v);try{await V7(r.id,v),ce.success("You're booked!"),f()}catch{ce.error("Could not reserve. You may already be booked.")}finally{o(null)}}}async function x(v,w){o(w);try{await PE(v),ce.success("Booking cancelled."),f()}catch{ce.error("Could not cancel. Please try again.")}finally{o(null)}}const b=p.useMemo(()=>{let w=d.data??[];return e&&(w=w.filter(j=>{var k;return((k=j.class_offerings)==null?void 0:k.category)===e})),t&&(w=w.filter(j=>{var k;return((k=j.class_offerings)==null?void 0:k.class_slug)===t})),w},[d.data,e,t]),g=p.useMemo(()=>{const v=[],w=new Map;return b.forEach(j=>{w.has(j.session_date)||w.set(j.session_date,[]),w.get(j.session_date).push(j)}
581),[...w.keys()].sort().forEach(j=>v.push({date:j,sessions:w.get(j)})),v},[b]);return d.isLoading?i.jsx("div",{className:"flex justify-center py-16",children:i.jsx(Be,{className:"h-8 w-8 animate-spin text-primary"})}):g.length===0?i.jsxs("div",{className:"flex flex-col items-center gap-3 py-16 text-center text-muted-foreground",children:[i.jsx(PD,{className:"h-10 w-10 text-primary/60"}),i.jsx("p",{children:"No upcoming classes scheduled right now. Check back soon!"})]}):i.jsxs("div",{className:"space-y-10",children:[g.map(({date:v,sessions:w})=>i.jsxs("div",{children:[i.jsx("h3",{className:"mb-4 font-heading text-sm font-semibold uppercase tracking-[0.2em] text-primary",children:$7(v)}),i.jsx("div",{className:"space-y-3",children:w.map(j=>{var k;return i.jsx(z7,{session:j,availability:(k=u.data)==null?void 0:k.get(j.id),myBooking:m.get(j.id),isLoggedIn:!!r,busy:a===j.id,onReserve:()=>y(j.id),onCancel:()=>{const S=m.get(j.id);S&&x(S.id,j.id)},onTrial:()=>{var S;return c({id:j.id,title:((S=j.class_offerings)==null?void 0:S.title)??"Class"})},onSignIn:()=>n("/auth")},j.id)})})]},v)),i.jsx(Xq,{sessionId:(l==null?void 0:l.id)??null,className:(l==null?void 0:l.title)??"",open:!!l,onOpenChange:v=>!v&&c(null),onBooked:f})]})}function tG(){const{slug:e}=Kd(),t=bd(e||"");return t?i.jsxs(i.Fragment,{children:[i.jsx($e,{path:`/classes/${(t==null?void 0:t.slug)??""}/signup`,title:"Class Signup â BladeFit Academy",description:"Reserve a place in a BladeFit Academy class.",noindex:!0}),i.jsx("section",{className:"border-b border-border bg-card py-16 pt-24",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsxs(B,{to:`/classes/${t.slug}`,className:"mb-6 inline-flex items-center text-sm text-muted-foreground transition-colors hover:text-primary",children:[i.jsx(Wn,{className:"mr-1 h-4 w-4"}),"Back to ",t.name]}),i.jsxs("div",{className:"flex flex-col items-start gap-4 sm:flex-row sm:items-center sm:justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"font-heading text-3xl font-bold md:text-4xl",children:t.currentlyRunning?`Sign Up for ${t.name}`:`${t.name} Waitlist`}),i.jsx("p",{className:"mt-2 text-muted-foreground",children:t.currentlyRunning?"Choose a schedule below to reserve your spot.":"Be the first to know when this class returns. Sign up below to join the waitlist."})]}),i.jsx(B,{to:"/trial",children:i.jsxs(I,{className:"bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:[i.jsx(qe,{className:"mr-2 h-4 w-4"}),"Book a Trial Class Instead"]})})]})]})}),i.jsx("section",{className:"py-12",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs("div",{className:"mx-auto max-w-3xl",children:[!t.currentlyRunning&&i.jsx("div",{className:"mb-8 rounded-lg border border-primary/20 bg-primary/5 p-5 text-sm text-muted-foreground",children:"This class isn't currently on the schedule. When sessions are added they'll appear here to book."}),i.jsx(eG,{classSlug:t.slug})]})})})]}):i.jsxs("div",{className:"container mx-auto flex min-h-[60vh] flex-col items-center justify-center px-4 text-center",children:[i.jsx("h1",{className:"font-heading text-3xl font-bold",children:"Page Not Found"}),i.jsx("p",{className:"mt-3 text-muted-foreground",children:"No signup form is available for this class."}),i.jsx(B,{to:e?`/classes/${e}`:"/",className:"mt-6",children:i.jsxs(I,{variant:"outline",children:[i.jsx(Wn,{className:"mr-2 h-4 w-4"}),"Back to Class"]})})]})}const rG="https://calendar.google.com/calendar/embed?src=c_954140f2fdbf337f881762a50d08df5bb3e2e2671c1ecc7ca881cb8ea7216e74%40group.calendar.google.com&ctz=America%2FLos_Angeles&mode=MONTH";function nG(){return i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/schedule"}),i.jsx("section",{className:"border-b border-border bg-card py-20",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[i.jsx("p",{className:"mb-3 font-heading text-sm font-semibold uppercase tracking-[0.3em] text-primary",children:"Schedule"}),i.jsx("h1",{className:"font-heading text-4xl font-bold md:text-5xl",children:"Class Schedule"}),i.jsx("p",{className:"mt-4 text-lg text-muted-foreground",children:"View all classes, events, and schedule changes on our live calendar."})]})})}),i.jsx("section",{className:"py-16",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsx("div",{className:"mx-auto max-w-4xl overflow-hidden rounded-lg border border-border shadow-md",children:i.jsx("iframe",{src:rG,title:"BladeFit Academy Calendar",className:"w-full border-0",style:{minHeight:600},loading:"lazy"})})})}),i.jsx(sb,{heading:"New here? Next steps",steps:[{to:"/trial",title:"Book a $5 trial class",description:"One
581class, all gear loaned, no experience needed. The easiest way to start.",icon:qe},{to:"/gear",title:"What to bring",description:"Gear guides by class â plus what we loan you for your first visits.",icon:gl},{to:"/memberships",title:"Memberships & pricing",description:"Options for adults, youth, and families once your trial is done.",icon:_y},{to:"/faq",title:"Common questions",description:"Ages, footwear policy, safety, and how classes actually run.",icon:Qm}]})]})}const sG=["Choose a class that fits your age and interest","Show up in comfortable athletic clothing â no gear needed","Meet the instructor and train with the group","Decide if BladeFit is right for you â no pressure"];function iG(){return i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/trial"}),i.jsx("section",{className:"border-b border-border bg-card py-20",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"max-w-2xl",children:[i.jsx("p",{className:"mb-3 font-heading text-sm font-semibold uppercase tracking-[0.3em] text-primary",children:"Try Us Out"}),i.jsx("h1",{className:"font-heading text-4xl font-bold md:text-5xl",children:"Trial Class â $5"}),i.jsx("p",{className:"mt-4 text-lg text-muted-foreground leading-relaxed",children:"No commitment. No gear required. Just $5 to try a class, meet the instructors, and see if BladeFit is right for you. We'll take care of the rest."})]})})}),i.jsx("section",{className:"py-16",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs("div",{className:"mx-auto max-w-2xl",children:[i.jsx("h2",{className:"mb-8 font-heading text-2xl font-semibold",children:"How It Works"}),i.jsx("div",{className:"space-y-4",children:sG.map((e,t)=>i.jsxs(L.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.4,delay:t*.1},className:"flex items-start gap-3",children:[i.jsx(qh,{className:"mt-0.5 h-5 w-5 shrink-0 text-primary"}),i.jsx("p",{className:"text-muted-foreground",children:e})]},t))}),i.jsxs("div",{className:"mt-10 rounded-lg border border-border bg-card p-6",children:[i.jsx("h3",{className:"mb-2 font-heading text-lg font-semibold",children:"What to Bring"}),i.jsxs("ul",{className:"space-y-2 text-sm text-muted-foreground",children:[i.jsx("li",{children:"⢠Comfortable athletic clothing"}),i.jsx("li",{children:"⢠Water bottle"}),i.jsx("li",{children:"⢠Indoor athletic shoes"}),i.jsx("li",{children:"⢠A willingness to learn!"})]})]})]})})}),i.jsx("section",{className:"border-t border-border bg-card py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsx("h2",{className:"mb-8 text-center font-heading text-2xl font-semibold",children:"Who's Trying a Class?"}),i.jsxs("div",{className:"mx-auto grid max-w-2xl gap-6 sm:grid-cols-2",children:[i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"flex flex-col rounded-lg border border-border bg-background p-6 text-center",children:[i.jsx(ar,{className:"mx-auto mb-4 h-10 w-10 text-primary"}),i.jsx("h3",{className:"font-heading text-xl font-semibold",children:"Youth Trial"}),i.jsx("p",{className:"mt-2 flex-1 text-sm text-muted-foreground",children:"Ages 6â18. Fun, structured training with foam and soft weapons. Perfect for kids and teens."}),i.jsx("a",{href:"https://bladefit-academy.gymdesk.com/signup/v/AvJWW",target:"_blank",rel:"noopener noreferrer",children:i.jsxs(I,{className:"mt-6 w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:["Sign Up â Youth Trial",i.jsx(xt,{className:"ml-2 h-4 w-4"})]})})]}),i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.2},className:"flex flex-col rounded-lg border border-border bg-background p-6 text-center",children:[i.jsx(qe,{className:"mx-auto mb-4 h-10 w-10 text-primary"}),i.jsx("h3",{className:"font-heading text-xl font-semibold",children:"Adult Trial"}),i.jsx("p",{className:"mt-2 flex-1 text-sm text-muted-foreground",children:"Ages 18+. Authentic HEMA training â longsword, saber, and more. All experience levels welcome."}),i.jsx("a",{href:"https://bladefit-academy.gymdesk.com/signup/v/DLy7q",target:"_blank",rel:"noopener noreferrer",children:i.jsxs(I,{className:"mt-6 w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:["Sign Up â Adult Trial",i.jsx(xt,{className:"ml-2 h-4 w-4"})]})})]})]})]})}),i.jsx("section",{className:"border-t border-border py-12",children:i.jsx("div",{className:"container mx-auto px-4 text-center lg:px-8",children:i.jsxs("p",{className:"text-muted-foreground",children:["Not sure which class?"," ",i.jsx(B,{to:"/schedule",className:"font-medium text-primary hover:underline",children:"View the full schedule"})," ","or"," ",i.jsx(B,{to:"/contact",className:"font-medium text-primary hover:underline",children:"contact us"})," ","for guidance."]})})})]})}const aG=xs.filter(e=>e.gearItems&&e.gearItems.length>0||e.tieredGear&&e.tieredGear.length>0||e.coachRecommendations&&e.coachRecommendations.length>0||Zw(e.slug).length>0);function oG(){return i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/gear"}),i.jsx("section",{className:"border-b border-border bg-card py-20",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs(L.div,{initial:{opacity:0,y:20}
581,animate:{opacity:1,y:0},transition:{duration:.5},className:"max-w-2xl",children:[i.jsx("p",{className:"mb-3 font-heading text-sm font-semibold uppercase tracking-[0.3em] text-primary",children:"Student Gear"}),i.jsx("h1",{className:"font-heading text-4xl font-bold md:text-5xl",children:"Academy Gear & Equipment"}),i.jsx("p",{className:"mt-4 text-lg text-muted-foreground",children:"Find the right gear for your class. Each program has its own gear page with specific equipment recommendations and direct links to trusted vendors."})]})})}),i.jsx("section",{className:"py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"mb-8",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(Sa,{className:"h-5 w-5 text-primary"}),i.jsx("p",{className:"font-heading text-sm font-semibold uppercase tracking-[0.3em] text-primary",children:"By Program"})]}),i.jsx("h2",{className:"font-heading text-3xl font-bold",children:"Class-Specific Gear"}),i.jsx("p",{className:"mt-2 text-muted-foreground",children:"Each class has its own gear page with uniforms, training equipment, and coach recommendations."})]}),i.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:aG.map((e,t)=>{const r=_l[e.slug];return i.jsx(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,delay:t*.05},children:i.jsxs(B,{to:`/gear/class/${e.slug}`,className:"group flex flex-col overflow-hidden rounded-lg border border-border bg-card transition-all hover:border-primary/50 hover:shadow-md",children:[r&&i.jsx("div",{className:"h-36 overflow-hidden bg-muted/30",children:i.jsx("img",{src:r,alt:`${e.name} training gear and equipment`,className:"h-full w-full object-contain transition-transform duration-300 group-hover:scale-105",loading:"lazy"})}),i.jsxs("div",{className:"flex flex-1 flex-col p-5",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("h3",{className:"font-heading text-lg font-semibold group-hover:text-primary transition-colors",children:e.name}),i.jsx(xt,{className:"h-4 w-4 text-muted-foreground group-hover:text-primary transition-colors"})]}),e.ageRange&&i.jsx("p",{className:"mt-1 text-sm text-primary",children:e.ageRange}),i.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"View all required gear & shop links"})]})]})},e.slug)})})]})}),i.jsx("section",{className:"border-t border-border py-16",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsx(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"rounded-lg border border-primary/20 bg-primary/5 p-8 md:p-10",children:i.jsxs("div",{className:"flex flex-col items-start gap-6 md:flex-row md:items-center md:justify-between",children:[i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("div",{className:"rounded-full bg-primary/10 p-3",children:i.jsx(Ym,{className:"h-6 w-6 text-primary"})}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-heading text-2xl font-bold",children:"Recommended Vendors"}),i.jsx("p",{className:"mt-2 max-w-xl text-muted-foreground",children:"Our coaches have compiled a comprehensive list of trusted vendors and equipment suppliers. Browse options from dozens of HEMA and martial arts gear companies all in one place."})]})]}),i.jsx("a",{href:"https://docs.google.com/spreadsheets/d/1zvAwN4ztab2VPUBFsQpZR4_YN6GsU5OtJI1hv9-1zpc/edit?gid=1232937791#gid=1232937791",target:"_blank",rel:"noopener noreferrer",className:"shrink-0",children:i.jsxs(I,{className:"bg-primary text-primary-foreground hover:bg-primary/90",children:["View Full Vendor List ",i.jsx(In,{className:"ml-2 h-4 w-4"})]})})]})})})})]})}function lG(){const{category:e}=Kd(),t=LH(e||"");return t?i.jsxs(i.Fragment,{children:[i.jsx($e,{path:`/gear/${t.slug}`,image:t.image}),i.jsx("section",{className:"border-b border-border bg-card py-20",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsxs(B,{to:"/gear",className:"mb-6 inline-flex items-center text-sm text-muted-foreground transition-colors hover:text-primary",children:[i.jsx(Wn,{className:"mr-1 h-4 w-4"}),"Back to Gear"]}),i.jsxs(L.div,{initial:{opacity:0,y:20}
581,animate:{opacity:1,y:0},transition:{duration:.5},children:[i.jsx("h1",{className:"font-heading text-4xl font-bold md:text-5xl",children:t.name}),i.jsx("p",{className:"mt-4 text-lg text-muted-foreground",children:t.shortDescription})]})]})}),i.jsx("section",{className:"py-16",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsx("div",{className:"mx-auto max-w-4xl space-y-16",children:t.classSections.map((r,n)=>i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:n*.1},children:[i.jsxs("div",{className:"mb-6",children:[i.jsx("div",{className:"flex items-center gap-2",children:i.jsx("h2",{className:"font-heading text-2xl font-semibold",children:r.className})}),r.description&&i.jsx("p",{className:"mt-2 text-muted-foreground",children:r.description})]}),r.tiered&&i.jsxs("div",{className:"rounded-lg border border-border bg-card p-5",children:[i.jsx("h3",{className:"font-heading text-lg font-semibold",children:r.tiered.category}),r.tiered.description&&i.jsx("p",{className:"mt-1 text-sm text-muted-foreground leading-relaxed",children:r.tiered.description}),r.tiered.videoId&&i.jsx("div",{className:"mt-4 aspect-video w-full max-w-md overflow-hidden rounded-lg",children:i.jsx("iframe",{src:`https://www.youtube.com/embed/${r.tiered.videoId}`,title:`${r.tiered.category} video guide`,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"h-full w-full",loading:"lazy"})}),i.jsx("div",{className:"mt-5 space-y-5",children:r.tiered.tiers.map(s=>{const a=s.tier==="Good"?"bg-emerald-500/10 text-emerald-600 border-emerald-500/30":s.tier==="Better"?"bg-blue-500/10 text-blue-600 border-blue-500/30":"bg-amber-500/10 text-amber-600 border-amber-500/30";return i.jsxs("div",{children:[i.jsx("div",{className:"flex items-center gap-2 mb-2",children:i.jsx("span",{className:`inline-flex items-center rounded-full border px-3 py-0.5 text-xs font-bold uppercase tracking-wider ${a}`,children:s.tier})}),s.description&&i.jsx("p",{className:"mb-3 text-xs text-muted-foreground leading-relaxed",children:s.description}),s.items.length>0?i.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:s.items.map(o=>i.jsxs("div",{className:"flex flex-col rounded-md border border-border bg-background p-3",children:[o.image&&i.jsx("div",{className:"mb-2 h-28 overflow-hidden rounded bg-muted/50",children:i.jsx("img",{src:o.image,alt:o.name,className:"h-full w-full object-contain",loading:"lazy"})}),i.jsx("h4",{className:"font-heading text-sm font-semibold",children:o.name}),o.description&&i.jsx("p",{className:"mt-1 flex-1 text-xs text-muted-foreground",children:o.description}),o.link&&i.jsx("a",{href:o.link,target:"_blank",rel:"noopener noreferrer",className:"mt-2 inline-block",children:i.jsxs(I,{size:"sm",variant:"outline",className:"border-primary/30 text-xs hover:border-primary hover:text-primary",children:["Shop Now ",i.jsx(In,{className:"ml-1.5 h-3 w-3"})]})})]},o.name))}):i.jsx("p",{className:"text-xs italic text-muted-foreground",children:"Combine items from the tiers above."})]},s.tier)})})]}),r.items&&r.items.length>0&&i.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:r.items.map((s,a)=>i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,delay:.1+a*.05},className:"flex flex-col rounded-lg border border-border bg-card p-4",children:[i.jsx("div",{className:"mb-3 h-36 overflow-hidden rounded-md bg-muted/50",children:i.jsx("img",{src:s.image,alt:s.name,className:"h-full w-full object-contain",loading:"lazy"})}),i.jsx("span",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-primary",children:s.category}),i.jsx("h4",{className:"font-heading text-sm font-semibold",children:s.name}),i.jsx("p",{className:"mt-1 flex-1 text-xs text-muted-foreground",children:s.description}),s.price&&i.jsx("p",{className:"mt-2 text-sm font-semibold",children:s.price}),i.jsx("a",{href:s.link,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block",children:i.jsxs(I,{size:"sm",variant:"outline",className:"border-primary/30 hover:border-primary hover:text-primary",children:["Shop Now ",i.jsx(In,{className:"ml-2 h-3 w-3"})]})})]},s.name))}),r.coachRecs&&i.jsxs("div",{children:[i.jsxs("h3",{className:"mb-3 font-heading text-lg font-semibold text-primary flex items-center gap-2",children:[i.jsx(Ma,{className:"h-4 w-4"}),r.coachRecs.heading]}),i.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:r.coachRecs.items.map((s,a)=>i.jsxs(L.div,{initial:{opacity:0,y:20}
581,animate:{opacity:1,y:0},transition:{duration:.4,delay:.1+a*.05},className:"flex flex-col rounded-lg border border-border bg-card p-4",children:[s.image&&i.jsx("div",{className:"mb-3 h-36 overflow-hidden rounded-md bg-muted/50",children:i.jsx("img",{src:s.image,alt:s.name,className:"h-full w-full object-contain",loading:"lazy"})}),i.jsx("h4",{className:"font-heading text-sm font-semibold",children:s.name}),s.note&&i.jsx("p",{className:"mt-1 flex-1 text-xs text-muted-foreground italic",children:s.note}),s.link&&i.jsx("a",{href:s.link,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block",children:i.jsxs(I,{size:"sm",variant:"outline",className:"border-primary/30 hover:border-primary hover:text-primary",children:["Shop Now ",i.jsx(In,{className:"ml-2 h-3 w-3"})]})})]},s.name))})]}),!r.items&&!r.tiered&&!r.coachRecs&&r.description&&i.jsxs("div",{className:"rounded-lg border border-border bg-card p-6",children:[i.jsxs("p",{className:"text-sm text-muted-foreground flex items-center gap-2",children:[i.jsx(Sa,{className:"h-4 w-4 text-primary shrink-0"}),r.description]}),i.jsx("p",{className:"mt-3 text-xs text-muted-foreground italic",children:"Detailed product recommendations coming soon."})]})]},`${r.classSlug}-${n}`))})})}),i.jsx("section",{className:"border-t border-border bg-card py-12",children:i.jsxs("div",{className:"container mx-auto px-4 text-center lg:px-8",children:[i.jsx("p",{className:"text-muted-foreground mb-4",children:"Looking for gear for a specific class?"}),i.jsx(B,{to:"/gear",children:i.jsxs(I,{variant:"outline",className:"border-primary/30 hover:border-primary hover:text-primary",children:[i.jsx(Wn,{className:"mr-2 h-4 w-4"}),"Back to All Gear"]})})]})})]}):i.jsxs("div",{className:"container mx-auto flex min-h-[60vh] flex-col items-center justify-center px-4 text-center",children:[i.jsx("h1",{className:"font-heading text-3xl font-bold",children:"Category Not Found"}),i.jsx("p",{className:"mt-3 text-muted-foreground",children:"The gear category you're looking for doesn't exist."}),i.jsx(B,{to:"/gear",className:"mt-6",children:i.jsx(I,{variant:"outline",children:"Back to Gear"})})]})}function cG(){const{classSlug:e}=Kd(),t=bd(e||"");if(!t)return i.jsxs("div",{className:"container mx-auto flex min-h-[60vh] flex-col items-center justify-center px-4 text-center",children:[i.jsx("h1",{className:"font-heading text-3xl font-bold",children:"Gear Page Not Found"}),i.jsx("p",{className:"mt-3 text-muted-foreground",children:"The gear page you're looking for doesn't exist."}),i.jsx(B,{to:"/gear",className:"mt-6",children:i.jsx(I,{variant:"outline",children:"Back to Gear"})})]});const r=_l[t.slug],s=Zw(t.slug).map(u=>{const h=u.classSections.filter(m=>m.classSlug===t.slug);return{category:u,sections:h}}),a=t.gearItems&&t.gearItems.length>0,o=t.tieredGear&&t.tieredGear.length>0,l=t.coachRecommendations&&t.coachRecommendations.length>0,c=t.gearRecommendations.length>0,d=s.length>0;return i.jsxs(i.Fragment,{children:[i.jsx($e,{path:`/gear/class/${t.slug}`}),i.jsx("section",{className:"relative border-b border-border bg-card py-20",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsxs(B,{to:"/gear",className:"mb-6 inline-flex items-center text-sm text-muted-foreground transition-colors hover:text-primary",children:[i.jsx(Wn,{className:"mr-1 h-4 w-4"}),"Back to All Gear"]}),i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"flex flex-col gap-6 md:flex-row md:items-center",children:[r&&i.jsx("div",{className:"h-24 w-40 shrink-0 overflow-hidden rounded-lg bg-muted/30",children:i.jsx("img",{src:r,alt:t.name,className:"h-full w-full object-contain"})}),i.jsxs("div",{children:[i.jsxs("p",{className:"mb-2 font-heading text-sm font-semibold uppercase tracking-[0.3em] text-primary",children:[t.category==="youth"?"Youth":"Adult"," Program Gear"]}),i.jsxs("h1",{className:"font-heading text-4xl font-bold md:text-5xl",children:[t.name," Gear"]}),t.ageRange&&i.jsx("p",{className:"mt-2 text-lg text-primary",children:t.ageRange}),i.jsxs("p",{className:"mt-3 text-muted-foreground",children:["Everything you need for ",t.name,". Shop links go directly to trusted vendors."]})]})]})]})}),i.jsx("section",{className:"py-16",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs("div",{className:"mx-auto max-w-5xl space-y-16",children:[a&&(()=>{const u=t.gearItems.reduce((m,f)=>{const y=f.category||"Equipment";return m[y]||(m[y]=[]),m[y].push(f),m},{});return Object.keys(u).map((m,f)=>i.jsxs(L.div,{initial:{opacity:0,y:20}
581,animate:{opacity:1,y:0},transition:{duration:.5,delay:f*.1},children:[i.jsxs("h2",{className:"mb-6 font-heading text-2xl font-semibold flex items-center gap-2",children:[i.jsx(gl,{className:"h-5 w-5 text-primary"}),m]}),i.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:u[m].map((y,x)=>i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,delay:x*.05},className:"flex flex-col rounded-lg border border-border bg-card p-4",children:[i.jsx("div",{className:"mb-3 h-36 overflow-hidden rounded-md bg-muted/50",children:i.jsx("img",{src:y.image,alt:y.name,className:"h-full w-full object-contain",loading:"lazy"})}),i.jsx("h4",{className:"font-heading text-sm font-semibold",children:y.name}),i.jsx("p",{className:"mt-1 flex-1 text-xs text-muted-foreground",children:y.description}),y.price&&i.jsx("p",{className:"mt-2 text-sm font-semibold",children:y.price}),i.jsx("a",{href:y.link,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block",children:i.jsxs(I,{size:"sm",variant:"outline",className:"border-primary/30 hover:border-primary hover:text-primary",children:["Shop Now ",i.jsx(In,{className:"ml-2 h-3 w-3"})]})})]},y.name))})]},m))})(),o&&t.tieredGear.map((u,h)=>i.jsx(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:h*.1},children:i.jsxs("div",{className:"rounded-lg border border-border bg-card p-5",children:[i.jsxs("h3",{className:"font-heading text-lg font-semibold flex items-center gap-2",children:[i.jsx(Oa,{className:"h-5 w-5 text-primary"}),u.category]}),u.description&&i.jsx("p",{className:"mt-1 text-sm text-muted-foreground leading-relaxed",children:u.description}),u.videoId&&i.jsx("div",{className:"mt-4 aspect-video w-full max-w-md overflow-hidden rounded-lg",children:i.jsx("iframe",{src:`https://www.youtube.com/embed/${u.videoId}`,title:`${u.category} video guide`,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"h-full w-full",loading:"lazy"})}),i.jsx("div",{className:"mt-5 grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:u.tiers.map(m=>{const f=m.tier==="Good"?"bg-emerald-500/10 text-emerald-600 border-emerald-500/30":m.tier==="Better"?"bg-blue-500/10 text-blue-600 border-blue-500/30":"bg-amber-500/10 text-amber-600 border-amber-500/30";return i.jsxs("div",{className:"flex flex-col rounded-md border border-border bg-background p-4",children:[i.jsx("div",{className:"flex items-center gap-2 mb-2",children:i.jsx("span",{className:`inline-flex items-center rounded-full border px-3 py-0.5 text-xs font-bold uppercase tracking-wider ${f}`,children:m.tier})}),m.description&&i.jsx("p",{className:"mb-3 text-xs text-muted-foreground leading-relaxed",children:m.description}),m.items.length>0?i.jsx("div",{className:"space-y-3 flex-1",children:m.items.map(y=>i.jsxs("div",{className:"flex flex-col",children:[y.image&&i.jsx("div",{className:"mb-2 h-28 overflow-hidden rounded bg-muted/50",children:i.jsx("img",{src:y.image,alt:y.name,className:"h-full w-full object-contain",loading:"lazy"})}),i.jsx("h4",{className:"font-heading text-sm font-semibold",children:y.name}),y.description&&i.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:y.description}),y.link&&i.jsx("a",{href:y.link,target:"_blank",rel:"noopener noreferrer",className:"mt-2 inline-block",children:i.jsxs(I,{size:"sm",variant:"outline",className:"border-primary/30 text-xs hover:border-primary hover:text-primary",children:["Shop Now ",i.jsx(In,{className:"ml-1.5 h-3 w-3"})]})})]},y.name))}):i.jsx("p",{className:"text-xs italic text-muted-foreground flex-1",children:"Combine items from the tiers above."})]},m.tier)})})]})},u.category)),l&&i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[i.jsxs("h2",{className:"mb-2 font-heading text-2xl font-semibold flex items-center gap-2",children:[i.jsx(Ma,{className:"h-5 w-5 text-primary"}),"Coach's Recommendations"]}),i.jsx("div",{className:"space-y-8 mt-6",children:t.coachRecommendations.map(u=>i.jsxs("div",{children:[i.jsx("h3",{className:"mb-3 font-heading text-lg font-semibold text-primary",children:u.heading}),i.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:u.items.map((h,m)=>i.jsxs(L.div,{initial:{opacity:0,y:20}
581,animate:{opacity:1,y:0},transition:{duration:.4,delay:m*.05},className:"flex flex-col rounded-lg border border-border bg-card p-4",children:[h.image&&i.jsx("div",{className:"mb-3 h-36 overflow-hidden rounded-md bg-muted/50",children:i.jsx("img",{src:h.image,alt:h.name,className:"h-full w-full object-contain",loading:"lazy"})}),i.jsx("h4",{className:"font-heading text-sm font-semibold",children:h.name}),h.note&&i.jsx("p",{className:"mt-1 flex-1 text-xs text-muted-foreground italic",children:h.note}),h.link&&i.jsx("a",{href:h.link,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block",children:i.jsxs(I,{size:"sm",variant:"outline",className:"border-primary/30 hover:border-primary hover:text-primary",children:["Shop Now ",i.jsx(In,{className:"ml-2 h-3 w-3"})]})})]},h.name))})]},u.heading))})]}),d&&s.map(({category:u,sections:h})=>i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[i.jsx("h2",{className:"mb-4 font-heading text-xl font-semibold",children:u.name}),h.map((m,f)=>i.jsxs("div",{className:"space-y-4",children:[m.description&&i.jsx("p",{className:"text-sm text-muted-foreground",children:m.description}),m.tiered&&i.jsxs("div",{className:"rounded-lg border border-border bg-card p-5",children:[i.jsxs("h3",{className:"font-heading text-lg font-semibold flex items-center gap-2",children:[i.jsx(Oa,{className:"h-5 w-5 text-primary"}),m.tiered.category]}),m.tiered.description&&i.jsx("p",{className:"mt-1 text-sm text-muted-foreground leading-relaxed",children:m.tiered.description}),m.tiered.videoId&&i.jsx("div",{className:"mt-4 aspect-video w-full max-w-md overflow-hidden rounded-lg",children:i.jsx("iframe",{src:`https://www.youtube.com/embed/${m.tiered.videoId}`,title:`${m.tiered.category} video guide`,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"h-full w-full",loading:"lazy"})}),i.jsx("div",{className:"mt-5 space-y-5",children:m.tiered.tiers.map(y=>{const x=y.tier==="Good"?"bg-emerald-500/10 text-emerald-600 border-emerald-500/30":y.tier==="Better"?"bg-blue-500/10 text-blue-600 border-blue-500/30":"bg-amber-500/10 text-amber-600 border-amber-500/30";return i.jsxs("div",{children:[i.jsx("div",{className:"flex items-center gap-2 mb-2",children:i.jsx("span",{className:`inline-flex items-center rounded-full border px-3 py-0.5 text-xs font-bold uppercase tracking-wider ${x}`,children:y.tier})}),y.description&&i.jsx("p",{className:"mb-3 text-xs text-muted-foreground leading-relaxed",children:y.description}),y.items.length>0?i.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:y.items.map(b=>i.jsxs("div",{className:"flex flex-col rounded-md border border-border bg-background p-3",children:[b.image&&i.jsx("div",{className:"mb-2 h-28 overflow-hidden rounded bg-muted/50",children:i.jsx("img",{src:b.image,alt:b.name,className:"h-full w-full object-contain",loading:"lazy"})}),i.jsx("h4",{className:"font-heading text-sm font-semibold",children:b.name}),b.description&&i.jsx("p",{className:"mt-1 flex-1 text-xs text-muted-foreground",children:b.description}),b.link&&i.jsx("a",{href:b.link,target:"_blank",rel:"noopener noreferrer",className:"mt-2 inline-block",children:i.jsxs(I,{size:"sm",variant:"outline",className:"border-primary/30 text-xs hover:border-primary hover:text-primary",children:["Shop Now ",i.jsx(In,{className:"ml-1.5 h-3 w-3"})]})})]},b.name))}):i.jsx("p",{className:"text-xs italic text-muted-foreground",children:"Combine items from the tiers above."})]},y.tier)})})]}),m.items&&m.items.length>0&&i.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:m.items.map((y,x)=>i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,delay:x*.05},className:"flex flex-col rounded-lg border border-border bg-card p-4",children:[i.jsx("div",{className:"mb-3 h-36 overflow-hidden rounded-md bg-muted/50",children:i.jsx("img",{src:y.image,alt:y.name,className:"h-full w-full object-contain",loading:"lazy"})}),i.jsx("span",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-primary",children:y.category}),i.jsx("h4",{className:"font-heading text-sm font-semibold",children:y.name}),i.jsx("p",{className:"mt-1 flex-1 text-xs text-muted-foreground",children:y.description}),y.price&&i.jsx("p",{className:"mt-2 text-sm font-semibold",children:y.price}),i.jsx("a",{href:y.link,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block",children:i.jsxs(I,{size:"sm",variant:"outline",className:"border-primary/30 hover:border-primary hover:text-primary",children:["Shop Now ",i.jsx(In,{className:"ml-2 h-3 w-3"})]})})]},y.name))}),m.coachRecs&&i.jsxs("div",{children:[i.jsxs("h3",{className:"mb-3 font-heading text-lg font-semibold text-primary flex items-center gap-2",children:[i.jsx(Ma,{className:"h-4 w-4"}),m.coachRecs.heading]}),i.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:m.coachRecs.items.map((y,x)=>i.jsxs(L.div,{initial:{opacity:0,y:20}
581,animate:{opacity:1,y:0},transition:{duration:.4,delay:x*.05},className:"flex flex-col rounded-lg border border-border bg-card p-4",children:[y.image&&i.jsx("div",{className:"mb-3 h-36 overflow-hidden rounded-md bg-muted/50",children:i.jsx("img",{src:y.image,alt:y.name,className:"h-full w-full object-contain",loading:"lazy"})}),i.jsx("h4",{className:"font-heading text-sm font-semibold",children:y.name}),y.note&&i.jsx("p",{className:"mt-1 flex-1 text-xs text-muted-foreground italic",children:y.note}),y.link&&i.jsx("a",{href:y.link,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block",children:i.jsxs(I,{size:"sm",variant:"outline",className:"border-primary/30 hover:border-primary hover:text-primary",children:["Shop Now ",i.jsx(In,{className:"ml-2 h-3 w-3"})]})})]},y.name))})]}),!m.items&&!m.tiered&&!m.coachRecs&&m.description&&i.jsx("div",{className:"rounded-lg border border-border bg-card p-6",children:i.jsxs("p",{className:"text-sm text-muted-foreground flex items-center gap-2",children:[i.jsx(Sa,{className:"h-4 w-4 text-primary shrink-0"}),m.description]})})]},`${m.classSlug}-${f}`))]},u.slug)),c&&i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[i.jsx("h2",{className:"mb-4 font-heading text-2xl font-semibold",children:"Full Gear Checklist"}),i.jsx("ul",{className:"space-y-2",children:t.gearRecommendations.map(u=>i.jsxs("li",{className:"flex items-start gap-2 text-muted-foreground",children:[i.jsx(Sa,{className:"mt-0.5 h-4 w-4 shrink-0 text-primary"}),u]},u))})]})]})})}),i.jsx(sb,{heading:"Not sure yet? Start here",steps:[{to:"/trial",title:"Book a $5 trial class",description:"We loan you all the gear for your first class â buy nothing up front.",icon:qe},{to:`/classes/${t.slug}`,title:`About ${t.name}`,description:"What the class covers, who it's for, and the historic roots behind it.",icon:Sa},{to:"/schedule",title:"Current class times",description:"See when this class runs and reserve a spot on the calendar.",icon:pr},{to:"/gear",title:"All gear guides",description:"Good / better / best picks across every class we run.",icon:gl},{to:"/faq",title:"Common questions",description:"Age rules, footwear policy, safety, and what to expect.",icon:Qm}]}),i.jsx("section",{className:"border-t border-border bg-card py-12",children:i.jsxs("div",{className:"container mx-auto flex flex-col items-center gap-4 px-4 text-center sm:flex-row sm:justify-center lg:px-8",children:[i.jsx(B,{to:`/classes/${t.slug}`,children:i.jsxs(I,{variant:"outline",className:"border-primary/30 hover:border-primary hover:text-primary",children:[i.jsx(Wn,{className:"mr-2 h-4 w-4"}),"Back to ",t.name]})}),i.jsx(B,{to:"/gear",children:i.jsx(I,{variant:"outline",className:"border-primary/30 hover:border-primary hover:text-primary",children:"View All Gear"})})]})}),i.jsx(lE,{label:t.name,secondaryTo:`/classes/${t.slug}`,secondaryLabel:"Class info"})]})}var Cf="Collapsible",[dG,fR]=wr(Cf),[uG,pb]=dG(Cf),pR=p.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:s,disabled:a,onOpenChange:o,...l}=e,[c,d]=wn({prop:n,defaultProp:s??!1,onChange:o,caller:Cf});return i.jsx(uG,{scope:r,disabled:a,contentId:Un(),open:c,onOpenToggle:p.useCallback(()=>d(u=>!u),[d]),children:i.jsx(le.div,{"data-state":yb(c),"data-disabled":a?"":void 0,...l,ref:t})})});pR.displayName=Cf;var gR="CollapsibleTrigger",yR=p.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,s=pb(gR,r);return i.jsx(le.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":yb(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:t,onClick:de(e.onClick,s.onOpenToggle)})});yR.displayName=gR;var gb="CollapsibleContent",xR=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=pb(gb,e.__scopeCollapsible);return i.jsx(Rs,{present:r||s.open,children:({present:a})=>i.jsx(hG,{...n,ref:t,present:a})})});xR.displayName=gb;var hG=p.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:s,...a}=e,o=pb(gb,r),[l,c]=p.useState(n),d=p.useRef(null),u=Le(t,d),h=p.useRef(0),m=h.current,f=p.useRef(0),y=f.current,x=o.open||l,b=p.useRef(x),g=p.useRef(void 0);return p.useEffect(()=>{const v=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(v)},[]),wt(()=>{const v=d.current;if(v){g.current=g.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const w=v.getBoundingClientRect();h.current=w.height,f.current=w.width,b.current||(v.style.transitionDuration=g.current.transitionDuration,v.style.animationName=g.current.animationName),c(n)}},[o.open,n]),i.jsx(le.div,{"data-state":yb(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!x,...a,ref:u,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:x&&s})});function yb(e){return e?"open":"closed"}var mG=pR,fG=yR,pG=xR,gG=p.createContext(void 0);function Af(e){const t=p.useContext(gG);return e||t||"ltr"}var _n="Accordion",yG=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[xb,xG,vG]=zm(_n),[Tf,nZ]=wr(_n,[vG,fR]),vb=fR(),vR=D.forwardRef((e,t)=>
581{const{type:r,...n}=e,s=n,a=n;return i.jsx(xb.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?i.jsx(kG,{...a,ref:t}):i.jsx(jG,{...s,ref:t})})});vR.displayName=_n;var[wR,wG]=Tf(_n),[bR,bG]=Tf(_n,{collapsible:!1}),jG=D.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},collapsible:a=!1,...o}=e,[l,c]=wn({prop:r,defaultProp:n??"",onChange:s,caller:_n});return i.jsx(wR,{scope:e.__scopeAccordion,value:D.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:D.useCallback(()=>a&&c(""),[a,c]),children:i.jsx(bR,{scope:e.__scopeAccordion,collapsible:a,children:i.jsx(jR,{...o,ref:t})})})}),kG=D.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},...a}=e,[o,l]=wn({prop:r,defaultProp:n??[],onChange:s,caller:_n}),c=D.useCallback(u=>l((h=[])=>[...h,u]),[l]),d=D.useCallback(u=>l((h=[])=>h.filter(m=>m!==u)),[l]);return i.jsx(wR,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:d,children:i.jsx(bR,{scope:e.__scopeAccordion,collapsible:!0,children:i.jsx(jR,{...a,ref:t})})})}),[SG,Ef]=Tf(_n),jR=D.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:s,orientation:a="vertical",...o}=e,l=D.useRef(null),c=Le(l,t),d=xG(r),h=Af(s)==="ltr",m=de(e.onKeyDown,f=>{var N;if(!yG.includes(f.key))return;const y=f.target,x=d().filter(T=>{var P;return!((P=T.ref.current)!=null&&P.disabled)}),b=x.findIndex(T=>T.ref.current===y),g=x.length;if(b===-1)return;f.preventDefault();let v=b;const w=0,j=g-1,k=()=>{v=b+1,v>j&&(v=w)},S=()=>{v=b-1,v<w&&(v=j)};switch(f.key){case"Home":v=w;break;case"End":v=j;break;case"ArrowRight":a==="horizontal"&&(h?k():S());break;case"ArrowDown":a==="vertical"&&k();break;case"ArrowLeft":a==="horizontal"&&(h?S():k());break;case"ArrowUp":a==="vertical"&&S();break}const _=v%g;(N=x[_].ref.current)==null||N.focus()});return i.jsx(SG,{scope:r,disabled:n,direction:s,orientation:a,children:i.jsx(xb.Slot,{scope:r,children:i.jsx(le.div,{...o,"data-orientation":a,ref:c,onKeyDown:n?void 0:m})})})}),vm="AccordionItem",[_G,wb]=Tf(vm),kR=D.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...s}=e,a=Ef(vm,r),o=wG(vm,r),l=vb(r),c=Un(),d=n&&o.value.includes(n)||!1,u=a.disabled||e.disabled;return i.jsx(_G,{scope:r,open:d,disabled:u,triggerId:c,children:i.jsx(mG,{"data-orientation":a.orientation,"data-state":TR(d),...l,...s,ref:t,disabled:u,open:d,onOpenChange:h=>{h?o.onItemOpen(n):o.onItemClose(n)}})})});kR.displayName=vm;var SR="AccordionHeader",_R=D.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=Ef(_n,r),a=wb(SR,r);return i.jsx(le.h3,{"data-orientation":s.orientation,"data-state":TR(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});_R.displayName=SR;var Px="AccordionTrigger",NR=D.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=Ef(_n,r),a=wb(Px,r),o=bG(Px,r),l=vb(r);return i.jsx(xb.ItemSlot,{scope:r,children:i.jsx(fG,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":s.orientation,id:a.triggerId,...l,...n,ref:t})})});NR.displayName=Px;var CR="AccordionContent",AR=D.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=Ef(_n,r),a=wb(CR,r),o=vb(r);return i.jsx(pG,{role:"region","aria-labelledby":a.triggerId,"data-orientation":s.orientation,...o,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});AR.displayName=CR;function TR(e){return e?"open":"closed"}var NG=vR,CG=kR,AG=_R,ER=NR,RR=AR;const bb=NG,Rf=p.forwardRef(({className:e,...t},r)=>i.jsx(CG,{ref:r,className:Q("border-b",e),...t}));Rf.displayName="AccordionItem";const Pf=p.forwardRef(({className:e,children:t,...r},n)=>i.jsx(AG,{className:"flex",children:i.jsxs(ER,{ref:n,className:Q("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,i.jsx(Jm,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Pf.displayName=ER.displayName;const If=p.forwardRef(({className:e,children:t,...r},n)=>i.jsx(RR,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:i.jsx("div",{className:Q("pb-4 pt-0",e),children:t})}));If.displayName=RR.displayName;function TG(){const e={"@context":"https://schema.org","@type":"FAQPage",mainEntity:kl.map(t=>
581({"@type":"Question",name:t.q,acceptedAnswer:{"@type":"Answer",text:t.a}}))};return i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/faq",jsonLd:e}),i.jsx("section",{className:"border-b border-border bg-card py-20",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[i.jsx("p",{className:"mb-3 font-heading text-sm font-semibold uppercase tracking-[0.3em] text-primary",children:"FAQ"}),i.jsx("h1",{className:"font-heading text-4xl font-bold md:text-5xl",children:"Frequently Asked Questions"}),i.jsx("p",{className:"mt-4 text-lg text-muted-foreground",children:"Everything you need to know about training at BladeFit Academy."})]})})}),i.jsx("section",{className:"py-16",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsx("div",{className:"mx-auto max-w-2xl",children:i.jsx(bb,{type:"single",collapsible:!0,className:"w-full",children:kl.map((t,r)=>i.jsxs(Rf,{value:`faq-${r}`,children:[i.jsx(Pf,{className:"text-left font-heading text-base font-medium",children:t.q}),i.jsx(If,{className:"text-muted-foreground leading-relaxed",children:t.a})]},r))})})})}),i.jsx("section",{className:"border-t border-border bg-card py-12",children:i.jsxs("div",{className:"container mx-auto px-4 text-center lg:px-8",children:[i.jsxs("p",{className:"text-muted-foreground",children:["Still have questions?"," ",i.jsx(B,{to:"/contact",className:"font-medium text-primary hover:underline",children:"Contact us"})," ","â or just come try a class!"]}),i.jsx(B,{to:"/trial",className:"mt-4 inline-block",children:i.jsxs(I,{className:"bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:[i.jsx(qe,{className:"mr-2 h-4 w-4"}),"Try a Trial Class"]})})]})})]})}const Ca=p.forwardRef(({className:e,...t},r)=>i.jsx("textarea",{className:Q("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
581ing-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:r,...t}));Ca.displayName="Textarea";function cS(e,[t,r]){return Math.min(r,Math.max(t,e))}function jb(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var EG=[" ","Enter","ArrowUp","ArrowDown"],RG=[" ","Enter"],Ua="Select",[Of,Mf,PG]=zm(Ua),[Wl,sZ]=wr(Ua,[PG,sf]),Df=sf(),[IG,Hi]=Wl(Ua),[OG,MG]=Wl(Ua),PR=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:a,value:o,defaultValue:l,onValueChange:c,dir:d,name:u,autoComplete:h,disabled:m,required:f,form:y}=e,x=Df(t),[b,g]=p.useState(null),[v,w]=p.useState(null),[j,k]=p.useState(!1),S=Af(d),[_,N]=wn({prop:n,defaultProp:s??!1,onChange:a,caller:Ua}),[T,P]=wn({prop:o,defaultProp:l,onChange:c,caller:Ua}),A=p.useRef(null),M=b?y||!!b.closest("form"):!0,[z,$]=p.useState(new Set),ae=Array.from(z).map(W=>W.props.value).join(";");return i.jsx(U3,{...x,children:i.jsxs(IG,{required:f,scope:t,trigger:b,onTriggerChange:g,valueNode:v,onValueNodeChange:w,valueNodeHasChildren:j,onValueNodeHasChildrenChange:k,contentId:Un(),value:T,onValueChange:P,open:_,onOpenChange:N,dir:S,triggerPointerDownPosRef:A,disabled:m,children:[i.jsx(Of.Provider,{scope:t,children:i.jsx(OG,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(W=>{$(q=>new Set(q).add(W))},[]),onNativeOptionRemove:p.useCallback(W=>{$(q=>{const R=new Set(q);return R.delete(W),R})},[]),children:r})}),M?i.jsxs(rP,{"aria-hidden":!0,required:f,tabIndex:-1,name:u,autoComplete:h,value:T,onChange:W=>P(W.target.value),disabled:m,form:y,children:[T===void 0?i.jsx("option",{value:""}):null,Array.from(z)]},ae):null]})})};PR.displayName=Ua;var IR="SelectTrigger",OR=p.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,a=Df(r),o=Hi(IR,r),l=o.disabled||n,c=Le(t,o.onTriggerChange),d=Mf(r),u=p.useRef("touch"),[h,m,f]=sP(x=>{const b=d().filter(w=>!w.disabled),g=b.find(w=>w.value===o.value),v=iP(b,x,g);v!==void 0&&o.onValueChange(v.value)}),y=x=>{l||(o.onOpenChange(!0),f()),x&&(o.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return i.jsx(H2,{asChild:!0,...a,children:i.jsx(le.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:l,"data-disabled":l?"":void 0,"data-placeholder":nP(o.value)?"":void 0,...s,ref:c,onClick:de(s.onClick,x=>{x.currentTarget.focus(),u.current!=="mouse"&&y(x)}),onPointerDown:de(s.onPointerDown,x=>{u.current=x.pointerType;const b=x.target;b.hasPointerCapture(x.pointerId)&&b.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(y(x),x.preventDefault())}),onKeyDown:de(s.onKeyDown,x=>{const b=h.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&m(x.key),!(b&&x.key===" ")&&EG.includes(x.key)&&(y(),x.preventDefault())})})})});OR.displayName=IR;var MR="SelectValue",DR=p.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:a,placeholder:o="",...l}=e,c=Hi(MR,r),{onValueNodeHasChildrenChange:d}=c,u=a!==void 0,h=Le(t,c.onValueNodeChange);return wt(()=>{d(u)},[d,u]),i.jsx(le.span,{...l,ref:h,style:{pointerEvents:"none"},children:nP(c.value)?i.jsx(i.Fragment,{children:o}):a})});DR.displayName=MR;var DG="SelectIcon",LR=p.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return i.jsx(le.span,{"aria-hidden":!0,...s,ref:t,children:n||"â¼"})});LR.displayName=DG;var LG="SelectPortal",$R=e=>i.jsx(Wm,{asChild:!0,...e});$R.displayName=LG;var Va="SelectContent",FR=p.forwardRef((e,t)=>{const r=Hi(Va,e.__scopeSelect),[n,s]=p.useState();if(wt(()=>{s(new DocumentFragment)},[]),!r.open){const a=n;return a?qa.createPortal(i.jsx(BR,{scope:e.__scopeSelect,children:i.jsx(Of.Slot,{scope:e.__scopeSelect,children:i.jsx("div",{children:e.children})})}),a):null}return i.jsx(UR,{...e,ref:t})});FR.displayName=Va;var sn=10,[BR,zi]=Wl(Va),$G="SelectContentImpl",FG=pl("SelectContent.RemoveScroll"),UR=p.forwardRef((e,t)=>
vendor: 14,518 bytes, line 581
581{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:a,onPointerDownOutside:o,side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:h,collisionBoundary:m,collisionPadding:f,sticky:y,hideWhenDetached:x,avoidCollisions:b,...g}=e,v=Hi(Va,r),[w,j]=p.useState(null),[k,S]=p.useState(null),_=Le(t,Y=>j(Y)),[N,T]=p.useState(null),[P,A]=p.useState(null),M=Mf(r),[z,$]=p.useState(!1),ae=p.useRef(!1);p.useEffect(()=>{if(w)return HE(w)},[w]),OE();const W=p.useCallback(Y=>{const[Fe,...nt]=M().map(Ae=>Ae.ref.current),[Te]=nt.slice(-1),_e=document.activeElement;for(const Ae of Y)if(Ae===_e||(Ae==null||Ae.scrollIntoView({block:"nearest"}),Ae===Fe&&k&&(k.scrollTop=0),Ae===Te&&k&&(k.scrollTop=k.scrollHeight),Ae==null||Ae.focus(),document.activeElement!==_e))return},[M,k]),q=p.useCallback(()=>W([N,w]),[W,N,w]);p.useEffect(()=>{z&&q()},[z,q]);const{onOpenChange:R,triggerPointerDownPosRef:O}=v;p.useEffect(()=>{if(w){let Y={x:0,y:0};const Fe=Te=>{var _e,Ae;Y={x:Math.abs(Math.round(Te.pageX)-(((_e=O.current)==null?void 0:_e.x)??0)),y:Math.abs(Math.round(Te.pageY)-(((Ae=O.current)==null?void 0:Ae.y)??0))}},nt=Te=>{Y.x<=10&&Y.y<=10?Te.preventDefault():w.contains(Te.target)||R(!1),document.removeEventListener("pointermove",Fe),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",Fe),document.addEventListener("pointerup",nt,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Fe),document.removeEventListener("pointerup",nt,{capture:!0})}}},[w,R,O]),p.useEffect(()=>{const Y=()=>R(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[R]);const[V,he]=sP(Y=>{const Fe=M().filter(_e=>!_e.disabled),nt=Fe.find(_e=>_e.ref.current===document.activeElement),Te=iP(Fe,Y,nt);Te&&setTimeout(()=>Te.ref.current.focus())}),ne=p.useCallback((Y,Fe,nt)=>{const Te=!ae.current&&!nt;(v.value!==void 0&&v.value===Fe||Te)&&(T(Y),Te&&(ae.current=!0))},[v.value]),xe=p.useCallback(()=>w==null?void 0:w.focus(),[w]),me=p.useCallback((Y,Fe,nt)=>{const Te=!ae.current&&!nt;(v.value!==void 0&&v.value===Fe||Te)&&A(Y)},[v.value]),We=n==="popper"?Ix:VR,Ze=We===Ix?{side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:h,collisionBoundary:m,collisionPadding:f,sticky:y,hideWhenDetached:x,avoidCollisions:b}:{};return i.jsx(BR,{scope:r,content:w,viewport:k,onViewportChange:S,itemRefCallback:ne,selectedItem:N,onItemLeave:xe,itemTextRefCallback:me,focusSelectedItem:q,selectedItemText:P,position:n,isPositioned:z,searchRef:V,children:i.jsx(db,{as:FG,allowPinchZoom:!0,children:i.jsx(cb,{asChild:!0,trapped:v.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:de(s,Y=>{var Fe;(Fe=v.trigger)==null||Fe.focus({preventScroll:!0}),Y.preventDefault()}),children:i.jsx(zd,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:i.jsx(We,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:Y=>Y.preventDefault(),...g,...Ze,onPlaced:()=>$(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:de(g.onKeyDown,Y=>{const Fe=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!Fe&&Y.key.length===1&&he(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let Te=M().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(Te=Te.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const _e=Y.target,Ae=Te.indexOf(_e);Te=Te.slice(Ae+1)}setTimeout(()=>W(Te)),Y.preventDefault()}})})})})})})});UR.displayName=$G;var BG="SelectItemAlignedPosition",VR=p.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,a=Hi(Va,r),o=zi(Va,r),[l,c]=p.useState(null),[d,u]=p.useState(null),h=Le(t,_=>u(_)),m=Mf(r),f=p.useRef(!1),y=p.useRef(!0),{viewport:x,selectedItem:b,selectedItemText:g,focusSelectedItem:v}=o,w=p.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&d&&x&&b&&g){const _=a.trigger.getBoundingClientRect(),N=d.getBoundingClientRect(),T=a.valueNode.getBoundingClientRect(),P=g.getBoundingClientRect();if(a.dir!=="rtl"){const _e=P.left-N.left,Ae=T.left-_e,_t=_.left-Ae,It=_.width+_t,Gr=Math.max(It,N.width),cr=window.innerWidth-sn,Zn=cS(Ae,[sn,Math.max(sn,cr-Gr)]);l.style.minWidth=It+"px",l.style.left=Zn+"px"}else{const _e=N.right-P.right,Ae=window.innerWidth-T.right-_e,_t=window.innerWidth-_.right-Ae,It=_.width+_t,Gr=Math.max(It,N.width),cr=window.innerWidth-sn,Zn=cS(Ae,[sn,Math.max(sn,cr-Gr)]);l.style.minWidth=It+"px",l.style.right=Zn+"px"}const A=m(),M=window.innerHeight-sn*2,z=x.scrollHeight,$=window.getComputedStyle(d),ae=parseInt($.borderTopWidth,10),W=parseInt($.paddingTop,10),q=parseInt($.borderBottomWidth,10),R=parseInt($.paddingBottom,10),O=ae+W+z+R+q,V=Math.min(b.offsetHeight*5,O),he=window.getComputedStyle(x),ne=parseInt(he.paddingTop,10),xe=parseInt(he.paddingBottom,10),me=_.top+_.height/2-sn,We=M-me,Ze=b.offsetHeight/2,Y=b.offsetTop+Ze,Fe=ae+W+Y,nt=O-Fe;if(Fe<=me){const _e=A.length>0&&b===A[A.length-1].ref.current;l.style.bottom="0px";const Ae=d.clientHeight-x.offsetTop-x.offsetHeight,_t=Math.max(We,Ze+(_e?xe:0)+Ae+q),It=Fe+_t;l.style.height=It+"px"}else{const _e=A.length>0&&b===A[0].ref.current;l.style.top="0px";const _t=Math.max(me,ae+x.offsetTop+(_e?ne:0)+Ze)+nt;l.style.height=_t+"px",x.scrollTop=Fe-me+x.offsetTop}l.style.margin=`${sn}px 0`,l.style.minHeight=V+"px",l.style.maxHeight=M+"px",n==null||n(),requestAnimationFrame(()=>f.current=!0)}},[m,a.trigger,a.valueNode,l,d,x,b,g,a.dir,n]);wt(()=>w(),[w]);const[j,k]=p.useState();wt(()=>{d&&k(window.getComputedStyle(d).zIndex)},[d]);const S=p.useCallback(_=>{_&&y.current===!0&&(w(),v==null||v(),y.current=!1)},[w,v]);return i.jsx(VG,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:f,onScrollButtonChange:S,children:i.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:i.jsx(le.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});VR.displayName=BG;var UG="SelectPopperPosition",Ix=p.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=sn,...a}=e,o=Df(r);return i.jsx(z2,{...o,...a,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...a.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)"}})});Ix.displayName=UG;var[VG,kb]=Wl(Va,{}),Ox="SelectViewport",HR=p.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,a=zi(Ox,r),o=kb(Ox,r),l=Le(t,a.onViewportChange),c=p.useRef(0);return i.jsxs(i.Fragment,{children:[i.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:n}),i.jsx(Of.Slot,{scope:r,children:i.jsx(le.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:de(s.onScroll,d=>{const u=d.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=o;if(m!=null&&m.current&&h){const f=Math.abs(c.current-u.scrollTop);if(f>0){const y=window.innerHeight-sn*2,x=parseFloat(h.style.minHeight),b=parseFloat(h.style.height),g=Math.max(x,b);if(g<y){const v=g+f,w=Math.min(y,v),j=v-w;h.style.height=w+"px",h.style.bottom==="0px"&&(u.scrollTop=j>0?j:0,h.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});HR.displayName=Ox;var zR="SelectGroup",[HG,zG]=Wl(zR),WG=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Un();return i.jsx(HG,{scope:r,id:s,children:i.jsx(le.div,{role:"group","aria-labelledby":s,...n,ref:t})})});WG.displayName=zR;var WR="SelectLabel",qR=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=zG(WR,r);return i.jsx(le.div,{id:s.id,...n,ref:t})});qR.displayName=WR;var wm="SelectItem",[qG,GR]=Wl(wm),KR=p.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:a,...o}=e,l=Hi(wm,r),c=zi(wm,r),d=l.value===n,[u,h]=p.useState(a??""),[m,f]=p.useState(!1),y=Le(t,v=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,v,n,s)}),x=Un(),b=p.useRef("touch"),g=()=>{s||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")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 i.jsx(qG,{scope:r,value:n,disabled:s,textId:x,isSelected:d,onItemTextChange:p.useCallback(v=>{h(w=>w||((v==null?void 0:v.textContent)??"").trim())},[]),children:i.jsx(Of.ItemSlot,{scope:r,value:n,disabled:s,textValue:u,children:i.jsx(le.div,{role:"option","aria-labelledby":x,"data-highlighted":m?"":void 0,"aria-selected":d&&m,"data-state":d?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:y,onFocus:de(o.onFocus,()=>f(!0)),onBlur:de(o.onBlur,()=>f(!1)),onClick:de(o.onClick,()=>{b.current!=="mouse"&&g()}),onPointerUp:de(o.onPointerUp,()=>{b.current==="mouse"&&g()}),onPointerDown:de(o.onPointerDown,v=>{b.current=v.pointerType}),onPointerMove:de(o.onPointerMove,v=>{var w;b.current=v.pointerType,s?(w=c.onItemLeave)==null||w.call(c):b.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:de(o.onPointerLeave,v=>{var w;v.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:de(o.onKeyDown,v=>{var j;((j=c.searchRef)==null?void 0:j.current)!==""&&v.key===" "||(RG.includes(v.key)&&g(),v.key===" "&&v.preventDefault())})})})})});KR.displayName=wm;var Cc="SelectItemText",YR=p.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...a}=e,o=Hi(Cc,r),l=zi(Cc,r),c=GR(Cc,r),d=MG(Cc,r),[u,h]=p.useState(null),m=Le(t,g=>h(g),c.onItemTextChange,g=>{var v;return(v=l.itemTextRefCallback)==null?void 0:v.call(l,g,c.value,c.disabled)}),f=u==null?void 0:u.textContent,y=p.useMemo(()=>i.jsx("option",{value:c.value,disabled:c.disabled,children:f},c.value),[c.disabled,c.value,f]),{onNativeOptionAdd:x,onNativeOptionRemove:b}=d;return wt(()=>(x(y),()=>b(y)),[x,b,y]),i.jsxs(i.Fragment,{children:[i.jsx(le.span,{id:c.textId,...a,ref:m}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?qa.createPortal(a.children,o.valueNode):null]})});YR.displayName=Cc;var JR="SelectItemIndicator",QR=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return GR(JR,r).isSelected?i.jsx(le.span,{"aria-hidden":!0,...n,ref:t}):null});QR.displayName=JR;var Mx="SelectScrollUpButton",ZR=p.forwardRef((e,t)=>{const r=zi(Mx,e.__scopeSelect),n=kb(Mx,e.__scopeSelect),[s,a]=p.useState(!1),o=Le(t,n.onScrollButtonChange);return wt(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=c.scrollTop>0;a(d)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),s?i.jsx(eP,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});ZR.displayName=Mx;var Dx="SelectScrollDownButton",XR=p.forwardRef((e,t)=>{const r=zi(Dx,e.__scopeSelect),n=kb(Dx,e.__scopeSelect),[s,a]=p.useState(!1),o=Le(t,n.onScrollButtonChange);return wt(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<d;a(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),s?i.jsx(eP,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});XR.displayName=Dx;var eP=p.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,a=zi("SelectScrollButton",r),o=p.useRef(null),l=Mf(r),c=p.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return p.useEffect(()=>()=>c(),[c]),wt(()=>{var u;const d=l().find(h=>h.ref.current===document.activeElement);(u=d==null?void 0:d.ref.current)==null||u.scrollIntoView({block:"nearest"})},[l]),i.jsx(le.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:de(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:de(s.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:de(s.onPointerLeave,()=>{c()})})}),GG="SelectSeparator",tP=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return i.jsx(le.div,{"aria-hidden":!0,...n,ref:t})});tP.displayName=GG;var Lx="SelectArrow",KG=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Df(r),a=Hi(Lx,r),o=zi(Lx,r);return a.open&&o.position==="popper"?i.jsx(W2,{...s,...n,ref:t}):null});KG.displayName=Lx;var YG="SelectBubbleInput",rP=p.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const s=p.useRef(null),a=Le(n,s),o=jb(t);return p.useEffect(()=>{const l=s.current;if(!l)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&u){const h=new Event("change",{bubbles:!0});u.call(l,t),l.dispatchEvent(h)}},[o,t]),i.jsx(le.select,{...r,style:{...LC,...r.style},ref:a,defaultValue:t})});rP.displayName=YG;function nP(e){return e===""||e===void 0}function sP(e){const t=Tr(e),r=p.useRef(""),n=p.useRef(0),s=p.useCallback(o=>{const l=r.current+o;t(l),function c(d){r.current=d,window.clearTimeout(n.current),d!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),a=p.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,a]}function iP(e,t,r){const s=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let o=JG(e,Math.max(a,0));s.length===1&&(o=o.filter(d=>d!==r));const c=o.find(d=>d.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function JG(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var QG=PR,aP=OR,ZG=DR,XG=LR,eK=$R,oP=FR,tK=HR,lP=qR,cP=KR,rK=YR,nK=QR,dP=ZR,uP=XR,hP=tP;const mi=QG,fi=ZG,ps=p.forwardRef(({className:e,children:t,...r},n)=>i.jsxs(aP,{ref:n,className:Q("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
581ing-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),...r,children:[t,i.jsx(XG,{asChild:!0,children:i.jsx(Jm,{className:"h-4 w-4 opacity-50"})})]}));ps.displayName=aP.displayName;const mP=p.forwardRef(({className:e,...t},r)=>i.jsx(dP,{ref:r,className:Q("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(ID,{className:"h-4 w-4"})}));mP.displayName=dP.displayName;const fP=p.forwardRef(({className:e,...t},r)=>i.jsx(uP,{ref:r,className:Q("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(Jm,{className:"h-4 w-4"})}));fP.displayName=uP.displayName;const gs=p.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>i.jsx(eK,{children:i.jsxs(oP,{ref:s,className:Q("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",r==="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:r,...n,children:[i.jsx(mP,{}),i.jsx(tK,{className:Q("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),i.jsx(fP,{})]})}));gs.displayName=oP.displayName;const sK=p.forwardRef(({className:e,...t},r)=>i.jsx(lP,{ref:r,className:Q("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));sK.displayName=lP.displayName;const Jt=p.forwardRef(({className:e,children:t,...r},n)=>i.jsxs(cP,{ref:n,className:Q("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),...r,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(nK,{children:i.jsx(Ps,{className:"h-4 w-4"})})}),i.jsx(rK,{children:t})]}));Jt.displayName=cP.displayName;const iK=p.forwardRef(({className:e,...t},r)=>i.jsx(hP,{ref:r,className:Q("-mx-1 my-1 h-px bg-muted",e),...t}));iK.displayName=hP.displayName;function sa(e){return{content:[{type:"text",text:e}]}}function pP(e){if(typeof window>"u"||e.length===0)return()=>{};const t=e.map(({name:s,description:a,inputSchema:o})=>({name:s,description:a,inputSchema:o}));window.__webmcpTools=[...window.__webmcpTools??[],...t];const r=navigator.modelContext,n=[];try{if(r!=null&&r.registerTool)for(const s of e){const a=r.registerTool(s);
581a&&typeof a.unregister=="function"&&n.push(()=>a.unregister())}else r!=null&&r.provideContext&&r.provideContext({tools:e})}catch{}return()=>{for(const a of n)try{a()}catch{}const s=new Set(t.map(a=>a.name));window.__webmcpTools=(window.__webmcpTools??[]).filter(a=>!s.has(a.name))}}const Et={none:{type:"object",properties:{},additionalProperties:!1},object(e,t=[]){return{type:"object",properties:e,required:t,additionalProperties:!1}}};function aK(e){p.useEffect(()=>{const t=typeof e=="function"?e():e;return pP(t)},[])}const oK={"@context":"https://schema.org","@type":"LocalBusiness",name:"BladeFit Academy",image:"https://bladefitacademy.com/favicon.ico",url:"https://bladefitacademy.com/",telephone:"+1-360-207-0252",email:"[email protected]",address:{"@type":"PostalAddress",streetAddress:"7588 Delaware Lane",addressLocality:"Vancouver",addressRegion:"WA",postalCode:"98684",addressCountry:"US"}};function lK(){const[e,t]=p.useState(!1);aK(()=>[{name:"fill_contact_form",description:"Fill out the BladeFit Academy contact form with a visitor's name, email, topic of interest, and message. Does not submit â the visitor reviews and sends it.",inputSchema:Et.object({name:{type:"string",description:"Visitor's full name"},email:{type:"string",description:"Visitor's email address"},interest:{type:"string",description:"Topic of interest",enum:["youth","adult","trial","events","gear","other"]},message:{type:"string",description:"The message to send"}},["name","email","message"]),execute:n=>{const s=(a,o)=>{const l=document.getElementById(a);l&&typeof o=="string"&&o&&(l.value=o,l.dispatchEvent(new Event("input",{bubbles:!0})))};return s("name",n==null?void 0:n.name),s("email",n==null?void 0:n.email),s("message",n==null?void 0:n.message),sa("Contact form filled in. The visitor can review and press âSend Messageâ.")}}]);const r=n=>{n.preventDefault(),t(!0),setTimeout(()=>{t(!1),ce.success("Message sent! We'll get back to you soon."),n.target.reset()},1e3)};return i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/contact",jsonLd:oK}),i.jsx("section",{className:"border-b border-border bg-card py-20",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[i.jsx("p",{className:"mb-3 font-heading text-sm font-semibold uppercase tracking-[0.3em] text-primary",children:"Contact"}),i.jsx("h1",{className:"font-heading text-4xl font-bold md:text-5xl",children:"Get in Touch"}),i.jsx("p",{className:"mt-4 text-lg text-muted-foreground",children:"Questions about classes, memberships, or events? We'd love to hear from you."})]})})}),i.jsx("section",{className:"py-16",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs("div",{className:"mx-auto grid max-w-4xl gap-12 lg:grid-cols-5",children:[i.jsx(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"lg:col-span-3",children:i.jsxs("form",{onSubmit:r,className:"space-y-5",children:[i.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(pe,{htmlFor:"name",children:"Name"}),i.jsx(we,{id:"name",name:"name",required:!0,autoComplete:"name",placeholder:"Your name","aria-label":"Your full name"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(pe,{htmlFor:"email",children:"Email"}),i.jsx(we,{id:"email",name:"email",type:"email",required:!0,autoComplete:"email",placeholder:"[email protected]","aria-label":"Your email address"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(pe,{htmlFor:"interest",children:"I'm interested inâ¦"}),i.jsxs(mi,{name:"interest",children:[i.jsx(ps,{id:"interest","aria-label":"Topic you are interested in",children:i.jsx(fi,{placeholder:"Select a topic"})}),i.jsxs(gs,{children:[i.jsx(Jt,{value:"youth",children:"Youth Programs"}),i.jsx(Jt,{value:"adult",children:"Adult Programs"}),i.jsx(Jt,{value:"trial",children:"Trial Class"}),i.jsx(Jt,{value:"events",children:"Events / Parties"}),i.jsx(Jt,{value:"gear",children:"Gear"}),i.jsx(Jt,{value:"other",children:"Other"})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(pe,{htmlFor:"message",children:"Message"}),i.jsx(Ca,{id:"message",name:"message",required:!0,"aria-label":"Your message to BladeFit Academy",placeholder:"Tell us what you'd like to knowâ¦",rows:5})]}),i.jsxs(I,{type:"submit",disabled:e,className:"bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:[i.jsx(XD,{className:"mr-2 h-4 w-4"}),e?"Sendingâ¦":"Send Message"]})]})}),i.jsxs(L.div,{initial:{opacity:0,y:20}
581,animate:{opacity:1,y:0},transition:{duration:.5,delay:.2},className:"space-y-6 lg:col-span-2",children:[i.jsxs("div",{className:"rounded-lg border border-border bg-card p-6",children:[i.jsx("h3",{className:"mb-4 font-heading text-lg font-semibold",children:"Contact Info"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(Ol,{className:"mt-0.5 h-5 w-5 shrink-0 text-primary"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Location"}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:["7588 Delaware Lane",i.jsx("br",{}),"Vancouver, WA 98684"]})]})]}),i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(o2,{className:"mt-0.5 h-5 w-5 shrink-0 text-primary"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Email"}),i.jsx("a",{href:"mailto:[email protected]",className:"text-sm text-muted-foreground transition-colors hover:text-primary",children:"[email protected]"})]})]}),i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(Zv,{className:"mt-0.5 h-5 w-5 shrink-0 text-primary"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Phone"}),i.jsx("a",{href:"tel:+13602070252",className:"text-sm text-muted-foreground transition-colors hover:text-primary",children:"(360) 207-0252"})]})]})]})]}),i.jsxs("div",{className:"rounded-lg border border-primary/30 bg-primary/5 p-6 text-center",children:[i.jsx("p",{className:"font-heading text-sm font-semibold text-primary",children:"Quick Start"}),i.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Skip the form â just come try a class!"}),i.jsx("a",{href:"/trial",className:"mt-3 inline-block",children:i.jsx(I,{size:"sm",className:"bg-gradient-gold font-semibold text-primary-foreground hover:opacity-90",children:"Trial Class â"})})]})]})]})})})]})}function Sb({gymId:e,formId:t}){const r=p.useRef(null);return p.useEffect(()=>{if(!r.current)return;const n=t?` attr-form="${t}"`:"";r.current.innerHTML=`<div class="gymdesk-booking" attr-gym="${e}"${n}></div>`,document.querySelectorAll('script[src*="gymdesk.com/js/widgets"]').forEach(a=>a.remove());const s=document.createElement("script");return s.src="https://app.gymdesk.com/js/widgets.js",s.async=!0,document.body.appendChild(s),()=>{r.current&&(r.current.innerHTML="")}},[e,t]),i.jsx("div",{ref:r,className:"mt-6 w-full min-h-[400px]"})}const cK="/assets/quarterstaff-historic-zonIGzSZ.jpg",$x="/assets/battle-of-the-blades-banner-BhWPRRbp.png",dK="/assets/youth-tournament-bd2di35n.jpg",uK="/assets/black-light-fight-night-DZcvKkAk.jpg",hK=1,mK="aeadea8b-fcc3-4c27-adfe-675ca6b2892a",fK="32565fbf-e4e6-44cc-b23c-87c113644be1",pK="/__l5e/assets-v1/aeadea8b-fcc3-4c27-adfe-675ca6b2892a/womens-self-defense-2026.png",gK="a/v1/32565fbf-e4e6-44cc-b23c-87c113644be1/aeadea8b-fcc3-4c27-adfe-675ca6b2892a/womens-self-defense-2026.png",yK="womens-self-defense-2026.png",xK=1836599,vK="image/png",wK="2026-09-03T15:36:46Z",bK={version:hK,asset_id:mK,project_id:fK,url:pK,r2_key:gK,original_filename:yK,size:xK,content_type:vK,created_at:wK},jK={womensSelfDefense:bK.url,battleOfTheBlades:$x,quarterstaff:cK,youthTournament:dK,blackLightFightNight:uK},Fx=cm(),dS=aE(),uS=Xw(),hS=Fx.filter(e=>e.startDate).map(e=>({"@context":"https://schema.org","@type":"Event",name:e.title,startDate:e.startDate,endDate:e.endDate??e.startDate,eventStatus:"https://schema.org/EventScheduled",eventAttendanceMode:"https://schema.org/OfflineEventAttendanceMode",description:e.description,location:{"@type":"Place",name:e.location,address:e.location},organizer:{"@type":"Organization",name:e.organizer??oe.name,url:e.bookingUrl??oe.url},...e.price?{offers:{"@type":"Offer",price:e.price,priceCurrency:"USD"}}:{},...e.bookingUrl||e.linkTo?{url:e.bookingUrl??`${oe.url}${e.linkTo}`}:{}}));function cg({event:e,past:t}){const r=e.bannerKey?jK[e.bannerKey]:void 0;return i.jsxs("article",{className:`overflow-hidden rounded-lg border border-border bg-card ${t?"opacity-90":""}`,children:[i.jsxs("div",{className:"relative bg-background px-6 py-8 md:px-12 md:py-10",children:[e.tag&&i.jsx("span",{className:"mb-3 inline-block rounded-full bg-primary/10 px-3 py-1 text-xs font-semibold uppercase tracking-wider text-primary",children:t?`${e.tag} · Completed`:e.tag}),i.jsx("h3",{className:"font-heading text-2xl font-bold tracking-wide md:text-3xl",children:e.title}),i.jsxs("p",{className:"mt-2 text-lg font-semibold text-primary",children:[e.startDate?i.jsx("time",{dateTime:e.startDate,children:e.date}):e.date,e.time&&` · ${e.time}`]}),e.organizer&&i.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Hosted by ",i.jsx("span",{className:"font-medium text-foreground",children:e.organizer})]}),i.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Status: ",i.jsx("span",{className:"font-medium text-foreground",children:BH(e)})]})]}),r&&!t&&i.jsx("div",{className:"flex justify-center bg-black/5",children:i.jsx("img",{src:r,alt:`${e.title} event banner â BladeFit Academy`,loading:"lazy",className:`w-full object-contain ${e.bannerKey==="womensSelfDefense"?"max-h-[48rem]":"max-h-64"}`})}),i.jsxs("div",{className:"border-t border-border px-6 py-8 md:px-12",children:[i.jsx("p",{className:"text-lg font-medium",children:e.description}),e.details&&i.jsx("p",{className:"mx-auto mt-4 max-w-2xl text-muted-foreground leading-relaxed whitespace-pre-line",children:e.details}),i.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-6 text-sm text-muted-foreground",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(pr,{className:"h-4 w-4 text-primary","aria-hidden":"true"}),i.jsx("span",{children:e.date})]}),e.time&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Nr,{className:"h-4 w-4 text-primary","aria-hidden":"true"}),i.jsx("span",{children:e.time})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Ol,{className:"h-4 w-4 text-primary","aria-hidden":"true"}),i.jsx("span",{children:e.location})]})]}),e.price&&i.jsx("p",{className:"mt-4 font-semibold",children:e.price}),!t&&e.hasBookingWidget&&i.jsx(Sb,{gymId:"A1mKL",formId:"6a2JN"}),!t&&e.linkTo&&i.jsx("div",{className:"mt-6",children:i.jsx(B,{to:e.linkTo,children:i.jsx(I,{size:"lg",children:"Reserve Your Spot â"})})}),!t&&e.bookingUrl&&!e.hasBookingWidget&&!e.linkTo&&i.jsx("div",{className:"mt-6",children:i.jsx("a",{href:e.bookingUrl,target:"_blank",rel:"noopener noreferrer",children:i.jsx(I,{size:"lg",children:e.buttonText??(e.organizer?"Visit Website":"Book Your Spot")}
581)})})]})]})}const kK=()=>i.jsxs("div",{className:"min-h-screen pt-20",children:[i.jsx($e,{path:"/events",jsonLd:hS.length?hS:void 0}),i.jsx("section",{className:"border-b border-border bg-card py-16",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"max-w-3xl",children:[i.jsx("h1",{className:"font-heading text-4xl font-bold md:text-5xl",children:"Events"}),i.jsx("p",{className:"mt-4 text-lg text-muted-foreground leading-relaxed",children:"Tournaments, sparring nights, intensive workshops, and community events hosted by and attended by BladeFit Academy throughout the year."}),i.jsxs("p",{className:"mt-4 text-sm text-muted-foreground",children:["Last updated"," ",i.jsx("time",{dateTime:Fa,children:VH()})]})]})})}),i.jsx("section",{className:"py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold md:text-3xl",children:"Upcoming Events"}),i.jsx("p",{className:"mt-2 text-muted-foreground",children:"Confirmed events with a scheduled date."}),Fx.length===0?i.jsxs("p",{className:"mt-6 text-muted-foreground",children:["No events have a confirmed date right now. See the planned events below, or"," ",i.jsx(B,{to:"/contact",className:"font-medium text-primary hover:underline",children:"contact us"})," ","to be notified."]}):i.jsx("div",{className:"mt-10 space-y-8",children:Fx.map(e=>i.jsx(cg,{event:e},e.slug))})]})}),dS.length>0&&i.jsx("section",{className:"border-t border-border py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold md:text-3xl",children:"Planned Events â Dates To Be Announced"}),i.jsx("p",{className:"mt-2 text-muted-foreground",children:"These events are planned but do not have a confirmed calendar date yet. Dates will be published here as soon as they are set."}),i.jsx("div",{className:"mt-10 space-y-8",children:dS.map(e=>i.jsx(cg,{event:e},e.slug))})]})}),uS.length>0&&i.jsx("section",{className:"border-t border-border py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsxs("h2",{className:"flex items-center gap-2 font-heading text-2xl font-bold md:text-3xl",children:[i.jsx(CD,{className:"h-6 w-6 text-primary","aria-hidden":"true"}),"Past Events Archive"]}),i.jsx("p",{className:"mt-2 text-muted-foreground",children:"Events that have already taken place, kept here for reference."}),i.jsx("div",{className:"mt-10 space-y-8",children:uS.map(e=>i.jsx(cg,{event:e,past:!0},e.slug))})]})}),i.jsx("section",{className:"border-t border-border bg-card py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold md:text-3xl",children:"What to Expect"}),i.jsx("div",{className:"mt-8 grid gap-8 md:grid-cols-3",children:[{icon:qe,title:"Tournaments",description:"In-house and inter-club tournaments where students test their skills in structured competitive bouts."},{icon:Ma,title:"Intensive Workshops",description:"One-day deep dives into specific weapon systems or te
581chniques â learn from guest instructors and visiting masters."},{icon:pr,title:"Community Events",description:"Sparring nights, themed fight nights, demos, and gatherings that bring the HEMA community together."}].map(e=>i.jsxs("div",{className:"rounded-lg border border-border bg-background p-6",children:[i.jsx(e.icon,{className:"h-8 w-8 text-primary","aria-hidden":"true"}),i.jsx("h3",{className:"mt-4 font-heading text-lg font-semibold",children:e.title}),i.jsx("p",{className:"mt-2 text-sm text-muted-foreground leading-relaxed",children:e.description})]},e.title))})]})})]}),SK=()=>i.jsxs("div",{className:"min-h-screen pt-20",children:[i.jsx($e,{path:"/events/battle-of-the-blades",image:$x}),i.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"Event",name:"Battle of the Blades â Open Sparring Night",description:"BladeFit Academy's open sparring night: cross steel, test your edge, and meet the HEMA community in Vancouver, WA.",eventStatus:"https://schema.org/EventScheduled",eventAttendanceMode:"https://schema.org/OfflineEventAttendanceMode",startDate:"2026-09-01T18:00:00-07:00",url:"https://bladefitacademy.com/events/battle-of-the-blades",organizer:{"@type":"Organization",name:"BladeFit Academy",url:"https://bladefitacademy.com/"},location:{"@type":"Place",name:"BladeFit Academy",address:{"@type":"PostalAddress",streetAddress:"7588 Delaware Lane",addressLocality:"Vancouver",addressRegion:"WA",postalCode:"98684",addressCountry:"US"}}})}}),i.jsx("section",{className:"border-b border-border bg-card py-16",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"max-w-3xl",children:[i.jsx("span",{className:"mb-3 inline-block rounded-full bg-primary/10 px-3 py-1 text-xs font-semibold uppercase tracking-wider text-primary",children:"Sparring Night"}),i.jsx("h1",{className:"font-heading text-4xl font-bold md:text-5xl",children:"âï¸ Battle of the Blades"}),i.jsx("p",{className:"mt-4 text-xl font-medium text-foreground",children:"Cross steel. Test your edge. Meet the community."}),i.jsx("p",{className:"mt-2 text-lg font-semibold text-primary",children:"Coming Soon â Date TBD"})]})})}),i.jsx("section",{className:"flex justify-center bg-black/5",children:i.jsx("img",{src:$x,alt:"Battle of the Blades banner",className:"w-full max-h-80 object-contain"})}),i.jsx("section",{className:"py-16",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs("div",{className:"max-w-3xl",children:[i.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"By popular demand after our last Battle of the Blades, we're bringing it back. Last time filled the room with great fights, new matchups, and a strong mix of styles â so we're opening the gym again for another round."}),i.jsx("p",{className:"mt-4 text-lg text-muted-foreground leading-relaxed",children:"This is your chance to cross steel with people you don't normally fence, test your timing against different approaches, and sharpen your game in a room full of experienced fighters."}),i.jsx("h2",{className:"mt-10 font-heading text-2xl font-bold",children:"What to Expect"}),i.jsxs("ul",{className:"mt-4 space-y-2 text-muted-foreground leading-relaxed",children:[i.jsx("li",{children:"⢠Open sparring with experienced fencers"}),i.jsx("li",{children:"⢠A mix of weapons and styles"}),i.jsx("li",{children:"⢠A focused, high-quality training environment"}),i.jsx("li",{children:"⢠A strong community atmosphere"})]}),i.jsx("h2",{className:"mt-10 font-heading text-2xl font-bold",children:"What to Bring"}),i.jsx("p",{className:"mt-4 text-muted-foreground leading-relaxed",children:"Longsword, saber, rapier, smallsword, sidesword â if it's steel, bring it."}),i.jsx("h2",{className:"mt-10 font-heading text-2xl font-bold",children:"Who It's For"}),i.jsx("p",{className:"mt-4 text-muted-foreground leading-relaxed",children:"Fencers with prior steel experience and their own equipment."}),i.jsx("h2",{className:"mt-10 font-heading text-2xl font-bold",children:"After the Event"}),i.jsx("p",{className:"mt-4 text-muted-foreground leading-relaxed",children:"Afterward, we'll head out for food and drinks at Thirsty Sasquatch / Hungry Sasquatch â 2110 Main St, Vancouver, WA 98660."}),i.jsx("p",{className:"mt-6 text-lg font-semibold text-foreground",children:"ð Last time filled the room â don't miss this one."}),i.jsxs("div",{className:"mt-10 flex flex-wrap items-center gap-6 text-sm text-muted-foreground",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(pr,{className:"h-4 w-4 text-primary"}),i.jsx("span",{children:"Date TBD"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Ol,{className:"h-4 w-4 text-primary"}),i.jsx("span",{children:"BladeFit Academy · 7588 Delaware Lane, Vancouver, WA 98684"})]})]}),i.jsx(Sb,{gymId:"A1mKL",formId:"6a2JN"})]})})})]}),Pe=p.forwardRef(({className:e,...t},r)=>i.jsx("div",{ref:r,className:Q("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));
581Pe.displayName="Card";const Ke=p.forwardRef(({className:e,...t},r)=>i.jsx("div",{ref:r,className:Q("flex flex-col space-y-1.5 p-6",e),...t}));Ke.displayName="CardHeader";const Ye=p.forwardRef(({className:e,...t},r)=>i.jsx("h3",{ref:r,className:Q("text-2xl font-semibold leading-none tracking-tight",e),...t}));Ye.displayName="CardTitle";const gP=p.forwardRef(({className:e,...t},r)=>i.jsx("p",{ref:r,className:Q("text-sm text-muted-foreground",e),...t}));gP.displayName="CardDescription";const Me=p.forwardRef(({className:e,...t},r)=>i.jsx("div",{ref:r,className:Q("p-6 pt-0",e),...t}));Me.displayName="CardContent";const qc=p.forwardRef(({className:e,...t},r)=>i.jsx("div",{ref:r,className:Q("flex items-center p-6 pt-0",e),...t}));qc.displayName="CardFooter";const Xt={initial:{opacity:0,y:20},animate:{opacity:1,y:0}};function mS({plan:e,index:t}){return i.jsx(L.div,{...Xt,transition:{duration:.4,delay:t*.1},children:i.jsxs(Pe,{className:`relative flex h-full flex-col ${e.popular?"border-primary shadow-gold":""}`,children:[e.popular&&i.jsx("span",{className:"absolute -top-3 left-1/2 -translate-x-1/2 rounded-full bg-gradient-gold px-3 py-0.5 text-xs font-semibold text-primary-foreground",children:"Most Popular"}),i.jsxs(Ke,{className:"text-center",children:[i.jsx("div",{className:"mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary",children:i.jsx(qe,{className:"h-6 w-6"})}),i.jsx(Ye,{className:"text-xl",children:e.title}),i.jsxs("div",{className:"mt-2",children:[i.jsx("span",{className:"text-3xl font-bold text-foreground",children:e.price}),i.jsx("span",{className:"text-sm text-muted-foreground",children:e.period})]}),i.jsx(gP,{className:"mt-2",children:e.description})]}),i.jsx(Me,{className:"flex-1",children:i.jsx("p",{className:"text-sm text-muted-foreground italic",children:e.note})}),i.jsx(qc,{className:"flex-col gap-2",children:i.jsx(B,{to:"/trial",className:"w-full",children:i.jsxs(I,{className:"w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:["Start with a Trial",i.jsx(xt,{className:"ml-2 h-4 w-4"})]})})})]})})}function _K(){return i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/memberships"}),i.jsx("section",{className:"border-b border-border bg-card py-20",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs(L.div,{...Xt,transition:{duration:.5},className:"max-w-2xl",children:[i.jsx("p",{className:"mb-3 font-heading text-sm font-semibold uppercase tracking-[0.3em] text-primary",children:"Membership"}),i.jsx("h1",{className:"font-heading text-4xl font-bold md:text-5xl",children:"Membership at BladeFit Academy"}),i.jsx("p",{className:"mt-4 text-lg text-muted-foreground leading-relaxed",children:"Membership is based on how many days per week you train â not on individual classes. Train consistently, attend different classes on your training days, and progress at your own pace."})]})})}),i.jsx("section",{className:"py-16",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsx("div",{className:"mx-auto max-w-3xl",children:i.jsxs(L.div,{...Xt,transition:{duration:.5},children:[i.jsx("h2",{className:"mb-6 font-heading text-2xl font-semibold",children:"How Membership Works"}),i.jsx("div",{className:"space-y-3",children:["You don't pay per class â you join the academy and train as part of the program.","Choose how many days per week you want to train.","Attend any classes offered on your training days.","Progress at your own pace within the program."].map((e,t)=>i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(qh,{className:"mt-0.5 h-5 w-5 shrink-0 text-primary"}),i.jsx("p",{className:"text-muted-foreground",children:e})]},t))})]})})})}),i.jsx("section",{className:"border-y border-border bg-card py-12",children:i.jsx("div",{className:"container mx-auto px-4 text-center lg:px-8",children:i.jsxs(L.div,{...Xt,transition:{duration:.5},className:"mx-auto max-w-xl",children:[i.jsx(qn,{className:"mx-auto mb-4 h-10 w-10 text-primary"}),i.jsx("h2",{className:"font-heading text-2xl font-semibold",children:"Start with a Trial Class"}),i.jsx("p",{className:"mt-3 text-muted-foreground",children:"Before choosing a membership, we recommend trying a class. Experience real training, meet the instructors, and ask questions about schedules, gear, and membership options."}),i.jsx("p",{className:"mt-2 text-sm text-muted-foreground italic",children:"Most students begin with a $5 trial before enrolling."}),i.jsx(B,{to:"/trial",children:i.jsxs(I,{className:"mt-6 bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:["Try a Trial Class",i.jsx(xt,{className:"ml-2 h-4 w-4"})]})})]})})}),i.jsx("section",{className:"py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsxs(L.div,{...Xt,transition:{duration:.5},className:"mb-10 max-w-2xl",children:[i.jsx("h2",{className:"font-heading text-3xl font-bold",children:"Punch Cards"}),i.jsx("p",{className:"mt-3 text-muted-foreground",children:"Prefer to train at your own pace? Punch cards give you a set number of classes to use whenever you like. Punch cards can be shared by everyone in a family."})]}),i.jsx("div",{className:"mx-auto grid max-w-4xl gap-6 sm:grid-cols-3",children:kd.map((e,t)=>i.jsx(L.div,{...Xt,transition:{duration:.4,delay:t*.1},children:i.jsxs(Pe,{className:"flex h-full flex-col text-center",children:[i.jsxs(Ke,{children:[i.jsx("div",{className:"mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary",children:i.jsx(qe,{className:"h-6 w-6"})}),i.jsx(Ye,{className:"text-lg",children:e.title}),i.jsx("div",{className:"mt-2",children:i.jsx("span",{className:"text-3xl font-bold text-foreground",children:e.price})})]}),i.jsx(Me,{className:"flex-1",children:i.jsx("ul",{className:"space-y-2 text-left",children:e.details.map(r=>i.jsxs("li",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[i.jsx(qh,{className:"mt-0.5 h-4 w-4 shrink-0 text-primary"}),r]},r))})}),i.jsx(qc,{children:e.title==="5 Sparring Sessions"?i.jsx(B,{to:"/contact",className:"w-full",children:i.jsxs(I,{className:"w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:["Contact Us to Purchase",i.jsx(xt,{className:"ml-2 h-4 w-4"})]})}):i.jsx(B,{to:"/trial",className:"w-full",children:i.jsxs(I,{className:"w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:["Start with a Trial",i.jsx(xt,{className:"ml-2 h-4 w-4"})]})})})]})}
581,e.title))})]})}),i.jsx("section",{className:"py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsxs(L.div,{...Xt,transition:{duration:.5},className:"mb-10 max-w-2xl",children:[i.jsx("h2",{className:"font-heading text-3xl font-bold",children:"Monthly Individual Memberships"}),i.jsx("p",{className:"mt-3 text-muted-foreground",children:"Monthly memberships based on how many classes you train per week. Available for youth and adult students alike."})]}),i.jsx("div",{className:"mx-auto grid max-w-2xl gap-6 sm:grid-cols-2",children:qo.map((e,t)=>i.jsx(mS,{plan:e,index:t},e.title))})]})}),i.jsx("section",{className:"border-t border-border bg-card py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsxs(L.div,{...Xt,transition:{duration:.5},className:"mb-10 max-w-2xl",children:[i.jsx("h2",{className:"font-heading text-3xl font-bold",children:"Monthly Family Memberships"}),i.jsx("p",{className:"mt-3 text-muted-foreground",children:"Train together and save. Family memberships cover everyone in your household on a single monthly plan."})]}),i.jsx("div",{className:"space-y-10",children:vf.map((e,t)=>i.jsxs(L.div,{...Xt,transition:{duration:.4,delay:t*.1},children:[i.jsx("h3",{className:"mb-4 font-heading text-xl font-semibold",children:e.tier}),i.jsx("div",{className:"grid gap-6 sm:grid-cols-3",children:e.plans.map(r=>i.jsxs(Pe,{className:"flex h-full flex-col text-center",children:[i.jsxs(Ke,{children:[i.jsx("div",{className:"mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary",children:i.jsx(ar,{className:"h-6 w-6"})}),i.jsx(Ye,{className:"text-lg",children:r.title}),i.jsxs("div",{className:"mt-2",children:[i.jsx("span",{className:"text-3xl font-bold text-foreground",children:r.price}),i.jsx("span",{className:"text-sm text-muted-foreground",children:r.period})]})]}),i.jsx(qc,{className:"mt-auto",children:i.jsx(B,{to:"/trial",className:"w-full",children:i.jsxs(I,{className:"w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:["Start with a Trial",i.jsx(xt,{className:"ml-2 h-4 w-4"})]})})})]},r.title))})]},e.tier))})]})}),i.jsx("section",{className:"border-t border-border py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsxs(L.div,{...Xt,transition:{duration:.5},className:"mb-10 max-w-2xl",children:[i.jsx("h2",{className:"font-heading text-3xl font-bold",children:"Quarterly Individual Memberships"}),i.jsx("p",{className:"mt-3 text-muted-foreground",children:"Pay quarterly and save. Same training, better value."})]}),i.jsx("div",{className:"mx-auto grid max-w-2xl gap-6 sm:grid-cols-2",children:jd.map((e,t)=>i.jsx(mS,{plan:e,index:t},e.title))})]})}),i.jsx("section",{className:"border-t border-border bg-card py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsxs(L.div,{...Xt,transition:{duration:.5},className:"mb-10 max-w-2xl",children:[i.jsx("h2",{className:"font-heading text-3xl font-bold",children:"Quarterly Family Memberships"}),i.jsx("p",{className:"mt-3 text-muted-foreground",children:"Train together and save even more with a quarterly family plan."})]}),i.jsx("div",{className:"space-y-10",children:wf.map((e,t)=>i.jsxs(L.div,{...Xt,transition:{duration:.4,delay:t*.1},children:[i.jsx("h3",{className:"mb-4 font-heading text-xl font-semibold",children:e.tier}),i.jsx("div",{className:"grid gap-6 sm:grid-cols-3",children:e.plans.map(r=>i.jsxs(Pe,{className:"flex h-full flex-col text-center",children:[i.jsxs(Ke,{children:[i.jsx("div",{className:"mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary",children:i.jsx(ar,{className:"h-6 w-6"})}),i.jsx(Ye,{className:"text-lg",children:r.title}),i.jsxs("div",{className:"mt-2",children:[i.jsx("span",{className:"text-3xl font-bold text-foreground",children:r.price}),i.jsx("span",{className:"text-sm text-muted-foreground",children:r.period})]}),r.savings&&i.jsx("p",{className:"mt-1 text-sm italic text-primary",children:r.savings})]}),i.jsx(qc,{className:"mt-auto",children:i.jsx(B,{to:"/trial",className:"w-full",children:i.jsxs(I,{className:"w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:["Start with a Trial",i.jsx(xt,{className:"ml-2 h-4 w-4"})]})})})]},r.title))})]},e.tier))})]})}),i.jsx("section",{className:"py-16",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs("div",{className:"mx-auto grid max-w-3xl gap-8 sm:grid-cols-2",children:[i.jsxs(L.div,{...Xt,transition:{duration:.4},className:"rounded-lg border border-border bg-card p-6",children:[i.jsx(pr,{className:"mb-3 h-8 w-8 text-primary"}),i.jsx("h3",{className:"font-heading text-lg font-semibold",children:"Class Schedule"}),i.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Class days and times vary by program and season. Check the schedule to see what's running, days and times, and which classes are available."}),i.jsx(B,{to:"/schedule",children:i.jsxs(I,{variant:"outline",className:"mt-4",size:"sm",children:["View Schedule",i.jsx(xt,{className:"ml-2 h-4 w-4"})]})})]}),i.jsxs(L.div,{...Xt,transition:{duration:.4,delay:.1},className:"rounded-lg border border-border bg-card p-6",children:[i.jsx(qn,{
581className:"mb-3 h-8 w-8 text-primary"}),i.jsx("h3",{className:"font-heading text-lg font-semibold",children:"Equipment & Gear"}),i.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Membership does not include equipment. Required gear depends on the class and program. Check individual class pages and the gear page for details."}),i.jsx(B,{to:"/gear",children:i.jsxs(I,{variant:"outline",className:"mt-4",size:"sm",children:["View Gear",i.jsx(xt,{className:"ml-2 h-4 w-4"})]})})]})]})})}),i.jsx("section",{className:"border-t border-border bg-card py-16",children:i.jsx("div",{className:"container mx-auto px-4 text-center lg:px-8",children:i.jsxs(L.div,{...Xt,transition:{duration:.5},className:"mx-auto max-w-lg",children:[i.jsx(Qm,{className:"mx-auto mb-4 h-10 w-10 text-primary"}),i.jsx("h2",{className:"font-heading text-2xl font-semibold",children:"Not Sure Which Membership?"}),i.jsx("p",{className:"mt-3 text-muted-foreground",children:"That's normal. Start with a $5 trial and we'll help you choose the right program, understand the schedule, and select the correct membership level."}),i.jsxs("div",{className:"mt-6 flex flex-col items-center gap-3 sm:flex-row sm:justify-center",children:[i.jsx(B,{to:"/trial",children:i.jsxs(I,{className:"bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",children:["Try a Trial Class",i.jsx(xt,{className:"ml-2 h-4 w-4"})]})}),i.jsx(B,{to:"/contact",children:i.jsx(I,{variant:"outline",children:"Contact Us"})})]})]})})})]})}const NK="/assets/nathan-mcbride-yWcMO5pc.jpg",CK="/assets/eric-kuhta-BeyuCIQH.jpg",AK="/assets/zane-mcbride-C1aFjN9k.jpg",TK="/assets/michael-winderman-CiAZRms4.jpg",EK="/assets/draco-hinman-Tw_xTDds.jpg",RK="/assets/lisa-mcbride-DGAtrXkm.jpg",PK=1,IK="b2cea171-902b-4020-9393-fd641d4a7b37",OK="32565fbf-e4e6-44cc-b23c-87c113644be1",MK="/__l5e/assets-v1/b2cea171-902b-4020-9393-fd641d4a7b37/daniel-spurlock.jpg",DK="a/v1/32565fbf-e4e6-44cc-b23c-87c113644be1/b2cea171-902b-4020-9393-fd641d4a7b37/daniel-spurlock.jpg",LK="daniel-spurlock.jpg",$K=318834,FK="image/jpeg",BK="2026-09-01T19:54:05Z",UK={version:PK,asset_id:IK,project_id:OK,url:MK,r2_key:DK,original_filename:LK,size:$K,content_type:FK,created_at:BK},fS={nathan:NK,lisa:RK,eric:CK,zane:AK,michael:TK,draco:EK,daniel:UK.url},VK={hidden:{opacity:0,y:30},visible:e=>({opacity:1,y:0,transition:{delay:e*.12,duration:.5,ease:"easeOut"}})};function HK(){return i.jsxs("main",{className:"min-h-screen bg-background",children:[i.jsx($e,{path:"/coaches"}),i.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"ItemList",name:"BladeFit Academy Coaching Team",itemListElement:Wo.map((e,t)=>({"@type":"ListItem",position:t+1,item:{"@type":"Person",name:e.name,jobTitle:e.titles.join(", "),description:e.bio.split(` 582 583`)[0],worksFor:{"@type":"Organization",name:"BladeFit Academy",url:"https://bladefitacademy.com/"}}}))})}}),i.jsxs("section",{className:"relative overflow-hidden bg-card py-20 lg:py-28",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/5 to-transparent"}),i.jsxs("div",{className:"container relative mx-auto px-4 text-center",children:[i.jsx(L.p,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4},className:"mb-4 text-sm font-semibold uppercase tracking-[0.3em] text-primary",children:"Meet the Team"}),i.jsx(L.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"font-heading text-4xl font-bold tracking-tight text-foreground md:text-5xl lg:text-6xl",children:"Our Coaching Staff"}),i.jsx(L.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.2},className:"mx-auto mt-4 max-w-2xl text-lg text-muted-foreground",children:"Passionate instructors with decades of combined experience in historical European martial arts, competitive fencing, and youth sword sports."})]})]}),i.jsx("section",{className:"container mx-auto px-4 py-16 lg:py-24",children:i.jsx("div",{className:"space-y-20 lg:space-y-28",children:Wo.map((e,t)=>
583i.jsxs(L.article,{custom:t,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-60px"},variants:VK,className:`flex flex-col items-center gap-8 lg:gap-14 ${t%2===0?"lg:flex-row":"lg:flex-row-reverse"}`,children:[i.jsx("div",{className:"w-full max-w-[280px] flex-shrink-0",children:i.jsxs("div",{className:"relative overflow-hidden rounded-2xl border border-border shadow-lg",children:[fS[e.photoKey]?i.jsx("img",{src:fS[e.photoKey],alt:e.name,className:"aspect-square w-full object-cover object-top",loading:"lazy"}):i.jsx("div",{className:"flex aspect-square w-full items-center justify-center bg-muted",children:i.jsx("span",{className:"font-heading text-4xl font-bold text-muted-foreground",children:e.name.split(" ").map(r=>r[0]).join("")})}),i.jsx("div",{className:"absolute inset-0 rounded-2xl ring-1 ring-inset ring-foreground/5"})]})}),i.jsxs("div",{className:"flex-1 text-center lg:text-left",children:[i.jsx("h2",{className:"font-heading text-3xl font-bold tracking-tight text-foreground md:text-4xl",children:e.name}),i.jsx("div",{className:"mt-3 flex flex-wrap justify-center gap-2 lg:justify-start",children:e.titles.map(r=>i.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-primary/20 bg-primary/10 px-3 py-1 text-xs font-semibold uppercase tracking-wider text-primary",children:[r.toLowerCase().includes("head")?i.jsx(qn,{className:"h-3 w-3"}):r.toLowerCase().includes("order")||r.toLowerCase().includes("master")||r.toLowerCase().includes("maitre")?i.jsx(Oa,{className:"h-3 w-3"}):i.jsx(qe,{className:"h-3 w-3"}),r]},r))}),i.jsx("div",{className:"mt-6 space-y-4 text-base leading-relaxed text-muted-foreground lg:text-lg",children:e.bio.split(` 584 585`).map((r,n)=>i.jsx("p",{children:r},n))})]})]},e.name))})})]})}const zK=()=>{const e=kn();return p.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),i.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),i.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),i.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})};var WK={name:"@lovable.dev/cloud-auth-js",version:"1.1.2",description:"Lovable Cloud Auth JS",main:"./dist/index.cjs",module:"./dist/index.js",types:"./dist/index.d.ts",type:"module",files:["dist"],scripts:{build:"tsup src/index.ts --format cjs,esm --dts --outDir dist",dev:"tsup src/index.ts --format cjs,esm --dts --watch",test:"vitest run",typecheck:"tsgo --noEmit",prepublishOnly:"npm run clean && npm run build",clean:"rimraf dist"},keywords:["lovable","oauth","authentication"],license:"MIT",devDependencies:{"@types/node":"^22",jsdom:"^26",rimraf:"^5.0.0",tsup:"^7.2.0",typescript:"^5",vitest:"^4.1.0"}},qK="authorization_response",GK="/~oauth/initiate",KK=["https://oauth.lovable.app","https://lovable.dev"],YK="lovable://oauth-callback",JK="http://127.0.0.1/iframe-oauth/callback",QK=500,ZK=12e4;function XK(e){let t;const r=new Promise(a=>{t=a}),n=a=>{if(!e.some(c=>a.origin===c))return;const l=a.data;!l||typeof l!="object"||l.type===qK&&t(l.response)},s=()=>{window.removeEventListener("message",n)};return window.addEventListener("message",n),{cleanup:s,messagePromise:r}}function eY(e){const t=window.screenX!==0||window.screenY!==0||!e,r=t?window.outerWidth*.5:window.screen.width*.5,n=t?window.outerHeight*.5:window.screen.height*.5,s=t?window.screenX+(window.outerWidth-r)/2:(window.screen.width-r)/2,a=t?window.screenY+(window.outerHeight-n)/2:(window.screen.height-n)/2;return{width:r,height:n,left:s,top:a}}function pS(e,t){return e.state!==t?{error:new Error("State is invalid")}:e.error?e.error==="legacy_flow"?{error:new Error("This flow is not supported in Preview mode. Please open the app in a new tab to sign in.")}:{error:new Error(e.error_description??"Sign in failed")}:!e.access_token||!e.refresh_token?{error:new Error("No tokens received")}:{tokens:{access_token:e.access_token,refresh_token:e.refresh_token},error:null}}function tY(){const e=navigator.userAgent;return!!(/iPhone|iPad|iPod|Android/i.test(e)||/Macintosh/i.test(e)&&navigator.maxTouchPoints>1)}function rY(){return typeof crypto<"u"&&crypto.getRandomValues?[...crypto.getRandomValues(new Uint8Array(16))].map(e=>e.toString(16).padStart(2,"0")).join(""):Math.random().toString(36).substring(2)+Date.now().toString(36)}function nY(e={}){const t=e.oauthBrokerUrl??GK,r=e.supportedOAuthOrigins??KK;async function n(s,a={}){let o=!1;try{o=window.self!==window.top}catch{o=!0}const l=navigator.userAgent,c=/LovableApp\//.test(l),d=!c&&/lovable/i.test(l),u=rY();let h=a.redirect_uri??window.location.origin;c&&o?h=YK:d&&o&&(h=JK);const m=new URLSearchParams({...a.extraParams,provider:s,redirect_uri:h,state:u});if(!o)return window.location.href=`${t}?${m.toString()}`,{error:null,redirected:!0};!c&&!d&&m.set("response_mode","web_message");const f=`${t}?${m.toString()}`,y=d?[...r,window.location.origin]:r,{messagePromise:x,cleanup:b}=XK(y);let g;if(tY())g=window.open(f,"_blank");else{const{width:j,height:k,left:S,top:_}=eY(o);g=window.open(f,"oauth",`width=${j},height=${k},left=${S},top=${_}`)}if(!g&&(c||d)){let j;const k=new Promise((S,_)=>{j=setTimeout(()=>{_(new Error("OAuth timed out waiting for response"))},ZK)});try{const S=await Promise.race([x,k]);return pS(S,u)}catch(S){return{error:S instanceof Error?S:new Error(String(S))}}finally{j&&clearTimeout(j),b()}}if(!g)return b(),{error:new Error("Popup was blocked")};let v;const w=new Promise((j,k)=>{v=setInterval(()=>{g.closed&&(clearInterval(v),k(new Error("Sign in was cancelled")))},QK)});try{const j=await Promise.race([x,w]);return pS(j,u)}catch(j){return{error:j instanceof Error?j:new Error(String(j))}}finally{clearInterval(v),b(),g==null||g.close()}}return{signInWithOAuth:n}}typeof window<"u"&&(window.__lovable_cloud_auth_js_version=WK.version);function sY(e={}){return nY(e)}const iY=sY(),aY={auth:{signInWithOAuth:async(e,t)=>{const r=await iY.signInWithOAuth(e,{redirect_uri:t==null?void 0:t.redirect_uri,extraParams:{...t==null?void 0:t.extraParams}});if(r.redirected||r.error)return r;try{await F.auth.setSession(r.tokens)}catch(n){return{error:n instanceof Error?n:new Error(String(n))}}return r}}};function oY(){var j;const e=Bi(),t=kn(),{user:r,isStaff:n,loading:s}=Ga(),[a,o]=p.useState("login"),[l,c]=p.useState(""),[d,u]=p.useState(""),[h,m]=p.useState(""),[f,y]=p.useState(""),[x,b]=p.useState(!1),g=(j=t.state)==null?void 0:j.from;p.useEffect(()=>{if(s||!r)return;e(g||(n?"/admin":"/dashboard"),{replace:!0})},[r,n,s,g,e]);async function v(k){k.preventDefault(),b(!0);try{if(a==="forgot"){const{error:S}=await F.auth.resetPasswordForEmail(l,{redirectTo:`${window.location.origin}/auth/reset`});if(S)throw S;ce.success("Check your email for a password reset link."),o("login")}else if(a==="signup"){const{error:S}=await F.auth.signUp({email:l,password:d,options:{emailRedirectTo:`${window.location.origin}/dashboard`,data:{first_name:h,last_name:f}}});if(S)throw S;ce.success("Welcome to BladeFit! You're signed in.")}else{const{error:S}=await F.auth.signInWithPassword({email:l,password:d});if(S)throw S;ce.success("Welcome back!")}}catch(S){const _=S instanceof Error?S.message:"Something went wrong";ce.error(_.includes("already registered")?"That email is already registered. Try signing in.":_.includes("Invalid login")?"Incorrect email or password.":_)}finally{b(!1)}}async function w(){const k=await aY.auth.signInWithOAuth("google",{redirect_uri:window.location.origin+"/dashboard"});if(k.error){ce.error("Google sign-in failed. Please try again.");return}k.redirected||e(g||(n?"/admin":"/dashboard"),{replace:!0})}return i.jsxs(i.Fragment,{children:[i.jsx($e,{title:`${a==="login"?"Sign In":"Create Account"} | BladeFit Academy`,description:"Sign in to your BladeFit Academy account. Members reach their portal and staff reach the management area automatically.",path:"/auth",noindex:!0}),i.jsx("section",{className:"bg-gradient-subtle py-16 md:py-24",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs(L.div,{initial:{opacity:0,y:20}
585,animate:{opacity:1,y:0},transition:{duration:.5},className:"mx-auto w-full max-w-md rounded-xl border border-border bg-card p-8 shadow-gold",children:[i.jsxs("div",{className:"mb-6 flex flex-col items-center text-center",children:[i.jsx("img",{src:uf,alt:"BladeFit Academy",className:"mb-3 h-14 w-14 object-contain"}),i.jsx("h1",{className:"font-heading text-2xl font-bold",children:a==="login"?"Sign In":a==="signup"?"Create Your Account":"Reset Your Password"}),i.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:a==="login"?"Members and staff sign in here â you'll be taken to the right place automatically.":a==="signup"?"Join BladeFit Academy's member portal.":"Enter your email and we'll send you a reset link."})]}),a!=="forgot"&&i.jsxs(I,{type:"button",variant:"outline",className:"w-full",onClick:w,children:[i.jsxs("svg",{className:"mr-2 h-4 w-4",viewBox:"0 0 24 24",children:[i.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.27-4.74 3.27-8.1z"}),i.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84A11 11 0 0 0 12 23z"}),i.jsx("path",{fill:"#FBBC05",d:"M5.84 14.1a6.6 6.6 0 0 1 0-4.2V7.06H2.18a11 11 0 0 0 0 9.88l3.66-2.84z"}),i.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1A11 11 0 0 0 2.18 7.06l3.66 2.84C6.71 7.31 9.14 5.38 12 5.38z"})]}),"Continue with Google"]}),a!=="forgot"&&i.jsxs("div",{className:"my-5 flex items-center gap-3",children:[i.jsx("div",{className:"h-px flex-1 bg-border"}),i.jsx("span",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:"or"}),i.jsx("div",{className:"h-px flex-1 bg-border"})]}),i.jsxs("form",{onSubmit:v,className:"space-y-4",children:[a==="signup"&&i.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"firstName",children:"First name"}),i.jsx(we,{id:"firstName",value:h,onChange:k=>m(k.target.value),required:!0})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"lastName",children:"Last name"}),i.jsx(we,{id:"lastName",value:f,onChange:k=>y(k.target.value),required:!0})]})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"email",children:"Email"}),i.jsx(we,{id:"email",type:"email",value:l,onChange:k=>c(k.target.value),required:!0,autoComplete:"email"})]}),a!=="forgot"&&i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"password",children:"Password"}),i.jsx(we,{id:"password",type:"password",value:d,onChange:k=>u(k.target.value),required:!0,minLength:6,autoComplete:a==="login"?"current-password":"new-password"}),a==="login"&&i.jsx("button",{type:"button",onClick:()=>o("forgot"),className:"mt-1 text-xs font-medium text-primary hover:underline",children:"Forgot password?"})]}),i.jsxs(I,{type:"submit",className:"w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",disabled:x,children:[x&&i.jsx(Be,{className:"mr-2 h-4 w-4 animate-spin"}),a==="login"?"Sign In":a==="signup"?"Create Account":"Send Reset Link"]})]}),i.jsx("p",{className:"mt-6 text-center text-sm text-muted-foreground",children:a==="forgot"?i.jsx("button",{type:"button",onClick:()=>o("login"),className:"font-semibold text-primary hover:underline",children:"Back to sign in"}):i.jsxs(i.Fragment,{children:[a==="login"?"Don't have an account? ":"Already a member? ",i.jsx("button",{type:"button",onClick:()=>o(a==="login"?"signup":"login"),className:"font-semibold text-primary hover:underline",children:a==="login"?"Sign up":"Sign in"})]})})]})})})]})}function lY(){const e=Bi(),[t,r]=p.useState(""),[n,s]=p.useState(""),[a,o]=p.useState(!1),[l,c]=p.useState(!1),[d,u]=p.useState(!0);p.useEffect(()=>{const{data:m}=F.auth.onAuthStateChange(y=>{(y==="PASSWORD_RECOVERY"||y==="SIGNED_IN")&&(c(!0),u(!1))});async function f(){try{const{data:y}=await F.auth.getSession();if(y.session){c(!0);return}const b=new URLSearchParams(window.location.search).get("code");if(b){const{error:j}=await F.auth.exchangeCodeForSession(b);if(!j){c(!0);return}}const g=new URLSearchParams(window.location.hash.replace(/^#/,"")),v=g.get("access_token"),w=g.get("refresh_token");if(v&&w){const{error:j}=await F.auth.setSession({access_token:v,refresh_token:w});if(!j){c(!0);return}}}finally{u(!1)}}return f(),()=>m.subscription.unsubscribe()},[]);async function h(m){if(m.preventDefault(),t!==n){ce.error("Passwords don't match.");return}o(!0);try{const{error:f}=await F.auth.updateUser({password:t});if(f)throw f;ce.success("Password updated! You're all set."),e("/dashboard",{replace:!0})}catch(f){ce.error(f instanceof Error?f.message:"Couldn't update password.")}finally{o(!1)}}return i.jsxs(i.Fragment,{children:[i.jsx($e,{title:"Reset Password | BladeFit Academy",description:"Set a new password for your BladeFit Academy account.",path:"/auth/reset",noindex:!0}),i.jsx("section",{className:"bg-gradient-subtle py-16 md:py-24",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs(L.div,{initial:{opacity:0,y:20}
vendor: 2,917 bytes, line 585
585,animate:{opacity:1,y:0},transition:{duration:.5},className:"mx-auto w-full max-w-md rounded-xl border border-border bg-card p-8 shadow-gold",children:[i.jsxs("div",{className:"mb-6 flex flex-col items-center text-center",children:[i.jsx("img",{src:uf,alt:"BladeFit Academy",className:"mb-3 h-14 w-14 object-contain"}),i.jsx("h1",{className:"font-heading text-2xl font-bold",children:"Set a New Password"}),i.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:l?"Choose a new password for your account.":d?"Verifying your reset linkâ¦":"This reset link is invalid or expired. Request a new one from the sign-in page."})]}),i.jsxs("form",{onSubmit:h,className:"space-y-4",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"password",children:"New password"}),i.jsx(we,{id:"password",type:"password",value:t,onChange:m=>r(m.target.value),required:!0,minLength:6,autoComplete:"new-password",disabled:!l})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"confirm",children:"Confirm password"}),i.jsx(we,{id:"confirm",type:"password",value:n,onChange:m=>s(m.target.value),required:!0,minLength:6,autoComplete:"new-password",disabled:!l})]}),i.jsxs(I,{type:"submit",className:"w-full bg-gradient-gold font-semibold text-primary-foreground shadow-gold hover:opacity-90",disabled:a||!l,children:[a&&i.jsx(Be,{className:"mr-2 h-4 w-4 animate-spin"}),"Update Password"]})]})]})})})]})}var dg="rovingFocusGroup.onEntryFocus",cY={bubbles:!1,cancelable:!0},tu="RovingFocusGroup",[Bx,yP,dY]=zm(tu),[uY,xP]=wr(tu,[dY]),[hY,mY]=uY(tu),vP=p.forwardRef((e,t)=>i.jsx(Bx.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Bx.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(fY,{...e,ref:t})})}));vP.displayName=tu;var fY=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...h}=e,m=p.useRef(null),f=Le(t,m),y=Af(a),[x,b]=wn({prop:o,defaultProp:l??null,onChange:c,caller:tu}),[g,v]=p.useState(!1),w=Tr(d),j=yP(r),k=p.useRef(!1),[S,_]=p.useState(0);return p.useEffect(()=>{const N=m.current;if(N)return N.addEventListener(dg,w),()=>N.removeEventListener(dg,w)},[w]),i.jsx(hY,{scope:r,orientation:n,dir:y,loop:s,currentTabStopId:x,onItemFocus:p.useCallback(N=>b(N),[b]),onItemShiftTab:p.useCallback(()=>v(!0),[]),onFocusableItemAdd:p.useCallback(()=>_(N=>N+1),[]),onFocusableItemRemove:p.useCallback(()=>_(N=>N-1),[]),children:i.jsx(le.div,{tabIndex:g||S===0?-1:0,"data-orientation":n,...h,ref:f,style:{outline:"none",...e.style},onMouseDown:de(e.onMouseDown,()=>{k.current=!0}),onFocus:de(e.onFocus,N=>{const T=!k.current;if(N.target===N.currentTarget&&T&&!g){const P=new CustomEvent(dg,cY);if(N.currentTarget.dispatchEvent(P),!P.defaultPrevented){const A=j().filter(W=>W.focusable),M=A.find(W=>W.active),z=A.find(W=>
vendor: 4,203 bytes, line 585
585W.id===x),ae=[M,z,...A].filter(Boolean).map(W=>W.ref.current);jP(ae,u)}}k.current=!1}),onBlur:de(e.onBlur,()=>v(!1))})})}),wP="RovingFocusGroupItem",bP=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:a,children:o,...l}=e,c=Un(),d=a||c,u=mY(wP,r),h=u.currentTabStopId===d,m=yP(r),{onFocusableItemAdd:f,onFocusableItemRemove:y,currentTabStopId:x}=u;return p.useEffect(()=>{if(n)return f(),()=>y()},[n,f,y]),i.jsx(Bx.ItemSlot,{scope:r,id:d,focusable:n,active:s,children:i.jsx(le.span,{tabIndex:h?0:-1,"data-orientation":u.orientation,...l,ref:t,onMouseDown:de(e.onMouseDown,b=>{n?u.onItemFocus(d):b.preventDefault()}),onFocus:de(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:de(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const g=yY(b,u.orientation,u.dir);if(g!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=m().filter(j=>j.focusable).map(j=>j.ref.current);if(g==="last")w.reverse();else if(g==="prev"||g==="next"){g==="prev"&&w.reverse();const j=w.indexOf(b.currentTarget);w=u.loop?xY(w,j+1):w.slice(j+1)}setTimeout(()=>jP(w))}}),children:typeof o=="function"?o({isCurrentTabStop:h,hasTabStop:x!=null}):o})})});bP.displayName=wP;var pY={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gY(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function yY(e,t,r){const n=gY(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return pY[n]}function jP(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function xY(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var vY=vP,wY=bP,Lf="Tabs",[bY,iZ]=wr(Lf,[xP]),kP=xP(),[jY,_b]=bY(Lf),SP=p.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:a,orientation:o="horizontal",dir:l,activationMode:c="automatic",...d}=e,u=Af(l),[h,m]=wn({prop:n,onChange:s,defaultProp:a??"",caller:Lf});return i.jsx(jY,{scope:r,baseId:Un(),value:h,onValueChange:m,orientation:o,dir:u,activationMode:c,children:i.jsx(le.div,{dir:u,"data-orientation":o,...d,ref:t})})});SP.displayName=Lf;var _P="TabsList",NP=p.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...s}=e,a=_b(_P,r),o=kP(r);return i.jsx(vY,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:n,children:i.jsx(le.div,{role:"tablist","aria-orientation":a.orientation,...s,ref:t})})});NP.displayName=_P;var CP="TabsTrigger",AP=p.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...a}=e,o=_b(CP,r),l=kP(r),c=RP(o.baseId,n),d=PP(o.baseId,n),u=n===o.value;return i.jsx(wY,{asChild:!0,...l,focusable:!s,active:u,children:i.jsx(le.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":d,"data-state":u?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...a,ref:t,onMouseDown:de(e.onMouseDown,h=>{!s&&h.button===0&&h.ctrlKey===!1?o.onValueChange(n):h.preventDefault()}),onKeyDown:de(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&o.onValueChange(n)}),onFocus:de(e.onFocus,()=>{const h=o.activationMode!=="manual";!u&&!s&&h&&o.onValueChange(n)})})})});AP.displayName=CP;var TP="TabsContent",EP=p.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:s,children:a,...o}=e,l=_b(TP,r),c=RP(l.baseId,n),d=PP(l.baseId,n),u=n===l.value,h=p.useRef(u);return p.useEffect(()=>{const m=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(m)},[]),i.jsx(Rs,{present:s||u,children:({present:m})=>i.jsx(le.div,{"data-state":u?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!m,id:d,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:m&&a})})});EP.displayName=TP;function RP(e,t){return`${e}-trigger-${t}`}function PP(e,t){return`${e}-content-${t}`}var kY=SP,IP=NP,OP=AP,MP=EP;const DP=kY,Nb=p.forwardRef(({className:e,...t},r)=>i.jsx(IP,{ref:r,className:Q("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));
585Nb.displayName=IP.displayName;const ds=p.forwardRef(({className:e,...t},r)=>i.jsx(OP,{ref:r,className:Q("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));ds.displayName=OP.displayName;const us=p.forwardRef(({className:e,...t},r)=>i.jsx(MP,{ref:r,className:Q("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));us.displayName=MP.displayName;var Cb="Progress",Ab=100,[SY,aZ]=wr(Cb),[_Y,NY]=SY(Cb),LP=p.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:s,getValueLabel:a=CY,...o}=e;(s||s===0)&&!gS(s)&&console.error(AY(`${s}`,"Progress"));const l=gS(s)?s:Ab;n!==null&&!yS(n,l)&&console.error(TY(`${n}`,"Progress"));const c=yS(n,l)?n:null,d=bm(c)?a(c,l):void 0;return i.jsx(_Y,{scope:r,value:c,max:l,children:i.jsx(le.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":bm(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":BP(c,l),"data-value":c??void 0,"data-max":l,...o,ref:t})})});LP.displayName=Cb;var $P="ProgressIndicator",FP=p.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,s=NY($P,r);return i.jsx(le.div,{"data-state":BP(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...n,ref:t})});FP.displayName=$P;function CY(e,t){return`${Math.round(e/t*100)}%`}function BP(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function bm(e){return typeof e=="number"}function gS(e){return bm(e)&&!isNaN(e)&&e>0}function yS(e,t){return bm(e)&&!isNaN(e)&&e<=t&&e>=0}function AY(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Ab}\`.`}function TY(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 586 - a positive number 587 - less than the value passed to \`max\` (or ${Ab} if no \`max\` prop is set) 588 - \`null\` or \`undefined\` if the progress is indeterminate. 589 590Defaulting to \`null\`.`}var UP=LP,EY=FP;const VP=p.forwardRef(({className:e,value:t,...r},n)=>i.jsx(UP,{ref:n,className:Q("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:i.jsx(EY,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));VP.displayName=UP.displayName;function RY({userId:e}){const[t,r]=p.useState(null),[n,s]=p.useState([]),[a,o]=p.useState(new Set),[l,c]=p.useState([]),[d,u]=p.useState(!0);p.useEffect(()=>{(async()=>{const{data:f}=await F.from("profiles").select("current_rank_id, ranks:current_rank_id (id, name, color, description, track)").eq("id",e).maybeSingle(),y=(f==null?void 0:f.ranks)??null;if(r(y),y){const[{data:b},{data:g}]=await Promise.all([F.from("rank_requirements").select("id,title,description").eq("rank_id",y.id).order("sort_order"),F.from("member_requirement_progress").select("requirement_id").eq("user_id",e).eq("completed",!0)]);s(b??[]),o(new Set((g??[]).map(v=>v.requirement_id)))}const{data:x}=await F.from("rank_history").select("rank_id, awarded_at, notes, ranks:rank_id (name)").eq("user_id",e).order("awarded_at",{ascending:!1});c(x??[]),u(!1)})()},[e]);const h=n.filter(f=>a.has(f.id)).length,m=n.length?Math.round(h/n.length*100):0;return i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2 text-base",children:[i.jsx(Oa,{className:"h-5 w-5 text-primary"})," My Rank"]})}),i.jsx(Me,{children:d?i.jsx("p",{className:"text-sm text-muted-foreground",children:"Loadingâ¦"}):t?i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("span",{className:"inline-block h-9 w-9 rounded-full border-2",style:{backgroundColor:t.color,borderColor:t.color},"aria-hidden":!0}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-lg font-bold leading-none",children:t.name}),i.jsxs("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:[t.track," track"]})]})]}),t.description&&i.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),n.length>0&&i.jsxs("div",{children:[i.jsxs("div",{className:"mb-1 flex items-center justify-between text-xs text-muted-foreground",children:[i.jsx("span",{children:"Progress to next rank"}),i.jsxs("span",{children:[h,"/",n.length]})]}),i.jsx(VP,{value:m,className:"h-2"}),i.jsx("ul",{className:"mt-3 space-y-1.5",children:n.map(f=>{const y=a.has(f.id);return i.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[y?i.jsx(Ps,{className:"mt-0.5 h-4 w-4 shrink-0 text-green-600"}):i.jsx(OD,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),i.jsx("span",{className:y?"text-foreground":"text-muted-foreground",children:f.title})]},f.id)})})]}),l.length>0&&i.jsxs("div",{className:"border-t border-border pt-3",children:[i.jsx("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Promotion History"}),i.jsx("ul",{className:"space-y-1",children:l.map((f,y)=>{var x;return i.jsxs("li",{className:"flex justify-between text-sm",children:[i.jsx("span",{children:((x=f.ranks)==null?void 0:x.name)??"Rank"}),i.jsx("span",{className:"text-muted-foreground",children:new Date(f.awarded_at).toLocaleDateString()})]},y)})})]})]}):i.jsx("p",{className:"text-sm text-muted-foreground",children:"You haven't been assigned a rank yet. Your instructor will set this after your first classes."})})]})}var $f="Checkbox",[PY,oZ]=wr($f),[IY,Tb]=PY($f);function OY(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:s,disabled:a,form:o,name:l,onCheckedChange:c,required:d,value:u="on",internal_do_not_use_render:h}=e,[m,f]=wn({prop:r,defaultProp:s??!1,onChange:c,caller:$f}),[y,x]=p.useState(null),[b,g]=p.useState(null),v=p.useRef(!1),w=y?!!o||!!y.closest("form"):!0,j={checked:m,disabled:a,setChecked:f,control:y,setControl:x,name:l,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:d,defaultChecked:Ci(s)?!1:s,isFormControl:w,bubbleInput:b,setBubbleInput:g};return i.jsx(IY,{scope:t,...j,children:MY(h)?h(j):n})}var HP="CheckboxTrigger",zP=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},s)=>{const{control:a,value:o,disabled:l,checked:c,required:d,setControl:u,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:f,bubbleInput:y}=Tb(HP,e),x=Le(s,u),b=p.useRef(c);return p.useEffect(()=>{const g=a==null?void 0:a.form;if(g){const v=()=>h(b.current);return g.addEventListener("reset",v),()=>g.removeEventListener("reset",v)}},[a,h]),i.jsx(le.button,{type:"button",role:"checkbox","aria-checked":Ci(c)?"mixed":c,"aria-required":d,"data-state":YP(c),"data-disabled":l?"":void 0,disabled:l,value:o,...n,ref:x,onKeyDown:de(t,g=>{g.key==="Enter"&&g.preventDefault()}),onClick:de(r,g=>{h(v=>Ci(v)?!0:!v),y&&f&&(m.current=g.isPropagationStopped(),m.current||g.stopPropagation())})})});zP.displayName=HP;var Eb=p.forwardRef((e,t)=>
590{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:a,required:o,disabled:l,value:c,onCheckedChange:d,form:u,...h}=e;return i.jsx(OY,{__scopeCheckbox:r,checked:s,defaultChecked:a,disabled:l,required:o,onCheckedChange:d,name:n,form:u,value:c,internal_do_not_use_render:({isFormControl:m})=>i.jsxs(i.Fragment,{children:[i.jsx(zP,{...h,ref:t,__scopeCheckbox:r}),m&&i.jsx(KP,{__scopeCheckbox:r})]})})});Eb.displayName=$f;var WP="CheckboxIndicator",qP=p.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...s}=e,a=Tb(WP,r);return i.jsx(Rs,{present:n||Ci(a.checked)||a.checked===!0,children:i.jsx(le.span,{"data-state":YP(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});qP.displayName=WP;var GP="CheckboxBubbleInput",KP=p.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:a,defaultChecked:o,required:l,disabled:c,name:d,value:u,form:h,bubbleInput:m,setBubbleInput:f}=Tb(GP,e),y=Le(r,f),x=jb(a),b=cw(n);p.useEffect(()=>{const v=m;if(!v)return;const w=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(w,"checked").set,S=!s.current;if(x!==a&&k){const _=new Event("click",{bubbles:S});v.indeterminate=Ci(a),k.call(v,Ci(a)?!1:a),v.dispatchEvent(_)}},[m,x,a,s]);const g=p.useRef(Ci(a)?!1:a);return i.jsx(le.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??g.current,required:l,disabled:c,name:d,value:u,form:h,...t,tabIndex:-1,ref:y,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});KP.displayName=GP;function MY(e){return typeof e=="function"}function Ci(e){return e==="indeterminate"}function YP(e){return Ci(e)?"indeterminate":e?"checked":"unchecked"}const Rb=p.forwardRef(({className:e,...t},r)=>i.jsx(Eb,{ref:r,className:Q("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:i.jsx(qP,{className:Q("flex items-center justify-center text-current"),children:i.jsx(Ps,{className:"h-4 w-4"})})}));Rb.displayName=Eb.displayName;const Ux="2025-01",JP="Assumption of Risk, Release of Liability & Waiver of Claims",xS=`BladeFit Academy â ${JP} (Version ${Ux}) 591 592In consideration of being permitted to participate in classes, training, sparring, events, and related activities at BladeFit Academy ("the Academy"), I acknowledge and agree to the following: 593 5941. ASSUMPTION OF RISK. Historical European Martial Arts (HEMA) and sword training involve inherent risks, including but not limited to physical contact, strikes, falls, equipment failure, and serious injury. I knowingly and voluntarily accept all such risks, whether known or unknown. 595 5962. PHYSICAL CONDITION. I confirm that I (or my child) am physically able to participate and have no medical condition that would make participation unsafe. I am responsible for stopping activity if I feel unwell. 597 5983. FOOTWEAR & SAFETY POLICY. I agree to follow all Academy safety rules at all times, including the requirement to wear appropriate indoor athletic shoes â bare feet are not permitted for any participant of any age â and to use required protective gear. 599 6004. RELEASE OF LIABILITY. To the fullest extent permitted by law, I release, waive, and discharge the Academy, its owners, instructors, staff, and volunteers from any and all claims, liabilities, or damages arising from my participation, except those caused by gross negligence or willful misconduct. 601 6025. MEDIA CONSENT. I grant the Academy permission to use photographs or video taken during activities for instructional and promotional purposes, unless I notify the Academy in writing otherwise. 603 6046. MINORS. If signing on behalf of a minor, I am the parent or legal guardian and agree to these terms on the minor's behalf. 605 606By typing my full legal name and submitting this form, I acknowledge that I have read, understood, and agree to this waiver, and that this constitutes a legally binding electronic signature.`;function DY({userId:e}){const[t,r]=p.useState(null),[n,s]=p.useState(!0),[a,o]=p.useState(!1),[l,c]=p.useState(""),[d,u]=p.useState(!1),[h,m]=p.useState(!1);p.useEffect(()=>{F.from("waivers").select("signed_at").eq("user_id",e).eq("version",Ux).order("signed_at",{ascending:!1}).limit(1).maybeSingle().then(({data:y})=>{r((y==null?void 0:y.signed_at)??null),s(!1)})},[e]);async function f(){if(!l.trim()||!d){ce.error("Please type your full legal name and check the agreement box.");return}m(!0);let y=null;try{y=(await(await fetch("https://api.ipify.org?format=json")).json()).ip??null}catch{y=null}const{error:x}=await F.from("waivers").insert({user_id:e,version:Ux,signed_name:l.trim(),document_text:xS,ip_address:y});if(m(!1),x){ce.error("Could not save your signature. Please try again.");return}t===null&&await F.from("profiles").update({waiver_signed:!0,waiver_signed_at:new Date().toISOString()}).eq("id",e),r(new Date().toISOString()),o(!1),ce.success("Waiver signed â thank you!")}return n?null:i.jsxs(i.Fragment,{children:[i.jsxs(Pe,{className:t?"":"border-primary/40 bg-primary/5",children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2 text-base",children:[i.jsx(Sy,{className:"h-5 w-5 text-primary"})," Liability Waiver"]})}),i.jsx(Me,{children:t?i.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-700",children:[i.jsx(Yv,{className:"h-4 w-4"}),"Signed on ",new Date(t).toLocaleDateString()]}):i.jsxs("div",{className:"space-y-3",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"Please review and e-sign the academy waiver before training."}),i.jsx(I,{onClick:()=>o(!0),className:"bg-gradient-gold font-semibold text-primary-foreground hover:opacity-90",children:"Review & Sign Waiver"})]})})]}),i.jsx(Vi,{open:a,onOpenChange:o,children:i.jsxs(Os,{className:"max-w-2xl",children:[i.jsx(Ms,{children:i.jsx(Ds,{children:JP})}),i.jsx("div",{className:"max-h-64 overflow-y-auto whitespace-pre-wrap rounded-md border border-border bg-muted/40 p-4 text-sm text-muted-foreground",children:xS}),i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx(Rb,{id:"agree",checked:d,onCheckedChange:y=>u(!!y),className:"mt-1"}),i.jsx(pe,{htmlFor:"agree",className:"text-sm font-normal leading-snug",children:"I have read and agree to the waiver above, and I understand typing my name is a legally binding electronic signature."})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"sig",children:"Full legal name"}
606),i.jsx(we,{id:"sig",value:l,onChange:y=>c(y.target.value),placeholder:"Type your full name"})]})]}),i.jsxs(Ka,{children:[i.jsx(I,{variant:"outline",onClick:()=>o(!1),children:"Cancel"}),i.jsxs(I,{onClick:f,disabled:h,className:"bg-gradient-gold font-semibold text-primary-foreground hover:opacity-90",children:[h&&i.jsx(Be,{className:"mr-2 h-4 w-4 animate-spin"}),"Sign Waiver"]})]})]})})]})}async function LY(e){const t=new Date().toISOString().slice(0,10),{data:r,error:n}=await F.from("bookings").select("id, session_id, status, position, class_sessions!inner(session_date, start_time, end_time, location, status, class_offerings(title))").eq("user_id",e).in("status",["reserved","waitlisted","checked_in"]).gte("class_sessions.session_date",t);if(n)throw n;return(r??[]).sort((a,o)=>{var d,u,h,m;const l=((d=a.class_sessions)==null?void 0:d.session_date)??"",c=((u=o.class_sessions)==null?void 0:u.session_date)??"";return l!==c?l<c?-1:1:(((h=a.class_sessions)==null?void 0:h.start_time)??"")<(((m=o.class_sessions)==null?void 0:m.start_time)??"")?-1:1})}function $Y({userId:e}){const t=yw(),[r,n]=p.useState(null),{data:s,isLoading:a}=hh({queryKey:["my-upcoming-bookings",e],queryFn:()=>LY(e)});async function o(l){n(l);try{await PE(l),ce.success("Booking cancelled."),t.invalidateQueries({queryKey:["my-upcoming-bookings"]})}catch{ce.error("Could not cancel.")}finally{n(null)}}return a?i.jsx("div",{className:"flex justify-center py-10",children:i.jsx(Be,{className:"h-6 w-6 animate-spin text-primary"})}):!s||s.length===0?i.jsx(Pe,{children:i.jsxs(Me,{className:"flex flex-col items-center gap-4 py-12 text-center",children:[i.jsx(RD,{className:"h-10 w-10 text-primary/60"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"You have no upcoming classes booked."}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Browse the schedule and reserve your spot."})]}),i.jsx(B,{to:"/schedule",children:i.jsx(I,{className:"bg-gradient-gold font-semibold text-primary-foreground hover:opacity-90",children:"Book a class"})})]})}):i.jsx("div",{className:"space-y-3",children:s.map(l=>{var d;const c=l.class_sessions;return i.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4 sm:flex-row sm:items-center sm:justify-between",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("h3",{className:"font-heading font-semibold",children:((d=c==null?void 0:c.class_offerings)==null?void 0:d.title)??"Class"}),l.status==="waitlisted"?i.jsxs(rt,{className:"bg-muted text-muted-foreground",children:["Waitlist",l.position?` #${l.position}`:""]}):i.jsxs(rt,{className:"bg-primary/15 text-primary",children:[i.jsx(Ps,{className:"mr-1 h-3 w-3"})," Reserved"]})]}),i.jsxs("div",{className:"mt-1.5 flex flex-wrap gap-x-4 gap-y-1 text-sm text-muted-foreground",children:[i.jsx("span",{children:c?lb(c.session_date):""}),i.jsxs("span",{className:"flex items-center gap-1.5",children:[i.jsx(Nr,{className:"h-3.5 w-3.5"}),c?zl(c.start_time,c.end_time):""]}),(c==null?void 0:c.location)&&i.jsxs("span",{className:"flex items-center gap-1.5",children:[i.jsx(Ol,{className:"h-3.5 w-3.5"})," ",c.location]})]})]}),i.jsx(I,{variant:"ghost",size:"sm",onClick:()=>o(l.id),disabled:r===l.id,children:r===l.id?i.jsx(Be,{className:"h-4 w-4 animate-spin"}):"Cancel"})]},l.id)})})}function vS(e){if(!e)return"â";const t=new Date(e);return Number.isNaN(t.getTime())?"â":t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function FY({userId:e}){const[t,r]=p.useState(null),[n,s]=p.useState(!0);return p.useEffect(()=>{(async()=>{const{data:a}=await F.from("profiles").select("household_id").eq("id",e).maybeSingle(),o=(a==null?void 0:a.household_id)??null,l=[`member_id.eq.${e}`];o&&l.push(`household_id.eq.${o}`);const{data:c}=await F.from("member_memberships").select("plan_label,amount,billing_period,status,trial_started_at,started_at,household_id").or(l.join(",")).neq("status","cancelled").order("created_at",{ascending:!1}).limit(1);r((c==null?void 0:c[0])??null),s(!1)})()},[e]),i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2",children:[i.jsx(Oa,{className:"h-5 w-5 text-primary"})," Membership"]})}),i.jsx(Me,{children:n?i.jsx("p",{className:"text-sm text-muted-foreground",children:"Loadingâ¦"}):t?i.jsxs("div",{className:"rounded-md border border-border p-4",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("p",{className:"font-medium",children:t.plan_label}),i.jsx(rt,{variant:t.status==="trial"?"secondary":"default",className:"capitalize",children:t.status}),t.household_id&&i.jsx(rt,{variant:"outline",children:"Family"})]}),i.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["$",Number(t.amount).toFixed(2),t.billing_period!=="one-time"?` / ${t.billing_period}`:""]}),i.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:t.status==="trial"?`Trial started ${vS(t.trial_started_at)}`:`Started ${vS(t.started_at)}`})]}):i.jsx("p",{className:"text-sm text-muted-foreground",children:"No active membership yet. Contact us to get started."})})]})}function wS(e){if(!e)return"â";const t=new Date(e);return Number.isNaN(t.getTime())?"â":t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function BY({userId:e}){const[t,r]=p.useState([]),[n,s]=p.useState(!0);return p.useEffect(()=>{(async()=>{const{data:a}=await F.from("payments").select("id,amount,description,method,status,due_date,paid_date").eq("member_id",e).order("due_date",{ascending:!1,nullsFirst:!1});r(a??[]),s(!1)})()},[e]),i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2",children:[i.jsx(Zm,{className:"h-5 w-5 text-primary"})," Payments"]})}),i.jsx(Me,{children:n?i.jsx("p",{className:"text-sm text-muted-foreground",children:"Loadingâ¦"}):t.length===0?i.jsx("p",{className:"text-sm text-muted-foreground",children:"No payments yet."}):i.jsx("ul",{className:"divide-y divide-border",children:t.map(a=>i.jsxs("li",{className:"flex items-center justify-between gap-3 py-3 text-sm",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:a.description||"Charge"}),i.jsx("p",{className:"text-xs capitalize text-muted-foreground",children:a.method})]}),i.jsxs("div",{className:"text-right",children:[i.jsxs("p",{className:"font-semibold",children:["$",Number(a.amount).toFixed(2)]}),i.jsx("p",{className:"text-xs capitalize text-muted-foreground",children:a.status==="paid"?`Paid ${wS(a.paid_date)}`:`${a.status} ${wS(a.due_date)}`})]})]},a.id))})})]})}var QP={exports:{}},ZP={};/** 607 * @license React 608 * use-sync-external-store-shim.production.js 609 * 610 * Copyright (c) Meta Platforms, Inc. and affiliates. 611 * 612 * This source code is licensed under the MIT license found in the 613 * LICENSE file in the root directory of this source tree. 614 */var Nl=p;function UY(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var VY=typeof Object.is=="function"?Object.is:UY,HY=Nl.useState,zY=Nl.useEffect,WY=Nl.useLayoutEffect,qY=Nl.useDebugValue;function GY(e,t){var r=t(),n=HY({inst:{value:r,getSnapshot:t}}),s=n[0].inst,a=n[1];return WY(function(){s.value=r,s.getSnapshot=t,ug(s)&&a({inst:s})},[e,r,t]),zY(function(){return ug(s)&&a({inst:s}),e(function(){ug(s)&&a({inst:s})})},[e]),qY(r),r}function ug(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!VY(e,r)}catch{return!0}}function KY(e,t){return t()}var YY=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?KY:GY;ZP.useSyncExternalStore=Nl.useSyncExternalStore!==void 0?Nl.useSyncExternalStore:YY;QP.exports=ZP;var JY=QP.exports;function QY(){return JY.useSyncExternalStore(ZY,()=>!0,()=>!1)}function ZY(){return()=>{}}var Pb="Avatar",[XY,lZ]=wr(Pb),[eJ,XP]=XY(Pb),eI=p.forwardRef((e,t)=>
614{const{__scopeAvatar:r,...n}=e,[s,a]=p.useState("idle");return i.jsx(eJ,{scope:r,imageLoadingStatus:s,onImageLoadingStatusChange:a,children:i.jsx(le.span,{...n,ref:t})})});eI.displayName=Pb;var tI="AvatarImage",rI=p.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:s=()=>{},...a}=e,o=XP(tI,r),l=tJ(n,a),c=Tr(d=>{s(d),o.onImageLoadingStatusChange(d)});return wt(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?i.jsx(le.img,{...a,ref:t,src:n}):null});rI.displayName=tI;var nI="AvatarFallback",sI=p.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...s}=e,a=XP(nI,r),[o,l]=p.useState(n===void 0);return p.useEffect(()=>{if(n!==void 0){const c=window.setTimeout(()=>l(!0),n);return()=>window.clearTimeout(c)}},[n]),o&&a.imageLoadingStatus!=="loaded"?i.jsx(le.span,{...s,ref:t}):null});sI.displayName=nI;function bS(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function tJ(e,{referrerPolicy:t,crossOrigin:r}){const n=QY(),s=p.useRef(null),a=n?(s.current||(s.current=new window.Image),s.current):null,[o,l]=p.useState(()=>bS(a,e));return wt(()=>{l(bS(a,e))},[a,e]),wt(()=>{const c=h=>()=>{l(h)};if(!a)return;const d=c("loaded"),u=c("error");return a.addEventListener("load",d),a.addEventListener("error",u),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",d),a.removeEventListener("error",u)}},[a,r,t]),o}var iI=eI,aI=rI,oI=sI;const Ns=p.forwardRef(({className:e,...t},r)=>i.jsx(iI,{ref:r,className:Q("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ns.displayName=iI.displayName;const Cs=p.forwardRef(({className:e,...t},r)=>i.jsx(aI,{ref:r,className:Q("aspect-square h-full w-full",e),...t}));Cs.displayName=aI.displayName;const As=p.forwardRef(({className:e,...t},r)=>i.jsx(oI,{ref:r,className:Q("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));As.displayName=oI.displayName;var De;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{const a={};for(const o of s)a[o]=o;return a},e.getValidEnumValues=s=>{const a=e.objectKeys(s).filter(l=>typeof s[s[l]]!="number"),o={};for(const l of a)o[l]=s[l];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(a){return s[a]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const a=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&a.push(o);return a},e.find=(s,a)=>{for(const o of s)if(a(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 n(s,a=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(De||(De={}));var jS;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(jS||(jS={}));const re=De.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Js=e=>{switch(typeof e){case"undefined":return re.undefined;case"string":return re.string;case"number":return Number.isNaN(e)?re.nan:re.number;case"boolean":return re.boolean;case"function":return re.function;case"bigint":return re.bigint;case"symbol":return re.symbol;case"object":return Array.isArray(e)?re.array:e===null?re.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?re.promise:typeof Map<"u"&&e instanceof Map?re.map:typeof Set<"u"&&e instanceof Set?re.set:typeof Date<"u"&&e instanceof Date?re.date:re.object;default:return re.unknown}}
vendor: 5,706 bytes, line 614
614,H=De.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 Ts extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(a){return a.message},n={_errors:[]},s=a=>{for(const o of a.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)n._errors.push(r(o));else{let l=n,c=0;for(;c<o.path.length;){const d=o.path[c];c===o.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(r(o))):l[d]=l[d]||{_errors:[]},l=l[d],c++}}};return s(this),n}static assert(t){if(!(t instanceof Ts))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,De.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const s of this.issues)if(s.path.length>0){const a=s.path[0];r[a]=r[a]||[],r[a].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Ts.create=e=>new Ts(e);const Vx=(e,t)=>{let r;switch(e.code){case H.invalid_type:e.received===re.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case H.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,De.jsonStringifyReplacer)}`;break;case H.unrecognized_keys:r=`Unrecognized key(s) in object: ${De.joinValues(e.keys,", ")}`;break;case H.invalid_union:r="Invalid input";break;case H.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${De.joinValues(e.options)}`;break;case H.invalid_enum_value:r=`Invalid enum value. Expected ${De.joinValues(e.options)}, received '${e.received}'`;break;case H.invalid_arguments:r="Invalid function arguments";break;case H.invalid_return_type:r="Invalid function return type";break;case H.invalid_date:r="Invalid date";break;case H.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:De.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case H.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case H.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case H.custom:r="Invalid input";break;case H.invalid_intersection_types:r="Intersection results could not be merged";break;case H.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case H.not_finite:r="Number must be finite";break;default:r=t.defaultError,De.assertNever(e)}return{message:r}};let rJ=Vx;function nJ(){return rJ}const sJ=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,a=[...r,...s.path||[]],o={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let l="";const c=n.filter(d=>!!d).slice().reverse();for(const d of c)l=d(o,{data:t,defaultError:l}).message;return{...s,path:a,message:l}};function J(e,t){const r=nJ(),n=sJ({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Vx?void 0:Vx].filter(s=>!!s)});e.common.issues.push(n)}class Er{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const s of r){if(s.status==="aborted")return be;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const s of r){const a=await s.key,o=await s.value;n.push({key:a,value:o})}return Er.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:a,value:o}=s;
vendor: 16,781 bytes, line 614
614if(a.status==="aborted"||o.status==="aborted")return be;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[a.value]=o.value)}return{status:t.value,value:n}}}const be=Object.freeze({status:"aborted"}),Ac=e=>({status:"dirty",value:e}),qr=e=>({status:"valid",value:e}),kS=e=>e.status==="aborted",SS=e=>e.status==="dirty",Cl=e=>e.status==="valid",jm=e=>typeof Promise<"u"&&e instanceof Promise;var ie;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ie||(ie={}));class Mi{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,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 _S=(e,t)=>{if(Cl(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 r=new Ts(e.common.issues);return this._error=r,this._error}}};function Ne(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))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,l)=>{const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??l.defaultError}:typeof l.data>"u"?{message:c??n??l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:c??r??l.defaultError}},description:s}}class Oe{get description(){return this._def.description}_getType(t){return Js(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Js(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Er,ctx:{common:t.parent.common,data:t.data,parsedType:Js(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(jm(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Js(t)},s=this._parseSync({data:t,path:n.path,parent:n});return _S(n,s)}"~validate"(t){var n,s;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Js(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:r});return Cl(a)?{value:a.value}:{issues:r.common.issues}}catch(a){(s=(n=a==null?void 0:a.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(a=>Cl(a)?{value:a.value}:{issues:r.common.issues})}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Js(t)},s=this._parse({data:t,path:n.path,parent:n}),a=await(jm(s)?s:Promise.resolve(s));return _S(n,a)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,a)=>{const o=t(s),l=()=>a.addIssue({code:H.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Tl({schema:this,typeName:je.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:r=>this["~validate"](r)}}optional(){return Ai.create(this,this._def)}nullable(){return El.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return zn.create(this)}promise(){return Nm.create(this,this._def)}or(t){return Sm.create([this,t],this._def)}and(t){return _m.create(this,t,this._def)}transform(t){return new Tl({...Ne(this._def),schema:this,typeName:je.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Wx({...Ne(this._def),innerType:this,defaultValue:r,typeName:je.ZodDefault})}brand(){return new CJ({typeName:je.ZodBranded,type:this,...Ne(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new qx({...Ne(this._def),innerType:this,catchValue:r,typeName:je.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Ib.create(this,t)}readonly(){return Gx.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const iJ=/^c[^\s-]{8,}$/i,aJ=/^[0-9a-z]+$/,oJ=/^[0-9A-HJKMNP-TV-Z]{26}$/i,lJ=/^[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,cJ=/^[a-z0-9_-]{21}$/i,dJ=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,uJ=/^[-+]?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)?)??$/,hJ=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mJ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let hg;const fJ=/^(?:(?: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])$/,pJ=/^(?:(?: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])$/,gJ=/^(([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]))$/,yJ=/^(([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])$/,xJ=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,vJ=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,lI="((\\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])))",wJ=new RegExp(`^${lI}$`);function cI(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function bJ(e){return new RegExp(`^${cI(e)}$`)}function jJ(e){let t=`${lI}T${cI(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function kJ(e,t){return!!((t==="v4"||!t)&&fJ.test(e)||(t==="v6"||!t)&&gJ.test(e))}function SJ(e,t){if(!dJ.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));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 _J(e,t){return!!((t==="v4"||!t)&&pJ.test(e)||(t==="v6"||!t)&&yJ.test(e))}class pi extends Oe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==re.string){const a=this._getOrReturnCtx(t);return J(a,{code:H.invalid_type,expected:re.string,received:a.parsedType}),be}const n=new Er;let s;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(s=this._getOrReturnCtx(t,s),J(s,{code:H.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")t.data.length>a.value&&(s=this._getOrReturnCtx(t,s),J(s,{code:H.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,l=t.data.length<a.value;(o||l)&&(s=this._getOrReturnCtx(t,s),o?J(s,{code:H.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):l&&J(s,{code:H.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")hJ.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"email",code:H.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")hg||(hg=new RegExp(mJ,"u")),hg.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"emoji",code:H.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")lJ.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"uuid",code:H.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")cJ.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"nanoid",code:H.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")iJ.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"cuid",code:H.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")aJ.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"cuid2",code:H.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")oJ.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"ulid",code:H.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),J(s,{validation:"url",code:H.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"regex",code:H.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(t,s),J(s,{code:H.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(s=this._getOrReturnCtx(t,s),J(s,{code:H.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(s=this._getOrReturnCtx(t,s),J(s,{code:H.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?jJ(a).test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{code:H.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?wJ.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{code:H.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?bJ(a).test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{code:H.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?uJ.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"duration",code:H.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?kJ(t.data,a.version)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"ip",code:H.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?SJ(t.data,a.alg)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"jwt",code:H.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?_J(t.data,a.version)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"cidr",code:H.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?xJ.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"base64",code:H.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?vJ.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"base64url",code:H.invalid_string,message:a.message}),n.dirty()):De.assertNever(a);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:H.invalid_string,...ie.errToObj(n)})}_addCheck(t){return new pi({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ie.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ie.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ie.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ie.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ie.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ie.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ie.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ie.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ie.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ie.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ie.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ie.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ie.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,...ie.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,...ie.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ie.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...ie.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...ie.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...ie.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...ie.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...ie.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...ie.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...ie.errToObj(r)})}nonempty(t){return this.min(1,ie.errToObj(t))}trim(){return new pi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new pi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new pi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}
vendor: 4,658 bytes, line 614
614get 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 r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}pi.create=e=>new pi({checks:[],typeName:je.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Ne(e)});function NJ(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,a=Number.parseInt(e.toFixed(s).replace(".","")),o=Number.parseInt(t.toFixed(s).replace(".",""));return a%o/10**s}class Rd extends Oe{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)!==re.number){const a=this._getOrReturnCtx(t);return J(a,{code:H.invalid_type,expected:re.number,received:a.parsedType}),be}let n;const s=new Er;for(const a of this._def.checks)a.kind==="int"?De.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),J(n,{code:H.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),J(n,{code:H.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),J(n,{code:H.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?NJ(t.data,a.value)!==0&&(n=this._getOrReturnCtx(t,n),J(n,{code:H.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),J(n,{code:H.not_finite,message:a.message}),s.dirty()):De.assertNever(a);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,ie.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ie.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ie.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ie.toString(r))}setLimit(t,r,n,s){return new Rd({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:ie.toString(s)}]})}_addCheck(t){return new Rd({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ie.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ie.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ie.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:ie.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ie.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ie.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&De.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}
vendor: 4,116 bytes, line 614
614}Rd.create=e=>new Rd({checks:[],typeName:je.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ne(e)});class Pd extends Oe{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)!==re.bigint)return this._getInvalidInput(t);let n;const s=new Er;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),J(n,{code:H.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),J(n,{code:H.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),J(n,{code:H.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):De.assertNever(a);return{status:s.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return J(r,{code:H.invalid_type,expected:re.bigint,received:r.parsedType}),be}gte(t,r){return this.setLimit("min",t,!0,ie.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ie.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ie.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ie.toString(r))}setLimit(t,r,n,s){return new Pd({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:ie.toString(s)}]})}_addCheck(t){return new Pd({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ie.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ie.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Pd.create=e=>new Pd({checks:[],typeName:je.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Ne(e)});class NS extends Oe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==re.boolean){const n=this._getOrReturnCtx(t);return J(n,{code:H.invalid_type,expected:re.boolean,received:n.parsedType}),be}return qr(t.data)}}NS.create=e=>new NS({typeName:je.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ne(e)});class km extends Oe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==re.date){const a=this._getOrReturnCtx(t);return J(a,{code:H.invalid_type,expected:re.date,received:a.parsedType}),be}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return J(a,{code:H.invalid_date}),be}const n=new Er;let s;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(s=this._getOrReturnCtx(t,s),J(s,{code:H.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(s=this._getOrReturnCtx(t,s),J(s,{code:H.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):De.assertNever(a);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new km({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:ie.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:ie.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}km.create=e=>new km({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:je.ZodD
vendor: 8,516 bytes, line 614
614ate,...Ne(e)});class CS extends Oe{_parse(t){if(this._getType(t)!==re.symbol){const n=this._getOrReturnCtx(t);return J(n,{code:H.invalid_type,expected:re.symbol,received:n.parsedType}),be}return qr(t.data)}}CS.create=e=>new CS({typeName:je.ZodSymbol,...Ne(e)});class AS extends Oe{_parse(t){if(this._getType(t)!==re.undefined){const n=this._getOrReturnCtx(t);return J(n,{code:H.invalid_type,expected:re.undefined,received:n.parsedType}),be}return qr(t.data)}}AS.create=e=>new AS({typeName:je.ZodUndefined,...Ne(e)});class TS extends Oe{_parse(t){if(this._getType(t)!==re.null){const n=this._getOrReturnCtx(t);return J(n,{code:H.invalid_type,expected:re.null,received:n.parsedType}),be}return qr(t.data)}}TS.create=e=>new TS({typeName:je.ZodNull,...Ne(e)});class ES extends Oe{constructor(){super(...arguments),this._any=!0}_parse(t){return qr(t.data)}}ES.create=e=>new ES({typeName:je.ZodAny,...Ne(e)});class RS extends Oe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return qr(t.data)}}RS.create=e=>new RS({typeName:je.ZodUnknown,...Ne(e)});class Di extends Oe{_parse(t){const r=this._getOrReturnCtx(t);return J(r,{code:H.invalid_type,expected:re.never,received:r.parsedType}),be}}Di.create=e=>new Di({typeName:je.ZodNever,...Ne(e)});class PS extends Oe{_parse(t){if(this._getType(t)!==re.undefined){const n=this._getOrReturnCtx(t);return J(n,{code:H.invalid_type,expected:re.void,received:n.parsedType}),be}return qr(t.data)}}PS.create=e=>new PS({typeName:je.ZodVoid,...Ne(e)});class zn extends Oe{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==re.array)return J(r,{code:H.invalid_type,expected:re.array,received:r.parsedType}),be;if(s.exactLength!==null){const o=r.data.length>s.exactLength.value,l=r.data.length<s.exactLength.value;(o||l)&&(J(r,{code:o?H.too_big:H.too_small,minimum:l?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(J(r,{code:H.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(J(r,{code:H.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,l)=>s.type._parseAsync(new Mi(r,o,r.path,l)))).then(o=>Er.mergeArray(n,o));const a=[...r.data].map((o,l)=>s.type._parseSync(new Mi(r,o,r.path,l)));return Er.mergeArray(n,a)}get element(){return this._def.type}min(t,r){return new zn({...this._def,minLength:{value:t,message:ie.toString(r)}})}max(t,r){return new zn({...this._def,maxLength:{value:t,message:ie.toString(r)}})}length(t,r){return new zn({...this._def,exactLength:{value:t,message:ie.toString(r)}})}nonempty(t){return this.min(1,t)}}zn.create=(e,t)=>new zn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:je.ZodArray,...Ne(t)});function po(e){if(e instanceof pt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Ai.create(po(n))}return new pt({...e._def,shape:()=>t})}else return e instanceof zn?new zn({...e._def,type:po(e.element)}):e instanceof Ai?Ai.create(po(e.unwrap())):e instanceof El?El.create(po(e.unwrap())):e instanceof Ha?Ha.create(e.items.map(t=>po(t))):e}class pt extends Oe{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(),r=De.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==re.object){const d=this._getOrReturnCtx(t);return J(d,{code:H.invalid_type,expected:re.object,received:d.parsedType}),be}const{status:n,ctx:s}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof Di&&this._def.unknownKeys==="strip"))for(const d in s.data)o.includes(d)||l.push(d);const c=[];for(const d of o){const u=a[d],h=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new Mi(s,h,s.path,d)),alwaysSet:d in s.data})}if(this._def.catchall instanceof Di){const d=this._def.unknownKeys;if(d==="passthrough")for(const u of l)c.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(d==="strict")l.length>0&&(J(s,{code:H.unrecognized_keys,keys:l}),n.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const u of l){const h=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new Mi(s,h,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const d=[];for(const u of c){const h=await u.key,m=await u.value;d.push({key:h,value:m,alwaysSet:u.alwaysSet})}return d}).then(d=>Er.mergeObjectSync(n,d)):Er.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return ie.errToObj,new pt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var a,o;const s=((o=(a=this._def).errorMap)==null?void 0:o.call(a,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:ie.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new pt({...this._def,unknownKeys:"strip"})}passthrough(){return new pt({...this._def,unknownKeys:"passthrough"})}extend(t){return new pt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new pt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:je.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new pt({...this._def,catchall:t})}pick(t){const r={};for(const n of De.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new pt({...this._def,shape:()=>r})}omit(t){const r={};for(const n of De.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new pt({...this._def,shape:()=>r})}deepPartial(){return po(this)}partial(t){const r={};for(const n of De.objectKeys(this.shape)){const s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new pt({...this._def,shape:()=>r})}required(t){const r={};for(const n of De.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof Ai;)a=a._def.innerType;r[n]=a}return new pt({...this._def,shape:()=>r})}keyof(){return dI(De.objectKeys(this.shape))}}pt.create=(e,t)=>new pt({shape:()=>e,unknownKeys:"strip",catchall:Di.create(),typeName:je.ZodObject,...Ne(t)});pt.strictCreate=(e,t)=>new pt({shape:()=>e,unknownKeys:"strict",catchall:Di.create(),typeName:je.ZodObject,...Ne(t)});pt.lazycreate=(e,t)=>new pt({shape:e,unknownKeys:"strip",catchall:Di.create(),typeName:je.ZodObject,...Ne(t)});class Sm extends Oe{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(a){for(const l of a)if(l.result.status==="valid")return l.result;for(const l of a)if(l.result.status==="dirty")return r.common.issues.push(...l.ctx.common.issues),l.result;const o=a.map(l=>new Ts(l.ctx.common.issues));return J(r,{code:H.invalid_union,unionErrors:o}),be}if(r.common.async)return Promise.all(n.map(async a=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let a;const o=[];for(const c of n){const d={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:d});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:d}),d.common.issues.length&&o.push(d.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const l=o.map(c=>new Ts(c));return J(r,{code:H.invalid_union,unionErrors:l}),be}}get options(){return this._def.options}}Sm.create=(e,t)=>new Sm({options:e,typeName:je.ZodUnion,...Ne(t)});function Hx(e,t){const r=Js(e),n=Js(t);if(e===t)return{valid:!0,data:e};if(r===re.object&&n===re.object){const s=De.objectKeys(t),a=De.objectKeys(e).filter(l=>s.indexOf(l)!==-1),o={...e,...t};for(const l of a){const c=Hx(e[l],t[l]);if(!c.valid)return{valid:!1};o[l]=c.data}return{valid:!0,data:o}}else if(r===re.array&&n===re.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let a=0;a<e.length;a++){const o=e[a],l=t[a],c=Hx(o,l);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===re.date&&n===re.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class _m extends Oe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=(a,o)=>
vendor: 4,163 bytes, line 614
614{if(kS(a)||kS(o))return be;const l=Hx(a.value,o.value);return l.valid?((SS(a)||SS(o))&&r.dirty(),{status:r.value,value:l.data}):(J(n,{code:H.invalid_intersection_types}),be)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,o])=>s(a,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}_m.create=(e,t,r)=>new _m({left:e,right:t,typeName:je.ZodIntersection,...Ne(r)});class Ha extends Oe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==re.array)return J(n,{code:H.invalid_type,expected:re.array,received:n.parsedType}),be;if(n.data.length<this._def.items.length)return J(n,{code:H.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),be;!this._def.rest&&n.data.length>this._def.items.length&&(J(n,{code:H.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...n.data].map((o,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new Mi(n,o,n.path,l)):null}).filter(o=>!!o);return n.common.async?Promise.all(a).then(o=>Er.mergeArray(r,o)):Er.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new Ha({...this._def,rest:t})}}Ha.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ha({items:e,typeName:je.ZodTuple,rest:null,...Ne(t)})};class IS extends Oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==re.map)return J(n,{code:H.invalid_type,expected:re.map,received:n.parsedType}),be;const s=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([l,c],d)=>({key:s._parse(new Mi(n,l,n.path,[d,"key"])),value:a._parse(new Mi(n,c,n.path,[d,"value"]))}));if(n.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of o){const d=await c.key,u=await c.value;if(d.status==="aborted"||u.status==="aborted")return be;(d.status==="dirty"||u.status==="dirty")&&r.dirty(),l.set(d.value,u.value)}return{status:r.value,value:l}})}else{const l=new Map;for(const c of o){const d=c.key,u=c.value;if(d.status==="aborted"||u.status==="aborted")return be;(d.status==="dirty"||u.status==="dirty")&&r.dirty(),l.set(d.value,u.value)}return{status:r.value,value:l}}}}IS.create=(e,t,r)=>new IS({valueType:t,keyType:e,typeName:je.ZodMap,...Ne(r)});class Id extends Oe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==re.set)return J(n,{code:H.invalid_type,expected:re.set,received:n.parsedType}),be;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(J(n,{code:H.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(J(n,{code:H.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const a=this._def.valueType;function o(c){const d=new Set;for(const u of c){if(u.status==="aborted")return be;u.status==="dirty"&&r.dirty(),d.add(u.value)}return{status:r.value,value:d}}const l=[...n.data.values()].map((c,d)=>a._parse(new Mi(n,c,n.path,d)));return n.common.async?Promise.all(l).then(c=>o(c)):o(l)}min(t,r){return new Id({...this._def,minSize:{value:t,message:ie.toString(r)}})}max(t,r){return new Id({...this._def,maxSize:{value:t,message:ie.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Id.create=(e,t)=>new Id({valueType:e,minSize:null,maxSize:null,typeName:je.ZodSet,...Ne(t)});class OS extends Oe{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}OS.create=(e,t)=>new OS({getter:e,typeName:je.ZodLazy,...Ne(t)});class zx extends Oe{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return J(r,{received:r.data,code:H.invalid_literal,expected:this._def.value}),be}
vendor: 4,515 bytes, line 614
614return{status:"valid",value:t.data}}get value(){return this._def.value}}zx.create=(e,t)=>new zx({value:e,typeName:je.ZodLiteral,...Ne(t)});function dI(e,t){return new Al({values:e,typeName:je.ZodEnum,...Ne(t)})}class Al extends Oe{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return J(r,{expected:De.joinValues(n),received:r.parsedType,code:H.invalid_type}),be}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return J(r,{received:r.data,code:H.invalid_enum_value,options:n}),be}return qr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return Al.create(t,{...this._def,...r})}exclude(t,r=this._def){return Al.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}Al.create=dI;class MS extends Oe{_parse(t){const r=De.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==re.string&&n.parsedType!==re.number){const s=De.objectValues(r);return J(n,{expected:De.joinValues(s),received:n.parsedType,code:H.invalid_type}),be}if(this._cache||(this._cache=new Set(De.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=De.objectValues(r);return J(n,{received:n.data,code:H.invalid_enum_value,options:s}),be}return qr(t.data)}get enum(){return this._def.values}}MS.create=(e,t)=>new MS({values:e,typeName:je.ZodNativeEnum,...Ne(t)});class Nm extends Oe{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==re.promise&&r.common.async===!1)return J(r,{code:H.invalid_type,expected:re.promise,received:r.parsedType}),be;const n=r.parsedType===re.promise?r.data:Promise.resolve(r.data);return qr(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Nm.create=(e,t)=>new Nm({type:e,typeName:je.ZodPromise,...Ne(t)});class Tl extends Oe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===je.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,a={addIssue:o=>{J(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){const o=s.transform(n.data,a);if(n.common.async)return Promise.resolve(o).then(async l=>{if(r.value==="aborted")return be;const c=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return c.status==="aborted"?be:c.status==="dirty"||r.value==="dirty"?Ac(c.value):c});{if(r.value==="aborted")return be;const l=this._def.schema._parseSync({data:o,path:n.path,parent:n});return l.status==="aborted"?be:l.status==="dirty"||r.value==="dirty"?Ac(l.value):l}}if(s.type==="refinement"){const o=l=>{const c=s.refinement(l,a);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?be:(l.status==="dirty"&&r.dirty(),o(l.value),{status:r.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?be:(l.status==="dirty"&&r.dirty(),o(l.value).then(()=>({status:r.value,value:l.value}))))}if(s.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Cl(o))return be;const l=s.transform(o.value,a);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Cl(o)?Promise.resolve(s.transform(o.value,a)).then(l=>({status:r.value,value:l})):be);De.assertNever(s)}}Tl.create=(e,t,r)=>new Tl({schema:e,typeName:je.ZodEffects,effect:t,...Ne(r)});Tl.createWithPreprocess=(e,t,r)=>new Tl({schema:t,effect:{type:"preprocess",transform:e},typeName:je.ZodEffects,...Ne(r)});class Ai extends Oe{_parse(t){return this._getType(t)===re.undefined?qr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ai.create=(e,t)=>
614new Ai({innerType:e,typeName:je.ZodOptional,...Ne(t)});class El extends Oe{_parse(t){return this._getType(t)===re.null?qr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}El.create=(e,t)=>new El({innerType:e,typeName:je.ZodNullable,...Ne(t)});class Wx extends Oe{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===re.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Wx.create=(e,t)=>new Wx({innerType:e,typeName:je.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ne(t)});class qx extends Oe{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return jm(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ts(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ts(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}qx.create=(e,t)=>new qx({innerType:e,typeName:je.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ne(t)});class DS extends Oe{_parse(t){if(this._getType(t)!==re.nan){const n=this._getOrReturnCtx(t);return J(n,{code:H.invalid_type,expected:re.nan,received:n.parsedType}),be}return{status:"valid",value:t.data}}}DS.create=e=>new DS({typeName:je.ZodNaN,...Ne(e)});class CJ extends Oe{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Ib extends Oe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?be:a.status==="dirty"?(r.dirty(),Ac(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?be:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new Ib({in:t,out:r,typeName:je.ZodPipeline})}}class Gx extends Oe{_parse(t){const r=this._def.innerType._parse(t),n=s=>(Cl(s)&&(s.value=Object.freeze(s.value)),s);return jm(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}Gx.create=(e,t)=>new Gx({innerType:e,typeName:je.ZodReadonly,...Ne(t)});pt.lazycreate;var je;(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"})(je||(je={}));const fc=pi.create;Di.create;zn.create;const AJ=pt.create;pt.strictCreate;Sm.create;_m.create;Ha.create;const TJ=zx.create;Al.create;Nm.create;Ai.create;El.create;const EJ=AJ({first_name:fc().trim().min(1,"First name is required").max(80),last_name:fc().trim().max(80).optional(),relationship:fc().trim().max(60).optional(),email:fc().trim().email("Invalid email").max(255).optional().or(TJ("")),date_of_birth:fc().optional()});function RJ({userId:e}){const[t,r]=p.useState(null),[n,s]=p.useState([]),[a,o]=p.useState([]),[l,c]=p.useState(!0),[d,u]=p.useState(!1),[h,m]=p.useState(!1),[f,y]=p.useState({first_name:"",last_name:"",relationship:"",email:"",date_of_birth:""}),x=p.useCallback(async()=>{const{data:g}=await F.from("profiles").select("household_id").eq("id",e).maybeSingle(),v=(g==null?void 0:g.household_id)??null;if(r(v),v){const[{data:w},{data:j}]=await Promise.all([F.from("profiles").select("id,first_name,last_name,avatar_url").eq("household_id",v).neq("id",e),F.from("family_add_requests").select("id,first_name,last_name,relationship,status").eq("household_id",v).order("created_at",{ascending:!1})]);s(w??[]),o(j??[])}else s([]),o([]);c(!1)},[e]);p.useEffect(()=>{x()},[x]);async function b(){var w;const g=EJ.safeParse(f);if(!g.success){ce.error(((w=g.error.issues[0])==null?void 0:w.message)??"Please check the form.");return}if(!t){ce.error("You're not linked to a household yet. Please contact us.");return}m(!0);const{error:v}=await F.from("family_add_requests").insert({household_id:t,requested_by:e,first_name:f.first_name.trim(),last_name:f.last_name.trim()||null,relationship:f.relationship.trim()||null,email:f.email.trim()||null,date_of_birth:f.date_of_birth||null});if(m(!1),v){ce.error("Could not submit request.");return}y({first_name:"",last_name:"",relationship:"",email:"",date_of_birth:""}),u(!1),ce.success("Request submitted. Our staff will review it."),await x()}return i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2",children:[i.jsx(ar,{className:"h-5 w-5 text-primary"})," Family Account"]})}),i.jsx(Me,{className:"space-y-4",children:l?i.jsx("p",{className:"text-sm text-muted-foreground",children:"Loadingâ¦"}):i.jsxs(i.Fragment,{children:[n.length===0?i.jsx("p",{className:"text-sm text-muted-foreground",children:"No other family members on your account."}):i.jsx("ul",{className:"space-y-2",children:n.map(g=>{var v;return i.jsxs("li",{className:"flex items-center gap-3 rounded-md border border-border p-2",children:[i.jsxs(Ns,{className:"h-8 w-8",children:[i.jsx(Cs,{src:g.avatar_url??void 0}),i.jsx(As,{children:(((v=g.first_name)==null?void 0:v[0])??"?").toUpperCase()})]}),i.jsx("span",{className:"text-sm font-medium",children:[g.first_name,g.last_name].filter(
614Boolean).join(" ")||"Member"})]},g.id)})}),a.length>0&&i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Requests"}),a.map(g=>i.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-dashed border-border p-2 text-sm",children:[i.jsxs("span",{children:[[g.first_name,g.last_name].filter(Boolean).join(" "),g.relationship?` (${g.relationship})`:""]}),i.jsx(rt,{variant:g.status==="approved"?"default":g.status==="declined"?"destructive":"secondary",className:"capitalize",children:g.status})]},g.id))]}),d?i.jsxs("div",{className:"space-y-3 rounded-md border border-border p-3",children:[i.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"ffn",children:"First name"}),i.jsx(we,{id:"ffn",value:f.first_name,onChange:g=>y(v=>({...v,first_name:g.target.value}))})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"fln",children:"Last name"}),i.jsx(we,{id:"fln",value:f.last_name,onChange:g=>y(v=>({...v,last_name:g.target.value}))})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"frel",children:"Relationship"}),i.jsx(we,{id:"frel",placeholder:"e.g. Child, Spouse",value:f.relationship,onChange:g=>y(v=>({...v,relationship:g.target.value}))})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"fdob",children:"Date of birth"}),i.jsx(we,{id:"fdob",type:"date",value:f.date_of_birth,onChange:g=>y(v=>({...v,date_of_birth:g.target.value}))})]}),i.jsxs("div",{className:"space-y-1.5 sm:col-span-2",children:[i.jsx(pe,{htmlFor:"fem",children:"Email (optional)"}),i.jsx(we,{id:"fem",type:"email",value:f.email,onChange:g=>y(v=>({...v,email:g.target.value}))})]})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs(I,{size:"sm",onClick:b,disabled:h,children:[h&&i.jsx(Be,{className:"mr-2 h-4 w-4 animate-spin"}),"Submit Request"]}),i.jsx(I,{size:"sm",variant:"ghost",onClick:()=>u(!1),children:"Cancel"})]})]}):i.jsxs(I,{size:"sm",variant:"outline",onClick:()=>u(!0),children:[i.jsx(Xm,{className:"mr-2 h-4 w-4"})," Request to Add Family Member"]})]})})]})}function PJ(){const{user:e,roles:t,isStaff:r,signOut:n}=Ga(),[s,a]=p.useState(null),[o,l]=p.useState(!0),[c,d]=p.useState(!1);p.useEffect(()=>{e&&F.from("profiles").select("first_name,last_name,email,phone,date_of_birth,emergency_contact_name,emergency_contact_phone,waiver_signed,preferred_name,address_line1,address_line2,city,state,postal_code").eq("id",e.id).maybeSingle().then(({data:m})=>{a(m),l(!1)})},[e]);async function u(m){if(m.preventDefault(),!e||!s)return;d(!0);const{error:f}=await F.from("profiles").update({first_name:s.first_name,last_name:s.last_name,phone:s.phone,date_of_birth:s.date_of_birth||null,emergency_contact_name:s.emergency_contact_name,emergency_contact_phone:s.emergency_contact_phone,preferred_name:s.preferred_name,address_line1:s.address_line1,address_line2:s.address_line2,city:s.city,state:s.state,postal_code:s.postal_code}).eq("id",e.id);d(!1),f?ce.error("Could not save changes."):ce.success("Profile updated.")}[s==null?void 0:s.first_name,s==null?void 0:s.last_name].filter(Boolean).join(" ");const h=r?t.includes("admin")?"Administrator":"Instructor":"Member";return o?i.jsx("div",{className:"flex min-h-[60vh] items-center justify-center",children:i.jsx(Be,{className:"h-8 w-8 animate-spin text-primary"})}):i.jsxs(i.Fragment,{children:[i.jsx($e,{title:"Member Dashboard | BladeFit Academy",description:"Your BladeFit Academy member portal.",path:"/dashboard",noindex:!0}),i.jsx("section",{className:"border-b border-border bg-card py-12",children:i.jsxs("div",{className:"container mx-auto flex flex-wrap items-center justify-between gap-4 px-4 lg:px-8",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-sm font-semibold uppercase tracking-[0.3em] text-primary",children:h}),i.jsxs("h1",{className:"mt-1 font-heading text-3xl font-bold md:text-4xl",children:["Welcome, ",(s==null?void 0:s.first_name)||"Member"]})]}),i.jsxs("div",{className:"flex gap-2",children:[r&&i.jsx(B,{to:"/admin",children:i.jsxs(I,{variant:"outline",children:[i.jsx(Sa,{className:"mr-2 h-4 w-4"})," Staff Area"]})}),i.jsxs(I,{variant:"outline",onClick:n,children:[i.jsx(WD,{className:"mr-2 h-4 w-4"})," Sign Out"]})]})]})}),i.jsx("section",{className:"py-12",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs(DP,{defaultValue:"classes",children:[i.jsxs(Nb,{className:"mb-8",children:[i.jsx(ds,{value:"classes",children:"My Classes"}),i.jsx(ds,{value:"membership",children:"Membership"}),i.jsx(ds,{value:"profile",children:"Profile"})]}),i.jsx(us,{value:"classes",children:i.jsxs(L.div,{initial:{opacity:0,y:16}
614,animate:{opacity:1,y:0},transition:{duration:.4},className:"grid gap-6 lg:grid-cols-3",children:[i.jsxs("div",{className:"lg:col-span-2",children:[i.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[i.jsx("h2",{className:"font-heading text-xl font-semibold",children:"Your upcoming classes"}),i.jsx(B,{to:"/schedule",children:i.jsx(I,{variant:"outline",size:"sm",children:"Book more"})})]}),e&&i.jsx($Y,{userId:e.id})]}),i.jsxs("div",{className:"space-y-6",children:[e&&i.jsx(DY,{userId:e.id}),e&&i.jsx(RY,{userId:e.id})]})]})}),i.jsx(us,{value:"membership",children:i.jsxs(L.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.4},className:"grid gap-6 lg:grid-cols-2",children:[e&&i.jsx(FY,{userId:e.id}),i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2",children:[i.jsx(Jv,{className:"h-5 w-5 text-primary"})," Billing Details"]})}),i.jsx(Me,{children:i.jsxs("div",{className:"rounded-md border border-dashed border-border p-6 text-center",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"Online payment methods are being set up. You'll be able to securely add a card here soon."}),i.jsx(I,{variant:"outline",size:"sm",className:"mt-4",disabled:!0,children:"Add Payment Method"})]})})]}),e&&i.jsx("div",{className:"lg:col-span-2",children:i.jsx(BY,{userId:e.id})})]})}),i.jsx(us,{value:"profile",children:i.jsxs("div",{className:"mx-auto grid max-w-2xl gap-6",children:[i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsx(Ye,{children:"My Profile"})}),i.jsx(Me,{children:i.jsxs("form",{onSubmit:u,className:"space-y-4",children:[i.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"fn",children:"First name"}),i.jsx(we,{id:"fn",value:(s==null?void 0:s.first_name)??"",onChange:m=>a(f=>f&&{...f,first_name:m.target.value})})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"ln",children:"Last name"}),i.jsx(we,{id:"ln",value:(s==null?void 0:s.last_name)??"",onChange:m=>a(f=>f&&{...f,last_name:m.target.value})})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"pn",children:"Preferred name"}),i.jsx(we,{id:"pn",value:(s==null?void 0:s.preferred_name)??"",onChange:m=>a(f=>f&&{...f,preferred_name:m.target.value})})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"em",children:"Email"}),i.jsx(we,{id:"em",value:(s==null?void 0:s.email)??"",disabled:!0})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"ph",children:"Phone"}),i.jsx(we,{id:"ph",value:(s==null?void 0:s.phone)??"",onChange:m=>a(f=>f&&{...f,phone:m.target.value})})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"dob",children:"Date of birth"}),i.jsx(we,{id:"dob",type:"date",value:(s==null?void 0:s.date_of_birth)??"",onChange:m=>a(f=>f&&{...f,date_of_birth:m.target.value})})]})]}),i.jsxs("div",{className:"border-t border-border pt-4",children:[i.jsx("p",{className:"mb-3 text-sm font-semibold text-muted-foreground",children:"Address"}),i.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[i.jsxs("div",{className:"space-y-1.5 sm:col-span-2",children:[i.jsx(pe,{htmlFor:"al1",children:"Street address"}),i.jsx(we,{id:"al1",value:(s==null?void 0:s.address_line1)??"",onChange:m=>a(f=>f&&{...f,address_line1:m.target.value})})]}),i.jsxs("div",{className:"space-y-1.5 sm:col-span-2",children:[i.jsx(pe,{htmlFor:"al2",children:"Apt / Suite (optional)"}),i.jsx(we,{id:"al2",value:(s==null?void 0:s.address_line2)??"",onChange:m=>a(f=>f&&{...f,address_line2:m.target.value})})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"city",children:"City"}),i.jsx(we,{id:"city",value:(s==null?void 0:s.city)??"",onChange:m=>a(f=>f&&{...f,city:m.target.value})})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"state",children:"State"}),i.jsx(we,{id:"state",value:(s==null?void 0:s.state)??"",onChange:m=>a(f=>f&&{...f,state:m.target.value})})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"zip",children:"ZIP / Postal code"}),i.jsx(we,{id:"zip",value:(s==null?void 0:s.postal_code)??"",onChange:m=>a(f=>f&&{...f,postal_code:m.target.value})})]})]})]}),i.jsxs("div",{className:"border-t border-border pt-4",children:[i.jsx("p",{className:"mb-3 text-sm font-semibold text-muted-foreground",children:"Emergency Contact"}),i.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"ecn",children:"Name"}),i.jsx(we,{id:"ecn",value:(s==null?void 0:s.emergency_contact_name)??"",onChange:m=>a(f=>f&&{...f,emergency_contact_name:m.target.value})})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{htmlFor:"ecp",children:"Phone"}),i.jsx(we,{id:"ecp",value:(s==null?void 0:s.emergency_contact_phone)??"",onChange:m=>a(f=>f&&{...f,emergency_contact_phone:m.target.value})})]})]})]}
614),i.jsxs(I,{type:"submit",disabled:c,className:"bg-gradient-gold font-semibold text-primary-foreground hover:opacity-90",children:[c&&i.jsx(Be,{className:"mr-2 h-4 w-4 animate-spin"}),"Save Changes"]})]})})]}),e&&i.jsx(RJ,{userId:e.id})]})})]})})})]})}var IJ="Separator",LS="horizontal",OJ=["horizontal","vertical"],uI=p.forwardRef((e,t)=>{const{decorative:r,orientation:n=LS,...s}=e,a=MJ(n)?n:LS,l=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return i.jsx(le.div,{"data-orientation":a,...l,...s,ref:t})});uI.displayName=IJ;function MJ(e){return OJ.includes(e)}var hI=uI;const Kx=p.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},s)=>i.jsx(hI,{ref:s,decorative:r,orientation:t,className:Q("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Kx.displayName=hI.displayName;function DJ(e){if(!e)return null;const t=new Date(e);if(Number.isNaN(t.getTime()))return null;const r=new Date;let n=r.getFullYear()-t.getFullYear();const s=r.getMonth()-t.getMonth();return(s<0||s===0&&r.getDate()<t.getDate())&&n--,n}function pc(e){if(!e)return"â";const t=new Date(e);return Number.isNaN(t.getTime())?"â":t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function $S({label:e}){return i.jsxs("div",{className:"rounded-md border border-dashed border-border p-6 text-center text-sm text-muted-foreground",children:[e," â coming soon."]})}function LJ(){const{id:e}=Kd(),{user:t}=Ga(),[r,n]=p.useState(null),[s,a]=p.useState([]),[o,l]=p.useState([]),[c,d]=p.useState(new Set),[u,h]=p.useState([]),[m,f]=p.useState([]),[y,x]=p.useState([]),[b,g]=p.useState(null),[v,w]=p.useState([]),[j,k]=p.useState(null),[S,_]=p.useState(!1),[N,T]=p.useState("assign"),[P,A]=p.useState(""),[M,z]=p.useState(!1),[$,ae]=p.useState([]),[W,q]=p.useState(""),[R,O]=p.useState(!1),[V,he]=p.useState(null),[ne,xe]=p.useState(""),[me,We]=p.useState(""),[Ze,Y]=p.useState(""),[Fe,nt]=p.useState(!0),Te=p.useCallback(async(E,ue)=>{if(!E){l([]),d(new Set);return}const[{data:se},{data:He}]=await Promise.all([F.from("rank_requirements").select("id,title").eq("rank_id",E).order("sort_order"),F.from("member_requirement_progress").select("requirement_id").eq("user_id",ue).eq("completed",!0)]);l(se??[]),d(new Set((He??[]).map(bt=>bt.requirement_id)))},[]),_e=p.useCallback(async E=>{const{data:ue}=await F.from("member_notes").select("id,body,created_at").eq("member_id",E).order("created_at",{ascending:!1});h(ue??[])},[]),Ae=p.useCallback(async E=>{const{data:ue}=await F.from("rank_history").select("id,awarded_at,notes,ranks:rank_id (name,track,color)").eq("user_id",E).order("awarded_at",{ascending:!1});f(ue??[])},[]),_t=p.useCallback(async(E,ue)=>{if(!E){x([]),g(null);return}const[{data:se},{data:He}]=await Promise.all([F.from("households").select("name").eq("id",E).maybeSingle(),F.from("profiles").select("id,first_name,last_name,avatar_url").eq("household_id",E).neq("id",ue)]);g((se==null?void 0:se.name)??null),x(He??[])},[]),It=p.useCallback(async E=>{const{data:ue}=await F.from("payments").select("id,amount,description,method,status,due_date,paid_date").eq("member_id",E).order("due_date",{ascending:!1,nullsFirst:!1});w(ue??[])},[]),Gr=p.useCallback(async E=>{if(!E){ae([]);return}const{data:ue}=await F.from("member_messages").select("id,body,created_at,sender_id,attachment_path,attachment_type,attachment_name").eq("household_id",E).order("created_at",{ascending:!0}),se=ue??[],He=[...new Set(se.map(Vt=>Vt.sender_id).filter(Boolean))];let bt={};if(He.length){const{data:Vt}=await F.from("profiles").select("id,first_name,last_name").in("id",He);bt=Object.fromEntries((Vt??[]).map(Kr=>[Kr.id,[Kr.first_name,Kr.last_name].filter(Boolean).join(" ")||"Unknown"]))}const Ki=se.map(Vt=>Vt.attachment_path).filter(Boolean),Qa={};if(Ki.length){const{data:Vt}=await F.storage.from("message-attachments").createSignedUrls(Ki,3600);(Vt??[]).forEach(Kr=>{Kr.path&&Kr.signedUrl&&(Qa[Kr.path]=Kr.signedUrl)})}ae(se.map(Vt=>({...Vt,sender_name:Vt.sender_id?bt[Vt.sender_id]??"Unknown":"System",attachment_url:Vt.attachment_path?Qa[Vt.attachment_path]??null:null})))},[]),cr=p.useCallback(async(E,ue)=>{const se=[`member_id.eq.${E}`];ue&&se.push(`household_id.eq.${ue}`);const{data:He}=await F.from("member_memberships").select("id,member_id,household_id,plan_id,plan_label,amount,billing_period,category,status,trial_started_at,started_at,converted_at").or(se.join(",")).neq("status","cancelled").order("created_at",{ascending:!1}).limit(1);k((He==null?void 0:He[0])??null)},[]);p.useEffect(()=>{e&&(async()=>{const[{data:E},{data:ue}]=await Promise.all([F.from("profiles").select("id,first_name,last_name,email,phone,avatar_url,date_of_birth,household_id,emergency_contact_name,emergency_contact_phone,current_rank_id,waiver_signed").eq("id",e).maybeSingle(),F.from("ranks").select("id,name,track,
614color").order("track").order("sort_order")]),se=E;n(se),a(ue??[]),await Promise.all([Te((se==null?void 0:se.current_rank_id)??null,e),_e(e),Ae(e),_t((se==null?void 0:se.household_id)??null,e),It(e),Gr((se==null?void 0:se.household_id)??null),cr(e,(se==null?void 0:se.household_id)??null)]),nt(!1)})()},[e,Te,_e,Ae,_t,It,Gr,cr]);async function Zn(E,ue){if(!e)return;const se=new Set(c);ue?(se.add(E),await F.from("member_requirement_progress").upsert({user_id:e,requirement_id:E,completed:!0,completed_by:t==null?void 0:t.id,completed_at:new Date().toISOString()},{onConflict:"user_id,requirement_id"})):(se.delete(E),await F.from("member_requirement_progress").delete().eq("user_id",e).eq("requirement_id",E)),d(se)}async function qi(){if(!e||!me)return;const{error:E}=await F.from("rank_history").insert({user_id:e,rank_id:me,awarded_by:t==null?void 0:t.id,notes:Ze||null});if(E){ce.error("Could not record promotion.");return}await F.from("profiles").update({current_rank_id:me}).eq("id",e),n(ue=>ue&&{...ue,current_rank_id:me}),await Promise.all([Te(me,e),Ae(e)]),Y(""),ce.success("Member promoted.")}async function Ls(){if(!e||!ne.trim())return;const{error:E}=await F.from("member_notes").insert({member_id:e,author_id:t==null?void 0:t.id,body:ne.trim()});if(E){ce.error("Could not save note.");return}xe(""),await _e(e)}async function ru(){if(!t||!(r!=null&&r.household_id)||!W.trim()&&!V)return;O(!0);let E=null,ue=null,se=null;if(V){const bt=V.name.split(".").pop()??"bin",Ki=`${r.household_id}/${crypto.randomUUID()}.${bt}`,{error:Qa}=await F.storage.from("message-attachments").upload(Ki,V,{contentType:V.type,upsert:!1});if(Qa){O(!1),ce.error("Could not upload attachment.");return}E=Ki,ue=V.type,se=V.name}const{error:He}=await F.from("member_messages").insert({household_id:r.household_id,sender_id:t.id,body:W.trim(),attachment_path:E,attachment_type:ue,attachment_name:se});if(O(!1),He){ce.error("Could not send message.");return}q(""),he(null),await Gr(r.household_id)}async function Gi(E){if(!e)return null;const ue=new Date().toISOString().slice(0,10),{data:se,error:He}=await F.from("payments").insert({member_id:e,amount:E.amount,description:E.label,method:"manual",status:"pending",due_date:ue,created_by:t==null?void 0:t.id}).select("id").maybeSingle();return He?null:(se==null?void 0:se.id)??null}async function nu(){if(!e)return;z(!0);const E=new Date().toISOString(),{error:ue}=await F.from("member_memberships").insert({member_id:e,plan_id:ia.id,plan_label:ia.label,amount:ia.amount,billing_period:ia.period,category:ia.category,status:"trial",trial_started_at:E,created_by:t==null?void 0:t.id});if(z(!1),ue){ce.error("Could not start trial.");return}await Promise.all([cr(e,(r==null?void 0:r.household_id)??null),It(e)]),ce.success("Trial started.")}async function Xn(){if(!e)return;const E=UH(P);if(!E){ce.error("Pick a plan first.");return}if(E.scope==="family"&&!(r!=null&&r.household_id)){ce.error("This member isn't linked to a household, so a family plan can't be assigned.");return}z(!0);const ue=new Date().toISOString(),se=await Gi(E),He=E.scope==="family"?{member_id:null,household_id:(r==null?void 0:r.household_id)??null}:{member_id:e,household_id:null};let bt;if(N==="convert"&&j?{error:bt}=await F.from("member_memberships").update({...He,plan_id:E.id,plan_label:E.label,amount:E.amount,billing_period:E.period,category:E.category,status:"active",started_at:ue,converted_at:ue,payment_id:se}).eq("id",j.id):{error:bt}=await F.from("member_memberships").insert({...He,plan_id:E.id,plan_label:E.label,amount:E.amount,billing_period:E.period,category:E.category,status:"active",started_at:ue,payment_id:se,created_by:t==null?void 0:t.id}),z(!1),bt){ce.error("Could not save membership.");return}_(!1),A(""),await Promise.all([cr(e,(r==null?void 0:r.household_id)??null),It(e)]),ce.success(N==="convert"?"Membership activated.":"Membership assigned.")}async function Uf(){if(!e||!j)return;const{error:E}=await F.from("member_memberships").update({status:"cancelled"}).eq("id",j.id);if(E){ce.error("Could not cancel membership.");return}
614await cr(e,(r==null?void 0:r.household_id)??null),ce.success("Membership cancelled.")}function Zl(E){T(E),A(""),_(!0)}if(Fe)return i.jsx("div",{className:"flex min-h-[60vh] items-center justify-center",children:i.jsx(Be,{className:"h-8 w-8 animate-spin text-primary"})});if(!r)return i.jsxs("div",{className:"container mx-auto px-4 py-16",children:["Member not found. ",i.jsx(B,{to:"/admin",className:"text-primary underline",children:"Back"})]});const Bt=[r.first_name,r.last_name].filter(Boolean).join(" ")||"Member",Ut=s.find(E=>E.id===r.current_rank_id),su=DJ(r.date_of_birth),Vf=`${(r.first_name??"").charAt(0)}${(r.last_name??"").charAt(0)}`.toUpperCase()||"?",Ya=(E,ue)=>`${(E??"").charAt(0)}${(ue??"").charAt(0)}`.toUpperCase()||"?",Ja=(E,ue)=>i.jsxs("div",{className:"flex items-start justify-between gap-3 py-2 text-sm",children:[i.jsx("span",{className:"text-muted-foreground",children:E}),i.jsx("span",{className:"text-right font-medium",children:ue})]});return i.jsxs(i.Fragment,{children:[i.jsx($e,{title:`${Bt} | Staff | BladeFit Academy`,description:"Member detail.",path:`/admin/member/${e}`,noindex:!0}),i.jsx("section",{className:"py-8",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[i.jsxs(B,{to:"/admin/members",className:"mb-5 inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary",children:[i.jsx(Wn,{className:"h-4 w-4"})," Back to members list"]}),i.jsxs("div",{className:"grid gap-6 lg:grid-cols-[320px_1fr]",children:[i.jsx("aside",{className:"lg:sticky lg:top-6 lg:self-start",children:i.jsx(Pe,{children:i.jsxs(Me,{className:"p-6",children:[i.jsxs("div",{className:"flex flex-col items-center text-center",children:[i.jsxs(Ns,{className:"h-24 w-24",children:[r.avatar_url&&i.jsx(Cs,{src:r.avatar_url,alt:Bt}),i.jsx(As,{className:"text-2xl",children:Vf})]}),i.jsx("h1",{className:"mt-4 font-heading text-2xl font-bold",children:Bt}),Ut&&i.jsxs(rt,{variant:"secondary",className:"mt-2 inline-flex items-center gap-1.5",children:[Ut.color&&i.jsx("span",{className:"h-4 w-7 shrink-0 rounded-sm border border-border",style:{backgroundColor:Ut.color}}),Ut.name]})]}),i.jsxs("div",{className:"mt-5 grid grid-cols-3 gap-2",children:[i.jsx(I,{asChild:!0,variant:"outline",size:"sm",disabled:!r.phone,children:i.jsxs("a",{href:r.phone?`tel:${r.phone}`:void 0,children:[i.jsx(Zv,{className:"mr-1 h-3.5 w-3.5"})," Call"]})}),i.jsx(I,{asChild:!0,variant:"outline",size:"sm",disabled:!r.email,children:i.jsxs("a",{href:r.email?`mailto:${r.email}`:void 0,children:[i.jsx(uj,{className:"mr-1 h-3.5 w-3.5"})," Email"]})}),i.jsxs(I,{variant:"outline",size:"sm",disabled:!0,children:[i.jsx(Jv,{className:"mr-1 h-3.5 w-3.5"})," Card"]})]}),i.jsx(Kx,{className:"my-5"}),i.jsx("p",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Personal Details"}),i.jsxs("div",{className:"divide-y divide-border",children:[Ja("Birthday",r.date_of_birth?`${pc(r.date_of_birth)}${su!==null?` (${su})`:""}`:"â"),Ja("Phone",r.phone??"â"),Ja("Email",r.email??"â"),Ja("Emergency",r.emergency_contact_name?`${r.emergency_contact_name}${r.emergency_contact_phone?` · ${r.emergency_contact_phone}`:""}`:"â")]}),i.jsx(Kx,{className:"my-5"}),i.jsxs("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:["Family Account",b?` â ${b}`:""]}),y.length===0?i.jsx("p",{className:"text-sm text-muted-foreground",children:"No linked family members."}):i.jsx("ul",{className:"space-y-2",children:y.map(E=>i.jsx("li",{children:i.jsxs(B,{to:`/admin/member/${E.id}`,className:"flex items-center gap-2 text-sm hover:text-primary",children:[i.jsxs(Ns,{className:"h-7 w-7",children:[E.avatar_url&&i.jsx(Cs,{src:E.avatar_url}),i.jsx(As,{className:"text-[10px]",children:Ya(E.first_name,E.last_name)})]}),[E.first_name,E.last_name].filter(Boolean).join(" ")||"Member"]})},E.id))})]})})}),i.jsx("div",{children:i.jsxs(DP,{defaultValue:"profile",children:[i.jsxs(Nb,{className:"mb-6 flex-wrap",children:[i.jsx(ds,{value:"profile",children:"Profile"}),i.jsx(ds,{value:"messaging",children:"Messaging"}),i.jsx(ds,{value:"attendance",children:"Attendance"}),i.jsx(ds,{value:"documents",children:"Documents"}),i.jsx(ds,{value:"ranks",children:"Ranks"})]}),i.jsxs(us,{value:"profile",className:"space-y-6",children:[i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2",children:[i.jsx(Sy,{className:"h-5 w-5 text-primary"})," Notes"]})}),i.jsxs(Me,{className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(Ca,{value:ne,onChange:E=>xe(E.target.value),placeholder:"Add a private staff note about this memberâ¦",rows:3}),i.jsx(I,{onClick:Ls,disabled:!ne.trim(),variant:"outline",children:"Add Note"})]}),i.jsxs("ul",{className:"space-y-3",children:[u.length===0&&i.jsx("li",{className:"text-sm text-muted-foreground",children:"No notes yet."}),u.map(E=>i.jsxs("li",{className:"rounded-md border border-border p-3",children:[i.jsx("p",{className:"text-sm",children:E.body}),i.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:new Date(E.created_at).toLocaleStr
614ing()})]},E.id))]})]})]}),i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2",children:[i.jsx(ar,{className:"h-5 w-5 text-primary"})," Rosters"]})}),i.jsx(Me,{children:i.jsx($S,{label:"Roster assignments"})})]}),i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2",children:[i.jsx(Oa,{className:"h-5 w-5 text-primary"})," Memberships"]})}),i.jsx(Me,{className:"space-y-4",children:j?i.jsxs("div",{className:"rounded-md border border-border p-4",children:[i.jsx("div",{className:"flex flex-wrap items-start justify-between gap-3",children:i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("p",{className:"font-medium",children:j.plan_label}),i.jsx(rt,{variant:j.status==="trial"?"secondary":"default",className:"capitalize",children:j.status}),j.household_id&&i.jsx(rt,{variant:"outline",children:"Family"})]}),i.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["$",Number(j.amount).toFixed(2),j.billing_period!=="one-time"?` / ${j.billing_period}`:""]}),i.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:j.status==="trial"?`Trial started ${pc(j.trial_started_at)}`:`Started ${pc(j.started_at)}`})]})}),i.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[j.status==="trial"&&i.jsx(I,{size:"sm",onClick:()=>Zl("convert"),children:"Convert to Membership"}),j.status==="active"&&i.jsx(I,{size:"sm",variant:"outline",onClick:()=>Zl("convert"),children:"Change Plan"}),i.jsx(I,{size:"sm",variant:"ghost",className:"text-destructive",onClick:Uf,children:"Cancel"})]})]}):i.jsxs("div",{className:"rounded-md border border-dashed border-border p-6 text-center",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"No membership assigned yet."}),i.jsxs("div",{className:"mt-4 flex flex-wrap justify-center gap-2",children:[i.jsx(I,{size:"sm",variant:"outline",onClick:nu,disabled:M,children:"Start Trial"}),i.jsx(I,{size:"sm",onClick:()=>Zl("assign"),children:"Assign Membership"})]})]})})]}),i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2",children:[i.jsx(Zm,{className:"h-5 w-5 text-primary"})," Payments"]})}),i.jsx(Me,{children:v.length===0?i.jsx("p",{className:"text-sm text-muted-foreground",children:"No payments recorded."}):i.jsx("ul",{className:"divide-y divide-border",children:v.map(E=>i.jsxs("li",{className:"flex items-center justify-between gap-3 py-3 text-sm",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:E.description||"Charge"}),i.jsx("p",{className:"text-xs capitalize text-muted-foreground",children:E.method})]}),i.jsxs("div",{className:"text-right",children:[i.jsxs("p",{className:"font-semibold",children:["$",Number(E.amount).toFixed(2)]}),i.jsx("p",{className:"text-xs text-muted-foreground",children:E.status==="paid"?`Paid ${pc(E.paid_date)}`:`${E.status} ${pc(E.due_date)}`})]})]},E.id))})})]})]}),i.jsx(us,{value:"messaging",children:i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2",children:[i.jsx(uj,{className:"h-5 w-5 text-primary"})," Messaging"]})}),i.jsx(Me,{className:"space-y-4",children:r.household_id?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"max-h-[420px] space-y-3 overflow-y-auto",children:$.length===0?i.jsx("p",{className:"text-sm text-muted-foreground",children:"No messages yet. Start the conversation below."}):$.map(E=>{var se,He;const ue=E.sender_id===(t==null?void 0:t.id);return i.jsxs("div",{className:`flex flex-col ${ue?"items-end":"items-start"}`,children:[i.jsxs("div",{className:`max-w-[80%] space-y-2 rounded-lg px-3 py-2 text-sm ${ue?"bg-primary text-primary-foreground":"bg-muted"}`,children:[E.body&&i.jsx("p",{className:"whitespace-pre-wrap",children:E.body}),E.attachment_url&&((se=E.attachment_type)==null?void 0:se.startsWith("image/"))&&i.jsx("a",{href:E.attachment_url,target:"_blank",rel:"noopener noreferrer",children:i.jsx("img",{src:E.attachment_url,alt:E.attachment_name??"attachment",className:"max-h-48 rounded-md border border-border/40"})}),E.attachment_url&&!((He=E.attachment_type)!=null&&He.startsWith("image/"))&&i.jsxs("a",{href:E.attachment_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 underline",children:[i.jsx(Sp,{className:"h-3.5 w-3.5"}),E.attachment_name??"Download file"]})]}),i.jsxs("span",{className:"mt-1 text-xs text-muted-foreground",children:[E.sender_name," · ",new Date(E.created_at).toLocaleStr
614ing()]})]},E.id)})}),i.jsxs("div",{className:"flex flex-col gap-2 border-t border-border pt-4",children:[i.jsx(Ca,{value:W,onChange:E=>q(E.target.value),placeholder:"Write a message to this householdâ¦",rows:3}),V&&i.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border px-3 py-2 text-sm",children:[i.jsxs("span",{className:"inline-flex items-center gap-2 truncate",children:[i.jsx(Sp,{className:"h-3.5 w-3.5 shrink-0"}),i.jsx("span",{className:"truncate",children:V.name})]}),i.jsx("button",{type:"button",onClick:()=>he(null),className:"text-muted-foreground hover:text-foreground","aria-label":"Remove attachment",children:i.jsx(ky,{className:"h-4 w-4"})})]}),i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsx(I,{asChild:!0,variant:"outline",size:"sm",children:i.jsxs("label",{className:"cursor-pointer",children:[i.jsx(Sp,{className:"mr-1 h-3.5 w-3.5"})," Attach",i.jsx("input",{type:"file",accept:"image/*,application/pdf",className:"hidden",onChange:E=>{var ue;return he(((ue=E.target.files)==null?void 0:ue[0])??null)}})]})}),i.jsxs(I,{onClick:ru,disabled:R||!W.trim()&&!V,className:"bg-gradient-gold font-semibold text-primary-foreground hover:opacity-90",children:[R&&i.jsx(Be,{className:"mr-2 h-4 w-4 animate-spin"}),"Send"]})]})]})]}):i.jsx("div",{className:"rounded-md border border-dashed border-border p-6 text-center text-sm text-muted-foreground",children:"This member isn't linked to a household yet, so messages can't be sent."})})]})}),i.jsx(us,{value:"attendance",children:i.jsx(Pe,{children:i.jsx(Me,{className:"p-6",children:i.jsx($S,{label:"Attendance history"})})})}),i.jsx(us,{value:"documents",children:i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2",children:[i.jsx(Sy,{className:"h-5 w-5 text-primary"})," Documents"]})}),i.jsx(Me,{children:i.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border p-3 text-sm",children:[i.jsx("span",{className:"font-medium",children:"Liability Waiver"}),r.waiver_signed?i.jsxs("span",{className:"inline-flex items-center gap-1 text-green-700",children:[i.jsx(Yv,{className:"h-4 w-4"})," Signed"]}):i.jsxs("span",{className:"inline-flex items-center gap-1 text-muted-foreground",children:[i.jsx(ky,{className:"h-4 w-4"})," Pending"]})]})})]})}),i.jsxs(us,{value:"ranks",className:"space-y-6",children:[i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2",children:[i.jsx(Oa,{className:"h-5 w-5 text-primary"})," Rank"]})}),i.jsxs(Me,{className:"space-y-4",children:[i.jsxs("p",{className:"flex items-center gap-2 text-sm",children:["Current rank:"," ",Ut?i.jsxs("span",{className:"inline-flex items-center gap-1.5 font-semibold",children:[Ut.color&&i.jsx("span",{className:"h-4 w-7 shrink-0 rounded-sm border border-border",style:{backgroundColor:Ut.color}}),Ut.name," (",Ut.track,")"]}):i.jsx("span",{className:"font-semibold",children:"None yet"})]}),i.jsxs("div",{className:"space-y-2 rounded-md border border-border p-3",children:[i.jsx("p",{className:"text-sm font-medium",children:"Promote / set rank"}),i.jsxs(mi,{value:me,onValueChange:We,children:[i.jsx(ps,{children:i.jsx(fi,{placeholder:"Choose a rank"})}),i.jsx(gs,{children:s.map(E=>i.jsx(Jt,{value:E.id,children:i.jsxs("span",{className:"inline-flex items-center gap-2",children:[E.color&&i.jsx("span",{className:"h-4 w-7 shrink-0 rounded-sm border border-border",style:{backgroundColor:E.color}}),E.name," â ",E.track]})},E.id))})]}),i.jsx(Ca,{value:Ze,onChange:E=>Y(E.target.value),placeholder:"Optional note (e.g. what they demonstrated)",rows:2}),i.jsx(I,{onClick:qi,disabled:!me,className:"bg-gradient-gold font-semibold text-primary-foreground hover:opacity-90",children:"Record Promotion"})]}),o.length>0&&i.jsxs("div",{children:[i.jsx("p",{className:"mb-2 text-sm font-medium",children:"Requirements for current rank"}),i.jsx("ul",{className:"space-y-2",children:o.map(E=>i.jsxs("li",{className:"flex items-center gap-2",children:[i.jsx(Rb,{id:E.id,checked:c.has(E.id),onCheckedChange:ue=>Zn(E.id,!!ue)}),i.jsx("label",{htmlFor:E.id,className:"text-sm",children:E.title})]},E.id))})]})]})]}),i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2",children:[i.jsx(UD,{className:"h-5 w-5 text-primary"})," Rank History"]})}),i.jsx(Me,{children:m.length===0?i.jsx("p",{className:"text-sm text-muted-foreground",children:"No promotions recorded yet."}):i.jsx("ul",{className:"space-y-3",children:m.map(E=>
614{var ue,se,He,bt;return i.jsxs("li",{className:"flex flex-col gap-0.5 border-l-2 pl-3",style:{borderColor:((ue=E.ranks)==null?void 0:ue.color)??"hsl(var(--primary) / 0.4)"},children:[i.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm font-medium",children:[((se=E.ranks)==null?void 0:se.color)&&i.jsx("span",{className:"h-4 w-7 shrink-0 rounded-sm border border-border",style:{backgroundColor:E.ranks.color}}),((He=E.ranks)==null?void 0:He.name)??"Rank",(bt=E.ranks)!=null&&bt.track?` â ${E.ranks.track}`:""]}),i.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(E.awarded_at).toLocaleDateString()}),E.notes&&i.jsx("span",{className:"text-sm text-muted-foreground",children:E.notes})]},E.id)})})})]})]})]})})]})]})}),i.jsx(Vi,{open:S,onOpenChange:_,children:i.jsxs(Os,{children:[i.jsxs(Ms,{children:[i.jsx(Ds,{children:N==="convert"?"Convert to Membership":"Assign Membership"}),i.jsx(fb,{children:"Choose a published plan. Activating an active plan adds a pending charge to Payments."})]}),i.jsx("div",{className:"max-h-[55vh] space-y-4 overflow-y-auto pr-1",children:Object.keys(dk).filter(E=>E!=="trial").map(E=>{const ue=eb.filter(se=>se.category===E);return ue.length===0?null:i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("p",{className:"px-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:dk[E]}),i.jsx("div",{className:"space-y-1",children:ue.map(se=>{const He=P===se.id;return i.jsxs("button",{type:"button",onClick:()=>A(se.id),className:Q("flex w-full items-center justify-between gap-3 rounded-md border px-3 py-2 text-left text-sm transition-colors",He?"border-primary bg-primary/10":"border-border hover:bg-accent"),children:[i.jsx("span",{className:"font-medium",children:se.label}),i.jsx("span",{className:"shrink-0 text-muted-foreground",children:se.priceLabel})]},se.id)})})]},E)})}),i.jsxs(Ka,{children:[i.jsx(I,{variant:"outline",onClick:()=>_(!1),children:"Cancel"}),i.jsxs(I,{onClick:Xn,disabled:!P||M,children:[M&&i.jsx(Be,{className:"mr-2 h-4 w-4 animate-spin"}),N==="convert"?"Activate Membership":"Assign"]})]})]})})]})}const $J=[{to:"/admin",label:"Dashboard",icon:HD,end:!0},{to:"/admin/members",label:"Members",icon:ar},{to:"/admin/billing",label:"Billing",icon:Zm,adminOnly:!0},{to:"/admin/marketing",label:"Marketing",icon:qD,adminOnly:!0},{to:"/admin/website",label:"Website",icon:$D,adminOnly:!0},{to:"/admin/sales",label:"Sales",icon:c2,adminOnly:!0},{to:"/admin/gym",label:"Gym",icon:Qv},{to:"/admin/front-desk",label:"Front Desk",icon:KD},{to:"/admin/settings",label:"Settings",icon:eL,adminOnly:!0}];function FJ(){const{isAdmin:e}=Ga(),[t,r]=p.useState(null);p.useEffect(()=>{F.from("profiles").select("id",{count:"exact",head:!0}).then(({count:s})=>r(s??0))},[]);const n=$J.filter(s=>!s.adminOnly||e);return i.jsxs(i.Fragment,{children:[i.jsx($e,{title:"Staff Area | BladeFit Academy",description:"BladeFit Academy staff management.",path:"/admin",noindex:!0}),i.jsxs("div",{className:"container mx-auto px-4 py-6 lg:px-8",children:[i.jsxs(B,{to:"/dashboard",className:"mb-4 inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-primary",children:[i.jsx(Wn,{className:"h-4 w-4"})," Back to my dashboard"]}),i.jsxs("div",{className:"flex flex-col gap-6 lg:flex-row",children:[i.jsxs("aside",{className:"lg:w-56 lg:shrink-0",children:[i.jsxs("div",{className:"mb-4",children:[i.jsx("h2",{className:"font-heading text-lg font-bold",children:"Staff Area"}),i.jsxs("p",{className:"text-xs text-muted-foreground",children:[e?"Administrator":"Instructor",t!==null&&` · ${t} members`]})]}),i.jsx("nav",{className:"flex gap-1 overflow-x-auto pb-2 lg:flex-col lg:overflow-visible lg:pb-0",children:n.map(s=>{const a=s.icon;return i.jsxs(UF,{to:s.to,end:s.end,className:({isActive:o})=>Q("inline-flex shrink-0 items-center gap-2 rounded-md px-3 py-2 text-sm font-medium transition-colors",o?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[i.jsx(a,{className:"h-4 w-4"}),s.label]},s.to)})})]}),i.jsx("div",{className:"min-w-0 flex-1",children:i.jsx(AF,{})})]})]})]})}function FS(e){var r,n;const t=e.trim().split(/\s+/);return`${((r=t[0])==null?void 0:r[0])??""}${((n=t[1])==null?void 0:n[0])??""}`.toUpperCase()||"?"}function BJ(e){const[,t,r]=e.split("-").map(Number),n=new Date;n.setHours(0,0,0,0);let s=new Date(n.getFullYear(),t-1,r);return s<n&&(s=new Date(n.getFullYear()+1,t-1,r)),Math.round((s.getTime()-n.getTime())/864e5)}function UJ(){const e=Bi(),[t,r]=p.useState(null);if(p.useEffect(()=>{(async()=>{const s=new Date().toISOString().slice(0,10),a=new Date;a.setDate(1),a.setHours(0,0,0,0);const[{data:o},{data:l}
614,c,{data:d}]=await Promise.all([F.from("profiles").select("id,first_name,last_name,avatar_url,date_of_birth,created_at"),F.from("class_sessions").select("id,start_time,end_time,capacity,class_offerings(title)").eq("session_date",s).eq("status","scheduled").order("start_time",{ascending:!0}),F.rpc("get_session_availability"),F.from("bookings").select("id,created_at,status,user_id,guest_name,session_id").order("created_at",{ascending:!1}).limit(8)]),u=o??[],h=new Map(u.map(j=>[j.id,j])),m=new Map;(c.data??[]).forEach(j=>m.set(j.session_id,j.reserved_count));const f=(l??[]).map(j=>{var k;return{id:j.id,start_time:j.start_time,end_time:j.end_time,capacity:j.capacity,title:((k=j.class_offerings)==null?void 0:k.title)??"Class",booked:m.get(j.id)??0}}),y=[...new Set((d??[]).map(j=>j.session_id))],x=new Map;if(y.length){const{data:j}=await F.from("class_sessions").select("id,class_offerings(title)").in("id",y);(j??[]).forEach(k=>{var S;return x.set(k.id,((S=k.class_offerings)==null?void 0:S.title)??"Class")})}const b=(d??[]).map(j=>{const k=j.user_id?h.get(j.user_id):null,S=k?[k.first_name,k.last_name].filter(Boolean).join(" ")||"Member":j.guest_name||"Trial guest";return{id:j.id,created_at:j.created_at,status:j.status,who:S,avatar_url:(k==null?void 0:k.avatar_url)??null,title:x.get(j.session_id)??"Class"}}),g=u.filter(j=>j.date_of_birth).map(j=>({id:j.id,name:[j.first_name,j.last_name].filter(Boolean).join(" ")||"Member",avatar_url:j.avatar_url,date_of_birth:j.date_of_birth,inDays:BJ(j.date_of_birth)})).filter(j=>j.inDays<=30).sort((j,k)=>j.inDays-k.inDays).slice(0,6),v=(d??[]).length,{count:w}=await F.from("bookings").select("id",{count:"exact",head:!0}).gte("created_at",s+"T00:00:00");r({total:u.length,newThisMonth:u.filter(j=>new Date(j.created_at)>=a).length,today:f,bookingsToday:w??v,recent:b,birthdays:g})})()},[]),!t)return i.jsx("div",{className:"flex justify-center py-16",children:i.jsx(Be,{className:"h-6 w-6 animate-spin text-primary"})});const n=(s,a,o)=>i.jsx(Pe,{children:i.jsxs(Me,{className:"flex items-center gap-4 pt-6",children:[i.jsx("div",{className:"rounded-md bg-primary/10 p-3",children:i.jsx(s,{className:"h-6 w-6 text-primary"})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-2xl font-bold",children:o}),i.jsx("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:a})]})]})});return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[n(ar,"Total Members",String(t.total)),n(u2,"New This Month",String(t.newThisMonth)),n(Bn,"Classes Today",String(t.today.length)),n(hj,"Bookings Today",String(t.bookingsToday))]}),i.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2 text-base",children:[i.jsx(Nr,{className:"h-5 w-5 text-primary"})," Today's Schedule"]})}),i.jsx(Me,{children:t.today.length===0?i.jsx("p",{className:"text-sm text-muted-foreground",children:"No classes scheduled today."}):i.jsx("ul",{className:"space-y-3",children:t.today.map(s=>i.jsxs("li",{className:"flex items-center justify-between gap-3",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:s.title}),i.jsx("p",{className:"text-xs text-muted-foreground",children:zl(s.start_time,s.end_time)})]}),i.jsxs(rt,{variant:"outline",children:[s.booked,"/",s.capacity," booked"]})]},s.id))})})]}),i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2 text-base",children:[i.jsx(hj,{className:"h-5 w-5 text-primary"})," Recent Bookings"]})}),i.jsx(Me,{children:t.recent.length===0?i.jsx("p",{className:"text-sm text-muted-foreground",children:"No bookings yet."}):i.jsx("ul",{className:"space-y-3",children:t.recent.map(s=>i.jsxs("li",{className:"flex items-center gap-3",children:[i.jsxs(Ns,{className:"h-8 w-8",children:[s.avatar_url&&i.jsx(Cs,{src:s.avatar_url,alt:s.who}),i.jsx(As,{className:"text-xs",children:FS(s.who)})]}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("p",{className:"truncate text-sm font-medium",children:s.who}),i.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s.title})]}),i.jsx(rt,{variant:"outline",className:"shrink-0 capitalize",children:s.status.replace("_"," ")})]},s.id))})})]})]}),i.jsxs(Pe,{children:[i.jsx(Ke,{children:i.jsxs(Ye,{className:"flex items-center gap-2 text-base",children:[i.jsx(TD,{className:"h-5 w-5 text-primary"})," Upcoming Birthdays"]})}),i.jsx(Me,{children:t.birthdays.length===0?i.jsx("p",{className:"text-sm text-muted-foreground",children:"No birthdays in the next 30 days."}):i.jsx("ul",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:t.birthdays.map(s=>i.jsxs("li",{className:"flex cursor-pointer items-center gap-3 rounded-md border border-border p-2 hover:border-primary/40",onClick:()=>e(`/admin/member/${s.id}`),children:[i.jsxs(Ns,{className:"h-9 w-9",children:[s.avatar_url&&i.jsx(Cs,{src:s.avatar_url,alt:s.name}),i.jsx(As,{className:"text-xs",children:FS(s.name)})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:s.name}),i.jsx("p",{className:"text-xs text-muted-foreground",children:s.inDays===0?"Today! ð":s.inDays===1?"Tomorrow":`in ${s.inDays} days`})]})]},s.id))})})]})]})}function VJ(){return i.jsxs("div",{children:[i.jsxs("header",{className:"mb-4",children:[i.jsx("h1",{className:"font-heading text-2xl font-bold md:text-3xl",children:"Dashboard"}),i.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Today at a glance â payments, attendance, schedule and bookings."})]}),i.jsx(UJ,{})]})}function Wi({title:e,description:t,tabs:r,defaultTab:n}){var l;const[s,a]=p.useState(n??((l=r[0])==null?void 0:l.key)),o=r.find(c=>c.key===s)??r[0];return i.jsxs("div",{children:[i.jsxs("header",{className:"mb-4",children:[i.jsx("h1",{className:"font-heading text-2xl font-bold md:text-3xl",children:e}),t&&i.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:t})]}),i.jsx("div",{className:"mb-5 flex flex-wrap gap-2 border-b border-border",children:r.map(c=>i.jsx("button",{type:"button",onClick:()=>a(c.key),className:Q("-mb-px border-b-2 px-3 py-2 text-sm font-medium transition-colors",s===c.key?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:c.label},c.key))}),o!=null&&o.render?o.render():i.jsx(Pe,{children:i.jsxs(Me,{className:"flex flex-col items-center justify-center gap-3 py-16 text-center",children:[i.jsx(MD,{className:"h-8 w-8 text-muted-foreground"}),i.jsx("p",{className:"font-medium",children:o==null?void 0:o.label}),i.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:(o==null?void 0:o.note)??"This section is part of the framework and will be built out in a later step."})]})})]})}const Ob=p.forwardRef(({className:e,...t},r)=>i.jsx("div",{className:"relative w-full overflow-auto",children:i.jsx("table",{ref:r,className:Q("w-full caption-bottom text-sm",e),...t})}));Ob.displayName="Table";const Mb=p.forwardRef(({className:e,...t},r)=>i.jsx("thead",{ref:r,className:Q("[&_tr]:border-b",e),...t}));Mb.displayName="TableHeader";const Db=p.forwardRef(({className:e,...t},r)=>i.jsx("tbody",{ref:r,className:Q("[&_tr:last-child]:border-0",e),...t}));Db.displayName="TableBody";const HJ=p.forwardRef(({className:e,...t},r)=>i.jsx("tfoot",{ref:r,className:Q("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));HJ.displayName="TableFooter";const Aa=p.forwardRef(({className:e,...t},r)=>i.jsx("tr",{ref:r,className:Q("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));Aa.displayName="TableRow";const Dr=p.forwardRef(({className:e,...t},r)=>i.jsx("th",{ref:r,className:Q("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Dr.displayName="TableHead";const Dt=p.forwardRef(({className:e,...t},r)=>i.jsx("td",{ref:r,className:Q("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Dt.displayName="TableCell";const zJ=p.forwardRef(({className:e,...t},r)=>i.jsx("caption",{ref:r,className:Q("mt-4 text-sm text-muted-foreground",e),...t}));zJ.displayName="TableCaption";function mg(e){if(!e)return null;const t=new Date(e);if(Number.isNaN(t.getTime()))return null;const r=new Date;let n=r.getFullYear()-t.getFullYear();const s=r.getMonth()-t.getMonth();return(s<0||s===0&&r.getDate()<t.getDate())&&n--,n}function WJ(e,t){return`${(e??"").charAt(0)}${(t??"").charAt(0)}`.toUpperCase()||"?"}
614function qJ(){const e=Bi(),[t,r]=p.useState([]),[n,s]=p.useState(!0),[a,o]=p.useState(""),[l,c]=p.useState("all"),[d,u]=p.useState("name"),[h,m]=p.useState(!0);p.useEffect(()=>{F.from("profiles").select("id,first_name,last_name,email,phone,avatar_url,date_of_birth,waiver_signed,created_at,current_rank_id,ranks:current_rank_id (name,color)").then(({data:g})=>{r(g??[]),s(!1)})},[]);function f(g){d===g?m(v=>!v):(u(g),m(!0))}const y=p.useMemo(()=>{const g=a.trim().toLowerCase();let v=t.filter(w=>l==="waiver"&&w.waiver_signed||l==="no_rank"&&w.current_rank_id?!1:g?`${w.first_name??""} ${w.last_name??""}`.toLowerCase().includes(g)||(w.email??"").toLowerCase().includes(g)||(w.phone??"").toLowerCase().includes(g):!0);return v=[...v].sort((w,j)=>{var S,_;let k=0;return d==="name"?k=`${w.last_name??""}${w.first_name??""}`.localeCompare(`${j.last_name??""}${j.first_name??""}`):d==="age"?k=(mg(w.date_of_birth)??-1)-(mg(j.date_of_birth)??-1):d==="rank"?k=(((S=w.ranks)==null?void 0:S.name)??"").localeCompare(((_=j.ranks)==null?void 0:_.name)??""):k=w.created_at.localeCompare(j.created_at),h?k:-k}),v},[t,a,l,d,h]),x=[{key:"all",label:"All members",count:t.length},{key:"waiver",label:"Waiver pending",count:t.filter(g=>!g.waiver_signed).length},{key:"no_rank",label:"No rank",count:t.filter(g=>!g.current_rank_id).length}],b=({k:g,children:v,className:w})=>i.jsx(Dr,{className:w,children:i.jsxs("button",{type:"button",onClick:()=>f(g),className:Q("inline-flex items-center gap-1 hover:text-primary",d===g&&"text-primary"),children:[v,i.jsx(AD,{className:"h-3 w-3"})]})});return i.jsx(Pe,{children:i.jsxs(Me,{className:"p-4 sm:p-6",children:[i.jsxs("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[i.jsx("div",{className:"flex flex-wrap gap-2",children:x.map(g=>i.jsxs("button",{type:"button",onClick:()=>c(g.key),className:Q("inline-flex items-center gap-1.5 rounded-full border px-3 py-1 text-sm transition-colors",l===g.key?"border-primary bg-primary/10 text-primary":"border-border text-muted-foreground hover:border-primary/40"),children:[g.label,i.jsx("span",{className:"rounded-full bg-muted px-1.5 text-xs font-semibold",children:g.count})]},g.key))}),i.jsxs("div",{className:"relative w-full sm:max-w-xs",children:[i.jsx(ZD,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),i.jsx(we,{placeholder:"Search name, email, or phoneâ¦",value:a,onChange:g=>o(g.target.value),className:"pl-9"})]})]}),n?i.jsx("div",{className:"flex justify-center py-16",children:i.jsx(Be,{className:"h-6 w-6 animate-spin text-primary"})}):i.jsx("div",{className:"overflow-x-auto",children:i.jsxs(Ob,{children:[i.jsx(Mb,{children:i.jsxs(Aa,{children:[i.jsx(b,{k:"name",children:"Member"}),i.jsx(b,{k:"age",children:"Age"}),i.jsx(b,{k:"rank",children:"Rank / Level"}),i.jsx(Dr,{children:"Contact"}),i.jsx(Dr,{children:"Waiver"}),i.jsx(b,{k:"since",children:"Member since"})]})}),i.jsxs(Db,{children:[y.map(g=>{var j;const v=[g.first_name,g.last_name].filter(Boolean).join(" ")||"â",w=mg(g.date_of_birth);return i.jsxs(Aa,{className:"cursor-pointer",onClick:()=>e(`/admin/member/${g.id}`),children:[i.jsx(Dt,{children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs(Ns,{className:"h-9 w-9",children:[g.avatar_url&&i.jsx(Cs,{src:g.avatar_url,alt:v}),i.jsx(As,{className:"text-xs",children:WJ(g.first_name,g.last_name)})]}),i.jsx("span",{className:"font-medium",children:v})]})}),i.jsx(Dt,{className:"text-muted-foreground",children:w??"â"}),i.jsx(Dt,{children:(j=g.ranks)!=null&&j.name?i.jsxs("span",{className:"inline-flex items-center gap-2",children:[i.jsx("span",{className:"h-3 w-3 shrink-0 rounded-sm border border-border",style:g.ranks.color?{backgroundColor:g.ranks.color}:void 0}),g.ranks.name]}):i.jsx("span",{className:"text-muted-foreground",children:"â"})}),i.jsx(Dt,{children:i.jsxs("div",{className:"flex flex-col text-sm",children:[g.email&&i.jsxs("span",{className:"inline-flex items-center gap-1 text-muted-foreground",children:[i.jsx(o2,{className:"h-3 w-3"})," ",g.email]}),g.phone&&i.jsxs("span",{className:"inline-flex items-center gap-1 text-muted-foreground",children:[i.jsx(Zv,{className:"h-3 w-3"})," ",g.phone]}),!g.email&&!g.phone&&i.jsx("span",{className:"text-muted-foreground",children:"â"})]})}),i.jsx(Dt,{children:g.waiver_signed?i.jsx(rt,{variant:"outline",className:"border-green-600/40 text-green-700",children:"Signed"}):i.jsx(rt,{variant:"outline",className:"text-muted-foreground",children:"Pending"})}),i.jsx(Dt,{className:"text-muted-foreground",children:new Date(g.created_at).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})})]},g.id)}),y.length===0&&i.jsx(Aa,{children:i.jsx(Dt,{colSpan:6,className:"py-10 text-center text-muted-foreground",children:"No members found."})})]})]})})]})})}function BS(e){var r,n;const t=e.trim().split(/\s+/);return`${((r=t[0])==null?void 0:r[0])??""}${((n=t[1])==null?void 0:n[0])??""}`.toUpperCase()||"?"}
614function co(e){return[e.first_name,e.last_name].filter(Boolean).join(" ")||"Member"}function mI(){const[e,t]=p.useState(()=>new Date().toISOString().slice(0,10)),[r,n]=p.useState([]),[s,a]=p.useState(null),[o,l]=p.useState([]),[c,d]=p.useState(!0),[u,h]=p.useState(null),[m,f]=p.useState([]),[y,x]=p.useState(""),[b,g]=p.useState(!1),v=p.useCallback(async()=>{d(!0);const{data:A}=await F.from("class_sessions").select("id,start_time,end_time,capacity,class_offerings(title)").eq("session_date",e).eq("status","scheduled").order("start_time",{ascending:!0}),M=(A??[]).map(z=>{var $;return{id:z.id,start_time:z.start_time,end_time:z.end_time,capacity:z.capacity,title:(($=z.class_offerings)==null?void 0:$.title)??"Class"}});n(M),a(z=>{var $;return M.some(ae=>ae.id===z)?z:(($=M[0])==null?void 0:$.id)??null}),d(!1)},[e]),w=p.useCallback(async A=>{const{data:M}=await F.from("bookings").select("id,status,user_id,guest_name,session_id").eq("session_id",A).neq("status","cancelled").order("created_at",{ascending:!0}),z=M??[],$=[...new Set(z.map(W=>W.user_id).filter(Boolean))],ae=new Map;if($.length){const{data:W}=await F.from("profiles").select("id,first_name,last_name,avatar_url").in("id",$);(W??[]).forEach(q=>ae.set(q.id,q))}l(z.map(W=>{const q=W.user_id?ae.get(W.user_id):null;return{id:W.id,status:W.status,user_id:W.user_id,guest_name:W.guest_name,session_id:W.session_id,who:q?co(q):W.guest_name||"Trial guest",avatar_url:(q==null?void 0:q.avatar_url)??null}}))},[]);p.useEffect(()=>{v()},[v]),p.useEffect(()=>{s?w(s):l([])},[s,w]);const j=async(A,M)=>{h(A);const{error:z}=await F.from("bookings").update({status:M}).eq("id",A);if(h(null),z){dh({title:"Could not update",description:z.message,variant:"destructive"});return}s&&w(s)},k=async A=>{if(!s)return;h(A.id);const{data:M,error:z}=await F.from("bookings").insert({session_id:s,user_id:A.id}).select("id").single();if(!z&&M&&await F.from("bookings").update({status:"checked_in"}).eq("id",M.id),h(null),z){dh({title:"Could not check in",description:z.message,variant:"destructive"});return}dh({title:"Checked in",description:co(A)}),g(!1),x(""),w(s)},S=async()=>{if(g(!0),m.length===0){const{data:A}=await F.from("profiles").select("id,first_name,last_name,avatar_url").order("first_name",{ascending:!0});f(A??[])}},_=r.find(A=>A.id===s)??null,N=p.useMemo(()=>{const A={present:0,expected:0,noShow:0};return o.forEach(M=>{M.status==="checked_in"||M.status==="attended"?A.present+=1:M.status==="reserved"&&(A.expected+=1)}),A},[o]),T=p.useMemo(()=>new Set(o.map(A=>A.user_id).filter(Boolean)),[o]),P=p.useMemo(()=>{const A=y.trim().toLowerCase();return m.filter(M=>!T.has(M.id)).filter(M=>A?co(M).toLowerCase().includes(A):!0).slice(0,30)},[m,T,y]);return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Bn,{className:"h-4 w-4 text-muted-foreground"}),i.jsx(we,{type:"date",value:e,onChange:A=>t(A.target.value),className:"w-auto"})]}),i.jsx("span",{className:"text-sm text-muted-foreground",children:lb(e)})]}),c?i.jsx("div",{className:"flex justify-center py-16",children:i.jsx(Be,{className:"h-6 w-6 animate-spin text-primary"})}):r.length===0?i.jsx("p",{className:"text-sm text-muted-foreground",children:"No classes scheduled on this day."}):i.jsxs("div",{className:"grid gap-6 lg:grid-cols-[260px_1fr]",children:[i.jsx("div",{className:"space-y-2",children:r.map(A=>i.jsxs("button",{onClick:()=>a(A.id),className:`w-full rounded-md border p-3 text-left transition-colors ${A.id===s?"border-primary bg-primary/5":"border-border hover:border-primary/40"}`,children:[i.jsx("p",{className:"font-medium",children:A.title}),i.jsxs("p",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[i.jsx(Nr,{className:"h-3 w-3"})," ",zl(A.start_time,A.end_time)]})]},A.id))}),i.jsxs(Pe,{children:[i.jsxs(Ke,{className:"flex flex-row items-start justify-between gap-3",children:[i.jsxs("div",{children:[i.jsx(Ye,{className:"text-base",children:(_==null?void 0:_.title)??"Roster"}),i.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[i.jsxs(rt,{variant:"default",children:[N.present," present"]}),i.jsxs(rt,{variant:"outline",children:[N.expected," expected"]}),_&&i.jsxs(rt,{variant:"secondary",children:["cap ",_.capacity]})]})]}),i.jsxs(Vi,{open:b,onOpenChange:A=>A?S():g(!1),children:[i.jsx(dR,{asChild:!0,children:i.jsxs(I,{size:"sm",variant:"outline",disabled:!s,children:[i.jsx(u2,{className:"mr-1.5 h-4 w-4"})," Drop-in"]})}),i.jsxs(Os,{children:[i.jsx(Ms,{children:i.jsx(Ds,{children:"Check in a drop-in"})}),i.jsx(we,{autoFocus:!0,placeholder:"Search membersâ¦",value:y,onChange:A=>x(A.target.value)}),i.jsx("div",{className:"max-h-72 space-y-1 overflow-y-auto",children:P.length===0?i.jsx("p",{className:"py-4 text-center text-sm text-muted-foreground",children:"No matching members."}):P.map(A=>i.jsxs("button",{onClick:()=>k(A),disabled:u===A.id,className:"flex w-full items-center gap-3 rounded-md p-2 text-left hover:bg-muted disabled:opacity-50",children:[i.jsxs(Ns,{className:"h-8 w-8",children:[A.avatar_url&&i.jsx(Cs,{src:A.avatar_url,alt:co(A)}),i.jsx(As,{className:"text-xs",children:BS(co(A))})]}),i.jsx("span",{className:"text-sm font-medium",children:co(A)}),u===A.id&&i.jsx(Be,{className:"ml-auto h-4 w-4 animate-spin"})]},A.id))})]})]})]}),i.jsx(Me,{children:o.length===0?i.jsx("p",{className:"text-sm text-muted-foreground",children:"No one booked yet. Use âDrop-inâ to check in a member."}):i.jsx("ul",{className:"space-y-2",children:o.map(A=>{const M=A.status==="checked_in"||A.status==="attended";return i.jsxs("li",{className:"flex items-center gap-3 rounded-md border border-border p-2",children:[i.jsxs(Ns,{className:"h-9 w-9",children:[A.avatar_url&&i.jsx(Cs,{src:A.avatar_url,alt:A.who}),i.jsx(As,{className:"text-xs",children:BS(A.who)})]}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("p",{className:"truncate text-sm font-medium",children:A.who}),i.jsx("p",{className:"text-xs capitalize text-muted-foreground",children:A.status==="waitlisted"?"waitlisted":M?"checked in":"reserved"})]}),M?i.jsx(I,{size:"sm",variant:"ghost",disabled:u===A.id,onClick:()=>j(A.id,"reserved"),children:u===A.id?i.jsx(Be,{className:"h-4 w-4 animate-spin"}):i.jsx(sL,{className:"h-4 w-4"})}):i.jsxs(i.Fragment,{children:[i.jsxs(I,{size:"sm",disabled:u===A.id,onClick:()=>j(A.id,"checked_in"),children:[u===A.id?i.jsx(Be,{className:"h-4 w-4 animate-spin"}):i.jsx(Yv,{className:"mr-1 h-4 w-4"}),"Check in"]}),i.jsx(I,{size:"sm",variant:"ghost",disabled:u===A.id,title:"Mark no-show",onClick:()=>j(A.id,"cancelled"),children:i.jsx(Da,{className:"h-4 w-4"})})]})]},A.id)})})})]})]})]})}function US(e){if(!e)return"â";const t=new Date(e);return Number.isNaN(t.getTime())?"â":t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function GJ(){const[e,t]=p.useState([]),[r,n]=p.useState(!0),[s,a]=p.useState(null),o=p.useCallback(async()=>{const{data:c}=await F.from("family_add_requests").select("id,household_id,first_name,last_name,relationship,email,date_of_birth,status,created_at,households:household_id (name)").order("created_at",{ascending:!1});t(c??[]),n(!1)},[]);p.useEffect(()=>{o()},[o]);async function l(c,d){a(c);const{error:u}=await F.from("family_add_requests").update({status:d}).eq("id",c);if(a(null),u){ce.error("Could not update request.");return}ce.success(`Request ${d}.`),await o()}return r?i.jsx("div",{className:"flex justify-center py-10",children:i.jsx(Be,{className:"h-6 w-6 animate-spin text-primary"})}):e.length===0?i.jsx("p",{className:"py-6 text-sm text-muted-foreground",children:"No family-member requests yet."}):i.jsx("ul",{className:"space-y-3",children:e.map(c=>{var d;return i.jsxs("li",{className:"flex flex-wrap items-start justify-between gap-3 rounded-md border border-border p-4",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("p",{className:"font-medium",children:[[c.first_name,c.last_name].filter(
614Boolean).join(" "),c.relationship?` (${c.relationship})`:""]}),i.jsx(rt,{variant:c.status==="approved"?"default":c.status==="declined"?"destructive":"secondary",className:"capitalize",children:c.status})]}),i.jsxs("p",{className:"text-xs text-muted-foreground",children:["Household: ",((d=c.households)==null?void 0:d.name)??"â",c.email?` · ${c.email}`:"",c.date_of_birth?` · DOB ${US(c.date_of_birth)}`:""]}),i.jsxs("p",{className:"text-xs text-muted-foreground",children:["Requested ",US(c.created_at)]})]}),c.status==="pending"&&i.jsxs("div",{className:"flex gap-2",children:[i.jsxs(I,{size:"sm",onClick:()=>l(c.id,"approved"),disabled:s===c.id,children:[i.jsx(Ps,{className:"mr-1 h-4 w-4"})," Approve"]}),i.jsxs(I,{size:"sm",variant:"outline",onClick:()=>l(c.id,"declined"),disabled:s===c.id,children:[i.jsx(Da,{className:"mr-1 h-4 w-4"})," Decline"]})]})]},c.id)})})}const KJ=[{key:"members",label:"Members",render:()=>i.jsx(qJ,{})},{key:"checkin",label:"Check-in",render:()=>i.jsx(mI,{})},{key:"family-requests",label:"Family Requests",render:()=>i.jsx(GJ,{})},{key:"attendance",label:"Attendance",note:"Per-member and per-class attendance history will live here."},{key:"memberships",label:"Memberships",note:"Members grouped by their active membership plan."},{key:"rosters",label:"Rosters",note:"Saved rosters and group lists."},{key:"documents",label:"Documents",note:"Signed waivers and uploaded member documents."},{key:"content",label:"Content",note:"Member-facing content and announcements."},{key:"growth",label:"Growth",note:"Member growth, retention and trend reports."},{key:"settings",label:"Settings",note:"Member status, fields and tag configuration."}];function YJ(){return i.jsx(Wi,{title:"Members",description:"Members, visitors, signups, leads and everything about the people in your academy.",tabs:KJ})}const VS=["scheduled","paid","overdue"],JJ=["cash","card","e-transfer","cheque","other"];function Wu(e){return e.toLocaleString(void 0,{style:"currency",currency:"USD"})}function QJ(e){return e&&[e.first_name,e.last_name].filter(Boolean).join(" ")||"â"}function ZJ(){const[e,t]=p.useState([]),[r,n]=p.useState([]),[s,a]=p.useState(!0),[o,l]=p.useState("all"),[c,d]=p.useState(!1),[u,h]=p.useState(!1),[m,f]=p.useState({member_id:"",amount:"",description:"",method:"cash",status:"paid",due_date:"",paid_date:new Date().toISOString().slice(0,10),invoice_number:""});async function y(){a(!0);const[{data:k},{data:S}]=await Promise.all([F.from("payments").select("*, profiles:member_id (first_name,last_name)").order("created_at",{ascending:!1}),F.from("profiles").select("id,first_name,last_name").order("first_name")]);t(k??[]),n((S??[]).map(_=>({id:_.id,name:[_.first_name,_.last_name].filter(Boolean).join(" ")||"Unnamed"}))),a(!1)}p.useEffect(()=>{y()},[]);const x=p.useMemo(()=>{const k={scheduled:0,paid:0,overdue:0};return e.forEach(S=>{S.status==="paid"?k.paid+=Number(S.amount):S.status==="overdue"?k.overdue+=Number(S.amount):k.scheduled+=Number(S.amount)}),k},[e]),b=p.useMemo(()=>e.filter(k=>o==="all"||k.status===o),[e,o]);async function g(){var _;if(!m.amount||Number.isNaN(Number(m.amount))){ce.error("Enter a valid amount");return}h(!0);const{data:k}=await F.auth.getUser(),{error:S}=await F.from("payments").insert({member_id:m.member_id||null,amount:Number(m.amount),description:m.description||null,method:m.method,status:m.status,due_date:m.due_date||null,paid_date:m.status==="paid"&&m.paid_date||null,invoice_number:m.invoice_number||null,created_by:((_=k.user)==null?void 0:_.id)??null});if(h(!1),S){ce.error(S.message);return}ce.success("Payment recorded"),d(!1),f(N=>({...N,amount:"",description:"",invoice_number:""})),y()}async function v(k){const{error:S}=await F.from("payments").update({status:"paid",paid_date:new Date().toISOString().slice(0,10)}).eq("id",k);if(S)return ce.error(S.message);ce.success("Marked as paid"),y()}const w=k=>{const S={paid:"border-green-600/40 text-green-700",overdue:"border-red-600/40 text-red-700",scheduled:"text-muted-foreground"};return i.jsx(rt,{variant:"outline",className:Q("capitalize",S[k]??""),children:k})},j=(k,S,_,N)=>i.jsx(Pe,{children:i.jsxs(Me,{className:"flex items-center gap-4 pt-6",children:[i.jsx("div",{className:Q("rounded-md p-3",N),children:i.jsx(k,{className:"h-6 w-6"})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-2xl font-bold",children:_}),i.jsx("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:S})]})]})});return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[j(ED,"Scheduled",Wu(x.scheduled),"bg-primary/10 text-primary"),j(Zm,"Paid",Wu(x.paid),"bg-green-600/10 text-green-700"),j(d2,"Overdue",Wu(x.overdue),"bg-red-600/10 text-red-700")]}),i.jsxs(Pe,{children:[i.jsxs(Ke,{className:"flex flex-row items-center justify-between gap-3 space-y-0",children:[i.jsx(Ye,{className:"text-base",children:"Payments"}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs(mi,{value:o,onValueChange:l,children:[i.jsx(ps,{className:"w-36",children:i.jsx(fi,{})}),i.jsxs(gs,{children:[i.jsx(Jt,{value:"all",children:"All statuses"}),VS.map(k=>i.jsx(Jt,{value:k,className:"capitalize",children:k},k))]})]}),i.jsxs(Vi,{open:c,onOpenChange:d,children:[i.jsx(dR,{asChild:!0,children:i.jsxs(I,{size:"sm",children:[i.jsx(Xm,{className:"mr-1.5 h-4 w-4"})," Record payment"]})}),i.jsxs(Os,{children:[i.jsx(Ms,{children:i.jsx(Ds,{children:"Record a payment"})}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{children:"Member"}),i.jsxs(mi,{value:m.member_id,onValueChange:k=>f(S=>({...S,member_id:k})),children:[i.jsx(ps,{children:i.jsx(fi,{placeholder:"Select a member"})}),i.jsx(gs,{children:r.map(k=>i.jsx(Jt,{value:k.id,children:k.name},k.id))})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{children:"Amount"}),i.jsx(we,{type:"number",min:"0",step:"0.01",value:m.amount,onChange:k=>f(S=>({...S,amount:k.target.value})),placeholder:"0.00"})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{children:"Method"}),i.jsxs(mi,{value:m.method,onValueChange:k=>f(S=>({...S,method:k})),children:[i.jsx(ps,{children:i.jsx(fi,{})}),i.jsx(gs,{children:JJ.map(k=>i.jsx(Jt,{value:k,className:"capitalize",children:k},k))})]})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{children:"Status"}),i.jsxs(mi,{value:m.status,onValueChange:k=>f(S=>({...S,status:k})),children:[i.jsx(ps,{children:i.jsx(fi,{})}),i.jsx(gs,{children:VS.map(k=>i.jsx(Jt,{value:k,className:"capitalize",children:k},k))})]})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{children:m.status==="paid"?"Paid date":"Due date"}),i.jsx(we,{type:"date",value:m.status==="paid"?m.paid_date:m.due_date,onChange:k=>f(S=>m.status==="paid"?{...S,paid_date:k.target.value}:{...S,due_date:k.target.value})})]})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{children:"Invoice number (optional)"}),i.jsx(we,{value:m.invoice_number,onChange:k=>f(S=>({...S,invoice_number:k.target.value})),placeholder:"#0001"})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{children:"Description"}),i.jsx(Ca,{value:m.description,onChange:k=>f(S=>({...S,description:k.target.value})),placeholder:"e.g. Adult Gold Membership",rows:2})]})]}),i.jsxs(Ka,{children:[i.jsx(I,{variant:"outline",onClick:()=>d(!1),children:"Cancel"}),i.jsxs(I,{onClick:g,disabled:u,children:[u&&i.jsx(Be,{className:"mr-1.5 h-4 w-4 animate-spin"}),"Save"]})]})]})]})]})]}),i.jsx(Me,{children:s?i.jsx("div",{className:"flex justify-center py-16",children:i.jsx(Be,{className:"h-6 w-6 animate-spin text-primary"})}):i.jsx("div",{className:"overflow-x-auto",children:i.jsxs(Ob,{children:[i.jsx(Mb,{children:i.jsxs(Aa,{children:[i.jsx(Dr,{children:"Member"}),i.jsx(Dr,{children:"Amount"}),i.jsx(Dr,{children:"Description"}),i.jsx(Dr,{children:"Method"}),i.jsx(Dr,{children:"Invoice"}),i.jsx(Dr,{children:"Status"}),i.jsx(Dr,{className:"text-right",children:"Date"}),i.jsx(Dr,{})]})}),i.jsxs(Db,{children:[b.map(k=>i.jsxs(Aa,{children:[i.jsx(Dt,{className:"font-medium",children:QJ(k.profiles)}),i.jsx(Dt,{children:Wu(Number(k.amount))}),i.jsx(Dt,{className:"max-w-[200px] truncate text-muted-foreground",children:k.description??"â"}),i.jsx(Dt,{className:"capitalize text-muted-foreground",children:k.method}),i.jsx(Dt,{className:"text-muted-foreground",children:k.invoice_number??"â"}),i.jsx(Dt,{children:w(k.status)}),i.jsx(Dt,{className:"text-right text-muted-foreground",children:k.paid_date||k.due_date?new Date(k.paid_date||k.due_date).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"}):"â"}),i.jsx(Dt,{className:"text-right",children:k.status!=="paid"&&i.jsxs(I,{size:"sm",variant:"ghost",onClick:()=>v(k.id),children:[i.jsx(Ps,{className:"mr-1 h-4 w-4"})," Paid"]})})]},k.id)),b.length===0&&i.jsx(Aa,{children:i.jsx(Dt,{colSpan:8,className:"py-10 text-center text-muted-foreground",children:"No payments recorded yet."})})]})]})})})]})]})}const XJ=[{key:"overview",label:"Overview",render:()=>i.jsx(ZJ,{})},{key:"invoices",label:"Invoices",note:"All invoices, paid / scheduled / overdue, per member."},{key:"memberships",label:"Membership Plans",note:"Create and edit recurring membership plans and pricing."},{key:"payments",label:"Payments",note:"Recorded and processed payments."},{key:"settings",label:"Settings",note:"Billing rules, taxes and payment processor settings."}];function eQ(){return i.jsx(Wi,{title:"Billing",description:"Money in â invoices, memberships, payments and overdue accounts.",tabs:XJ})}
614const tQ=[{key:"leads",label:"Leads",note:"Lead pipeline and follow-up status."},{key:"automations",label:"Automations",note:"No-show, birthday, welcome and lapsed-member message flows."},{key:"campaigns",label:"Campaigns",note:"Email and SMS campaigns."},{key:"forms",label:"Forms",note:"Lead capture and signup forms."}];function rQ(){return i.jsx(Wi,{title:"Marketing",description:"Leads, automated lifecycle messaging and campaigns.",tabs:tQ})}const nQ=[{key:"pages",label:"Pages",note:"Public website pages and content."},{key:"booking",label:"Booking Links",note:"Public class booking links and embeds."},{key:"media",label:"Media",note:"Images and assets used on the website."}];function sQ(){return i.jsx(Wi,{title:"Website",description:"Your public website and booking links.",tabs:nQ})}const iQ=[{key:"pos",label:"Point of Sale",note:"Sell memberships, gear and drop-ins."},{key:"products",label:"Products",note:"Gear and product catalog."},{key:"orders",label:"Orders",note:"Sales history and receipts."}];function aQ(){return i.jsx(Wi,{title:"Sales",description:"Point of sale, products and orders.",tabs:iQ})}var Ff="Switch",[oQ,cZ]=wr(Ff),[lQ,cQ]=oQ(Ff),fI=p.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:a,required:o,disabled:l,value:c="on",onCheckedChange:d,form:u,...h}=e,[m,f]=p.useState(null),y=Le(t,w=>f(w)),x=p.useRef(!1),b=m?u||!!m.closest("form"):!0,[g,v]=wn({prop:s,defaultProp:a??!1,onChange:d,caller:Ff});return i.jsxs(lQ,{scope:r,checked:g,disabled:l,children:[i.jsx(le.button,{type:"button",role:"switch","aria-checked":g,"aria-required":o,"data-state":xI(g),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:y,onClick:de(e.onClick,w=>{v(j=>!j),b&&(x.current=w.isPropagationStopped(),x.current||w.stopPropagation())})}),b&&i.jsx(yI,{control:m,bubbles:!x.current,name:n,value:c,checked:g,required:o,disabled:l,form:u,style:{transform:"translateX(-100%)"}})]})});fI.displayName=Ff;var pI="SwitchThumb",gI=p.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=cQ(pI,r);return i.jsx(le.span,{"data-state":xI(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});gI.displayName=pI;var dQ="SwitchBubbleInput",yI=p.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...s},a)=>{const o=p.useRef(null),l=Le(o,a),c=jb(r),d=cw(t);return p.useEffect(()=>{const u=o.current;if(!u)return;const h=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==r&&f){const y=new Event("click",{bubbles:n});f.call(u,r),u.dispatchEvent(y)}},[c,r,n]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:l,style:{...s.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});yI.displayName=dQ;function xI(e){return e?"checked":"unchecked"}var vI=fI,uQ=gI;const Yx=p.forwardRef(({className:e,...t},r)=>i.jsx(vI,{className:Q("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:r,children:i.jsx(uQ,{className:Q("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Yx.displayName=vI.displayName;function hQ({offeringId:e,title:t,open:r,onOpenChange:n}){const[s,a]=p.useState([]),[o,l]=p.useState([]),[c,d]=p.useState(!1);async function u(){if(!e)return;d(!0);const f=new Date().toISOString().slice(0,10),{data:y}=await F.from("class_sessions").select("id, session_date, start_time, end_time, capacity").eq("offering_id",e).gte("session_date",f).eq("status","scheduled").order("session_date").limit(8),x=y??[];if(a(x),x.length){const b=x.map(j=>j.id),{data:g}=await F.from("bookings").select("id, session_id, user_id, guest_name, guest_email, status, position").in("session_id",b).neq("status","cancelled").order("position",{nullsFirst:!0}),v=g??[],w=[...new Set(v.map(j=>
614j.user_id).filter(Boolean))];if(w.length){const{data:j}=await F.from("profiles").select("id, first_name, last_name, email").in("id",w),k=new Map((j??[]).map(S=>[S.id,S]));v.forEach(S=>{S.user_id&&(S.profiles=k.get(S.user_id)??null)})}l(v)}else l([]);d(!1)}p.useEffect(()=>{r&&u()},[r,e]);async function h(f,y){const{error:x}=await F.from("bookings").update({status:y}).eq("id",f);if(x){ce.error("Could not update.");return}u()}function m(f){return f.profiles?[f.profiles.first_name,f.profiles.last_name].filter(Boolean).join(" ")||f.profiles.email||"Member":f.guest_name?`${f.guest_name} (trial)`:f.guest_email??"Guest"}return i.jsx(Vi,{open:r,onOpenChange:n,children:i.jsxs(Os,{className:"max-h-[85vh] overflow-y-auto sm:max-w-2xl",children:[i.jsx(Ms,{children:i.jsxs(Ds,{children:[t," â Rosters"]})}),c?i.jsx("div",{className:"flex justify-center py-12",children:i.jsx(Be,{className:"h-6 w-6 animate-spin text-primary"})}):s.length===0?i.jsx("p",{className:"py-8 text-center text-muted-foreground",children:"No upcoming sessions."}):i.jsx("div",{className:"space-y-6",children:s.map(f=>{const y=o.filter(g=>g.session_id===f.id),x=y.filter(g=>["reserved","checked_in","attended"].includes(g.status)),b=y.filter(g=>g.status==="waitlisted");return i.jsxs("div",{className:"rounded-lg border border-border p-4",children:[i.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[i.jsxs("p",{className:"font-medium",children:[lb(f.session_date)," · ",zl(f.start_time,f.end_time)]}),i.jsxs(rt,{variant:"outline",children:[x.length,"/",f.capacity]})]}),y.length===0?i.jsx("p",{className:"text-sm text-muted-foreground",children:"No bookings yet."}):i.jsxs("div",{className:"space-y-1.5",children:[x.map(g=>i.jsxs("div",{className:"flex items-center justify-between rounded-md bg-muted/40 px-3 py-1.5 text-sm",children:[i.jsxs("span",{className:"flex items-center gap-2",children:[m(g),g.status==="checked_in"&&i.jsx(rt,{className:"bg-primary/15 text-primary",children:"Checked in"})]}),i.jsxs("span",{className:"flex gap-1",children:[g.status!=="checked_in"&&i.jsx(I,{variant:"ghost",size:"icon",className:"h-7 w-7",title:"Check in",onClick:()=>
614h(g.id,"checked_in"),children:i.jsx(Ps,{className:"h-4 w-4"})}),i.jsx(I,{variant:"ghost",size:"icon",className:"h-7 w-7",title:"Remove",onClick:()=>h(g.id,"cancelled"),children:i.jsx(Da,{className:"h-4 w-4"})})]})]},g.id)),b.length>0&&i.jsx("p",{className:"pt-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Waitlist"}),b.map(g=>i.jsxs("div",{className:"flex items-center justify-between rounded-md px-3 py-1.5 text-sm text-muted-foreground",children:[i.jsxs("span",{children:["#",g.position," · ",m(g)]}),i.jsx(I,{variant:"ghost",size:"icon",className:"h-7 w-7",title:"Remove",onClick:()=>h(g.id,"cancelled"),children:i.jsx(Da,{className:"h-4 w-4"})})]},g.id))]})]},f.id)})})]})})}const HS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],zS={title:"",class_slug:"",category:"adult",location:"",day_of_week:1,start_time:"18:00",end_time:"19:00",capacity:16,trial_eligible:!1,active:!0};function mQ(){const[e,t]=p.useState([]),[r,n]=p.useState(!0),[s,a]=p.useState(null),[o,l]=p.useState(zS),[c,d]=p.useState(!1),[u,h]=p.useState(!1),[m,f]=p.useState(!1),[y,x]=p.useState(null);async function b(){const{data:S}=await F.from("class_offerings").select("*").order("day_of_week").order("start_time");t(S??[]),n(!1)}p.useEffect(()=>{b()},[]);function g(){a(null),l(zS),d(!0)}function v(S){a(S);const{id:_,...N}=S;l({...N,start_time:N.start_time.slice(0,5),end_time:N.end_time.slice(0,5)}),d(!0)}async function w(){var N;if(!o.title.trim()){ce.error("Title is required.");return}h(!0);const S={...o,class_slug:((N=o.class_slug)==null?void 0:N.trim())||null},{error:_}=s?await F.from("class_offerings").update(S).eq("id",s.id):await F.from("class_offerings").insert(S);if(h(!1),_){ce.error("Could not save class.");return}ce.success(s?"Class updated.":"Class added."),d(!1),await b(),await k(!0)}async function j(S){await F.from("class_offerings").update({active:!S.active}).eq("id",S.id),b()}async function k(S=!1){f(!0);const{data:_,error:N}=await F.rpc("admin_generate_sessions",{weeks_ahead:6});if(f(!1),N){S||ce.error("Could not refresh sessions.");return}S||ce.success(`Schedule refreshed â ${_??0} new session(s) added.`)}return i.jsxs("div",{className:"space-y-6",children:[i.jsxs(Pe,{children:[i.jsxs(Ke,{className:"flex flex-row items-center justify-between gap-4",children:[i.jsx(Ye,{children:"Recurring Classes"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs(I,{variant:"outline",size:"sm",onClick:()=>k(!1),disabled:m,children:[m?i.jsx(Be,{className:"mr-1.5 h-4 w-4 animate-spin"}):i.jsx(l2,{className:"mr-1.5 h-4 w-4"}),"Refresh sessions"]}),i.jsxs(I,{size:"sm",onClick:g,className:"bg-gradient-gold font-semibold text-primary-foreground hover:opacity-90",children:[i.jsx(Xm,{className:"mr-1.5 h-4 w-4"})," Add class"]})]})]}),i.jsx(Me,{children:r?i.jsx("div",{className:"flex justify-center py-12",children:i.jsx(Be,{className:"h-6 w-6 animate-spin text-primary"})}):e.length===0?i.jsx("p",{className:"py-8 text-center text-muted-foreground",children:"No classes yet. Add your first one."}):i.jsx("div",{className:"space-y-3",children:e.map(S=>i.jsxs("div",{className:`flex flex-col gap-3 rounded-lg border p-4 sm:flex-row sm:items-center sm:justify-between ${S.active?"border-border":"border-dashed border-border opacity-60"}`,children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsx("h3",{className:"font-heading font-semibold",children:S.title}),i.jsx(rt,{variant:"outline",className:"capitalize",children:S.category}),S.trial_eligible&&i.jsx(rt,{variant:"secondary",children:"Trial"}),!S.active&&i.jsx(rt,{variant:"outline",children:"Inactive"})]}),i.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[HS[S.day_of_week],"s · ",zl(S.start_time,S.end_time)," · cap ",S.capacity,S.location?` · ${S.location}`:""]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs(I,{variant:"ghost",size:"sm",onClick:()=>x({offeringId:S.id,title:S.title}),children:[i.jsx(ar,{className:"mr-1.5 h-4 w-4"})," Rosters"]}),i.jsx(I,{variant:"outline",size:"sm",onClick:()=>v(S),children:"Edit"}),i.jsx(Yx,{checked:S.active,onCheckedChange:()=>j(S),"aria-label":"Active"})]})]},S.id))})})]}),i.jsx(Vi,{open:c,onOpenChange:d,children:i.jsxs(Os,{children:[i.jsx(Ms,{children:i.jsx(Ds,{children:s?"Edit class":"Add class"})}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{children:"Title"}),i.jsx(we,{value:o.title,onChange:S=>l({...o,title:S.target.value})})]}),i.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{children:"Category"}),i.jsxs(mi,{value:o.category,onValueChange:S=>l({...o,category:S}),children:[i.jsx(ps,{children:i.jsx(fi,{})}),i.jsxs(gs,{children:[i.jsx(Jt,{value:"adult",children:"Adult"}),i.jsx(Jt,{value:"youth",children:"Youth"})]})]})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{children:"Day of week"}),i.jsxs(mi,{value:String(o.day_of_week),onValueChange:S=>l({...o,day_of_week:Number(S)}),children:[i.jsx(ps,{children:i.jsx(fi,{})}),i.jsx(gs,{children:HS.map((S,_)=>i.jsx(Jt,{value:String(_),children:S},_))})]})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{children:"Start time"}),i.jsx(we,{type:"time",value:o.start_time,onChange:S=>l({...o,start_time:S.target.value})})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{children:"End time"}),i.jsx(we,{type:"time",value:o.end_time,onChange:S=>l({...o,end_time:S.target.value})})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{children:"Capacity"}),i.jsx(we,{type:"number",min:1,value:o.capacity,onChange:S=>l({...o,capacity:Number(S.target.value)})})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{children:"Class page slug (optional)"}),i.jsx(we,{value:o.class_slug??"",placeholder:"beginner-longsword",onChange:S=>l({...o,class_slug:S.target.value})})]})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(pe,{children:"Location"}),i.jsx(we,{value:o.location,onChange:S=>l({...o,location:S.target.value})})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Yx,{checked:o.trial_eligible,onCheckedChange:S=>l({...o,trial_eligible:S}),id:"trial"}),i.jsx(pe,{htmlFor:"trial",children:"Allow trial guests (no account) to book"})]})]}),i.jsx(Ka,{children:i.jsxs(I,{onClick:w,disabled:u,className:"bg-gradient-gold font-semibold text-primary-foreground hover:opacity-90",children:[u&&i.jsx(Be,{className:"mr-2 h-4 w-4 animate-spin"}),s?"Save changes":"Add class"]})})]})}),i.jsx(hQ,{offeringId:(y==null?void 0:y.offeringId)??null,title:(y==null?void 0:y.title)??"",open:!!y,onOpenChange:S=>!S&&x(null)})]})}const fQ=[{key:"schedule",label:"Schedule",render:()=>i.jsx(mQ,{})}
614,{key:"classes",label:"Classes",note:"All class offerings, capacity and booking links."},{key:"calendar",label:"Calendar",note:"Calendar view of all sessions."},{key:"bookings",label:"Bookings",note:"Manage bookings and waitlists."}];function pQ(){return i.jsx(Wi,{title:"Gym",description:"Classes, schedule, calendar and bookings.",tabs:fQ})}const gQ=[{key:"checkin",label:"Check-in",render:()=>i.jsx(mI,{})},{key:"schedule",label:"Today's Schedule",note:"Front-desk view of today's classes and rosters."}];function yQ(){return i.jsx(Wi,{title:"Front Desk",description:"Day-to-day check-in and front desk tools.",tabs:gQ})}const WS={id:"",category:"",title:"",body:""};function xQ(){const{user:e}=Ga(),[t,r]=p.useState([]),[n,s]=p.useState(!0),[a,o]=p.useState(!1),[l,c]=p.useState(WS),[d,u]=p.useState(!1),h=p.useCallback(async()=>{const{data:g}=await F.from("sops").select("id,category,title,body").order("category").order("sort_order");r(g??[]),s(!1)},[]);p.useEffect(()=>{h()},[h]);function m(){c(WS),o(!0)}function f(g){c({id:g.id,category:g.category,title:g.title,body:g.body??""}),o(!0)}async function y(){if(!l.title.trim()||!l.category.trim()){ce.error("Category and title are required.");return}u(!0);const g={category:l.category.trim(),title:l.title.trim(),body:l.body,updated_by:e==null?void 0:e.id},{error:v}=l.id?await F.from("sops").update(g).eq("id",l.id):await F.from("sops").insert(g);if(u(!1),v){ce.error("Could not save.");return}o(!1),ce.success("Saved."),h()}async function x(g){confirm("Delete this document?")&&(await F.from("sops").delete().eq("id",g),h())}const b=[...new Set(t.map(g=>g.category))];return i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"How-to docs, checklists, and procedures for running the academy."}),i.jsxs(I,{onClick:m,className:"bg-gradient-gold font-semibold text-primary-foreground hover:opacity-90",children:[i.jsx(Xm,{className:"mr-1.5 h-4 w-4"})," New Doc"]})]}),n?i.jsx("div",{className:"flex justify-center py-12",children:i.jsx(Be,{className:"h-6 w-6 animate-spin text-primary"})}):t.length===0?i.jsx(Pe,{children:i.jsx(Me,{className:"py-10 text-center text-muted-foreground",children:"No operations docs yet. Add your first one."})}):b.map(g=>i.jsxs("div",{children:[i.jsx("h3",{className:"mb-2 font-heading text-sm font-semibold uppercase tracking-wider text-primary",children:g}),i.jsx(bb,{type:"multiple",className:"rounded-md border border-border",children:t.filter(v=>v.category===g).map(v=>i.jsxs(Rf,{value:v.id,className:"px-4",children:[i.jsx(Pf,{className:"text-sm font-medium",children:v.title}),i.jsxs(If,{children:[i.jsx("p",{className:"whitespace-pre-wrap text-sm text-muted-foreground",children:v.body||"No content."}),i.jsxs("div",{className:"mt-3 flex gap-2",children:[i.jsxs(I,{size:"sm",variant:"outline",onClick:()=>f(v),children:[i.jsx(JD,{className:"mr-1.5 h-3.5 w-3.5"})," Edit"]}),i.jsxs(I,{size:"sm",variant:"ghost",onClick:()=>x(v.id),className:"text-destructive hover:text-destructive",children:[i.jsx(nL,{className:"mr-1.5 h-3.5 w-3.5"})," Delete"]})]})]})]},v.id))})]},g)),i.jsx(Vi,{open:a,onOpenChange:o,children:i.jsxs(Os,{children:[i.jsx(Ms,{children:i.jsx(Ds,{children:l.id?"Edit Document":"New Document"})}),i.jsxs("div",{className:"space-y-3",children:[i.jsx(we,{placeholder:"Category (e.g. Opening, Safety, Equipment)",value:l.category,onChange:g=>c({...l,category:g.target.value}),list:"sop-cats"}),i.jsx("datalist",{id:"sop-cats",children:[...new Set(t.map(g=>g.category))].map(g=>i.jsx("option",{value:g},g))}),i.jsx(we,{placeholder:"Title",value:l.title,onChange:g=>c({...l,title:g.target.value})}),i.jsx(Ca,{placeholder:"Steps / detailsâ¦",value:l.body,onChange:g=>c({...l,body:g.target.value}),rows:8})]}),i.jsxs(Ka,{children:[i.jsx(I,{variant:"outline",onClick:()=>o(!1),children:"Cancel"}),i.jsxs(I,{onClick:y,disabled:d,className:"bg-gradient-gold font-semibold text-primary-foreground hover:opacity-90",children:[d&&i.jsx(Be,{className:"mr-2 h-4 w-4 animate-spin"})," Save"]})]})]})})]})}const vQ=[{key:"ops",label:"Run the Gym (SOPs)",render:()=>i.jsx(xQ,{})},{key:"staff",label:"Staff & Roles",note:"Manage staff accounts and permissions."},{key:"general",label:"General",note:"Academy details, locations and preferences."}];function wQ(){return i.jsx(Wi,{title:"Settings",description:"Academy configuration and staff management.",tabs:vQ})}function fg({children:e,requireStaff:t}){const{user:r,isStaff:n,loading:s}=Ga(),a=kn();return s?i.jsx("div",{className:"flex min-h-[60vh] items-center justify-center",children:i.jsx(Be,{className:"h-8 w-8 animate-spin text-primary"})}):r?t&&!n?i.jsx(qy,{to:"/dashboard",replace:!0}):i.jsx(i.Fragment,{children:e}
614):i.jsx(qy,{to:"/auth",state:{from:a.pathname},replace:!0})}function bQ(){const e=Bi();return p.useEffect(()=>{const t=s=>sa(JSON.stringify(s)),r=s=>{const a=bd(s);if(!a)return null;const o=vx(a.ageRange);return{name:a.name,slug:a.slug,url:`${ye}/classes/${a.slug}`,audience:a.category,ageRange:a.ageRange??null,minAge:o.min??null,maxAge:o.max??null,skillLevel:tb(a),prerequisites:rb(a),schedule:a.schedule??[],scheduleSummary:Sl(a),timeZone:oe.timeZone,location:Ni(a),status:Na(a),currentlyRunning:a.currentlyRunning??!1,trial:ot.summary,price:ot.price,equipment:a.gearRecommendations,loanerEquipmentAvailable:!0,gearUrl:`${ye}/gear/class/${a.slug}`,bookingUrl:nb(a),shortDescription:a.shortDescription,description:a.fullDescription}},n=[{name:"get_academy_information",description:"Get BladeFit Academy's description, location, contact details, hours context, age ranges, and what it teaches.",inputSchema:Et.none,execute:()=>t({name:oe.name,description:oe.description,website:ye,shop:oe.shopUrl,address:oe.addressLine,outdoorLocation:oe.outdoorLocation,phone:oe.phoneDisplay,email:oe.email,timeZone:oe.timeZone,youthAges:fs,adultAges:Go,trialPolicy:ot.summary,contentLastUpdated:Fa,aiClassCatalog:`${ye}/ai/classes.json`,aiEventFeed:`${ye}/ai/events.json`})},{name:"get_contact_information",description:"Get BladeFit Academy's public phone number, email address, and mailing address.",inputSchema:Et.none,execute:()=>t({phone:oe.phoneDisplay,phoneE164:oe.phone,email:oe.email,address:oe.addressLine,contactPage:`${ye}/contact`})},{name:"get_location_information",description:"Get BladeFit Academy's training locations, including the outdoor youth class location.",inputSchema:Et.none,execute:()=>t({primary:{name:oe.name,address:oe.addressLine,geo:oe.geo},outdoor:{name:oe.outdoorLocation,note:"Used by some youth classes."},areaServed:oe.areaServed})},{name:"list_programs",description:"List BladeFit Academy's two program tracks (youth and adult) with their age ranges and class counts.",inputSchema:Et.none,execute:()=>t([{program:"Youth",ages:fs,url:`${ye}/programs/youth`,classes:yn.map(s=>s.name)},{program:"Adult",ages:Go,url:`${ye}/programs/adult`,classes:xn.map(s=>s.name)}])},{name:"get_program",description:"Get every class in one program track, youth or adult, with schedules and status.",inputSchema:Et.object({program:{type:"string",description:"Program track",enum:["youth","adult"]}},["program"]),execute:s=>{const a=(s==null?void 0:s.program)==="adult"?"adult":"youth",o=a==="adult"?xn:yn;return t({program:a,ages:a==="adult"?Go:fs,url:`${ye}/programs/${a}`,classes:o.map(l=>r(l.slug))})}},{name:"search_classes",description:"Search BladeFit Academy classes by keyword, audience, or student age. Returns matching classes with schedules and booking links.",inputSchema:Et.object({query:{type:"string",description:"Keyword, e.g. 'longsword' or 'saber'"},audience:{type:"string",description:"Filter by audience",enum:["youth","adult","all"]},age:{type:"string",description:"Student age in years, e.g. '8'"},onlyCurrentlyRunning:{type:"string",description:"Set to 'true' to exclude classes not currently running"}}),execute:s=>{const a=String((s==null?void 0:s.query)??"").toLowerCase().trim(),o=String((s==null?void 0:s.audience)??"all"),l=Number(s==null?void 0:s.age),c=String((s==null?void 0:s.onlyCurrentlyRunning)??"")==="true",d=xs.filter(u=>{if(o!=="all"&&u.category!==o||c&&!u.currentlyRunning)return!1;if(Number.isFinite(l)){const{min:h,max:m}=vx(u.ageRange);if(h!==void 0&&l<h||m!==void 0&&l>m)return!1}return a?`${u.name} ${u.shortDescription} ${u.fullDescription}`.toLowerCase().includes(a):!0});return t({count:d.length,classes:d.map(u=>r(u.slug))})}},{name:"get_class",description:"Get one class in full: description, ages, skill level, prerequisites, schedule, location, gear, trial policy, and booking URL.",inputSchema:Et.object({slug:{type:"string",description:"Class slug from search_classes, e.g. 'cubs-club'"}},["slug"]),execute:s=>{const a=r(String((s==null?void 0:s.slug)??""));return a?t(a):sa("No class found with that slug. Call search_classes or list_programs first.")}},{name:"get_current_schedule",description:"Get the recurring weekly class schedule, grouped by audience, plus classes that are not currently running.",inputSchema:Et.none,execute:()=>
614t({note:"All entries are recurring weekly classes. One-time events are in list_upcoming_events.",timeZone:oe.timeZone,lastUpdated:Fa,youth:yn.filter(s=>s.currentlyRunning).map(s=>({name:s.name,ages:s.ageRange,schedule:s.schedule??[],location:Ni(s)})),adult:xn.filter(s=>s.currentlyRunning).map(s=>({name:s.name,ages:s.ageRange,schedule:s.schedule??[],location:Ni(s)})),notCurrentlyRunning:xs.filter(s=>!s.currentlyRunning).map(s=>({name:s.name,status:Na(s)}))})},{name:"get_membership_options",description:"Get all BladeFit Academy membership plans, family plans, quarterly options, and punch cards with pricing.",inputSchema:Et.none,execute:()=>t({trial:ia,individualMonthly:qo,familyMonthly:vf,individualQuarterly:jd,familyQuarterly:wf,punchCards:kd,allPlans:eb,url:`${ye}/memberships`})},{name:"get_trial_information",description:"Get the trial-class policy and the booking link for a youth or adult trial. Every program uses the same $5 paid trial.",inputSchema:Et.object({audience:{type:"string",description:"Who the trial is for",enum:["youth","adult"]}}),execute:s=>{const a=(s==null?void 0:s.audience)==="adult"?"adult":"youth";return t({policy:ot.summary,appliesTo:ot.appliesTo,price:ot.price,isFree:!1,loanerGearProvided:!0,audience:a,bookingUrl:ot.signupUrls[a],bothBookingUrls:ot.signupUrls,whatToBring:["Comfortable athletic clothing","Water bottle","Indoor athletic shoes (required â bare feet are not permitted at any age)"],url:`${ye}/trial`})}},{name:"list_upcoming_events",description:"List BladeFit Academy's upcoming events and tournaments, with an option to include the past-events archive.",inputSchema:Et.object({includePast:{type:"string",description:"Set to 'true' to also return completed events"}}),execute:s=>t({upcoming:cm().map(a=>({name:a.title,slug:a.slug,date:a.date,startDate:a.startDate??null,location:a.location,description:a.description,registrationUrl:a.bookingUrl??null})),...String((s==null?void 0:s.includePast)??"")==="true"?{past:Xw().map(a=>({name:a.title,slug:a.slug,date:a.date,location:a.location,status:"completed"}))}:{},url:`${ye}/events`})},{name:"get_event",description:"Get one event by slug, including date, location, description, and registration link.",inputSchema:Et.object({slug:{type:"string",description:"Event slug from list_upcoming_events"}},["slug"]),execute:s=>{const a=yf.find(o=>o.slug===String((s==null?void 0:s.slug)??""));return a?t({name:a.title,slug:a.slug,date:a.date,startDate:a.startDate??null,endD
614ate:a.endDate??null,time:a.time??null,location:a.location,organizer:a.organizer??oe.name,description:a.description,details:a.details??null,price:a.price??null,registrationUrl:a.bookingUrl??null}):sa("No event found with that slug. Call list_upcoming_events first.")}},{name:"get_coach_information",description:"Get the BladeFit Academy coaching staff, their titles, and their backgrounds.",inputSchema:Et.none,execute:()=>t({coaches:Wo.map(s=>({name:s.name,titles:s.titles,bio:s.bio})),url:`${ye}/coaches`})},{name:"get_gear_requirements",description:"Get required and recommended equipment, either for one class (pass a class slug) or the full gear catalog by category.",inputSchema:Et.object({classSlug:{type:"string",description:"Optional class slug, e.g. 'beginner-longsword'"}}),execute:s=>{const a=String((s==null?void 0:s.classSlug)??"");if(a){const o=bd(a);return o?t({class:o.name,equipment:o.gearRecommendations,loanerEquipmentAvailable:!0,url:`${ye}/gear/class/${o.slug}`}):sa("No class found with that slug.")}return t({note:"Loaner gear is provided for trial classes and new students.",categories:jl.map(o=>({name:o.name,slug:o.slug,summary:o.shortDescription,url:`${ye}/gear/${o.slug}`})),url:`${ye}/gear`})}},{name:"get_policies",description:"Get BladeFit Academy's published policies: adult, youth, payment, and salle etiquette.",inputSchema:Et.none,execute:()=>t({footwear:"Indoor athletic shoes are required in the salle. Bare feet are not permitted at any age.",trial:ot.summary,pages:[{name:"Adult policies",url:`${ye}/policies/adult`},{name:"Youth policies",url:`${ye}/policies/youth`},{name:"Payment policy",url:`${ye}/policies/payment`},{name:"Etiquette policy",url:`${ye}/policies/etiquette`}]})},{name:"get_faq",description:"Get BladeFit Academy's frequently asked questions and answers.",inputSchema:Et.object({query:{type:"string",description:"Optional keyword to filter questions"}}),execute:s=>{const a=String((s==null?void 0:s.query)??"").toLowerCase().trim(),o=a?kl.filter(l=>`${l.q} ${l.a}`.toLowerCase().includes(a)):kl;return t({count:o.length,faqs:o,url:`${ye}/faq`})}},{name:"navigate_site",description:"Navigate this website to a section so the visitor can see it: home, schedule, youth programs, adult programs, memberships, trial, gear, events, faq, contact, coaches.",inputSchema:Et.object({section:{type:"string",description:"Section to open",enum:["home","schedule","youth","adult","memberships","trial","gear","events","faq","contact","coaches"]}},["section"]),execute:s=>{const o={home:"/",schedule:"/schedule",youth:"/programs/youth",adult:"/programs/adult",memberships:"/memberships",trial:"/trial",gear:"/gear",events:"/events",faq:"/faq",contact:"/contact",coaches:"/coaches"}[String((s==null?void 0:s.section)??"")];return o?(e(o),sa(`Opened ${ye}${o}`)):sa("Unknown section.")}}];return pP(n)},[e]),null}function qS(e){return e.startsWith("http://")||e.startsWith("https://")}function ql({tagline:e,headline:t,subheadline:r,primaryCTA:n,secondaryCTA:s,backgroundImage:a,imagePosition:o,spotlight:l}){return i.jsxs("section",{className:"relative min-h-[90vh] flex items-center justify-center overflow-hidden",children:[i.jsxs("div",{className:"absolute inset-0 bg-foreground",children:[a&&i.jsx("img",{src:a,alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-70",style:o?{objectPosition:o}:void 0}),l?i.jsx("div",{className:"absolute inset-0",style:{background:`radial-gradient(ellipse 45% 55% at ${l.x} ${l.y}, hsl(var(--foreground) / 0.1) 0%, hsl(var(--foreground) / 0.45) 45%, hsl(var(--foreground) / 0.85) 80%)`}}):i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-foreground
614/60 via-foreground/40 to-foreground/80"})]}),i.jsxs("div",{className:"relative z-10 container mx-auto px-4 text-center max-w-3xl",children:[e&&i.jsx(L.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"text-primary font-body uppercase tracking-widest text-sm mb-4",children:e}),i.jsx(L.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.1},className:"font-heading text-4xl sm:text-5xl md:text-6xl text-primary-foreground leading-tight mb-6",children:t}),i.jsx(L.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},className:"text-primary-foreground/80 text-lg sm:text-xl mb-10 max-w-2xl mx-auto font-body",children:r}),i.jsxs(L.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.3},className:"flex flex-col sm:flex-row gap-4 justify-center",children:[qS(n.href)?i.jsx(I,{asChild:!0,size:"lg",className:"bg-gradient-gold text-primary-foreground shadow-gold text-base px-8",children:i.jsx("a",{href:n.href,target:"_blank",rel:"noopener noreferrer",children:n.text})}):i.jsx(I,{asChild:!0,size:"lg",className:"bg-gradient-gold text-primary-foreground shadow-gold text-base px-8",children:i.jsx(B,{to:n.href,children:n.text})}),s&&(qS(s.href)?i.jsx(I,{asChild:!0,variant:"outline",size:"lg",className:"border-primary-foreground/30 bg-transparent text-primary-foreground hover:bg-primary-foreground/10 text-base px-8",children:i.jsx("a",{href:s.href,target:"_blank",rel:"noopener noreferrer",children:s.text})}):i.jsx(I,{asChild:!0,variant:"outline",size:"lg",className:"border-primary-foreground/30 bg-transparent text-primary-foreground hover:bg-primary-foreground/10 text-base px-8",children:i.jsx(B,{to:s.href,children:s.text})}))]})]})]})}function Gl({heading:e,description:t,items:r}){return i.jsx("section",{className:"py-20 sm:py-28 bg-[hsl(var(--warm-cream))]",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-3xl",children:[i.jsxs(L.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},className:"text-center mb-12",children:[i.jsx("h2",{className:"font-heading text-3xl sm:text-4xl text-foreground mb-4",children:e}),t&&i.jsx("p",{className:"text-muted-foreground text-lg font-body max-w-2xl mx-auto",children:t})]}),i.jsx("div",{className:"space-y-5",children:r.map((n,s)=>{const a=n.icon||Ps;return i.jsxs(L.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0,margin:"-40px"},transition:{duration:.4,delay:s*.08},className:"flex items-start gap-4",children:[i.jsx("span",{className:"mt-1 flex-shrink-0 w-6 h-6 rounded-full bg-primary/10 flex items-center justify-center",children:i.jsx(a,{className:"w-3.5 h-3.5 text-primary"})}),i.jsx("p",{className:"text-foreground font-body text-base sm:text-lg",children:n.text})]},s)})})]})})}function Kl({heading:e,description:t,features:r}){return i.jsx("section",{className:"py-20 sm:py-28 bg-background",children:i.jsxs("div",{className:"container mx-auto px-4",children:[i.jsxs(L.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},className:"text-center mb-14 max-w-2xl mx-auto",children:[i.jsx("h2",{className:"font-heading text-3xl sm:text-4xl text-foreground mb-4",children:e}),t&&i.jsx("p",{className:"text-muted-foreground text-lg font-body",children:t})]}),i.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-6 max-w-5xl mx-auto",children:r.map((n,s)=>{const a=n.icon;return i.jsxs(L.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-40px"},transition:{duration:.5,delay:s*.1},className:"rounded-lg border border-border bg-card p-6 text-center shadow-sm",children:[i.jsx("div",{className:"mx-auto mb-4 w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center",children:i.jsx(a,{className:"w-6 h-6 text-primary"})}),i.jsx("h3",{className:"font-heading text-lg text-card-foreground mb-2",children:n.title}),i.jsx("p",{className:"text-muted-foreground text-sm font-body",children:n.description})]},s)})})]})})}function Yl({heading:e,description:t,steps:r}){return i.jsx("section",{className:"py-20 sm:py-28 bg-[hsl(var(--warm-cream))]",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-3xl",children:[i.jsxs(L.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},className:"text-center mb-14",children:[i.jsx("h2",{className:"font-heading text-3xl sm:text-4xl text-foreground mb-4",children:e}),t&&i.jsx("p",{className:"text-muted-foreground text-lg font-body",children:t})]}),i.jsx("div",{className:"space-y-8",children:r.map((n,s)=>i.jsxs(L.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0,margin:"-40px"},transition:{duration:.4,delay:s*.1},className:"flex gap-5",children:[i.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-gradient-gold text-primary-foreground flex items-center justify-center font-heading text-lg",children:s+1}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-heading text-lg text-foreground mb-1",children:n.title}),i.jsx("p",{className:"text-muted-foreground font-body",children:n.description})]})]},s))})]})})}function Jl({heading:e,items:t}){return i.jsx("section",{className:"py-20 sm:py-28 bg-[hsl(var(--warm-cream))]",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-2xl",children:[i.jsx(L.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},className:"font-heading text-3xl sm:text-4xl text-foreground text-center mb-12",children:e}),i.jsx(L.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-40px"},transition:{duration:.5},children:i.jsx(bb,{type:"single",collapsible:!0,className:"w-full",children:t.map((r,n)=>i.jsxs(Rf,{value:`item-${n}`,children:[i.jsx(Pf,{className:"text-left font-body text-foreground",children:r.question}),i.jsx(If,{className:"text-muted-foreground font-body",children:r.answer})]},n))})})]})})}function GS(e){return e.startsWith("http://")||e.startsWith("https://")}function Ql({heading:e,description:t,primaryCTA:r,secondaryCTA:n}){return i.jsx("section",{className:"py-20 sm:py-28 bg-foreground",children:i.jsxs("div",{className:"container mx-auto px-4 text-center max-w-2xl",children:[i.jsx(L.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},className:"font-heading text-3xl sm:text-4xl text-primary-foreground mb-4",children:e}),t&&i.jsx(L.p,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.5,delay:.1}
614,className:"text-primary-foreground/70 text-lg font-body mb-10",children:t}),i.jsxs(L.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-40px"},transition:{duration:.5,delay:.2},className:"flex flex-col sm:flex-row gap-4 justify-center",children:[GS(r.href)?i.jsx(I,{asChild:!0,size:"lg",className:"bg-gradient-gold text-primary-foreground shadow-gold text-base px-8",children:i.jsx("a",{href:r.href,target:"_blank",rel:"noopener noreferrer",children:r.text})}):i.jsx(I,{asChild:!0,size:"lg",className:"bg-gradient-gold text-primary-foreground shadow-gold text-base px-8",children:i.jsx(B,{to:r.href,children:r.text})}),n&&(GS(n.href)?i.jsx(I,{asChild:!0,variant:"outline",size:"lg",className:"border-primary-foreground/30 bg-transparent text-primary-foreground hover:bg-primary-foreground/10 text-base px-8",children:i.jsx("a",{href:n.href,target:"_blank",rel:"noopener noreferrer",children:n.text})}):i.jsx(I,{asChild:!0,variant:"outline",size:"lg",className:"border-primary-foreground/30 bg-transparent text-primary-foreground hover:bg-primary-foreground/10 text-base px-8",children:i.jsx(B,{to:n.href,children:n.text})}))]})]})})}const jQ="/assets/fantasy-hero-highres-CB6DrX0k.jpg",Lb="/assets/history-knights-medieval-CYu2GekI.jpg",kQ="/assets/fantasy-body-banner-BSCipXcQ.jpg",Bf="/assets/history-angelo-broadsword-D51HtEes.webp",KS="/trial",SQ="/schedule",_Q="/contact";function pg({src:e,alt:t,caption:r,size:n="default",vignette:s=!1}){const a=n==="large"?"max-h-[420px] sm:max-h-[680px] md:max-h-[820px] lg:max-h-[900px]":"max-h-[300px] sm:max-h-[520px] md:max-h-[620px] lg:max-h-[700px]",o=n==="large"?"max-w-7xl":"max-w-6xl";return i.jsx(L.div,{initial:{opacity:0}
614,whileInView:{opacity:1},viewport:{once:!0,margin:"-60px"},transition:{duration:.8},className:`${n==="large"?"py-12 sm:py-20":"py-10 sm:py-14"} bg-foreground/5`,children:i.jsxs("div",{className:`container mx-auto px-4 ${o} text-center`,children:[i.jsxs("div",{className:"relative mx-auto inline-block rounded-md overflow-hidden",children:[i.jsx("img",{src:e,alt:t,className:`block mx-auto ${a} w-auto object-contain`}),i.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-t from-foreground/40 via-foreground/10 to-transparent"}),s&&i.jsx("div",{className:"pointer-events-none absolute inset-0",style:{background:"radial-gradient(ellipse 55% 55% at 50% 50%, transparent 0%, transparent 35%, hsl(var(--foreground) / 0.55) 80%, hsl(var(--foreground) / 0.85) 100%)"}})]}),r&&i.jsx("p",{className:`mt-4 text-muted-foreground italic font-body ${n==="large"?"text-base sm:text-lg":"text-sm"}`,children:r})]})})}function NQ(){return p.useEffect(()=>{document.title="Learn Real Swordsmanship | BladeFit Academy";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Step into the world you've imagined. Learn real swordsmanship in a welcoming, beginner-friendly environment at BladeFit Academy.")},[]),i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/fantasy",title:"Fantasy â BladeFit Academy",description:"Campaign landing page for BladeFit Academy in Vancouver, WA.",noindex:!0}),i.jsx(ql,{tagline:"BladeFit Academy",headline:"Step Into the World You've Been Imagining",subheadline:"Learn real swordsmanship in a welcoming, beginner-friendly environment where your love of fantasy meets real skill.",primaryCTA:{text:"Try Your First Class",href:KS},secondaryCTA:{text:"See the Schedule",href:SQ},backgroundImage:jQ,imagePosition:"50% 40%",spotlight:{x:"50%",y:"42%"}}),i.jsx(Gl,{heading:"This Is for You If...",description:"This is for you if you never grew out of the story. The worlds, the warriors, the weight of a blade in someone's hand on screen â a part of you has been quietly waiting for the chance to step into that for real.",items:[{text:"A fight scene hits in a film or anime and something inside you leans forward â not to watch, but to do."},{text:"You've picked up a stick, a broom, a wooden spoon and felt your hand fall naturally into a grip you were never taught."},{text:"You've stood in worlds like Middle-earth, Westeros, the Lands Between, or the Continent and felt more like yourself there than most places in real life."},{text:"You want to know what real steel actually feels like in your hand â the weight, the balance, the quiet seriousness of it."},{text:"You miss the feeling that something is at stake. That you're becoming someone, not just passing time."},{text:"The knight, the duelist, the ranger, the samurai â whichever one it is, you've always known which archetype is yours."},{text:"You want to move, breathe hard, and stand across from another person without the ego or grind of normal sports."},{text:"You don't need a costume or a character. You just want a place where the part of you that loves this is allowed to show up."},{text:"You want to feel stronger, sharper, and more at home in your own body â like the version of you that's been waiting underneath."},{text:"Deep down you've always known: one day you were going to learn how to wield a sword. This is that day."}]}),i.jsx("section",{className:"py-16 md:py-24 bg-background",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[i.jsx("p",{className:"font-serif text-3xl md:text-5xl leading-tight text-foreground",children:"You've imagined this your entire life."}),i.jsx("p",{className:"font-serif text-3xl md:text-5xl leading-tight text-primary mt-3 md:mt-4",children:"Now you can learn it for real."})]})})}),i.jsx(pg,{src:Lb,alt:"Medieval knights in armor â historical illustration",caption:"The real martial tradition behind the fantasy you love"}),i.jsx(Kl,{heading:"What You'll Actually Learn",description:"Real techniques rooted in historical swordsmanship â not choreography, not cosplay props.",features:[{icon:Xv,title:"Blade Handling",description:"Learn proper grip, stance, and how to move a sword with intention and control."},{icon:qn,title:"Defense & Timing",description:"Develop real defensive technique, measure, and the timing that makes sparring click."},{icon:ar,title:"Partner Drills",description:"Train with others in structured, safe exercises that build skill and confidence together."}
614,{icon:ef,title:"Sparring",description:"Progress into controlled sparring where you apply everything you've learned."}]}),i.jsx(pg,{src:kQ,alt:"18th-century smallsword fencing illustration",caption:"Centuries of martial tradition â now yours to learn",size:"large",vignette:!0}),i.jsx(Yl,{heading:"Your First Class",description:"No experience required. Here's what to expect.",steps:[{title:"Show Up",description:"Arrive a few minutes early. We'll get you set up with loaner gear and introduce you to the group."},{title:"Warm Up",description:"We start with movement drills to get your body ready â no prior fitness level needed."},{title:"Learn the Basics",description:"Your instructor walks you through foundational cuts, guards, and footwork step by step."},{title:"Leave Inspired",description:"You'll walk out having swung a sword, met great people, and felt something genuinely new."}]}),i.jsx(pg,{src:Bf,alt:"Angelo's Highland Broadsword manual illustration",caption:"From Angelo's military saber manual â the real art behind the fantasy"}),i.jsx(Jl,{heading:"Frequently Asked Questions",items:[{question:"Do I need any experience?",answer:"None at all. Our beginner classes are designed for people who have never picked up a sword. We'll teach you everything from scratch."},{question:"Is this like LARPing or stage combat?",answer:"No â this is real historical swordsmanship. You'll learn actual techniques rooted in martial tradition. That said, we welcome people from all backgrounds, including LARP and stage combat."},{question:"What gear do I need?",answer:"Nothing to start. We provide all loaner gear for your first sessions. As you progress, we'll help you find your own equipment."},{question:"Will I get to spar?",answer:"Yes! Once you've built foundational skills, you'll progress into safe, controlled sparring. Most students start light sparring within their first few weeks."},{question:"Is it safe?",answer:"Safety is our top priority. We use proper protective equipment, train with appropriate weapons for each skill level, and our coaches maintain a controlled environment at all times."}]}),i.jsx(Ql,{heading:"Your Adventure Starts Here",description:"No experience needed. No commitments. Just show up and see what it feels like.",primaryCTA:{text:"Try Your First Class",href:KS},secondaryCTA:{text:"Contact Us",href:_Q}})]})}const $b="/assets/longsword-manuscript-B8NuiohO.jpg",Fb="/assets/history-fencing-smallsword-BZW7DMpI.jpg",YS="/trial",CQ="/schedule",AQ="/contact";function gg({src:e,alt:t,caption:r}){return i.jsx(L.div,{initial:{opacity:0}
614,whileInView:{opacity:1},viewport:{once:!0,margin:"-60px"},transition:{duration:.8},className:"py-12 sm:py-16 bg-foreground/5",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-4xl text-center",children:[i.jsx("img",{src:e,alt:t,className:"mx-auto max-h-[320px] sm:max-h-[400px] w-auto object-contain rounded-md"}),r&&i.jsx("p",{className:"mt-4 text-muted-foreground text-sm italic font-body",children:r})]})})}function TQ(){return p.useEffect(()=>{document.title="Historical Swordsmanship Classes | BladeFit Academy";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Learn real historical European martial arts (HEMA) at BladeFit Academy. Source-based swordsmanship in a structured, welcoming environment.")},[]),i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/history",title:"History â BladeFit Academy",description:"Campaign landing page for BladeFit Academy in Vancouver, WA.",noindex:!0}),i.jsx(ql,{tagline:"BladeFit Academy",headline:"Learn Real Historical Swordsmanship",subheadline:"Study the actual fighting systems of European martial tradition in a structured, source-informed, and welcoming training environment.",primaryCTA:{text:"Begin Training",href:YS},secondaryCTA:{text:"See the Schedule",href:CQ},backgroundImage:Lb}),i.jsx(Gl,{heading:"Built for the Historically Curious",description:"Whether you've studied the treatises or just discovered that real sword fighting existed â this is where you start.",items:[{icon:Ym,text:"You're fascinated by how swords were actually used in history"},{text:"You want structured martial training rooted in real source material"},{text:"You've read about HEMA and want to experience it firsthand"},{text:"You value discipline, technique, and continuous improvement"},{text:"You want a physical practice with real intellectual depth"}]}),i.jsx(gg,{src:$b,alt:"Historical longsword fighting technique from a medieval fencing treatise",caption:"From a 16th-century German fencing manual â the techniques we study today"}),i.jsx(Kl,{heading:"What We Teach",description:"Our curriculum draws from historical European fighting manuals, adapted into a progressive training system.",features:[{icon:Xv,title:"Longsword Fundamentals",description:"Core guards, cuts, and techniques drawn from the German and Italian traditions."},{icon:ew,title:"Measure & Timing",description:"The tactical foundations that make sparring effective â distance management, tempo, and initiative."},{icon:qn,title:"Defense & Counter",description:"Parries, displacements, and counter-attacks that form the backbone of safe, skilled fencing."},{icon:ar,title:"Structured Sparring",description:"Progressive sparring from constrained drills to free fencing, always with proper protective equipment."}]}),i.jsx(gg,{src:Fb,alt:"18th-century smallsword fencing illustration",caption:"Smallsword fencing, 18th century â part of a centuries-long martial tradition"}),i.jsx(Yl,{heading:"Your First Class",description:"No prior martial arts experience required.",steps:[{title:"Arrive & Gear Up",description:"Come a few minutes early. We provide all loaner equipment and walk you through safety basics."},{title:"Warm Up & Conditioning",description:"Structured warm-up that prepares your body for swordwork â all fitness levels welcome."},{title:"Technical Instruction",description:"Your instructor introduces foundational techniques with clear, step-by-step guidance."},{title:"Partner Drills",description:"Apply what you've learned with a training partner in controlled, cooperative exercises."}]}),i.jsx(gg,{src:Bf,alt:"Angelo's Highland Broadsword manual illustration showing military saber guards",caption:"From Angelo's 'Hungarian & Highland Broadsword' â the roots of military saber"}),i.jsx(Jl,{heading:"Frequently Asked Questions",items:[{question:"Do I need martial arts experience?",answer:"No. Our beginner curriculum assumes zero prior experience. We build every skill from the ground up."},{question:"Which traditions do you study?",answer:"Our core curriculum focuses on German longsword (Liechtenauer tradition) with elements from the Italian tradition. We also offer other weapon forms as you advance."},{question:"Is this sport fencing?",answer:"No. We study historical European martial arts (HEMA) â the actual fighting systems recorded in medieval and Renaissance manuals. It's martial, not athletic competition."},{question:"What about safety?",answer:"We use proper HEMA-rated protective equipment, train with appropriate weapons for each level, and maintain strict safety protocols in all sparring."},{question:"How physical is it?",answer:"Swordsmanship is a full-body activity, but our classes accommodate all fitness levels. You'll build strength, coordination, and endurance over time."}]}),i.jsx(Ql,{heading:"Begin Your Study",description:"Start with a beginner class. No experience or equipment needed.",primaryCTA:{text:"Begin Training",href:YS},secondaryCTA:{text:"Contact Us",href:AQ}})]})}
614const wI="/assets/hero-sparring-BwUhgcHU.jpg",bI="/assets/longsword-outdoor-sparring-q8Ret6Eh.jpg",Bb="/assets/longsword-drills-CLJVUl-r.jpg",JS="/trial",EQ="/schedule",RQ="/contact";function yg({src:e,alt:t,caption:r}){return i.jsx(L.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0,margin:"-60px"},transition:{duration:.8},className:"py-12 sm:py-16 bg-foreground/5",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-4xl text-center",children:[i.jsx("img",{src:e,alt:t,className:"mx-auto max-h-[320px] sm:max-h-[400px] w-auto object-contain rounded-md"}),r&&i.jsx("p",{className:"mt-4 text-muted-foreground text-sm italic font-body",children:r})]})})}function PQ(){return p.useEffect(()=>{document.title="Join a Welcoming Swordsmanship Community | BladeFit Academy";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","A welcoming beginner-friendly swordsmanship community where you can learn something real and actually enjoy showing up.")},[]),i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/community",title:"Community â BladeFit Academy",description:"Campaign landing page for BladeFit Academy in Vancouver, WA.",noindex:!0}),i.jsx(ql,{tagline:"BladeFit Academy",headline:"Come for Swords. Stay for the People.",subheadline:"A welcoming beginner-friendly swordsmanship community where you can learn something real and actually enjoy showing up.",primaryCTA:{text:"Join a Session",href:JS},secondaryCTA:{text:"See the Schedule",href:EQ},backgroundImage:wI}),i.jsx(Gl,{heading:"Making Friends as an Adult Is Hard",description:"You're not alone. Most adults struggle to find a place where they can meet good people, do something fun, and actually look forward to showing up every week.",items:[{icon:BD,text:"You want to meet people but don't know where to start"},{text:"You're tired of hobbies you do alone"},{text:"You want something active that doesn't feel like a gym"},{text:"You want a community that's genuinely welcoming â not cliquey"},{text:"You don't need to be 'a sword person' already â just curious"}]}),i.jsx(yg,{src:bI,alt:"Adult students sparring outdoors with longswords",caption:"Training together â where friendships are forged"}),i.jsx(Kl,{heading:"What This Gives You",description:"It's not just a class â it's a reason to show up, move your body, and be around good people.",features:[{icon:Qv,title:"Movement",description:"A full-body workout that's engaging and fun â not repetitive gym routines."},{icon:rL,title:"Fun",description:"You'll laugh, learn, and leave feeling great. This is the highlight of people's week."},{icon:ar,title:"Community",description:"A genuinely welcoming group of people who became friends through training together."},{icon:ef,title:"Learning",description:"Pick up a real skill â swordsmanship â and feel yourself getting better every session."}]}),i.jsx(yg,{src:Bb,alt:"Adult students running longsword drills together",caption:"Partner training is at the heart of every class"}),i.jsx(Yl,{heading:"What to Expect in Your First Class",description:"You don't need experience, equipment, or a friend to come with. Just show up.",steps:[{title:"Walk In",description:"Arrive a few minutes early. We'll introduce you to the group and make sure you feel comfortable."},{title:"Warm Up Together",description:"We start with movement drills as a group â it's social from the start, not intimidating."},{title:"Learn Something Cool",description:"Your coach will walk you through real swordsmanship basics. It's hands-on and immediately engaging."},{title:"Leave With a Smile",description:"You'll walk out having moved your body, learned something new, and met people you'll want to see again."}]}),i.jsx(yg,{src:ib,alt:"Adult students sparring with military sabers",caption:"Real skills, real people, real community"}),i.jsx(Jl,{heading:"Frequently Asked Questions",items:[{question:"Is this okay if I come alone?",answer:"Absolutely. Most people come alone their first time. Our community is welcoming and our coaches make sure nobody feels left out."},{question:"Do I need to be in shape first?",answer:"Nope. Our classes are designed for all fitness levels. You'll build strength and endurance naturally as you train."},{question:"Is it beginner-friendly?",answer:"100%. Our beginner classes assume zero experience. We teach everything from scratch and progress at a comfortable pace."},{question:"What is the class vibe like?",answer:"Supportive, social, and fun. Think: focused enough to learn real skills, relaxed enough to laugh and enjoy yourself."},{question:"What do I bring?",answer:"Just yourself in comfortable workout clothes. We provide all training equipment for your first sessions."}]}),i.jsx(Ql,{heading:"Your New Favorite Hobby Starts Here",description:"No experience needed. No commitments. Just come try it and see how it feels.",primaryCTA:{text:"Join a Session",href:JS},secondaryCTA:{text:"Contact Us",href:RQ}})]})}const IQ="/assets/anime-hero-CwpATdiZ.jpg",QS="/trial",OQ="/schedule",MQ="/contact";function xg({src:e,alt:t,caption:r}){return i.jsx(L.div,{initial:{opacity:0}
614,whileInView:{opacity:1},viewport:{once:!0,margin:"-60px"},transition:{duration:.8},className:"py-12 sm:py-16 bg-foreground/5",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-4xl text-center",children:[i.jsx("img",{src:e,alt:t,className:"mx-auto max-h-[320px] sm:max-h-[400px] w-auto object-contain rounded-md"}),r&&i.jsx("p",{className:"mt-4 text-muted-foreground text-sm italic font-body",children:r})]})})}function DQ(){return p.useEffect(()=>{document.title="Train Like Your Favorite Characters | BladeFit Academy";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Learn real swordsmanship in a welcoming beginner-friendly environment built for people who love movement, style, and action.")},[]),i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/anime",title:"Anime â BladeFit Academy",description:"Campaign landing page for BladeFit Academy in Vancouver, WA.",noindex:!0}),i.jsx(ql,{tagline:"BladeFit Academy",headline:"Train Like the Characters You Love",subheadline:"Learn real swordsmanship in a welcoming beginner-friendly environment built for people who love movement, style, and action.",primaryCTA:{text:"Start Training",href:QS},secondaryCTA:{text:"See Schedule",href:OQ},backgroundImage:IQ}),i.jsx(Gl,{heading:"Why Action Fans Connect With This",description:"The dynamic sword fights you love aren't just animation â they're rooted in real timing, real footwork, and real body control. Now you can train it.",items:[{icon:aL,text:"You love the speed, precision, and style of anime sword fights"},{text:"You've always wanted to know what it actually feels like to swing a sword"},{text:"You're drawn to the discipline and flow of martial movement"},{text:"You want a physical skill that scratches the same itch as your favorite action scenes"},{text:"You don't need to be a martial artist â just someone who thinks this looks incredible"}]}),i.jsx(xg,{src:$b,alt:"Historical longsword fighting technique from a medieval fencing treatise",caption:"The real techniques behind the epic moves"}),i.jsx(Kl,{heading:"What BladeFit Actually Teaches",description:"Real techniques, real weapons, real skill â not choreography or cosplay.",features:[{icon:LD,title:"Footwork",description:"The foundation of every great fighter. Learn how to move with speed, balance, and purpose."},{icon:ew,title:"Timing & Measure",description:"The tactical core of swordsmanship â knowing when to strike and how to control distance."},{icon:Xv,title:"Blade Control",description:"Proper cutting mechanics, guards, and transitions that give your movement real intention."},{icon:qn,title:"Sparring Progression",description:"Build from drills to controlled sparring where you apply everything in real time."}]}),i.jsx(xg,{src:Fb,alt:"18th-century smallsword fencing illustration",caption:"Speed, precision, timing â centuries of martial tradition"}),i.jsx(Yl,{heading:"Your First Class",description:"Beginner-friendly. No experience or gear needed.",steps:[{title:"Show Up",description:"Come a few minutes early. We'll get you set up with loaner gear and introduce you to the group."},{title:"Warm Up",description:"Dynamic movement drills that get your body ready â think footwork and coordination, not push-ups."},{title:"Learn Real Techniques",description:"Your instructor breaks down fundamental cuts, guards, and movement patterns step by step."},{title:"Leave Energized",description:"You'll walk out having swung a real sword, trained with real people, and felt something completely new."}]}),i.jsx(xg,{src:Bf,alt:"Angelo's Highland Broadsword manual illustration",caption:"From Angelo's military saber manual â real martial art, real history"}),i.jsx(Jl,{heading:"Frequently Asked Questions",items:[{question:"Is this for beginners?",answer:"Absolutely. Our beginner classes assume zero experience. We teach everything from the ground up in a supportive, structured environment."},{question:"Do I need experience in martial arts?",answer:"Not at all. Many of our students have never trained in any martial art before. We meet you where you are."},{question:"Is this safe?",answer:"Yes. Safety is built into everything we do â proper protective gear, skill-appropriate weapons, and experienced coaches who maintain a controlled training environment."},{question:"What gear do I need?",answer:"Nothing to start. We provide all loaner equipment for your first sessions. As you progress, we'll help you find your own gear."},{question:"What if I just think swords are cool?",answer:"That's literally the best reason to start. You don't need a deep backstory or martial arts resume. If swords are cool to you, you belong here."}]}),i.jsx(Ql,{heading:"Bring the Movement Into Real Life",description:"No experience needed. No judgment. Just show up and start training.",primaryCTA:{text:"Start Training",href:QS},secondaryCTA:{text:"Contact Us",href:MQ}})]})}const ZS="/trial",XS="/schedule";function vg({src:e,alt:t,caption:r}){return i.jsx(L.div,{initial:{opacity:0}
614,whileInView:{opacity:1},viewport:{once:!0,margin:"-60px"},transition:{duration:.8},className:"py-12 sm:py-16 bg-foreground/5",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-4xl text-center",children:[i.jsx("img",{src:e,alt:t,className:"mx-auto max-h-[320px] sm:max-h-[400px] w-auto object-contain rounded-md"}),r&&i.jsx("p",{className:"mt-4 text-muted-foreground text-sm italic font-body",children:r})]})})}function LQ(){return p.useEffect(()=>{document.title="Real Swordsmanship for Ren Faire Enthusiasts | BladeFit Academy";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Bring real technique into the world you already love. Beginner-friendly historical swordsmanship training at BladeFit Academy.")},[]),i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/renfaire",title:"Renfaire â BladeFit Academy",description:"Campaign landing page for BladeFit Academy in Vancouver, WA.",noindex:!0}),i.jsx(ql,{tagline:"Historical Swordsmanship for the Historically Passionate",headline:"You Love the World. Now Learn the Art.",subheadline:"Bring real technique into the world you already love through beginner-friendly historical swordsmanship training.",primaryCTA:{text:"Train for Real",href:ZS},secondaryCTA:{text:"View Schedule",href:XS},backgroundImage:Lb}),i.jsx(Gl,{heading:"This Is for You",description:"If any of these sound familiar, you're exactly who we built this for.",items:[{text:"You attend Ren Faires and wish the swordplay was real â not choreographed"},{text:"You're involved in the SCA or reenactment community and want structured technique"},{text:"You've invested in historical costume, arms, or armor and want to learn how they were actually used"},{text:"You love the history and the culture â and you're ready to add skill to the passion"},{text:"You've been curious about HEMA or historical fencing but didn't know where to start"}]}),i.jsx(vg,{src:$b,alt:"Historical longsword fighting technique from a medieval fencing treatise",caption:"From a 16th-century German fencing manual â the real art behind the faire"}),i.jsx(Kl,{heading:"What Makes BladeFit Real and Structured",description:"We train from historical sources using real technique â not stage combat, not choreography.",features:[{icon:Ym,title:"Source-Based Training",description:"Our curriculum draws from actual historical fencing manuals and treatises â the same sources scholars study."},{icon:qe,title:"Progressive Curriculum",description:"Structured levels from fundamentals through advanced technique. Every class builds on the last."},{icon:qn,title:"Real Equipment",description:"Train with proper steel simulators and protective gear. We provide everything you need to start."}
614,{icon:FD,title:"Skilled Instruction",description:"Our coaches study historical martial arts and teach with safety, progression, and technique in mind."}]}),i.jsx(vg,{src:Fb,alt:"18th-century smallsword fencing illustration",caption:"Smallsword fencing, 18th century â part of a living martial tradition"}),i.jsx(Yl,{heading:"What to Expect as a Beginner",description:"Your first session is designed to be welcoming, structured, and immediately rewarding.",steps:[{title:"Arrive and check in",description:"No special gear needed. Wear comfortable athletic clothing and we'll take care of the rest."},{title:"Warm up with the group",description:"We start every class with movement and conditioning that builds the foundation for swordwork."},{title:"Learn core fundamentals",description:"Your first session covers guard positions, footwork, and basic cuts â real technique from day one."},{title:"Partner drills and application",description:"Practice what you've learned with a partner in controlled, coached exercises. Safe, structured, and fun."}]}),i.jsx(vg,{src:Bf,alt:"Angelo's Highland Broadsword manual illustration showing military saber guards",caption:"From Angelo's 'Hungarian & Highland Broadsword' â the roots of military saber"}),i.jsx(Jl,{heading:"Frequently Asked Questions",items:[{question:"Is this reenactment?",answer:"No. We teach historical European martial arts (HEMA) â real combat technique drawn from historical fencing manuals. It's martial arts training, not performance or reenactment, though it complements those interests beautifully."},{question:"Is this beginner-friendly?",answer:"Absolutely. Our intro classes are designed for people with zero experience. You'll learn real technique from day one in a structured, supportive environment."},{question:"Do I need armor or costume gear?",answer:"Not at all. We provide all training equipment including swords, masks, and gloves. Your Ren Faire armor stays at home â this is athletic training gear."},{question:"What should I wear?",answer:"Comfortable athletic clothing â think gym clothes. Long pants and athletic shoes are ideal. We'll handle the rest."},{question:"Can I do this if I've only done Ren Faire or SCA events?",answer:"Yes â that's exactly who this is for. No prior martial arts experience needed. Your enthusiasm for the history and culture is the perfect starting point."}]}),i.jsx(Ql,{heading:"Train for Real",description:"You already love the world. Now learn the art behind it. Book your intro session and start training.",primaryCTA:{text:"Train for Real",href:ZS},secondaryCTA:{text:"View Schedule",href:XS}})]})}const e_="https://wellhub.com/en-us/search/partners/bladefit-academy-vancouver-heights/",$Q="/schedule",FQ="/contact";function wg({src:e,alt:t,caption:r}){return i.jsx(L.div,{initial:{opacity:0}
614,whileInView:{opacity:1},viewport:{once:!0,margin:"-60px"},transition:{duration:.8},className:"py-12 sm:py-16 bg-foreground/5",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-4xl text-center",children:[i.jsx("img",{src:e,alt:t,className:"mx-auto max-h-[320px] sm:max-h-[400px] w-auto object-contain rounded-md"}),r&&i.jsx("p",{className:"mt-4 text-muted-foreground text-sm italic font-body",children:r})]})})}function BQ(){return p.useEffect(()=>{document.title="Use Your Wellhub Benefit for Swordsmanship | BladeFit Academy";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Your Wellhub membership covers BladeFit Academy. Skip the boring gym routine and learn real swordsmanship in a welcoming community.")},[]),i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/wellhub",title:"Wellhub â BladeFit Academy",description:"Campaign landing page for BladeFit Academy in Vancouver, WA.",noindex:!0}),i.jsx(ql,{tagline:"Included with Your Wellhub Membership",headline:"Your Wellhub Benefit Just Got a Lot More Interesting.",subheadline:"Skip the treadmill. Use your workplace Wellhub membership to train real swordsmanship at BladeFit Academy â a full-body workout that actually makes you want to show up.",primaryCTA:{text:"Find Us on Wellhub",href:e_},secondaryCTA:{text:"See the Schedule",href:$Q},backgroundImage:wI}),i.jsx(Gl,{heading:"Tired of the Same Old Wellhub Options?",description:"Most of what's on Wellhub blurs together â another gym, another yoga studio, another spin class. We're the one that's genuinely different.",items:[{icon:ef,text:"You want to use your benefit on something you'll actually look forward to"},{text:"You're bored of generic gyms and repetitive classes"},{text:"You want a real workout that doesn't feel like a chore"},{text:"You've always been a little curious about sword fighting"},{text:"You want to meet people, not just clock a workout alone"}]}),i.jsx(wg,{src:bI,alt:"Students sparring outdoors with longswords",caption:"A workout that feels like an adventure"}),i.jsx(Kl,{heading:"Why Wellhub Members Love Training Here",description:"It's covered by your membership, and it's unlike anything else on the platform.",features:[{icon:a2,title:"Covered by Wellhub",description:"Your workplace membership includes classes here â just check in through your Wellhub app when you arrive."},{icon:Qv,title:"A Real Workout",description:"Build strength, agility, and endurance while having way too much fun to notice."},{icon:qe,title:"Learn a Real Skill",description:"Train authentic historical swordsmanship and watch yourself improve every session."},{icon:ar,title:"Welcoming Community",description:"A friendly, beginner-friendly group that makes showing up the highlight of your week."}]}),i.jsx(wg,{src:Bb,alt:"Students running longsword drills together",caption:"No experience needed â we teach everything from scratch"}),i.jsx(Yl,{heading:"How to Get Started with Wellhub",description:"Using your benefit is simple. Here's exactly how it works.",steps:[{title:"Find Us on Wellhub",description:"Search for BladeFit Academy in your Wellhub app and choose us as the gym you're coming to visit."},{title:"Contact Us to Set Up Your Account",description:"Reach out so we can set up your club account for tracking waivers, attendance, and gear before your first session."},{title:"Check In When You Arrive",description:"When you show up, check in through your Wellhub app so your visit is logged to your membership."},{title:"Come Prepared",description:"Wear comfortable workout clothes and indoor athletic shoes, and bring a bottle of water. We provide all the training gear you need for your first sessions."},{title:"Have a Blast",description:"Learn real swordsmanship, get a great workout, and meet people you'll want to train with again."}]}),i.jsx(wg,{src:ib,alt:"Students sparring with military sabers",caption:"Real skills, real people, real fun"}),i.jsx(Jl,{heading:"Wellhub Member Questions",items:[{question:"Is BladeFit Academy covered by my Wellhub membership?",answer:"Yes! We're partnered with Wellhub. Depending on your plan, classes here are included or available at a member rate. Just choose us in your Wellhub app and check in when you arrive."},{question:"How does Wellhub work with BladeFit?",answer:"Open the Wellhub app, search for BladeFit Academy, and select us as the gym you're visiting. Contact us to set up your club account, then simply check in through your Wellhub app when you arrive for class."},{question:"Do I need any experience?",answer:"None at all. Our beginner classes assume zero experience â we teach everything step by step at a comfortable pace."},{question:"What should I bring?",answer:"Just comfortable workout clothes, indoor athletic shoes, and a bottle of water. We provide all training gear for your first sessions."},{question:"Is it a real workout?",answer:"Absolutely. You'll build full-body strength, agility, and endurance â and have so much fun you'll forget you're exercising."}]}),i.jsx(Ql,{heading:"Make Your Wellhub Benefit Count",description:"Choose us on Wellhub and come try something genuinely different. No experience needed.",primaryCTA:{text:"Find Us on Wellhub",href:e_},secondaryCTA:{text:"Contact Us",href:FQ}})]})}function UQ(){return i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/policies/adult"}),i.jsxs("div",{className:"bg-background",children:[i.jsx("section",{className:"bg-card border-b border-border py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8 text-center",children:[i.jsx("div",{className:"inline-flex items-center justify-center w-14 h-14 roun
614ded-full bg-primary/10 mb-4",children:i.jsx(qn,{className:"w-7 h-7 text-primary"})}),i.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold text-foreground",children:"Adult Policies & Waivers"}),i.jsx("p",{className:"mt-3 text-muted-foreground max-w-2xl mx-auto",children:"Liability waiver, photo release, and substance policy for adult participants (18+)."}),i.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["Looking for youth policies?"," ",i.jsx(B,{to:"/policies/youth",className:"text-primary hover:underline",children:"View Youth Policies"})]})]})}),i.jsxs("div",{className:"container mx-auto px-4 lg:px-8 py-12 max-w-3xl",children:[i.jsxs("section",{className:"mb-12",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold text-foreground mb-6 border-b border-border pb-3",children:"Liability Waiver"}),i.jsxs("div",{className:"space-y-4 text-sm leading-relaxed text-muted-foreground",children:[i.jsx("p",{children:'In consideration of the risk of injury while participating in Sword Fitness Classes and Events (the "Activity"), and as consideration for the right to participate in the Activity, I hereby, for myself, my heirs, executors, administrators, assigns, or personal representatives, knowingly and voluntarily enter into this waiver and release of liability and hereby waive any and all rights, claims or causes of action of any kind whatsoever arising out of my participation in the Activity, and do hereby release and forever discharge BladeFit Academy, located at 7588 Delaware Lane, Vancouver, WA 98684, their owners, affiliates, managers, members, agents, attorneys, staff, volunteers, heirs, representatives, predecessors, successors and assigns, for any physical or psychological injury, including but not limited to illness, paralysis, death, damages, economical or emotional loss, that I may suffer as a direct result of my participation in the aforementioned Activity, including traveling to and from an event related to this Activity.'}),i.jsx("p",{children:"I am voluntarily participating in the aforementioned Activity and I am participating in the Activity entirely at my own risk. I am aware of the risks associated with traveling to and from as well as participating in this Activity, which may include, but are not limited to, physical or psychological injury, pain, suffering, illness, disfigurement, temporary or permanent disability (including paralysis), economic or emotional loss, and death. I understand that these injuries or outcomes may arise from my own or others' negligence, conditions related to travel, or the condition of the Activity location(s). Nonetheless, I assume all related risks, both known or unknown to me, of my participation in this Activity, including travel to, from and during this Activity."}),i.jsx("p",{children:"I agree to indemnify and hold harmless BladeFit Academy against any and all claims, suits or actions of any kind whatsoever for liability, damages, compensation or otherwise brought by me or anyone on my behalf, including attorney's fees and any related costs, if litigation arises pursuant to any claims made by me or by anyone else acting on my behalf. If BladeFit Academy incurs any of these types of expenses, I agree to reimburse BladeFit Academy."}),i.jsx("p",{children:"I acknowledge that BladeFit Academy and their directors, officers, volunteers, representatives and agents are not responsible for errors, omissions, acts or failures to act of any party or entity conducting a specific event or activity on behalf of BladeFit Academy."}),i.jsx("p",{children:"I acknowledge that this Activity may involve a test of a person's physical and mental limits and may carry with it the potential for death, serious injury, and property loss. The risks may include, but are not limited to, those caused by terrain, facilities, temperature, weather, lack of hydration, condition of participants, equipment, vehicular traffic and actions of others, including but not limited to, participants, volunteers, spectators, coaches, event officials and event monitors, and/or producers of the event."}),i.jsx("p",{children:'I acknowledge that I have carefully read this "waiver and release" and fully understand that it is a release of liability. I expressly agree to release and discharge BladeFit Academy and all of its affiliates, managers, members, agents, attorneys, staff, volunteers, heirs, representatives, predecessors, successors and assigns, from any and all claims or causes of action and I agree to voluntarily give up or waive any right that I otherwise have to bring a legal action against BladeFit Academy for personal injury or property damage.'}),i.jsx("p",{children:"To the extent that statute or case law does not prohibit releases for negligence, this release is also for negligence. In the event that any damage to equipment or facilities occurs as a result of my or my family's willful actions, neglect or recklessness, I acknowledge and agree to be held liable for any and all costs associated with any actions of neglect or recklessness."}),i.jsx("p",{children:"This Agreement was entered into at arm's-length, without duress or coercion, and is to be interpreted as an agreement between two parties of equal bargaining strength. Both the Participant, and BladeFit Academy agree that this Agreement is clear and unambiguou
614s as to its terms, and that no other evidence will be used or admitted to alter or explain the terms of this Agreement, but that it will be interpreted based on the language in accordance with the purposes for which it is entered into."}),i.jsx("p",{children:"In the event that any provision contained within this Release of Liability shall be deemed to be severable or invalid, or if any term, condition, phrase or portion of this agreement shall be determined to be unlawful or otherwise unenforceable, the remainder of this agreement shall remain in full force and effect, so long as the clause severed does not affect the intent of the parties. If a court should find that any provision of this agreement to be invalid or unenforceable, but that by limiting said provision it would become valid and enforceable, then said provision shall be deemed to be written, construed and enforced as so limited."}),i.jsx("p",{children:"I, the undersigned participant, affirm that I am of the age of 18 years or older, and that I am freely signing this agreement. I certify that I have read this agreement, that I fully understand its content and that this release cannot be modified orally. I am aware that this is a release of liability and a contract and that I am signing it of my own free will."})]})]}),i.jsxs("section",{className:"mb-12",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold text-foreground mb-6 border-b border-border pb-3",children:"Photo & Video Release"}),i.jsxs("div",{className:"space-y-4 text-sm leading-relaxed text-muted-foreground",children:[i.jsx("p",{children:"For good and valuable consideration, participants hereby authorize BladeFit Academy permission to use their likeness in photographs or videos in any and all of its publications, including but not limited to all BladeFit Academy printed and digital publications."}),i.jsx("p",{children:"Participants understand and agree that any photograph or video using their likeness will become property of BladeFit Academy and will not be returned. Since participation with BladeFit Academy is voluntary, no financial compensation will be provided."}),i.jsx("p",{children:"Participants hereby irrevocably authorize BladeFit Academy to edit, alter, copy, exhibit, publish or distribute photos and videos for purposes of publicizing BladeFit Academy programs or for any other related, lawful purpose. In addition, participants waive the right to inspect or approve the finished product, including written or electronic copy, wherein their likeness appears. Additionally, participants waive any right to royalties or other compensation arising or related to the use of photographs or videos."}),i.jsx("p",{children:"Participants hereby hold harmless and release and forever discharge BladeFit Academy from all claims, demands, and causes of action which they, their heirs, representatives, executors, administrators, or any other persons acting on their behalf or on behalf of their estate have or may have by reason of this authorization."})]})]}),i.jsxs("section",{className:"mb-12",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold text-foreground mb-6 border-b border-border pb-3",children:"Drug & Alcohol Policy"}),i.jsxs("div",{className:"space-y-4 text-sm leading-relaxed text-muted-foreground",children:[i.jsx("p",{children:"It is the desire of the coaches and administration of BladeFit Academy that each participant abstain from the use of and/or possession of alcohol, marijuana, and/or any illegal drug or substance that may impair judgment or physical ability while participating in Academy activities. The welfare and safety of all participants is our major consideration."}),i.jsx("p",{children:"No participant may attend any class, practice, sparring session, or Academy event while under the influence of alcohol, marijuana, or any substance that impairs judgment or physical ability. Participants found to be under the influence will be asked to leave immediately and may face suspension or dismissal from the Academy."}),i.jsx("p",{className:"italic",children:"By participating in BladeFit Academy programs, all members acknowledge that they have read and understand this policy and voluntarily agree to be subject to its terms."})]})]}),i.jsx("div",{className:"rounded-lg border border-border bg-card p-6 text-center",children:i.jsxs("p",{className:"text-sm text-muted-foreground",children:["Questions? Contact us at"," ",i.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})," ","or call"," ",i.jsx("a",{href:"tel:+13602070252",className:"text-primary hover:underline",children:"(360) 207-0252"}),"."]})})]})]})]})}function VQ(){return i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/policies/youth"}),i.jsxs("div",{className:"bg-background",children:[i.jsx("section",{className:"bg-card border-b border-border py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8 text-center",children:[i.jsx("div",{className:"inline-flex items-center justify-center w-14 h-14 roun
614ded-full bg-primary/10 mb-4",children:i.jsx(qn,{className:"w-7 h-7 text-primary"})}),i.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold text-foreground",children:"Youth Policies & Waivers"}),i.jsx("p",{className:"mt-3 text-muted-foreground max-w-2xl mx-auto",children:"Liability waiver, photo release, and substance policy for youth participants (under 18). A parent or guardian must review and acknowledge these terms."}),i.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["Looking for adult policies?"," ",i.jsx(B,{to:"/policies/adult",className:"text-primary hover:underline",children:"View Adult Policies"})]})]})}),i.jsxs("div",{className:"container mx-auto px-4 lg:px-8 py-12 max-w-3xl",children:[i.jsxs("section",{className:"mb-12",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold text-foreground mb-6 border-b border-border pb-3",children:"Liability Waiver"}),i.jsxs("div",{className:"space-y-4 text-sm leading-relaxed text-muted-foreground",children:[i.jsx("p",{children:'In consideration of the risk of injury while participating in Sword Fitness Classes and Events (the "Activity"), and as consideration for the right to participate in the Activity, I hereby, for myself, my heirs, executors, administrators, assigns, or personal representatives, knowingly and voluntarily enter into this waiver and release of liability and hereby waive any and all rights, claims or causes of action of any kind whatsoever arising out of my participation in the Activity, and do hereby release and forever discharge BladeFit Academy, located at 7588 Delaware Lane, Vancouver, WA 98684, their owners, affiliates, managers, members, agents, attorneys, staff, volunteers, heirs, representatives, predecessors, successors and assigns, for any physical or psychological injury, including but not limited to illness, paralysis, death, damages, economical or emotional loss, that I may suffer as a direct result of my participation in the aforementioned Activity, including traveling to and from an event related to this Activity.'}),i.jsx("p",{children:"I am voluntarily participating in the aforementioned Activity and I am participating in the Activity entirely at my own risk. I am aware of the risks associated with traveling to and from as well as participating in this Activity, which may include, but are not limited to, physical or psychological injury, pain, suffering, illness, disfigurement, temporary or permanent disability (including paralysis), economic or emotional loss, and death. I understand that these injuries or outcomes may arise from my own or others' negligence, conditions related to travel, or the condition of the Activity location(s). Nonetheless, I assume all related risks, both known or unknown to me, of my participation in this Activity, including travel to, from and during this Activity."}),i.jsx("p",{children:"I agree to indemnify and hold harmless BladeFit Academy against any and all claims, suits or actions of any kind whatsoever for liability, damages, compensation or otherwise brought by me or anyone on my behalf, including attorney's fees and any related costs, if litigation arises pursuant to any claims made by me or by anyone else acting on my behalf. If BladeFit Academy incurs any of these types of expenses, I agree to reimburse BladeFit Academy."}),i.jsx("p",{children:"I acknowledge that BladeFit Academy and their directors, officers, volunteers, representatives and agents are not responsible for errors, omissions, acts or failures to act of any party or entity conducting a specific event or activity on behalf of BladeFit Academy."}),i.jsx("p",{children:"I acknowledge that this Activity may involve a test of a person's physical and mental limits and may carry with it the potential for death, serious injury, and property loss. The risks may include, but are not limited to, those caused by terrain, facilities, temperature, weather, lack of hydration, condition of participants, equipment, vehicular traffic and actions of others, including but not limited to, participants, volunteers, spectators, coaches, event officials and event monitors, and/or producers of the event."}),i.jsx("p",{children:'I acknowledge that I have carefully read this "waiver and release" and fully understand that it is a release of liability. I expressly agree to release and discharge BladeFit Academy and all of its affiliates, managers, members, agents, attorneys, staff, volunteers, heirs, representatives, predecessors, successors and assigns, from any and all claims or causes of action and I agree to voluntarily give up or waive any right that I otherwise have to bring a legal action against BladeFit Academy for personal injury or property damage.'}),i.jsx("p",{children:"To the extent that statute or case law does not prohibit releases for negligence, this release is also for negligence. In the event that any damage to equipment or facilities occurs as a result of my or my family's willful actions, neglect or recklessness, I acknowledge and agree to be held liable for any and all costs associated with any actions of neglect or recklessness."}),i.jsx("p",{children:"This Agreement was entered into at arm's-length, without duress or coercion, and is to be interpreted as an agreement between two parties of equal bargaining strength. Both the Participant, and BladeFit Academy agree that this Agreement is clear and unambiguou
614s as to its terms, and that no other evidence will be used or admitted to alter or explain the terms of this Agreement, but that it will be interpreted based on the language in accordance with the purposes for which it is entered into."}),i.jsx("p",{children:"In the event that any provision contained within this Release of Liability shall be deemed to be severable or invalid, or if any term, condition, phrase or portion of this agreement shall be determined to be unlawful or otherwise unenforceable, the remainder of this agreement shall remain in full force and effect, so long as the clause severed does not affect the intent of the parties. If a court should find that any provision of this agreement to be invalid or unenforceable, but that by limiting said provision it would become valid and enforceable, then said provision shall be deemed to be written, construed and enforced as so limited."}),i.jsxs("div",{className:"mt-6 rounded-lg border border-border bg-card p-5",children:[i.jsx("h3",{className:"font-heading text-base font-semibold text-foreground mb-2",children:"Parent / Guardian Waiver for Minors"}),i.jsx("p",{children:"In the event that the participant is under the age of consent (18 years of age), then this release must be signed by a parent or guardian. By signing, the parent or guardian certifies that they are the parent or guardian of the student named and give consent without reservation to the foregoing on behalf of this individual."})]})]})]}),i.jsxs("section",{className:"mb-12",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold text-foreground mb-6 border-b border-border pb-3",children:"Photo & Video Release"}),i.jsxs("div",{className:"space-y-4 text-sm leading-relaxed text-muted-foreground",children:[i.jsx("p",{children:"For good and valuable consideration, participants hereby authorize BladeFit Academy permission to use their likeness in photographs or videos in any and all of its publications, including but not limited to all BladeFit Academy printed and digital publications."}),i.jsx("p",{children:"Participants understand and agree that any photograph or video using their likeness will become property of BladeFit Academy and will not be returned. Since participation with BladeFit Academy is voluntary, no financial compensation will be provided."}),i.jsx("p",{children:"Participants hereby irrevocably authorize BladeFit Academy to edit, alter, copy, exhibit, publish or distribute photos and videos for purposes of publicizing BladeFit Academy programs or for any other related, lawful purpose. In addition, participants waive the right to inspect or approve the finished product, including written or electronic copy, wherein their likeness appears. Additionally, participants waive any right to royalties or other compensation arising or related to the use of photographs or videos."}),i.jsx("p",{children:"Participants hereby hold harmless and release and forever discharge BladeFit Academy from all claims, demands, and causes of action which they, their heirs, representatives, executors, administrators, or any other persons acting on their behalf or on behalf of their estate have or may have by reason of this authorization."}),i.jsxs("div",{className:"mt-6 rounded-lg border border-border bg-card p-5",children:[i.jsx("h3",{className:"font-heading text-base font-semibold text-foreground mb-2",children:"Parent / Guardian Consent"}),i.jsx("p",{children:"In the event that the participant is under the age of consent (18 years of age), then this release must be signed by a parent or guardian. By signing, the parent or guardian certifies that they are the parent or guardian of the student named and give consent without reservation to the foregoing on behalf of this individual."})]})]})]}),i.jsxs("section",{className:"mb-12",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold text-foreground mb-6 border-b border-border pb-3",children:"Drug, Alcohol & Tobacco Policy"}),i.jsxs("div",{className:"space-y-4 text-sm leading-relaxed text-muted-foreground",children:[i.jsx("p",{children:"It is the desire of the coaches and administration of BladeFit Academy that each student participating in the programs offered at BladeFit Academy abstain from the use of and/or possession of alcohol, tobacco and/or any illegal drug or performance-enhancing drug."}),i.jsx("p",{children:"The welfare of the student is our major consideration and transcends any other consideration. The use of any of these, to any degree, is incompatible with participation in athletics."}),i.jsx("h3",{className:"font-heading text-lg font-semibold text-foreground pt-2",children:"Policy Purposes"}),i.jsxs("ul",{className:"space-y-2 ml-4",children:[i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1.5 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsx("span",{children:"To prevent and deter the use of illegal drugs, alcohol and/or tobacco both within the Academy."})]}),i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1.5 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsx("span",{children:"To prevent injury to athletes, as well as the physical and psychological harm that results from drug, alcohol and/or tobacco use."})]}),i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1.5 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsx("span",{children:"To give students a valid reason to reject peer pressure to use illegal drugs, alcohol and/or tobacco."})]}),i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1.5 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsx("span",{children:"To ensure that the Academy maintains a learning environment free of illegal drugs, tobacco and/or alcohol and its effects for the safety of all students."})]})]}),i.jsxs("div",{className:"mt-6 rounded-lg border border-destructive/30 bg-destructive/5 p-5",children:[i.jsx("h3",{className:"font-heading text-base font-semibold text-foreground mb-2",children:"Consequences"}),i.jsx("p",{children:"If a student shows up to practice or any event under the influence or in the possession of drugs or alcohol, their parents will be notified immediately and they will not be allowed to participate in practice or events. If this behavior continues, the student will be dismissed from the Academy and tuition will be refunded at a prorated rate."})]}),i.jsxs("div",{className:"mt-6 rounded-lg border border-border bg-card p-5",children:[i.jsx("h3",{className:"font-heading text-base font-semibold text-foreground mb-2",children:"Student Acknowledgment"}),i.jsx("p",{children:"I understand after having read the Student Athlete Policy on Drugs, Alcohol & Tobacco and that, out of care for my safety and health, BladeFit Academy enforces the rules applying to the possession or consumption of tobacco, alcohol, and other illegal drugs. As a member of BladeFit Academy, I realize that the personal decisions I make daily in regard to the consumption or possession of tobacco, alcohol, and other illegal drugs may affect my health and well-being as well as the possible endangerment of those around me. If I choose to violate Academy policy, I understand that I will be subject to the restrictions outlined above."})]}),i.jsxs("div",{className:"mt-4 rounded-lg border border-border bg-card p-5",children:[i.jsx("h3",{className:"font-heading text-base font-semibold text-foreground mb-2",children:"Parent / Guardian Acknowledgment"}),i.jsx("p",{children:"I/We have read and understand the BladeFit Academy Drug, Alcohol and Tobacco Policy. I/We desire that the student named above participate in the programs of BladeFit Academy and we hereby voluntarily agree to be subject to its terms."})]})]})]}),i.jsx("div",{className:"rounded-lg border border-border bg-card p-6 text-center",children:i.jsxs("p",{className:"text-sm text-muted-foreground",children:["Questions? Contact us at"," ",i.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})," ","or call"," ",i.jsx("a",{href:"tel:+13602070252",className:"text-primary hover:underline",children:"(360) 207-0252"}),"."]})})]})]})]})}function HQ(){return i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/policies/payment"}),i.jsxs("div",{className:"bg-background",children:[i.jsx("section",{className:"bg-card border-b border-border py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8 text-center",children:[i.jsx("div",{className:"inline-flex items-center justify-center w-14 h-14 roun
614ded-full bg-primary/10 mb-4",children:i.jsx(Jv,{className:"w-7 h-7 text-primary"})}),i.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold text-foreground",children:"Payment Policy"}),i.jsx("p",{className:"mt-3 text-muted-foreground max-w-2xl mx-auto",children:"Information about billing, accepted payment methods, and membership terms."})]})}),i.jsxs("div",{className:"container mx-auto px-4 lg:px-8 py-12 max-w-3xl",children:[i.jsxs("div",{className:"grid gap-6 md:grid-cols-2 mb-10",children:[i.jsxs("div",{className:"rounded-lg border border-border bg-card p-6",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[i.jsx(Nr,{className:"w-5 h-5 text-primary"}),i.jsx("h3",{className:"font-heading text-lg font-semibold text-foreground",children:"Monthly Billing"})]}),i.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"Memberships are set up as a recurring charge. When you sign up through our online portal, your card on file will be automatically charged on your signup date each month for the upcoming month."})]}),i.jsxs("div",{className:"rounded-lg border border-border bg-card p-6",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[i.jsx(d2,{className:"w-5 h-5 text-primary"}),i.jsx("h3",{className:"font-heading text-lg font-semibold text-foreground",children:"Late Fees"})]}),i.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed",children:["If payment has not been received within 10 days of your billing date, a late fee of ",i.jsx("strong",{className:"text-foreground",children:"$15"})," will be applied."]})]})]}),i.jsxs("section",{className:"mb-10",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold text-foreground mb-6 border-b border-border pb-3",children:"Accepted Payment Methods"}),i.jsxs("ul",{className:"space-y-3 text-sm text-muted-foreground",children:[i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsx("span",{children:"Online portal via our website / GymDesk app"})]}),i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsxs("span",{children:["Venmo â ",i.jsx("strong",{className:"text-foreground",children:"@MSF-USA"})]})]}),i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsx("span",{children:"Cash (in person)"})]})]})]}),i.jsxs("section",{className:"mb-10",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold text-foreground mb-6 border-b border-border pb-3",children:"Cancellation Policy"}),i.jsx("div",{className:"rounded-lg border border-border bg-card p-6",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(ky,{className:"w-5 h-5 text-primary mt-0.5 flex-shrink-0"}),i.jsxs("div",{className:"space-y-3 text-sm text-muted-foreground leading-relaxed",children:[i.jsxs("p",{children:["To cancel your membership, you must provide at least ",i.jsx("strong",{className:"text-foreground",children:"7 days' notice"})," before your next billing date. Cancellation requests received less than 7 days before your billing date will take effect the following billing cycle."]}),i.jsxs("p",{children:["To request a cancellation, contact Lisa at"," ",i.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})," ","or call"," ",i.jsx("a",{href:"tel:+13602070252",className:"text-primary hover:underline",children:"(360) 207-0252"}),"."]})]})]})})]}),i.jsxs("section",{className:"mb-10",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold text-foreground mb-6 border-b border-border pb-3",children:"Updating Your Payment Method"}),i.jsx("div",{className:"rounded-lg border border-border bg-card p-6",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(l2,{className:"w-5 h-5 text-primary mt-0.5 flex-shrink-0"}),i.jsxs("div",{className:"space-y-3 text-sm text-muted-foreground leading-relaxed",children:[i.jsxs("p",{children:["You can update your payment method at any time by logging into your account on our online portal. If you need assistance, contact Lisa at"," ",i.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})," ","or call"," ",i.jsx("a",{href:"tel:+13602070252",className:"text-primary hover:underline",children:"(360) 207-0252"}),"."]}),i.jsx("p",{children:"Please ensure your payment method is up to date to avoid late fees. If your card on file is declined, you will have 10 days to update it before a late fee is applied."})]})]})})]}),i.jsxs("section",{className:"mb-10",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold text-foreground mb-6 border-b border-border pb-3",children:"Membership Freeze / Hold"}),i.jsx("div",{className:"rounded-lg border border-border bg-card p-6",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(YD,{className:"w-5 h-5 text-primary mt-0.5 flex-shrink-0"}),i.jsxs("div",{className:"space-y-3 text-sm text-muted-foreground leading-relaxed",children:[i.jsxs("p",{children:["Members may freeze their membership for up to ",i.jsx("strong",{className:"text-foreground",children:"30 days"})," per calendar year. During a freeze, no payments will be charged and class access will be paused."]}),i.jsxs("p",{children:["Freeze requests must be submitted at least ",i.jsx("strong",{className:"text-foreground",children:"7 days before"})," your next billing date. Freezes cannot be applied retroactively."]}),i.jsx("p",{children:"Your membership will automatically resume at the end of the freeze period, and billing will restart on your next scheduled billing date."}),i.jsxs("p",{children:["To request a membership freeze, contact Lisa at"," ",i.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})," ","or call"," ",i.jsx("a",{href:"tel:+13602070252",className:"text-primary hover:underline",children:"(360) 207-0252"}),"."]})]})]})})]}),i.jsx("div",{className:"rounded-lg border border-border bg-card p-6",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(Qm,{className:"w-5 h-5 text-primary mt-0.5 flex-shrink-0"}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-heading text-base font-semibold text-foreground mb-1",children:"Questions About Payments?"}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:["Contact Lisa at"," ",i.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})," ","or call"," ",i.jsx("a",{href:"tel:+13602070252",className:"text-primary hover:underline",children:"(360) 207-0252"}),"."]})]})]})})]})]})]})}function zQ(){return i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/policies/etiquette"}),i.jsxs("div",{className:"bg-background",children:[i.jsx("section",{className:"bg-card border-b border-border py-16",children:i.jsxs("div",{className:"container mx-auto px-4 lg:px-8 text-center",children:[i.jsx("div",{className:"inline-flex items-center justify-center w-14 h-14 roun
614ded-full bg-primary/10 mb-4",children:i.jsx(Ym,{className:"w-7 h-7 text-primary"})}),i.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold text-foreground",children:"Academy Etiquette & Equipment"}),i.jsx("p",{className:"mt-3 text-muted-foreground max-w-2xl mx-auto",children:"Safety protocols, conduct expectations, and equipment requirements for all BladeFit Academy participants."})]})}),i.jsxs("div",{className:"container mx-auto px-4 lg:px-8 py-12 max-w-3xl",children:[i.jsxs("section",{className:"mb-12",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold text-foreground mb-6 border-b border-border pb-3",children:"Etiquette & Safety"}),i.jsxs("div",{className:"space-y-4 text-sm leading-relaxed text-muted-foreground",children:[i.jsx("p",{children:"BladeFit Academy is committed to creating a safe and respectful training environment for all participants. The following guidelines apply to all classes, open sparring sessions, and events."}),i.jsx("h3",{className:"font-heading text-lg font-semibold text-foreground pt-2",children:"General Conduct"}),i.jsxs("ul",{className:"space-y-2 ml-4",children:[i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1.5 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsx("span",{children:"Treat all participants, instructors, and visitors with respect at all times."})]}),i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1.5 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsx("span",{children:"Follow all instructor directions promptly."})]}),i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1.5 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsx("span",{children:"Maintain control of your weapon at all times â prioritize safety over winning."})]}),i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1.5 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsx("span",{children:"Acknowledge clean hits from your sparring partner â good sportsmanship is expected."})]})]}),i.jsx("h3",{className:"font-heading text-lg font-semibold text-foreground pt-2",children:"Halts & Safety Calls"}),i.jsxs("ul",{className:"space-y-2 ml-4",children:[i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1.5 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsx("span",{children:'When "HALT" is called, all activity must stop immediately.'})]}),i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1.5 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsx("span",{children:"If equipment fails or becomes unsafe during sparring, call a halt immediately."})]}),i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1.5 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsx("span",{children:"Report any injuries to an instructor right away, no matter how minor."})]})]}),i.jsx("h3",{className:"font-heading text-lg font-semibold text-foreground pt-2",children:"Sparring Rules"}),i.jsxs("ul",{className:"space-y-2 ml-4",children:[i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1.5 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsx("span",{children:"Always wear required protective equipment for the weapon type being used."})]}),i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1.5 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsx("span",{children:"Match your intensity to your partner's skill level â controlled sparring only."})]}),i.jsxs("li",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"mt-1.5 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),i.jsx("span",{children:"No strikes to the back of the head, spine, or groin unless explicitly permitted by the instructor for a specific drill."})]})]})]})]}),i.jsxs("section",{className:"mb-12",children:[i.jsx("h2",{className:"font-heading text-2xl font-bold text-foreground mb-6 border-b border-border pb-3",children:"Equipment Requirements"}),i.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Equipment requirements vary by weapon type. Below are the minimum requirements for each category. All equipment must be in good condition and approved by an instructor."}),i.jsxs("div",{className:"mb-6 rounded-lg border border-border bg-card p-5",children:[i.jsx("h3",{className:"font-heading text-base font-semibold text-foreground mb-3",children:"Foam Weapons"}),i.jsxs("ul",{className:"space-y-1.5 text-sm text-muted-foreground",children:[i.jsx("li",{children:"⢠Light gloves (recommended)"}),i.jsx("li",{children:"⢠Athletic cup (recommended)"}),i.jsx("li",{children:"⢠Closed-toe athletic shoes"})]})]}),i.jsxs("div",{className:"mb-6 rounded-lg border border-border bg-card p-5",children:[i.jsx("h3",{className:"font-heading text-base font-semibold text-foreground mb-3",children:"Synthetic Weapons"}),i.jsxs("ul",{className:"space-y-1.5 text-sm text-muted-foreground",children:[i.jsx("li",{children:"⢠Fencing mask (minimum 350N)"}),i.jsx("li",{children:"⢠Padded gloves (lacrosse, hockey, or HEMA specific)"}),i.jsx("li",{children:"⢠Gorget (throat protection)"}),i.jsx("li",{children:"⢠Athletic cup (required)"}),i.jsx("li",{children:"⢠Closed-toe athletic shoes"}),i.jsx("li",{children:"⢠Elbow and knee protection (recommended)"})]})]}),i.jsxs("div",{className:"rounded-lg border border-border bg-card p-5",children:[i.jsx("h3",{className:"font-heading text-base font-semibold text-foreground mb-3",children:"Steel Weapons"}),i.jsxs("ul",{className:"space-y-1.5 text-sm text-muted-foreground",children:[i.jsx("li",{children:"⢠Fencing mask (minimum 350N, 1600N bib preferred)"}),i.jsx("li",{children:"⢠HEMA-rated padded gloves"}),i.jsx("li",{children:"⢠Gorget (throat protection)"}),i.jsx("li",{children:"⢠Padded jacket or gambeson"}),i.jsx("li",{children:"⢠Athletic cup (required)"}),i.jsx("li",{children:"⢠Chest protector (required for women)"}),i.jsx("li",{children:"⢠Elbow and knee protection (required)"}),i.jsx("li",{children:"⢠Shin guards (recommended)"}),i.jsx("li",{children:"⢠Closed-toe athletic shoes"})]})]})]}),i.jsx("div",{className:"rounded-lg border border-border bg-card p-6 text-center",children:i.jsxs("p",{className:"text-sm text-muted-foreground",children:["Need gear? Check out our"," ",i.jsx("a",{href:"/gear",className:"text-primary hover:underline",children:"Student Gear"})," ","page for recommended equipment and vendors. Questions? Contact"," ",i.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"}),"."]})})]})]})]})}const gc={date:"Wednesday, September 30, 2026",time:"5:30 â 7:00 PM",location:"Trinity Academy",participants:"Trinity Academy Romeo and Juliet cast",price:"Covered by Trinity Academy"};function WQ(){return i.jsxs(i.Fragment,{children:[i.jsx($e,{path:"/trinity-romeo-and-juliet",title:"Romeo and Juliet Stage Choreography | Trinity Academy",description:"Private class information for Trinity Academy's Romeo and Juliet stage choreography class with BladeFit Academy.",noindex:!0}),i.jsxs("section",{className:"relative min-h-[70vh] overflow-hidden bg-foreground",children:[i.jsx("img",{src:Bb,alt:"BladeFit Academy students practicing partner choreography",className:"absolute inset-0 h-full w-full object-cover opacity-55"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-foreground
614/50 via-foreground/60 to-foreground/95"}),i.jsx("div",{className:"container relative mx-auto flex min-h-[70vh] items-end px-4 pb-14 pt-24 lg:px-8 lg:pb-20",children:i.jsxs("div",{className:"max-w-3xl",children:[i.jsx("p",{className:"mb-4 text-sm font-semibold uppercase tracking-widest text-primary",children:"Trinity Academy à BladeFit Academy"}),i.jsx("h1",{className:"font-heading text-4xl font-bold leading-tight text-primary-foreground sm:text-5xl md:text-6xl",children:"Romeo and Juliet Stage Choreography"}),i.jsx("p",{className:"mt-5 max-w-2xl text-lg leading-relaxed text-primary-foreground/85 sm:text-xl",children:"A special class preparing Trinity Academy performers for confident, controlled, and story-driven stage choreography."})]})})]}),i.jsx("section",{className:"border-b border-border bg-card py-10",children:i.jsxs("div",{className:"container mx-auto grid gap-6 px-4 sm:grid-cols-2 lg:grid-cols-4 lg:px-8",children:[i.jsx(qu,{icon:Bn,label:"Date & time",value:`${gc.date} · ${gc.time}`}),i.jsx(qu,{icon:Ol,label:"Location",value:gc.location}),i.jsx(qu,{icon:ef,label:"For",value:gc.participants}),i.jsx(qu,{icon:Sa,label:"Cost",value:gc.price})]})}),i.jsx("section",{className:"py-16 sm:py-20",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsxs("div",{className:"max-w-3xl",children:[i.jsx("p",{className:"mb-3 text-sm font-semibold uppercase tracking-widest text-primary",children:"For the production"}),i.jsx("h2",{className:"font-heading text-3xl font-semibold sm:text-4xl",children:"Movement that serves the scene"}),i.jsxs("p",{className:"mt-5 text-lg leading-relaxed text-muted-foreground",children:["Participants will work with BladeFit Academy instructors on safe partner movement, clear physical storytelling, and repeatable choreography for Trinity Academyâs production of ",i.jsx("em",{children:"Romeo and Juliet"}),"."]}),i.jsxs("div",{className:"mt-8 grid gap-6 sm:grid-cols-2",children:[i.jsxs("div",{className:"border-l-2 border-primary pl-5",children:[i.jsx("h3",{className:"font-heading text-lg font-semibold",children:"What to bring"}),i.jsx("p",{className:"mt-2 text-sm leading-relaxed text-muted-foreground",children:"Comfortable clothes, a water bottle, and any production notes requested by your director."})]}),i.jsxs("div",{className:"border-l-2 border-primary pl-5",children:[i.jsx("h3",{className:"font-heading text-lg font-semibold",children:"Required footwear"}),i.jsx("p",{className:"mt-2 text-sm leading-relaxed text-muted-foreground",children:"Indoor athletic shoes are required. Bare feet are not permitted for any participant."})]})]})]})})}),i.jsx("section",{className:"border-t border-border bg-card py-10 sm:py-12","aria-label":"GymDesk",children:i.jsx("div",{className:"container mx-auto px-4 lg:px-8",children:i.jsx("div",{className:"mx-auto max-w-3xl bg-background p-5 sm:p-8",children:i.jsx(Sb,{gymId:"A1mKL"})})})})]})}function qu({icon:e,label:t,value:r}){return i.jsxs("div",{className:"flex gap-3",children:[i.jsx(e,{className:"mt-0.5 h-5 w-5 shrink-0 text-primary","aria-hidden":"true"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:t}),i.jsx("p",{className:"mt-1 font-medium text-foreground",children:r})]})]})}const qQ=new S$,GQ=()=>i.jsx(A$,{client:qQ,children:i.jsxs(i$,{children:[i.jsx(VL,{}),i.jsx(w5,{}),i.jsx($F,{children:i.jsxs(L7,{children:[i.jsx(bQ,{}),i.jsx(KF,{children:i.jsxs(EF,{children:[i.jsx(ve,{path:"/",element:i.jsx(QH,{})}),i.jsx(ve,{path:"/auth",element:i.jsx(oY,{})}),i.jsx(ve,{path:"/auth/reset",element:i.jsx(lY,{})}),i.jsx(ve,{path:"/dashboard",element:i.jsx(fg,{children:i.jsx(PJ,{})})}),i.jsxs(ve,{path:"/admin",element:i.jsx(fg,{requireStaff:!0,children:i.jsx(FJ,{})}),children:[i.jsx(ve,{index:!0,element:i.jsx(VJ,{})}),i.jsx(ve,{path:"members",element:i.jsx(YJ,{})}),i.jsx(ve,{path:"billing",element:i.jsx(eQ,{})}),i.jsx(ve,{path:"marketing",element:i.jsx(rQ,{})}),i.jsx(ve,{path:"website",element:i.jsx(sQ,{})}),i.jsx(ve,{path:"sales",element:i.jsx(aQ,{})}),i.jsx(ve,{path:"gym",element:i.jsx(pQ,{})}),i.jsx(ve,{path:"front-desk",element:i.jsx(yQ,{})}),i.jsx(ve,{path:"settings",element:i.jsx(wQ,{})})]}),i.jsx(ve,{path:"/admin/member/:id",element:i.jsx(fg,{requireStaff:!0,children:i.jsx(LJ,{})})}),i.jsx(ve,{path:"/programs/youth",element:i.jsx(fz,{})}),i.jsx(ve,{path:"/programs/adult",element:i.jsx(yz,{})}
614),i.jsx(ve,{path:"/classes/:slug",element:i.jsx(Rz,{})}),i.jsx(ve,{path:"/classes/:slug/signup",element:i.jsx(tG,{})}),i.jsx(ve,{path:"/schedule",element:i.jsx(nG,{})}),i.jsx(ve,{path:"/events",element:i.jsx(kK,{})}),i.jsx(ve,{path:"/events/battle-of-the-blades",element:i.jsx(SK,{})}),i.jsx(ve,{path:"/memberships",element:i.jsx(_K,{})}),i.jsx(ve,{path:"/trial",element:i.jsx(iG,{})}),i.jsx(ve,{path:"/gear",element:i.jsx(oG,{})}),i.jsx(ve,{path:"/gear/class/:classSlug",element:i.jsx(cG,{})}),i.jsx(ve,{path:"/gear/:category",element:i.jsx(lG,{})}),i.jsx(ve,{path:"/faq",element:i.jsx(TG,{})}),i.jsx(ve,{path:"/contact",element:i.jsx(lK,{})}),i.jsx(ve,{path:"/coaches",element:i.jsx(HK,{})}),i.jsx(ve,{path:"/policies/adult",element:i.jsx(UQ,{})}),i.jsx(ve,{path:"/policies/youth",element:i.jsx(VQ,{})}),i.jsx(ve,{path:"/policies/payment",element:i.jsx(HQ,{})}),i.jsx(ve,{path:"/policies/etiquette",element:i.jsx(zQ,{})}),i.jsx(ve,{path:"/fantasy",element:i.jsx(NQ,{})}),i.jsx(ve,{path:"/history",element:i.jsx(TQ,{})}),i.jsx(ve,{path:"/community",element:i.jsx(PQ,{})}),i.jsx(ve,{path:"/anime",element:i.jsx(DQ,{})}),i.jsx(ve,{path:"/renfaire",element:i.jsx(LQ,{})}),i.jsx(ve,{path:"/wellhub",element:i.jsx(BQ,{})}),i.jsx(ve,{path:"/trinity-romeo-and-juliet",element:i.jsx(WQ,{})}),Object.entries(HH).map(([e,t])=>i.jsx(ve,{path:e,element:i.jsx(qy,{to:t,replace:!0})},e)),i.jsx(ve,{path:"*",element:i.jsx(zK,{})})]})})]})})]})});kC(document.getElementById("root")).render(i.jsx(EC,{children:i.jsx(GQ,{})}));
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.