1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/reserve-the-lounge-m112wWJo.js","assets/reserve-the-lounge-DAcYGugU.js","assets/page-backdrop-DcUmfeE6.js","assets/golf-sim-bay.png.asset-aDE7ZJCB.js","assets/useServerFn-B1wyxN8L.js","assets/phone-ShGIEXPz.js","assets/send-BruWNb6J.js","assets/lock-ByhksmyA.js","assets/trending-up-D2ZlFqyf.js","assets/users-round-DZprC8iZ.js","assets/gift-fgvijthW.js","assets/tv-CAJSeg-G.js","assets/users-JgajWn59.js","assets/house-DDj96xhS.js","assets/sparkles-B81-4fmS.js","assets/check-BqTjn3zF.js","assets/star-CSfJ6CG4.js","assets/calendar-days-d2nPjLZ5.js","assets/reserve-the-lounge-mjSzJYSI.js","assets/reserve-the-lounge-BwZgqj1z.js","assets/private-events-COT5zmd2.js","assets/calendar-DvT99iN7.js","assets/membership-BqHf7VtG.js","assets/crown-ToUuRGjk.js","assets/humidor-Bnm5lvvd.js","assets/humidor-900-D9ItoxIV.js","assets/arrow-right-DYixT846.js","assets/home-preview-Cm2HeqXs.js","assets/homepage-content-C0qcVk3-.js","assets/useQuery-DmMfJTcD.js","assets/flag-CvjpWkKQ.js","assets/clock-0kJwWkgq.js","assets/trophy-Bb67W6iW.js","assets/gallery-ei0hQdTy.js","assets/event-manager-JLhTPrM-.js","assets/useMutation-B7GQPmk5.js","assets/contact-CPBBj0_T.js","assets/cigar-lounge-charleston-sc-CDJS0OY8.js","assets/auth-llbO54wl.js","assets/use-auth-T_6qsAw_.js","assets/route-BEnLeaPn.js","assets/useLocation-BrbIy8vR.js","assets/log-out-DfqII8hz.js","assets/wallet-E6qsSzlK.js","assets/route-DKh3iXpa.js","assets/features-DbQ7lF8W.js","assets/auth-middleware-MvTklB25.js","assets/button-DZqBpuFJ.js","assets/index-DQWrthb_.js","assets/input-BekG7t1z.js","assets/index-BCogFOpB.js","assets/index-CkeF6rDt.js","assets/scan-line-DixOHC88.js","assets/ticket-DLGX9ev_.js","assets/qr-code-BoqnSWVV.js","assets/gauge-BM0UiCzW.js","assets/shield-check-OlyVzMrV.js","assets/admin.functions-ds-lY2GL.js","assets/index-BY1vGnV3.js","assets/circle-check-Mtas-ONr.js","assets/loader-circle-ktUqzD0D.js","assets/time-CZYeOens.js","assets/index-xH6w9v1P.js","assets/public.functions-DNCfiw2-.js","assets/events.index-M5xF3-Ng.js","assets/format-DDEOghfb.js","assets/event-month-calendar-Ud0WlJvR.js","assets/calendar-Cc5kiDyL.js","assets/rsvp._token-DayvougY.js","assets/public.functions-CvK0bdVG.js","assets/quote._token-CCI6bKRq.js","assets/config-Pbh0jDRc.js","assets/organizer._token-b_A-lMd9.js","assets/guest-config-DVFwILVW.js","assets/orders._orderNumber-CCTJnTqm.js","assets/browser-DYTSS2mj.js","assets/join._slug-RAFBBkqV.js","assets/manage-booking-C8zg6WRU.js","assets/booking-confirmation-BrBi91kv.js","assets/legacy-golf-liability.pdf.asset-D151JGwv.js","assets/book-BeQBIvKX.js","assets/CloverCardForm-BKS0D2S9.js","assets/events.past-DKtjX0sj.js","assets/events._slug-CFE0rT-S.js","assets/dialog-BbyzQDE1.js","assets/external-link-G-kLQu67.js","assets/index-Ha1MXagV.js","assets/portal.functions-Bzz78UmL.js","assets/staff.functions-BY4VxF_9.js","assets/membership-BokUWW1F.js","assets/types-HPyf_xxg.js","assets/tier-benefits-3ri8nirO.js","assets/key-round-xE4y0x3p.js","assets/card-QAGtqUXw.js","assets/benefits-Bj5RJSN7.js","assets/account-CoatU0ck.js","assets/index-CcEOYy7R.js","assets/admin.functions-o1cLaZ9w.js","assets/admin.functions-B3pLSv7r.js","assets/admin.functions-YsZcqql_.js","assets/venue-BpPO0IIG.js","assets/admin.functions-B8J68Qql.js","assets/utm-builder-G-p3GzH2.js","assets/index-CpI70tpq.js","assets/copy-DOR5CvII.js","assets/team-DfleapUU.js","assets/user-plus-D6mCY3BJ.js","assets/trash-2-CZXh5JM3.js","assets/tapmango-Ddz855_0.js","assets/submissions-Fa0Zt_UJ.js","assets/rsvps-GH87K-s6.js","assets/reservations-zJ6QyLes.js","assets/performance-CJY75gHe.js","assets/monitoring-DWgxdl0U.js","assets/loyalty-api-D4mHUiR0.js","assets/login-rinA2QD9.js","assets/insights-DnkRB24u.js","assets/health-NjNxkvYg.js","assets/analytics-CRA1nGZ6.js","assets/download-B8_V3W42.js","assets/events._slug_.checkout-Bb62B3SJ.js","assets/sales.index-DJ0AY6GW.js","assets/quotes.functions-DmQIO0XQ.js","assets/ui-VYQDHzCW.js","assets/partners.index-cInwSOBq.js","assets/ui-BENAqS95.js","assets/group-form-CTCYHnAc.js","assets/label-BPqtpQTu.js","assets/members.index-CwJjcPAY.js","assets/qualification.functions-DByHU2-D.js","assets/events.index-qzl3NcGP.js","assets/recurrence-BMkZMHiP.js","assets/bookings.index-Djn3Huex.js","assets/sales.setup-CQxMgI81.js","assets/catalog.functions-D3ub-cRU.js","assets/sales.customers-CFlSia_4.js","assets/sales.check-in-Bq99HE51.js","assets/guests.functions-CjBVF2CM.js","assets/sales.calendar-D6FEKUo1.js","assets/sales.analytics-B9Ye5Sj5.js","assets/partners._id-LEhspfH2.js","assets/members.spend-y0f3X0_e.js","assets/members.scan-DwH6St1M.js","assets/BrowserQRCodeReader-v1P2Iw_s.js","assets/members._id-Du1B_Pd9.js","assets/events.new-Drj5Bw9h.js","assets/EventForm-CB4td-AA.js","assets/events.check-in-l1hT
vendor: 4,414 bytes, lines 1-2
1Uyq4.js","assets/events._id-CHD3ul7Y.js","assets/clover-sale-badge-CLSQkt_I.js","assets/bookings.golf-nFaAI8mk.js","assets/sales.quotes.index-B8bApuZ7.js","assets/sales.quotes.new-0izKs6WZ.js","assets/quote-form-BPdyi6Bo.js","assets/sales.quotes._id-BymXJFEj.js","assets/bookings.golf.index-CxKqHcnT.js","assets/booking-danger-actions-BgcDE0t5.js","assets/bookings.golf.settings-YdIb3g_Q.js","assets/bookings.golf.diagnostics-CHyxs9Ii.js","assets/bookings.golf.customers-fIadVa0I.js","assets/bookings.golf.calendar-DQXV_h0V.js","assets/sales.quotes._id_.guests-CuSXDwNC.js"])))=>i.map(i=>d[i]); 2function IR(t,e){for(var n=0;n<e.length;n++){const a=e[n];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in t)){const l=Object.getOwnPropertyDescriptor(a,o);l&&Object.defineProperty(t,o,l.get?l:{enumerable:!0,get:()=>a[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var i$=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Df={exports:{}},fo={};var ov;function UR(){if(ov)return fo;ov=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(a,o,l){var u=null;if(l!==void 0&&(u=""+l),o.key!==void 0&&(u=""+o.key),"key"in o){l={};for(var d in o)d!=="key"&&(l[d]=o[d])}else l=o;return o=l.ref,{$$typeof:t,type:a,key:u,ref:o!==void 0?o:null,props:l}}return fo.Fragment=e,fo.jsx=n,fo.jsxs=n,fo}var lv;function $R(){return lv||(lv=1,Df.exports=UR()),Df.exports}var D=$R(),If={exports:{}},we={};var cv;function zR(){if(cv)return we;cv=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function _(x){return x===null||typeof x!="object"?null:(x=b&&x[b]||x["@@iterator"],typeof x=="function"?x:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,E={};function T(x,H,Q){this.props=x,this.context=H,this.refs=E,this.updater=Q||S}T.prototype.isReactComponent={},T.prototype.setState=function(x,H){if(typeof x!="object"&&typeof x!="function"&&x!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,x,H,"setState")},T.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function C(){}C.prototype=T.prototype;function k(x,H,Q){this.props=x,this.context=H,this.refs=E,this.updater=Q||S}var N=k.prototype=new C;N.constructor=k,R(N,T.prototype),N.isPureReactComponent=!0;var F=Array.isArray;function V(){}var z={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function K(x,H,Q){var re=Q.ref;return{$$typeof:t,type:x,key:H,ref:re!==void 0?re:null,props:Q}}function fe(x,H){return K(x.type,H,x.props)}function ie(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}function Te(x){var H={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(Q){return H[Q]})}var $e=/\/+/g;function tt(x,H){return typeof x=="object"&&x!==null&&x.key!=null?Te(""+x.key):H.toString(36)}function ze(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(V,V):(x.status="pending",x.then(function(H){x.status==="pending"&&(x.status="fulfilled",x.value=H)},function(H){x.status==="pending"&&(x.status="rejected",x.reason=H)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function U(x,H,Q,re,se){var ge=typeof x;(ge==="undefined"||ge==="boolean")&&(x=null);var xe=!1;if(x===null)xe=!0;else switch(ge){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(x.$$typeof){case t:case e:xe=!0;break;case g:return xe=x._init,U(xe(x._payload),H,Q,re,se)}}if(xe)return se=se(x),xe=re===""?"."+tt(x,0):re,F(se)?(Q="",xe!=null&&(Q=xe.replace($e,"$&/")+"/"),U(se,H,Q,"",function(pn){return pn})):se!=null&&(ie(se)&&(se=fe(se,Q+(se.key==null||x&&x.key===se.ke
vendor: 5,565 bytes, line 2
2y?"":(""+se.key).replace($e,"$&/")+"/")+xe)),H.push(se)),1;xe=0;var st=re===""?".":re+":";if(F(x))for(var _e=0;_e<x.length;_e++)re=x[_e],ge=st+tt(re,_e),xe+=U(re,H,Q,ge,se);else if(_e=_(x),typeof _e=="function")for(x=_e.call(x),_e=0;!(re=x.next()).done;)re=re.value,ge=st+tt(re,_e++),xe+=U(re,H,Q,ge,se);else if(ge==="object"){if(typeof x.then=="function")return U(ze(x),H,Q,re,se);throw H=String(x),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return xe}function Z(x,H,Q){if(x==null)return x;var re=[],se=0;return U(x,re,"","",function(ge){return H.call(Q,ge,se++)}),re}function me(x){if(x._status===-1){var H=x._result;H=H(),H.then(function(Q){(x._status===0||x._status===-1)&&(x._status=1,x._result=Q)},function(Q){(x._status===0||x._status===-1)&&(x._status=2,x._result=Q)}),x._status===-1&&(x._status=0,x._result=H)}if(x._status===1)return x._result.default;throw x._result}var Me=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},ee={map:Z,forEach:function(x,H,Q){Z(x,function(){H.apply(this,arguments)},Q)},count:function(x){var H=0;return Z(x,function(){H++}),H},toArray:function(x){return Z(x,function(H){return H})||[]},only:function(x){if(!ie(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return we.Activity=y,we.Children=ee,we.Component=T,we.Fragment=n,we.Profiler=o,we.PureComponent=k,we.StrictMode=a,we.Suspense=h,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,we.__COMPILER_RUNTIME={__proto__:null,c:function(x){return z.H.useMemoCache(x)}},we.cache=function(x){return function(){return x.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(x,H,Q){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var re=R({},x.props),se=x.key;if(H!=null)for(ge in H.key!==void 0&&(se=""+H.key),H)!M.call(H,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&H.ref===void 0||(re[ge]=H[ge]);var ge=arguments.length-2;if(ge===1)re.children=Q;else if(1<ge){for(var xe=Array(ge),st=0;st<ge;st++)xe[st]=arguments[st+2];re.children=xe}return K(x.type,se,re)},we.createContext=function(x){return x={$$typeof:u,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:l,_context:x},x},we.createElement=function(x,H,Q){var re,se={},ge=null;if(H!=null)for(re in H.key!==void 0&&(ge=""+H.key),H)M.call(H,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(se[re]=H[re]);var xe=arguments.length-2;if(xe===1)se.children=Q;else if(1<xe){for(var st=Array(xe),_e=0;_e<xe;_e++)st[_e]=arguments[_e+2];se.children=st}if(x&&x.defaultProps)for(re in xe=x.defaultProps,xe)se[re]===void 0&&(se[re]=xe[re]);return K(x,ge,se)},we.createRef=function(){return{current:null}},we.forwardRef=function(x){return{$$typeof:d,render:x}},we.isValidElement=ie,we.lazy=function(x){return{$$typeof:g,_payload:{_status:-1,_result:x},_init:me}},we.memo=function(x,H){return{$$typeof:m,type:x,compare:H===void 0?null:H}},we.startTransition=function(x){var H=z.T,Q={};z.T=Q;try{var re=x(),se=z.S;se!==null&&se(Q,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(V,Me)}catch(ge){Me(ge)}finally{H!==null&&Q.types!==null&&(H.types=Q.types),z.T=H}},we.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},we.use=function(x){return z.H.use(x)},we.useActionState=function(x,H,Q){return z.H.useActionState(x,H,Q)},we.useCallback=function(x,H){return z.H.useCallback(x,H)},we.useContext=function(x){return z.H.useContext(x)},we.useDebugValue=function(){},we.useDeferredValue=function(x,H){return z.H.useDeferredValue(x,H)},we.useEffect=function(x,H){return z.H.useEffect(x,H)},we.useEffectEvent=function(x){return z.H.useEffectEvent(x)},we.useId=function(){return z.H.useId()},we.useImperativeHandle=function(x,H,Q){return z.H.useImperativeHandle(x,H,Q)},we.useInsertionEffect=function(x,H){return z.H.useInsertionEffect(x,H)},we.useLayoutEffect=function(x,H){return z.H.useLayoutEffect(x,H)},we.useMemo=function(x,H){return z.H.useMemo(x,H)},we.useOptimistic=function(x,H){return z.H.useOptimistic(x,H)},we.useReducer=function(x,H,Q){return z.H.useReducer(x,H,Q)},we.useRef=function(x){return z.H.useRef(x)},we.useState=function(x){return z.H.useState(x)},we.useSyncExternalStore=function(x,H,Q){return z.H.useSyncExternalStore(x,H,Q)},we.useTransition=function(){return z.H.useTransition()},we.version="19.2.5",we}var uv;function Yo(){return uv||(uv=1,If.exports=zR()),If.exports}var Y=Yo();const ai=$0(Y),o$=IR({__proto__:null,default:ai},[Y]);var Uf={exports:{}},ho={},$f={exports:{}},zf={};var dv;function BR(){return dv||(dv=1,(function(t){function e(U,Z){var me=U.length;U.push(Z);e:for(;0<me;){var Me=me-1>>>1,ee=U[Me];if(0<o(ee,Z))U[Me]=Z,U[me]=ee,me=Me;else break e}}function n(U){return U.length===0?null:U[0]}function a(U){if(U.length===0)return null;var Z=U[0],me=U.pop();if(me!==Z){U[0]=me;e:for(var Me=0,ee=U.length,x=ee>>>1;Me<x;){var H=2*(Me+1)-1,Q=U[H],re=H+1,se=U[re];if(0>o(Q,me))re<ee&&0>
vendor: 8,362 bytes, line 2
2o(se,Q)?(U[Me]=se,U[re]=me,Me=re):(U[Me]=Q,U[H]=me,Me=H);else if(re<ee&&0>o(se,me))U[Me]=se,U[re]=me,Me=re;else break e}}return Z}function o(U,Z){var me=U.sortIndex-Z.sortIndex;return me!==0?me:U.id-Z.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();t.unstable_now=function(){return u.now()-d}}var h=[],m=[],g=1,y=null,b=3,_=!1,S=!1,R=!1,E=!1,T=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function N(U){for(var Z=n(m);Z!==null;){if(Z.callback===null)a(m);else if(Z.startTime<=U)a(m),Z.sortIndex=Z.expirationTime,e(h,Z);else break;Z=n(m)}}function F(U){if(R=!1,N(U),!S)if(n(h)!==null)S=!0,V||(V=!0,Te());else{var Z=n(m);Z!==null&&ze(F,Z.startTime-U)}}var V=!1,z=-1,M=5,K=-1;function fe(){return E?!0:!(t.unstable_now()-K<M)}function ie(){if(E=!1,V){var U=t.unstable_now();K=U;var Z=!0;try{e:{S=!1,R&&(R=!1,C(z),z=-1),_=!0;var me=b;try{t:{for(N(U),y=n(h);y!==null&&!(y.expirationTime>U&&fe());){var Me=y.callback;if(typeof Me=="function"){y.callback=null,b=y.priorityLevel;var ee=Me(y.expirationTime<=U);if(U=t.unstable_now(),typeof ee=="function"){y.callback=ee,N(U),Z=!0;break t}y===n(h)&&a(h),N(U)}else a(h);y=n(h)}if(y!==null)Z=!0;else{var x=n(m);x!==null&&ze(F,x.startTime-U),Z=!1}}break e}finally{y=null,b=me,_=!1}Z=void 0}}finally{Z?Te():V=!1}}}var Te;if(typeof k=="function")Te=function(){k(ie)};else if(typeof MessageChannel<"u"){var $e=new MessageChannel,tt=$e.port2;$e.port1.onmessage=ie,Te=function(){tt.postMessage(null)}}else Te=function(){T(ie,0)};function ze(U,Z){z=T(function(){U(t.unstable_now())},Z)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(U){U.callback=null},t.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<U?Math.floor(1e3/U):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(U){switch(b){case 1:case 2:case 3:var Z=3;break;default:Z=b}var me=b;b=Z;try{return U()}finally{b=me}},t.unstable_requestPaint=function(){E=!0},t.unstable_runWithPriority=function(U,Z){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var me=b;b=U;try{return Z()}finally{b=me}},t.unstable_scheduleCallback=function(U,Z,me){var Me=t.unstable_now();switch(typeof me=="object"&&me!==null?(me=me.delay,me=typeof me=="number"&&0<me?Me+me:Me):me=Me,U){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=me+ee,U={id:g++,callback:Z,priorityLevel:U,startTime:me,expirationTime:ee,sortIndex:-1},me>Me?(U.sortIndex=me,e(m,U),n(h)===null&&U===n(m)&&(R?(C(z),z=-1):R=!0,ze(F,me-Me))):(U.sortIndex=ee,e(h,U),S||_||(S=!0,V||(V=!0,Te()))),U},t.unstable_shouldYield=fe,t.unstable_wrapCallback=function(U){var Z=b;return function(){var me=b;b=Z;try{return U.apply(this,arguments)}finally{b=me}}}})(zf)),zf}var fv;function qR(){return fv||(fv=1,$f.exports=BR()),$f.exports}var Bf={exports:{}},It={};var hv;function HR(){if(hv)return It;hv=1;var t=Yo();function e(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(h,m,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:h,containerInfo:m,implementation:g}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return It.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,It.createPortal=function(h,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(e(299));return l(h,m,null,g)},It.flushSync=function(h){var m=u.T,g=a.p;try{if(u.T=null,a.p=2,h)return h()}finally{u.T=m,a.p=g,a.d.f()}},It.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(h,m))},It.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},It.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var g=m.as,y=d(g,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,_=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?a.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:_}):g==="script"&&a.d.X(h,{crossOrigin:y,integrity:b,fetchPriority:_,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},It.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=d(m.as,m.crossOrigin);a.d.M(h,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(h)},It.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,y=d(g,m.crossOrigin);a.d.L(h,g,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},It.preloadModule=function(h,m){if(typeof h=="string")if(m){var g=d(m.as,m.crossOrigin);a.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(h)},It.requestFormReset=function(h){a.d.r(h)},It.unstable_batchedUpdates=function(h,m){return h(m)},It.useFormState=function(h,m,g){return u.H.useFormState(h,m,g)},It.useFormStatus=function(){return u.H.useHostTransitionStatus()},It.version="19.2.5",It}var pv;function z0(){if(pv)return Bf.exports;pv=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Bf.exports=HR(),Bf.exports}var mv;function VR(){if(mv)return ho;mv=1;var t=qR(),e=Yo(),n=z0();function a(r){var s="https://react.dev/errors/"+r;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)s+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var s=r,i=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(i=s.return),r=s.return;while(r)}return s.tag===3?i:null}function u(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function d(r){if(r.tag===31){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function h(r){if(l(r)!==r)throw Error(a(188))}function m(r){var s=r.alternate;if(!s){if(s=l(r),s===null)throw Error(a(188));return s!==r?null:r}for(var i=r,c=s;;){var f=i.return;if(f===null)break;var p=f.alternate;if(p===null){if(c=f.return,c!==null){i=c;continue}break}if(f.child===p.child){for(p=f.child;p;){if(p===i)return h(f),r;if(p===c)return h(f),s;p=p.sibling}throw Error(a(188))}if(i.return!==c.return)i=f,c=p;else{for(var v=!1,w=f.child;w;){if(w===i){v=!0,i=f,c=p;break}
vendor: 9,671 bytes, lines 2-9
2if(w===c){v=!0,c=f,i=p;break}w=w.sibling}if(!v){for(w=p.child;w;){if(w===i){v=!0,i=p,c=f;break}if(w===c){v=!0,c=p,i=f;break}w=w.sibling}if(!v)throw Error(a(189))}}if(i.alternate!==c)throw Error(a(190))}if(i.tag!==3)throw Error(a(188));return i.stateNode.current===i?r:s}function g(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r;for(r=r.child;r!==null;){if(s=g(r),s!==null)return s;r=r.sibling}return null}var y=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),k=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),fe=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function Te(r){return r===null||typeof r!="object"?null:(r=ie&&r[ie]||r["@@iterator"],typeof r=="function"?r:null)}var $e=Symbol.for("react.client.reference");function tt(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===$e?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case R:return"Fragment";case T:return"Profiler";case E:return"StrictMode";case F:return"Suspense";case V:return"SuspenseList";case K:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case S:return"Portal";case k:return r.displayName||"Context";case C:return(r._context.displayName||"Context")+".Consumer";case N:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case z:return s=r.displayName||null,s!==null?s:tt(r.type)||"Memo";case M:s=r._payload,r=r._init;try{return tt(r(s))}catch{}}return null}var ze=Array.isArray,U=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},Me=[],ee=-1;function x(r){return{current:r}}function H(r){0>ee||(r.current=Me[ee],Me[ee]=null,ee--)}function Q(r,s){ee++,Me[ee]=r.current,r.current=s}var re=x(null),se=x(null),ge=x(null),xe=x(null);function st(r,s){switch(Q(ge,s),Q(se,r),Q(re,null),s.nodeType){case 9:case 11:r=(r=s.documentElement)&&(r=r.namespaceURI)?Oy(r):0;break;default:if(r=s.tagName,s=s.namespaceURI)s=Oy(s),r=Ly(s,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}H(re),Q(re,r)}function _e(){H(re),H(se),H(ge)}function pn(r){r.memoizedState!==null&&Q(xe,r);var s=re.current,i=Ly(s,r.type);s!==i&&(Q(se,r),Q(re,i))}function Vt(r){se.current===r&&(H(re),H(se)),xe.current===r&&(H(xe),oo._currentValue=me)}var tn,Yn;function zt(r){if(tn===void 0)try{throw Error()}catch(i){var s=i.stack.trim().match(/\n( *(at )?)/);tn=s&&s[1]||"",Yn=-1<i.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+tn+r+Yn}var yi=!1;function ra(r,s){if(!r||yi)return"";yi=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(s){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch($){var I=$}Reflect.construct(r,[],G)}else{try{G.call()}catch($){I=$}r.call(G.prototype)}}else{try{throw Error()}catch($){I=$}(G=r())&&typeof G.catch=="function"&&G.catch(function(){})}}catch($){if($&&I&&typeof $.stack=="string")return[$.stack,I.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=c.DetermineComponentFrameRoot(),v=p[0],w=p[1];if(v&&w){var A=v.split(` 5`),P=w.split(` 6`);for(f=c=0;c<A.length&&!A[c].includes("DetermineComponentFrameRoot");)c++;for(;f<P.length&&!P[f].includes("DetermineComponentFrameRoot");)f++;if(c===A.length||f===P.length)for(c=A.length-1,f=P.length-1;1<=c&&0<=f&&A[c]!==P[f];)f--;for(;1<=c&&0<=f;c--,f--)if(A[c]!==P[f]){if(c!==1||f!==1)do if(c--,f--,0>f||A[c]!==P[f]){var B=` 7`+A[c].replace(" at new "," at ");return r.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",r.displayName)),B}while(1<=c&&0<=f);break}}}finally{yi=!1,Error.prepareStackTrace=i}return(i=r?r.displayName||r.name:"")?zt(i):""}function Wo(r,s){switch(r.tag){case 26:case 27:case 5:return zt(r.type);case 16:return zt("Lazy");case 13:return r.child!==s&&s!==null?zt("Suspense Fallback"):zt("Suspense");case 19:return zt("SuspenseList");case 0:case 15:return ra(r.type,!1);case 11:return ra(r.type.render,!1);case 1:return ra(r.type,!0);case 31:return zt("Activity");default:return""}}function Zn(r){try{var s="",i=null;do s+=Wo(r,i),i=r,r=r.return;while(r);return s}catch(c){return` 8Error generating stack: `+c.message+` 9`+c.stack}}var bs=Object.prototype.hasOwnProperty,Cn=t.unstable_scheduleCallback,vi=t.unstable_cancelCallback,el=t.unstable_shouldYield,Su=t.unstable_requestPaint,Dt=t.unstable_now,We=t.unstable_getCurrentPriorityLevel,Ot=t.unstable_ImmediatePriority,Dn=t.unstable_UserBlockingPriority,sa=t.unstable_NormalPriority,vS=t.unstable_LowPriority,up=t.unstable_IdlePriority,bS=t.log,_S=t.unstable_setDisableYieldValue,bi=null,nn=null;function Cr(r){if(typeof bS=="function"&&_S(r),nn&&typeof nn.setStrictMode=="function")try{nn.setStrictMode(bi,r)}catch{}}var rn=Math.clz32?Math.clz32:ES,wS=Math.log,SS=Math.LN2;function ES(r){return r>>>=0,r===0?32:31-(wS(r)/SS|0)|0}var tl=256,nl=262144,rl=4194304;function _s(r){var s=r&42;if(s!==0)return s;switch(r&-r){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function sl(r,s,i){var c=r.pendingLanes;if(c===0)return 0;var f=0,p=r.suspendedLanes,v=r.pingedLanes;r=r.warmLanes;var w=c&134217727;return w!==0?(c=w&~p,c!==0?f=_s(c):(v&=w,v!==0?f=_s(v):i||(i=w&~r,i!==0&&(f=_s(i))))):(w=c&~p,w!==0?f=_s(w):v!==0?f=_s(v):i||(i=c&~r,i!==0&&(f=_s(i)))),f===0?0:s!==0&&s!==f&&(s&p)===0&&(p=f&-f,i=s&-s,p>=i||p===32&&(i&4194048)!==0)?s:f}function _i(r,s){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&s)===0}function RS(r,s){switch(r){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32: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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dp(){var r=rl;return rl<<=1,(rl&62914560)===0&&(rl=4194304),r}function Eu(r){for(var s=[],i=0;31>i;i++)s.push(r);return s}function wi(r,s){r.pendingLanes|=s,s!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function TS(r,s,i,c,f,p){var v=r.pendingLanes;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=i,r.entangledLanes&=i,r.errorRecoveryDisabledLanes&=i,r.shellSuspendCounter=0;var w=r.entanglements,A=r.expirationTimes,P=r.hiddenUpdates;for(i=v&~i;0<i;){var B=31-rn(i),G=1<<B;w[B]=0,A[B]=-1;var I=P[B];if(I!==null)for(P[B]=null,B=0;B<I.length;B++){var $=I[B];$!==null&&($.lane&=-536870913)}i&=~G}c!==0&&fp(r,c,0),p!==0&&f===0&&r.tag!==0&&(r.suspendedLanes|=p&~(v&~s))}function fp(r,s,i){r.pendingLanes|=s,r.suspendedLanes&=~s;var c=31-rn(s);r.entangledLanes|=s,r.entanglements[c]=r.entanglements[c]|1073741824|i&261930}function hp(r,s){var i=r.entangledLanes|=s;for(r=r.entanglements;i;){var c=31-rn(i),f=1<<c;f&s|r[c]&s&&(r[c]|=s),i&=~f}}function pp(r,s){var i=s&-s;return i=(i&42)!==0?1:Ru(i),(i&(r.suspendedLanes|s))!==0?0:i}function Ru(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function Tu(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function mp(){var r=Z.p;return r!==0?r:(r=window.event,r===void 0?32:ev(r.type))}function gp(r,s){var i=Z.p;try{return Z.p=r,s()}finally{Z.p=i}}var xr=Math.random().toString(36).slice(2),Lt="__reactFiber$"+xr,Gt="__reactProps$"+xr,aa="__reactContainer$"+xr,Au="__reactEvents$"+xr,AS="__reactListeners$"+xr,CS="__reactHandles$"+xr,yp="__reactResources$"+xr,Si="__reactMarker$"+xr;function Cu(r){delete r[Lt],delete r[Gt],delete r[Au],delete r[AS],delete r[CS]}function ia(r){var s=r[Lt];if(s)return s;for(var i=r.parentNode;i;){if(s=i[aa]||i[Lt]){if(i=s.alternate,s.child!==null||i!==null&&i.child!==null)for(r=Uy(r);r!==null;){if(i=r[Lt])return i;r=Uy(r)}return s}r=i,i=r.parentNode}return null}function oa(r){if(r=r[Lt]||r[aa]){var s=r.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return r}return null}function Ei(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r.stateNode;throw Error(a(33))}function la(r){var s=r[yp];
vendor: 7,068 bytes, line 9
9return s||(s=r[yp]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Rt(r){r[Si]=!0}var vp=new Set,bp={};function ws(r,s){ca(r,s),ca(r+"Capture",s)}function ca(r,s){for(bp[r]=s,r=0;r<s.length;r++)vp.add(s[r])}var xS=RegExp("^[: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]*$"),_p={},wp={};function kS(r){return bs.call(wp,r)?!0:bs.call(_p,r)?!1:xS.test(r)?wp[r]=!0:(_p[r]=!0,!1)}function al(r,s,i){if(kS(s))if(i===null)r.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":r.removeAttribute(s);return;case"boolean":var c=s.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){r.removeAttribute(s);return}}r.setAttribute(s,""+i)}}function il(r,s,i){if(i===null)r.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttribute(s,""+i)}}function Jn(r,s,i,c){if(c===null)r.removeAttribute(i);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttributeNS(s,i,""+c)}}function mn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Sp(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function OS(r,s,i){var c=Object.getOwnPropertyDescriptor(r.constructor.prototype,s);if(!r.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var f=c.get,p=c.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return f.call(this)},set:function(v){i=""+v,p.call(this,v)}}),Object.defineProperty(r,s,{enumerable:c.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function xu(r){if(!r._valueTracker){var s=Sp(r)?"checked":"value";r._valueTracker=OS(r,s,""+r[s])}}function Ep(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var i=s.getValue(),c="";return r&&(c=Sp(r)?r.checked?"true":"false":r.value),r=c,r!==i?(s.setValue(r),!0):!1}function ol(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var LS=/[\n"\\]/g;function gn(r){return r.replace(LS,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function ku(r,s,i,c,f,p,v,w){r.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?r.type=v:r.removeAttribute("type"),s!=null?v==="number"?(s===0&&r.value===""||r.value!=s)&&(r.value=""+mn(s)):r.value!==""+mn(s)&&(r.value=""+mn(s)):v!=="submit"&&v!=="reset"||r.removeAttribute("value"),s!=null?Ou(r,v,mn(s)):i!=null?Ou(r,v,mn(i)):c!=null&&r.removeAttribute("value"),f==null&&p!=null&&(r.defaultChecked=!!p),f!=null&&(r.checked=f&&typeof f!="function"&&typeof f!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?r.name=""+mn(w):r.removeAttribute("name")}function Rp(r,s,i,c,f,p,v,w){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(r.type=p),s!=null||i!=null){if(!(p!=="submit"&&p!=="reset"||s!=null)){xu(r);return}i=i!=null?""+mn(i):"",s=s!=null?""+mn(s):i,w||s===r.value||(r.value=s),r.defaultValue=s}c=c??f,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=w?r.checked:!!c,r.defaultChecked=!!c,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.name=v),xu(r)}function Ou(r,s,i){s==="number"&&ol(r.ownerDocument)===r||r.defaultValue===""+i||(r.defaultValue=""+i)}function ua(r,s,i,c){if(r=r.options,s){s={};for(var f=0;f<i.length;f++)s["$"+i[f]]=!0;for(i=0;i<r.length;i++)f=s.hasOwnProperty("$"+r[i].value),r[i].selected!==f&&(r[i].selected=f),f&&c&&(r[i].defaultSelected=!0)}else{for(i=""+mn(i),s=null,f=0;f<r.length;f++){if(r[f].value===i){r[f].selected=!0,c&&(r[f].defaultSelected=!0);return}s!==null||r[f].disabled||(s=r[f])}s!==null&&(s.selected=!0)}}function Tp(r,s,i){if(s!=null&&(s=""+mn(s),s!==r.value&&(r.value=s),i==null)){r.defaultValue!==s&&(r.defaultValue=s);return}r.defaultValue=i!=null?""+mn(i):""}function Ap(r,s,i,c){if(s==null){if(c!=null){if(i!=null)throw Error(a(92));if(ze(c)){if(1<c.length)throw Error(a(93));c=c[0]}i=c}i==null&&(i=""),s=i}i=mn(s),r.defaultValue=i,c=r.textContent,c===i&&c!==""&&c!==null&&(r.value=c),xu(r)}function da(r,s){if(s){var i=r.firstChild;if(i&&i===r.lastChild&&i.nodeType===3){i.nodeValue=s;return}}r.textContent=s}var NS=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Cp(r,s,i){var c=s.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?c?r.setProperty(s,""):s==="float"?r.cssFloat="":r[s]="":c?r.setProperty(s,i):typeof i!="number"||i===0||NS.has(s)?s==="float"?r.cssFloat=i:r[s]=(""+i).trim():r[s]=i+"px"}function xp(r,s,i){if(s!=null&&typeof s!="object")throw Error(a(62));if(r=r.style,i!=null){for(var c in i)!i.hasOwnProperty(c)||s!=null&&s.hasOwnProperty(c)||(c.indexOf("--")===0?r.setProperty(c,""):c==="float"?r.cssFloat="":r[c]="");for(var f in s)c=s[f],s.hasOwnProperty(f)&&i[f]!==c&&Cp(r,f,c)}else for(var p in s)s.hasOwnProperty(p)&&Cp(r,p,s[p])}function Lu(r){if(r.indexOf("-")===-1)return!1;switch(r){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 jS=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
9dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),PS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ll(r){return PS.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Qn(){}var Nu=null;function ju(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var fa=null,ha=null;function kp(r){var s=oa(r);if(s&&(r=s.stateNode)){var i=r[Gt]||null;e:switch(r=s.stateNode,s.type){case"input":if(ku(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),s=i.name,i.type==="radio"&&s!=null){for(i=r;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+gn(""+s)+'"][type="radio"]'),s=0;s<i.length;s++){var c=i[s];if(c!==r&&c.form===r.form){var f=c[Gt]||null;if(!f)throw Error(a(90));ku(c,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(s=0;s<i.length;s++)c=i[s],c.form===r.form&&Ep(c)}break e;case"textarea":Tp(r,i.value,i.defaultValue);break e;case"select":s=i.value,s!=null&&ua(r,!!i.multiple,s,!1)}}}var Pu=!1;function Op(r,s,i){if(Pu)return r(s,i);Pu=!0;try{var c=r(s);return c}finally{if(Pu=!1,(fa!==null||ha!==null)&&(Zl(),fa&&(s=fa,r=ha,ha=fa=null,kp(s),r)))for(s=0;s<r.length;s++)kp(r[s])}}function Ri(r,s){var i=r.stateNode;if(i===null)return null;var c=i[Gt]||null;if(c===null)return null;i=c[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(i&&typeof i!="function")throw Error(a(231,s,typeof i));return i}var Xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>
vendor: 10,359 bytes, line 9
9"u"),Mu=!1;if(Xn)try{var Ti={};Object.defineProperty(Ti,"passive",{get:function(){Mu=!0}}),window.addEventListener("test",Ti,Ti),window.removeEventListener("test",Ti,Ti)}catch{Mu=!1}var kr=null,Du=null,cl=null;function Lp(){if(cl)return cl;var r,s=Du,i=s.length,c,f="value"in kr?kr.value:kr.textContent,p=f.length;for(r=0;r<i&&s[r]===f[r];r++);var v=i-r;for(c=1;c<=v&&s[i-c]===f[p-c];c++);return cl=f.slice(r,1<c?1-c:void 0)}function ul(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function dl(){return!0}function Np(){return!1}function Ft(r){function s(i,c,f,p,v){this._reactName=i,this._targetInst=f,this.type=c,this.nativeEvent=p,this.target=v,this.currentTarget=null;for(var w in r)r.hasOwnProperty(w)&&(i=r[w],this[w]=i?i(p):p[w]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?dl:Np,this.isPropagationStopped=Np,this}return y(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=dl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=dl)},persist:function(){},isPersistent:dl}),s}var Ss={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fl=Ft(Ss),Ai=y({},Ss,{view:0,detail:0}),MS=Ft(Ai),Iu,Uu,Ci,hl=y({},Ai,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zu,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Ci&&(Ci&&r.type==="mousemove"?(Iu=r.screenX-Ci.screenX,Uu=r.screenY-Ci.screenY):Uu=Iu=0,Ci=r),Iu)},movementY:function(r){return"movementY"in r?r.movementY:Uu}}),jp=Ft(hl),DS=y({},hl,{dataTransfer:0}),IS=Ft(DS),US=y({},Ai,{relatedTarget:0}),$u=Ft(US),$S=y({},Ss,{animationName:0,elapsedTime:0,pseudoElement:0}),zS=Ft($S),BS=y({},Ss,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),qS=Ft(BS),HS=y({},Ss,{data:0}),Pp=Ft(HS),VS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},GS={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"},FS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function KS(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=FS[r])?!!s[r]:!1}function zu(){return KS}var YS=y({},Ai,{key:function(r){if(r.key){var s=VS[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=ul(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?GS[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zu,charCode:function(r){return r.type==="keypress"?ul(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?ul(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),ZS=Ft(YS),JS=y({},hl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mp=Ft(JS),QS=y({},Ai,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zu}),XS=Ft(QS),WS=y({},Ss,{propertyName:0,elapsedTime:0,pseudoElement:0}),eE=Ft(WS),tE=y({},hl,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),nE=Ft(tE),rE=y({},Ss,{newState:0,oldState:0}),sE=Ft(rE),aE=[9,13,27,32],Bu=Xn&&"CompositionEvent"in window,xi=null;Xn&&"documentMode"in document&&(xi=document.documentMode);var iE=Xn&&"TextEvent"in window&&!xi,Dp=Xn&&(!Bu||xi&&8<xi&&11>=xi),Ip=" ",Up=!1;function $p(r,s){switch(r){case"keyup":return aE.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zp(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var pa=!1;function oE(r,s){switch(r){case"compositionend":return zp(s);case"keypress":return s.which!==32?null:(Up=!0,Ip);case"textInput":return r=s.data,r===Ip&&Up?null:r;default:return null}}function lE(r,s){if(pa)return r==="compositionend"||!Bu&&$p(r,s)?(r=Lp(),cl=Du=kr=null,pa=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Dp&&s.locale!=="ko"?null:s.data;default:return null}}var cE={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 Bp(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!cE[r.type]:s==="textarea"}function qp(r,s,i,c){fa?ha?ha.push(c):ha=[c]:fa=c,s=nc(s,"onChange"),0<s.length&&(i=new fl("onChange","change",null,i,c),r.push({event:i,listeners:s}))}var ki=null,Oi=null;function uE(r){Ry(r,0)}function pl(r){var s=Ei(r);if(Ep(s))return r}function Hp(r,s){if(r==="change")return s}var Vp=!1;if(Xn){var qu;if(Xn){var Hu="oninput"in document;if(!Hu){var Gp=document.createElement("div");Gp.setAttribute("oninput","return;"),Hu=typeof Gp.oninput=="function"}qu=Hu}else qu=!1;Vp=qu&&(!document.documentMode||9<document.documentMode)}function Fp(){ki&&(ki.detachEvent("onpropertychange",Kp),Oi=ki=null)}function Kp(r){if(r.propertyName==="value"&&pl(Oi)){var s=[];qp(s,Oi,r,ju(r)),Op(uE,s)}}function dE(r,s,i){r==="focusin"?(Fp(),ki=s,Oi=i,ki.attachEvent("onpropertychange",Kp)):r==="focusout"&&Fp()}function fE(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return pl(Oi)}function hE(r,s){if(r==="click")return pl(s)}function pE(r,s){if(r==="input"||r==="change")return pl(s)}function mE(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var sn=typeof Object.is=="function"?Object.is:mE;function Li(r,s){if(sn(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var i=Object.keys(r),c=Object.keys(s);if(i.length!==c.length)return!1;for(c=0;c<i.length;c++){var f=i[c];if(!bs.call(s,f)||!sn(r[f],s[f]))return!1}return!0}function Yp(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Zp(r,s){var i=Yp(r);r=0;for(var c;i;){if(i.nodeType===3){if(c=r+i.textContent.length,r<=s&&c>=s)return{node:i,offset:s-r};r=c}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Yp(i)}}function Jp(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?Jp(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function Qp(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var s=ol(r.document);s instanceof r.HTMLIFrameElement;){try{var i=typeof s.contentWindow.location.href=="string"}catch{i=!1}if(i)r=s.contentWindow;else break;s=ol(r.document)}return s}function Vu(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}var gE=Xn&&"documentMode"in document&&11>=document.documentMode,ma=null,Gu=null,Ni=null,Fu=!1;function Xp(r,s,i){var c=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Fu||ma==null||ma!==ol(c)||(c=ma,"selectionStart"in c&&Vu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Ni&&Li(Ni,c)||(Ni=c,c=nc(Gu,"onSelect"),0<c.length&&(s=new fl("onSelect","select",null,s,i),r.push({event:s,listeners:c}),s.target=ma)))}function Es(r,s){var i={};return i[r.toLowerCase()]=s.toLowerCase(),i["Webkit"+r]="webkit"+s,i["Moz"+r]="moz"+s,i}var ga={animationend:Es("Animation","AnimationEnd"),animationiteration:Es("Animation","AnimationIteration"),animationstart:Es("Animation","AnimationStart"),transitionrun:Es("Transition","TransitionRun"),transitionstart:Es("Transition","TransitionStart"),transitioncancel:Es("Transition","TransitionCancel"),transitionend:Es("Transition","TransitionEnd")},Ku={},Wp={};Xn&&(Wp=document.createElement("div").style,"AnimationEvent"in window||(delete ga.animationend.animation,delete ga.animationiteration.animation,delete ga.animationstart.animation),"TransitionEvent"in window||delete ga.transitionend.transition);function Rs(r){if(Ku[r])return Ku[r];if(!ga[r])return r;var s=ga[r],i;for(i in s)if(s.hasOwnProperty(i)&&i in Wp)return Ku[r]=s[i];return r}var em=Rs("animationend"),tm=Rs("animationiteration"),nm=Rs("animationstart"),yE=Rs("transitionrun"),vE=Rs("transitionstart"),bE=Rs("transitioncancel"),rm=Rs("transitionend"),sm=new Map,Yu="abort auxClick beforeToggle 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(" ");Yu.push("scrollEnd");
vendor: 14,508 bytes, line 9
9function xn(r,s){sm.set(r,s),ws(s,[r])}var ml=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},yn=[],ya=0,Zu=0;function gl(){for(var r=ya,s=Zu=ya=0;s<r;){var i=yn[s];yn[s++]=null;var c=yn[s];yn[s++]=null;var f=yn[s];yn[s++]=null;var p=yn[s];if(yn[s++]=null,c!==null&&f!==null){var v=c.pending;v===null?f.next=f:(f.next=v.next,v.next=f),c.pending=f}p!==0&&am(i,f,p)}}function yl(r,s,i,c){yn[ya++]=r,yn[ya++]=s,yn[ya++]=i,yn[ya++]=c,Zu|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function Ju(r,s,i,c){return yl(r,s,i,c),vl(r)}function Ts(r,s){return yl(r,null,null,s),vl(r)}function am(r,s,i){r.lanes|=i;var c=r.alternate;c!==null&&(c.lanes|=i);for(var f=!1,p=r.return;p!==null;)p.childLanes|=i,c=p.alternate,c!==null&&(c.childLanes|=i),p.tag===22&&(r=p.stateNode,r===null||r._visibility&1||(f=!0)),r=p,p=p.return;return r.tag===3?(p=r.stateNode,f&&s!==null&&(f=31-rn(i),r=p.hiddenUpdates,c=r[f],c===null?r[f]=[s]:c.push(s),s.lane=i|536870912),p):null}function vl(r){if(50<eo)throw eo=0,af=null,Error(a(185));for(var s=r.return;s!==null;)r=s,s=r.return;return r.tag===3?r.stateNode:null}var va={};function _E(r,s,i,c){this.tag=r,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(r,s,i,c){return new _E(r,s,i,c)}function Qu(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Wn(r,s){var i=r.alternate;return i===null?(i=an(r.tag,s,r.key,r.mode),i.elementType=r.elementType,i.type=r.type,i.stateNode=r.stateNode,i.alternate=r,r.alternate=i):(i.pendingProps=s,i.type=r.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=r.flags&65011712,i.childLanes=r.childLanes,i.lanes=r.lanes,i.child=r.child,i.memoizedProps=r.memoizedProps,i.memoizedState=r.memoizedState,i.updateQueue=r.updateQueue,s=r.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},i.sibling=r.sibling,i.index=r.index,i.ref=r.ref,i.refCleanup=r.refCleanup,i}function im(r,s){r.flags&=65011714;var i=r.alternate;return i===null?(r.childLanes=0,r.lanes=s,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=i.childLanes,r.lanes=i.lanes,r.child=i.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=i.memoizedProps,r.memoizedState=i.memoizedState,r.updateQueue=i.updateQueue,r.type=i.type,s=i.dependencies,r.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),r}function bl(r,s,i,c,f,p){var v=0;if(c=r,typeof r=="function")Qu(r)&&(v=1);else if(typeof r=="string")v=TR(r,i,re.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case K:return r=an(31,i,s,f),r.elementType=K,r.lanes=p,r;case R:return As(i.children,f,p,s);case E:v=8,f|=24;break;case T:return r=an(12,i,s,f|2),r.elementType=T,r.lanes=p,r;case F:return r=an(13,i,s,f),r.elementType=F,r.lanes=p,r;case V:return r=an(19,i,s,f),r.elementType=V,r.lanes=p,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case k:v=10;break e;case C:v=9;break e;case N:v=11;break e;case z:v=14;break e;case M:v=16,c=null;break e}v=29,i=Error(a(130,r===null?"null":typeof r,"")),c=null}return s=an(v,i,s,f),s.elementType=r,s.type=c,s.lanes=p,s}function As(r,s,i,c){return r=an(7,r,c,s),r.lanes=i,r}function Xu(r,s,i){return r=an(6,r,null,s),r.lanes=i,r}function om(r){var s=an(18,null,null,0);return s.stateNode=r,s}function Wu(r,s,i){return s=an(4,r.children!==null?r.children:[],r.key,s),s.lanes=i,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}var lm=new WeakMap;function vn(r,s){if(typeof r=="object"&&r!==null){var i=lm.get(r);return i!==void 0?i:(s={value:r,source:s,stack:Zn(s)},lm.set(r,s),s)}return{value:r,source:s,stack:Zn(s)}}var ba=[],_a=0,_l=null,ji=0,bn=[],_n=0,Or=null,In=1,Un="";function er(r,s){ba[_a++]=ji,ba[_a++]=_l,_l=r,ji=s}function cm(r,s,i){bn[_n++]=In,bn[_n++]=Un,bn[_n++]=Or,Or=r;var c=In;r=Un;var f=32-rn(c)-1;c&=~(1<<f),i+=1;var p=32-rn(s)+f;if(30<p){var v=f-f%5;p=(c&(1<<v)-1).toString(32),c>>=v,f-=v,In=1<<32-rn(s)+f|i<<f|c,Un=p+r}else In=1<<p|i<<f|c,Un=r}function ed(r){r.return!==null&&(er(r,1),cm(r,1,0))}function td(r){for(;r===_l;)_l=ba[--_a],ba[_a]=null,ji=ba[--_a],ba[_a]=null;for(;r===Or;)Or=bn[--_n],bn[_n]=null,Un=bn[--_n],bn[_n]=null,In=bn[--_n],bn[_n]=null}function um(r,s){bn[_n++]=In,bn[_n++]=Un,bn[_n++]=Or,In=s.id,Un=s.overflow,Or=r}var Nt=null,nt=null,De=!1,Lr=null,wn=!1,nd=Error(a(519));function Nr(r){var s=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Pi(vn(s,r)),nd}function dm(r){var s=r.stateNode,i=r.type,c=r.memoizedProps;switch(s[Lt]=r,s[Gt]=c,i){case"dialog":Ne("cancel",s),Ne("close",s);break;case"iframe":case"object":case"embed":Ne("load",s);break;case"video":case"audio":for(i=0;i<no.length;i++)Ne(no[i],s);break;case"source":Ne("error",s);break;case"img":case"image":case"link":Ne("error",s),Ne("load",s);break;case"details":Ne("toggle",s);break;case"input":Ne("invalid",s),Rp(s,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Ne("invalid",s);break;case"textarea":Ne("invalid",s),Ap(s,c.value,c.defaultValue,c.children)}i=c.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||s.textContent===""+i||c.suppressHydrationWarning===!0||xy(s.textContent,i)?(c.popover!=null&&(Ne("beforetoggle",s),Ne("toggle",s)),c.onScroll!=null&&Ne("scroll",s),c.onScrollEnd!=null&&Ne("scrollend",s),c.onClick!=null&&(s.onclick=Qn),s=!0):s=!1,s||Nr(r,!0)}function fm(r){for(Nt=r.return;Nt;)switch(Nt.tag){case 5:case 31:case 13:wn=!1;return;case 27:case 3:wn=!0;return;default:Nt=Nt.return}}function wa(r){if(r!==Nt)return!1;if(!De)return fm(r),De=!0,!1;var s=r.tag,i;if((i=s!==3&&s!==27)&&((i=s===5)&&(i=r.type,i=!(i!=="form"&&i!=="button")||wf(r.type,r.memoizedProps)),i=!i),i&&nt&&Nr(r),fm(r),s===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));nt=Iy(r)}else if(s===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));nt=Iy(r)}else s===27?(s=nt,Fr(r.type)?(r=Af,Af=null,nt=r):nt=s):nt=Nt?En(r.stateNode.nextSibling):null;return!0}function Cs(){nt=Nt=null,De=!1}function rd(){var r=Lr;return r!==null&&(Jt===null?Jt=r:Jt.push.apply(Jt,r),Lr=null),r}function Pi(r){Lr===null?Lr=[r]:Lr.push(r)}var sd=x(null),xs=null,tr=null;function jr(r,s,i){Q(sd,s._currentValue),s._currentValue=i}function nr(r){r._currentValue=sd.current,H(sd)}function ad(r,s,i){for(;r!==null;){var c=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,c!==null&&(c.childLanes|=s)):c!==null&&(c.childLanes&s)!==s&&(c.childLanes|=s),r===i)break;r=r.return}}function id(r,s,i,c){var f=r.child;for(f!==null&&(f.return=r);f!==null;){var p=f.dependencies;if(p!==null){var v=f.child;p=p.firstContext;e:for(;p!==null;){var w=p;p=f;for(var A=0;A<s.length;A++)if(w.context===s[A]){p.lanes|=i,w=p.alternate,w!==null&&(w.lanes|=i),ad(p.return,i,r),c||(v=null);break e}p=w.next}}else if(f.tag===18){if(v=f.return,v===null)throw Error(a(341));v.lanes|=i,p=v.alternate,p!==null&&(p.lanes|=i),ad(v,i,r),v=null}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===r){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}}function Sa(r,s,i,c){r=null;for(var f=s,p=!1;f!==null;){if(!p){if((f.flags&524288)!==0)p=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var v=f.alternate;if(v===null)throw Error(a(387));if(v=v.memoizedProps,v!==null){var w=f.type;sn(f.pendingProps.value,v.value)||(r!==null?r.push(w):r=[w])}}else if(f===xe.current){if(v=f.alternate,v===null)throw Error(a(387));v.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(r!==null?r.push(oo):r=[oo])}f=f.return}r!==null&&id(s,r,i,c),s.flags|=262144}function wl(r){for(r=r.firstContext;r!==null;){if(!sn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function ks(r){xs=r,tr=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function jt(r){return hm(xs,r)}function Sl(r,s){return xs===null&&ks(r),hm(r,s)}function hm(r,s){var i=s._currentValue;if(s={context:s,memoizedValue:i,next:null},tr===null){if(r===null)throw Error(a(308));tr=s,r.dependencies={lanes:0,firstContext:s},r.flags|=524288}else tr=tr.next=s;return i}var wE=typeof AbortController<"u"?AbortController:function(){var r=[],s=this.signal={aborted:!1,addEventListener:function(i,c){r.push(c)}};this.abort=function(){s.aborted=!0,r.forEach(function(i){return i()})}},SE=t.unstable_scheduleCallback,EE=t.unstable_NormalPriority,pt={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function od(){return{controller:new wE,data:new Map,refCount:0}}function Mi(r){r.refCount--,r.refCount===0&&SE(EE,function(){r.controller.abort()})}var Di=null,ld=0,Ea=0,Ra=null;function RE(r,s){if(Di===null){var i=Di=[];ld=0,Ea=ff(),Ra={status:"pending",value:void 0,then:function(c){i.push(c)}}}return ld++,s.then(pm,pm),s}function pm(){if(--ld===0&&Di!==null){Ra!==null&&(Ra.status="fulfilled");var r=Di;Di=null,Ea=0,Ra=null;for(var s=0;s<r.length;s++)(0,r[s])()}}function TE(r,s){var i=[],c={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return r.then(function(){c.status="fulfilled",c.value=s;for(var f=0;f<i.length;f++)(0,i[f])(s)},function(f){for(c.status="rejected",c.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),c}var mm=U.S;U.S=function(r,s){Xg=Dt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&RE(r,s),mm!==null&&mm(r,s)};var Os=x(null);function cd(){var r=Os.current;return r!==null?r:Qe.pooledCache}function El(r,s){s===null?Q(Os,Os.current):Q(Os,s.pool)}function gm(){var r=cd();return r===null?null:{parent:pt._currentValue,pool:r}}var Ta=Error(a(460)),ud=Error(a(474)),Rl=Error(a(542)),Tl={then:function(){}};function ym(r){return r=r.status,r==="fulfilled"||r==="rejected"}function vm(r,s,i){switch(i=r[i],i===void 0?r.push(s):i!==s&&(s.then(Qn,Qn),s=i),s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,_m(r),r;default:if(typeof s.status=="string")s.then(Qn,Qn);else{if(r=Qe,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=s,r.status="pending",r.then(function(c){if(s.status==="pending"){var f=s;f.status="fulfilled",f.value=c}},function(c){if(s.status==="pending"){var f=s;f.status="rejected",f.reason=c}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,_m(r),r}throw Ns=s,Ta}}function Ls(r){try{var s=r._init;return s(r._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Ns=i,Ta):i}}var Ns=null;function bm(){if(Ns===null)throw Error(a(459));var r=Ns;return Ns=null,r}function _m(r){if(r===Ta||r===Rl)throw Error(a(483))}var Aa=null,Ii=0;function Al(r){var s=Ii;return Ii+=1,Aa===null&&(Aa=[]),vm(Aa,r,s)}function Ui(r,s){s=s.props.ref,r.ref=s!==void 0?s:null}function Cl(r,s){throw s.$$typeof===b?Error(a(525)):(r=Object.prototype.toString.call(s),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r)))}function wm(r){function s(L,O){if(r){var j=L.deletions;j===null?(L.deletions=[O],L.flags|=16):j.push(O)}}function i(L,O){if(!r)return null;for(;O!==null;)s(L,O),O=O.sibling;return null}function c(L){for(var O=new Map;L!==null;)L.key!==null?O.set(L.key,L):O.set(L.index,L),L=L.sibling;return O}function f(L,O){return L=Wn(L,O),L.index=0,L.sibling=null,L}function p(L,O,j){return L.index=j,r?(j=L.alternate,j!==null?(j=j.index,j<O?(L.flags|=67108866,O):j):(L.flags|=67108866,O)):(L.flags|=1048576,O)}function v(L){return r&&L.alternate===null&&(L.flags|=67108866),L}function w(L,O,j,q){return O===null||O.tag!==6?(O=Xu(j,L.mode,q),O.return=L,O):(O=f(O,j),O.return=L,O)}function A(L,O,j,q){var ye=j.type;return ye===R?B(L,O,j.props.children,q,j.key):O!==null&&(O.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===M&&Ls(ye)===O.type)?(O=f(O,j.props),Ui(O,j),O.return=L,O):(O=bl(j.type,j.key,j.props,null,L.mode,q),Ui(O,j),O.return=L,O)}function P(L,O,j,q){return O===null||O.tag!==4||O.stateNode.containerInfo!==j.containerInfo||O.stateNode.implementation!==j.implementation?(O=Wu(j,L.mode,q),O.return=L,O):(O=f(O,j.children||[]),O.return=L,O)}function B(L,O,j,q,ye){return O===null||O.tag!==7?(O=As(j,L.mode,q,ye),O.return=L,O):(O=f(O,j),O.return=L,O)}function G(L,O,j){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Xu(""+O,L.mode,j),O.return=L,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case _:return j=bl(O.type,O.key,O.props,null,L.mode,j),Ui(j,O),j.return=L,j;case S:return O=Wu(O,L.mode,j),O.return=L,O;case M:return O=Ls(O),G(L,O,j)}if(ze(O)||Te(O))return O=As(O,L.mode,j,null),O.return=L,O;if(typeof O.then=="function")return G(L,Al(O),j);if(O.$$typeof===k)return G(L,Sl(L,O),j);Cl(L,O)}return null}function I(L,O,j,q){var ye=O!==null?O.key:null;if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return ye!==null?null:w(L,O,""+j,q);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case _:return j.key===ye?A(L,O,j,q):null;case S:return j.key===ye?P(L,O,j,q):null;case M:return j=Ls(j),I(L,O,j,q)}if(ze(j)||Te(j))return ye!==null?null:B(L,O,j,q,null);if(typeof j.then=="function")return I(L,O,Al(j),q);if(j.$$typeof===k)return I(L,O,Sl(L,j),q);Cl(L,j)}return null}function $(L,O,j,q,ye){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return L=L.get(j)||null,w(O,L,""+q,ye);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case _:return L=L.get(q.key===null?j:q.key)||null,A(O,L,q,ye);case S:return L=L.get(q.key===null?j:q.key)||null,P(O,L,q,ye);case M:return q=Ls(q),$(L,O,j,q,ye)}if(ze(q)||Te(q))return L=L.get(j)||null,B(O,L,q,ye,null);if(typeof q.then=="function")return $(L,O,j,Al(q),ye);if(q.$$typeof===k)return $(L,O,j,Sl(O,q),ye);Cl(O,q)}return null}function oe(L,O,j,q){for(var ye=null,Be=null,he=O,Ae=O=0,Pe=null;he!==null&&Ae<j.length;Ae++){he.index>
vendor: 4,197 bytes, line 9
9Ae?(Pe=he,he=null):Pe=he.sibling;var qe=I(L,he,j[Ae],q);if(qe===null){he===null&&(he=Pe);break}r&&he&&qe.alternate===null&&s(L,he),O=p(qe,O,Ae),Be===null?ye=qe:Be.sibling=qe,Be=qe,he=Pe}if(Ae===j.length)return i(L,he),De&&er(L,Ae),ye;if(he===null){for(;Ae<j.length;Ae++)he=G(L,j[Ae],q),he!==null&&(O=p(he,O,Ae),Be===null?ye=he:Be.sibling=he,Be=he);return De&&er(L,Ae),ye}for(he=c(he);Ae<j.length;Ae++)Pe=$(he,L,Ae,j[Ae],q),Pe!==null&&(r&&Pe.alternate!==null&&he.delete(Pe.key===null?Ae:Pe.key),O=p(Pe,O,Ae),Be===null?ye=Pe:Be.sibling=Pe,Be=Pe);return r&&he.forEach(function(Qr){return s(L,Qr)}),De&&er(L,Ae),ye}function be(L,O,j,q){if(j==null)throw Error(a(151));for(var ye=null,Be=null,he=O,Ae=O=0,Pe=null,qe=j.next();he!==null&&!qe.done;Ae++,qe=j.next()){he.index>Ae?(Pe=he,he=null):Pe=he.sibling;var Qr=I(L,he,qe.value,q);if(Qr===null){he===null&&(he=Pe);break}r&&he&&Qr.alternate===null&&s(L,he),O=p(Qr,O,Ae),Be===null?ye=Qr:Be.sibling=Qr,Be=Qr,he=Pe}if(qe.done)return i(L,he),De&&er(L,Ae),ye;if(he===null){for(;!qe.done;Ae++,qe=j.next())qe=G(L,qe.value,q),qe!==null&&(O=p(qe,O,Ae),Be===null?ye=qe:Be.sibling=qe,Be=qe);return De&&er(L,Ae),ye}for(he=c(he);!qe.done;Ae++,qe=j.next())qe=$(he,L,Ae,qe.value,q),qe!==null&&(r&&qe.alternate!==null&&he.delete(qe.key===null?Ae:qe.key),O=p(qe,O,Ae),Be===null?ye=qe:Be.sibling=qe,Be=qe);return r&&he.forEach(function(DR){return s(L,DR)}),De&&er(L,Ae),ye}function Je(L,O,j,q){if(typeof j=="object"&&j!==null&&j.type===R&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case _:e:{for(var ye=j.key;O!==null;){if(O.key===ye){if(ye=j.type,ye===R){if(O.tag===7){i(L,O.sibling),q=f(O,j.props.children),q.return=L,L=q;break e}}else if(O.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===M&&Ls(ye)===O.type){i(L,O.sibling),q=f(O,j.props),Ui(q,j),q.return=L,L=q;break e}i(L,O);break}else s(L,O);O=O.sibling}j.type===R?(q=As(j.props.children,L.mode,q,j.key),q.return=L,L=q):(q=bl(j.type,j.key,j.props,null,L.mode,q),Ui(q,j),q.return=L,L=q)}return v(L);case S:e:{for(ye=j.key;O!==null;){if(O.key===ye)if(O.tag===4&&O.stateNode.containerInfo===j.containerInfo&&O.stateNode.implementation===j.implementation){i(L,O.sibling),q=f(O,j.children||[]),q.return=L,L=q;break e}else{i(L,O);break}else s(L,O);O=O.sibling}q=Wu(j,L.mode,q),q.return=L,L=q}return v(L);case M:return j=Ls(j),Je(L,O,j,q)}if(ze(j))return oe(L,O,j,q);if(Te(j)){if(ye=Te(j),typeof ye!="function")throw Error(a(150));return j=ye.call(j),be(L,O,j,q)}if(typeof j.then=="function")return Je(L,O,Al(j),q);if(j.$$typeof===k)return Je(L,O,Sl(L,j),q);Cl(L,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(j=""+j,O!==null&&O.tag===6?(i(L,O.sibling),q=f(O,j),q.return=L,L=q):(i(L,O),q=Xu(j,L.mode,q),q.return=L,L=q),v(L)):i(L,O)}return function(L,O,j,q){try{Ii=0;var ye=Je(L,O,j,q);return Aa=null,ye}catch(he){if(he===Ta||he===Rl)throw he;var Be=an(29,he,null,L.mode);return Be.lanes=q,Be.return=L,Be}}}var js=wm(!0),Sm=wm(!1),Pr=!1;function dd(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fd(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Mr(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Dr(r,s,i){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(Ve&2)!==0){var f=c.pending;return f===null?s.next=s:(s.next=f.next,f.next=s),c.pending=s,s=vl(r),am(r,null,i),s}return yl(r,c,s,i),vl(r)}function $i(r,s,i){if(s=s.updateQueue,s!==null&&(s=s.shared,(i&4194048)!==0)){var c=s.lanes;c&=r.pendingLanes,i|=c,s.lanes=i,hp(r,i)}}function hd(r,s){var i=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,i===c)){var f=null,p=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};p===null?f=p=v:p=p.next=v,i=i.next}while(i!==null);p===null?f=p=s:p=p.next=s}else f=p=s;i={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:p,shared:c.shared,callbacks:c.callbacks},r.updateQueue=i;return}
vendor: 6,535 bytes, line 9
9r=i.lastBaseUpdate,r===null?i.firstBaseUpdate=s:r.next=s,i.lastBaseUpdate=s}var pd=!1;function zi(){if(pd){var r=Ra;if(r!==null)throw r}}function Bi(r,s,i,c){pd=!1;var f=r.updateQueue;Pr=!1;var p=f.firstBaseUpdate,v=f.lastBaseUpdate,w=f.shared.pending;if(w!==null){f.shared.pending=null;var A=w,P=A.next;A.next=null,v===null?p=P:v.next=P,v=A;var B=r.alternate;B!==null&&(B=B.updateQueue,w=B.lastBaseUpdate,w!==v&&(w===null?B.firstBaseUpdate=P:w.next=P,B.lastBaseUpdate=A))}if(p!==null){var G=f.baseState;v=0,B=P=A=null,w=p;do{var I=w.lane&-536870913,$=I!==w.lane;if($?(je&I)===I:(c&I)===I){I!==0&&I===Ea&&(pd=!0),B!==null&&(B=B.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var oe=r,be=w;I=s;var Je=i;switch(be.tag){case 1:if(oe=be.payload,typeof oe=="function"){G=oe.call(Je,G,I);break e}G=oe;break e;case 3:oe.flags=oe.flags&-65537|128;case 0:if(oe=be.payload,I=typeof oe=="function"?oe.call(Je,G,I):oe,I==null)break e;G=y({},G,I);break e;case 2:Pr=!0}}I=w.callback,I!==null&&(r.flags|=64,$&&(r.flags|=8192),$=f.callbacks,$===null?f.callbacks=[I]:$.push(I))}else $={lane:I,tag:w.tag,payload:w.payload,callback:w.callback,next:null},B===null?(P=B=$,A=G):B=B.next=$,v|=I;if(w=w.next,w===null){if(w=f.shared.pending,w===null)break;$=w,w=$.next,$.next=null,f.lastBaseUpdate=$,f.shared.pending=null}}while(!0);B===null&&(A=G),f.baseState=A,f.firstBaseUpdate=P,f.lastBaseUpdate=B,p===null&&(f.shared.lanes=0),Br|=v,r.lanes=v,r.memoizedState=G}}function Em(r,s){if(typeof r!="function")throw Error(a(191,r));r.call(s)}function Rm(r,s){var i=r.callbacks;if(i!==null)for(r.callbacks=null,r=0;r<i.length;r++)Em(i[r],s)}var Ca=x(null),xl=x(0);function Tm(r,s){r=dr,Q(xl,r),Q(Ca,s),dr=r|s.baseLanes}function md(){Q(xl,dr),Q(Ca,Ca.current)}function gd(){dr=xl.current,H(Ca),H(xl)}var on=x(null),Sn=null;function Ir(r){var s=r.alternate;Q(ut,ut.current&1),Q(on,r),Sn===null&&(s===null||Ca.current!==null||s.memoizedState!==null)&&(Sn=r)}function yd(r){Q(ut,ut.current),Q(on,r),Sn===null&&(Sn=r)}function Am(r){r.tag===22?(Q(ut,ut.current),Q(on,r),Sn===null&&(Sn=r)):Ur()}function Ur(){Q(ut,ut.current),Q(on,on.current)}function ln(r){H(on),Sn===r&&(Sn=null),H(ut)}var ut=x(0);function kl(r){for(var s=r;s!==null;){if(s.tag===13){var i=s.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Rf(i)||Tf(i)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var rr=0,Re=null,Ye=null,mt=null,Ol=!1,xa=!1,Ps=!1,Ll=0,qi=0,ka=null,AE=0;function ot(){throw Error(a(321))}function vd(r,s){if(s===null)return!1;for(var i=0;i<s.length&&i<r.length;i++)if(!sn(r[i],s[i]))return!1;return!0}function bd(r,s,i,c,f,p){return rr=p,Re=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,U.H=r===null||r.memoizedState===null?cg:Pd,Ps=!1,p=i(c,f),Ps=!1,xa&&(p=xm(s,i,c,f)),Cm(r),p}function Cm(r){U.H=Gi;var s=Ye!==null&&Ye.next!==null;if(rr=0,mt=Ye=Re=null,Ol=!1,qi=0,ka=null,s)throw Error(a(300));r===null||gt||(r=r.dependencies,r!==null&&wl(r)&&(gt=!0))}function xm(r,s,i,c){Re=r;var f=0;do{if(xa&&(ka=null),qi=0,xa=!1,25<=f)throw Error(a(301));if(f+=1,mt=Ye=null,r.updateQueue!=null){var p=r.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}U.H=ug,p=s(i,c)}while(xa);return p}function CE(){var r=U.H,s=r.useState()[0];return s=typeof s.then=="function"?Hi(s):s,r=r.useState()[0],(Ye!==null?Ye.memoizedState:null)!==r&&(Re.flags|=1024),s}function _d(){var r=Ll!==0;return Ll=0,r}function wd(r,s,i){s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~i}function Sd(r){if(Ol){for(r=r.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Ol=!1}rr=0,mt=Ye=Re=null,xa=!1,qi=Ll=0,ka=null}function Bt(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mt===null?Re.memoizedState=mt=r:mt=mt.next=r,mt}function dt(){if(Ye===null){var r=Re.alternate;r=r!==null?r.memoizedState:null}else r=Ye.next;var s=mt===null?Re.memoizedState:mt.next;if(s!==null)mt=s,Ye=r;else{if(r===null)throw Re.alternate===null?Error(a(467)):Error(a(310));Ye=r,r={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},mt===null?Re.memoizedState=mt=r:mt=mt.next=r}return mt}function Nl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hi(r){var s=qi;return qi+=1,ka===null&&(ka=[]),r=vm(ka,r,s),s=Re,(mt===null?s.memoizedState:mt.next)===null&&(s=s.alternate,U.H=s===null||s.memoizedState===null?cg:Pd),r}function jl(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Hi(r);if(r.$$typeof===k)return jt(r)}throw Error(a(438,String(r)))}function Ed(r){var s=null,i=Re.updateQueue;if(i!==null&&(s=i.memoCache),s==null){var c=Re.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(s={data:c.data.map(function(f){return f.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),i===null&&(i=Nl(),Re.updateQueue=i),i.memoCache=s,i=s.data[s.index],i===void 0)for(i=s.data[s.index]=Array(r),c=0;c<r;c++)i[c]=fe;return s.index++,i}function sr(r,s){return typeof s=="function"?s(r):s}function Pl(r){var s=dt();return Rd(s,Ye,r)}function Rd(r,s,i){var c=r.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=i;var f=r.baseQueue,p=c.pending;if(p!==null){if(f!==null){var v=f.next;f.next=p.next,p.next=v}s.baseQueue=f=p,c.pending=null}if(p=r.baseState,f===null)r.memoizedState=p;else{s=f.next;var w=v=null,A=null,P=s,B=!1;do{var G=P.lane&-536870913;if(G!==P.lane?(je&G)===G:(rr&G)===G){var I=P.revertLane;if(I===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),G===Ea&&(B=!0);else if((rr&I)===I){P=P.next,I===Ea&&(B=!0);continue}else G={lane:0,revertLane:P.revertLane,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},A===null?(w=A=G,v=p):A=A.next=G,Re.lanes|=I,Br|=I;G=P.action,Ps&&i(p,G),p=P.hasEagerState?P.eagerState:i(p,G)}else I={lane:G,revertLane:P.revertLane,gesture:P.gesture,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},A===null?(w=A=I,v=p):A=A.next=I,Re.lanes|=G,Br|=G;P=P.next}
vendor: 4,516 bytes, line 9
9while(P!==null&&P!==s);if(A===null?v=p:A.next=w,!sn(p,r.memoizedState)&&(gt=!0,B&&(i=Ra,i!==null)))throw i;r.memoizedState=p,r.baseState=v,r.baseQueue=A,c.lastRenderedState=p}return f===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function Td(r){var s=dt(),i=s.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=r;var c=i.dispatch,f=i.pending,p=s.memoizedState;if(f!==null){i.pending=null;var v=f=f.next;do p=r(p,v.action),v=v.next;while(v!==f);sn(p,s.memoizedState)||(gt=!0),s.memoizedState=p,s.baseQueue===null&&(s.baseState=p),i.lastRenderedState=p}return[p,c]}function km(r,s,i){var c=Re,f=dt(),p=De;if(p){if(i===void 0)throw Error(a(407));i=i()}else i=s();var v=!sn((Ye||f).memoizedState,i);if(v&&(f.memoizedState=i,gt=!0),f=f.queue,xd(Nm.bind(null,c,f,r),[r]),f.getSnapshot!==s||v||mt!==null&&mt.memoizedState.tag&1){if(c.flags|=2048,Oa(9,{destroy:void 0},Lm.bind(null,c,f,i,s),null),Qe===null)throw Error(a(349));p||(rr&127)!==0||Om(c,s,i)}return i}function Om(r,s,i){r.flags|=16384,r={getSnapshot:s,value:i},s=Re.updateQueue,s===null?(s=Nl(),Re.updateQueue=s,s.stores=[r]):(i=s.stores,i===null?s.stores=[r]:i.push(r))}function Lm(r,s,i,c){s.value=i,s.getSnapshot=c,jm(s)&&Pm(r)}function Nm(r,s,i){return i(function(){jm(s)&&Pm(r)})}function jm(r){var s=r.getSnapshot;r=r.value;try{var i=s();return!sn(r,i)}catch{return!0}}function Pm(r){var s=Ts(r,2);s!==null&&Qt(s,r,2)}function Ad(r){var s=Bt();if(typeof r=="function"){var i=r;if(r=i(),Ps){Cr(!0);try{i()}finally{Cr(!1)}}}return s.memoizedState=s.baseState=r,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sr,lastRenderedState:r},s}function Mm(r,s,i,c){return r.baseState=i,Rd(r,Ye,typeof c=="function"?c:sr)}function xE(r,s,i,c,f){if(Il(r))throw Error(a(485));if(r=s.action,r!==null){var p={payload:f,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){p.listeners.push(v)}};U.T!==null?i(!0):p.isTransition=!1,c(p),i=s.pending,i===null?(p.next=s.pending=p,Dm(s,p)):(p.next=i.next,s.pending=i.next=p)}}function Dm(r,s){var i=s.action,c=s.payload,f=r.state;if(s.isTransition){var p=U.T,v={};U.T=v;try{var w=i(f,c),A=U.S;A!==null&&A(v,w),Im(r,s,w)}catch(P){Cd(r,s,P)}finally{p!==null&&v.types!==null&&(p.types=v.types),U.T=p}}else try{p=i(f,c),Im(r,s,p)}catch(P){Cd(r,s,P)}}function Im(r,s,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(c){Um(r,s,c)},function(c){return Cd(r,s,c)}):Um(r,s,i)}function Um(r,s,i){s.status="fulfilled",s.value=i,$m(s),r.state=i,s=r.pending,s!==null&&(i=s.next,i===s?r.pending=null:(i=i.next,s.next=i,Dm(r,i)))}function Cd(r,s,i){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do s.status="rejected",s.reason=i,$m(s),s=s.next;while(s!==c)}r.action=null}function $m(r){r=r.listeners;for(var s=0;s<r.length;s++)(0,r[s])()}function zm(r,s){return s}function Bm(r,s){if(De){var i=Qe.formState;if(i!==null){e:{var c=Re;if(De){if(nt){t:{for(var f=nt,p=wn;f.nodeType!==8;){if(!p){f=null;break t}if(f=En(f.nextSibling),f===null){f=null;break t}}p=f.data,f=p==="F!"||p==="F"?f:null}if(f){nt=En(f.nextSibling),c=f.data==="F!";break e}}Nr(c)}c=!1}c&&(s=i[0])}}return i=Bt(),i.memoizedState=i.baseState=s,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zm,lastRenderedState:s},i.queue=c,i=ig.bind(null,Re,c),c.dispatch=i,c=Ad(!1),p=jd.bind(null,Re,!1,c.queue),c=Bt(),f={state:s,dispatch:null,action:r,pending:null},c.queue=f,i=xE.bind(null,Re,f,p,i),f.dispatch=i,c.memoizedState=r,[s,i,!1]}function qm(r){var s=dt();return Hm(s,Ye,r)}function Hm(r,s,i){if(s=Rd(r,s,zm)[0],r=Pl(sr)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var c=Hi(s)}catch(v){throw v===Ta?Rl:v}else c=s;s=dt();var f=s.queue,p=f.dispatch;return i!==s.memoizedState&&(Re.flags|=2048,Oa(9,{destroy:void 0},kE.bind(null,f,i),null)),[c,p,r]}function kE(r,s){r.action=s}function Vm(r){var s=dt(),i=Ye;if(i!==null)return Hm(s,i,r);dt(),s=s.memoizedState,i=dt();var c=i.queue.dispatch;return i.memoizedState=r,[s,c,!1]}function Oa(r,s,i,c){return r={tag:r,create:i,deps:c,inst:s,next:null},s=Re.updateQueue,s===null&&(s=Nl(),Re.updateQueue=s),i=s.lastEffect,i===null?s.lastEffect=r.next=r:(c=i.next,i.next=r,r.next=c,s.lastEffect=r),r}function Gm(){return dt().memoizedState}function Ml(r,s,i,c){var f=Bt();Re.flags|=r,f.memoizedState=Oa(1|s,{destroy:void 0},i,c===void 0?null:c)}function Dl(r,s,i,c){var f=dt();c=c===void 0?null:c;var p=f.memoizedState.inst;Ye!==null&&c!==null&&vd(c,Ye.memoizedState.deps)?f.memoizedState=Oa(s,p,i,c
vendor: 4,992 bytes, line 9
9):(Re.flags|=r,f.memoizedState=Oa(1|s,p,i,c))}function Fm(r,s){Ml(8390656,8,r,s)}function xd(r,s){Dl(2048,8,r,s)}function OE(r){Re.flags|=4;var s=Re.updateQueue;if(s===null)s=Nl(),Re.updateQueue=s,s.events=[r];else{var i=s.events;i===null?s.events=[r]:i.push(r)}}function Km(r){var s=dt().memoizedState;return OE({ref:s,nextImpl:r}),function(){if((Ve&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}function Ym(r,s){return Dl(4,2,r,s)}function Zm(r,s){return Dl(4,4,r,s)}function Jm(r,s){if(typeof s=="function"){r=r();var i=s(r);return function(){typeof i=="function"?i():s(null)}}if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function Qm(r,s,i){i=i!=null?i.concat([r]):null,Dl(4,4,Jm.bind(null,s,r),i)}function kd(){}function Xm(r,s){var i=dt();s=s===void 0?null:s;var c=i.memoizedState;return s!==null&&vd(s,c[1])?c[0]:(i.memoizedState=[r,s],r)}function Wm(r,s){var i=dt();s=s===void 0?null:s;var c=i.memoizedState;if(s!==null&&vd(s,c[1]))return c[0];if(c=r(),Ps){Cr(!0);try{r()}finally{Cr(!1)}}return i.memoizedState=[c,s],c}function Od(r,s,i){return i===void 0||(rr&1073741824)!==0&&(je&261930)===0?r.memoizedState=s:(r.memoizedState=i,r=ey(),Re.lanes|=r,Br|=r,i)}function eg(r,s,i,c){return sn(i,s)?i:Ca.current!==null?(r=Od(r,i,c),sn(r,s)||(gt=!0),r):(rr&42)===0||(rr&1073741824)!==0&&(je&261930)===0?(gt=!0,r.memoizedState=i):(r=ey(),Re.lanes|=r,Br|=r,s)}function tg(r,s,i,c,f){var p=Z.p;Z.p=p!==0&&8>p?p:8;var v=U.T,w={};U.T=w,jd(r,!1,s,i);try{var A=f(),P=U.S;if(P!==null&&P(w,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var B=TE(A,c);Vi(r,s,B,dn(r))}else Vi(r,s,c,dn(r))}catch(G){Vi(r,s,{then:function(){},status:"rejected",reason:G},dn())}finally{Z.p=p,v!==null&&w.types!==null&&(v.types=w.types),U.T=v}}function LE(){}function Ld(r,s,i,c){if(r.tag!==5)throw Error(a(476));var f=ng(r).queue;tg(r,f,s,me,i===null?LE:function(){return rg(r),i(c)})}function ng(r){var s=r.memoizedState;if(s!==null)return s;s={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sr,lastRenderedState:me},next:null};var i={};return s.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sr,lastRenderedState:i},next:null},r.memoizedState=s,r=r.alternate,r!==null&&(r.memoizedState=s),s}function rg(r){var s=ng(r);s.next===null&&(s=r.alternate.memoizedState),Vi(r,s.next.queue,{},dn())}function Nd(){return jt(oo)}function sg(){return dt().memoizedState}function ag(){return dt().memoizedState}function NE(r){for(var s=r.return;s!==null;){switch(s.tag){case 24:case 3:var i=dn();r=Mr(i);var c=Dr(s,r,i);c!==null&&(Qt(c,s,i),$i(c,s,i)),s={cache:od()},r.payload=s;return}s=s.return}}function jE(r,s,i){var c=dn();i={lane:c,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Il(r)?og(s,i):(i=Ju(r,s,i,c),i!==null&&(Qt(i,r,c),lg(i,s,c)))}function ig(r,s,i){var c=dn();Vi(r,s,i,c)}function Vi(r,s,i,c){var f={lane:c,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Il(r))og(s,f);else{var p=r.alternate;if(r.lanes===0&&(p===null||p.lanes===0)&&(p=s.lastRenderedReducer,p!==null))try{var v=s.lastRenderedState,w=p(v,i);if(f.hasEagerState=!0,f.eagerState=w,sn(w,v))return yl(r,s,f,0),Qe===null&&gl(),!1}catch{}if(i=Ju(r,s,f,c),i!==null)return Qt(i,r,c),lg(i,s,c),!0}return!1}function jd(r,s,i,c){if(c={lane:2,revertLane:ff(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Il(r)){if(s)throw Error(a(479))}else s=Ju(r,i,c,2),s!==null&&Qt(s,r,2)}function Il(r){var s=r.alternate;return r===Re||s!==null&&s===Re}function og(r,s){xa=Ol=!0;var i=r.pending;i===null?s.next=s:(s.next=i.next,i.next=s),r.pending=s}function lg(r,s,i){if((i&4194048)!==0){var c=s.lanes;c&=r.pendingLanes,i|=c,s.lanes=i,hp(r,i)}}var Gi={readContext:jt,use:jl,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot};Gi.useEffectEvent=ot;var cg={readContext:jt,use:jl,useCallback:function(r,s){return Bt().memoizedState=[r,s===void 0?null:s],r},useContext:jt,useEffect:Fm,useImperativeHandle:function(r,s,i){i=i!=null?i.concat([r]):null,Ml(4194308,4,Jm.bind(null,s,r),i)},useLayoutEffect:function(r,s){return Ml(4194308,4,r,s)},useInsertionEffect:function(r,s){Ml(4,2,r,s)},useMemo:function(r,s){var i=Bt();s=s===void 0?null:s;var c=r();if(Ps){Cr(!0);try{r()}finally{Cr(!1)}}return i.memoizedState=[c,s],c},useReducer:function(r,s,i){var c=Bt();if(i!==void 0){var f=i(s);if(Ps){Cr(!0);try{i(s)}finally{Cr(!1)}}}else f=s;return c.memoizedState=c.baseState=f,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:f},c.queue=r,r=r.dispatch=jE.bind(null,Re,r),[c.memoizedState,r]}
vendor: 9,064 bytes, line 9
9,useRef:function(r){var s=Bt();return r={current:r},s.memoizedState=r},useState:function(r){r=Ad(r);var s=r.queue,i=ig.bind(null,Re,s);return s.dispatch=i,[r.memoizedState,i]},useDebugValue:kd,useDeferredValue:function(r,s){var i=Bt();return Od(i,r,s)},useTransition:function(){var r=Ad(!1);return r=tg.bind(null,Re,r.queue,!0,!1),Bt().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,s,i){var c=Re,f=Bt();if(De){if(i===void 0)throw Error(a(407));i=i()}else{if(i=s(),Qe===null)throw Error(a(349));(je&127)!==0||Om(c,s,i)}f.memoizedState=i;var p={value:i,getSnapshot:s};return f.queue=p,Fm(Nm.bind(null,c,p,r),[r]),c.flags|=2048,Oa(9,{destroy:void 0},Lm.bind(null,c,p,i,s),null),i},useId:function(){var r=Bt(),s=Qe.identifierPrefix;if(De){var i=Un,c=In;i=(c&~(1<<32-rn(c)-1)).toString(32)+i,s="_"+s+"R_"+i,i=Ll++,0<i&&(s+="H"+i.toString(32)),s+="_"}else i=AE++,s="_"+s+"r_"+i.toString(32)+"_";return r.memoizedState=s},useHostTransitionStatus:Nd,useFormState:Bm,useActionState:Bm,useOptimistic:function(r){var s=Bt();s.memoizedState=s.baseState=r;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=i,s=jd.bind(null,Re,!0,i),i.dispatch=s,[r,s]},useMemoCache:Ed,useCacheRefresh:function(){return Bt().memoizedState=NE.bind(null,Re)},useEffectEvent:function(r){var s=Bt(),i={impl:r};return s.memoizedState=i,function(){if((Ve&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}},Pd={readContext:jt,use:jl,useCallback:Xm,useContext:jt,useEffect:xd,useImperativeHandle:Qm,useInsertionEffect:Ym,useLayoutEffect:Zm,useMemo:Wm,useReducer:Pl,useRef:Gm,useState:function(){return Pl(sr)},useDebugValue:kd,useDeferredValue:function(r,s){var i=dt();return eg(i,Ye.memoizedState,r,s)},useTransition:function(){var r=Pl(sr)[0],s=dt().memoizedState;return[typeof r=="boolean"?r:Hi(r),s]},useSyncExternalStore:km,useId:sg,useHostTransitionStatus:Nd,useFormState:qm,useActionState:qm,useOptimistic:function(r,s){var i=dt();return Mm(i,Ye,r,s)},useMemoCache:Ed,useCacheRefresh:ag};Pd.useEffectEvent=Km;var ug={readContext:jt,use:jl,useCallback:Xm,useContext:jt,useEffect:xd,useImperativeHandle:Qm,useInsertionEffect:Ym,useLayoutEffect:Zm,useMemo:Wm,useReducer:Td,useRef:Gm,useState:function(){return Td(sr)},useDebugValue:kd,useDeferredValue:function(r,s){var i=dt();return Ye===null?Od(i,r,s):eg(i,Ye.memoizedState,r,s)},useTransition:function(){var r=Td(sr)[0],s=dt().memoizedState;return[typeof r=="boolean"?r:Hi(r),s]},useSyncExternalStore:km,useId:sg,useHostTransitionStatus:Nd,useFormState:Vm,useActionState:Vm,useOptimistic:function(r,s){var i=dt();return Ye!==null?Mm(i,Ye,r,s):(i.baseState=r,[r,i.queue.dispatch])},useMemoCache:Ed,useCacheRefresh:ag};ug.useEffectEvent=Km;function Md(r,s,i,c){s=r.memoizedState,i=i(c,s),i=i==null?s:y({},s,i),r.memoizedState=i,r.lanes===0&&(r.updateQueue.baseState=i)}var Dd={enqueueSetState:function(r,s,i){r=r._reactInternals;var c=dn(),f=Mr(c);f.payload=s,i!=null&&(f.callback=i),s=Dr(r,f,c),s!==null&&(Qt(s,r,c),$i(s,r,c))},enqueueReplaceState:function(r,s,i){r=r._reactInternals;var c=dn(),f=Mr(c);f.tag=1,f.payload=s,i!=null&&(f.callback=i),s=Dr(r,f,c),s!==null&&(Qt(s,r,c),$i(s,r,c))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var i=dn(),c=Mr(i);c.tag=2,s!=null&&(c.callback=s),s=Dr(r,c,i),s!==null&&(Qt(s,r,i),$i(s,r,i))}};function dg(r,s,i,c,f,p,v){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,p,v):s.prototype&&s.prototype.isPureReactComponent?!Li(i,c)||!Li(f,p):!0}function fg(r,s,i,c){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(i,c),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(i,c),s.state!==r&&Dd.enqueueReplaceState(s,s.state,null)}function Ms(r,s){var i=s;if("ref"in s){i={};for(var c in s)c!=="ref"&&(i[c]=s[c])}if(r=r.defaultProps){i===s&&(i=y({},i));for(var f in r)i[f]===void 0&&(i[f]=r[f])}return i}function hg(r){ml(r)}function pg(r){console.error(r)}function mg(r){ml(r)}function Ul(r,s){try{var i=r.onUncaughtError;i(s.value,{componentStack:s.stack})}catch(c){setTimeout(function(){throw c})}}function gg(r,s,i){try{var c=r.onCaughtError;c(i.value,{componentStack:i.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Id(r,s,i){return i=Mr(i),i.tag=3,i.payload={element:null},i.callback=function(){Ul(r,s)},i}function yg(r){return r=Mr(r),r.tag=3,r}function vg(r,s,i,c){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var p=c.value;r.payload=function(){return f(p)},r.callback=function(){gg(s,i,c)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(r.callback=function(){gg(s,i,c),typeof f!="function"&&(qr===null?qr=new Set([this]):qr.add(this));var w=c.stack;this.componentDidCatch(c.value,{componentStack:w!==null?w:""})})}function PE(r,s,i,c,f){if(i.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(s=i.alternate,s!==null&&Sa(s,i,f,!0),i=on.current,i!==null){switch(i.tag){case 31:case 13:return Sn===null?Jl():i.alternate===null&<===0&&(lt=3),i.flags&=-257,i.flags|=65536,i.lanes=f,c===Tl?i.flags|=16384:(s=i.updateQueue,s===null?i.updateQueue=new Set([c]):s.add(c),cf(r,c,f)),!1;case 22:return i.flags|=65536,c===Tl?i.flags|=16384:(s=i.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([c])},i.updateQueue=s):(i=s.retryQueue,i===null?s.retryQueue=new Set([c]):i.add(c)),cf(r,c,f)),!1}throw Error(a(435,i.tag))}return cf(r,c,f),Jl(),!1}if(De)return s=on.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=f,c!==nd&&(r=Error(a(422),{cause:c}),Pi(vn(r,i)))):(c!==nd&&(s=Error(a(423),{cause:c}),Pi(vn(s,i))),r=r.current.alternate,r.flags|=65536,f&=-f,r.lanes|=f,c=vn(c,i),f=Id(r.stateNode,c,f),hd(r,f),lt!==4&&(lt=2)),!1;var p=Error(a(520),{cause:c});if(p=vn(p,i),Wi===null?Wi=[p]:Wi.push(p),lt!==4&&(lt=2),s===null)return!0;c=vn(c,i),i=s;do{switch(i.tag){case 3:return i.flags|=65536,r=f&-f,i.lanes|=r,r=Id(i.stateNode,c,r),hd(i,r),!1;case 1:if(s=i.type,p=i.stateNode,(i.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(qr===null||!qr.has(p))))return i.flags|=65536,f&=-f,i.lanes|=f,f=yg(f),vg(f,r,i,c),hd(i,f),!1}i=i.return}while(i!==null);return!1}var Ud=Error(a(461)),gt=!1;function Pt(r,s,i,c){s.child=r===null?Sm(s,null,i,c):js(s,r.child,i,c)}function bg(r,s,i,c,f){i=i.render;var p=s.ref;if("ref"in c){var v={};for(var w in c)w!=="ref"&&(v[w]=c[w])}else v=c;return ks(s),c=bd(r,s,i,v,p,f),w=_d(),r!==null&&!gt?(wd(r,s,f),ar(r,s,f)):(De&&w&&ed(s),s.flags|=1,Pt(r,s,c,f),s.child)}function _g(r,s,i,c,f){if(r===null){var p=i.type;return typeof p=="function"&&!Qu(p)&&p.defaultProps===void 0&&i.compare===null?(s.tag=15,s.type=p,wg(r,s,p,c,f)):(r=bl(i.type,null,c,s,s.mode,f),r.ref=s.ref,r.return=s,s.child=r)}if(p=r.child,!Fd(r,f)){var v=p.memoizedProps;if(i=i.compare,i=i!==null?i:Li,i(v,c)&&r.ref===s.ref)return ar(r,s,f)}return s.flags|=1,r=Wn(p,c),r.ref=s.ref,r.return=s,s.child=r}function wg(r,s,i,c,f){if(r!==null){var p=r.memoizedProps;if(Li(p,c)&&r.ref===s.ref)if(gt=!1,s.pendingProps=c=p,Fd(r,f))(r.flags&131072)!==0&&(gt=!0);else return s.lanes=r.lanes,ar(r,s,f)}return $d(r,s,i,c,f)}function Sg(r,s,i,c){var f=c.children,p=r!==null?r.memoizedState:null;if(r===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((s.flags&128)!==0){if(p=p!==null?p.baseLanes|i:i,r!==null){for(c=s.child=r.child,f=0;c!==null;)f=f|c.lanes|c.childLanes,c=c.sibling;c=f&~p}else c=0,s.child=null;return Eg(r,s,p,i,c)}if((i&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},r!==null&&El(s,p!==null?p.cachePool:null),p!==null?Tm(s,p):md(),Am(s);else return c=s.lanes=536870912,Eg(r,s,p!==null?p.baseLanes|i:i,i,c)}else p!==null?(El(s,p.cachePool),Tm(s,p),Ur(),s.memoizedState=null):(r!==null&&El(s,null),md(),Ur());return Pt(r,s,f,i),s.child}function Fi(r,s){return r!==null&&r.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function Eg(r,s,i,c,f){var p=cd();return p=p===null?null:{parent:pt._currentValue,pool:p},s.memoizedState={baseLanes:i,cachePool:p},r!==null&&El(s,null),md(),Am(s),r!==null&&Sa(r,s,c,!0),s.childLanes=f,null}function $l(r,s){return s=Bl({mode:s.mode,children:s.children},r.mode),s.ref=r.ref,r.child=s,s.return=r,s}function Rg(r,s,i){return js(s,r.child,null,i),r=$l(s,s.pendingProps),r.flags|=2,ln(s),s.memoizedState=null,r}function ME(r,s,i){var c=s.pendingProps,f=(s.flags&128)!==0;if(s.flags&=-129,r===null){if(De){if(c.mode==="hidden")return r=$l(s,c),s.lanes=536870912,Fi(null,r);if(yd(s),(r=nt)?(r=Dy(r,wn),r=r!==null&&r.data==="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:Or!==null?{id:In,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},i=om(r),i.return=s,s.child=i,Nt=s,nt=null)):r=null,r===null)throw Nr(s);return s.lanes=536870912,null}
vendor: 4,911 bytes, line 9
9return $l(s,c)}var p=r.memoizedState;if(p!==null){var v=p.dehydrated;if(yd(s),f)if(s.flags&256)s.flags&=-257,s=Rg(r,s,i);else if(s.memoizedState!==null)s.child=r.child,s.flags|=128,s=null;else throw Error(a(558));else if(gt||Sa(r,s,i,!1),f=(i&r.childLanes)!==0,gt||f){if(c=Qe,c!==null&&(v=pp(c,i),v!==0&&v!==p.retryLane))throw p.retryLane=v,Ts(r,v),Qt(c,r,v),Ud;Jl(),s=Rg(r,s,i)}else r=p.treeContext,nt=En(v.nextSibling),Nt=s,De=!0,Lr=null,wn=!1,r!==null&&um(s,r),s=$l(s,c),s.flags|=4096;return s}return r=Wn(r.child,{mode:c.mode,children:c.children}),r.ref=s.ref,s.child=r,r.return=s,r}function zl(r,s){var i=s.ref;if(i===null)r!==null&&r.ref!==null&&(s.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(a(284));(r===null||r.ref!==i)&&(s.flags|=4194816)}}function $d(r,s,i,c,f){return ks(s),i=bd(r,s,i,c,void 0,f),c=_d(),r!==null&&!gt?(wd(r,s,f),ar(r,s,f)):(De&&c&&ed(s),s.flags|=1,Pt(r,s,i,f),s.child)}function Tg(r,s,i,c,f,p){return ks(s),s.updateQueue=null,i=xm(s,c,i,f),Cm(r),c=_d(),r!==null&&!gt?(wd(r,s,p),ar(r,s,p)):(De&&c&&ed(s),s.flags|=1,Pt(r,s,i,p),s.child)}function Ag(r,s,i,c,f){if(ks(s),s.stateNode===null){var p=va,v=i.contextType;typeof v=="object"&&v!==null&&(p=jt(v)),p=new i(c,p),s.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Dd,s.stateNode=p,p._reactInternals=s,p=s.stateNode,p.props=c,p.state=s.memoizedState,p.refs={},dd(s),v=i.contextType,p.context=typeof v=="object"&&v!==null?jt(v):va,p.state=s.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(Md(s,i,v,c),p.state=s.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(v=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),v!==p.state&&Dd.enqueueReplaceState(p,p.state,null),Bi(s,c,p,f),zi(),p.state=s.memoizedState),typeof p.componentDidMount=="function"&&(s.flags|=4194308),c=!0}else if(r===null){p=s.stateNode;var w=s.memoizedProps,A=Ms(i,w);p.props=A;var P=p.context,B=i.contextType;v=va,typeof B=="object"&&B!==null&&(v=jt(B));var G=i.getDerivedStateFromProps;B=typeof G=="function"||typeof p.getSnapshotBeforeUpdate=="function",w=s.pendingProps!==w,B||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(w||P!==v)&&fg(s,p,c,v),Pr=!1;var I=s.memoizedState;p.state=I,Bi(s,c,p,f),zi(),P=s.memoizedState,w||I!==P||Pr?(typeof G=="function"&&(Md(s,i,G,c),P=s.memoizedState),(A=Pr||dg(s,i,A,c,I,P,v))?(B||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(s.flags|=4194308)):(typeof p.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=c,s.memoizedState=P),p.props=c,p.state=P,p.context=v,c=A):(typeof p.componentDidMount=="function"&&(s.flags|=4194308),c=!1)}else{p=s.stateNode,fd(r,s),v=s.memoizedProps,B=Ms(i,v),p.props=B,G=s.pendingProps,I=p.context,P=i.contextType,A=va,typeof P=="object"&&P!==null&&(A=jt(P)),w=i.getDerivedStateFromProps,(P=typeof w=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(v!==G||I!==A)&&fg(s,p,c,A),Pr=!1,I=s.memoizedState,p.state=I,Bi(s,c,p,f),zi();var $=s.memoizedState;v!==G||I!==$||Pr||r!==null&&r.dependencies!==null&&wl(r.dependencies)?(typeof w=="function"&&(Md(s,i,w,c),$=s.memoizedState),(B=Pr||dg(s,i,B,c,I,$,A)||r!==null&&r.dependencies!==null&&wl(r.dependencies))?(P||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(c,$,A),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(c,$,A)),typeof p.componentDidUpdate=="function"&&(s.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof p.componentDidUpdate!="function"||v===r.memoizedProps&&I===r.memoizedState||(s.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===r.memoizedProps&&I===r.memoizedState||(s.flags|=1024),s.memoizedProps=c,s.memoizedState=$),p.props=c,p.state=$,p.context=A,c=B):(typeof p.componentDidUpdate!="function"||v===r.memoizedProps&&I===r.memoizedState||(s.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===r.memoizedProps&&I===r.memoizedState||(s.flags|=1024),c=!1)}return p=c,zl(r,s),c=(s.flags&128)!==0,p||c?(p=s.stateNode,i=c&&typeof i.getDerivedStateFromError!="function"?null:p.render(),s.flags|=1,r!==null&&c?(s.child=js(s,r.child,null,f),s.child=js(s,null,i,f)):Pt(r,s,i,f),s.memoizedState=p.state,r=s.child):r=ar(r,
vendor: 5,729 bytes, line 9
9s,f),r}function Cg(r,s,i,c){return Cs(),s.flags|=256,Pt(r,s,i,c),s.child}var zd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bd(r){return{baseLanes:r,cachePool:gm()}}function qd(r,s,i){return r=r!==null?r.childLanes&~i:0,s&&(r|=un),r}function xg(r,s,i){var c=s.pendingProps,f=!1,p=(s.flags&128)!==0,v;if((v=p)||(v=r!==null&&r.memoizedState===null?!1:(ut.current&2)!==0),v&&(f=!0,s.flags&=-129),v=(s.flags&32)!==0,s.flags&=-33,r===null){if(De){if(f?Ir(s):Ur(),(r=nt)?(r=Dy(r,wn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:Or!==null?{id:In,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},i=om(r),i.return=s,s.child=i,Nt=s,nt=null)):r=null,r===null)throw Nr(s);return Tf(r)?s.lanes=32:s.lanes=536870912,null}var w=c.children;return c=c.fallback,f?(Ur(),f=s.mode,w=Bl({mode:"hidden",children:w},f),c=As(c,f,i,null),w.return=s,c.return=s,w.sibling=c,s.child=w,c=s.child,c.memoizedState=Bd(i),c.childLanes=qd(r,v,i),s.memoizedState=zd,Fi(null,c)):(Ir(s),Hd(s,w))}var A=r.memoizedState;if(A!==null&&(w=A.dehydrated,w!==null)){if(p)s.flags&256?(Ir(s),s.flags&=-257,s=Vd(r,s,i)):s.memoizedState!==null?(Ur(),s.child=r.child,s.flags|=128,s=null):(Ur(),w=c.fallback,f=s.mode,c=Bl({mode:"visible",children:c.children},f),w=As(w,f,i,null),w.flags|=2,c.return=s,w.return=s,c.sibling=w,s.child=c,js(s,r.child,null,i),c=s.child,c.memoizedState=Bd(i),c.childLanes=qd(r,v,i),s.memoizedState=zd,s=Fi(null,c));else if(Ir(s),Tf(w)){if(v=w.nextSibling&&w.nextSibling.dataset,v)var P=v.dgst;v=P,c=Error(a(419)),c.stack="",c.digest=v,Pi({value:c,source:null,stack:null}),s=Vd(r,s,i)}else if(gt||Sa(r,s,i,!1),v=(i&r.childLanes)!==0,gt||v){if(v=Qe,v!==null&&(c=pp(v,i),c!==0&&c!==A.retryLane))throw A.retryLane=c,Ts(r,c),Qt(v,r,c),Ud;Rf(w)||Jl(),s=Vd(r,s,i)}else Rf(w)?(s.flags|=192,s.child=r.child,s=null):(r=A.treeContext,nt=En(w.nextSibling),Nt=s,De=!0,Lr=null,wn=!1,r!==null&&um(s,r),s=Hd(s,c.children),s.flags|=4096);return s}return f?(Ur(),w=c.fallback,f=s.mode,A=r.child,P=A.sibling,c=Wn(A,{mode:"hidden",children:c.children}),c.subtreeFlags=A.subtreeFlags&65011712,P!==null?w=Wn(P,w):(w=As(w,f,i,null),w.flags|=2),w.return=s,c.return=s,c.sibling=w,s.child=c,Fi(null,c),c=s.child,w=r.child.memoizedState,w===null?w=Bd(i):(f=w.cachePool,f!==null?(A=pt._currentValue,f=f.parent!==A?{parent:A,pool:A}:f):f=gm(),w={baseLanes:w.baseLanes|i,cachePool:f}),c.memoizedState=w,c.childLanes=qd(r,v,i),s.memoizedState=zd,Fi(r.child,c)):(Ir(s),i=r.child,r=i.sibling,i=Wn(i,{mode:"visible",children:c.children}),i.return=s,i.sibling=null,r!==null&&(v=s.deletions,v===null?(s.deletions=[r],s.flags|=16):v.push(r)),s.child=i,s.memoizedState=null,i)}function Hd(r,s){return s=Bl({mode:"visible",children:s},r.mode),s.return=r,r.child=s}function Bl(r,s){return r=an(22,r,null,s),r.lanes=0,r}function Vd(r,s,i){return js(s,r.child,null,i),r=Hd(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function kg(r,s,i){r.lanes|=s;var c=r.alternate;c!==null&&(c.lanes|=s),ad(r.return,s,i)}function Gd(r,s,i,c,f,p){var v=r.memoizedState;v===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:c,tail:i,tailMode:f,treeForkCount:p}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=c,v.tail=i,v.tailMode=f,v.treeForkCount=p)}function Og(r,s,i){var c=s.pendingProps,f=c.revealOrder,p=c.tail;c=c.children;var v=ut.current,w=(v&2)!==0;if(w?(v=v&1|2,s.flags|=128):v&=1,Q(ut,v),Pt(r,s,c,i),c=De?ji:0,!w&&r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&kg(r,i,s);else if(r.tag===19)kg(r,i,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(f){case"forwards":for(i=s.child,f=null;i!==null;)r=i.alternate,r!==null&&kl(r)===null&&(f=i),i=i.sibling;i=f,i===null?(f=s.child,s.child=null):(f=i.sibling,i.sibling=null),Gd(s,!1,f,i,p,c);break;case"backwards":case"unstable_legacy-backwards":for(i=null,f=s.child,s.child=null;f!==null;){if(r=f.alternate,r!==null&&kl(r)===null){s.child=f;break}r=f.sibling,f.sibling=i,i=f,f=r}Gd(s,!0,i,null,p,c);break;case"together":Gd(s,!1,null,null,void 0,c);break;default:s.memoizedState=null}return s.child}function ar(r,s,i){if(r!==null&&(s.dependencies=r.dependencies),Br|=s.lanes,(i&s.childLanes)===0)if(r!==null){if(Sa(r,s,i,!1),(i&s.childLanes)===0)return null}else return null;if(r!==null&&s.child!==r.child)throw Error(a(153));if(s.child!==null){for(r=s.child,i=Wn(r,r.pendingProps),s.child=i,i.return=s;r.sibling!==null;)r=r.sibling,i=i.sibling=Wn(r,r.pendingProps),i.return=s;i.sibling=null}return s.child}function Fd(r,s){return(r.lanes&s)!==0?!0:(r=r.dependencies,!!(r!==null&&wl(r)))}function DE(r,s,i){switch(s.tag){case 3:st(s,s.stateNode.containerInfo),jr(s,pt,r.memoizedState.cache),Cs();break;case 27:case 5:pn(s);break;case 4:st(s,s.stateNode.containerInfo);break;case 10:jr(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,yd(s),null;break;case 13:var c=s.memoizedState;if(c!==null)return c.dehydrated!==null?(Ir(s),s.flags|=128,null):(i&s.child.childLanes)!==0?xg(r,s,i):(Ir(s),r=ar(r,s,i),r!==null?r.sibling:null);Ir(s);break;case 19:var f=(r.flags&128)!==0;if(c=(i&s.childLanes)!==0,c||(Sa(r,s,i,!1),c=(i&s.childLanes)!==0),f){if(c)return Og(r,s,i);s.flags|=128}if(f=s.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),Q(ut,ut.current),c)break;return null;case 22:return s.lanes=0,Sg(r,s,i,s.pendingProps);case 24:jr(s,pt,r.memoizedState.cache)}return ar(r,s,i)}function Lg(r,s,i){if(r!==null)if(r.memoizedProps!==s.pendingProps)gt=!0;
vendor: 2,163 bytes, line 9
9else{if(!Fd(r,i)&&(s.flags&128)===0)return gt=!1,DE(r,s,i);gt=(r.flags&131072)!==0}else gt=!1,De&&(s.flags&1048576)!==0&&cm(s,ji,s.index);switch(s.lanes=0,s.tag){case 16:e:{var c=s.pendingProps;if(r=Ls(s.elementType),s.type=r,typeof r=="function")Qu(r)?(c=Ms(r,c),s.tag=1,s=Ag(null,s,r,c,i)):(s.tag=0,s=$d(null,s,r,c,i));else{if(r!=null){var f=r.$$typeof;if(f===N){s.tag=11,s=bg(null,s,r,c,i);break e}else if(f===z){s.tag=14,s=_g(null,s,r,c,i);break e}}throw s=tt(r)||r,Error(a(306,s,""))}}return s;case 0:return $d(r,s,s.type,s.pendingProps,i);case 1:return c=s.type,f=Ms(c,s.pendingProps),Ag(r,s,c,f,i);case 3:e:{if(st(s,s.stateNode.containerInfo),r===null)throw Error(a(387));c=s.pendingProps;var p=s.memoizedState;f=p.element,fd(r,s),Bi(s,c,null,i);var v=s.memoizedState;if(c=v.cache,jr(s,pt,c),c!==p.cache&&id(s,[pt],i,!0),zi(),c=v.element,p.isDehydrated)if(p={element:c,isDehydrated:!1,cache:v.cache},s.updateQueue.baseState=p,s.memoizedState=p,s.flags&256){s=Cg(r,s,c,i);break e}else if(c!==f){f=vn(Error(a(424)),s),Pi(f),s=Cg(r,s,c,i);break e}else for(r=s.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,nt=En(r.firstChild),Nt=s,De=!0,Lr=null,wn=!0,i=Sm(s,null,c,i),s.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Cs(),c===f){s=ar(r,s,i);break e}Pt(r,s,c,i)}s=s.child}return s;case 26:return zl(r,s),r===null?(i=qy(s.type,null,s.pendingProps,null))?s.memoizedState=i:De||(i=s.type,r=s.pendingProps,c=rc(ge.current).createElement(i),c[Lt]=s,c[Gt]=r,Mt(c,i,r),Rt(c),s.stateNode=c):s.memoizedState=qy(s.type,r.memoizedProps,s.pendingProps,r.memoizedState),null;case 27:return pn(s),r===null&&De&&(c=s.stateNode=$y(s.type,s.pendingProps,ge.current),Nt=s,wn=!0,f=nt,Fr(s.type)?(Af=f,nt=En(c.firstChild)):nt=f),Pt(r,s,s.pendingProps.children,i),zl(r,s),r===null&&(s.flags|=4194304),s.child;case 5:return r===null&&De&&((f=c=nt)&&(c=fR(c,s.type,s.pendingProps,wn),c!==null?(s.stateNode=c,Nt=s,nt=En(c.firstChild),wn=!1,f=!0):f=!1),f||Nr(s)),pn(s),f=s.type,p=s.pendingProps,v=r!==null?r.memoizedProps:null,c=p.children,wf(f,p)?c=null:v!==null&&wf(f,v)&&(s.flags|=32),s.memoizedState!==null&&(f=bd(r,s,CE,null,
vendor: 4,244 bytes, line 9
9null,i),oo._currentValue=f),zl(r,s),Pt(r,s,c,i),s.child;case 6:return r===null&&De&&((r=i=nt)&&(i=hR(i,s.pendingProps,wn),i!==null?(s.stateNode=i,Nt=s,nt=null,r=!0):r=!1),r||Nr(s)),null;case 13:return xg(r,s,i);case 4:return st(s,s.stateNode.containerInfo),c=s.pendingProps,r===null?s.child=js(s,null,c,i):Pt(r,s,c,i),s.child;case 11:return bg(r,s,s.type,s.pendingProps,i);case 7:return Pt(r,s,s.pendingProps,i),s.child;case 8:return Pt(r,s,s.pendingProps.children,i),s.child;case 12:return Pt(r,s,s.pendingProps.children,i),s.child;case 10:return c=s.pendingProps,jr(s,s.type,c.value),Pt(r,s,c.children,i),s.child;case 9:return f=s.type._context,c=s.pendingProps.children,ks(s),f=jt(f),c=c(f),s.flags|=1,Pt(r,s,c,i),s.child;case 14:return _g(r,s,s.type,s.pendingProps,i);case 15:return wg(r,s,s.type,s.pendingProps,i);case 19:return Og(r,s,i);case 31:return ME(r,s,i);case 22:return Sg(r,s,i,s.pendingProps);case 24:return ks(s),c=jt(pt),r===null?(f=cd(),f===null&&(f=Qe,p=od(),f.pooledCache=p,p.refCount++,p!==null&&(f.pooledCacheLanes|=i),f=p),s.memoizedState={parent:c,cache:f},dd(s),jr(s,pt,f)):((r.lanes&i)!==0&&(fd(r,s),Bi(s,null,null,i),zi()),f=r.memoizedState,p=s.memoizedState,f.parent!==c?(f={parent:c,cache:c},s.memoizedState=f,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=f),jr(s,pt,c)):(c=p.cache,jr(s,pt,c),c!==f.cache&&id(s,[pt],i,!0))),Pt(r,s,s.pendingProps.children,i),s.child;case 29:throw s.pendingProps}throw Error(a(156,s.tag))}function ir(r){r.flags|=4}function Kd(r,s,i,c,f){if((s=(r.mode&32)!==0)&&(s=!1),s){if(r.flags|=16777216,(f&335544128)===f)if(r.stateNode.complete)r.flags|=8192;else if(sy())r.flags|=8192;else throw Ns=Tl,ud}else r.flags&=-16777217}function Ng(r,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Ky(s))if(sy())r.flags|=8192;else throw Ns=Tl,ud}function ql(r,s){s!==null&&(r.flags|=4),r.flags&16384&&(s=r.tag!==22?dp():536870912,r.lanes|=s,Pa|=s)}function Ki(r,s){if(!De)switch(r.tailMode){case"hidden":s=r.tail;for(var i=null;s!==null;)s.alternate!==null&&(i=s),s=s.sibling;i===null?r.tail=null:i.sibling=null;break;case"collapsed":i=r.tail;for(var c=null;i!==null;)i.alternate!==null&&(c=i),i=i.sibling;c===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function rt(r){var s=r.alternate!==null&&r.alternate.child===r.child,i=0,c=0;if(s)for(var f=r.child;f!==null;)i|=f.lanes|f.childLanes,c|=f.subtreeFlags&65011712,c|=f.flags&65011712,f.return=r,f=f.sibling;else for(f=r.child;f!==null;)i|=f.lanes|f.childLanes,c|=f.subtreeFlags,c|=f.flags,f.return=r,f=f.sibling;return r.subtreeFlags|=c,r.childLanes=i,s}function IE(r,s,i){var c=s.pendingProps;switch(td(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(s),null;case 1:return rt(s),null;case 3:return i=s.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),nr(pt),_e(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(r===null||r.child===null)&&(wa(s)?ir(s):r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,rd())),rt(s),null;case 26:var f=s.type,p=s.memoizedState;return r===null?(ir(s),p!==null?(rt(s),Ng(s,p)):(rt(s),Kd(s,f,null,c,i))):p?p!==r.memoizedState?(ir(s),rt(s),Ng(s,p)):(rt(s),s.flags&=-16777217):(r=r.memoizedProps,r!==c&&ir(s),rt(s),Kd(s,f,r,c,i)),null;case 27:if(Vt(s),i=ge.current,f=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==c&&ir(s);else{if(!c){if(s.stateNode===null)throw Error(a(166));return rt(s),null}r=re.current,wa(s)?dm(s):(r=$y(f,c,i),s.stateNode=r,ir(s))}return rt(s),null;case 5:if(Vt(s),f=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==c&&ir(s);else{if(!c){if(s.stateNode===null)throw Error(a(166));return rt(s),null}if(p=re.current,wa(s))dm(s);else{var v=rc(ge.current);switch(p){case 1:p=v.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:p=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":p=v.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":p=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":p=v.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;
vendor: 24,610 bytes, line 9
9case"select":p=typeof c.is=="string"?v.createElement("select",{is:c.is}):v.createElement("select"),c.multiple?p.multiple=!0:c.size&&(p.size=c.size);break;default:p=typeof c.is=="string"?v.createElement(f,{is:c.is}):v.createElement(f)}}p[Lt]=s,p[Gt]=c;e:for(v=s.child;v!==null;){if(v.tag===5||v.tag===6)p.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===s)break e;for(;v.sibling===null;){if(v.return===null||v.return===s)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}s.stateNode=p;e:switch(Mt(p,f,c),f){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&ir(s)}}return rt(s),Kd(s,s.type,r===null?null:r.memoizedProps,s.pendingProps,i),null;case 6:if(r&&s.stateNode!=null)r.memoizedProps!==c&&ir(s);else{if(typeof c!="string"&&s.stateNode===null)throw Error(a(166));if(r=ge.current,wa(s)){if(r=s.stateNode,i=s.memoizedProps,c=null,f=Nt,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}r[Lt]=s,r=!!(r.nodeValue===i||c!==null&&c.suppressHydrationWarning===!0||xy(r.nodeValue,i)),r||Nr(s,!0)}else r=rc(r).createTextNode(c),r[Lt]=s,s.stateNode=r}return rt(s),null;case 31:if(i=s.memoizedState,r===null||r.memoizedState!==null){if(c=wa(s),i!==null){if(r===null){if(!c)throw Error(a(318));if(r=s.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[Lt]=s}else Cs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;rt(s),r=!1}else i=rd(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=i),r=!0;if(!r)return s.flags&256?(ln(s),s):(ln(s),null);if((s.flags&128)!==0)throw Error(a(558))}return rt(s),null;case 13:if(c=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(f=wa(s),c!==null&&c.dehydrated!==null){if(r===null){if(!f)throw Error(a(318));if(f=s.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));f[Lt]=s}else Cs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;rt(s),f=!1}else f=rd(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=f),f=!0;if(!f)return s.flags&256?(ln(s),s):(ln(s),null)}return ln(s),(s.flags&128)!==0?(s.lanes=i,s):(i=c!==null,r=r!==null&&r.memoizedState!==null,i&&(c=s.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),p=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(p=c.memoizedState.cachePool.pool),p!==f&&(c.flags|=2048)),i!==r&&i&&(s.child.flags|=8192),ql(s,s.updateQueue),rt(s),null);case 4:return _e(),r===null&&gf(s.stateNode.containerInfo),rt(s),null;case 10:return nr(s.type),rt(s),null;case 19:if(H(ut),c=s.memoizedState,c===null)return rt(s),null;if(f=(s.flags&128)!==0,p=c.rendering,p===null)if(f)Ki(c,!1);else{if(lt!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(p=kl(r),p!==null){for(s.flags|=128,Ki(c,!1),r=p.updateQueue,s.updateQueue=r,ql(s,r),s.subtreeFlags=0,r=i,i=s.child;i!==null;)im(i,r),i=i.sibling;return Q(ut,ut.current&1|2),De&&er(s,c.treeForkCount),s.child}r=r.sibling}c.tail!==null&&Dt()>Kl&&(s.flags|=128,f=!0,Ki(c,!1),s.lanes=4194304)}else{if(!f)if(r=kl(p),r!==null){if(s.flags|=128,f=!0,r=r.updateQueue,s.updateQueue=r,ql(s,r),Ki(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!De)return rt(s),null}else 2*Dt()-c.renderingStartTime>Kl&&i!==536870912&&(s.flags|=128,f=!0,Ki(c,!1),s.lanes=4194304);c.isBackwards?(p.sibling=s.child,s.child=p):(r=c.last,r!==null?r.sibling=p:s.child=p,c.last=p)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=Dt(),r.sibling=null,i=ut.current,Q(ut,f?i&1|2:i&1),De&&er(s,c.treeForkCount),r):(rt(s),null);case 22:case 23:return ln(s),gd(),c=s.memoizedState!==null,r!==null?r.memoizedState!==null!==c&&(s.flags|=8192):c&&(s.flags|=8192),c?(i&536870912)!==0&&(s.flags&128)===0&&(rt(s),s.subtreeFlags&6&&(s.flags|=8192)):rt(s),i=s.updateQueue,i!==null&&ql(s,i.retryQueue),i=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==i&&(s.flags|=2048),r!==null&&H(Os),null;case 24:return i=null,r!==null&&(i=r.memoizedState.cache),s.memoizedState.cache!==i&&(s.flags|=2048),nr(pt),rt(s),null;case 25:return null;case 30:return null}throw Error(a(156,s.tag))}function UE(r,s){switch(td(s),s.tag){case 1:return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return nr(pt),_e(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 26:case 27:case 5:return Vt(s),null;case 31:if(s.memoizedState!==null){if(ln(s),s.alternate===null)throw Error(a(340));Cs()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 13:if(ln(s),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(a(340));Cs()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return H(ut),null;case 4:return _e(),null;case 10:return nr(s.type),null;case 22:case 23:return ln(s),gd(),r!==null&&H(Os),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 24:return nr(pt),null;case 25:return null;default:return null}}function jg(r,s){switch(td(s),s.tag){case 3:nr(pt),_e();break;case 26:case 27:case 5:Vt(s);break;case 4:_e();break;case 31:s.memoizedState!==null&&ln(s);break;case 13:ln(s);break;case 19:H(ut);break;case 10:nr(s.type);break;case 22:case 23:ln(s),gd(),r!==null&&H(Os);break;case 24:nr(pt)}}function Yi(r,s){try{var i=s.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var f=c.next;i=f;do{if((i.tag&r)===r){c=void 0;var p=i.create,v=i.inst;c=p(),v.destroy=c}i=i.next}while(i!==f)}}catch(w){Ke(s,s.return,w)}}function $r(r,s,i){try{var c=s.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var p=f.next;c=p;do{if((c.tag&r)===r){var v=c.inst,w=v.destroy;if(w!==void 0){v.destroy=void 0,f=s;var A=i,P=w;try{P()}catch(B){Ke(f,A,B)}}}c=c.next}while(c!==p)}}catch(B){Ke(s,s.return,B)}}function Pg(r){var s=r.updateQueue;if(s!==null){var i=r.stateNode;try{Rm(s,i)}catch(c){Ke(r,r.return,c)}}}function Mg(r,s,i){i.props=Ms(r.type,r.memoizedProps),i.state=r.memoizedState;try{i.componentWillUnmount()}catch(c){Ke(r,s,c)}}function Zi(r,s){try{var i=r.ref;if(i!==null){switch(r.tag){case 26:case 27:case 5:var c=r.stateNode;break;case 30:c=r.stateNode;break;default:c=r.stateNode}typeof i=="function"?r.refCleanup=i(c):i.current=c}}catch(f){Ke(r,s,f)}}function $n(r,s){var i=r.ref,c=r.refCleanup;if(i!==null)if(typeof c=="function")try{c()}catch(f){Ke(r,s,f)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){Ke(r,s,f)}else i.current=null}function Dg(r){var s=r.type,i=r.memoizedProps,c=r.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":i.autoFocus&&c.focus();break e;case"img":i.src?c.src=i.src:i.srcSet&&(c.srcset=i.srcSet)}}catch(f){Ke(r,r.return,f)}}function Yd(r,s,i){try{var c=r.stateNode;iR(c,r.type,i,s),c[Gt]=s}catch(f){Ke(r,r.return,f)}}function Ig(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Fr(r.type)||r.tag===4}function Zd(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Ig(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Fr(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Jd(r,s,i){var c=r.tag;if(c===5||c===6)r=r.stateNode,s?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(r,s):(s=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,s.appendChild(r),i=i._reactRootContainer,i!=null||s.onclick!==null||(s.onclick=Qn));else if(c!==4&&(c===27&&Fr(r.type)&&(i=r.stateNode,s=null),r=r.child,r!==null))for(Jd(r,s,i),r=r.sibling;r!==null;)Jd(r,s,i),r=r.sibling}function Hl(r,s,i){var c=r.tag;if(c===5||c===6)r=r.stateNode,s?i.insertBefore(r,s):i.appendChild(r);else if(c!==4&&(c===27&&Fr(r.type)&&(i=r.stateNode),r=r.child,r!==null))for(Hl(r,s,i),r=r.sibling;r!==null;)Hl(r,s,i),r=r.sibling}function Ug(r){var s=r.stateNode,i=r.memoizedProps;try{for(var c=r.type,f=s.attributes;f.length;)s.removeAttributeNode(f[0]);Mt(s,c,i),s[Lt]=r,s[Gt]=i}catch(p){Ke(r,r.return,p)}}var or=!1,yt=!1,Qd=!1,$g=typeof WeakSet=="function"?WeakSet:Set,Tt=null;function $E(r,s){if(r=r.containerInfo,bf=uc,r=Qp(r),Vu(r)){if("selectionStart"in r)var i={start:r.selectionStart,end:r.selectionEnd};else e:{i=(i=r.ownerDocument)&&i.defaultView||window;var c=i.getSelection&&i.getSelection();if(c&&c.rangeCount!==0){i=c.anchorNode;var f=c.anchorOffset,p=c.focusNode;c=c.focusOffset;try{i.nodeType,p.nodeType}catch{i=null;break e}var v=0,w=-1,A=-1,P=0,B=0,G=r,I=null;t:for(;;){for(var $;G!==i||f!==0&&G.nodeType!==3||(w=v+f),G!==p||c!==0&&G.nodeType!==3||(A=v+c),G.nodeType===3&&(v+=G.nodeValue.length),($=G.firstChild)!==null;)I=G,G=$;for(;;){if(G===r)break t;if(I===i&&++P===f&&(w=v),I===p&&++B===c&&(A=v),($=G.nextSibling)!==null)break;G=I,I=G.parentNode}G=$}i=w===-1||A===-1?null:{start:w,end:A}}else i=null}i=i||{start:0,end:0}}else i=null;for(_f={focusedElem:r,selectionRange:i},uc=!1,Tt=s;Tt!==null;)if(s=Tt,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,Tt=r;else for(;Tt!==null;){switch(s=Tt,p=s.alternate,r=s.flags,s.tag){case 0:if((r&4)!==0&&(r=s.updateQueue,r=r!==null?r.events:null,r!==null))for(i=0;i<r.length;i++)f=r[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&p!==null){r=void 0,i=s,f=p.memoizedProps,p=p.memoizedState,c=i.stateNode;try{var oe=Ms(i.type,f);r=c.getSnapshotBeforeUpdate(oe,p),c.__reactInternalSnapshotBeforeUpdate=r}catch(be){Ke(i,i.return,be)}}break;case 3:if((r&1024)!==0){if(r=s.stateNode.containerInfo,i=r.nodeType,i===9)Ef(r);else if(i===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Ef(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=s.sibling,r!==null){r.return=s.return,Tt=r;break}Tt=s.return}}function zg(r,s,i){var c=i.flags;switch(i.tag){case 0:case 11:case 15:cr(r,i),c&4&&Yi(5,i);break;case 1:if(cr(r,i),c&4)if(r=i.stateNode,s===null)try{r.componentDidMount()}catch(v){Ke(i,i.return,v)}else{var f=Ms(i.type,s.memoizedProps);s=s.memoizedState;try{r.componentDidUpdate(f,s,r.__reactInternalSnapshotBeforeUpdate)}catch(v){Ke(i,i.return,v)}}c&64&&Pg(i),c&512&&Zi(i,i.return);break;case 3:if(cr(r,i),c&64&&(r=i.updateQueue,r!==null)){if(s=null,i.child!==null)switch(i.child.tag){case 27:case 5:s=i.child.stateNode;break;case 1:s=i.child.stateNode}try{Rm(r,s)}catch(v){Ke(i,i.return,v)}}break;case 27:s===null&&c&4&&Ug(i);case 26:case 5:cr(r,i),s===null&&c&4&&Dg(i),c&512&&Zi(i,i.return);break;case 12:cr(r,i);break;case 31:cr(r,i),c&4&&Hg(r,i);break;case 13:cr(r,i),c&4&&Vg(r,i),c&64&&(r=i.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(i=YE.bind(null,i),pR(r,i))));break;case 22:if(c=i.memoizedState!==null||or,!c){s=s!==null&&s.memoizedState!==null||yt,f=or;var p=yt;or=c,(yt=s)&&!p?ur(r,i,(i.subtreeFlags&8772)!==0):cr(r,i),or=f,yt=p}break;case 30:break;default:cr(r,i)}}function Bg(r){var s=r.alternate;s!==null&&(r.alternate=null,Bg(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&Cu(s)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var at=null,Kt=!1;function lr(r,s,i){for(i=i.child;i!==null;)qg(r,s,i),i=i.sibling}function qg(r,s,i){if(nn&&typeof nn.onCommitFiberUnmount=="function")try{nn.onCommitFiberUnmount(bi,i)}catch{}switch(i.tag){case 26:yt||$n(i,s),lr(r,s,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:yt||$n(i,s);var c=at,f=Kt;Fr(i.type)&&(at=i.stateNode,Kt=!1),lr(r,s,i),so(i.stateNode),at=c,Kt=f;break;case 5:yt||$n(i,s);case 6:if(c=at,f=Kt,at=null,lr(r,s,i),at=c,Kt=f,at!==null)if(Kt)try{(at.nodeType===9?at.body:at.nodeName==="HTML"?at.ownerDocument.body:at).removeChild(i.stateNode)}catch(p){Ke(i,s,p)}else try{at.removeChild(i.stateNode)}catch(p){Ke(i,s,p)}break;case 18:at!==null&&(Kt?(r=at,Py(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,i.stateNode),qa(r)):Py(at,i.stateNode));break;case 4:c=at,f=Kt,at=i.stateNode.containerInfo,Kt=!0,lr(r,s,i),at=c,Kt=f;break;case 0:case 11:case 14:case 15:$r(2,i,s),yt||$r(4,i,s),lr(r,s,i);break;case 1:yt||($n(i,s),c=i.stateNode,typeof c.componentWillUnmount=="function"&&Mg(i,s,c)),lr(r,s,i);break;case 21:lr(r,s,i);break;case 22:yt=(c=yt)||i.memoizedState!==null,lr(r,s,i),yt=c;break;default:lr(r,s,i)}}function Hg(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{qa(r)}catch(i){Ke(s,s.return,i)}}}function Vg(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{qa(r)}catch(i){Ke(s,s.return,i)}}function zE(r){switch(r.tag){case 31:case 13:case 19:var s=r.stateNode;return s===null&&(s=r.stateNode=new $g),s;case 22:return r=r.stateNode,s=r._retryCache,s===null&&(s=r._retryCache=new $g),s;default:throw Error(a(435,r.tag))}}function Vl(r,s){var i=zE(r);s.forEach(function(c){if(!i.has(c)){i.add(c);var f=ZE.bind(null,r,c);c.then(f,f)}})}function Yt(r,s){var i=s.deletions;if(i!==null)for(var c=0;c<i.length;c++){var f=i[c],p=r,v=s,w=v;e:for(;w!==null;){switch(w.tag){case 27:if(Fr(w.type)){at=w.stateNode,Kt=!1;break e}break;case 5:at=w.stateNode,Kt=!1;break e;case 3:case 4:at=w.stateNode.containerInfo,Kt=!0;break e}w=w.return}if(at===null)throw Error(a(160));qg(p,v,f),at=null,Kt=!1,p=f.alternate,p!==null&&(p.return=null),f.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)Gg(s,r),s=s.sibling}var kn=null;function Gg(r,s){var i=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Yt(s,r),Zt(r),c&4&&($r(3,r,r.return),Yi(3,r),$r(5,r,r.return));break;case 1:Yt(s,r),Zt(r),c&512&&(yt||i===null||$n(i,i.return)),c&64&&or&&(r=r.updateQueue,r!==null&&(c=r.callbacks,c!==null&&(i=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=i===null?c:i.concat(c))));break;case 26:var f=kn;if(Yt(s,r),Zt(r),c&512&&(yt||i===null||$n(i,i.return)),c&4){var p=i!==null?i.memoizedState:null;if(c=r.memoizedState,i===null)if(c===null)if(r.stateNode===null){e:{c=r.type,i=r.memoizedProps,f=f.ownerDocument||f;t:switch(c){case"title":p=f.getElementsByTagName("title")[0],(!p||p[Si]||p[Lt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=f.createElement(c),f.head.insertBefore(p,f.querySelector("head > title"))),Mt(p,c,i),p[Lt]=r,Rt(p),c=p;break e;case"link":var v=Gy("link","href",f).get(c+(i.href||""));if(v){for(var w=0;w<v.length;w++)if(p=v[w],p.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&p.getAttribute("rel")===(i.rel==null?null:i.rel)&&p.getAttribute("title")===(i.title==null?null:i.title)&&p.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(w,1);break t}}p=f.createElement(c),Mt(p,c,i),f.head.appendChild(p);break;case"meta":if(v=Gy("meta","content",f).get(c+(i.content||""))){for(w=0;w<v.length;w++)if(p=v[w],p.getAttribute("content")===(i.content==null?null:""+i.content)&&p.getAttribute("name")===(i.name==null?null:i.name)&&p.getAttribute("property")===(i.property==null?null:i.property)&&p.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&p.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(w,1);break t}}p=f.createElement(c),Mt(p,c,i),f.head.appendChild(p);break;default:throw Error(a(468,c))}p[Lt]=r,Rt(p),c=p}r.stateNode=c}else Fy(f,r.type,r.stateNode);else r.stateNode=Vy(f,c,r.memoizedProps);else p!==c?(p===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):p.count--,c===null?Fy(f,r.type,r.stateNode):Vy(f,c,r.memoizedProps)):c===null&&r.stateNode!==null&&Yd(r,r.memoizedProps,i.memoizedProps)}break;case 27:Yt(s,r),Zt(r),c&512&&(yt||i===null||$n(i,i.return)),i!==null&&c&4&&Yd(r,r.memoizedProps,i.memoizedProps);break;case 5:if(Yt(s,r),Zt(r),c&512&&(yt||i===null||$n(i,i.return)),r.flags&32){f=r.stateNode;try{da(f,"")}catch(oe){Ke(r,r.return,oe)}}c&4&&r.stateNode!=null&&(f=r.memoizedProps,Yd(r,f,i!==null?i.memoizedProps:f)),c&1024&&(Qd=!0);break;case 6:if(Yt(s,r),Zt(r),c&4){if(r.stateNode===null)throw Error(a(162));c=r.memoizedProps,i=r.stateNode;try{i.nodeValue=c}catch(oe){Ke(r,r.return,oe)}}break;case 3:if(ic=null,f=kn,kn=sc(s.containerInfo),Yt(s,r),kn=f,Zt(r),c&4&&i!==null&&i.memoizedState.isDehydrated)try{qa(s.containerInfo)}catch(oe){Ke(r,r.return,oe)}Qd&&(Qd=!1,Fg(r));break;case 4:c=kn,kn=sc(r.stateNode.containerInfo),Yt(s,r),Zt(r),kn=c;break;case 12:Yt(s,r),Zt(r);break;case 31:Yt(s,r),Zt(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Vl(r,c)));break;case 13:Yt(s,r),Zt(r),r.child.flags&8192&&r.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Fl=Dt()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Vl(r,c)));break;case 22:f=r.memoizedState!==null;var A=i!==null&&i.memoizedState!==null,P=or,B=yt;if(or=P||f,yt=B||A,Yt(s,r),yt=B,or=P,Zt(r),c&8192)e:for(s=r.stateNode,s._visibility=f?s._visibility&-2:s._visibility|1,f&&(i===null||A||or||yt||Ds(r)),i=null,s=r;;){if(s.tag===5||s.tag===26){if(i===null){A=i=s;try{if(p=A.stateNode,f)v=p.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{w=A.stateNode;var G=A.memoizedProps.style,I=G!=null&&G.hasOwnProperty("display")?G.display:null;w.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(oe){Ke(A,A.return,oe)}}}else if(s.tag===6){if(i===null){A=s;try{A.stateNode.nodeValue=f?"":A.memoizedProps}catch(oe){Ke(A,A.return,oe)}}}else if(s.tag===18){if(i===null){A=s;try{var $=A.stateNode;f?My($,!0):My(A.stateNode,!1)}catch(oe){Ke(A,A.return,oe)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===r)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break e;for(;s.sibling===null;){if(s.return===null||s.return===r)break e;i===s&&(i=null),s=s.return}i===s&&(i=null),s.sibling.return=s.return,s=s.sibling}c&4&&(c=r.updateQueue,c!==null&&(i=c.retryQueue,i!==null&&(c.retryQueue=null,Vl(r,i))));break;case 19:Yt(s,r),Zt(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Vl(r,c)));break;case 30:break;case 21:break;default:Yt(s,r),Zt(r)}}function Zt(r){var s=r.flags;if(s&2){try{for(var i,c=r.return;c!==null;){if(Ig(c)){i=c;break}c=c.return}if(i==null)throw Error(a(160));switch(i.tag){case 27:var f=i.stateNode,p=Zd(r);Hl(r,p,f);break;case 5:var v=i.stateNode;i.flags&32&&(da(v,""),i.flags&=-33);var w=Zd(r);Hl(r,w,v);break;case 3:case 4:var A=i.stateNode.containerInfo,P=Zd(r);Jd(r,P,A);break;default:throw Error(a(161))}}catch(B){Ke(r,r.return,B)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function Fg(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var s=r;Fg(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),r=r.sibling}}function cr(r,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)zg(r,s.alternate,s),s=s.sibling}function Ds(r){for(r=r.child;r!==null;){var s=r;switch(s.tag){case 0:case 11:case 14:case 15:$r(4,s,s.return),Ds(s);break;case 1:$n(s,s.return);var i=s.stateNode;typeof i.componentWillUnmount=="function"&&Mg(s,s.return,i),Ds(s);break;case 27:so(s.stateNode);case 26:case 5:$n(s,s.return),Ds(s);break;case 22:s.memoizedState===null&&Ds(s);break;case 30:Ds(s);break;default:Ds(s)}r=r.sibling}}function ur(r,s,i){for(i=i&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var c=s.alternate,f=r,p=s,v=p.flags;switch(p.tag){case 0:case 11:case 15:ur(f,p,i),Yi(4,p);break;case 1:if(ur(f,p,i),c=p,f=c.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(P){Ke(c,c.return,P)}if(c=p,f=c.updateQueue,f!==null){var w=c.stateNode;try{var A=f.shared.hiddenCallbacks;if(A!==null)for(f.shared.hiddenCallbacks=null,f=0;f<A.length;f++)Em(A[f],w)}catch(P){Ke(c,c.return,P)}}i&&v&64&&Pg(p),Zi(p,p.return);break;case 27:Ug(p);case 26:case 5:ur(f,p,i),i&&c===null&&v&4&&Dg(p),Zi(p,p.return);break;case 12:ur(f,p,i);break;case 31:ur(f,p,i),i&&v&4&&Hg(f,p);break;case 13:ur(f,p,i),i&&v&4&&Vg(f,p);break;case 22:p.memoizedState===null&&ur(f,p,i),Zi(p,p.return);break;case 30:break;default:ur(f,p,i)}s=s.sibling}}function Xd(r,s){var i=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),r=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(r=s.memoizedState.cachePool.pool),r!==i&&(r!=null&&r.refCount++,i!=null&&Mi(i))}function Wd(r,s){r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&Mi(r))}function On(r,s,i,c){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Kg(r,s,i,c),s=s.sibling}function Kg(r,s,i,c){var f=s.flags;switch(s.tag){case 0:case 11:case 15:On(r,s,i,c),f&2048&&Yi(9,s);break;case 1:On(r,s,i,c);break;case 3:On(r,s,i,c),f&2048&&(r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&Mi(r)));break;case 12:if(f&2048){On(r,s,i,c),r=s.stateNode;try{var p=s.memoizedProps,v=p.id,w=p.onPostCommit;typeof w=="function"&&w(v,s.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(A){Ke(s,s.return,A)}}else On(r,s,i,c);break;case 31:On(r,s,i,c);break;case 13:On(r,s,i,c);break;case 23:break;case 22:p=s.stateNode,v=s.alternate,s.memoizedState!==null?p._visibility&2?On(r,s,i,c):Ji(r,s):p._visibility&2?On(r,s,i,c):(p._visibility|=2,La(r,s,i,c,(s.subtreeFlags&10256)!==0||!1)),f&2048&&Xd(v,s);break;case 24:On(r,s,i,c),f&2048&&Wd(s.alternate,s);break;default:On(r,s,i,c)}}function La(r,s,i,c,f){for(f=f&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var p=r,v=s,w=i,A=c,P=v.flags;switch(v.tag){case 0:case 11:case 15:La(p,v,w,A,f),Yi(8,v);break;case 23:break;case 22:var B=v.stateNode;v.memoizedState!==null?B._visibility&2?La(p,v,w,A,f):Ji(p,v):(B._visibility|=2,La(p,v,w,A,f)),f&&P&2048&&Xd(v.alternate,v);break;case 24:La(p,v,w,A,f),f&&P&2048&&Wd(v.alternate,v);break;default:La(p,v,w,A,f)}s=s.sibling}}function Ji(r,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var i=r,c=s,f=c.flags;switch(c.tag){case 22:Ji(i,c),f&2048&&Xd(c.alternate,c);break;case 24:Ji(i,c),f&2048&&Wd(c.alternate,c);break;default:Ji(i,c)}s=s.sibling}}var Qi=8192;function Na(r,s,i){if(r.subtreeFlags&Qi)for(r=r.child;r!==null;)Yg(r,s,i),r=r.sibling}function Yg(r,s,i){switch(r.tag){case 26:Na(r,s,i),r.flags&Qi&&r.memoizedState!==null&&AR(i,kn,r.memoizedState,r.memoizedProps);break;case 5:Na(r,s,i);break;case 3:case 4:var c=kn;kn=sc(r.stateNode.containerInfo),Na(r,s,i),kn=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=Qi,Qi=16777216,Na(r,s,i),Qi=c):Na(r,s,i));break;default:Na(r,s,i)}}function Zg(r){var s=r.alternate;if(s!==null&&(r=s.child,r!==null)){s.child=null;do s=r.sibling,r.sibling=null,r=s;while(r!==null)}}function Xi(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var i=0;i<s.length;i++){var c=s[i];Tt=c,Qg(c,r)}Zg(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Jg(r),r=r.sibling}function Jg(r){switch(r.tag){case 0:case 11:case 15:Xi(r),r.flags&2048&&$r(9,r,r.return);break;case 3:Xi(r);break;case 12:Xi(r);break;case 22:var s=r.stateNode;r.memoizedState!==null&&s._visibility&2&&(r.return===null||r.return.tag!==13)?(s._visibility&=-3,Gl(r)):Xi(r);break;default:Xi(r)}}function Gl(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var i=0;i<s.length;i++){var c=s[i];Tt=c,Qg(c,r)}Zg(r)}for(r=r.child;r!==null;){switch(s=r,s.tag){case 0:case 11:case 15:$r(8,s,s.return),Gl(s);break;case 22:i=s.stateNode,i._visibility&2&&(i._visibility&=-3,Gl(s));break;default:Gl(s)}r=r.sibling}}function Qg(r,s){for(;Tt!==null;){var i=Tt;switch(i.tag){case 0:case 11:case 15:$r(8,i,s);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var c=i.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Mi(i.memoizedState.cache)}if(c=i.child,c!==null)c.return=i,Tt=c;else e:for(i=r;Tt!==null;){c=Tt;var f=c.sibling,p=c.return;if(Bg(c),c===i){Tt=null;break e}if(f!==null){f.return=p,Tt=f;break e}Tt=p}}}var BE={getCacheForType:function(r){var s=jt(pt),i=s.data.get(r);return i===void 0&&(i=r(),s.data.set(r,i)),i},cacheSignal:function(){return jt(pt).controller.signal}},qE=typeof WeakMap=="function"?WeakMap:Map,Ve=0,Qe=null,Le=null,je=0,Fe=0,cn=null,zr=!1,ja=!1,ef=!1,dr=0,lt=0,Br=0,Is=0,tf=0,un=0,Pa=0,Wi=null,Jt=null,nf=!1,Fl=0,Xg=0,Kl=1/0,Yl=null,qr=null,wt=0,Hr=null,Ma=null,fr=0,rf=0,sf=null,Wg
vendor: 18,159 bytes, line 9
9=null,eo=0,af=null;function dn(){return(Ve&2)!==0&&je!==0?je&-je:U.T!==null?ff():mp()}function ey(){if(un===0)if((je&536870912)===0||De){var r=nl;nl<<=1,(nl&3932160)===0&&(nl=262144),un=r}else un=536870912;return r=on.current,r!==null&&(r.flags|=32),un}function Qt(r,s,i){(r===Qe&&(Fe===2||Fe===9)||r.cancelPendingCommit!==null)&&(Da(r,0),Vr(r,je,un,!1)),wi(r,i),((Ve&2)===0||r!==Qe)&&(r===Qe&&((Ve&2)===0&&(Is|=i),lt===4&&Vr(r,je,un,!1)),zn(r))}function ty(r,s,i){if((Ve&6)!==0)throw Error(a(327));var c=!i&&(s&127)===0&&(s&r.expiredLanes)===0||_i(r,s),f=c?GE(r,s):lf(r,s,!0),p=c;do{if(f===0){ja&&!c&&Vr(r,s,0,!1);break}else{if(i=r.current.alternate,p&&!HE(i)){f=lf(r,s,!1),p=!1;continue}if(f===2){if(p=s,r.errorRecoveryDisabledLanes&p)var v=0;else v=r.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){s=v;e:{var w=r;f=Wi;var A=w.current.memoizedState.isDehydrated;if(A&&(Da(w,v).flags|=256),v=lf(w,v,!1),v!==2){if(ef&&!A){w.errorRecoveryDisabledLanes|=p,Is|=p,f=4;break e}p=Jt,Jt=f,p!==null&&(Jt===null?Jt=p:Jt.push.apply(Jt,p))}f=v}if(p=!1,f!==2)continue}}if(f===1){Da(r,0),Vr(r,s,0,!0);break}e:{switch(c=r,p=f,p){case 0:case 1:throw Error(a(345));case 4:if((s&4194048)!==s)break;case 6:Vr(c,s,un,!zr);break e;case 2:Jt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((s&62914560)===s&&(f=Fl+300-Dt(),10<f)){if(Vr(c,s,un,!zr),sl(c,0,!0)!==0)break e;fr=s,c.timeoutHandle=Ny(ny.bind(null,c,i,Jt,Yl,nf,s,un,Is,Pa,zr,p,"Throttled",-0,0),f);break e}ny(c,i,Jt,Yl,nf,s,un,Is,Pa,zr,p,null,-0,0)}}break}while(!0);zn(r)}function ny(r,s,i,c,f,p,v,w,A,P,B,G,I,$){if(r.timeoutHandle=-1,G=s.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qn},Yg(s,p,G);var oe=(p&62914560)===p?Fl-Dt():(p&4194048)===p?Xg-Dt():0;if(oe=CR(G,oe),oe!==null){fr=p,r.cancelPendingCommit=oe(uy.bind(null,r,s,p,i,c,f,v,w,A,B,G,null,I,$)),Vr(r,p,v,!P);return}}uy(r,s,p,i,c,f,v,w,A)}function HE(r){for(var s=r;;){var i=s.tag;if((i===0||i===11||i===15)&&s.flags&16384&&(i=s.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var c=0;c<i.length;c++){var f=i[c],p=f.getSnapshot;f=f.value;try{if(!sn(p(),f))return!1}catch{return!1}}if(i=s.child,s.subtreeFlags&16384&&i!==null)i.return=s,s=i;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Vr(r,s,i,c){s&=~tf,s&=~Is,r.suspendedLanes|=s,r.pingedLanes&=~s,c&&(r.warmLanes|=s),c=r.expirationTimes;for(var f=s;0<f;){var p=31-rn(f),v=1<<p;c[p]=-1,f&=~v}i!==0&&fp(r,i,s)}function Zl(){return(Ve&6)===0?(to(0),!1):!0}function of(){if(Le!==null){if(Fe===0)var r=Le.return;else r=Le,tr=xs=null,Sd(r),Aa=null,Ii=0,r=Le;for(;r!==null;)jg(r.alternate,r),r=r.return;Le=null}}function Da(r,s){var i=r.timeoutHandle;i!==-1&&(r.timeoutHandle=-1,cR(i)),i=r.cancelPendingCommit,i!==null&&(r.cancelPendingCommit=null,i()),fr=0,of(),Qe=r,Le=i=Wn(r.current,null),je=s,Fe=0,cn=null,zr=!1,ja=_i(r,s),ef=!1,Pa=un=tf=Is=Br=lt=0,Jt=Wi=null,nf=!1,(s&8)!==0&&(s|=s&32);var c=r.entangledLanes;if(c!==0)for(r=r.entanglements,c&=s;0<c;){var f=31-rn(c),p=1<<f;s|=r[f],c&=~p}return dr=s,gl(),i}function ry(r,s){Re=null,U.H=Gi,s===Ta||s===Rl?(s=bm(),Fe=3):s===ud?(s=bm(),Fe=4):Fe=s===Ud?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,cn=s,Le===null&&(lt=1,Ul(r,vn(s,r.current)))}function sy(){var r=on.current;return r===null?!0:(je&4194048)===je?Sn===null:(je&62914560)===je||(je&536870912)!==0?r===Sn:!1}function ay(){var r=U.H;return U.H=Gi,r===null?Gi:r}function iy(){var r=U.A;return U.A=BE,r}function Jl(){lt=4,zr||(je&4194048)!==je&&on.current!==null||(ja=!0),(Br&134217727)===0&&(Is&134217727)===0||Qe===null||Vr(Qe,je,un,!1)}function lf(r,s,i){var c=Ve;Ve|=2;var f=ay(),p=iy();(Qe!==r||je!==s)&&(Yl=null,Da(r,s)),s=!1;var v=lt;e:do try{if(Fe!==0&&Le!==null){var w=Le,A=cn;switch(Fe){case 8:of(),v=6;break e;case 3:case 2:case 9:case 6:on.current===null&&(s=!0);var P=Fe;if(Fe=0,cn=null,Ia(r,w,A,P),i&&ja){v=0;break e}break;default:P=Fe,Fe=0,cn=null,Ia(r,w,A,P)}}VE(),v=lt;break}catch(B){ry(r,B)}while(!0);return s&&r.shellSuspendCounter++,tr=xs=null,Ve=c,U.H=f,U.A=p,Le===null&&(Qe=null,je=0,gl()),v}function VE(){for(;Le!==null;)oy(Le)}function GE(r,s){var i=Ve;Ve|=2;var c=ay(),f=iy();Qe!==r||je!==s?(Yl=null,Kl=Dt()+500,Da(r,s)):ja=_i(r,s);e:do try{if(Fe!==0&&Le!==null){s=Le;var p=cn;t:switch(Fe){case 1:Fe=0,cn=null,Ia(r,s,p,1);break;case 2:case 9:if(ym(p)){Fe=0,cn=null,ly(s);break}s=function(){Fe!==2&&Fe!==9||Qe!==r||(Fe=7),zn(r)},p.then(s,s);break e;case 3:Fe=7;break e;case 4:Fe=5;break e;case 7:ym(p)?(Fe=0,cn=null,ly(s)):(Fe=0,cn=null,Ia(r,s,p,7));break;case 5:var v=null;switch(Le.tag){case 26:v=Le.memoizedState;case 5:case 27:var w=Le;if(v?Ky(v):w.stateNode.complete){Fe=0,cn=null;var A=w.sibling;if(A!==null)Le=A;else{var P=w.return;P!==null?(Le=P,Ql(P)):Le=null}break t}}Fe=0,cn=null,Ia(r,s,p,5);break;case 6:Fe=0,cn=null,Ia(r,s,p,6);break;case 8:of(),lt=6;break e;default:throw Error(a(462))}}FE();break}catch(B){ry(r,B)}while(!0);return tr=xs=null,U.H=c,U.A=f,Ve=i,Le!==null?0:(Qe=null,je=0,gl(),lt)}function FE(){for(;Le!==null&&!el();)oy(Le)}function oy(r){var s=Lg(r.alternate,r,dr);r.memoizedProps=r.pendingProps,s===null?Ql(r):Le=s}function ly(r){var s=r,i=s.alternate;switch(s.tag){case 15:case 0:s=Tg(i,s,s.pendingProps,s.type,void 0,je);break;case 11:s=Tg(i,s,s.pendingProps,s.type.render,s.ref,je);break;case 5:Sd(s);default:jg(i,s),s=Le=im(s,dr),s=Lg(i,s,dr)}r.memoizedProps=r.pendingProps,s===null?Ql(r):Le=s}function Ia(r,s,i,c){tr=xs=null,Sd(s),Aa=null,Ii=0;var f=s.return;try{if(PE(r,f,s,i,je)){lt=1,Ul(r,vn(i,r.current)),Le=null;return}}catch(p){if(f!==null)throw Le=f,p;lt=1,Ul(r,vn(i,r.current)),Le=null;return}s.flags&32768?(De||c===1?r=!0:ja||(je&536870912)!==0?r=!1:(zr=r=!0,(c===2||c===9||c===3||c===6)&&(c=on.current,c!==null&&c.tag===13&&(c.flags|=16384))),cy(s,r)):Ql(s)}function Ql(r){var s=r;do{if((s.flags&32768)!==0){cy(s,zr);return}r=s.return;var i=IE(s.alternate,s,dr);if(i!==null){Le=i;return}if(s=s.sibling,s!==null){Le=s;return}Le=s=r}while(s!==null);lt===0&&(lt=5)}function cy(r,s){do{var i=UE(r.alternate,r);if(i!==null){i.flags&=32767,Le=i;return}if(i=r.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!s&&(r=r.sibling,r!==null)){Le=r;return}Le=r=i}while(r!==null);lt=6,Le=null}function uy(r,s,i,c,f,p,v,w,A){r.cancelPendingCommit=null;do Xl();while(wt!==0);if((Ve&6)!==0)throw Error(a(327));if(s!==null){if(s===r.current)throw Error(a(177));if(p=s.lanes|s.childLanes,p|=Zu,TS(r,i,p,v,w,A),r===Qe&&(Le=Qe=null,je=0),Ma=s,Hr=r,fr=i,rf=p,sf=f,Wg=c,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,JE(sa,function(){return my(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||c){c=U.T,U.T=null,f=Z.p,Z.p=2,v=Ve,Ve|=4;try{$E(r,s,i)}finally{Ve=v,Z.p=f,U.T=c}}wt=1,dy(),fy(),hy()}}function dy(){if(wt===1){wt=0;var r=Hr,s=Ma,i=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||i){i=U.T,U.T=null;var c=Z.p;Z.p=2;var f=Ve;Ve|=4;try{Gg(s,r);var p=_f,v=Qp(r.containerInfo),w=p.focusedElem,A=p.selectionRange;if(v!==w&&w&&w.ownerDocument&&Jp(w.ownerDocument.documentElement,w)){if(A!==null&&Vu(w)){var P=A.start,B=A.end;if(B===void 0&&(B=P),"selectionStart"in w)w.selectionStart=P,w.selectionEnd=Math.min(B,w.value.length);else{var G=w.ownerDocument||document,I=G&&G.defaultView||window;if(I.getSelection){var $=I.getSelection(),oe=w.textContent.length,be=Math.min(A.start,oe),Je=A.end===void 0?be:Math.min(A.end,oe);!$.extend&&be>Je&&(v=Je,Je=be,be=v);var L=Zp(w,be),O=Zp(w,Je);if(L&&O&&($.rangeCount!==1||$.anchorNode!==L.node||$.anchorOffset!==L.offset||$.focusNode!==O.node||$.focusOffset!==O.offset)){var j=G.createRange();j.setStart(L.node,L.offset),$.removeAllRanges(),be>Je?($.addRange(j),$.extend(O.node,O.offset)):(j.setEnd(O.node,O.offset),$.addRange(j))}}}}for(G=[],$=w;$=$.parentNode;)$.nodeType===1&&G.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<G.length;w++){var q=G[w];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}uc=!!bf,_f=bf=null}finally{Ve=f,Z.p=c,U.T=i}}r.current=s,wt=2}}function fy(){if(wt===2){wt=0;var r=Hr,s=Ma,i=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||i){i=U.T,U.T=null;var c=Z.p;Z.p=2;var f=Ve;Ve|=4;try{zg(r,s.alternate,s)}finally{Ve=f,Z.p=c,U.T=i}}wt=3}}function hy(){if(wt===4||wt===3){wt=0,Su();var r=Hr,s=Ma,i=fr,c=Wg;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?wt=5:(wt=0,Ma=Hr=null,py(r,r.pendingLanes));var f=r.pendingLanes;if(f===0&&(qr=null),Tu(i),s=s.stateNode,nn&&typeof nn.onCommitFiberRoot=="function")try{nn.onCommitFiberRoot(bi,s,void 0,(s.current.flags&128)===128)}catch{}if(c!==null){s=U.T,f=Z.p,Z.p=2,U.T=null;try{for(var p=r.onRecoverableError,v=0;v<c.length;v++){var w=c[v];p(w.value,{componentStack:w.stack})}}finally{U.T=s,Z.p=f}}(fr&3)!==0&&Xl(),zn(r),f=r.pendingLanes,(i&261930)!==0&&(f&42)!==0?r===af?eo++:(eo=0,af=r):eo=0,to(0)}}function py(r,s){(r.pooledCacheLanes&=s)===0&&(s=r.pooledCache,s!=null&&(r.pooledCache=null,Mi(s)))}function Xl(){return dy(),fy(),hy(),my()}function my(){if(wt!==5)return!1;var r=Hr,s=rf;rf=0;var i=Tu(fr),c=U.T,f=Z.p;try{Z.p=32>i?32:i,U.T=null,i=sf,sf=null;var p=Hr,v=fr;if(wt=0,Ma=Hr=null,fr=0,(Ve&6)!==0)throw Error(a(331));var w=Ve;if(Ve|=4,Jg(p.current),Kg(p,p.current,v,i),Ve=w,to(0,!1),nn&&typeof nn.onPostCommitFiberRoot=="function")try{nn.onPostCommitFiberRoot(bi,p)}catch{}return!0}finally{Z.p=f,U.T=c,py(r,s)}}function gy(r,s,i){s=vn(i,s),s=Id(r.stateNode,s,2),r=Dr(r,s,2),r!==null&&(wi(r,2),zn(r))}function Ke(r,s,i){if(r.tag===3)gy(r,r,i);else for(;s!==null;){if(s.tag===3){gy(s,r,i);break}else if(s.tag===1){var c=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(qr===null||!qr.has(c))){r=vn(i,r),i=yg(2),c=Dr(s,i,2),c!==null&&(vg(i,c,s,r),wi(c,2),zn(c));break}}s=s.return}}function cf(r,s,i){var c=r.pingCache;if(c===null){c=r.pingCache=new qE;var f=new Set;c.set(s,f)}else f=c.get(s),f===void 0&&(f=new Set,c.set(s,f));f.has(i)||(ef=!0,f.add(i),r=KE.bind(null,r,s,i),s.then(r,r))}function KE(r,s,i){var c=r.pingCache;c!==null&&c.delete(s),r.pingedLanes|=r.suspendedLanes&i,r.warmLanes&=~i,Qe===r&&(je&i)===i&&(lt===4||lt===3&&(je&62914560)===je&&300>Dt()-Fl?(Ve&2)===0&&Da(r,0):tf|=i,Pa===je&&(Pa=0)),zn(r)}function yy(r,s){s===0&&(s=dp()),r=Ts(r,s),r!==null&&(wi(r,s),zn(r))}function YE(r){var s=r.memoizedState,i=0;s!==null&&(i=s.retryLane),yy(r,i)}function ZE(r,s){var i=0;switch(r.tag){case 31:case 13:var c=r.stateNode,f=r.memoizedState;f!==null&&(i=f.retryLane);break;case 19:c=r.stateNode;break;case 22:c=r.stateNode._retryCache;break;default:throw Error(a(314))}c!==null&&c.delete(s),yy(r,i)}function JE(r,s){return Cn(r,s)}var Wl=null,Ua=null,uf=!1,ec=!1,df=!1,Gr=0;function zn(r){r!==Ua&&r.next===null&&(Ua===null?Wl=Ua=r:Ua=Ua.next=r),ec=!0,uf||(uf=!0,XE())}function to(r,s){if(!df&&ec){df=!0;do for(var i=!1,c=Wl;c!==null;){if(r!==0){var f=c.pendingLanes;if(f===0)var p=0;else{var v=c.suspendedLanes,w=c.pingedLanes;p=(1<<31-rn(42|r)+1)-1,p&=f&~(v&~w),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(i=!0,wy(c,p))}else p=je,p=sl(c,c===Qe?p:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(p&3)===0||_i(c,p)||(i=!0,wy(c,p));c=c.next}while(i);df=!1}}function QE(){vy()}function vy(){ec=uf=!1;var r=0;Gr!==0&&lR()&&(r=Gr);for(var s=Dt(),i=null,c=Wl;c!==null;){var f=c.next,p=by(c,s);p===0?(c.next=null,i===null?Wl=f:i.next=f,f===null&&(Ua=i)):(i=c,(r!==0||(p&3)!==0)&&(ec=!0)),c=f}wt!==0&&wt!==5||to(r),Gr!==0&&(Gr=0)}function by(r,s){for(var i=r.suspendedLanes,c=r.pingedLanes,f=r.expirationTimes,p=r.pendingLanes&-62914561;0<p;){var v=31-rn(p),w=1<<v,A=f[v];A===-1?((w&i)===0||(w&c)!==0)&&(f[v]=RS(w,s)):A<=s&&(r.expiredLanes|=w),p&=~w}if(s=Qe,i=je,i=sl(r,r===s?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c=r.callbackNode,i===0||r===s&&(Fe===2||Fe===9)||r.cancelPendingCommit!==null)return c!==null&&c!==null&&vi(c),r.callbackNode=null,r.callbackPriority=0;if((i&3)===0||_i(r,i)){if(s=i&-i,s===r.callbackPriority)return s;switch(c!==null&&vi(c),Tu(i)){case 2:case 8:i=Dn;break;case 32:i=sa;break;case 268435456:i=up;break;default:i=sa}return c=_y.bind(null,r),i=Cn(i,c),r.callbackPriority=s,r.callbackNode=i,s}return c!==null&&c!==null&&vi(c),r.callbackPriority=2,r.callbackNode=null,2}function _y(r,s){if(wt!==0&&wt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var i=r.callbackNode;if(Xl()&&r.callbackNode!==i)return null;var c=je;return c=sl(r,r===Qe?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(ty(r,c,s),by(r,Dt()),r.callbackNode!=null&&r.callbackNode===i?_y.bind(null,r):null)}function wy(r,s){if(Xl())return null;ty(r,s,!0)}function XE(){uR(function(){(Ve&6)!==0?Cn(Ot,QE):vy()})}function ff(){if(Gr===0){var r=Ea;r===0&&(r=tl,tl<<=1,(tl&261888)===0&&(tl=256)),Gr=r}return Gr}function Sy(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:ll(""+r)}function Ey(r,s){var i=s.ownerDocument.createElement("input");return i.name=s.name,i.value=s.value,r.id&&i.setAttribute("form",r.id),s.parentNode.insertBefore(i,s),r=new FormData(r),i.parentNode.removeChild(i),r}function WE(r,s,i,c,f){if(s==="submit"&&i&&i.stateNode===f){var p=Sy((f[Gt]||null).action),v=c.submitter;v&&(s=(s=v[Gt]||null)?Sy(s.formAction):v.getAttribute("formAction"),s!==null&&(p=s,v=null));var w=new fl("action","action",null,c,f);r.push({event:w,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Gr!==0){var A=v?Ey(f,v):new FormData(f);Ld(i,{pending:!0,data:A,method:f.method,action:p},null,A)}}else typeof p=="function"&&(w.preventDefault(),A=v?Ey(f,v):new FormData(f),Ld(i,{pending:!0,data:A,method:f.method,action:p},p,A))},currentTarget:f}]})}}for(var hf=0;hf<Yu.length;hf++){var pf=Yu[hf],eR=pf.toLowerCase(),tR=pf[0].toUpperCase()+pf.slice(1);xn(eR,"on"+tR)}xn(em,"onAnimationEnd"),xn(tm,"onAnimationIteration"),xn(nm,"onAnimationStart"),xn("dblclick","onDoubleClick"),xn("focusin","onFocus"),xn("focusout","onBlur"),xn(yE,"onTransitionRun"),xn(vE,"onTransitionStart"),xn(bE,"onTransitionCancel"),xn(rm,"onTransitionEnd"),ca("onMouseEnter",["mouseout","mouseover"]),ca("onMouseLeave",["mouseout","mouseover"]),ca("onPointerEnter",["pointerout","pointerover"]),ca("onPointerLeave",["pointerout","pointerover"]),ws("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ws("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ws("onBeforeInput",["compositionend","keypress","textInput","paste"]),ws("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ws("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ws("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var no="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(" "),nR=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(no));function Ry(r,s){s=(s&4)!==0;for(var i=0;i<r.length;i++){var c=r[i],f=c.event;c=c.listeners;e:{var p=void 0;if(s)for(var v=c.length-1;0<=v;v--){var w=c[v],A=w.instance,P=w.currentTarget;if(w=w.listener,A!==p&&f.isPropagationStopped())break e;p=w,f.currentTarget=P;try{p(f)}catch(B){ml(B)}f.currentTarget=null,p=A}else for(v=0;v<c.length;v++){if(w=c[v],A=w.instance,P=w.currentTarget,w=w.listener,A!==p&&f.isPropagationStopped())break e;p=w,f.currentTarget=P;try{p(f)}catch(B){ml(B)}f.currentTarget=null,p=A}}}}function Ne(r,s){var i=s[Au];i===void 0&&(i=s[Au]=new Set);var c=r+"__bubble";i.has(c)||(Ty(s,r,2,!1),i.add(c))}function mf(r,s,i){var c=0;s&&(c|=4),Ty(i,r,c,s)}var tc="_reactListening"+Math.random().toString(36).slice(2);function gf(r){if(!r[tc]){r[tc]=!0,vp.forEach(function(i){i!=="selectionchange"&&(nR.has(i)||mf(i,!1,r),mf(i,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[tc]||(s[tc]=!0,mf("selectionchange",!1,s))}}function Ty(r,s,i,c){switch(ev(s)){case 2:var f=OR;break;case 8:f=LR;break;default:f=Lf}i=f.bind(null,s,i,r),f=void 0,!Mu||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(f=!0),c?f!==void 0?r.addEventListener(s,i,{capture:!0,passive:f}):r.addEventListener(s,i,!0):f!==void 0?r.addEventListener(s,i,{passive:f}):r.addEventListener(s,i,!1)}function yf(r,s,i,c,f){var p=c;if((s&1)===0&&(s&2)===0&&c!==null)e:for(;;){if(c===null)return;var v=c.tag;if(v===3||v===4){var w=c.stateNode.containerInfo;if(w===f)break;if(v===4)for(v=c.return;v!==null;){var A=v.tag;if((A===3||A===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;w!==null;){if(v=ia(w),v===null)return;if(A=v.tag,A===5||A===6||A===26||A===27){c=p=v;continue e}w=w.parentNode}}c=c.return}Op(function(){var P=p,B=ju(i),G=[];e:{var I=sm.get(r);if(I!==void 0){var $=fl,oe=r;switch(r){case"keypress":if(ul(i)===0)break e;case"keydown":case"keyup":$=ZS;break;case"focusin":oe="focus",$=$u;break;case"focusout":oe="blur",$=$u;break;case"beforeblur":case"afterblur":$=$u;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":$=jp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=IS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=XS;break;case em:case tm:case nm:$=zS;break;case rm:$=eE;break;case"scroll":case"scrollend":$=MS;break;case"wheel":$=nE;break;case"copy":case"cut":case"paste":$=qS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=Mp;break;case"toggle":case"beforetoggle":$=sE}var be=(s&4)!==0,Je=!be&&(r==="scroll"||r==="scrollend"),L=be?I!==null?I+"
9Capture":null:I;be=[];for(var O=P,j;O!==null;){var q=O;if(j=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||j===null||L===null||(q=Ri(O,L),q!=null&&be.push(ro(O,q,j))),Je)break;O=O.return}0<be.length&&(I=new $(I,oe,null,i,B),G.push({event:I,listeners:be}))}}if((s&7)===0){e:{if(I=r==="mouseover"||r==="pointerover",$=r==="mouseout"||r==="pointerout",I&&i!==Nu&&(oe=i.relatedTarget||i.fromElement)&&(ia(oe)||oe[aa]))break e;if(($||I)&&(I=B.window===B?B:(I=B.ownerDocument)?I.defaultView||I.parentWindow:window,$?(oe=i.relatedTarget||i.toElement,$=P,oe=oe?ia(oe):null,oe!==null&&(Je=l(oe),be=oe.tag,oe!==Je||be!==5&&be!==27&&be!==6)&&(oe=null)):($=null,oe=P),$!==oe)){if(be=jp,q="onMouseLeave",L="onMouseEnter",O="mouse",(r==="pointerout"||r==="pointerover")&&(be=Mp,q="onPointerLeave",L="onPointerEnter",O="pointer"),Je=$==null?I:Ei($),j=oe==null?I:Ei(oe),I=new be(q,O+"leave",$,i,B),I.target=Je,I.relatedTarget=j,q=null,ia(B)===P&&(be=new be(L,O+"enter",oe,i,B),be.target=j,be.relatedTarget=Je,q=be),Je=q,$&&oe)t:{for(be=rR,L=$,O=oe,j=0,q=L;q;q=be(q))j++;q=0;for(var ye=O;ye;ye=be(ye))q++;for(;0<j-q;)L=be(L),j--;for(;0<q-j;)O=be(O),q--;for(;j--;){if(L===O||O!==null&&L===O.alternate){be=L;break t}L=be(L),O=be(O)}be=null}else be=null;$!==null&&Ay(G,I,$,be,!1),oe!==null&&Je!==null&&Ay(G,Je,oe,be,!0)}}e:{if(I=P?Ei(P):window,$=I.nodeName&&I.nodeName.toLowerCase(),$==="select"||$==="input"&&I.type==="file")var Be=Hp;else if(Bp(I))if(Vp)Be=pE;else{Be=fE;var he=dE}else $=I.nodeName,!$||$.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?P&&Lu(P.elementType)&&(Be=Hp):Be=hE;if(Be&&(Be=Be(r,P))){qp(G,Be,i,B);break e}he&&he(r,I,P),r==="focusout"&&P&&I.type==="number"&&P.memoizedProps.value!=null&&Ou(I,"number",I.value)}switch(he=P?Ei(P):window,r){case"focusin":(Bp(he)||he.contentEditable==="true")&&(ma=he,Gu=P,Ni=null);break;case"focusout":Ni=Gu=ma=null;break;case"mousedown":Fu=!0;break;case"contextmenu":case"mouseup":case"dragend":Fu=!1,Xp(G,i,B);break;case"selectionchange":if(gE)break;case"keydown":case"keyup":Xp(G,i,B)}var Ae;if(Bu)e:{switch(r){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else pa?$p(r,i)&&(Pe="onCompositionEnd"):r==="keydown"&&i.keyCode===229&&(Pe="onCompositionStart");Pe&&(Dp&&i.locale!=="ko"&&(pa||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&pa&&(Ae=Lp()):(kr=B,Du="value"in kr?kr.value:kr.textContent,pa=!0)),he=nc(P,Pe),0<he.length&&(Pe=new Pp(Pe,r,null,i,B),G.push({event:Pe,listeners:he}),Ae?Pe.data=Ae:(Ae=zp(i),Ae!==null&&(Pe.data=Ae)))),(Ae=iE?oE(r,i):lE(r,i))&&(Pe=nc(P,"onBeforeInput"),0<Pe.length&&(he=new Pp("onBeforeInput","beforeinput",null,i,B),G.push({event:he,listeners:Pe}),he.data=Ae)),WE(G,r,P,i,B)}Ry(G,s)})}function ro(r,s,i){return{instance:r,listener:s,currentTarget:i}}function nc(r,s){for(var i=s+"Capture",c=[];r!==null;){var f=r,p=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||p===null||(f=Ri(r,i),f!=null&&c.unshift(ro(r,f,p)),f=Ri(r,s),f!=null&&c.push(ro(r,f,p))),r.tag===3)return c;r=r.return}return[]}function rR(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Ay(r,s,i,c,f){for(var p=s._reactName,v=[];i!==null&&i!==c;){var w=i,A=w.alternate,P=w.stateNode;if(w=w.tag,A!==null&&A===c)break;w!==5&&w!==26&&w!==27||P===null||(A=P,f?(P=Ri(i,p),P!=null&&v.unshift(ro(i,P,A))):f||(P=Ri(i,p),P!=null&&v.push(ro(i,P,A)))),i=i.return}v.length!==0&&r.push({event:s,listeners:v})}var sR=/\r\n?/g,aR=/\u0000|\uFFFD/g;function Cy(r){return(typeof r=="string"?r:""+r).replace(sR,` 10`).replace(aR,"")}function xy(r,s){return s=Cy(s),Cy(r)===s}function Ze(r,s,i,c,f,p){switch(i){case"children":typeof c=="string"?s==="body"||s==="textarea"&&c===""||da(r,c):(typeof c=="number"||typeof c=="bigint")&&s!=="body"&&da(r,""+c);break;case"className":il(r,"class",c);break;case"tabIndex":il(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":il(r,i,c);break;case"style":xp(r,c,p);break;case"data":if(s!=="object"){il(r,"data",c);break}case"src":case"href":if(c===""&&(s!=="a"||i!=="href")){r.removeAttribute(i);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(i);break}c=ll(""+c),r.setAttribute(i,c);break;case"action":case"formAction":if(typeof c=="function"){r.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(i==="formAction"?(s!=="input"&&Ze(r,s,"name",f.name,f,null),Ze(r,s,"formEncType",f.formEncType,f,null),Ze(r,s,"formMethod",f.formMethod,f,null),Ze(r,s,"formTarget",f.formTarget,f,null)):(Ze(r,s,"encType",f.encType,f,null),Ze(r,s,"method",f.method,f,null),Ze(r,s,"target",f.target,f,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(i);break}c=ll(""+c),r.setAttribute(i,c);break;case"onClick":c!=null&&(r.onclick=Qn);break;case"onScroll":c!=null&&Ne("scroll",r);break;case"onScrollEnd":c!=null&&Ne("scrollend",r);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(i=c.__html,i!=null){if(f.children!=null)throw Error(a(60));r.innerHTML=i}}break;case"multiple":r.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":r.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){r.removeAttribute("xlink:href");break}i=ll(""+c),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(i,""+c):r.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
10ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(i,""):r.removeAttribute(i);break;case"capture":case"download":c===!0?r.setAttribute(i,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(i,c):r.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?r.setAttribute(i,c):r.removeAttribute(i);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?r.removeAttribute(i):r.setAttribute(i,c);break;case"popover":Ne("beforetoggle",r),Ne("toggle",r),al(r,"popover",c);break;case"xlinkActuate":Jn(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Jn(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Jn(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Jn(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Jn(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Jn(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Jn(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Jn(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Jn(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":al(r,"is",c);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=jS.get(i)||i,al(r,i,c))}}function vf(r,s,i,c,f,p){switch(i){case"style":xp(r,c,p);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(i=c.__html,i!=null){if(f.children!=null)throw Error(a(60));r.innerHTML=i}}break;case"children":typeof c=="string"?da(r,c):(typeof c=="number"||typeof c=="bigint")&&da(r,""+c);break;case"onScroll":c!=null&&Ne("scroll",r);break;case"onScrollEnd":c!=null&&Ne("scrollend",r);break;case"onClick":c!=null&&(r.onclick=Qn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bp.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),s=i.slice(2,f?i.length-7:void 0),p=r[Gt]||null,p=p!=null?p[i]:null,typeof p=="function"&&r.removeEventListener(s,p,f),typeof c=="function")){typeof p!="function"&&p!==null&&(i in r?r[i]=null:r.hasAttribute(i)&&r.removeAttribute(i)),r.addEventListener(s,c,f);break e}i in r?r[i]=c:c===!0?r.setAttribute(i,""):al(r,i,c)}}}function Mt(r,s,i){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",r),Ne("load",r);var c=!1,f=!1,p;for(p in i)if(i.hasOwnProperty(p)){var v=i[p];if(v!=null)switch(p){case"src":c=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Ze(r,s,p,v,i,null)}}f&&Ze(r,s,"srcSet",i.srcSet,i,null),c&&Ze(r,s,"src",i.src,i,null);return;case"input":Ne("invalid",r);var w=p=v=f=null,A=null,P=null;for(c in i)if(i.hasOwnProperty(c)){var B=i[c];if(B!=null)switch(c){case"name":f=B;break;case"type":v=B;break;case"checked":A=B;break;case"defaultChecked":P=B;break;case"value":p=B;break;case"defaultValue":w=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(a(137,s));break;default:Ze(r,s,c,B,i,null)}}Rp(r,p,w,A,P,v,f,!1);return;case"select":Ne("invalid",r),c=v=p=null;for(f in i)if(i.hasOwnProperty(f)&&(w=i[f],w!=null))switch(f){case"value":p=w;break;case"defaultValue":v=w;break;case"multiple":c=w;default:Ze(r,s,f,w,i,null)}s=p,i=v,r.multiple=!!c,s!=null?ua(r,!!c,s,!1):i!=null&&ua(r,!!c,i,!0);return;case"textarea":Ne("invalid",r),p=f=c=null;for(v in i)if(i.hasOwnProperty(v)&&(w=i[v],w!=null))switch(v){case"value":c=w;break;case"defaultValue":f=w;break;case"children":p=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(a(91));break;default:Ze(r,s,v,w,i,null)}Ap(r,c,f,p);return;case"option":for(A in i)i.hasOwnProperty(A)&&(c=i[A],c!=null)&&(A==="selected"?r.selected=c&&typeof c!="function"&&typeof c!="symbol":Ze(r,s,A,c,i,null));return;case"dialog":Ne("beforetoggle",r),Ne("toggle",r),Ne("cancel",r),Ne("close",r);break;case"iframe":case"object":Ne("load",r);break;case"video":case"audio":for(c=0;c<no.length;c++)Ne(no[c],r);break;case"image":Ne("error",r),Ne("load",r);break;case"details":Ne("toggle",r);break;case"embed":case"source":case"link":Ne("error",r),Ne("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(P in i)if(i.hasOwnProperty(P)&&(c=i[P],c!=null))switch(P){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Ze(r,s,P,c,i,null)}return;default:if(Lu(s)){for(B in i)i.hasOwnProperty(B)&&(c=i[B],c!==void 0&&vf(r,s,B,c,i,void 0));return}}for(w in i)i.hasOwnProperty(w)&&(c=i[w],c!=null&&Ze(r,s,w,c,i,null))}function iR(r,s,i,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,p=null,v=null,w=null,A=null,P=null,B=null;for($ in i){var G=i[$];if(i.hasOwnProperty($)&&G!=null)switch($){case"checked":break;case"value":break;case"defaultValue":A=G;default:c.hasOwnProperty($)||Ze(r,s,$,null,c,G)}}for(var I in c){var $=c[I];if(G=i[I],c.hasOwnProperty(I)&&($!=null||G!=null))switch(I){case"type":p=$;break;case"name":f=$;break;case"checked":P=$;break;case"defaultChecked":B=$;break;case"value":v=$;break;case"defaultValue":w=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(a(137,s));break;default:$!==G&&Ze(r,s,I,$,c,G)}}ku(r,v,w,A,P,B,p,f);return;case"select":$=v=w=I=null;for(p in i)if(A=i[p],i.hasOwnProperty(p)&&A!=null)switch(p){case"value":break;case"multiple":$=A;default:c.hasOwnProperty(p)||Ze(r,s,p,null,c,A)}for(f in c)if(p=c[f],A=i[f],c.hasOwnProperty(f)&&(p!=null||A!=null))switch(f){case"value":I=p;break;case"defaultValue":w=p;break;case"multiple":v=p;
vendor: 5,770 bytes, line 10
10default:p!==A&&Ze(r,s,f,p,c,A)}s=w,i=v,c=$,I!=null?ua(r,!!i,I,!1):!!c!=!!i&&(s!=null?ua(r,!!i,s,!0):ua(r,!!i,i?[]:"",!1));return;case"textarea":$=I=null;for(w in i)if(f=i[w],i.hasOwnProperty(w)&&f!=null&&!c.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:Ze(r,s,w,null,c,f)}for(v in c)if(f=c[v],p=i[v],c.hasOwnProperty(v)&&(f!=null||p!=null))switch(v){case"value":I=f;break;case"defaultValue":$=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(a(91));break;default:f!==p&&Ze(r,s,v,f,c,p)}Tp(r,I,$);return;case"option":for(var oe in i)I=i[oe],i.hasOwnProperty(oe)&&I!=null&&!c.hasOwnProperty(oe)&&(oe==="selected"?r.selected=!1:Ze(r,s,oe,null,c,I));for(A in c)I=c[A],$=i[A],c.hasOwnProperty(A)&&I!==$&&(I!=null||$!=null)&&(A==="selected"?r.selected=I&&typeof I!="function"&&typeof I!="symbol":Ze(r,s,A,I,c,$));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var be in i)I=i[be],i.hasOwnProperty(be)&&I!=null&&!c.hasOwnProperty(be)&&Ze(r,s,be,null,c,I);for(P in c)if(I=c[P],$=i[P],c.hasOwnProperty(P)&&I!==$&&(I!=null||$!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(a(137,s));break;default:Ze(r,s,P,I,c,$)}return;default:if(Lu(s)){for(var Je in i)I=i[Je],i.hasOwnProperty(Je)&&I!==void 0&&!c.hasOwnProperty(Je)&&vf(r,s,Je,void 0,c,I);for(B in c)I=c[B],$=i[B],!c.hasOwnProperty(B)||I===$||I===void 0&&$===void 0||vf(r,s,B,I,c,$);return}}for(var L in i)I=i[L],i.hasOwnProperty(L)&&I!=null&&!c.hasOwnProperty(L)&&Ze(r,s,L,null,c,I);for(G in c)I=c[G],$=i[G],!c.hasOwnProperty(G)||I===$||I==null&&$==null||Ze(r,s,G,I,c,$)}function ky(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function oR(){if(typeof performance.getEntriesByType=="function"){for(var r=0,s=0,i=performance.getEntriesByType("resource"),c=0;c<i.length;c++){var f=i[c],p=f.transferSize,v=f.initiatorType,w=f.duration;if(p&&w&&ky(v)){for(v=0,w=f.responseEnd,c+=1;c<i.length;c++){var A=i[c],P=A.startTime;if(P>w)break;var B=A.transferSize,G=A.initiatorType;B&&ky(G)&&(A=A.responseEnd,v+=B*(A<w?1:(w-P)/(A-P)))}if(--c,s+=8*(p+v)/(f.duration/1e3),r++,10<r)break}}if(0<r)return s/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var bf=null,_f=null;function rc(r){return r.nodeType===9?r:r.ownerDocument}function Oy(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ly(r,s){if(r===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&s==="foreignObject"?0:r}function wf(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Sf=null;function lR(){var r=window.event;return r&&r.type==="popstate"?r===Sf?!1:(Sf=r,!0):(Sf=null,!1)}var Ny=typeof setTimeout=="function"?setTimeout:void 0,cR=typeof clearTimeout=="function"?clearTimeout:void 0,jy=typeof Promise=="function"?Promise:void 0,uR=typeof queueMicrotask=="function"?queueMicrotask:typeof jy<"u"?function(r){return jy.resolve(null).then(r).catch(dR)}:Ny;function dR(r){setTimeout(function(){throw r})}function Fr(r){return r==="head"}function Py(r,s){var i=s,c=0;do{var f=i.nextSibling;if(r.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(c===0){r.removeChild(f),qa(s);return}c--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")c++;else if(i==="html")so(r.ownerDocument.documentElement);else if(i==="head"){i=r.ownerDocument.head,so(i);for(var p=i.firstChild;p;){var v=p.nextSibling,w=p.nodeName;p[Si]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&p.rel.toLowerCase()==="stylesheet"||i.removeChild(p),p=v}}else i==="body"&&so(r.ownerDocument.body);i=f}while(i);qa(s)}function My(r,s){var i=r;r=0;do{var c=i.nextSibling;if(i.nodeType===1?s?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(s?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),c&&c.nodeType===8)if(i=c.data,i==="/$"){if(r===0)break;r--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||r++;i=c}while(i)}function Ef(r){var s=r.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var i=s;switch(s=s.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Ef(i),Cu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}r.removeChild(i)}}function fR(r,s,i,c){for(;r.nodeType===1;){var f=i;if(r.nodeName.toLowerCase()!==s.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[Si])switch(s){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(p=r.getAttribute("rel"),p==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(p!==f.rel||r.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||r.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||r.getAttribute("title")!==(f.title==null?null:f.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(p=r.getAttribute("src"),(p!==(f.src==null?null:f.src)||r.getAttribute("type")!==(f.type==null?null:f.type)||r.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&p&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(s==="input"&&r.type==="hidden"){var p=f.name==null?null:""+f.name;
vendor: 6,093 bytes, line 10
10if(f.type==="hidden"&&r.getAttribute("name")===p)return r}else return r;if(r=En(r.nextSibling),r===null)break}return null}function hR(r,s,i){if(s==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=En(r.nextSibling),r===null))return null;return r}function Dy(r,s){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=En(r.nextSibling),r===null))return null;return r}function Rf(r){return r.data==="$?"||r.data==="$~"}function Tf(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function pR(r,s){var i=r.ownerDocument;if(r.data==="$~")r._reactRetry=s;else if(r.data!=="$?"||i.readyState!=="loading")s();else{var c=function(){s(),i.removeEventListener("DOMContentLoaded",c)};i.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}function En(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return r}var Af=null;function Iy(r){r=r.nextSibling;for(var s=0;r;){if(r.nodeType===8){var i=r.data;if(i==="/$"||i==="/&"){if(s===0)return En(r.nextSibling);s--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||s++}r=r.nextSibling}return null}function Uy(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var i=r.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(s===0)return r;s--}else i!=="/$"&&i!=="/&"||s++}r=r.previousSibling}return null}function $y(r,s,i){switch(s=rc(i),r){case"html":if(r=s.documentElement,!r)throw Error(a(452));return r;case"head":if(r=s.head,!r)throw Error(a(453));return r;case"body":if(r=s.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function so(r){for(var s=r.attributes;s.length;)r.removeAttributeNode(s[0]);Cu(r)}var Rn=new Map,zy=new Set;function sc(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var hr=Z.d;Z.d={f:mR,r:gR,D:yR,C:vR,L:bR,m:_R,X:SR,S:wR,M:ER};function mR(){var r=hr.f(),s=Zl();return r||s}function gR(r){var s=oa(r);s!==null&&s.tag===5&&s.type==="form"?rg(s):hr.r(r)}var $a=typeof document>"u"?null:document;function By(r,s,i){var c=$a;if(c&&typeof s=="string"&&s){var f=gn(s);f='link[rel="'+r+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),zy.has(f)||(zy.add(f),r={rel:r,crossOrigin:i,href:s},c.querySelector(f)===null&&(s=c.createElement("link"),Mt(s,"link",r),Rt(s),c.head.appendChild(s)))}}function yR(r){hr.D(r),By("dns-prefetch",r,null)}function vR(r,s){hr.C(r,s),By("preconnect",r,s)}function bR(r,s,i){hr.L(r,s,i);var c=$a;if(c&&r&&s){var f='link[rel="preload"][as="'+gn(s)+'"]';s==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+gn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+gn(i.imageSizes)+'"]')):f+='[href="'+gn(r)+'"]';var p=f;switch(s){case"style":p=za(r);break;case"script":p=Ba(r)}Rn.has(p)||(r=y({rel:"preload",href:s==="image"&&i&&i.imageSrcSet?void 0:r,as:s},i),Rn.set(p,r),c.querySelector(f)!==null||s==="style"&&c.querySelector(ao(p))||s==="script"&&c.querySelector(io(p))||(s=c.createElement("link"),Mt(s,"link",r),Rt(s),c.head.appendChild(s)))}}function _R(r,s){hr.m(r,s);var i=$a;if(i&&r){var c=s&&typeof s.as=="string"?s.as:"script",f='link[rel="modulepreload"][as="'+gn(c)+'"][href="'+gn(r)+'"]',p=f;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=Ba(r)}if(!Rn.has(p)&&(r=y({rel:"modulepreload",href:r},s),Rn.set(p,r),i.querySelector(f)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(io(p)))return}c=i.createElement("link"),Mt(c,"link",r),Rt(c),i.head.appendChild(c)}}}function wR(r,s,i){hr.S(r,s,i);var c=$a;if(c&&r){var f=la(c).hoistableStyles,p=za(r);s=s||"default";var v=f.get(p);if(!v){var w={loading:0,preload:null};if(v=c.querySelector(ao(p)))w.loading=5;else{r=y({rel:"stylesheet",href:r,"data-precedence":s},i),(i=Rn.get(p))&&Cf(r,i);var A=v=c.createElement("link");Rt(A),Mt(A,"link",r),A._p=new Promise(function(P,B){A.onload=P,A.onerror=B}),A.addEventListener("load",function(){w.loading|=1}),A.addEventListener("error",function(){w.loading|=2}),w.loading|=4,ac(v,s,c)}v={type:"stylesheet",instance:v,count:1,state:w},f.set(p,v)}}}function SR(r,s){hr.X(r,s);var i=$a;if(i&&r){var c=la(i).hoistableScripts,f=Ba(r),p=c.get(f);p||(p=i.querySelector(io(f)),p||(r=y({src:r,async:!0},s),(s=Rn.get(f))&&xf(r,s),p=i.createElement("script"),Rt(p),Mt(p,"link",r),i.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(f,p))}}function ER(r,s){hr.M(r,s);var i=$a;if(i&&r){var c=la(i).hoistableScripts,f=Ba(r),p=c.get(f);p||(p=i.querySelector(io(f)),p||(r=y({src:r,async:!0,type:"module"},s),(s=Rn.get(f))&&xf(r,s),p=i.createElement("script"),Rt(p),Mt(p,"link",r),i.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(f,p))}}function qy(r,s,i,c){var f=(f=ge.current)?sc(f):null;if(!f)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(s=za(i.href),i=la(f).hoistableStyles,c=i.get(s),c||(c={type:"style",instance:null,count:0,state:null},i.set(s,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){r=za(i.href);var p=la(f).hoistableStyles,v=p.get(r);if(v||(f=f.ownerDocument||f,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(r,v),(p=f.querySelector(ao(r)))&&!p._p&&(v.instance=p,v.state.loading=5),Rn.has(r)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Rn.set(r,i),p||RR(f,r,i,v.state))),s&&c===null)throw Error(a(528,""));return v}if(s&&c!==null)throw Error(a(529,""));return null;case"script":return s=i.async,i=i.src,typeof i=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?
vendor: 5,251 bytes, line 10
10(s=Ba(i),i=la(f).hoistableScripts,c=i.get(s),c||(c={type:"script",instance:null,count:0,state:null},i.set(s,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function za(r){return'href="'+gn(r)+'"'}function ao(r){return'link[rel="stylesheet"]['+r+"]"}function Hy(r){return y({},r,{"data-precedence":r.precedence,precedence:null})}function RR(r,s,i,c){r.querySelector('link[rel="preload"][as="style"]['+s+"]")?c.loading=1:(s=r.createElement("link"),c.preload=s,s.addEventListener("load",function(){return c.loading|=1}),s.addEventListener("error",function(){return c.loading|=2}),Mt(s,"link",i),Rt(s),r.head.appendChild(s))}function Ba(r){return'[src="'+gn(r)+'"]'}function io(r){return"script[async]"+r}function Vy(r,s,i){if(s.count++,s.instance===null)switch(s.type){case"style":var c=r.querySelector('style[data-href~="'+gn(i.href)+'"]');if(c)return s.instance=c,Rt(c),c;var f=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),Rt(c),Mt(c,"style",f),ac(c,i.precedence,r),s.instance=c;case"stylesheet":f=za(i.href);var p=r.querySelector(ao(f));if(p)return s.state.loading|=4,s.instance=p,Rt(p),p;c=Hy(i),(f=Rn.get(f))&&Cf(c,f),p=(r.ownerDocument||r).createElement("link"),Rt(p);var v=p;return v._p=new Promise(function(w,A){v.onload=w,v.onerror=A}),Mt(p,"link",c),s.state.loading|=4,ac(p,i.precedence,r),s.instance=p;case"script":return p=Ba(i.src),(f=r.querySelector(io(p)))?(s.instance=f,Rt(f),f):(c=i,(f=Rn.get(p))&&(c=y({},i),xf(c,f)),r=r.ownerDocument||r,f=r.createElement("script"),Rt(f),Mt(f,"link",c),r.head.appendChild(f),s.instance=f);case"void":return null;default:throw Error(a(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(c=s.instance,s.state.loading|=4,ac(c,i.precedence,r));return s.instance}function ac(r,s,i){for(var c=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=c.length?c[c.length-1]:null,p=f,v=0;v<c.length;v++){var w=c[v];if(w.dataset.precedence===s)p=w;else if(p!==f)break}p?p.parentNode.insertBefore(r,p.nextSibling):(s=i.nodeType===9?i.head:i,s.insertBefore(r,s.firstChild))}function Cf(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.title==null&&(r.title=s.title)}function xf(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.integrity==null&&(r.integrity=s.integrity)}var ic=null;function Gy(r,s,i){if(ic===null){var c=new Map,f=ic=new Map;f.set(i,c)}else f=ic,c=f.get(i),c||(c=new Map,f.set(i,c));if(c.has(r))return c;for(c.set(r,null),i=i.getElementsByTagName(r),f=0;f<i.length;f++){var p=i[f];if(!(p[Si]||p[Lt]||r==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var v=p.getAttribute(s)||"";v=r+v;var w=c.get(v);w?w.push(p):c.set(v,[p])}}return c}function Fy(r,s,i){r=r.ownerDocument||r,r.head.insertBefore(i,s==="title"?r.querySelector("head > title"):null)}function TR(r,s,i){if(i===1||s.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(r=s.disabled,typeof s.precedence=="string"&&r==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function Ky(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function AR(r,s,i,c){if(i.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=za(c.href),p=s.querySelector(ao(f));if(p){s=p._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(r.count++,r=oc.bind(r),s.then(r,r)),i.state.loading|=4,i.instance=p,Rt(p);return}p=s.ownerDocument||s,c=Hy(c),(f=Rn.get(f))&&Cf(c,f),p=p.createElement("link"),Rt(p);var v=p;v._p=new Promise(function(w,A){v.onload=w,v.onerror=A}),Mt(p,"link",c),i.instance=p}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(i,s),(s=i.state.preload)&&(i.state.loading&3)===0&&(r.count++,i=oc.bind(r),s.addEventListener("load",i),s.addEventListener("error",i))}}var kf=0;function CR(r,s){return r.stylesheets&&r.count===0&&cc(r,r.stylesheets),0<r.count||0<r.imgCount?function(i){var c=setTimeout(function(){if(r.stylesheets&&cc(r,r.stylesheets),r.unsuspend){var p=r.unsuspend;r.unsuspend=null,p()}},6e4+s);0<r.imgBytes&&kf===0&&(kf=62500*oR());var f=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&cc(r,r.stylesheets),r.unsuspend)){var p=r.unsuspend;r.unsuspend=null,p()}},(r.imgBytes>kf?50:800)+s);return r.unsuspend=i,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function oc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cc(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var lc=null;function cc(r,s){r.stylesheets=null,r.unsuspend!==null&&(r.count++,lc=new Map,s.forEac
vendor: 6,904 bytes, line 10
10h(xR,r),lc=null,oc.call(r))}function xR(r,s){if(!(s.state.loading&4)){var i=lc.get(r);if(i)var c=i.get(null);else{i=new Map,lc.set(r,i);for(var f=r.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<f.length;p++){var v=f[p];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),c=v)}c&&i.set(null,c)}f=s.instance,v=f.getAttribute("data-precedence"),p=i.get(v)||c,p===c&&i.set(null,f),i.set(v,f),this.count++,c=oc.bind(this),f.addEventListener("load",c),f.addEventListener("error",c),p?p.parentNode.insertBefore(f,p.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(f,r.firstChild)),s.state.loading|=4}}var oo={$$typeof:k,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function kR(r,s,i,c,f,p,v,w,A){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Eu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Eu(0),this.hiddenUpdates=Eu(null),this.identifierPrefix=c,this.onUncaughtError=f,this.onCaughtError=p,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function Yy(r,s,i,c,f,p,v,w,A,P,B,G){return r=new kR(r,s,i,v,A,P,B,G,w),s=1,p===!0&&(s|=24),p=an(3,null,null,s),r.current=p,p.stateNode=r,s=od(),s.refCount++,r.pooledCache=s,s.refCount++,p.memoizedState={element:c,isDehydrated:i,cache:s},dd(p),r}function Zy(r){return r?(r=va,r):va}function Jy(r,s,i,c,f,p){f=Zy(f),c.context===null?c.context=f:c.pendingContext=f,c=Mr(s),c.payload={element:i},p=p===void 0?null:p,p!==null&&(c.callback=p),i=Dr(r,c,s),i!==null&&(Qt(i,r,s),$i(i,r,s))}function Qy(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var i=r.retryLane;r.retryLane=i!==0&&i<s?i:s}}function Of(r,s){Qy(r,s),(r=r.alternate)&&Qy(r,s)}function Xy(r){if(r.tag===13||r.tag===31){var s=Ts(r,67108864);s!==null&&Qt(s,r,67108864),Of(r,67108864)}}function Wy(r){if(r.tag===13||r.tag===31){var s=dn();s=Ru(s);var i=Ts(r,s);i!==null&&Qt(i,r,s),Of(r,s)}}var uc=!0;function OR(r,s,i,c){var f=U.T;U.T=null;var p=Z.p;try{Z.p=2,Lf(r,s,i,c)}finally{Z.p=p,U.T=f}}function LR(r,s,i,c){var f=U.T;U.T=null;var p=Z.p;try{Z.p=8,Lf(r,s,i,c)}finally{Z.p=p,U.T=f}}function Lf(r,s,i,c){if(uc){var f=Nf(c);if(f===null)yf(r,s,c,dc,i),tv(r,c);else if(jR(f,r,s,i,c))c.stopPropagation();else if(tv(r,c),s&4&&-1<NR.indexOf(r)){for(;f!==null;){var p=oa(f);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var v=_s(p.pendingLanes);if(v!==0){var w=p;for(w.pendingLanes|=2,w.entangledLanes|=2;v;){var A=1<<31-rn(v);w.entanglements[1]|=A,v&=~A}zn(p),(Ve&6)===0&&(Kl=Dt()+500,to(0))}}break;case 31:case 13:w=Ts(p,2),w!==null&&Qt(w,p,2),Zl(),Of(p,2)}if(p=Nf(c),p===null&&yf(r,s,c,dc,i),p===f)break;f=p}f!==null&&c.stopPropagation()}else yf(r,s,c,null,i)}}function Nf(r){return r=ju(r),jf(r)}var dc=null;function jf(r){if(dc=null,r=ia(r),r!==null){var s=l(r);if(s===null)r=null;else{var i=s.tag;if(i===13){if(r=u(s),r!==null)return r;r=null}else if(i===31){if(r=d(s),r!==null)return r;r=null}else if(i===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null)}}return dc=r,null}function ev(r){switch(r){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(We()){case Ot:return 2;case Dn:return 8;case sa:case vS:return 32;case up:return 268435456;default:return 32}default:return 32}}var Pf=!1,Kr=null,Yr=null,Zr=null,lo=new Map,co=new Map,Jr=[],NR="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".split(" ");function tv(r,s){switch(r){case"focusin":case"focusout":Kr=null;break;case"dragenter":case"dragleave":Yr=null;break;case"mouseover":case"mouseout":Zr=null;break;case"pointerover":case"pointerout":lo.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":co.delete(s.pointerId)}}function uo(r,s,i,c,f,p){return r===null||r.nativeEvent!==p?(r={blockedOn:s,domEventName:i,eventSystemFlags:c,nativeEvent:p,targetContainers:[f]},s!==null&&(s=oa(s),s!==null&&Xy(s)),r):(r.eventSystemFlags|=c,s=r.targetContainers,f!==null&&s.indexOf(f)===-1&&s.push(f),r)}function jR(r,s,i,c,f){switch(s){case"focusin":return Kr=uo(Kr,r,s,i,c,f),!0;case"dragenter":return Yr=uo(Yr,r,s,i,c,f),!0;case"mouseover":return Zr=uo(Zr,r,s,i,c,f),!0;case"pointerover":var p=f.pointerId;return lo.set(p,uo(lo.get(p)||null,r,s,i,c,f)),!0;case"gotpointercapture":return p=f.pointerId,co.set(p,uo(co.get(p)||null,r,s,i,c,f)),!0}return!1}function nv(r){var s=ia(r.target);if(s!==null){var i=l(s);if(i!==null){if(s=i.tag,s===13){if(s=u(i),s!==null){r.blockedOn=s,gp(r.priority,function(){Wy(i)});return}}else if(s===31){if(s=d(i),s!==null){r.blockedOn=s,gp(r.priority,function(){Wy(i)});return}}else if(s===3&&i.stateNode.current.memoizedState.isDehydrated){r.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}r.blockedOn=null}function fc(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var i=Nf(r.nativeEvent);if(i===null){i=r.nativeEvent;var c=new i.constructor(i.type,i);Nu=c,i.target.dispatchEvent(c),Nu=null}else return s=oa(i),s!==null&&Xy(s),r.blockedOn=i,!1;s.shift()}return!0}function rv(r,s,i){fc(r)&&i.delete(s)}function PR(){Pf=!1,Kr!==null&&fc(Kr)&&(Kr=null),Yr!==null&&fc(Yr)&&(Yr=null),Zr!==null&&fc(Zr)&&(Zr=null),lo.forEach(rv),co.forEac
10h(rv)}function hc(r,s){r.blockedOn===s&&(r.blockedOn=null,Pf||(Pf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,PR)))}var pc=null;function sv(r){pc!==r&&(pc=r,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){pc===r&&(pc=null);for(var s=0;s<r.length;s+=3){var i=r[s],c=r[s+1],f=r[s+2];if(typeof c!="function"){if(jf(c||i)===null)continue;break}var p=oa(i);p!==null&&(r.splice(s,3),s-=3,Ld(p,{pending:!0,data:f,method:i.method,action:c},c,f))}}))}function qa(r){function s(A){return hc(A,r)}Kr!==null&&hc(Kr,r),Yr!==null&&hc(Yr,r),Zr!==null&&hc(Zr,r),lo.forEach(s),co.forEach(s);for(var i=0;i<Jr.length;i++){var c=Jr[i];c.blockedOn===r&&(c.blockedOn=null)}for(;0<Jr.length&&(i=Jr[0],i.blockedOn===null);)nv(i),i.blockedOn===null&&Jr.shift();if(i=(r.ownerDocument||r).$$reactFormReplay,i!=null)for(c=0;c<i.length;c+=3){var f=i[c],p=i[c+1],v=f[Gt]||null;if(typeof p=="function")v||sv(i);else if(v){var w=null;if(p&&p.hasAttribute("formAction")){if(f=p,v=p[Gt]||null)w=v.formAction;else if(jf(f)!==null)continue}else w=v.action;typeof w=="function"?i[c+1]=w:(i.splice(c,3),c-=3),sv(i)}}}function av(){function r(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(v){return f=v})},focusReset:"manual",scroll:"manual"})}function s(){f!==null&&(f(),f=null),c||setTimeout(i,20)}function i(){if(!c&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,f=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(i,100),function(){c=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),f!==null&&(f(),f=null)}}}function Mf(r){this._internalRoot=r}mc.prototype.render=Mf.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(a(409));var i=s.current,c=dn();Jy(i,c,r,s,null,null)},mc.prototype.unmount=Mf.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Jy(r.current,2,null,r,null,null),Zl(),s[aa]=null}};function mc(r){this._internalRoot=r}mc.prototype.unstable_scheduleHydration=function(r){if(r){var s=mp();r={blockedOn:null,target:r,priority:s};for(var i=0;i<Jr.length&&s!==0&&s<Jr[i].priority;i++);Jr.splice(i,0,r),i===0&&nv(r)}};var iv=e.version;if(iv!=="19.2.5")throw Error(a(527,iv,"19.2.5"));Z.findDOMNode=function(r){var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=m(s),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var MR={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gc.isDisabled&&gc.supportsFiber)try{bi=gc.inject(MR),nn=gc}catch{}}return ho.createRoot=function(r,s){if(!o(r))throw Error(a(299));var i=!1,c="",f=hg,p=pg,v=mg;return s!=null&&(s.unstable_strictMode===!0&&(i=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onUncaughtError!==void 0&&(f=s.onUncaughtError),s.onCaughtError!==void 0&&(p=s.onCaughtError),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),s=Yy(r,1,!1,null,null,i,c,null,f,p,v,av),r[aa]=s.current,gf(r),new Mf(s)},ho.hydrateRoot=function(r,s,i){if(!o(r))throw Error(a(299));var c=!1,f="",p=hg,v=pg,w=mg,A=null;return i!=null&&(i.unstable_strictMode===!0&&(c=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(p=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError),i.formState!==void 0&&(A=i.formState)),s=Yy(r,1,!0,s,i??null,c,f,A,p,v,w,av),s.context=Zy(null),i=s.current,c=dn(),c=Ru(c),f=Mr(c),f.callback=null,Dr(i,f,c),i=c,s.current.lanes=i,wi(s,i),zn(s),r[aa]=s.current,gf(r),new mc(s)},ho.version="19.2.5",ho}var gv;function GR(){if(gv)return Uf.exports;gv=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Uf.exports=VR(),Uf.exports}var FR=GR(),KR="__TSS_CONTEXT",fh=Symbol.for("TSS_SERVER_FUNCTION"),yv=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),YR="application/x-tss-framed",pr={JSON:0,CHUNK:1,END:2,ERROR:3},ZR=/;\s*v=(\d+)/;function JR(t){const e=t.match(ZR);return e?parseInt(e[1],10):void 0}function QR(t){const e=JR(t);if(e!==void 0&&e!==1)throw new Error(`Incompatible framed protocol version: server=${e}, client=1. Please ensure client and server are using compatible versions.`)}var Gh=()=>window.__TSS_START_OPTIONS__,B0=!1;function No(t){return t[t.length-1]}function XR(t){return typeof t=="function"}function is(t,e){return XR(t)?t(e):t}var WR=Object.prototype.hasOwnProperty,vv=Object.prototype.propertyIsEnumerable,eT=()=>Object.create(null),Us=(t,e)=>os(t,e,eT);function os(t,e,n=()=>({}),a=0){if(t===e)return t;if(a>500)return e;const o=e,l=wv(t)&&wv(o);if(!l&&!(ii(t)&&ii(o)))return o;const u=l?t:bv(t);if(!u)return o;const d=l?o:bv(o);if(!d)return o;const h=u.length,m=d.length,g=l?new Array(m):n();let y=0;for(let b=0;b<m;b++){const _=l?b:d[b],S=t[_],R=o[_];if(S===R){g[_]=S,(l?b<h:WR.call(t,_))&&y++;continue}if(S===null||R===null||typeof S!="object"||typeof R!="object"){g[_]=R;continue}const E=os(S,R,n,a+1);g[_]=E,E===S&&y++}return h===m&&y===h?t:g}function bv(t){const e=Object.getOwnPropertyNames(t);for(const o of e)if(!vv.call(t,o))return!1;const n=Object.getOwnPropertySymbols(t);if(n.length===0)return e;const a=e;for(const o of n){if(!vv.call(t,o))return!1;a.push(o)}return a}function ii(t){if(!_v(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!_v(n)||!n.hasOwnProperty("isPrototypeOf"))}function _v(t){return Object.prototype.toString.call(t)==="[object Object]"}function wv(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Wt(t,e,n){if(t===e)return!0;
10if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let a=0,o=t.length;a<o;a++)if(!Wt(t[a],e[a],n))return!1;return!0}if(ii(t)&&ii(e)){const a=n?.ignoreUndefined??!0;if(n?.partial){for(const u in e)if((!a||e[u]!==void 0)&&!Wt(t[u],e[u],n))return!1;return!0}let o=0;if(!a)o=Object.keys(t).length;else for(const u in t)t[u]!==void 0&&o++;let l=0;for(const u in e)if((!a||e[u]!==void 0)&&(l++,l>o||!Wt(t[u],e[u],n)))return!1;return o===l}return!1}function Js(t){let e,n;const a=new Promise((o,l)=>{e=o,n=l});return a.status="pending",a.resolve=o=>{a.status="resolved",a.value=o,e(o),t?.(o)},a.reject=o=>{a.status="rejected",n(o)},a}function tT(t){return typeof t?.message!="string"?!1:t.message.startsWith("Failed to fetch dynamically imported module")||t.message.startsWith("error loading dynamically imported module")||t.message.startsWith("Importing a module script failed")}function jo(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}function nT(t){return t.replace(/[\x00-\x1f\x7f]/g,"")}function Sv(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return nT(e)}var rT=["http:","https:","mailto:","tel:"];function Bc(t,e){if(!t)return!1;try{const n=new URL(t);return!e.has(n.protocol)}catch{return!1}}var sT={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},aT=/[&><\u2028\u2029]/g;function iT(t){return t.replace(aT,e=>sT[e])}function po(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const e=/%25|%5C/gi;let n=0,a="",o;for(;(o=e.exec(t))!==null;)a+=Sv(t.slice(n,o.index))+o[0],n=e.lastIndex;a=a+Sv(n?t.slice(n):t);let l=!1;return a.startsWith("//")&&(l=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:l}}function oT(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function lT(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function en(){throw new Error("Invariant failed")}function Po(t){const e=new Map;let n,a;const o=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,a&&(a.next=l,l.prev=a)):(l.next.prev=void 0,n=l.next,l.next=void 0,a&&(l.prev=a,a.next=l)),a=l)};return{get(l){const u=e.get(l);if(u)return o(u),u.value},set(l,u){if(e.size>=t&&n){const h=n;e.delete(h.key),h.next&&(n=h.next,h.next.prev=void 0),h===a&&(a=void 0)}const d=e.get(l);if(d)d.value=u,o(d);else{const h={key:l,value:u,prev:a};a&&(a.next=h),a=h,n||(n=h),e.set(l,h)}},clear(){e.clear(),n=void 0,a=void 0}}}var ls=4,q0=5;function cT(t){const e=t.indexOf("{");if(e===-1)return null;const n=t.indexOf("}",e);return n===-1||e+1>=t.length?null:[e,n]}function Fh(t,e,n=new Uint16Array(6)){const a=t.indexOf("/",e),o=a===-1?t.length:a,l=t.substring(e,o);if(!l||!l.includes("$"))return n[0]=0,n[1]=e,n[2]=e,n[3]=o,n[4]=o,n[5]=o,n;if(l==="$"){const d=t.length;return n[0]=2,n[1]=e,n[2]=e,n[3]=d,n[4]=d,n[5]=d,n}if(l.charCodeAt(0)===36)return n[0]=1,n[1]=e,n[2]=e+1,n[3]=o,n[4]=o,n[5]=o,n;const u=cT(l);if(u){const[d,h]=u,m=l.charCodeAt(d+1);if(m===45){if(d+2<l.length&&l.charCodeAt(d+2)===36){const g=d+3,y=h;if(g<y)return n[0]=3,n[1]=e+d,n[2]=e+g,n[3]=e+y,n[4]=e+h+1,n[5]=o,n}}else if(m===36){const g=d+1,y=d+2;return y===h?(n[0]=2,n[1]=e+d,n[2]=e+g,n[3]=e+y,n[4]=e+h+1,n[5]=t.length,n):(n[0]=1,n[1]=e+d,n[2]=e+y,n[3]=e+h,n[4]=e+h+1,n[5]=o,n)}}return n[0]=0,n[1]=e,n[2]=e,n[3]=o,n[4]=o,n[5]=o,n}function cu(t,e,n,a,o,l,u){u?.(n);let d=a;{const h=n.fullPath??n.from,m=h.length,g=n.options?.caseSensitive??t,y=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;d<m;){const _=Fh(h,d,e);let S;const R=d,E=_[5];switch(d=E+1,l++,_[0]){case 0:{const T=h.substring(_[2],_[3]);if(g){const C=o.static?.get(T);if(C)S=C;else{o.static??=new Map;const k=Hs(n.fullPath??n.from);k.parent=o,k.depth=l,S=k,o.static.set(T,k)}}else{const C=T.toLowerCase(),k=o.staticInsensitive?.get(C);if(k)S=k;else{o.staticInsensitive??=new Map;const N=Hs(n.fullPath??n.from);N.parent=o,N.depth=l,S=N,o.staticInsensitive.set(C,N)}}break}case 1:{const T=h.substring(R,_[1]),C=h.substring(_[4],E),k=g&&!!(T||C),N=T?k?T:T.toLowerCase():void 0,F=C?k?C:C.toLowerCase():void 0,V=!y&&o.dynamic?.find(z=>!z.skipOnParamError&&z.caseSensitive===k&&z.prefix===N&&z.suffix===F);if(V)S=V;else{const z=Hf(1,n.fullPath??n.from,k,N,F);S=z,z.depth=l,z.parent=o,o.dynamic??=[],o.dynamic.push(z)}break}case 3:{const T=h.substring(R,_[1]),C=h.substring(_[4],E),k=g&&!!(T||C),N=T?k?T:T.toLowerCase():void 0,F=C?k?C:C.toLowerCase():void 0,V=!y&&o.optional?.find(z=>!z.skipOnParamError&&z.caseSensitive===k&&z.prefix===N&&z.suffix===F);if(V)S=V;else{const z=Hf(3,n.fullPath??n.from,k,N,F);
10S=z,z.parent=o,z.depth=l,o.optional??=[],o.optional.push(z)}break}case 2:{const T=h.substring(R,_[1]),C=h.substring(_[4],E),k=g&&!!(T||C),N=T?k?T:T.toLowerCase():void 0,F=C?k?C:C.toLowerCase():void 0,V=Hf(2,n.fullPath??n.from,k,N,F);S=V,V.parent=o,V.depth=l,o.wildcard??=[],o.wildcard.push(V)}}o=S}if(y&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const _=Hs(n.fullPath??n.from);_.kind=q0,_.parent=o,l++,_.depth=l,o.pathless??=[],o.pathless.push(_),o=_}const b=(n.path||!n.children)&&!n.isRoot;if(b&&h.endsWith("/")){const _=Hs(n.fullPath??n.from);_.kind=ls,_.parent=o,l++,_.depth=l,o.index=_,o=_}o.parse=n.options?.params?.parse??null,o.skipOnParamError=y,o.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,b&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const h of n.children)cu(t,e,h,d,o,l,u)}function qf(t,e){if(t.skipOnParamError&&!e.skipOnParamError)return-1;if(!t.skipOnParamError&&e.skipOnParamError)return 1;if(t.skipOnParamError&&e.skipOnParamError&&(t.parsingPriority||e.parsingPriority))return e.parsingPriority-t.parsingPriority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function ts(t){if(t.pathless)for(const e of t.pathless)ts(e);if(t.static)for(const e of t.static.values())ts(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())ts(e);if(t.dynamic?.length){t.dynamic.sort(qf);for(const e of t.dynamic)ts(e)}if(t.optional?.length){t.optional.sort(qf);for(const e of t.optional)ts(e)}if(t.wildcard?.length){t.wildcard.sort(qf);for(const e of t.wildcard)ts(e)}}function Hs(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Hf(t,e,n,a,o){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:a,suffix:o}}function uT(t,e){const n=Hs("/"),a=new Uint16Array(6);for(const o of t)cu(!1,a,o,1,n,0);ts(n),e.masksTree=n,e.flatCache=Po(1e3)}function dT(t,e){t||="/";const n=e.flatCache.get(t);if(n)return n;const a=Kh(t,e.masksTree);return e.flatCache.set(t,a),a}function fT(t,e,n,a,o){t||="/",a||="/";const l=e?`case\0${t}`:t;let u=o.singleCache.get(l);return u||(u=Hs("/"),cu(e,new Uint16Array(6),{from:t},1,u,0),o.singleCache.set(l,u)),Kh(a,u,n)}function hT(t,e,n=!1){const a=n?t:`nofuzz\0${t}`,o=e.matchCache.get(a);if(o!==void 0)return o;t||="/";let l;try{l=Kh(t,e.segmentTree,n)}catch(u){if(u instanceof URIError)l=null;else throw u}return l&&(l.branch=gT(l.route)),e.matchCache.set(a,l),l}function pT(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function mT(t,e=!1,n){const a=Hs(t.fullPath),o=new Uint16Array(6),l={},u={};let d=0;return cu(e,o,t,1,a,0,h=>{if(n?.(h,d),h.id in l&&en(),l[h.id]=h,d!==0&&h.path){const m=pT(h.fullPath);(!u[m]||h.fullPath.endsWith("/"))&&(u[m]=h)}d++}),ts(a),{processedTree:{segmentTree:a,singleCache:Po(1e3),matchCache:Po(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function Kh(t,e,n=!1){const a=t.split("/"),o=vT(t,a,e,n);if(!o)return null;const[l]=H0(t,a,o);return{route:o.node.route,rawParams:l,parsedParams:o.parsedParams}}function H0(t,e,n){const a=yT(n.node);let o=null;const l=Object.create(null);let u=n.extract?.part??0,d=n.extract?.node??0,h=n.extract?.path??0,m=n.extract?.segment??0;for(;d<a.length;u++,d++,h++,m++){const g=a[d];if(g.kind===ls)break;if(g.kind===q0){m--,u--,h--;continue}const y=e[u],b=h;if(y&&(h+=y.length),g.kind===1){o??=n.node.fullPath.split("/");const _=o[m],S=g.prefix?.length??0;if(_.charCodeAt(S)===123){const R=g.suffix?.length??0,E=_.substring(S+2,_.length-R-1),T=y.substring(S,y.length-R);l[E]=decodeURIComponent(T)}else{const R=_.substring(1);
10l[R]=decodeURIComponent(y)}}else if(g.kind===3){if(n.skipped&1<<d){u--,h=b-1;continue}o??=n.node.fullPath.split("/");const _=o[m],S=g.prefix?.length??0,R=g.suffix?.length??0,E=_.substring(S+3,_.length-R-1),T=g.suffix||g.prefix?y.substring(S,y.length-R):y;T&&(l[E]=decodeURIComponent(T))}else if(g.kind===2){const _=g,S=t.substring(b+(_.prefix?.length??0),t.length-(_.suffix?.length??0)),R=decodeURIComponent(S);l["*"]=R,l._splat=R;break}}return n.rawParams&&Object.assign(l,n.rawParams),[l,{part:u,node:d,path:h,segment:m}]}function gT(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function yT(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function vT(t,e,n,a){if(t==="/"&&n.index)return{node:n.index,skipped:0};const o=!No(e),l=o&&t!=="/",u=e.length-(o?1:0),d=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let h=null,m=null;for(;d.length;){const g=d.pop(),{node:y,index:b,skipped:_,depth:S,statics:R,dynamics:E,optionals:T}=g;let{extract:C,rawParams:k,parsedParams:N}=g;if(y.kind===2&&y.route&&!vc(m,g))continue;if(y.skipOnParamError){if(!Ev(t,e,g))continue;k=g.rawParams,C=g.extract,N=g.parsedParams}a&&y.route&&y.kind!==ls&&vc(h,g)&&(h=g);const F=b===u;if(F&&(y.route&&(!l||y.kind===ls||y.kind===2)&&vc(m,g)&&(m=g),!y.optional&&!y.wildcard&&!y.index&&!y.pathless))continue;const V=F?void 0:e[b];let z;if(F&&y.index){const M={node:y.index,index:b,skipped:_,depth:S+1,statics:R,dynamics:E,optionals:T,extract:C,rawParams:k,parsedParams:N};let K=!0;if(y.index.skipOnParamError&&(Ev(t,e,M)||(K=!1)),K){if(!E&&!T&&!_&&bT(R,u))return M;vc(m,M)&&(m=M)}}if(y.wildcard)for(let M=y.wildcard.length-1;M>=0;M--){const K=y.wildcard[M],{prefix:fe,suffix:ie}=K;if(!(fe&&(F||!(K.caseSensitive?V:z??=V.toLowerCase()).startsWith(fe)))){if(ie){if(F)continue;const Te=e.slice(b).join("/").slice(-ie.length);if((K.caseSensitive?Te:Te.toLowerCase())!==ie)continue}d.push({node:K,index:u,skipped:_,depth:S+1,statics:R,dynamics:E,optionals:T,extract:C,rawParams:k,parsedParams:N})}}if(y.optional){const M=_|1<<S,K=S+1;for(let fe=y.optional.length-1;fe>=0;fe--){const ie=y.optional[fe];d.push({node:ie,index:b,skipped:M,depth:K,statics:R,dynamics:E,optionals:T,extract:C,rawParams:k,parsedParams:N})}if(!F)for(let fe=y.optional.length-1;fe>=0;fe--){const ie=y.optional[fe],{prefix:Te,suffix:$e}=ie;if(Te||$e){const tt=ie.caseSensitive?V:z??=V.toLowerCase();if(Te&&!tt.startsWith(Te)||$e&&!tt.endsWith($e))continue}d.push({node:ie,index:b+1,skipped:_,depth:K,statics:R,dynamics:E,optionals:T+yc(u,b),extract:C,rawParams:k,parsedParams:N})}}if(!F&&y.dynamic&&V)for(let M=y.dynamic.length-1;M>=0;M--){const K=y.dynamic[M],{prefix:fe,suffix:ie}=K;if(fe||ie){const Te=K.caseSensitive?V:z??=V.toLowerCase();if(fe&&!Te.startsWith(fe)||ie&&!Te.endsWith(ie))continue}d.push({node:K,index:b+1,skipped:_,depth:S+1,statics:R,dynamics:E+yc(u,b),optionals:T,extract:C,rawParams:k,parsedParams:N})}if(!F&&y.staticInsensitive){const M=y.staticInsensitive.get(z??=V.toLowerCase());M&&d.push({node:M,index:b+1,skipped:_,depth:S+1,statics:R+yc(u,b),dynamics:E,optionals:T,extract:C,rawParams:k,parsedParams:N})}if(!F&&y.static){const M=y.static.get(V);M&&d.push({node:M,index:b+1,skipped:_,depth:S+1,statics:R+yc(u,b),dynamics:E,optionals:T,extract:C,rawParams:k,parsedParams:N})}if(y.pathless){const M=S+1;for(let K=y.pathless.length-1;K>=0;K--){const fe=y.pathless[K];d.push({node:fe,index:b,skipped:_,depth:M,statics:R,dynamics:E,optionals:T,extract:C,rawParams:k,parsedParams:N})}}}if(m)return m;if(a&&h){let g=h.index;for(let b=0;b<h.index;b++)g+=e[b].length;const y=g===t.length?"/":t.slice(g);return h.rawParams??=Object.create(null),h.rawParams["**"]=decodeURIComponent(y),h}return null}function yc(t,e){return 2**(t-e-1)}function bT(t,e){return t===2**(e-1)-1}function Ev(t,e,n){try{const[a,o]=H0(t,e,n);n.rawParams=a,n.extract=o;const l=n.node.parse(a);return n.parsedParams=Object.assign(Object.create(null),n.parsedParams,l),!0}catch{return null}}function vc(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===ls)>(t.node.kind===ls)||e.node.kind===ls==(t.node.kind===ls)&&e.depth>t.depth))):!0}function Pc(t){return Yh(t.filter(e=>e!==void 0).join("/"))}function Yh(t){return t.replace(/\/{2,}/g,"/")}function V0(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function us(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function G0(t){return us(V0(t))}function qc(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function _T(t,e,n){return qc(t,n)===qc(e,n)}
10function wT({base:t,to:e,trailingSlash:n="never",cache:a}){const o=e.startsWith("/"),l=!o&&e===".";let u;if(a){u=o?e:l?t:t+"\0"+e;const y=a.get(u);if(y)return y}let d;if(l)d=t.split("/");else if(o)d=e.split("/");else{for(d=t.split("/");d.length>1&&No(d)==="";)d.pop();const y=e.split("/");for(let b=0,_=y.length;b<_;b++){const S=y[b];S===""?b?b===_-1&&d.push(S):d=[S]:S===".."?d.pop():S==="."||d.push(S)}}d.length>1&&(No(d)===""?n==="never"&&d.pop():n==="always"&&d.push(""));let h,m="";for(let y=0;y<d.length;y++){y>0&&(m+="/");const b=d[y];if(!b)continue;h=Fh(b,0,h);const _=h[0];if(_===0){m+=b;continue}const S=h[5],R=b.substring(0,h[1]),E=b.substring(h[4],S),T=b.substring(h[2],h[3]);_===1?m+=R||E?`${R}{$${T}}${E}`:`$${T}`:_===2?m+=R||E?`${R}{$}${E}`:"$":m+=`${R}{-$${T}}${E}`}m=Yh(m);const g=m||"/";return u&&a&&a.set(u,g),g}function ST(t){const e=new Map(t.map(o=>[encodeURIComponent(o),o])),n=Array.from(e.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(n,"g");return o=>o.replace(a,l=>e.get(l)??l)}function Vf(t,e,n){const a=e[t];return typeof a!="string"?a:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(o=>Tv(o,n)).join("/"):Tv(a,n)}function Rv({path:t,params:e,decoder:n,...a}){let o=!1;const l=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:l,isMissingParams:o};if(!t.includes("$"))return{interpolatedPath:t,usedParams:l,isMissingParams:o};const u=t.length;let d=0,h,m="";for(;d<u;){const g=d;h=Fh(t,g,h);const y=h[5];if(d=y+1,g===y)continue;const b=h[0];if(b===0){m+="/"+t.substring(g,y);continue}if(b===2){const _=e._splat;l._splat=_,l["*"]=_;const S=t.substring(g,h[1]),R=t.substring(h[4],y);if(!_){o=!0,(S||R)&&(m+="/"+S+R);continue}const E=Vf("_splat",e,n);m+="/"+S+E+R;continue}if(b===1){const _=t.substring(h[2],h[3]);!o&&!(_ in e)&&(o=!0),l[_]=e[_];const S=t.substring(g,h[1]),R=t.substring(h[4],y),E=Vf(_,e,n)??"undefined";m+="/"+S+E+R;continue}if(b===3){const _=t.substring(h[2],h[3]),S=e[_];if(S==null)continue;l[_]=S;const R=t.substring(g,h[1]),E=t.substring(h[4],y),T=Vf(_,e,n)??"";m+="/"+R+T+E;continue}}return t.endsWith("/")&&(m+="/"),{usedParams:l,interpolatedPath:m||"/",isMissingParams:o}}function Tv(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function Ct(t){return t?.isNotFound===!0}function ET(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var RT="tsr-scroll-restoration-v1_3";function TT(){const t=ET();if(!t)return null;let e={};try{const a=JSON.parse(t.getItem("tsr-scroll-restoration-v1_3")||"{}");ii(a)&&(e=a)}catch{}return{get state(){return e},set:a=>{e=is(a,e)||e},persist:()=>{try{t.setItem(RT,JSON.stringify(e))}catch{}}}}var Av=TT(),AT=t=>t.state.__TSR_key||t.href;function CT(t){const e=[];let n;for(;n=t.parentNode;)e.push(`${t.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,t)+1})`),t=n;return`${e.reverse().join(" > ")}`.toLowerCase()}var bc=!1,mo="window",Cv="data-scroll-restoration-id";function xT(t,e){if(!Av)return;const n=Av;if((t.options.scrollRestoration??!1)&&(t.isScrollRestoring=!0),t.isScrollRestorationSetup||!n)return;t.isScrollRestorationSetup=!0,bc=!1;const a=t.options.getScrollRestorationKey||AT,o=new Map;window.history.scrollRestoration="manual";const l=d=>{if(!(bc||!t.isScrollRestoring))if(d.target===document||d.target===window)o.set(mo,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const h=d.target;o.set(h,{scrollX:h.scrollLeft||0,scrollY:h.scrollTop||0})}},u=d=>{if(!t.isScrollRestoring||!d||o.size===0||!n)return;const h=n.state[d]||={};for(const[m,g]of o){let y;if(m===mo)y=mo;else if(m.isConnected){const b=m.getAttribute(Cv);y=b?`[${Cv}="${b}"]`:CT(m)}y&&(h[y]=g)}};document.addEventListener("scroll",l,!0),t.subscribe("onBeforeLoad",d=>{u(d.fromLocation?a(d.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{u(a(t.stores.resolvedLocation.get()??t.stores.location.get())),n.persist()}),t.subscribe("onRendered",d=>{const h=a(d.toLocation),m=t.options.scrollRestorationBehavior,g=t.options.scrollToTopSelectors;if(o.clear(),!t.resetNextScroll){t.resetNextScroll=!0;return}if(!(typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))){bc=!0;try{const y=t.isScrollRestoring?n.state[h]:void 0;let b=!1;if(y)for(const _ in y){const S=y[_];if(!ii(S))continue;const{scrollX:R,scrollY:E}=S;if(!(!Number.isFinite(R)||!Number.isFinite(E))){if(_===mo)window.scrollTo({top:E,left:R,behavior:m}),b=!0;else if(_){let T;
10try{T=document.querySelector(_)}catch{continue}T&&(T.scrollLeft=R,T.scrollTop=E,b=!0)}}}if(!b){const _=t.history.location.hash.slice(1);if(_){const S=window.history.state?.__hashScrollIntoViewOptions??!0;if(S){const R=document.getElementById(_);R&&R.scrollIntoView(S)}}else{const S={top:0,left:0,behavior:m};if(window.scrollTo(S),g)for(const R of g){if(R===mo)continue;const E=typeof R=="function"?R():document.querySelector(R);E&&E.scrollTo(S)}}}}finally{bc=!1}t.isScrollRestoring&&n.set(y=>(y[h]||={},y))}})}function F0(t,e=String){const n=new URLSearchParams;for(const a in t){const o=t[a];o!==void 0&&n.set(a,e(o))}return n.toString()}function Gf(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function kT(t){const e=new URLSearchParams(t),n=Object.create(null);for(const[a,o]of e.entries()){const l=n[a];l==null?n[a]=Gf(o):Array.isArray(l)?l.push(Gf(o)):n[a]=[l,Gf(o)]}return n}var OT=NT(JSON.parse),LT=jT(JSON.stringify,JSON.parse);function NT(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=kT(e);for(const a in n){const o=n[a];if(typeof o=="string")try{n[a]=t(o)}catch{}}return n}}function jT(t,e){const n=typeof e=="function";function a(o){if(typeof o=="object"&&o!==null)try{return t(o)}catch{}else if(n&&typeof o=="string")try{return e(o),t(o)}catch{}return o}return o=>{const l=F0(o,a);return l?`?${l}`:""}}var Ys="__root__";function K0(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const n=new Response(null,{status:t.statusCode,headers:e});if(n.options=t,t.throw)throw n;return n}function Ht(t){return t instanceof Response&&!!t.options}function Y0(t){if(t!==null&&typeof t=="object"&&t.isSerializedRedirect)return K0(t)}function PT(t){return{input:({url:e})=>{for(const n of t)e=hh(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=Z0(t[n],e);return e}}}function MT(t){const e=G0(t.basepath),n=`/${e}`,a=`${n}/`,o=t.caseSensitive?n:n.toLowerCase(),l=t.caseSensitive?a:a.toLowerCase();return{input:({url:u})=>{const d=t.caseSensitive?u.pathname:u.pathname.toLowerCase();return d===o?u.pathname="/":d.startsWith(l)&&(u.pathname=u.pathname.slice(n.length)),u},output:({url:u})=>(u.pathname=Pc(["/",e,u.pathname]),u)}}function hh(t,e){const n=t?.input?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function Z0(t,e){const n=t?.output?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function DT(t,e){const{createMutableStore:n,createReadonlyStore:a,batch:o,init:l}=e,u=new Map,d=new Map,h=new Map,m=n(t.status),g=n(t.loadedAt),y=n(t.isLoading),b=n(t.isTransitioning),_=n(t.location),S=n(t.resolvedLocation),R=n(t.statusCode),E=n(t.redirect),T=n([]),C=n([]),k=n([]),N=a(()=>Ff(u,T.get())),F=a(()=>Ff(d,C.get())),V=a(()=>Ff(h,k.get())),z=a(()=>T.get()[0]),M=a(()=>T.get().some(Z=>u.get(Z)?.get().status==="pending")),K=a(()=>({locationHref:_.get().href,resolvedLocationHref:S.get()?.href,status:m.get()})),fe=a(()=>({status:m.get(),loadedAt:g.get(),isLoading:y.get(),isTransitioning:b.get(),matches:N.get(),location:_.get(),resolvedLocation:S.get(),statusCode:R.get(),redirect:E.get()})),ie=Po(64);function Te(Z){let me=ie.get(Z);return me||(me=a(()=>{const Me=T.get();for(const ee of Me){const x=u.get(ee);if(x&&x.routeId===Z)return x.get()}}),ie.set(Z,me)),me}const $e={status:m,loadedAt:g,isLoading:y,isTransitioning:b,location:_,resolvedLocation:S,statusCode:R,redirect:E,matchesId:T,pendingIds:C,cachedIds:k,matches:N,pendingMatches:F,cachedMatches:V,firstId:z,hasPending:M,matchRouteDeps:K,matchStores:u,pendingMatchStores:d,cachedMatchStores:h,__store:fe,getRouteMatchStore:Te,setMatches:tt,setPending:ze,setCached:U};tt(t.matches),l?.($e);function tt(Z){Kf(Z,u,T,n,o)}function ze(Z){Kf(Z,d,C,n,o)}function U(Z){Kf(Z,h,k,n,o)}return $e}function Ff(t,e){const n=[];for(const a of e){const o=t.get(a);o&&n.push(o.get())}return n}function Kf(t,e,n,a,o){const l=t.map(d=>d.id),u=new Set(l);o(()=>{for(const d of e.keys())u.has(d)||e.delete(d);for(const d of t){const h=e.get(d.id);if(!h){const m=a(d);m.routeId=d.routeId,e.set(d.id,m);continue}h.routeId=d.routeId,h.get()!==d&&h.set(d)}lT(n.get(),l)||n.set(l)})}var ph=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},IT=t=>t.stores.matchesId.get().some(e=>
10t.stores.matchStores.get(e)?.get()._forcePending),uu=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),Zs=(t,e,n=!0)=>{const a={...t.router.options.context??{}},o=n?e:e-1;for(let l=0;l<=o;l++){const u=t.matches[l];if(!u)continue;const d=t.router.getMatch(u.id);d&&Object.assign(a,d.__routeContext,d.__beforeLoadContext)}return a},xv=(t,e)=>{if(!t.matches.length)return;const n=e.routeId,a=t.matches.findIndex(u=>u.routeId===t.router.routeTree.id),o=a>=0?a:0;let l=n?t.matches.findIndex(u=>u.routeId===n):t.firstBadMatchIndex??t.matches.length-1;l<0&&(l=o);for(let u=l;u>=0;u--){const d=t.matches[u];if(t.router.looseRoutesById[d.routeId].options.notFoundComponent)return u}return n?l:o},cs=(t,e,n)=>{if(!(!Ht(n)&&!Ct(n)))throw Ht(n)&&n.redirectHandled&&!n.options.reloadDocument||(e&&(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.loaderPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0,e._nonReactive.error=n,t.updateMatch(e.id,a=>({...a,status:Ht(n)?"redirected":Ct(n)?"notFound":a.status==="pending"?"success":a.status,context:Zs(t,e.index),isFetching:!1,error:n})),Ct(n)&&!n.routeId&&(n.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()),Ht(n)&&(t.rendered=!0,n.options._fromLocation=t.location,n.redirectHandled=!0,n=t.router.resolveRedirect(n))),n},J0=(t,e)=>{const n=t.router.getMatch(e);return!!(!n||n._nonReactive.dehydrated)},kv=(t,e,n)=>{const a=Zs(t,n);t.updateMatch(e,o=>({...o,context:a}))},go=(t,e,n,a)=>{const{id:o,routeId:l}=t.matches[e],u=t.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=a,t.firstBadMatchIndex??=e,cs(t,t.router.getMatch(o),n);try{u.options.onError?.(n)}catch(d){n=d,cs(t,t.router.getMatch(o),n)}t.updateMatch(o,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!Ht(n)&&!Ct(n)&&(t.serialError??=n)},Q0=(t,e,n,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!uu(t,e)&&(n.options.loader||n.options.beforeLoad||W0(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??t.router.options?.defaultPendingComponent)){const l=setTimeout(()=>{ph(t)},o);a._nonReactive.pendingTimeout=l}},UT=(t,e,n)=>{const a=t.router.getMatch(e);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;Q0(t,e,n,a);const o=()=>{const l=t.router.getMatch(e);l.preload&&(l.status==="redirected"||l.status==="notFound")&&cs(t,l,l.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(o):o()},$T=(t,e,n,a)=>{const o=t.router.getMatch(e);let l=o._nonReactive.loadPromise;o._nonReactive.loadPromise=Js(()=>{l?.resolve(),l=void 0});const{paramsError:u,searchError:d}=o;u&&go(t,n,u,"PARSE_PARAMS"),d&&go(t,n,d,"VALIDATE_SEARCH"),Q0(t,e,a,o);const h=new AbortController;let m=!1;const g=()=>{m||(m=!0,t.updateMatch(e,N=>({...N,isFetching:"beforeLoad",fetchCount:N.fetchCount+1,abortController:h})))},y=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,t.updateMatch(e,N=>({...N,isFetching:!1}))};if(!a.options.beforeLoad){t.router.batch(()=>{g(),y()});return}o._nonReactive.beforeLoadPromise=Js();const b={...Zs(t,n,!1),...o.__routeContext},{search:_,params:S,cause:R}=o,E=uu(t,e),T={search:_,abortController:h,params:S,preload:E,context:b,location:t.location,navigate:N=>t.router.navigate({...N,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:E?"preload":R,matches:t.matches,routeId:a.id,...t.router.options.additionalContext},C=N=>{if(N===void 0){t.router.batch(()=>{g(),y()});return}(Ht(N)||Ct(N))&&(g(),go(t,n,N,"BEFORE_LOAD")),t.router.batch(()=>{g(),t.updateMatch(e,F=>({...F,__beforeLoadContext:N})),y()})};let k;try{if(k=a.options.beforeLoad(T),jo(k))return g(),k.catch(N=>{go(t,n,N,"BEFORE_LOAD")}).then(C)}catch(N){g(),go(t,n,N,"BEFORE_LOAD")}C(k)},zT=(t,e)=>{const{id:n,routeId:a}=t.matches[e],o=t.router.looseRoutesById[a],l=()=>d(),u=()=>$T(t,n,e,o),d=()=>
10{if(J0(t,n))return;const h=UT(t,n,o);return jo(h)?h.then(u):u()};return l()},BT=(t,e,n)=>{const a=t.router.getMatch(e);if(!a||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={ssr:t.router.options.ssr,matches:t.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([n.options.head?.(o),n.options.scripts?.(o),n.options.headers?.(o)]).then(([l,u,d])=>({meta:l?.meta,links:l?.links,headScripts:l?.scripts,headers:d,scripts:u,styles:l?.styles}))},X0=(t,e,n,a,o)=>{const l=e[a-1],{params:u,loaderDeps:d,abortController:h,cause:m}=t.router.getMatch(n),g=Zs(t,a),y=uu(t,n);return{params:u,deps:d,preload:!!y,parentMatchPromise:l,abortController:h,context:g,location:t.location,navigate:b=>t.router.navigate({...b,_fromLocation:t.location}),cause:y?"preload":m,route:o,...t.router.options.additionalContext}},Ov=async(t,e,n,a,o)=>{try{const l=t.router.getMatch(n);try{(!(B0??t.router.isServer)||l.ssr===!0)&&Mo(o);const u=o.options.loader,d=typeof u=="function"?u:u?.handler,h=d?.(X0(t,e,n,a,o)),m=!!d&&jo(h);if((m||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||l._nonReactive.minPendingPromise)&&t.updateMatch(n,y=>({...y,isFetching:"loader"})),d){const y=m?await h:h;cs(t,t.router.getMatch(n),y),y!==void 0&&t.updateMatch(n,b=>({...b,loaderData:y}))}o._lazyPromise&&await o._lazyPromise;const g=l._nonReactive.minPendingPromise;g&&await g,o._componentsPromise&&await o._componentsPromise,t.updateMatch(n,y=>({...y,error:void 0,context:Zs(t,a),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(u){let d=u;if(d?.name==="AbortError"){if(l.abortController.signal.aborted){l._nonReactive.loaderPromise?.resolve(),l._nonReactive.loaderPromise=void 0;return}t.updateMatch(n,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:Zs(t,a)}));return}const h=l._nonReactive.minPendingPromise;h&&await h,Ct(u)&&await o.options.notFoundComponent?.preload?.(),cs(t,t.router.getMatch(n),u);try{o.options.onError?.(u)}catch(m){d=m,cs(t,t.router.getMatch(n),m)}!Ht(d)&&!Ct(d)&&await Mo(o,["errorComponent"]),t.updateMatch(n,m=>({...m,error:d,context:Zs(t,a),status:"error",isFetching:!1}))}}catch(l){const u=t.router.getMatch(n);u&&(u._nonReactive.loaderPromise=void 0),cs(t,u,l)}},qT=async(t,e,n)=>{async function a(_,S,R,E,T){const C=Date.now()-S.updatedAt,k=_?T.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:T.options.staleTime??t.router.options.defaultStaleTime??0,N=T.options.shouldReload,F=typeof N=="function"?N(X0(t,e,o,n,T)):N,{status:V,invalid:z}=E,M=C>=k&&(!!t.forceStaleReload||E.cause==="enter"||R!==void 0&&R!==E.id);u=V==="success"&&(z||(F??M)),_&&T.options.preload===!1||(u&&!t.sync&&g?(d=!0,(async()=>{try{await Ov(t,e,o,n,T);const K=t.router.getMatch(o);K._nonReactive.loaderPromise?.resolve(),K._nonReactive.loadPromise?.resolve(),K._nonReactive.loaderPromise=void 0,K._nonReactive.loadPromise=void 0}catch(K){Ht(K)&&await t.router.navigate(K.options)}})()):V!=="success"||u?await Ov(t,e,o,n,T):kv(t,o,n))}const{id:o,routeId:l}=t.matches[n];let u=!1,d=!1;const h=t.router.looseRoutesById[l],m=h.options.loader,g=((typeof m=="function"?void 0:m?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(J0(t,o)){if(!t.router.getMatch(o))return t.matches[n];kv(t,o,n)}else{const _=t.router.getMatch(o),S=t.router.stores.matchesId.get()[n],R=(S&&t.router.stores.matchStores.get(S)||null)?.routeId===l?S:t.router.stores.matches.get().find(T=>T.routeId===l)?.id,E=uu(t,o);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!t.sync&&!_.preload&&g)return _;await _._nonReactive.loaderPromise;const T=t.router.getMatch(o),C=T._nonReactive.error||T.error;C&&cs(t,T,C),T.status==="pending"&&await a(E,_,R,T,h)}else{const T=E&&!t.router.stores.matchStores.has(o),C=t.router.getMatch(o);C._nonReactive.loaderPromise=Js(),T!==C.preload&&t.updateMatch(o,k=>({...k,preload:T})),await a(E,_,R,C,h)}}const y=t.router.getMatch(o);d||(y._nonReactive.loaderPromise?.resolve(),y._nonReactive.loadPromise?.resolve(),y._nonReactive.loadPromise=void 0),clearTimeout(y._nonReactive.pen
10dingTimeout),y._nonReactive.pendingTimeout=void 0,d||(y._nonReactive.loaderPromise=void 0),y._nonReactive.dehydrated=void 0;const b=d?y.isFetching:!1;return b!==y.isFetching||y.invalid!==!1?(t.updateMatch(o,_=>({..._,isFetching:b,invalid:!1})),t.router.getMatch(o)):y};async function Lv(t){const e=t,n=[];IT(e.router)&&ph(e);let a;for(let b=0;b<e.matches.length;b++){try{const _=zT(e,b);jo(_)&&await _}catch(_){if(Ht(_))throw _;if(Ct(_))a=_;else if(!e.preload)throw _;break}if(e.serialError||e.firstBadMatchIndex!=null)break}const o=e.firstBadMatchIndex??e.matches.length,l=a&&!e.preload?xv(e,a):void 0,u=a&&e.preload?0:l!==void 0?Math.min(l+1,o):o;let d,h;for(let b=0;b<u;b++)n.push(qT(e,n,b));try{await Promise.all(n)}catch{const b=await Promise.allSettled(n);for(const _ of b){if(_.status!=="rejected")continue;const S=_.reason;if(Ht(S))throw S;Ct(S)?d??=S:h??=S}if(h!==void 0)throw h}const m=d??(a&&!e.preload?a:void 0);let g=e.firstBadMatchIndex!==void 0?e.firstBadMatchIndex:e.matches.length-1;if(!m&&a&&e.preload)return e.matches;if(m){const b=xv(e,m);b===void 0&&en();const _=e.matches[b],S=e.router.looseRoutesById[_.routeId],R=e.router.options?.defaultNotFoundComponent;!S.options.notFoundComponent&&R&&(S.options.notFoundComponent=R),m.routeId=_.routeId;const E=_.routeId===e.router.routeTree.id;e.updateMatch(_.id,T=>({...T,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),g=b,await Mo(S,["notFoundComponent"])}else if(!e.preload){const b=e.matches[0];b.globalNotFound||e.router.getMatch(b.id)?.globalNotFound&&e.updateMatch(b.id,_=>({..._,globalNotFound:!1,error:void 0}))}if(e.serialError&&e.firstBadMatchIndex!==void 0){const b=e.router.looseRoutesById[e.matches[e.firstBadMatchIndex].routeId];await Mo(b,["errorComponent"])}for(let b=0;b<=g;b++){const{id:_,routeId:S}=e.matches[b],R=e.router.looseRoutesById[S];try{const E=BT(e,_,R);if(E){const T=await E;e.updateMatch(_,C=>({...C,...T}))}}catch(E){console.error(`Error executing head for route ${S}:`,E)}}const y=ph(e);if(jo(y)&&await y,m)throw m;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function Nv(t,e){const n=e.map(a=>t.options[a]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Mo(t,e=Mc){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(a=>{const{id:o,...l}=a.options;Object.assign(t.options,l),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);const n=()=>t._componentsLoaded?void 0:e===Mc?(()=>{if(t._componentsPromise===void 0){const a=Nv(t,Mc);a?t._componentsPromise=a.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():Nv(t,e);return t._lazyPromise?t._lazyPromise.then(n):n()}function W0(t){for(const e of Mc)if(t.options[e]?.preload)return!0;return!1}var Mc=["component","errorComponent","pendingComponent","notFoundComponent"],ds="__TSR_index",jv="popstate",Pv="beforeunload";function HT(t){let e=t.getLocation();const n=new Set,a=u=>{e=t.getLocation(),n.forEach(d=>d({location:e,action:u}))},o=u=>{t.notifyOnIndexChange??!0?a(u):e=t.getLocation()},l=async({task:u,navigateOpts:d,...h})=>{if(d?.ignoreBlocker??!1){u();return}const m=t.getBlockers?.()??[],g=h.type==="PUSH"||h.type==="REPLACE";if(typeof document<"u"&&m.length&&g)for(const y of m){const b=Hc(h.path,h.state);if(await y.blockerFn({currentLocation:e,nextLocation:b,action:h.type})){t.onBlocked?.();return}}u()};return{get location(){return e},get length(){return t.getLength()},subscribers:n,subscribe:u=>(n.add(u),()=>{n.delete(u)}),push:(u,d,h)=>{const m=e.state[ds];d=Mv(m+1,d),l({task:()=>{t.pushState(u,d),a({type:"PUSH"})},navigateOpts:h,type:"PUSH",path:u,state:d})},replace:(u,d,h)=>{const m=e.state[ds];d=Mv(m,d),l({task:()=>{t.replaceState(u,d),a({type:"REPLACE"})},navigateOpts:h,type:"REPLACE",path:u,state:d})},go:(u,d)=>{l({task:()=>{t.go(u),o({type:"GO",index:u})},navigateOpts:d,type:"GO"})},back:u=>{l({task:()=>{t.back(u?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{l({task:()=>{t.forward(u?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>e.state[ds]!==0,createHref:u=>t.createHref(u),block:u=>{if(!t.setBlockers)return()=>{};const d=t.getBlockers?.()??[];return t.setBlockers([...d,u]),()=>{const h=t.getBlockers?.()??[];t.setBlockers?.(h.filter(m=>m!==u))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:a}}function Mv(t,e){e||(e={});const n=Zh();return{...e,key:n,__TSR_key:n,[ds]:t}}function VT(t){const e=typeof document<"u"?window:void 0,n=e.history.pushState,a=e.history.replaceState;let o=[];const l=()=>o,u=M=>o=M,d=(M=>M),h=(()=>Hc(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const M=Zh();e.history.replaceState({[ds]:0,key:M,__TSR_key:M},"")}let m=h(),g,y=!1,b=!1,_=!1,S=!1;const R=()=>m;let E,T;const C=()=>{E&&(z._ignoreSubscribers=!0,(E.isPush?e.history.pushState:e.history.replaceState)(E.state,"",E.href),z._ignoreSubscribers=!1,E=void 0,T=void 0,g=void 0)},k=(M,K,fe)=>{const ie=d(K);T||(g=m),m=Hc(K,fe),E={href:ie,state:fe,isPush:E?.isPush||M==="push"},T||(T=Promise.resolve().then(()=>C()))},N=M=>{m=h(),z.notify({type:M})},F=async()=>
10{if(b){b=!1;return}const M=h(),K=M.state[ds]-m.state[ds],fe=K===1,ie=K===-1,Te=!fe&&!ie||y;y=!1;const $e=Te?"GO":ie?"BACK":"FORWARD",tt=Te?{type:"GO",index:K}:{type:ie?"BACK":"FORWARD"};if(_)_=!1;else{const ze=l();if(typeof document<"u"&&ze.length){for(const U of ze)if(await U.blockerFn({currentLocation:m,nextLocation:M,action:$e})){b=!0,e.history.go(1),z.notify(tt);return}}}m=h(),z.notify(tt)},V=M=>{if(S){S=!1;return}let K=!1;const fe=l();if(typeof document<"u"&&fe.length)for(const ie of fe){const Te=ie.enableBeforeUnload??!0;if(Te===!0){K=!0;break}if(typeof Te=="function"&&Te()===!0){K=!0;break}}if(K)return M.preventDefault(),M.returnValue=""},z=HT({getLocation:R,getLength:()=>e.history.length,pushState:(M,K)=>k("push",M,K),replaceState:(M,K)=>k("replace",M,K),back:M=>(M&&(_=!0),S=!0,e.history.back()),forward:M=>{M&&(_=!0),S=!0,e.history.forward()},go:M=>{y=!0,e.history.go(M)},createHref:M=>d(M),flush:C,destroy:()=>{e.history.pushState=n,e.history.replaceState=a,e.removeEventListener(Pv,V,{capture:!0}),e.removeEventListener(jv,F)},onBlocked:()=>{g&&m!==g&&(m=g)},getBlockers:l,setBlockers:u,notifyOnIndexChange:!1});return e.addEventListener(Pv,V,{capture:!0}),e.addEventListener(jv,F),e.history.pushState=function(...M){const K=n.apply(e.history,M);return z._ignoreSubscribers||N("PUSH"),K},e.history.replaceState=function(...M){const K=a.apply(e.history,M);return z._ignoreSubscribers||N("REPLACE"),K},z}function GT(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function Hc(t,e){const n=GT(t),a=n.indexOf("#"),o=n.indexOf("?"),l=Zh();return{href:n,pathname:n.substring(0,a>0?o>0?Math.min(a,o):a:o>0?o:n.length),hash:a>-1?n.substring(a):"",search:o>-1?n.slice(o,a===-1?void 0:a):"",state:e||{[ds]:0,key:l,__TSR_key:l}}}function Zh(){return(Math.random()+1).toString(36).substring(7)}function FT(t){return t instanceof Error?{name:t.name,message:t.message}:{data:t}}function ti(t,e){const n=e,a=t;return{fromLocation:n,toLocation:a,pathChanged:n?.pathname!==a.pathname,hrefChanged:n?.href!==a.href,hashChanged:n?.hash!==a.hash}}var KT=class{constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>
10n(),this.update=n=>{const a=this.options,o=this.basepath??a?.basepath??"/",l=this.basepath===void 0,u=a?.rewrite;if(this.options={...a,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=ST(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=VT()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let g;this.resolvePathCache=Po(1e3),g=this.buildRouteTree(),this.setRoutes(g)}if(!this.stores&&this.latestLocation){const g=this.getStoreConfig(this);this.batch=g.batch,this.stores=DT(ZT(this.latestLocation),g),xT(this)}let d=!1;const h=this.options.basepath??"/",m=this.options.rewrite;if(l||o!==h||u!==m){this.basepath=h;const g=[],y=G0(h);y&&y!=="/"&&g.push(MT({basepath:h})),m&&g.push(m),this.rewrite=g.length===0?void 0:g.length===1?g[0]:PT(g),this.history&&this.updateLatestLocation(),d=!0}d&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=mT(this.routeTree,this.options.caseSensitive,(a,o)=>{a.init({originalIndex:o})});return this.options.routeMasks&&uT(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,a)=>{const o={eventType:n,fn:a};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(a=>{a.eventType===n.type&&a.fn(n)})},this.parseLocation=(n,a)=>{const o=({pathname:h,search:m,hash:g,href:y,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(h)){const T=this.options.parseSearch(m),C=this.options.stringifySearch(T);return{href:h+C+g,publicHref:h+C+g,pathname:po(h).path,external:!1,searchStr:C,search:Us(a?.search,T),hash:po(g.slice(1)).path,state:os(a?.state,b)}}const _=new URL(y,this.origin),S=hh(this.rewrite,_),R=this.options.parseSearch(S.search),E=this.options.stringifySearch(R);return S.search=E,{href:S.href.replace(S.origin,""),publicHref:y,pathname:po(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:E,search:Us(a?.search,R),hash:po(S.hash.slice(1)).path,state:os(a?.state,b)}},l=o(n),{__tempLocation:u,__tempKey:d}=l.state;if(u&&(!d||d===this.tempLocationKey)){const h=o(u);return h.state.key=l.state.key,h.state.__TSR_key=l.state.__TSR_key,delete h.state.__tempLocation,{...h,maskedLocation:l}}return l},this.resolvePathWithBase=(n,a)=>wT({base:n,to:Yh(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,a,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:a},o):this.matchRoutesInternal(n,a),this.getMatchedRoutes=n=>JT({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const a=this.getMatch(n);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{if(this.stores.pendingMatchStores.has(n))return;const a=this.stores.matchStores.get(n)?.get();a&&(a.status==="pending"||a.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const a=(l={})=>{const u=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutesLightweight(u);l.from;const h=l.unsafeRelative==="path"?u.pathname:l.from??d.fullPath,m=this.resolvePathWithBase(h,"."),g=d.search,y=Object.assign(Object.create(null),d.params),b=l.to?this.resolvePathWithBase(m,`${l.to}`):this.resolvePathWithBase(m,"."),_=l.params===!1||l.params===null?Ob
10ject.create(null):(l.params??!0)===!0?y:Object.assign(y,is(l.params,y)),S=this.getMatchedRoutes(b);let R=S.matchedRoutes;if((!S.foundRoute||S.foundRoute.path!=="/"&&S.routeParams["**"])&&this.options.notFoundRoute&&(R=[...R,this.options.notFoundRoute]),Object.keys(_).length>0)for(const fe of R){const ie=fe.options.params?.stringify??fe.options.stringifyParams;if(ie)try{Object.assign(_,ie(_))}catch{}}const E=n.leaveParams?b:po(Rv({path:b,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let T=g;if(n._includeValidateSearch&&this.options.search?.strict){const fe={};R.forEach(ie=>{if(ie.options.validateSearch)try{Object.assign(fe,Dc(ie.options.validateSearch,{...fe,...T}))}catch{}}),T=fe}T=QT({search:T,dest:l,destRoutes:R,_includeValidateSearch:n._includeValidateSearch}),T=Us(g,T);const C=this.options.stringifySearch(T),k=l.hash===!0?u.hash:l.hash?is(l.hash,u.hash):void 0,N=k?`#${k}`:"";let F=l.state===!0?u.state:l.state?is(l.state,u.state):{};F=os(u.state,F);const V=`${E}${C}${N}`;let z,M,K=!1;if(this.rewrite){const fe=new URL(V,this.origin),ie=Z0(this.rewrite,fe);z=fe.href.replace(fe.origin,""),ie.origin!==this.origin?(M=ie.href,K=!0):M=ie.pathname+ie.search+ie.hash}else z=oT(V),M=z;return{publicHref:M,href:z,pathname:E,search:T,searchStr:C,state:F,hash:k??"",external:K,unmaskOnReload:l.unmaskOnReload}},o=(l={},u)=>{const d=a(l);let h=u?a(u):void 0;if(!h){const m=Object.create(null);if(this.options.routeMasks){const g=dT(d.pathname,this.processedTree);if(g){Object.assign(m,g.rawParams);const{from:y,params:b,..._}=g.route,S=b===!1||b===null?Object.create(null):(b??!0)===!0?m:Object.assign(m,is(b,m));u={from:n.from,..._,params:S},h=a(u)}}}return h&&(d.maskedLocation=h),d};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:a,...o})=>{const l=()=>{const h=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];h.forEach(g=>{o.state[g]=this.latestLocation.state[g]});const m=Wt(o.state,this.latestLocation.state);return h.forEach(g=>{delete o.state[g]}),m},u=us(this.latestLocation.href)===us(o.href);let d=this.commitLocationPromise;if(this.commitLocationPromise=Js(()=>{d?.resolve(),d=void 0}),u&&l())this.load();else{let{maskedLocation:h,hashScrollIntoView:m,...g}=o;h&&(g={...h,state:{...h.state,__tempKey:void 0,__tempLocation:{...g,search:g.searchStr,state:{...g.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(g.unmaskOnReload??this.options.unmaskOnReload??!1)&&(g.state.__tempKey=this.tempLocationKey)),g.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](g.publicHref,g.state,{ignoreBlocker:a})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:a,hashScrollIntoView:o,viewTransition:l,ignoreBlocker:u,href:d,...h}={})=>{if(d){const y=this.history.location.state.__TSR_index,b=Hc(d,{__TSR_index:n?y:y+1}),_=new URL(b.pathname,this.origin);h.to=hh(this.rewrite,_).pathname,h.search=this.options.parseSearch(b.search),h.hash=b.hash.slice(1)}const m=this.buildLocation({...h,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const g=this.commitLocation({...m,viewTransition:l,replace:n,resetScroll:a,hashScrollIntoView:o,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),g},this.navigate=async({to:n,reloadDocument:a,href:o,publicHref:l,...u})=>{let d=!1;if(o)try{new URL(`${o}`),d=!0}catch{}if(d&&!a&&(a=!0),a){if(n!==void 0||!o){const m=this.buildLocation({to:n,...u});o=o??m.publicHref,l=l??m.publicHref}const h=!d&&l?l:o;if(Bc(h,this.protocolAllowlist))return Promise.resolve();if(!u.ignoreBlocker){const m=this.history.getBlockers?.()??[];for(const g of m)if(g?.blockerFn&&await g.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(h):window.location.href=h,Promise.resolve()}return this.buildAndCommitLocation({...u,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),a=this.stores.cachedMatches.get().filter(o=>!n.some(l=>l.id===o.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(a)})},this.load=async n=>{let a,o,l;const u=this.stores.resolvedLocation.get()??this.stores.location.get();for(l=new Promise(h=>{this.startTransition(async()=>{try{this.beforeLoad();const m=this.latestLocation,g=ti(m,this.stores.resolvedLocation.get());
10this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await Lv({router:this,sync:n?.sync,forceStaleReload:u.href===m.href,matches:this.stores.pendingMatches.get(),location:m,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=null,b=null,_=null,S=null;this.batch(()=>{const R=this.stores.pendingMatches.get(),E=R.length,T=this.stores.matches.get();y=E?T.filter(N=>!this.stores.pendingMatchStores.has(N.id)):null;const C=new Set;for(const N of this.stores.pendingMatchStores.values())N.routeId&&C.add(N.routeId);const k=new Set;for(const N of this.stores.matchStores.values())N.routeId&&k.add(N.routeId);b=E?T.filter(N=>!C.has(N.routeId)):null,_=E?R.filter(N=>!k.has(N.routeId)):null,S=E?R.filter(N=>k.has(N.routeId)):T,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),E&&(this.stores.setMatches(R),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...y.filter(N=>N.status!=="error"&&N.status!=="notFound"&&N.status!=="redirected")]),this.clearExpiredCache())});for(const[R,E]of[[b,"onLeave"],[_,"onEnter"],[S,"onStay"]])if(R)for(const T of R)this.looseRoutesById[T.routeId].options[E]?.(T)})})}})}catch(m){Ht(m)?(a=m,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):Ct(m)&&(o=m);const g=a?a.status:o?404:this.stores.matches.get().some(y=>y.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(g),this.stores.redirect.set(a)})}this.latestLoadPromise===l&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),h()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let d;this.hasNotFoundMatch()?d=404:this.stores.matches.get().some(h=>h.status==="error")&&(d=500),d!==void 0&&this.stores.statusCode.set(d)},this.startViewTransition=n=>
10{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,u=this.stores.resolvedLocation.get(),d=typeof a.types=="function"?a.types(ti(l,u)):a.types;if(d===!1){n();return}o={update:n,types:d}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,a)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStores.get(n);if(o){o.set(a);return}const l=this.stores.matchStores.get(n);if(l){l.set(a);return}const u=this.stores.cachedMatchStores.get(n);if(u){const d=a(u.get());d.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(h=>h.filter(m=>m!==n)):u.set(d)}})},this.getMatch=n=>this.stores.cachedMatchStores.get(n)?.get()??this.stores.pendingMatchStores.get(n)?.get()??this.stores.matchStores.get(n)?.get(),this.invalidate=n=>{const a=o=>n?.filter?.(o)??!0?{...o,invalid:!0,...n?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(a)),this.stores.setCached(this.stores.cachedMatches.get().map(a)),this.stores.setPending(this.stores.pendingMatches.get().map(a))}),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const a=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const o=n.options._builtLocation??this.buildLocation(n.options),l=this.getParsedLocationHref(o);n.options.href=l,n.headers.set("Location",l)}else if(a)try{const o=new URL(a);if(this.origin&&o.origin===this.origin){const l=o.pathname+o.search+o.hash;n.options.href=l,n.headers.set("Location",l)}}catch{}if(n.options.href&&!n.options._builtLocation&&Bc(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const a=n?.filter;a!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!a(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),a=o=>{const l=this.looseRoutesById[o.routeId];if(!l.options.loader)return!0;const u=(o.preload?l.options.preloadGcTime??this.options.defaultPreloadGcTime:l.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:n-o.updatedAt>=u};this.clearCache({filter:a})},this.loadRouteChunk=Mo,this.preloadRoute=async n=>{const a=n._builtLocation??this.buildLocation(n);let o=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),u=new Set([...l,...this.stores.cachedIds.get()]),d=o.filter(h=>!u.has(h.id));if(d.length){const h=this.stores.cachedMatches.get();this.stores.setCached([...h,...d])}try{return o=await Lv({router:this,matches:o,location:a,preload:!0,updateMatch:(h,m)=>{l.has(h)?o=o.map(g=>g.id===h?m(g):g):this.updateMatch(h,m)}}),o}catch(h){if(Ht(h))return h.options.reloadDocument?void 0:await this.preloadRoute({...h.options,_fromLocation:a});Ct(h)||console.error(h);return}},this.matchRoute=(n,a)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(o);if(a?.pending&&this.stores.status.get()!=="pending")return!1;const u=(a?.pending===void 0?!this.stores.isLoading.get():a.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),d=fT(l.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,u.pathname,this.processedTree);return!d||n.params&&!Wt(d.rawParams,n.params,{partial:!0})?!1:a?.includeSearch??!0?Wt(u.search,l.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??LT,parseSearch:t.parseSearch??OT,protocolAllowlist:t.protocolAllowlist??rT}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}
10isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:e,processedTree:n}){this.routesById=t,this.routesByPath=e,this.processedTree=n;const a=this.options.notFoundRoute;a&&(a.init({originalIndex:99999999999}),this.routesById[a.id]=a)}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,e){const n=this.getMatchedRoutes(t.pathname),{foundRoute:a,routeParams:o,parsedParams:l}=n;let{matchedRoutes:u}=n,d=!1;(a?a.path!=="/"&&o["**"]:us(t.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:d=!0);const h=d?WT(this.options.notFoundMode,u):void 0,m=new Array(u.length),g=new Map;for(const y of this.stores.matchStores.values())y.routeId&&g.set(y.routeId,y.get());for(let y=0;y<u.length;y++){const b=u[y],_=m[y-1];let S,R,E;{const $e=_?.search??t.search,tt=_?._strictSearch??void 0;try{const ze=Dc(b.options.validateSearch,{...$e})??void 0;S={...$e,...ze},R={...tt,...ze},E=void 0}catch(ze){let U=ze;if(ze instanceof Vc||(U=new Vc(ze.message,{cause:ze})),e?.throwOnError)throw U;S=$e,R={},E=U}}const T=b.options.loaderDeps?.({search:S})??"",C=T?JSON.stringify(T):"",{interpolatedPath:k,usedParams:N}=Rv({path:b.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),F=b.id+k+C,V=this.getMatch(F),z=g.get(b.id),M=V?._strictParams??N;let K;if(!V)try{Dv(b,N,l,M)}catch($e){if(Ct($e)||Ht($e)?K=$e:K=new YT($e.message,{cause:$e}),e?.throwOnError)throw K}Object.assign(o,M);const fe=z?"stay":"enter";let ie;if(V)ie={...V,cause:fe,params:z?.params??o,_strictParams:M,search:Us(z?z.search:V.search,S),_strictSearch:R};else{const $e=b.options.loader||b.options.beforeLoad||b.lazyFn||W0(b)?"pending":"success";ie={id:F,ssr:b.options.ssr,index:y,routeId:b.id,params:z?.params??o,_strictParams:M,pathname:k,updatedAt:Date.now(),search:z?Us(z.search,S):S,_strictSearch:R,searchError:void 0,status:$e,isFetching:!1,error:void 0,paramsError:K,__routeContext:void 0,_nonReactive:{loadPromise:Js()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:fe,loaderDeps:z?os(z.loaderDeps,T):T,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}e?.preload||(ie.globalNotFound=h===b.id),ie.searchError=E;const Te=this.getParentContext(_);ie.context={...Te,...ie.__routeContext,...ie.__beforeLoadContext},m[y]=ie}for(let y=0;y<m.length;y++){const b=m[y],_=this.looseRoutesById[b.routeId],S=this.getMatch(b.id),R=g.get(b.routeId);if(b.params=R?Us(R.params,o):o,!S){const E=m[y-1],T=this.getParentContext(E);if(_.options.context){const C={deps:b.loaderDeps,params:b.params,context:T??{},location:t,navigate:k=>this.navigate({...k,_fromLocation:t}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:m,routeId:_.id};b.__routeContext=_.options.context(C)??void 0}b.context={...T,...b.__routeContext,...b.__beforeLoadContext}}}return m}matchRoutesLightweight(t){const{matchedRoutes:e,routeParams:n,parsedParams:a}=this.getMatchedRoutes(t.pathname),o=No(e),l={...t.search};for(const g of e)try{Object.assign(l,Dc(g.options.validateSearch,l))}catch{}const u=No(this.stores.matchesId.get()),d=u&&this.stores.matchStores.get(u)?.get(),h=d&&d.routeId===o.id&&d.pathname===t.pathname;let m;if(h)m=d.params;else{const g=Object.assign(Object.create(null),n);for(const y of e)try{Dv(y,n,a??{},g)}catch{}m=g}return{matchedRoutes:e,fullPath:o.fullPath,search:l,params:m}}},Vc=class extends Error{},YT=class extends Error{};function ZT(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function Dc(t,e){if(t==null)return{};if("~standard"in t){const n=t["~standard"].validate(e);if(n instanceof Promise)throw new Vc("Async validation not supported");if(n.issues)throw new Vc(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function JT({pathname:t,routesById:e,processedTree:n}){const a=Object.create(null),o=us(t);let l,u;const d=hT(o,n,!0);return d&&(l=d.route,Object.assign(a,d.rawParams),u=Object.assign(Object.create(null),d.parsedParams)),{matchedRoutes:d?.branch||[e.__root__],routeParam
10s:a,foundRoute:l,parsedParams:u}}function QT({search:t,dest:e,destRoutes:n,_includeValidateSearch:a}){return XT(n)(t,e,a??!1)}function XT(t){const e={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of t){if("search"in o.options)o.options.search?.middlewares&&e.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const l=({search:u,next:d})=>{let h=u;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(h=o.options.preSearchFilters.reduce((g,y)=>y(g),u));const m=d(h);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((g,y)=>y(g),m):m};e.middlewares.push(l)}if(o.options.validateSearch){const l=({search:u,next:d})=>{const h=d(u);if(!e._includeValidateSearch)return h;try{return{...h,...Dc(o.options.validateSearch,h)??void 0}}catch{return h}};e.middlewares.push(l)}}const n=({search:o})=>{const l=e.dest;return l.search?l.search===!0?o:is(l.search,o):{}};e.middlewares.push(n);const a=(o,l,u)=>{if(o>=u.length)return l;const d=u[o];return d({search:l,next:m=>a(o+1,m,u)})};return function(l,u,d){return e.dest=u,e._includeValidateSearch=d,a(0,l,e.middlewares)}}function WT(t,e){if(t!=="root")for(let n=e.length-1;n>=0;n--){const a=e[n];if(a.children)return a.id}return Ys}function Dv(t,e,n,a){const o=t.options.params?.parse??t.options.parseParams;if(o)if(t.options.skipRouteOnParseError)for(const l in e)l in n&&(a[l]=n[l]);else{const l=o(a);Object.assign(a,l)}}var Hn=Symbol.for("TSR_DEFERRED_PROMISE");function eA(t,e){const n=t;return n[Hn]||(n[Hn]={status:"pending"},n.then(a=>{n[Hn].status="success",n[Hn].data=a}).catch(a=>{n[Hn].status="error",n[Hn].error={data:FT(a),__isServerError:!0}})),n}var tA="Error preloading route! âï¸";function Iv(t,e){if(t)return typeof t=="string"?t:t[e]}function nA(t){return typeof t=="string"?{href:t,crossOrigin:void 0}:t}function rA(t){if(t.tag!=="link")return;const e=t.attrs?.rel,n=t.attrs?.href;if(typeof n=="string"&&(typeof e=="string"?e.split(/\s+/):[]).includes("stylesheet"))return n}function sA(t,e){const n=rA(e);return!!n&&t?.inlineCss?.styles[n]!==void 0}var e_=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;const n=this.options,a=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Ys:this.parentRoute||en();let o=a?Ys:n?.path;o&&o!=="/"&&(o=V0(o));const l=n?.id||o;let u=a?Ys:Pc([this.parentRoute.id==="__root__"?"":this.parentRoute.id,l]);o==="__root__"&&(o="/"),u!=="__root__"&&(u=Pc(["/",u]));const d=u==="__root__"?"/":Pc([this.parentRoute.fullPath,o]);this._path=o,this._id=u,this._fullPath=d,this._to=us(d)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>K0({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},aA=class extends e_{constructor(t){super(t)}};function iA(t){if(typeof document<"u"&&document.querySelector){const e=t.stores.location.get(),n=e.state.__hashScrollIntoViewOptions??!0;if(n&&e.hash!==""){const a=document.getElementById(e.hash);a&&a.scrollIntoView(n)}}}const Sr=Symbol.asyncIterator,t_=Symbol.hasInstance,ni=Symbol.isConcatSpreadable,Er=Symbol.iterator,n_=Symbol.match,r_=Symbol.matchAll,s_=Symbol.replace,a_=Symbol.search,i_=Symbol.species,o_=Symbol.split,l_=Symbol.toPrimitive,ri=Symbol.toStringTag,c_=Symbol.unscopables,u_={[Sr]:0,[t_]:1,[ni]:2,[Er]:3,[n_]:4,[r_]:5,[s_]:6,[a_]:7,[i_]:8,[o_]:9,[l_]:10,[ri]:11,[c_]:12},oA={0:Sr,1:t_,2:ni,3:Er,4:n_,5:r_,6:s_,7:a_,8:i_,9:o_,10:l_,11:ri,12:c_},lA={2:!0,3:!1,1:void 0,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:NaN},cA={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},uA={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function Ie(t,e,n,a,o,l,u,d,h,m,g,y){return{t,i:e,s:n,c:a,m:o,p:l,e:u,a:d,f:h,b:m,o:g,l:y}}function ms(t){return Ie(2,void 0,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}const d_=ms(2),f_=ms(3),dA=ms(1),fA=ms(0),hA=ms(4),pA=ms(5),mA=ms(6),gA=ms(7);function yA(t){switch(t){case'"':return'\\"';case"\\":return"\\\\";case` 11`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case" ":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return}}function gs(t){let e="",n=0,a;for(let o=0,l=t.length;o<l;o++)a=yA(t[o]),a&&(e+=t.slice(n,o)+a,n=o+1);return n===0?e=t:e+=t.slice(n),e}function vA(t){switch(t){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return` 12`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return" ";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return t}}function ys(t){return t.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,vA)}const _c="__SEROVAL_REFS__",h_=new Map,Wa=new Map;function p_(t){return h_.has(t)}function bA(t){return Wa.has(t)}function _A(t){if(p_(t))return h_.get(t);throw new QA(t)}function wA(t){if(bA(t))return Wa.get(t);throw new XA(t)}typeof globalThis<"u"?Object.defineProperty(globalThis,_c,{value:Wa,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,_c,{value:Wa,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,_c,{value:Wa,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,_c,{value:Wa,configurable:!0,writable:!1,enumerable:!1});function Jh(t){return t instanceof EvalError?1:t instanceof RangeError?2:t instanceof ReferenceError?3:t instanceof SyntaxError?4:t instanceof TypeError?5:t instanceof URIError?6:0}function SA(t){const e=cA[Jh(t)];return t.name!==e?{name:t.name}:t.constructor.name!==e?{name:t.constructor.name}:{}}function m_(t,e){let n=SA(t);const a=Object.getOwnPropertyNames(t);for(let o=0,l=a.length,u;o<l;o++)u=a[o],u!=="name"&&u!=="message"&&(u==="stack"?e&4&&(n=n||{},n[u]=t[u]):(n=n||{},n[u]=t[u]));return n}function g_(t){return Object.isFrozen(t)?3:Object.isSealed(t)?2:Object.isExtensible(t)?0:1}function EA(t){switch(t){case Number.POSITIVE_INFINITY:return pA;case Number.NEGATIVE_INFINITY:return mA}return t!==t?gA:Object.is(t,-0)?hA:Ie(0,void 0,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function y_(t){return Ie(1,void 0,gs(t),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function RA(t){return Ie(3,void 0,""+t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function TA(t){return Ie(4,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function AA(t,e){const n=e.valueOf();return Ie(5,t,n!==n?"":e.toISOString(),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function Xr(t,e,n){return Ie(36,t,n.toString(),e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function CA(t,e){return Ie(6,t,void 0,gs(e.source),e.flags,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function xA(t,e){return Ie(17,t,u_[e],void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function kA(t,e){return Ie(18,t,gs(_A(e)),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function OA(t,e,n){return Ie(25,t,n,gs(e),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function LA(t,e,n){return Ie(9,t,void 0,void 0,void 0,void 0,void 0,n,void 0,void 0,g_(e),void 0)}function NA(t,e){return Ie(21,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function jA(t,e,n){return Ie(15,t,void 0,e.constructor.name,void 0,void 0,void 0,void 0,n,e.byteOffset,void 0,e.length)}function PA(t,e,n){return Ie(16,t,void 0,e.constructor.name,void 0,void 0,void 0,void 0,n,e.byteOffset,void 0,e.length)}function MA(t,e,n){return Ie(20,t,void 0,void 0,void 0,void 0,void 0,void 0,n,e.byteOffset,void 0,e.byteLength)}function DA(t,e,n){return Ie(13,t,Jh(e),void 0,gs(e.message),n,void 0,void 0,void 0,void 0,void 0,void 0)}function IA(t,e,n){return Ie(14,t,Jh(e),void 0,gs(e.message),n,void 0,void 0,void 0,void 0,void 0,void 0)}function UA(t,e){return Ie(7,t,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0,void 0)}function $A(t,e){return Ie(28,void 0,void 0,void 0,void 0,void 0,void 0,[t,e],void 0,void 0,void 0,void 0)}function zA(t,e){return Ie(30,void 0,void 0,void 0,void 0,void 0,void 0,[t,e],void 0,void 0,void 0,void 0)}function BA(t,e,n){return Ie(31,t,void 0,void 0,void 0,void 0,void 0,n,e,void 0,void 0,void 0)}function qA(t,e){return Ie(32,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function HA(t,e){return Ie(33,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function VA(t,e){return Ie(34,t,void 0,void 0,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0)}function GA(t,e,n,a){return Ie(35,t,n,void 0,void 0,void 0,void 0,e,void 0,void 0,void 0,a)}
12const FA={parsing:1,serialization:2,deserialization:3};function KA(t){return`Seroval Error (step: ${FA[t]})`}const YA=(t,e)=>KA(t);var v_=class extends Error{constructor(t,e){super(YA(t)),this.cause=e}},Uv=class extends v_{constructor(t){super("parsing",t)}},ZA=class extends v_{constructor(t){super("deserialization",t)}};function Ar(t){return`Seroval Error (specific: ${t})`}var du=class extends Error{constructor(t){super(Ar(1)),this.value=t}},Qh=class extends Error{constructor(t){super(Ar(2))}},JA=class extends Error{constructor(t){super(Ar(3))}},Zo=class extends Error{constructor(t){super(Ar(4))}},QA=class extends Error{constructor(t){super(Ar(5)),this.value=t}},XA=class extends Error{constructor(t){super(Ar(6))}},WA=class extends Error{constructor(t){super(Ar(7))}},Fn=class extends Error{constructor(t){super(Ar(8))}},b_=class extends Error{constructor(t){super(Ar(9))}},eC=class{constructor(t,e){this.value=t,this.replacement=e}};const Xh=()=>{const t={p:0,s:0,f:0};return t.p=new Promise((e,n)=>{t.s=e,t.f=n}),t},tC=()=>{const t=[],e=[];let n=!0,a=!1,o=0;const l={flush(u,d,h){for(h=0;h<o;h++)e[h]&&e[h][d](u)},up(u,d,h,m){for(d=0,h=t.length;d<h;d++)m=t[d],!n&&d===h-1?u[a?"return":"throw"](m):u.next(m)},on(u,d){return n&&(d=o++,e[d]=u),l.up(u),()=>{n&&(e[d]=e[o],e[o--]=void 0)}}};return{__SEROVAL_STREAM__:!0,on(u){return l.on(u)},next(u){n&&(t.push(u),l.flush(u,"next"))},throw(u){n&&(t.push(u),l.flush(u,"throw"),n=!1,a=!1,e.length=0)},return(u){n&&(t.push(u),l.flush(u,"return"),n=!1,a=!0,e.length=0)}}},nC=t=>e=>()=>{let n=0;const a={[t](){return a},next(){if(n>e.d)return{done:!0,value:void 0};const o=n++,l=e.v[o];if(o===e.t)throw l;return{done:o===e.d,value:l}}};return a},rC=(t,e)=>n=>()=>{let a=0,o=-1,l=!1;const u=[],d=[],h={finalize(g=0,y=d.length){for(;g<y;g++)d[g].s({done:!0,value:void 0})}};n.on({next(g){const y=d.shift();y&&y.s({done:!1,value:g}),u.push(g)},throw(g){const y=d.shift();y&&y.f(g),h.finalize(),o=u.length,l=!0,u.push(g)},return(g){const y=d.shift();y&&y.s({done:!0,value:g}),h.finalize(),o=u.length,u.push(g)}});const m={[t](){return m},next(){if(o===-1){const b=a++;if(b>=u.length){const _=e();return d.push(_),_.p}return{done:!1,value:u[b]}}if(a>o)return{done:!0,value:void 0};const g=a++,y=u[g];if(g!==o)return{done:!1,value:y};if(l)throw y;return{done:!0,value:y}}};return m},sC=t=>{const e=atob(t),n=e.length,a=new Uint8Array(n);for(let o=0;o<n;o++)a[o]=e.charCodeAt(o);return a.buffer};function aC(t){return"__SEROVAL_SEQUENCE__"in t}function __(t,e,n){return{__SEROVAL_SEQUENCE__:!0,v:t,t:e,d:n}}function iC(t){const e=[];let n=-1,a=-1;const o=t[Er]();for(;;)try{const l=o.next();if(e.push(l.value),l.done){a=e.length-1;break}}catch(l){n=e.length,e.push(l)}return __(e,n,a)}const oC=nC(Er);function lC(t){return oC(t)}const cC={},uC={},dC={0:{},1:{},2:{},3:{},4:{},5:{}};function fC(t){return"__SEROVAL_STREAM__"in t}function ea(){return tC()}function hC(t){const e=ea(),n=t[Sr]();async function a(){try{const o=await n.next();o.done?e.return(o.value):(e.next(o.value),await a())}catch(o){e.throw(o)}}return a().catch(()=>{}),e}const pC=rC(Sr,Xh);function mC(t){return pC(t)}async function gC(t){try{return[1,await t]}catch(e){return[0,e]}}function yC(t,e){return{plugins:e.plugins,mode:t,marked:new Set,features:127^(e.disabledFeatures||0),refs:e.refs||new Map,depthLimit:e.depthLimit||1e3}}function Ic(t,e){t.marked.add(e)}function vC(t,e){const n=t.refs.size;return t.refs.set(e,n),n}function fu(t,e){const n=t.refs.get(e);return n!=null?(Ic(t,n),{type:1,value:TA(n)}):{type:0,value:vC(t,e)}}function Wh(t,e){const n=fu(t,e);return n.type===1?n:p_(e)?{type:2,value:kA(n.value,e)}:n}function Vs(t,e){const n=Wh(t,e);if(n.type!==0)return n.value;if(e in u_)return xA(n.value,e);throw new du(e)}function hu(t,e){const n=fu(t,dC[e]);return n.type===1?n.value:Ie(26,n.value,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function bC(t){const e=fu(t,cC);return e.type===1?e.value:Ie(27,e.value,void 0,void 0,void 0,void 0,void 0,void 0,Vs(t,Er),void 0,void 0,void 0)}function _C(t){const e=fu(t,uC);return e.type===1?e.value:Ie(29,e.value,void 0,void 0,void 0,void 0,void 0,[hu(t,1),Vs(t,Sr)],void 0,void 0,void 0,void 0)}function wC(t,e,n,a){return Ie(n?11:10,t,void 0,void 0,void 0,a,void 0,void 0,void 0,void 0,g_(e),void 0)}function SC(t,e,n,a){return Ie(8,e,void 0,void 0,void 0,void 0,{k:n,v:a},void 0,hu(t,0),void 0,void 0,void 0)}function EC(t,e,n){const a=new Uint8Array(n);let o="";for(let l=0,u=a.length;l<u;l++)o+=String.fromCharCode(a[l]);return Ie(19,e,gs(btoa(o)),void 0,void 0,void 0,void 0,void 0,hu(t,5),void 0,void 0,void 0)}function RC(t,e){return{base:yC(t,e),child:void 0}}var TC=class{constructor(t,e){this._p=t,this.depth=e}parse(t){return Et(this._p,this.depth,t)}};async function AC(t,e,n){const a=[];for(let o=0,l=n.length;o<l;o++)o in n?a[o]=await Et(t,e,n[o]):a[o]=0;return a}
12async function CC(t,e,n,a){return LA(n,a,await AC(t,e,a))}async function ep(t,e,n){const a=Object.entries(n),o=[],l=[];for(let u=0,d=a.length;u<d;u++)o.push(gs(a[u][0])),l.push(await Et(t,e,a[u][1]));return Er in n&&(o.push(Vs(t.base,Er)),l.push($A(bC(t.base),await Et(t,e,iC(n))))),Sr in n&&(o.push(Vs(t.base,Sr)),l.push(zA(_C(t.base),await Et(t,e,hC(n))))),ri in n&&(o.push(Vs(t.base,ri)),l.push(y_(n[ri]))),ni in n&&(o.push(Vs(t.base,ni)),l.push(n[ni]?d_:f_)),{k:o,v:l}}async function Yf(t,e,n,a,o){return wC(n,a,o,await ep(t,e,a))}async function xC(t,e,n,a){return NA(n,await Et(t,e,a.valueOf()))}async function kC(t,e,n,a){return jA(n,a,await Et(t,e,a.buffer))}async function OC(t,e,n,a){return PA(n,a,await Et(t,e,a.buffer))}async function LC(t,e,n,a){return MA(n,a,await Et(t,e,a.buffer))}async function $v(t,e,n,a){const o=m_(a,t.base.features);return DA(n,a,o?await ep(t,e,o):void 0)}async function NC(t,e,n,a){const o=m_(a,t.base.features);return IA(n,a,o?await ep(t,e,o):void 0)}async function jC(t,e,n,a){const o=[],l=[];for(const[u,d]of a.entries())o.push(await Et(t,e,u)),l.push(await Et(t,e,d));return SC(t.base,n,o,l)}async function PC(t,e,n,a){const o=[];for(const l of a.keys())o.push(await Et(t,e,l));return UA(n,o)}async function w_(t,e,n,a){const o=t.base.plugins;if(o)for(let l=0,u=o.length;l<u;l++){const d=o[l];if(d.parse.async&&d.test(a))return OA(n,d.tag,await d.parse.async(a,new TC(t,e),{id:n}))}}async function MC(t,e,n,a){const[o,l]=await gC(a);return Ie(12,n,o,void 0,void 0,void 0,void 0,void 0,await Et(t,e,l),void 0,void 0,void 0)}function DC(t,e,n,a,o){const l=[],u=n.on({next:d=>{Ic(this.base,e),Et(this,t,d).then(h=>{l.push(qA(e,h))},h=>{o(h),u()})},throw:d=>{Ic(this.base,e),Et(this,t,d).then(h=>{l.push(HA(e,h)),a(l),u()},h=>{o(h),u()})},return:d=>{Ic(this.base,e),Et(this,t,d).then(h=>{l.push(VA(e,h)),a(l),u()},h=>{o(h),u()})}})}async function IC(t,e,n,a){return BA(n,hu(t.base,4),await new Promise(DC.bind(t,e,n,a)))}async function UC(t,e,n,a){const o=[];for(let l=0,u=a.v.length;l<u;l++)o[l]=await Et(t,e,a.v[l]);return GA(n,o,a.t,a.d)}async function $C(t,e,n,a){if(Array.isArray(a))return CC(t,e,n,a);if(fC(a))return IC(t,e,n,a);if(aC(a))return UC(t,e,n,a);let o=a.constructor;if(o!==void 0&&typeof o!="function"){const d=Object.getPrototypeOf(a);o=d===null?void 0:d.constructor}if(o===eC)return Et(t,e,a.replacement);const l=await w_(t,e,n,a);if(l)return l;switch(o){case Object:return Yf(t,e,n,a,!1);case void 0:return Yf(t,e,n,a,!0);case Date:return AA(n,a);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return $v(t,e,n,a);case Number:case Boolean:case String:case BigInt:return xC(t,e,n,a);case ArrayBuffer:return EC(t.base,n,a);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return kC(t,e,n,a);case DataView:return LC(t,e,n,a);case Map:return jC(t,e,n,a);case Set:return PC(t,e,n,a)}if(o===Promise||a instanceof Promise)return MC(t,e,n,a);const u=t.base.features;if(u&32&&o===RegExp)return CA(n,a);if(u&16)switch(o){case BigInt64Array:case BigUint64Array:return OC(t,e,n,a)}if(u&1&&typeof AggregateError<"u"&&(o===AggregateError||a instanceof AggregateError))return NC(t,e,n,a);if(u&64&&typeof Temporal<"u")switch(o){case Temporal.Instant:return Xr(n,0,a);case Temporal.Duration:return Xr(n,1,a);case Temporal.PlainDate:return Xr(n,2,a);case Temporal.PlainDateTime:return Xr(n,3,a);case Temporal.PlainMonthDay:return Xr(n,4,a);case Temporal.PlainTime:return Xr(n,5,a);case Temporal.PlainYearMonth:return Xr(n,6,a);case Temporal.ZonedDateTime:return Xr(n,7,a)}if(a instanceof Error)return $v(t,e,n,a);if(Er in a||Sr in a)return Yf(t,e,n,a,!!o);throw new du(a)}async function zC(t,e,n){const a=Wh(t.base,n);if(a.type!==0)return a.value;const o=await w_(t,e,a.value,n);if(o)return o;throw new du(n)}async function Et(t,e,n){if(e>=t.base.depthLimit)throw new b_(t.base.depthLimit);switch(typeof n){case"boolean":return n?d_:f_;case"undefined":return dA;case"string":return y_(n);case"number":return EA(n);case"bigint":return RA(n);case"object":if(n){const a=Wh(t.base,n);
12return a.type===0?await $C(t,e+1,a.value,n):a.value}return fA;case"symbol":return Vs(t.base,n);case"function":return zC(t,e,n);default:throw new du(n)}}async function BC(t,e){try{return await Et(t,0,e)}catch(n){throw n instanceof Uv?n:new Uv(n)}}function S_(t,e){for(let n=0,a=e.length;n<a;n++){const o=e[n];t.has(o)||(t.add(o),o.extends&&S_(t,o.extends))}}function E_(t){if(t){const e=new Set;return S_(e,t),[...e]}}function qC(t){switch(t){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new WA(t)}}function HC(t){switch(t){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function VC(t){switch(t){case Sr:case ni:case ri:case Er:return!0;default:return!1}}const GC=1e6,FC=1e4,KC=2e4;function R_(t,e){switch(e){case 3:return Object.freeze(t);case 1:return Object.preventExtensions(t);case 2:return Object.seal(t);default:return t}}const YC=1e3;function ZC(t,e){var n;const a=e.refs||new Map;return"types"in a||Object.assign(a,{types:new Map}),{mode:t,plugins:e.plugins,refs:a,features:(n=e.features)!==null&&n!==void 0?n:127^(e.disabledFeatures||0),depthLimit:e.depthLimit||YC}}function JC(t){return{mode:2,base:ZC(2,t),child:void 0}}var QC=class{constructor(t,e){this._p=t,this.depth=e}deserialize(t){return Xe(this._p,this.depth,t)}};function T_(t,e){if(e<0||!Number.isFinite(e)||!Number.isInteger(e))throw new Fn({t:4,i:e});if(t.refs.has(e))throw new Error("Conflicted ref id: "+e)}function XC(t,e,n){return T_(t.base,e),t.state.marked.has(e)&&t.base.refs.set(e,n),n}function WC(t,e,n){return T_(t.base,e),t.base.refs.set(e,n),n}function _t(t,e,n){return t.mode===1?XC(t,e,n):WC(t,e,n)}function mh(t,e,n){if(Object.hasOwn(e,n))return e[n];throw new Fn(t)}function ex(t,e){return _t(t,e.i,wA(ys(e.s)))}function tx(t,e,n){const a=n.a,o=a.length,l=_t(t,n.i,new Array(o));for(let u=0,d;u<o;u++)d=a[u],d&&(l[u]=Xe(t,e,d));return R_(l,n.o),l}function zv(t,e,n){HC(e)?t[e]=n:Object.defineProperty(t,e,{value:n,configurable:!0,enumerable:!0,writable:!0})}function nx(t,e,n,a,o){if(typeof a=="string")zv(n,ys(a),Xe(t,e,o));else{const l=Xe(t,e,a);switch(typeof l){case"string":zv(n,l,Xe(t,e,o));break;case"symbol":VC(l)&&(n[l]=Xe(t,e,o));break;default:throw new Fn(a)}}}function A_(t,e,n){t.base.refs.types.set(e,n)}function Jo(t,e,n,a){if(t.base.refs.types.get(n)!==a)throw new Fn(e)}function C_(t,e,n,a){const o=n.k;if(o.length>0)for(let l=0,u=n.v,d=o.length;l<d;l++)nx(t,e,a,o[l],u[l]);return a}function rx(t,e,n){const a=_t(t,n.i,n.t===10?{}:Object.create(null));return C_(t,e,n.p,a),R_(a,n.o),a}function sx(t,e){return _t(t,e.i,new Date(e.s))}function ax(t,e){if(!(t.base.features&64))throw new Qh(e);let n;switch(e.c){case 0:n=Temporal.Instant.from(e.s);break;case 1:n=Temporal.Duration.from(e.s);break;case 2:n=Temporal.PlainDate.from(e.s);break;case 3:n=Temporal.PlainDateTime.from(e.s);break;case 4:n=Temporal.PlainMonthDay.from(e.s);break;case 5:n=Temporal.PlainTime.from(e.s);break;case 6:n=Temporal.PlainYearMonth.from(e.s);break;case 7:n=Temporal.ZonedDateTime.from(e.s);break;default:throw new Fn(e)}return _t(t,e.i,n)}function ix(t,e){if(t.base.features&32){const n=ys(e.c);if(n.length>KC)throw new Fn(e);return _t(t,e.i,new RegExp(n,e.m))}throw new Qh(e)}function ox(t,e,n){const a=_t(t,n.i,new Set);for(let o=0,l=n.a,u=l.length;o<u;o++)a.add(Xe(t,e,l[o]));return a}function lx(t,e,n){const a=_t(t,n.i,new Map);for(let o=0,l=n.e.k,u=n.e.v,d=l.length;o<d;o++)a.set(Xe(t,e,l[o]),Xe(t,e,u[o]));return a}function cx(t,e){if(e.s.length>GC)throw new Fn(e);return _t(t,e.i,sC(ys(e.s)))}function ux(t,e,n){var a;const o=qC(n.c),l=Xe(t,e,n.f),u=(a=n.b)!==null&&a!==void 0?a:0;if(u<0||u>l.byteLength)throw new Fn(n);return _t(t,n.i,new o(l,u,n.l))}function dx(t,e,n){var a;const o=Xe(t,e,n.f),l=(a=n.b)!==null&&a!==void 0?a:0;if(l<0||l>o.byteLength)throw new Fn(n);return _t(t,n.i,new DataView(o,l,n.l))}function x_(t,e,n,a){if(n.p){const o=C_(t,e,n.p,{});Object.defineProperties(a,Object.getOwnPropertyDescriptors(o))}return a}function fx(t,e,n){return x_(t,e,n,_t(t,n.i,new AggregateError([],ys(n.m))))}function hx(t,e,n){const a=mh(n,uA,n.s);return x_(t,e,n,_t(t,n.i,new a(ys(n.m))))}function px(t,e,n){const a=Xh(),o=_t(t,n.i,a.p),l=Xe(t,e,n.f);return n.s?a.s(l):a.f(l),o}function mx(t,e,n){return _t(t,n.i,Object(Xe(t,e,n.f)))}function gx(t,e,n){const a=t.base.plugins;if(a){const o=ys(n.c);for(let l=0,u=a.length;l<u;l++){const d=a[l];if(d.tag===o)return _t(t,n.i,d.deserialize(n.s,new QC(t,e),{id:n.i}))}}throw new JA(n.c)}function yx(t,e){const n=_t(t,e.i,_t(t,e.s,Xh()).p);return A_(t,e.s,22),n}function vx(t,e,n){const a=t.base.refs.get(n.i);if(a){Jo(t,n,n.i,22),a.s(Xe(t,e,n.a[1]));return}throw new Zo("Promise")}function bx(t,e,n){const a=t.base.refs.get(n.i);if(a){Jo(t,n,n.i,22),a.f(Xe(t,e,n.a[1]));return}throw new Zo("Promise")}function _x(t,e,n){return Xe(t,e,n.a[0]),lC(Xe(t,e,n.a[1]))}function wx(t,e,n){return Xe(t,e,n.a[0]),mC(Xe(t,e,n.a[1]))}function Sx(t,e,n){const a=_t(t,n.i,ea());A_(t,n.i,31);const o=n.a,l=o.length;if(l)for(let u=0;u<l;u++)Xe(t,e,o[u]);return a}function Ex(t,e,n){const a=t.base.refs.get(n.i);if(a){Jo(t,n,n.i,31),a.next(Xe(t,e,n.f));return}throw new Zo("Stream")}function Rx(t,e,n){const a=t.base.refs.get(n.i);if(a){Jo(t,n,n.i,31),a.throw(Xe(t,e,n.f));return}throw new Zo("Stream")}function Tx(t,e,n){const a=t.base.refs.get(n.i);if(a){Jo(t,n,n.i,31),a.return(Xe(t,e,n.f));return}throw new Zo("Stream")}function Ax(t,e,n){Xe(t,e,n.f)}function Cx(t,e,n){Xe(t,e,n.a[1])}function xx(t,e,n){const a=_t(t,n.i,__([],n.s,n.l));for(let o=0,l=n.a.length;o<l;
12o++)a.v[o]=Xe(t,e,n.a[o]);return a}function Xe(t,e,n){if(e>t.base.depthLimit)throw new b_(t.base.depthLimit);switch(e+=1,n.t){case 2:return mh(n,lA,n.s);case 0:return Number(n.s);case 1:return ys(String(n.s));case 3:if(String(n.s).length>FC)throw new Fn(n);return BigInt(n.s);case 4:return t.base.refs.get(n.i);case 18:return ex(t,n);case 9:return tx(t,e,n);case 10:case 11:return rx(t,e,n);case 5:return sx(t,n);case 6:return ix(t,n);case 7:return ox(t,e,n);case 8:return lx(t,e,n);case 19:return cx(t,n);case 16:case 15:return ux(t,e,n);case 20:return dx(t,e,n);case 14:return fx(t,e,n);case 13:return hx(t,e,n);case 12:return px(t,e,n);case 17:return mh(n,oA,n.s);case 21:return mx(t,e,n);case 25:return gx(t,e,n);case 22:return yx(t,n);case 23:return vx(t,e,n);case 24:return bx(t,e,n);case 28:return _x(t,e,n);case 30:return wx(t,e,n);case 31:return Sx(t,e,n);case 32:return Ex(t,e,n);case 33:return Rx(t,e,n);case 34:return Tx(t,e,n);case 27:return Ax(t,e,n);case 29:return Cx(t,e,n);case 35:return xx(t,e,n);case 36:return ax(t,n);default:throw new Qh(n)}}function kx(t,e){try{return Xe(t,0,e)}catch(n){throw new ZA(n)}}function Bv(t,e){return kx(JC({plugins:E_(e.plugins),refs:e.refs,features:e.features,disabledFeatures:e.disabledFeatures,depthLimit:e.depthLimit}),t)}async function Ox(t,e={}){const n=RC(1,{plugins:E_(e.plugins),disabledFeatures:e.disabledFeatures});return{t:await BC(n,t),f:n.base.features,m:Array.from(n.base.marked)}}function Lx(t){return{tag:"$TSR/t/"+t.key,test:t.test,parse:{sync(e,n,a){return{v:n.parse(t.toSerializable(e))}},async async(e,n,a){return{v:await n.parse(t.toSerializable(e))}},stream(e,n,a){return{v:n.parse(t.toSerializable(e))}}},serialize:void 0,deserialize(e,n,a){return t.fromSerializable(n.deserialize(e.v))}}}var Nx=class{constructor(t,e){this.stream=t,this.hint=e?.hint??"binary"}},Gc=globalThis.Buffer,k_=!!Gc&&typeof Gc.from=="function";function O_(t){if(t.length===0)return"";if(k_)return Gc.from(t).toString("base64");const e=32768,n=[];for(let a=0;a<t.length;a+=e){const o=t.subarray(a,a+e);n.push(String.fromCharCode.apply(null,o))}return btoa(n.join(""))}function L_(t){if(t.length===0)return new Uint8Array(0);if(k_){const a=Gc.from(t,"base64");return new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}const e=atob(t),n=new Uint8Array(e.length);for(let a=0;a<e.length;a++)n[a]=e.charCodeAt(a);return n}var yo=Object.create(null),vo=Object.create(null),jx=t=>new ReadableStream({start(e){t.on({next(n){try{e.enqueue(L_(n))}catch{}},throw(n){e.error(n)},return(){try{e.close()}catch{}}})}}),Px=new TextEncoder,Mx=t=>new ReadableStream({start(e){t.on({next(n){try{typeof n=="string"?e.enqueue(Px.encode(n)):e.enqueue(L_(n.$b64))}catch{}},throw(n){e.error(n)},return(){try{e.close()}catch{}}})}}),Dx="(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",Ix="(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})";function qv(t){const e=ea(),n=t.getReader();return(async()=>{try{for(;;){const{done:a,value:o}=await n.read();if(a){e.return(void 0);break}e.next(O_(o))}}catch(a){e.throw(a)}finally{n.releaseLock()}})(),e}function Hv(t){const e=ea(),n=t.getReader(),a=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:o,value:l}=await n.read();if(o){try{const u=a.decode();u.length>0&&e.next(u)}catch{}e.return(void 0);break}try{const u=a.decode(l,{stream:!0});u.length>0&&e.next(u)}catch{e.next({$b64:O_(l)})}}}catch(o){e.throw(o)}finally{n.releaseLock()}})(),e}var Ux={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(t){return t===yo},parse:{sync(t,e,n){return{}},async async(t,e,n){return{}},stream(t,e,n){return{}}},serialize(t,e,n){return Dx},deserialize(t,e,n){return yo}},{tag:"tss/RawStreamFactoryText",test(t){return t===vo},parse:{sync(t,e,n){return{}},async async(t,e,n){return{}},stream(t,e,n){return{}}},serialize(t,e,n){return Ix},deserialize(t,e,n){return vo}}],test(t){return t instanceof Nx},parse:{sync(t,e,n){const a=t.hint==="text"?vo:yo;return{hint:e.parse(t.hint),factory:e.parse(a),stream:e.parse(ea())}},async async(t,e,n){const a=t.hint==="text"?vo:yo,o=t.hint==="text"?Hv(t.stream):qv(t.stream);return{hint:await e.parse(t.hint),factory:await e.parse(a),stream:await e.parse(o)}},stream(t,e,n){const a=t.hint==="text"?vo:yo,o=t.hint==="text"?Hv(t.stream):qv(t.stream);return{hint:e.parse(t.hint),factory:e.parse(a),stream:e.parse(o)}}},serialize(t,e,n){return"("+e.serialize(t.factory)+")("+e.serialize(t.stream)+")"},deserialize(t,e,n){const a=e.deserialize(t.stream);return e.deserialize(t.hint)==="text"?Mx(a):jx(a)}};function $x(t){return{tag:"tss/RawStream",test:()=>!1,parse:{}
12,serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(e,n,a){return t(typeof n?.deserialize=="function"?n.deserialize(e.streamId):e.streamId)}}}var zx={tag:"$TSR/Error",test(t){return t instanceof Error},parse:{sync(t,e){return{message:e.parse(t.message)}},async async(t,e){return{message:await e.parse(t.message)}},stream(t,e){return{message:e.parse(t.message)}}},serialize(t,e){return"new Error("+e.serialize(t.message)+")"},deserialize(t,e){return new Error(e.deserialize(t.message))}};const rs={},N_=t=>new ReadableStream({start(e){t.on({next(n){try{e.enqueue(n)}catch{}},throw(n){e.error(n)},return(){try{e.close()}catch{}}})}}),Bx={tag:"seroval-plugins/web/ReadableStreamFactory",test(t){return t===rs},parse:{sync(){return rs},async async(){return await Promise.resolve(rs)},stream(){return rs}},serialize(){return N_.toString()},deserialize(){return rs}};async function j_(t,e){try{const n=await e.read();n.done?(t.return(n.value),e.releaseLock()):(t.next(n.value),await j_(t,e))}catch(n){t.throw(n)}}function qx(t){t.cancel().catch(()=>{}),t.releaseLock()}function Vv(t){const e=ea(),n=t.getReader(),a=qx.bind(null,n);return j_(e,n).catch(a),[e,a]}const Hx={tag:"seroval/plugins/web/ReadableStream",extends:[Bx],test(t){return typeof ReadableStream>"u"?!1:t instanceof ReadableStream},parse:{sync(t,e){return{factory:e.parse(rs),stream:e.parse(ea())}},async async(t,e){return{factory:await e.parse(rs),stream:await e.parse(Vv(t)[0])}},stream(t,e){const[n,a]=Vv(t);return e.addCleanup(a),{factory:e.parse(rs),stream:e.parse(n)}}},serialize(t,e){return"("+e.serialize(t.factory)+")("+e.serialize(t.stream)+")"},deserialize(t,e){const n=e.deserialize(t.stream);return N_(n)}};var Vx=[zx,Ux,Hx];function Gx(){return[...Gh()?.serializationAdapters?.map(Lx)??[],...Vx]}var Gv=new TextDecoder,Fx=new Uint8Array(0),Fv=16*1024*1024,Kv=32*1024*1024,Yv=1024,Zv=1e5;function Kx(t){const e=new Map,n=new Map,a=new Set;let o=!1,l=null,u=0,d;const h=new ReadableStream({start(y){d=y},cancel(){o=!0;try{l?.cancel()}catch{}e.forEach(y=>{try{y.error(new Error("Framed response cancelled"))}catch{}}),e.clear(),n.clear(),a.clear()}});function m(y){const b=n.get(y);if(b)return b;if(a.has(y))return new ReadableStream({start(S){S.close()}});if(n.size>=Yv)throw new Error(`Too many raw streams in framed response (max ${Yv})`);const _=new ReadableStream({start(S){e.set(y,S)},cancel(){a.add(y),e.delete(y),n.delete(y)}});return n.set(y,_),_}function g(y){return m(y),e.get(y)}return(async()=>{const y=t.getReader();l=y;const b=[];let _=0;function S(){if(_<9)return null;const E=b[0];if(E.length>=9)return{type:E[0],streamId:(E[1]<<24|E[2]<<16|E[3]<<8|E[4])>>>0,length:(E[5]<<24|E[6]<<16|E[7]<<8|E[8])>>>0};const T=new Uint8Array(9);let C=0,k=9;for(let N=0;N<b.length&&k>0;N++){const F=b[N],V=Math.min(F.length,k);T.set(F.subarray(0,V),C),C+=V,k-=V}return{type:T[0],streamId:(T[1]<<24|T[2]<<16|T[3]<<8|T[4])>>>0,length:(T[5]<<24|T[6]<<16|T[7]<<8|T[8])>>>0}}function R(E){if(E===0)return Fx;const T=new Uint8Array(E);let C=0,k=E;for(;k>0&&b.length>0;){const N=b[0];if(!N)break;const F=Math.min(N.length,k);T.set(N.subarray(0,F),C),C+=F,k-=F,F===N.length?b.shift():b[0]=N.subarray(F)}return _-=E,T}try{for(;;){const{done:E,value:T}=await y.read();if(o||E)break;if(T){if(_+T.length>Kv)throw new Error(`Framed response buffer exceeded ${Kv} bytes`);for(b.push(T),_+=T.length;;){const C=S();if(!C)break;const{type:k,streamId:N,length:F}=C;if(k!==pr.JSON&&k!==pr.CHUNK&&k!==pr.END&&k!==pr.ERROR)throw new Error(`Unknown frame type: ${k}`);if(k===pr.JSON){if(N!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(N===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(F>Fv)throw new Error(`Frame payload too large: ${F} bytes (max ${Fv})`);const V=9+F;if(_<V)break;if(++u>Zv)throw new Error(`Too many frames in framed response (max ${Zv})`);R(9);const z=R(F);switch(k){case pr.JSON:try{d.enqueue(Gv.decode(z))}catch{}break;case pr.CHUNK:{const M=g(N);M&&M.enqueue(z);break}case pr.END:{const M=g(N);if(a.add(N),M){try{M.close()}catch{}e.delete(N)}break}case pr.ERROR:{const M=g(N);if(a.add(N),M){const K=Gv.decode(z);M.error(new Error(K)),e.delete(N)}break}}}}}if(_!==0)throw new Error("Incomplete frame at end of framed response");try{d.close()}catch{}e.forEach(E=>{try{E.close()}catch{}}),e.clear()}catch(E){try{d.error(E)}catch{}e.forEach(T=>{try{T.error(E)}catch{}}),e.clear()}finally{try{y.releaseLock()}catch{}l=null}})(),{getOrCreateStream:m,jsonChunks:h}}var Do=null;async function gh(t){t.length>0&&await Promise.allSettled(t)}var Yx=Object.prototype.hasOwnProperty;function P_(t){for(const e in t)if(Yx.call(t,e))return!0;return!1}async function Zx(t,e,n){Do||(Do=Gx());const a=e[0],o=a.fetch??n,l=a.data instanceof FormData?"formData":"payload",u=a.headers?new Headers(a.headers):new Headers;if(u.set("x-tsr-serverFn","true"),l==="payload"&&u.set("accept",`${YR}, application/x-ndjson, application/json`),a.method==="GET"){if(l==="formData")throw new Error("FormData is not supported with GET requests");const h=await M_(a);if(h!==void 0){const m=F0({payload:h});t.includes("?")?t+=`&${m}`:t+=`?${m}`}}let d;if(a.method==="POST"){const h=await Jx(a);h?.contentType&&u.set("content-type",h.contentType),d=h?.body}return await Qx(async()=>o(t,{method:a.method,headers:u,signal:a.signal,body:d}))}async function M_(t){let e=!1;const n={};if(t.data!==void 0&&(e=!0,n.data=t.data),t.context&&P_(t.context)&&(e=!0,n.c
12ontext=t.context),e)return D_(n)}async function D_(t){return JSON.stringify(await Promise.resolve(Ox(t,{plugins:Do})))}async function Jx(t){if(t.data instanceof FormData){let n;return t.context&&P_(t.context)&&(n=await D_(t.context)),n!==void 0&&t.data.set(KR,n),{body:t.data}}const e=await M_(t);if(e)return{body:e,contentType:"application/json"}}async function Qx(t){let e;try{e=await t()}catch(a){if(a instanceof Response)e=a;else throw console.log(a),a}if(e.headers.get("x-tss-raw")==="true")return e;const n=e.headers.get("content-type");if(n||en(),e.headers.get("x-tss-serialized")){let a;if(n.includes("application/x-tss-framed")){if(QR(n),!e.body)throw new Error("No response body for framed response");const{getOrCreateStream:o,jsonChunks:l}=Kx(e.body),u=[$x(o),...Do||[]],d=new Map;a=await Xx({jsonStream:l,onMessage:h=>Bv(h,{refs:d,plugins:u}),onError(h,m){console.error(h,m)}})}else if(n.includes("application/json")){const o=await e.json(),l=[];a=Bv(o,{plugins:Do}),await gh(l)}if(a||en(),a instanceof Error)throw a;return a}if(n.includes("application/json")){const a=await e.json(),o=Y0(a);if(o)throw o;if(Ct(a))throw a;return a}if(!e.ok)throw new Error(await e.text());return e}async function Xx({jsonStream:t,onMessage:e,onError:n}){const a=t.getReader(),{value:o,done:l}=await a.read();if(l||!o)throw new Error("Stream ended before first object");const u=JSON.parse(o);let d=!1;const h=(async()=>{try{for(;;){const{value:y,done:b}=await a.read();if(b)break;
12if(y)try{const _=[];try{e(JSON.parse(y))}finally{}await gh(_)}catch(_){n?.(`Invalid JSON: ${y}`,_)}}}catch(y){d||n?.("Stream processing error:",y)}})();let m;const g=[];try{m=e(u)}catch(y){throw d=!0,a.cancel().catch(()=>{}),y}return await gh(g),Promise.resolve(m).catch(()=>{d=!0,a.cancel().catch(()=>{})}),h.finally(()=>{try{a.releaseLock()}catch{}}),m}function $t(t){const e="/_serverFn/"+t;return Object.assign((...o)=>{const l=Gh()?.serverFns?.fetch;return Zx(e,o,l??fetch)},{url:e,serverFnMeta:{id:t},[fh]:!0})}var Wx={key:"$TSS/serverfn",test:t=>typeof t!="function"||!(fh in t)?!1:!!t[fh],toSerializable:({serverFnMeta:t})=>({functionId:t.id}),fromSerializable:({functionId:t})=>$t(t)};function I_(t){if(Array.isArray(t))return t.flatMap(g=>I_(g));if(typeof t!="string")return[];const e=[];let n=0,a,o,l,u,d;const h=()=>{for(;n<t.length&&/\s/.test(t.charAt(n));)n+=1;return n<t.length},m=()=>(o=t.charAt(n),o!=="="&&o!==";"&&o!==",");for(;n<t.length;){for(a=n,d=!1;h();)if(o=t.charAt(n),o===","){for(l=n,n+=1,h(),u=n;n<t.length&&m();)n+=1;n<t.length&&t.charAt(n)==="="?(d=!0,n=u,e.push(t.slice(a,l)),a=n):n=l+1}else n+=1;(!d||n>=t.length)&&e.push(t.slice(a))}return e}function e1(t){return t instanceof Headers?t:Array.isArray(t)?new Headers(t):typeof t=="object"?new Headers(t):null}function t1(...t){return t.reduce((e,n)=>{const a=e1(n);if(!a)return e;for(const[o,l]of a.entries())o==="set-cookie"?I_(l).forEach(u=>e.append("set-cookie",u)):e.set(o,l);return e},new Headers)}function Jv(t){return t.replaceAll("\0","/").replaceAll("�","/")}function n1(t,e){t.id=e.i,t.__beforeLoadContext=e.b,t.loaderData=e.l,t.status=e.s,t.ssr=e.ssr,t.updatedAt=e.u,t.error=e.e,e.g!==void 0&&(t.globalNotFound=e.g)}async function r1(t){window.$_TSR||en();const e=t.options.serializationAdapters;if(e?.length){const E=new Map;e.forEach(T=>{E.set(T.key,T.fromSerializable)}),window.$_TSR.t=E,window.$_TSR.buffer.forEach(T=>T())}window.$_TSR.initialized=!0,window.$_TSR.router||en();const n=window.$_TSR.router;n.matches.forEach(E=>
12{E.i=Jv(E.i)}),n.lastMatchId&&(n.lastMatchId=Jv(n.lastMatchId));const{manifest:a,dehydratedData:o,lastMatchId:l}=n;t.ssr={manifest:a};const u=document.querySelector('meta[property="csp-nonce"]')?.content;t.options.ssr={nonce:u};const d=t.matchRoutes(t.stores.location.get()),h=Promise.all(d.map(E=>t.loadRouteChunk(t.looseRoutesById[E.routeId])));function m(E){const T=t.looseRoutesById[E.routeId].options.pendingMinMs??t.options.defaultPendingMinMs;if(T){const C=Js();E._nonReactive.minPendingPromise=C,E._forcePending=!0,setTimeout(()=>{C.resolve(),t.updateMatch(E.id,k=>(k._nonReactive.minPendingPromise=void 0,{...k,_forcePending:void 0}))},T)}}function g(E){const T=t.looseRoutesById[E.routeId];T&&(T.options.ssr=E.ssr)}let y;d.forEach(E=>{const T=n.matches.find(C=>C.i===E.id);if(!T){E._nonReactive.dehydrated=!1,E.ssr=!1,g(E);return}n1(E,T),g(E),E._nonReactive.dehydrated=E.ssr!==!1,(E.ssr==="data-only"||E.ssr===!1)&&y===void 0&&(y=E.index,m(E))}),t.stores.setMatches(d),await t.options.hydrate?.(o);const b=t.stores.matches.get(),_=t.stores.location.get();await Promise.all(b.map(async E=>{try{const T=t.looseRoutesById[E.routeId],C=b[E.index-1]?.context??t.options.context;if(T.options.context){const V={deps:E.loaderDeps,params:E.params,context:C??{},location:_,navigate:z=>t.navigate({...z,_fromLocation:_}),buildLocation:t.buildLocation,cause:E.cause,abortController:E.abortController,preload:!1,matches:d,routeId:T.id};E.__routeContext=T.options.context(V)??void 0}E.context={...C,...E.__routeContext,...E.__beforeLoadContext};const k={ssr:t.options.ssr,matches:b,match:E,params:E.params,loaderData:E.loaderData},N=await T.options.head?.(k),F=await T.options.scripts?.(k);E.meta=N?.meta,E.links=N?.links,E.headScripts=N?.scripts,E.styles=N?.styles,E.scripts=F}catch(T){if(Ct(T))E.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${E.routeId}`,T);else throw E.error=T,console.error(`Error during hydration for route ${E.routeId}:`,T),T}}));const S=d[d.length-1].id!==l;if(!d.some(E=>E.ssr===!1)&&!S)return d.forEach(E=>{E._nonReactive.dehydrated=void 0}),t.stores.resolvedLocation.set(t.stores.location.get()),h;const R=Promise.resolve().then(()=>t.load()).catch(E=>{console.error("Error during router hydration:",E)});if(S){const E=d[1];E||en(),m(E),E._displayPending=!0,E._nonReactive.displayPendingPromise=R,R.then(()=>{t.batch(()=>{t.stores.status.get()==="pending"&&(t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())),t.updateMatch(E.id,T=>({...T,_displayPending:void 0,displayPendingPromise:void 0}))})})}return h}var Fc=Y.use,Eo=typeof window<"u"?Y.useLayoutEffect:Y.useEffect;function Zf(t){const e=Y.useRef({value:t,prev:null}),n=e.current.value;return t!==n&&(e.current={value:t,prev:n}),e.current.prev}function s1(t,e,n={},a={}){Y.useEffect(()=>{if(!t.current||a.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([l])=>{e(l)},n);return o.observe(t.current),()=>{o.disconnect()}},[e,n,a.disabled,t])}function a1(t){const e=Y.useRef(null);return Y.useImperativeHandle(t,()=>e.current,[]),e}function i1({promise:t}){if(Fc)return Fc(t);const e=eA(t);if(e[Hn].status==="pending")throw e;if(e[Hn].status==="error")throw e[Hn].error;return e[Hn].data}function o1(t){const e=D.jsx(l1,{...t});return t.fallback?D.jsx(Y.Suspense,{fallback:t.fallback,children:e}):e}function l1(t){const e=i1(t);return t.children(e)}function tp(t){const e=t.errorComponent??np;return D.jsx(c1,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:a})=>n?Y.createElement(e,{error:n,reset:a}):t.children})}var c1=class extends Y.Component{constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,e){const n=t.getResetKey();return e.error&&e.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,e){this.props.onCatch&&this.props.onCatch(t,e)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function np({error:t}){const[e,n]=Y.useState(!1);return D.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[D.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[D.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),D.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(a=>!a),children:e?"Hide Error":"Show Error"})]}),D.jsx("div",{style:{height:".25rem"}}),e?D.jsx("div",{children:D.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?D.jsx("code",{children:t.message}):null})}):null]})}function u1({children:t,fallback:e=null}){return rp()?D.jsx(ai.Fragment,{children:t}):D.jsx(ai.Fragment,{children:e})}function rp(){return ai.useSyncExternalStore(d1,()=>!0,()=>!1)}function d1(){return()=>{}}var U_=Y.createContext(null);function kt(t){return Y.useContext(U_)}var pu=Y.createContext(void 0),f1=Y.createContext(void 0),it=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(it||{});function h1({update:t,notify:e,unwatched:n}){return{link:a,unlink:o,propagate:l,checkDirty:u,shallowPropagate:d};function a(m,g,y){const b=g.depsTail;if(b!==void 0&&b.dep===m)return;const _=b!==void 0?b.nextDep:g.deps;if(_!==void 0&&_.dep===m){_.version=y,g.depsTail=_;return}const S=m.subsTail;if(S!==void 0&&S.version===y&&S.sub===g)return;const R=g.depsTail=m.subsTail={version:y,dep:m,sub:g,prevDep:b,nextDep:_,prevSub:S,nextSub:void 0};_!==void 0&&(_.prevDep=R),b!==void 0?b.nextDep=R:g.deps=R,S!==void 0?S.nextSub=R:m.subs=R}function o(m,g=m.sub){const y=m.dep,b=m.prevDep,_=m.nextDep,S=m.nextSub,R=m.prevSub;return _!==void 0?_.prevDep=b:g.depsTail=b,b!==void 0?b.nextDep=_:g.deps=_,S!==void 0?S.prevSub=R:y.subsTail=R,R!==void 0?R.nextSub=S:(y.subs=S)===void 0&&n(y),_}function l(m){let g=m.nextSub,y;e:do{const b=m.sub;let _=b.flags;if(_&60?_&12?_&4?!(_&48)&&h(m,b)?(b.flags=_|40,_&=1):_=0:b.flags=_&-9|32:_=0:b.flags=_|32,_&2&&e(b),_&1){const S=b.subs;if(S!==void 0){const R=(m=S).nextSub;R!==void 0&&(y={value:g,prev:y},g=R);continue}}if((m=g)!==void 0){g=m.nextSub;continue}for(;y!==void 0;)if(m=y.value,y=y.prev,m!==void 0){g=m.nextSub;continue e}break}while(!0)}function u(m,g){let y,b=0,_=!1;e:do{const S=m.dep,R=S.flags;if(g.flags&16)_=!0;else if((R&17)===17){if(t(S)){const E=S.subs;E.nextSub!==void 0&&d(E),_=!0}}else if((R&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(y={value:m,prev:y}),m=S.deps,g=S,++b;continue}if(!_){const E=m.nextDep;if(E!==void 0){m=E;continue}}for(;b--;){const E=g.subs,T=E.nextSub!==void 0;if(T?(m=y.value,y=y.prev):m=E,_){if(t(g)){T&&d(E),g=m.sub;continue}_=!1}else g.flags&=-33;g=m.sub;const C=m.nextDep;if(C!==void 0){m=C;continue e}}return _}while(!0)}function d(m){do{const g=m.sub,y=g.flags;(y&48)===32&&(g.flags=y|16,(y&6)===2&&e(g))}while((m=m.nextSub)!==void 0)}function h(m,g){let y=g.depsTail;for(;y!==void 0;){if(y===m)return!0;y=y.prevDep}return!1}}function p1(t,e,n){const a=typeof t=="object",o=a?t:void 0;return{next:(a?t.next:t)?.bind(o),error:(a?t.error:e)?.bind(o),c
12omplete:(a?t.complete:n)?.bind(o)}}const yh=[];let Uc=0;const{link:Qv,unlink:m1,propagate:g1,checkDirty:$_,shallowPropagate:Xv}=h1({update(t){return t._update()},notify(t){yh[vh++]=t,t.flags&=~it.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=it.Mutable|it.Dirty,Kc(t))}});let wc=0,vh=0,Bn,bh=0;function z_(t){try{++bh,t()}finally{--bh||B_()}}function Kc(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=m1(n,t)}function B_(){if(!(bh>0)){for(;wc<vh;){const t=yh[wc];yh[wc++]=void 0,t.notify()}wc=0,vh=0}}function Wv(t,e){const n=typeof t=="function",a=t,o={_snapshot:n?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?it.None:it.Mutable,get(){return Bn!==void 0&&Qv(o,Bn,Uc),o._snapshot},subscribe(l){const u=p1(l),d={current:!1},h=y1(()=>{o.get(),d.current?u.next?.(o._snapshot):d.current=!0});return{unsubscribe:()=>{h.stop()}}},_update(l){const u=Bn,d=e?.compare??Object.is;if(n)Bn=o,++Uc,o.depsTail=void 0;else if(l===void 0)return!1;n&&(o.flags=it.Mutable|it.RecursedCheck);try{const h=o._snapshot,m=typeof l=="function"?l(h):l===void 0&&n?a(h):l;return h===void 0||!d(h,m)?(o._snapshot=m,!0):!1}finally{Bn=u,n&&(o.flags&=~it.RecursedCheck),Kc(o)}}};return n?(o.flags=it.Mutable|it.Dirty,o.get=function(){const l=o.flags;if(l&it.Dirty||l&it.Pending&&$_(o.deps,o)){if(o._update()){const u=o.subs;u!==void 0&&Xv(u)}}else l&it.Pending&&(o.flags=l&~it.Pending);return Bn!==void 0&&Qv(o,Bn,Uc),o._snapshot}):o.set=function(l){if(o._update(l)){const u=o.subs;u!==void 0&&(g1(u),Xv(u),B_())}},o}function y1(t){const e=()=>{const a=Bn;Bn=n,++Uc,n.depsTail=void 0,n.flags=it.Watching|it.RecursedCheck;try{return t()}finally{Bn=a,n.flags&=~it.RecursedCheck,Kc(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:it.Watching|it.RecursedCheck,notify(){const a=this.flags;a&it.Dirty||a&it.Pending&&$_(this.deps,this)?e():this.flags=it.Watching},stop(){this.flags=it.None,this.depsTail=void 0,Kc(this)}};return e(),n}var Jf={exports:{}},Qf={},Xf={exports:{}},Wf={};var eb;function v1(){if(eb)return Wf;eb=1;var t=Yo();function e(y,b){return y===b&&(y!==0||1/y===1/b)||y!==y&&b!==b}var n=typeof Object.is=="function"?Object.is:e,a=t.useState,o=t.useEffect,l=t.useLayoutEffect,u=t.useDebugValue;function d(y,b){var _=b(),S=a({inst:{value:_,getSnapshot:b}}),R=S[0].inst,E=S[1];return l(function(){R.value=_,R.getSnapshot=b,h(R)&&E({inst:R})},[y,_,b]),o(function(){return h(R)&&E({inst:R}),y(function(){h(R)&&E({inst:R})})},[y]),u(_),_}function h(y){var b=y.getSnapshot;y=y.value;try{var _=b();return!n(y,_)}catch{return!0}}function m(y,b){return b()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:d;return Wf.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:g,Wf}var tb;function b1(){return tb||(tb=1,Xf.exports=v1()),Xf.exports}var nb;function _1(){if(nb)return Qf;nb=1;var t=Yo(),e=b1();function n(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var a=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,l=t.useRef,u=t.useEffect,d=t.useMemo,h=t.useDebugValue;return Qf.useSyncExternalStoreWithSelector=function(m,g,y,b,_){var S=l(null);if(S.current===null){var R={hasValue:!1,value:null};S.current=R}else R=S.current;S=d(function(){function T(V){if(!C){if(C=!0,k=V,V=b(V),_!==void 0&&R.hasValue){var z=R.value;if(_(z,V))return N=z}return N=V}if(z=N,a(k,V))return z;var M=b(V);return _!==void 0&&_(z,M)?(k=V,z):(k=V,N=M)}var C=!1,k,N,F=y===void 0?null:y;return[function(){return T(g())},F===null?void 0:function(){return T(F())}]},[g,y,b,_]);var E=o(m,S[0],S[1]);return u(function(){R.hasValue=!0,R.value=E},[E]),h(E),E},Qf}var rb;function w1(){return rb||(rb=1,Jf.exports=_1()),Jf.exports}var S1=w1();function E1(t,e){return t===e}function ht(t,e,n=E1){const a=Y.useCallback(u=>{if(!t)return()=>{};const{unsubscribe:d}=t.subscribe(u);return d},[t]),o=Y.useCallback(()=>t?.get(),[t]);return S1.useSyncExternalStoreWithSelector(a,o,o,e,n)}var R1={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function ta(t){const e=kt(),n=Y.useContext(t.from?f1:pu),a=t.from??n,o=a?t.from?e.stores.getRouteMatchStore(a):e.stores.matchStores.get(a):void 0,l=Y.useRef(void 0);return ht(o??R1,u=>{if((t.shouldThrow??!0)&&!u&&en(),u===void 0)return;const d=t.select?t.select(u):u;if(t.structuralSharing??e.options.defaultStructuralSharing){const h=os(l.current,d);return l.current=h,h}return d})}function q_(t){return ta({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function H_(t){const{select:e,...n}=t;return ta({...n,select:a=>e?e(a.loaderDeps):a.loaderDeps})}function V_(t){return ta({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const n=t.strict===!1?e.params:e._strictParams;return t.select?t.select(n):n}})}function G_(t){return ta({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function F_(t){const e=kt();return Y.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function K_(t){return ta({...t,select:e=>t.select?t.select(e.context):e.context})}var Y_=z0();const l$=$0(Y_);function T1(t,e){const n=kt(),a=a1(e),{activeProps:o,inactiveProps:l,activeOptions:u,to:d,preload:h,preloadDelay:m,preloadIntentProximity:g,hashScrollIntoView:y,replace:b,startTransition:_,resetScroll:S,viewTransition:R,children:E,target:T,disabled:C,style:k,className:N,onClick:F,onBlur:V,onFocus:z,onMouseEnter:M,onMouseLeave:K,onTouchStart:fe,ignoreBlocker:ie,params:Te,search:$e,hash:tt,state:ze,mask:U,reloadDocument:Z,unsafeRelative:me,from:Me,_fromLocation:ee,...x}=t,H=rp(),Q=Y.useMemo(()=>t,[n,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),re=ht(n.stores.location,We=>We,(We,Ot)=>We.href===Ot.href),se=Y.useMemo(()=>{const We={_fromLocation:re,...Q};return n.buildLocation(We)},[n,re,Q]),ge=se.maskedLocation?se.maskedLocation.publicHref:se.publicHref,xe=se.maskedLocation?se.maskedLocation.external:se.external,st=Y.useMemo(()=>L1(ge,xe,n.history,C),[C,xe,ge,n.history]),_e=Y.useMemo(()=>
12{if(st?.external)return Bc(st.href,n.protocolAllowlist)?void 0:st.href;if(!N1(d)&&!(typeof d!="string"||d.indexOf(":")===-1))try{return new URL(d),Bc(d,n.protocolAllowlist)?void 0:d}catch{}},[d,st,n.protocolAllowlist]),pn=Y.useMemo(()=>{if(_e)return!1;if(u?.exact){if(!_T(re.pathname,se.pathname,n.basepath))return!1}else{const We=qc(re.pathname,n.basepath),Ot=qc(se.pathname,n.basepath);if(!(We.startsWith(Ot)&&(We.length===Ot.length||We[Ot.length]==="/")))return!1}return(u?.includeSearch??!0)&&!Wt(re.search,se.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:u?.includeHash?H&&re.hash===se.hash:!0},[u?.exact,u?.explicitUndefined,u?.includeHash,u?.includeSearch,re,_e,H,se.hash,se.pathname,se.search,n.basepath]),Vt=pn?is(o,{})??A1:eh,tn=pn?eh:is(l,{})??eh,Yn=[N,Vt.className,tn.className].filter(Boolean).join(" "),zt=(k||Vt.style||tn.style)&&{...k,...Vt.style,...tn.style},[yi,ra]=Y.useState(!1),Wo=Y.useRef(!1),Zn=t.reloadDocument||_e?!1:h??n.options.defaultPreload,bs=m??n.options.defaultPreloadDelay??0,Cn=Y.useCallback(()=>{n.preloadRoute({...Q,_builtLocation:se}).catch(We=>{console.warn(We),console.warn(tA)})},[n,Q,se]);s1(a,Y.useCallback(We=>{We?.isIntersecting&&Cn()},[Cn]),O1,{disabled:!!C||Zn!=="viewport"}),Y.useEffect(()=>{Wo.current||!C&&Zn==="render"&&(Cn(),Wo.current=!0)},[C,Cn,Zn]);const vi=We=>{const Ot=We.currentTarget.getAttribute("target"),Dn=T!==void 0?T:Ot;if(!C&&!j1(We)&&!We.defaultPrevented&&(!Dn||Dn==="_self")&&We.button===0){We.preventDefault(),Y_.flushSync(()=>{ra(!0)});const sa=n.subscribe("onResolved",()=>{sa(),ra(!1)});n.navigate({...Q,replace:b,resetScroll:S,hashScrollIntoView:y,startTransition:_,viewTransition:R,ignoreBlocker:ie})}};if(_e)return{...x,ref:a,href:_e,...E&&{children:E},...T&&{target:T},...C&&{disabled:C},...k&&{style:k},...N&&{className:N},...F&&{onClick:F},...V&&{onBlur:V},...z&&{onFocus:z},...M&&{onMouseEnter:M},...K&&{onMouseLeave:K},...fe&&{onTouchStart:fe}};const el=We=>{if(C||Zn!=="intent")return;if(!bs){Cn();return}const Ot=We.currentTarget;if(bo.has(Ot))return;const Dn=setTimeout(()=>{bo.delete(Ot),Cn()},bs);bo.set(Ot,Dn)},Su=We=>{C||Zn!=="intent"||Cn()},Dt=We=>{if(C||!Zn||!bs)return;const Ot=We.currentTarget,Dn=bo.get(Ot);Dn&&(clearTimeout(Dn),bo.delete(Ot))};return{...x,...Vt,...tn,href:st?.href,ref:a,onClick:Ha([F,vi]),onBlur:Ha([V,Dt]),onFocus:Ha([z,el]),onMouseEnter:Ha([M,el]),onMouseLeave:Ha([K,Dt]),onTouchStart:Ha([fe,Su]),disabled:!!C,target:T,...zt&&{style:zt},...Yn&&{className:Yn},...C&&C1,...pn&&x1,...H&&yi&&k1}}var eh={},A1={className:"active"},C1={role:"link","aria-disabled":!0},x1={"data-status":"active","aria-current":"page"},k1={"data-transitioning":"transitioning"},bo=new WeakMap,O1={rootMargin:"100px"},Ha=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function L1(t,e,n,a){if(!a)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function N1(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var Gs=Y.forwardRef((t,e)=>{const{_asChild:n,...a}=t,{type:o,...l}=T1(a,e),u=typeof a.children=="function"?a.children({isActive:l["data-status"]==="active"}):a.children;if(!n){const{disabled:d,...h}=l;return Y.createElement("a",h,u)}return Y.createElement(n,l,u)});function j1(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var P1=class extends e_{constructor(e){super(e),this.useMatch=n=>ta({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>K_({...n,from:this.id}),this.useSearch=n=>G_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>V_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>H_({...n,from:this.id}),this.useLoaderData=n=>q_({...n,from:this.id}),this.useNavigate=()=>F_({from:this.fullPath}),this.Link=ai.forwardRef((n,a)=>D.jsx(Gs,{ref:a,from:this.fullPath,...n}))}};function M1(t){return new P1(t)}function D1(){return t=>U1(t)}var I1=class extends aA{constructor(t){super(t),this.useMatch=e=>ta({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>K_({...e,from:this.id}),this.useSearch=e=>G_({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>V_({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>H_({...e,from:this.id}),this.useLoaderData=e=>q_({...e,from:this.id}),this.useNavigate=()=>F_({from:this.fullPath}
12),this.Link=ai.forwardRef((e,n)=>D.jsx(Gs,{ref:n,from:this.fullPath,...e}))}};function U1(t){return new I1(t)}function ne(t){return new $1(t,{silent:!0}).createRoute}var $1=class{constructor(t,e){this.path=t,this.createRoute=n=>{const a=M1(n);return a.isRoot=!1,a},this.silent=e?.silent}};function X(t,e){let n,a,o,l;const u=()=>(n||(n=t().then(h=>{n=void 0,a=h[e??"default"]}).catch(h=>{if(o=h,tT(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const m=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(m)||(sessionStorage.setItem(m,"1"),l=!0)}})),n),d=function(m){if(l)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!a)if(Fc)Fc(u());else throw u();return Y.createElement(a,m)};return d.preload=u,d}function z1(t){const e=kt(),n=`not-found-${ht(e.stores.location,a=>a.pathname)}-${ht(e.stores.status,a=>a)}`;return D.jsx(tp,{getResetKey:()=>n,onCatch:(a,o)=>{if(Ct(a))t.onCatch?.(a,o);else throw a},errorComponent:({error:a})=>{if(Ct(a))return t.fallback?.(a);throw a},children:t.children})}function B1(){return D.jsx("p",{children:"Not Found"})}function Ya(t){return D.jsx(D.Fragment,{children:t.children})}function Z_(t,e,n){return e.options.notFoundComponent?D.jsx(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?D.jsx(t.options.defaultNotFoundComponent,{...n}):D.jsx(B1,{})}function q1(t){return null}function H1(){return q1(kt()),null}var J_=Y.memo(function({matchId:e}){const n=kt(),a=n.stores.matchStores.get(e);a||en();const o=ht(n.stores.loadedAt,u=>u),l=ht(a,u=>u);return D.jsx(V1,{router:n,matchId:e,resetKey:o,matchState:Y.useMemo(()=>{const u=l.routeId,d=n.routesById[u].parentRoute?.id;return{routeId:u,ssr:l.ssr,_displayPending:l._displayPending,parentRouteId:d}},[l._displayPending,l.routeId,l.ssr,n.routesById])})});function V1({router:t,matchId:e,resetKey:n,matchState:a}){const o=t.routesById[a.routeId],l=o.options.pendingComponent??t.options.defaultPendingComponent,u=l?D.jsx(l,{}):null,d=o.options.errorComponent??t.options.defaultErrorComponent,h=o.options.onCatch??t.options.defaultOnCatch,m=o.isRoot?o.options.notFoundComponent??t.options.notFoundRoute?.options.component:o.options.notFoundComponent,g=a.ssr===!1||a.ssr==="data-only",y=(!o.isRoot||o.options.wrapInSuspense||g)&&(o.options.wrapInSuspense??l??(o.options.errorComponent?.preload||g))?Y.Suspense:Ya,b=d?tp:Ya,_=m?z1:Ya;return D.jsxs(o.isRoot?o.options.shellComponent??Ya:Ya,{children:[D.jsx(pu.Provider,{value:e,children:D.jsx(y,{fallback:u,children:D.jsx(b,{getResetKey:()=>n,errorComponent:d||np,onCatch:(S,R)=>{if(Ct(S))throw S.routeId??=a.routeId,S;h?.(S,R)},children:D.jsx(_,{fallback:S=>{if(S.routeId??=a.routeId,!m||S.routeId&&S.routeId!==a.routeId||!S.routeId&&
12!o.isRoot)throw S;return Y.createElement(m,S)},children:g||a._displayPending?D.jsx(u1,{fallback:u,children:D.jsx(sb,{matchId:e})}):D.jsx(sb,{matchId:e})})})})}),a.parentRouteId===Ys?D.jsxs(D.Fragment,{children:[D.jsx(G1,{resetKey:n}),t.options.scrollRestoration&&B0?D.jsx(H1,{}):null]}):null]})}function G1({resetKey:t}){const e=kt(),n=Y.useRef(void 0);return Eo(()=>{const a=e.latestLocation.href;(n.current===void 0||n.current!==a)&&(e.emit({type:"onRendered",...ti(e.stores.location.get(),e.stores.resolvedLocation.get())}),n.current=a)},[e.latestLocation.state.__TSR_key,t,e]),null}var sb=Y.memo(function({matchId:e}){const n=kt(),a=(g,y)=>n.getMatch(g.id)?._nonReactive[y]??g._nonReactive[y],o=n.stores.matchStores.get(e);o||en();const l=ht(o,g=>g),u=l.routeId,d=n.routesById[u],h=Y.useMemo(()=>{const g=(n.routesById[u].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:u,loaderDeps:l.loaderDeps,params:l._strictParams,search:l._strictSearch});return g?JSON.stringify(g):void 0},[u,l.loaderDeps,l._strictParams,l._strictSearch,n.options.defaultRemountDeps,n.routesById]),m=Y.useMemo(()=>{const g=d.options.component??n.options.defaultComponent;return g?D.jsx(g,{},h):D.jsx(_h,{})},[h,d.options.component,n.options.defaultComponent]);if(l._displayPending)throw a(l,"displayPendingPromise");if(l._forcePending)throw a(l,"minPendingPromise");if(l.status==="pending"){const g=d.options.pendingMinMs??n.options.defaultPendingMinMs;if(g){const y=n.getMatch(l.id);if(y&&!y._nonReactive.minPendingPromise){const b=Js();y._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),y._nonReactive.minPendingPromise=void 0},g)}}throw a(l,"loadPromise")}if(l.status==="notFound")return Ct(l.error)||en(),Z_(n,d,l.error);if(l.status==="redirected")throw Ht(l.error)||en(),a(l,"loadPromise");if(l.status==="error")throw l.error;return m}),_h=Y.memo(function(){const e=kt(),n=Y.useContext(pu);let a,o=!1,l;{const m=n?e.stores.matchStores.get(n):void 0;[a,o]=ht(m,g=>[g?.routeId,g?.globalNotFound??!1]),l=ht(e.stores.matchesId,g=>g[g.findIndex(y=>y===n)+1])}const u=a?e.routesById[a]:void 0,d=e.options.defaultPendingComponent?D.jsx(e.options.defaultPendingComponent,{}):null;if(o)return u||en(),Z_(e,u,void 0);if(!l)return null;const h=D.jsx(J_,{matchId:l});return a===Ys?D.jsx(Y.Suspense,{fallback:d,children:h}):h});function F1(){const t=kt(),e=Y.useRef({router:t,mounted:!1}),[n,a]=Y.useState(!1),o=ht(t.stores.isLoading,y=>y),l=ht(t.stores.hasPending,y=>y),u=Zf(o),d=o||n||l,h=Zf(d),m=o||l,g=Zf(m);return t.startTransition=y=>{a(!0),Y.startTransition(()=>{y(),a(!1)})},Y.useEffect(()=>{const y=t.history.subscribe(t.load),b=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return us(t.latestLocation.publicHref)!==us(b.publicHref)&&t.commitLocation({...b,replace:!0}),()=>{y()}},[t,t.history]),Eo(()=>{if(typeof window<"u"&&t.ssr||e.current.router===t&&e.current.mounted)return;e.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(b){console.error(b)}})()},[t]),Eo(()=>{u&&!o&&t.emit({type:"onLoad",...ti(t.stores.location.get(),t.stores.resolvedLocation.get())})},[u,t,o]),Eo(()=>{g&&!m&&t.emit({type:"onBeforeRouteMount",...ti(t.stores.location.get(),t.stores.resolvedLocation.get())})},[m,g,t]),Eo(()=>{if(h&&!d){const y=ti(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...y}),z_(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())}),y.hrefChanged&&iA(t)}},[d,h,t]),null}function K1(){const t=kt(),e=t.routesById[Ys].options.pendingComponent??t.options.defaultPendingComponent,n=e?D.jsx(e,{}):null,a=D.jsxs(typeof document<"u"&&t.ssr?Ya:Y.Suspense,{fallback:n,children:[D.jsx(F1,{}),D.jsx(Y1,{})]});return t.options.InnerWrap?D.jsx(t.options.InnerWrap,{children:a}):a}function Y1(){const t=kt(),e=ht(t.stores.firstId,o=>o),n=ht(t.stores.loadedAt,o=>o),a=e?D.jsx(J_,{matchId:e}):null;return D.jsx(pu.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?a:D.jsx(tp,{getResetKey:()=>n,errorComponent:np,onCatch:void 0,children:a})})}var Z1=t=>({createMutableStore:Wv,createReadonlyStore:Wv,batch:z_}),J1=t=>new Q1(t),Q1=class extends KT{constructor(t){super(t,Z1)}};function X1({router:t,children:e,...n}){Object.keys(n).length>
120&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});const a=D.jsx(U_.Provider,{value:t,children:e});return t.options.Wrap?D.jsx(t.options.Wrap,{children:a}):a}function W1({router:t,...e}){return D.jsx(X1,{router:t,...e,children:D.jsx(K1,{})})}function oi(t){const e=kt({warn:t?.router===void 0}),n=t?.router||e,a=Y.useRef(void 0);return ht(n.stores.__store,o=>{if(t?.select){if(t.structuralSharing??n.options.defaultStructuralSharing){const l=os(a.current,t.select(o));return a.current=l,l}return t.select(o)}return o})}function Q_(t){const{attrs:e,children:n,nonce:a}=t;switch(t.tag){case"title":return D.jsx("title",{...e,suppressHydrationWarning:!0,children:n});case"meta":return D.jsx("meta",{...e,suppressHydrationWarning:!0});case"link":return D.jsx("link",{...e,precedence:e?.precedence??(e?.rel==="stylesheet"?"default":void 0),nonce:a,suppressHydrationWarning:!0});case"style":return t.inlineCss,D.jsx("style",{...e,dangerouslySetInnerHTML:{__html:n},nonce:a});case"script":return D.jsx(ek,{attrs:e,children:n});default:return null}}function ek({attrs:t,children:e}){kt();const n=rp(),a=typeof t?.type=="string"&&t.type!==""&&t.type!=="text/javascript"&&t.type!=="module";if(Y.useEffect(()=>{if(!a){if(t?.src){const o=(()=>{try{const u=document.baseURI||window.location.href;return new URL(t.src,u).href}catch{return t.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(u=>u.src===o))return;const l=document.createElement("script");for(const[u,d]of Object.entries(t))u!=="suppressHydrationWarning"&&d!==void 0&&d!==!1&&l.setAttribute(u,typeof d=="boolean"?"":String(d));return document.head.appendChild(l),()=>{l.parentNode&&l.parentNode.removeChild(l)}}if(typeof e=="string"){const o=typeof t?.type=="string"?t.type:"text/javascript",l=typeof t?.nonce=="string"?t.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(d=>{if(!(d instanceof HTMLScriptElement))return!1;const h=d.getAttribute("type")??"text/javascript",m=d.getAttribute("nonce")??void 0;return d.textContent===e&&h===o&&m===l}))return;const u=document.createElement("script");if(u.textContent=e,t)for(const[d,h]of Object.entries(t))d!=="suppressHydrationWarning"&&h!==void 0&&h!==!1&&u.setAttribute(d,typeof h=="boolean"?"":String(h));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}}},[t,e,a]),a&&typeof e=="string")return D.jsx("script",{...t,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:e}});if(!n){if(t?.src)return D.jsx("script",{...t,suppressHydrationWarning:!0});if(typeof e=="string")return D.jsx("script",{...t,dangerouslySetInnerHTML:{__html:e},suppressHydrationWarning:!0})}return null}var tk=t=>{const e=kt(),n=e.options.ssr?.nonce,a=ht(e.stores.matches,m=>m.map(g=>g.meta).filter(Boolean),Wt),o=Y.useMemo(()=>{const m=[],g={};let y;for(let b=a.length-1;b>=0;b--){const _=a[b];for(let S=_.length-1;S>=0;S--){const R=_[S];if(R)if(R.title)y||(y={tag:"title",children:R.title});else if("script:ld+json"in R)try{const E=JSON.stringify(R["script:ld+json"]);m.push({tag:"script",attrs:{type:"application/ld+json"},children:iT(E)})}catch{}else{const E=R.name??R.property;if(E){if(g[E])continue;g[E]=!0}m.push({tag:"meta",attrs:{...R,nonce:n}})}}}return y&&m.push(y),n&&m.push({tag:"meta",attrs:{property:"csp-nonce",content:n}}),m.reverse(),m},[a,n]),l=ht(e.stores.matches,m=>{const g=m.map(_=>_.links).filter(Boolean).flat(1).map(_=>({tag:"link",attrs:{..._,nonce:n}})),y=e.ssr?.manifest,b=m.map(_=>y?.routes[_.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(_=>_.tag==="link"?sA(y,_)?[]:[{tag:"link",attrs:{..._.attrs,crossOrigin:Iv(t,"stylesheet")??_.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:n}}]:_.tag==="style"?[{tag:"style",attrs:{..._.attrs,nonce:n},children:_.children,..._.inlineCss?{inlineCss:!0}:{}}]:[]);return[...g,...b]},Wt),u=ht(e.stores.matches,m=>{const g=[];return m.map(y=>e.looseRoutesById[y.routeId]).forEach(y=>e.ssr?.manifest?.routes[y.id]?.preloads?.filter(Boolean).forEach(b=>{const _=nA(b);g.push({tag:"link",attrs:{rel:"modulepreload",href:_.href,crossOrigin:Iv(t,"modulepreload")??_.crossOrigin,nonce:n}})})),g},Wt),d=ht(e.stores.matches,m=>m.map(g=>
12g.styles).flat(1).filter(Boolean).map(({children:g,...y})=>({tag:"style",attrs:{...y,nonce:n},children:g})),Wt),h=ht(e.stores.matches,m=>m.map(g=>g.headScripts).flat(1).filter(Boolean).map(({children:g,...y})=>({tag:"script",attrs:{...y,nonce:n},children:g})),Wt);return nk([...o,...u,...l,...d,...h],m=>JSON.stringify(m))};function nk(t,e){const n=new Set;return t.filter(a=>{const o=e(a);return n.has(o)?!1:(n.add(o),!0)})}function rk(t){const e=tk(t.assetCrossOrigin),n=kt().options.ssr?.nonce;return D.jsx(D.Fragment,{children:e.map(a=>Y.createElement(Q_,{...a,key:`tsr-meta-${JSON.stringify(a)}`,nonce:n}))})}var sk=()=>{const t=kt(),e=t.options.ssr?.nonce,n=l=>{const u=[],d=t.ssr?.manifest;return d?(l.map(h=>t.looseRoutesById[h.routeId]).forEach(h=>d.routes[h.id]?.assets?.filter(m=>m.tag==="script").forEach(m=>{u.push({tag:"script",attrs:{...m.attrs,nonce:e},children:m.children})})),u):[]},a=l=>l.map(u=>u.scripts).flat(1).filter(Boolean).map(({children:u,...d})=>({tag:"script",attrs:{...d,suppressHydrationWarning:!0,nonce:e},children:u})),o=ht(t.stores.matches,n,Wt);return ak(t,ht(t.stores.matches,a,Wt),o)};function ak(t,e,n){let a;t.serverSsr&&(a=t.serverSsr.takeBufferedScripts());const o=[...e,...n];return a&&o.unshift(a),D.jsx(D.Fragment,{children:o.map((l,u)=>Y.createElement(Q_,{...l,key:`tsr-scripts-${l.tag}-${u}`}))})}function ab(t){return t!=="__proto__"&&t!=="constructor"&&t!=="prototype"}function wh(t,e){const n=Object.create(null);if(t)for(const a of Object.keys(t))ab(a)&&(n[a]=t[a]);if(e&&typeof e=="object")for(const a of Object.keys(e))ab(a)&&(n[a]=e[a]);return n}function X_(t){return Object.create(null)}var W_=()=>{throw new Error("createServerOnlyFn() functions can only be called on the server!")},xt=(t,e)=>{const n=e||t||{};return typeof n.method>"u"&&(n.method="GET"),Object.assign(l=>xt(void 0,{...n,...l}),{options:n,middleware:l=>{const u=[...n.middleware||[]];l.map(h=>{yv in h?h.options.middleware&&u.push(...h.options.middleware):u.push(h)});const d=xt(void 0,{...n,middleware:u});return d[yv]=!0,d},inputValidator:l=>xt(void 0,{...n,inputValidator:l}),handler:(...l)=>{const[u,d]=l,h={...n,extractedFn:u,serverFn:d},m=[...h.middleware||[],lk(h)];return u.method=n.method,Object.assign(async g=>{const y=await ib(m,"client",{...u,...h,data:g?.data,headers:g?.headers,signal:g?.signal,fetch:g?.fetch,context:X_()}),b=Y0(y.error);if(b)throw b;if(y.error)throw y.error;return y.result},{...u,method:n.method,__executeServer:async g=>{const y=W_(),b=y.contextAfterGlobalMiddlewares;return await ib(m,"server",{...u,...g,serverFnMeta:u.serverFnMeta,context:wh(g.context,b),request:y.request}).then(_=>({result:_.result,error:_.error,context:_.sendContext}))}})}})};async function ib(t,e,n){let a=ik([...Gh()?.functionMiddleware||[],...t]);if(e==="server"){const l=W_();l?.executedRequestMiddlewares&&(a=a.filter(u=>!l.executedRequestMiddlewares.has(u)))}const o=async l=>{const u=a.shift();if(!u)return l;try{"inputValidator"in u.options&&u.options.inputValidator&&e==="server"&&(l.data=await ok(u.options.inputValidator,l.data));let d;if(e==="client"?"client"in u.options&&(d=u.options.client):"server"in u.options&&(d=u.options.server),d){const m=await d({...l,next:async(g={})=>{const y=await o({...l,...g,context:wh(l.context,g.context),sendContext:wh(l.sendContext,g.sendContext),headers:t1(l.headers,g.headers),_callSiteFetch:l._callSiteFetch,fetch:l._callSiteFetch??g.fetch??l.fetch,result:g.result!==void 0?g.result:g instanceof Response?g:l.result,error:g.error??l.error});if(y.error)throw y.error;return y}});if(Ht(m))return{...l,error:m};if(m instanceof Response)return{...l,result:m};if(!m)throw new Error("User middleware returned undefined. You must call next() or return a result in your middlewares.");return m}return o(l)}catch(d){return{...l,error:d}}};return o({...n,headers:n.headers||{},sendContext:n.sendContext||{},context:n.context||X_(),_callSiteFetch:n.fetch})}function ik(t,e=100){const n=new Set,a=[],o=(l,u)=>{if(u>e)throw new Error(`Middleware nesting depth exceeded maximum of ${e}. Check for circular references.`);l.forEach(d=>{d.options.middleware&&o(d.options.middleware,u+1),n.has(d)||(n.add(d),a.push(d))})};return o(t,0),a}async function ok(t,e){if(t==null)return{};if("~standard"in t){const n=await t["~standard"].validate(e);if(n.issues)throw new Error(JSON.stringify(n.issues,void 0,2));return n.value}if("parse"in t)return t.parse(e);if(typeof t=="function")return t(e);throw new Error("Invalid validator type!")}function lk(t){return{"~types":void 0,options:{inputValidator:t.inputValidator,client:async({next:e,sendContext:n,fetch:a,...o})=>{const l={...o,context:n,fetch:a};return e(await t.extractedFn?.(l))},server:async({next:e,...n})=>{const a=await t.serverFn?.(n);return e({...n,result:a})}}}}var Fs=(t,e)=>{const n={type:"request",...e||t};return{options:n,middleware:a=>Fs({},Object.assign(n,{middleware:a})),inputValidator:a=>Fs({},Object.assign(n,{inputValidator:a})),client:a=>Fs({},Object.assign(n,{client:a})),server:a=>Fs({},Object.assign(n,{server:a}))}};function ew(t,e){for(let n=0,a=e.length;n<a;n++){const o=e[n];
12t.has(o)||(t.add(o),o.extends&&ew(t,o.extends))}}var ck=t=>({getOptions:async()=>{const e=await t();if(e.serializationAdapters){const n=new Set;ew(n,e.serializationAdapters),e.serializationAdapters=Array.from(n)}return e},createMiddleware:Fs}),ob=function(){return ob=Object.assign||function(e){for(var n,a=1,o=arguments.length;a<o;a++){n=arguments[a];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},ob.apply(this,arguments)};function mu(t,e){var n={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.indexOf(a)<0&&(n[a]=t[a]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(t);o<a.length;o++)e.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(n[a[o]]=t[a[o]]);return n}function uk(t,e,n,a){function o(l){return l instanceof n?l:new n(function(u){u(l)})}return new(n||(n=Promise))(function(l,u){function d(g){try{m(a.next(g))}catch(y){u(y)}}function h(g){try{m(a.throw(g))}catch(y){u(y)}}function m(g){g.done?l(g.value):o(g.value).then(d,h)}m((a=a.apply(t,e||[])).next())})}function u$(t,e,n){if(n||arguments.length===2)for(var a=0,o=e.length,l;a<o;a++)(l||!(a in e))&&(l||(l=Array.prototype.slice.call(e,0,a)),l[a]=e[a]);return t.concat(l||Array.prototype.slice.call(e))}const dk=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class sp extends Error{constructor(e,n="FunctionsError",a){super(e),this.name=n,this.context=a}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class fk extends sp{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class lb extends sp{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class cb extends sp{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Sh;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Sh||(Sh={}));class hk{constructor(e,{headers:n={},customFetch:a,region:o=Sh.Any}={}){this.url=e,this.headers=n,this.region=o,this.fetch=dk(a)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return uk(this,arguments,void 0,function*(n,a={}){var o;let l,u;try{const{headers:d,method:h,body:m,signal:g,timeout:y}=a;let b={},{region:_}=a;_||(_=this.region);const S=new URL(`${this.url}/${n}`);_&&_!=="any"&&(b["x-region"]=_,S.searchParams.set("forceFunctionRegion",_));let R;const E=!!d&&Object.keys(d).some(V=>V.toLowerCase()==="content-type");m&&!E?typeof Blob<"u"&&m instanceof Blob||m instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",R=m):typeof m=="string"?(b["Content-Type"]="text/plain",R=m):typeof FormData<"u"&&m instanceof FormData?R=m:(b["Content-Type"]="application/json",R=JSON.stringify(m)):m&&typeof m!="string"&&!(typeof Blob<"u"&&m instanceof Blob)&&!(m instanceof ArrayBuffer)&&!(typeof FormData<"u"&&m instanceof FormData)?R=JSON.stringify(m):R=m;let T=g;y&&(u=new AbortController,l=setTimeout(()=>u.abort(),y),g?(T=u.signal,g.addEventListener("abort",()=>u.abort())):T=u.signal);const C=yield this.fetch(S.toString(),{method:h||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),d),body:R,signal:T}).catch(V=>{throw new fk(V)}),k=C.headers.get("x-relay-error");if(k&&k==="true")throw new lb(C);if(!C.ok)throw new cb(C);let N=((o=C.headers.get("Content-Type"))!==null&&o!==void 0?o:"text/plain").split(";")[0].trim(),F;return N==="application/json"?F=yield C.json():N==="application/octet-stream"||N==="application/pdf"?F=yield C.blob():N==="text/event-stream"?F=C:N==="multipart/form-data"?F=yield C.formData():F=yield C.text(),{data:F,error:null,response:C}}catch(d){return{data:null,error:d,response:d instanceof cb||d instanceof lb?d.context:void 0}}finally{l&&clearTimeout(l)}})}}const tw=3,ub=t=>Math.min(1e3*2**t,3e4),pk=[520,503],nw=["GET","HEAD","OPTIONS"];
12var db=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function fb(t,e){return new Promise(n=>{if(e?.aborted){n();return}const a=setTimeout(()=>{e?.removeEventListener("abort",o),n()},t);function o(){clearTimeout(a),n()}e?.addEventListener("abort",o)})}function mk(t,e,n,a){return!(!a||n>=tw||!nw.includes(t)||!pk.includes(e))}var gk=class{constructor(t){var e,n,a,o,l;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(n=t.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(a=t.shouldStripNulls)!==null&&a!==void 0?a:!1,this.urlLengthLimit=(o=t.urlLengthLimit)!==null&&o!==void 0?o:8e3,this.retryEnabled=(l=t.retry)!==null&&l!==void 0?l:!0,t.fetch?this.fetch=t.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(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const u=this.headers.get("Accept");u==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!u||u==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const a=this.fetch;let l=(async()=>{let u=0;for(;;){const m={};n.headers.forEach((y,b)=>{m[b]=y}
12),u>0&&(m["X-Retry-Count"]=String(u));let g;try{g=await a(n.url.toString(),{method:n.method,headers:m,body:JSON.stringify(n.body,(y,b)=>typeof b=="bigint"?b.toString():b),signal:n.signal})}catch(y){if(y?.name==="AbortError"||y?.code==="ABORT_ERR"||!nw.includes(n.method))throw y;if(n.retryEnabled&&u<tw){const b=ub(u);u++,await fb(b,n.signal);continue}throw y}if(mk(n.method,g.status,u,n.retryEnabled)){var d,h;const y=(d=(h=g.headers)===null||h===void 0?void 0:h.get("Retry-After"))!==null&&d!==void 0?d:null,b=y!==null?Math.max(0,parseInt(y,10)||0)*1e3:ub(u);await g.text(),u++,await fb(b,n.signal);continue}return await n.processResponse(g)}})();return this.shouldThrowOnError||(l=l.catch(u=>{var d;let h="",m="",g="";const y=u?.cause;if(y){var b,_,S,R;const C=(b=y?.message)!==null&&b!==void 0?b:"",k=(_=y?.code)!==null&&_!==void 0?_:"";h=`${(S=u?.name)!==null&&S!==void 0?S:"FetchError"}: ${u?.message}`,h+=` 13 14Caused by: ${(R=y?.name)!==null&&R!==void 0?R:"Error"}: ${C}`,k&&(h+=` (${k})`),y?.stack&&(h+=` 15${y.stack}`)}else{var E;h=(E=u?.stack)!==null&&E!==void 0?E:""}const T=this.url.toString().length;return u?.name==="AbortError"||u?.code==="ABORT_ERR"?(g="",m="Request was aborted (timeout or manual cancellation)",T>this.urlLengthLimit&&(m+=`. Note: Your request URL is ${T} 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.`)):(y?.name==="HeadersOverflowError"||y?.code==="UND_ERR_HEADERS_OVERFLOW")&&(g="",m="HTTP headers exceeded server limits (typically 16KB)",T>this.urlLengthLimit&&(m+=`. Your request URL is ${T} 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:`${(d=u?.name)!==null&&d!==void 0?d:"FetchError"}: ${u?.message}`,details:h,hint:m,code:g},data:null,count:null,status:0,statusText:""}})),l.then(t,e)}async processResponse(t){var e=this;let n=null,a=null,o=null,l=t.status,u=t.statusText;if(t.ok){var d,h;if(e.method!=="HEAD"){var m;const b=await t.text();if(b!=="")if(e.headers.get("Accept")==="text/csv")a=b;else if(e.headers.get("Accept")&&(!((m=e.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text")))a=b;else try{a=JSON.parse(b)}catch{if(n={message:b},a=null,e.shouldThrowOnError)throw new db({message:b,details:"",hint:"",code:""})}}const g=(d=e.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),y=(h=t.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");g&&y&&y.length>1&&(o=parseInt(y[1])),e.isMaybeSingle&&Array.isArray(a)&&(a.length>1?(n={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,o=null,l=406,u="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{const g=await t.text();try{n=JSON.parse(g),Array.isArray(n)&&t.status===404&&(a=[],n=null,l=200,u="OK")}catch{t.status===404&&g===""?(l=204,u="No Content"):n={message:g}}if(n&&e.shouldThrowOnError)throw new db(n)}return{success:n===null,error:n,data:a,count:o,status:l,statusText:u}}returns(){return this}overrideTypes(){return this}},yk=class extends gk{throwOnError(){return super.throwOnError()}select(t){let e=!1;const n=(t??"*").split("").map(a=>/\s/.test(a)&&!e?"":(a==='"'&&(e=!e),a)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:n,foreignTable:a,referencedTable:o=a}={}){const l=o?`${o}.order`:"order",u=this.url.searchParams.get(l);return this.url.searchParams.set(l,`${u?`${u},`:""}${t}.${e?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:n=e}={}){const a=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(a,`${t}`),this}range(t,e,{foreignTable:n,referencedTable:a=n}={}){const o=typeof a>"u"?"offset":`${a}.offset`,l=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(o,`${t}`),this.url.searchParams.set(l,`${e-t+1}`),this}abortSignal(t){return this.signal=t,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}
15explain({analyze:t=!1,verbose:e=!1,settings:n=!1,buffers:a=!1,wal:o=!1,format:l="text"}={}){var u;const d=[t?"analyze":null,e?"verbose":null,n?"settings":null,a?"buffers":null,o?"wal":null].filter(Boolean).join("|"),h=(u=this.headers.get("Accept"))!==null&&u!==void 0?u:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${l}; for="${h}"; options=${d};`),l==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const hb=new RegExp("[,()]");var Za=class extends yk{throwOnError(){return super.throwOnError()}eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const n=Array.from(new Set(e)).map(a=>typeof a=="string"&&hb.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(t,`in.(${n})`),this}notIn(t,e){const n=Array.from(new Set(e)).map(a=>typeof a=="string"&&hb.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(t,`not.in.(${n})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:n,type:a}={}){let o="";a==="plain"?o="pl":a==="phrase"?o="ph":a==="websearch"&&(o="w");const l=n===void 0?"":`(${n})`;return this.url.searchParams.append(t,`${o}fts${l}.${e}`),this}match(t){return Object.entries(t).filter(([e,n])=>n!==void 0).forEach(([e,n])=>{this.url.searchParams.append(e,`eq.${n}`)}),this}not(t,e,n){return this.url.searchParams.append(t,`not.${e}.${n}`),this}or(t,{foreignTable:e,referencedTable:n=e}={}){const a=n?`${n}.or`:"or";return this.url.searchParams.append(a,`(${t})`),this}filter(t,e,n){return this.url.searchParams.append(t,`${e}.${n}`),this}},vk=class{constructor(t,{headers:e={},schema:n,fetch:a,urlLengthLimit:o=8e3,retry:l}){this.url=t,this.headers=new Headers(e),this.schema=n,this.fetch=a,this.urlLengthLimit=o,this.retry=l}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:n=!1,count:a}=e??{},o=n?"HEAD":"GET";let l=!1;const u=(t??"*").split("").map(m=>/\s/.test(m)&&!l?"":(m==='"'&&(l=!l),m)).join(""),{url:d,headers:h}=this.cloneRequestState();return d.searchParams.set("select",u),a&&h.append("Prefer",`count=${a}`),new Za({method:o,url:d,headers:h,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:n=!0}={}){var a;const o="POST",{url:l,headers:u}=this.cloneRequestState();if(e&&u.append("Prefer",`count=${e}`),n||u.append("Prefer","missing=default"),Array.isArray(t)){const d=t.reduce((h,m)=>h.concat(Object.keys(m)),[]);if(d.length>0){const h=[...new Set(d)].map(m=>`"${m}"`);l.searchParams.set("columns",h.join(","))}}return new Za({method:o,url:l,headers:u,schema:this.schema,body:t,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:n=!1,count:a,defaultToNull:o=!0}={}){var l;const u="POST",{url:d,headers:h}=this.cloneRequestState();if(h.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),e!==void 0&&d.searchParams.set("on_conflict",e),a&&h.append("Prefer",`count=${a}`),o||h.append("Prefer","missing=default"),Array.isArray(t)){const m=t.reduce((g,y)=>g.concat(Object.keys(y)),[]);if(m.length>0){const g=[...new Set(m)].map(y=>`"${y}"`);d.searchParams.set("columns",g.join(","))}}return new Za({method:u,url:d,headers:h,schema:this.schema,body:t,fetch:(l=this.fetch)!==null&&l!==void 0?l:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var n;const a="PATCH",{url:o,headers:l}=this.cloneRequestState();return e&&l.append("Prefer",`count=${e}`),new Za({method:a,url:o,headers:l,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const n="DELETE",{url:a,headers:o}=this.cloneRequestState();return t&&o.append("Prefer",`count=${t}`),new Za({method:n,url:a,headers:o,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Io(t){"@babel/helpers - typeof";return Io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Io(t)}function bk(t,e){if(Io(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(Io(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function _k(t){var e=bk(t,"string");return Io(e)=="symbol"?e:e+""}function wk(t,e,n){return(e=_k(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function Sc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};
15e%2?pb(Object(n),!0).forEach(function(a){wk(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pb(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}var Sk=class rw{constructor(e,{headers:n={},schema:a,fetch:o,timeout:l,urlLengthLimit:u=8e3,retry:d}={}){this.url=e,this.headers=new Headers(n),this.schemaName=a,this.urlLengthLimit=u;const h=o??globalThis.fetch;l!==void 0&&l>0?this.fetch=(m,g)=>{const y=new AbortController,b=setTimeout(()=>y.abort(),l),_=g?.signal;if(_){if(_.aborted)return clearTimeout(b),h(m,g);const S=()=>{clearTimeout(b),y.abort()};return _.addEventListener("abort",S,{once:!0}),h(m,Sc(Sc({},g),{},{signal:y.signal})).finally(()=>{clearTimeout(b),_.removeEventListener("abort",S)})}return h(m,Sc(Sc({},g),{},{signal:y.signal})).finally(()=>clearTimeout(b))}:this.fetch=h,this.retry=d}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new vk(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new rw(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,n={},{head:a=!1,get:o=!1,count:l}={}){var u;let d;const h=new URL(`${this.url}/rpc/${e}`);let m;const g=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(g)),y=a&&Object.values(n).some(g);y?(d="POST",m=n):a||o?(d=a?"HEAD":"GET",Object.entries(n).filter(([_,S])=>S!==void 0).map(([_,S])=>[_,Array.isArray(S)?`{${S.join(",")}}`:`${S}`]).forEach(([_,S])=>{h.searchParams.append(_,S)})):(d="POST",m=n);const b=new Headers(this.headers);return y?b.set("Prefer",l?`count=${l},return=minimal`:"return=minimal"):l&&b.set("Prefer",`count=${l}`),new Za({method:d,url:h,headers:b,schema:this.schemaName,body:m,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class Ek{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const a=typeof global<"u"?global:void 0;if(a&&typeof a.WebSocket<"u")return{type:"native",wsConstructor:a.WebSocket};if(typeof globalThis<"u"&&typeof n.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&n.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.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 o=globalThis.process;if(o){const l=o.versions;if(l&&l.node)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}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 e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let n=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(n+=` 16 17Suggested solution: ${e.workaround}`),new Error(n)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const Rk="2.110.1",Tk=`realtime-js/${Rk}`,Ak="1.0.0",sw="2.0.0",Ck=sw,xk=1e4,kk=100,ss={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},aw={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Eh={connecting:"connecting",closing:"closing",closed:"closed"};class Ok{constructor(e){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=e??[]}encode(e,n){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(e));let a=[e.join_ref,e.ref,e.topic,e.event,e.payload];return n(JSON.stringify(a))}_binaryEncodeUserBroadcastPush(e){var n;return this._isArrayBuffer((n=e.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var n,a;const o=(a=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&a!==void 0?a:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,o)}_encodeJsonUserBroadcastPush(e){var n,a;const o=(a=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&a!==void 0?a:{},u=new TextEncoder().encode(JSON.stringify(o)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,u)}_encodeUserBroadcastPush(e,n,a){var o,l;const u=e.topic,d=(o=e.ref)!==null&&o!==void 0?o:"",h=(l=e.join_ref)!==null&&l!==void 0?l:"",m=e.payload.event,g=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},y=Object.keys(g).length===0?"":JSON.stringify(g);if(h.length>255)throw new Error(`joinRef length ${h.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`ref length ${d.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`topic length ${u.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`userEvent length ${m.length} exceeds maximum of 255`);if(y.length>255)throw new Error(`metadata length ${y.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+h.length+d.length+u.length+m.length+y.length,_=new ArrayBuffer(this.HEADER_LENGTH+b);let S=new DataView(_),R=0;S.setUint8(R++,this.KINDS.userBroadcastPush),S.setUint8(R++,h.length),S.setUint8(R++,d.length),S.setUint8(R++,u.length),S.setUint8(R++,m.length),S.setUint8(R++,y.length),S.setUint8(R++,n),Array.from(h,T=>S.setUint8(R++,T.charCodeAt(0))),Array.from(d,T=>S.setUint8(R++,T.charCodeAt(0))),Array.from(u,T=>S.setUint8(R++,T.charCodeAt(0))),Array.from(m,T=>S.setUint8(R++,T.charCodeAt(0))),Array.from(y,T=>S.setUint8(R++,T.charCodeAt(0)));var E=new Uint8Array(_.byteLength+a.byteLength);return E.set(new Uint8Array(_),0),E.set(new Uint8Array(a),_.byteLength),E.buffer}decode(e,n){if(this._isArrayBuffer(e)){let a=this._binaryDecode(e);return n(a)}if(typeof e=="string"){const a=JSON.parse(e),[o,l,u,d,h]=a;
17return n({join_ref:o,ref:l,topic:u,event:d,payload:h})}return n({})}_binaryDecode(e){const n=new DataView(e),a=n.getUint8(0),o=new TextDecoder;if(a===this.KINDS.userBroadcast)return this._decodeUserBroadcast(e,n,o)}_decodeUserBroadcast(e,n,a){const o=n.getUint8(1),l=n.getUint8(2),u=n.getUint8(3),d=n.getUint8(4);let h=this.HEADER_LENGTH+4;const m=a.decode(e.slice(h,h+o));h=h+o;const g=a.decode(e.slice(h,h+l));h=h+l;const y=a.decode(e.slice(h,h+u));h=h+u;const b=e.slice(h,e.byteLength),_=d===this.JSON_ENCODING?JSON.parse(a.decode(b)):b,S={type:this.BROADCAST_EVENT,event:g,payload:_};return u>0&&(S.meta=JSON.parse(y)),{join_ref:null,ref:null,topic:m,event:this.BROADCAST_EVENT,payload:S}}_isArrayBuffer(e){var n;return e instanceof ArrayBuffer||((n=e?.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(e,n){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([a])=>n.includes(a)))}}var et;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(et||(et={}));const mb=(t,e,n={})=>{var a;const o=(a=n.skipTypes)!==null&&a!==void 0?a:[];return e?Object.keys(e).reduce((l,u)=>(l[u]=Lk(u,t,e,o),l),{}):{}},Lk=(t,e,n,a)=>{const o=e.find(d=>d.name===t),l=o?.type,u=n[t];return l&&!a.includes(l)?iw(l,u):Rh(u)},iw=(t,e)=>{if(t.charAt(0)==="_"){const n=t.slice(1,t.length);return Mk(e,n)}switch(t){case et.bool:return Nk(e);case et.float4:case et.float8:case et.int2:case et.int4:case et.int8:case et.numeric:case et.oid:return jk(e);case et.json:case et.jsonb:return Pk(e);case et.timestamp:return Dk(e);case et.abstime:case et.date:case et.daterange:case et.int4range:case et.int8range:case et.money:case et.reltime:case et.text:case et.time:case et.timestamptz:case et.timetz:case et.tsrange:case et.tstzrange:return Rh(e);default:return Rh(e)}},Rh=t=>t,Nk=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},jk=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},Pk=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},Mk=(t,e)=>{if(typeof t!="string")return t;const n=t.length-1,a=t[n];if(t[0]==="{"&&a==="}"){let l;const u=t.slice(1,n);try{l=JSON.parse("["+u+"]")}catch{l=u?u.split(","):[]}return l.map(d=>iw(e,d))}return t},Dk=t=>typeof t=="string"?t.replace(" ","T"):t,ow=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var xo=t=>typeof t=="function"?t:function(){return t},Ik=typeof self<"u"?self:null,Ja=typeof window<"u"?window:null,qn=Ik||Ja||globalThis,Uk="2.0.0",$k=1e4,zk=1e3,Vn={connecting:0,open:1,closing:2,closed:3},Xt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},yr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Th={longpoll:"longpoll",websocket:"websocket"},Bk={complete:4},Ah="base64url.bearer.phx.",Ec=class{constructor(t,e,n,a){this.channel=t,this.event=e,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=a,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,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(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}
vendor: 8,135 bytes, line 17
17matchReceive({status:t,response:e,_ref:n}){this.recHooks.filter(a=>a.status===t).forEach(a=>a.callback(e))}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,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},lw=class{constructor(t,e){this.callback=t,this.timerCalc=e,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))}},qk=class{constructor(t,e,n){this.state=Xt.closed,this.topic=t,this.params=xo(e||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Ec(this,yr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new lw(()=>{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=Xt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this.joinPush.receive("error",a=>{this.state=Xt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,a),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Xt.closed,this.socket.remove(this)}),this.onError(a=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,a),this.isJoining()&&this.joinPush.reset(),this.state=Xt.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 Ec(this,yr.leave,xo({}),this.timeout).send(),this.state=Xt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(yr.reply,(a,o)=>{this.trigger(this.replyEventName(o),a)})}join(t=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=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Xt.closed,this.bindings=[]}onClose(t){this.on(yr.close,t)}onError(t){return this.on(yr.error,e=>t(e))}on(t,e){let n=this.bindingRef++;return this.bindings.push({event:t,ref:n,callback:e}),n}off(t,e){this.bindings=this.bindings.filter(n=>!(n.event===t&&(typeof e>"u"||e===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,n=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let a=new Ec(this,t,function(){return e},n);return this.canPush()?a.send():(a.startTimeout(),this.pushBuffer.push(a)),a}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Xt.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(yr.close,"leave")},n=new Ec(this,yr.leave,xo({}),t);return n.receive("ok",()=>e()).receive("timeout",()=>e()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(t,e,n){return e}filterBindings(t,e,n){return!0}isMember(t,e,n,a){return this.topic!==t?!1:a&&a!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:n,joinRef:a}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Xt.joining,this.joinPush.resend(t))}trigger(t,e,n,a){let o=this.onMessage(t,e,n,a);if(e&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let l=this.bindings.filter(u=>u.event===t&&this.filterBindings(u,e,n));for(let u=0;u<l.length;u++)l[u].callback(o,n,a||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===Xt.closed}isErrored(){return this.state===Xt.errored}isJoined(){return this.state===Xt.joined}isJoining(){return this.state===Xt.joining}isLeaving(){return this.state===Xt.leaving}},Yc=class{static request(t,e,n,a,o,l,u){if(qn.XDomainRequest){let d=new qn.XDomainRequest;return this.xdomainRequest(d,t,e,a,o,l,u)}else if(qn.XMLHttpRequest){let d=new qn.XMLHttpRequest;return this.xhrRequest(d,t,e,n,a,o,l,u)}else{if(qn.fetch&&qn.AbortController)return this.fetchRequest(t,e,n,a,o,l,u);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,n,a,o,l,u){let d={method:t,headers:n,body:a},h=null;return o&&(h=new AbortController,setTimeout(()=>h.abort(),o),d.signal=h.signal),qn.fetch(e,d).then(m=>m.text()).then(m=>this.parseJSON(m)).then(m=>u&&u(m)).catch(m=>{m.name==="AbortError"&&l?l():u&&u(null)}),h}static xdomainRequest(t,e,n,a,o,l,u){return t.timeout=o,t.open(e,n),t.onload=()=>{let d=this.parseJSON(t.responseText);u&&u(d)},l&&(t.ontimeout=l),t.onprogress=()=>{},t.send(a),t}static xhrRequest(t,e,n,a,o,l,u,d){t.open(e,n,!0),t.timeout=l;for(let[h,m]of Object.entries(a))t.setRequestHeader(h,m);return t.onerror=()=>d&&d(null),t.onreadystatechange=()=>{if(t.readyState===Bk.complete&&d){let h=this.parseJSON(t.responseText);d(h)}},u&&(t.ontimeout=u),t.send(o),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let n=[];for(var a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let o=e?`${e}[${a}]`:a,l=t[a];typeof l=="object"?n.push(this.serialize(l,o)):n.push(encodeURIComponent(o)+"="+encodeURIComponent(l))}return n.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let n=t.match(/\?/)?"&":"?";return`${t}${n}${this.serialize(e)}`}},Hk=t=>{let e="",n=new Uint8Array(t),a=n.byteLength;for(let o=0;o<a;o++)e+=String.fromCharCode(n[o]);return btoa(e)},Va=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(Ah)&&(this.authToken=atob(e[1].slice(Ah.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(t),this.readyState=Vn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Th.websocket),"$1/"+Th.longpoll)}endpointURL(){return Yc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,n){this.close(t,e,n),this.readyState=Vn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Vn.open||this.readyState===Vn.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:n,token:a,messages:o}=e;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=a}else n=0;switch(n){case 200:o.forEach(l=>{setTimeout(()=>this.onmessage({data:l}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Vn.open,this.onopen({}),this.poll();break;
17case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(t){typeof t!="string"&&(t=Hk(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(` 18`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,n){for(let o of this.reqs)o.abort();this.readyState=Vn.closed;let a=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",a)):this.onclose(a)}ajax(t,e,n,a,o){let l,u=()=>{this.reqs.delete(l),a()};l=Yc.request(t,this.endpointURL(),e,n,this.timeout,u,d=>{this.reqs.delete(l),this.isActive()&&o(d)}),this.reqs.add(l)}},Vk=class Ro{constructor(e,n={}){let a=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(a.state,o=>{let{onJoin:l,onLeave:u,onSync:d}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Ro.syncState(this.state,o,l,u),this.pendingDiffs.forEach(h=>{this.state=Ro.syncDiff(this.state,h,l,u)}),this.pendingDiffs=[],d()}),this.channel.on(a.diff,o=>{let{onJoin:l,onLeave:u,onSync:d}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=Ro.syncDiff(this.state,o,l,u),d())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Ro.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,n,a,o){let l=this.clone(e),u={},d={};return this.map(l,(h,m)=>{n[h]||(d[h]=m)}),this.map(n,(h,m)=>{let g=l[h];if(g){let y=m.metas.map(R=>R.phx_ref),b=g.metas.map(R=>R.phx_ref),_=m.metas.filter(R=>b.indexOf(R.phx_ref)<0),S=g.metas.filter(R=>y.indexOf(R.phx_ref)<0);_.length>0&&(u[h]=m,u[h].metas=_),S.length>0&&(d[h]=this.clone(g),d[h].metas=S)}else u[h]=m}),this.syncDiff(l,{joins:u,leaves:d},a,o)}static syncDiff(e,n,a,o){let{joins:l,leaves:u}=this.clone(n);return a||(a=function(){}),o||(o=function(){}),this.map(l,(d,h)=>{let m=e[d];if(e[d]=this.clone(h),m){let g=e[d].metas.map(b=>b.phx_ref),y=m.metas.filter(b=>g.indexOf(b.phx_ref)<0);e[d].metas.unshift(...y)}a(d,m,h)}),this.map(u,(d,h)=>{let m=e[d];if(!m)return;let g=h.metas.map(y=>y.phx_ref);m.metas=m.metas.filter(y=>g.indexOf(y.phx_ref)<0),o(d,m,h),m.metas.length===0&&delete e[d]}),e}static list(e,n){return n||(n=function(a,o){return o}),this.map(e,(a,o)=>n(a,o))}static map(e,n){return Object.getOwnPropertyNames(e).map(a=>n(a,e[a]))}static clone(e){return JSON.parse(JSON.stringify(e))}},Rc={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(n))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[n,a,o,l,u]=JSON.parse(t);return e({join_ref:n,ref:a,topic:o,event:l,payload:u})}},binaryEncode(t){let{join_ref:e,ref:n,event:a,topic:o,payload:l}=t,u=this.META_LENGTH+e.length+n.length+o.length+a.length,d=new ArrayBuffer(this.HEADER_LENGTH+u),h=new DataView(d),m=0;h.setUint8(m++,this.KINDS.push),h.setUint8(m++,e.length),h.setUint8(m++,n.length),h.setUint8(m++,o.length),h.setUint8(m++,a.length),Array.from(e,y=>h.setUint8(m++,y.charCodeAt(0))),Array.from(n,y=>h.setUint8(m++,y.charCodeAt(0))),Array.from(o,y=>
18h.setUint8(m++,y.charCodeAt(0))),Array.from(a,y=>h.setUint8(m++,y.charCodeAt(0)));var g=new Uint8Array(d.byteLength+l.byteLength);return g.set(new Uint8Array(d),0),g.set(new Uint8Array(l),d.byteLength),g.buffer},binaryDecode(t){let e=new DataView(t),n=e.getUint8(0),a=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(t,e,a);case this.KINDS.reply:return this.decodeReply(t,e,a);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,a)}},decodePush(t,e,n){let a=e.getUint8(1),o=e.getUint8(2),l=e.getUint8(3),u=this.HEADER_LENGTH+this.META_LENGTH-1,d=n.decode(t.slice(u,u+a));u=u+a;let h=n.decode(t.slice(u,u+o));u=u+o;let m=n.decode(t.slice(u,u+l));u=u+l;let g=t.slice(u,t.byteLength);return{join_ref:d,ref:null,topic:h,event:m,payload:g}},decodeReply(t,e,n){let a=e.getUint8(1),o=e.getUint8(2),l=e.getUint8(3),u=e.getUint8(4),d=this.HEADER_LENGTH+this.META_LENGTH,h=n.decode(t.slice(d,d+a));d=d+a;let m=n.decode(t.slice(d,d+o));d=d+o;let g=n.decode(t.slice(d,d+l));d=d+l;let y=n.decode(t.slice(d,d+u));d=d+u;let b=t.slice(d,t.byteLength),_={status:y,response:b};return{join_ref:h,ref:m,topic:g,event:yr.reply,payload:_}},decodeBroadcast(t,e,n){let a=e.getUint8(1),o=e.getUint8(2),l=this.HEADER_LENGTH+2,u=n.decode(t.slice(l,l+a));l=l+a;let d=n.decode(t.slice(l,l+o));l=l+o;let h=t.slice(l,t.byteLength);return{join_ref:null,ref:null,topic:u,event:d,payload:h}}},Gk=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||$k,this.transport=e.transport||qn.WebSocket||Va,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=qn&&qn.sessionStorage}catch{}this.sessionStore=e.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=Rc.encode.bind(Rc),this.defaultDecoder=Rc.decode.bind(Rc),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Va?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let a=null;Ja&&Ja.addEventListener&&(Ja.addEventListener("pagehide",o=>{this.conn&&(this.disconnect(),a=this.connectClock)}),Ja.addEventListener("pageshow",o=>{a===this.connectClock&&(a=null,this.connect())}),Ja.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=o=>e.rejoinAfterMs?e.rejoinAfterMs(o):[1e3,2e3,5e3][o-1]||1e4,this.reconnectAfterMs=o=>e.reconnectAfterMs?e.reconnectAfterMs(o):[10,50,100,150,200,250,500,1e3,2e3][o-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(o,l,u)=>{console.log(`${o}: ${l}`,u)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=xo(e.params||{}),this.endPoint=`${t}/${Th.websocket}`,this.vsn=e.vsn||Uk,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new lw(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return Va}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=Yc.appendParams(Yc.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,n)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=xo(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Va?this.connectWithF
vendor: 4,353 bytes, line 18
18allback(Va,this.longPollFallbackMs):this.transportConnect())}log(t,e,n){this.logger&&this.logger(t,e,n)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let a=this.onMessage(o=>{o.ref===e&&(this.off([a]),t(Date.now()-n))});return!0}transportName(t){return t===Va?"LongPoll":t.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${Ah}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let n=!1,a=!0,o,l,u=this.transportName(t),d=h=>{this.log("transport",`falling back to ${u}...`,h),this.off([o,l]),a=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${u}`))return d("memorized");this.fallbackTimer=setTimeout(d,e),l=this.onError(h=>{this.log("transport","error",h),a&&!n&&(clearTimeout(this.fallbackTimer),d(h))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!a){let h=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${h}`,"true"),this.log("transport",`established ${h} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(d,e),this.ping(h=>{this.log("transport","connected to primary after",h),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(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),zk,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,n){if(!this.conn)return t&&t();const a=this.conn;this.waitForBufferDone(a,()=>{e?a.close(e,n||""):a.close(),this.waitForSocketClosed(a,()=>{this.conn===a&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,n=1){if(n===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,n+1)},150*n)}waitForSocketClosed(t,e,n=1){if(n===5||t.readyState===Vn.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,n+1)},150*n)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",t,e,n),(e===this.transport||n>0)&&this.triggerChanError(t)}
18triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(yr.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case Vn.connecting:return"connecting";case Vn.open:return"open";case Vn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([n])=>t.indexOf(n)===-1)}channel(t,e={}){let n=new qk(t,e,this);return this.channels.push(n),n}push(t){if(this.hasLogger()){let{topic:e,event:n,payload:a,ref:o,join_ref:l}=t;this.log("push",`${e} ${n} (${l}, ${o})`,a)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}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(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:n,event:a,payload:o,ref:l,join_ref:u}=e;if(l&&l===this.pendingHeartbeatRef){const d=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(o.status==="ok"?"ok":"error",d)}catch(h){this.log("error","error in heartbeat callback",h)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${o.status||""} ${n} ${a} ${l&&"("+l+")"||""}`.trim(),o);for(let d=0;d<this.channels.length;d++){const h=this.channels[d];h.isMember(n,a,o,u)&&h.trigger(a,o,l,u)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([n,a])=>{try{a(...e)}catch(o){this.log("error",`error in ${t} callback`,o)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}leaveOpenTopic(t){let e=this.channels.find(n=>n.topic===t&&(n.isJoined()||n.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class ko{constructor(e,n){const a=Kk(n);this.presence=new Vk(e.getChannel(),a),this.presence.onJoin((o,l,u)=>{const d=ko.onJoinPayload(o,l,u);e.getChannel().trigger("presence",d)}),this.presence.onLeave((o,l,u)=>{const d=ko.onLeavePayload(o,l,u);e.getChannel().trigger("presence",d)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return ko.transformState(this.presence.state)}static transformState(e){return e=Fk(e),Object.getOwnPropertyNames(e).reduce((n,a)=>{const o=e[a];return n[a]=$c(o),n},{})}static onJoinPayload(e,n,a){const o=gb(n),l=$c(a);return{event:"join",key:e,currentPresences:o,newPresences:l}}static onLeavePayload(e,n,a){const o=gb(n),l=$c(a);return{event:"leave",key:e,currentPresences:o,leftPresences:l}}}function $c(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function Fk(t){return JSON.parse(JSON.stringify(t))}function Kk(t){return t?.events&&{events:t.events}}function gb(t){return t?.metas?$c(t):[]}var yb;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(yb||(yb={}));class Yk{get state(){return this.presenceAdapter.state}constructor(e,n){this.channel=e,this.presenceAdapter=new ko(this.channel.channelAdapter,n)}}function Zk(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;
18if(typeof e.code=="number"){const n=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${n}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class Jk{constructor(e,n,a){const o=Qk(a);this.channel=e.getSocket().channel(n,o),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,n){return this.channel.on(e,n)}off(e,n){this.channel.off(e,n)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,n,a){let o;try{o=this.channel.push(e,n,a)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>kk){const l=this.channel.pushBuffer.shift();l.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${l.event}`,l.payload())}return o}updateJoinPayload(e){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),e)}canPush(){return this.socket.isConnected()&&this.state===ss.joined}isJoined(){return this.state===ss.joined}isJoining(){return this.state===ss.joining}isClosed(){return this.state===ss.closed}isLeaving(){return this.state===ss.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function Qk(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}const Xk=/[,()"\\]/,Wk=t=>Xk.test(t)||t!==t.trim(),eO=t=>`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,vb=t=>{const e=t===null?"null":String(t);return Wk(e)?eO(e):e},tO=t=>t===null?"null":String(t),nO=(t,e)=>{if(t==="in"){const n=Array.isArray(e)?e:[e];if(n.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(n)).map(o=>vb(o)).join(",")})`}return t==="is"?`is.${tO(e)}`:`${t}.${vb(e)}`};class rO{constructor(){this.filters=[]}add(e,n,a,o=!1){const l=o?"not.":"";return this.filters.push(`${e}=${l}${nO(n,a)}`),this}eq(e,n){return this.add(e,"eq",n)}neq(e,n){return this.add(e,"neq",n)}gt(e,n){return this.add(e,"gt",n)}gte(e,n){return this.add(e,"gte",n)}lt(e,n){return this.add(e,"lt",n)}lte(e,n){return this.add(e,"lte",n)}in(e,n){return this.add(e,"in",n)}like(e,n){return this.add(e,"like",n)}ilike(e,n){return this.add(e,"ilike",n)}match(e,n){return this.add(e,"match",n)}imatch(e,n){return this.add(e,"imatch",n)}is(e,n){return this.add(e,"is",n)}isDistinct(e,n){return this.add(e,"isdistinct",n)}not(e,n,a){return this.add(e,n,a,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var bb;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(bb||(bb={}));var ei;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(ei||(ei={}));var vr;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(vr||(vr={}));class Oo{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}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(e,n={config:{}},a){var o,l;if(this.topic=e,this.params=n,this.socket=a,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new Jk(this.socket.socketAdapter,e,this.params),this.presence=new Yk(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=ow(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((l=(o=this.params.config)===null||o===void 0?void 0:o.broadcast)===null||l===void 0)&&l.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,n=this.timeout){var a,o,l;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:u,presence:d,private:h}}=this.params,m=(o=(a=this.bindings.postgres_changes)===null||a===void 0?void 0:a.map(_=>_.filter))!==null&&o!==void 0?o:[],g=!!this.bindings[ei.PRESENCE]&&this.bindings[ei.PRESENCE].length>0||((l=this.params.config.presence)===null||l===void 0?void 0:l.enabled)===!0,y={},b={broadcast:u,presence:Object.assign(Object.assign({},d),{enabled:g}),postgres_changes:m,private:h};this.socket.accessTokenValue&&(y.access_token=this.socket.accessTokenValue),this._onError(_=>{e?.(vr.CHANNEL_ERROR,Zk(_))}),this._onClose(()=>e?.(vr.CLOSED)),this.updateJoinPayload(Object.assign({config:b},y)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:_})=>
18{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){e?.(vr.SUBSCRIBED);return}this._updatePostgresBindings(_,e)}).receive("error",_=>{this.state=ss.errored;const S=Object.values(_).join(", ")||"error";e?.(vr.CHANNEL_ERROR,new Error(S,{cause:_}))}).receive("timeout",()=>{e?.(vr.TIMED_OUT)})}return this}_updatePostgresBindings(e,n){var a;const o=this.bindings.postgres_changes,l=(a=o?.length)!==null&&a!==void 0?a:0,u=[];for(let d=0;d<l;d++){const h=o[d],{filter:{event:m,schema:g,table:y,filter:b}}=h,_=e&&e[d];if(_&&_.event===m&&Oo.isFilterValueEqual(_.schema,g)&&Oo.isFilterValueEqual(_.table,y)&&Oo.isFilterValueEqual(_.filter,b))u.push(Object.assign(Object.assign({},h),{id:_.id}));else{this.unsubscribe(),this.state=ss.errored,n?.(vr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=u,this.state!=ss.errored&&n&&n(vr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,n={}){return await this.send({type:"presence",event:"track",payload:e},n.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,n,a){const o=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),l=e===ei.PRESENCE||e===ei.POSTGRES_CHANGES;if(o&&l)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,n,a)}async httpSend(e,n,a={}){var o;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const l=n instanceof ArrayBuffer||ArrayBuffer.isView(n),u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":l?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const d=new URL(this.broadcastEndpointURL);d.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&d.searchParams.set("private","true");const h={method:"POST",headers:u,body:l?n:JSON.stringify(n)},m=await this._fetchWithTimeout(d.toString(),h,(o=a.timeout)!==null&&o!==void 0?o:this.timeout);if(m.status===202)return{success:!0};if(m.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/realtime-js/migrations/httpsend-server-version.md"));let g=m.statusText;try{const y=await m.json();g=y.error||y.message||g}catch{}return Promise.reject(new Error(g))}async send(e,n={}){var a,o;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
18in the future. Please use httpSend() explicitly for REST delivery.");const{event:l,payload:u}=e,d={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(d.Authorization=`Bearer ${this.socket.accessTokenValue}`);const h={method:"POST",headers:d,body:JSON.stringify({messages:[{topic:this.subTopic,event:l,payload:u,private:this.private}]})};try{const m=await this._fetchWithTimeout(this.broadcastEndpointURL,h,(a=n.timeout)!==null&&a!==void 0?a:this.timeout);return await((o=m.body)===null||o===void 0?void 0:o.cancel()),m.ok?"ok":"error"}catch(m){return m instanceof Error&&m.name==="AbortError"?"timed out":"error"}}else return new Promise(l=>{var u,d,h;const m=this.channelAdapter.push(e.type,e,n.timeout||this.timeout);e.type==="broadcast"&&!(!((h=(d=(u=this.params)===null||u===void 0?void 0:u.config)===null||d===void 0?void 0:d.broadcast)===null||h===void 0)&&h.ack)&&l("ok"),m.receive("ok",()=>l("ok")),m.receive("error",()=>l("error")),m.receive("timeout",()=>l("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,n,a){const o=new AbortController,l=setTimeout(()=>o.abort(),a),u=await this.socket.fetch(e,Object.assign(Object.assign({},n),{signal:o.signal}));return clearTimeout(l),u}_on(e,n,a){const o=e.toLocaleLowerCase(),l=n?.filter;(l instanceof rO||typeof l=="object"&&l!==null&&typeof l.build=="function")&&(n=Object.assign(Object.assign({},n),{filter:l.build()}));const u=this.channelAdapter.on(e,a),d={type:o,filter:n,callback:a,ref:u};return this.bindings[o]?this.bindings[o].push(d):this.bindings[o]=[d],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,n,a)=>{var o,l,u,d,h,m,g;const y=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(y,a))return!1;const b=(o=this.bindings[y])===null||o===void 0?void 0:o.find(_=>_.ref===e.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(y))if("id"in b){const _=b.id,S=(l=b.filter)===null||l===void 0?void 0:l.event;return _&&((u=n.ids)===null||u===void 0?void 0:u.includes(_))&&(S==="*"||S?.toLocaleLowerCase()===((d=n.data)===null||d===void 0?void 0:d.type.toLocaleLowerCase()))}else{const _=(m=(h=b?.filter)===null||h===void 0?void 0:h.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return _==="*"||_===((g=n?.event)===null||g===void 0?void 0:g.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===y})}_notThisChannelEvent(e,n){const{close:a,error:o,leave:l,join:u}=aw;return n&&[a,o,l,u].includes(e)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,n,a)=>{if(typeof n=="object"&&"ids"in n){const o=n.data,{schema:l,table:u,commit_timestamp:d,type:h,errors:m}=o;return Object.assign(Object.assign({},{schema:l,table:u,commit_timestamp:d,eventType:h,new:{},old:{},errors:m}),this._getPayloadRecords(o))}return n})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in e.bindings)for(const a of e.bindings[n])this._on(a.type,a.filter,a.callback)}static isFilterValueEqual(e,n){return(e??void 0)===(n??void 0)}_getPayloadRecords(e){const n={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(n.new=mb(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(n.old=mb(e.columns,e.old_record)),n}}class sO{constructor(e,n){this.socket=new Gk(e,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}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(e,n,a,o=1e4){return new Promise(l=>{setTimeout(()=>l("timeout"),o),this.socket.disconnect(()=>{e(),l("ok")},n,a)})}push(e){this.socket.push(e)}log(e,n,a){this.socket.log(e,n,a)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Eh.connecting}isDisconnecting(){return this.socket.connectionState()==Eh.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const _b={HEARTBEAT_INTERVAL:25e3},aO=[1e3,2e3,5e3,1e4],iO=1e4;function oO(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var n;return(n=Array.from(t.keys())[e])!==null&&n!==void 0?n:null},removeItem(e){t.delete(e)},setItem(e,n){t.set(e,String(n))}}}function lO(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return oO()}const cO=` 19 addEventListener("message", (e) => { 20 if (e.data.event === "start") { 21 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 22 } 23 });`;class uO{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(e,n){var a;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
23,this.ref=0,this.serializer=new Ok,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=l=>l?(...u)=>l(...u):(...u)=>fetch(...u),!(!((a=n?.params)===null||a===void 0)&&a.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const o=this._initializeOptions(n);this.socketAdapter=new sO(e,o),this.httpEndpoint=ow(e),this.fetch=this._resolveFetch(n?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const n=e.message;throw new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,n)}getChannels(){return this.channels}async removeChannel(e){const n=await e.unsubscribe();return n==="ok"&&e.teardown(),n}async removeAllChannels(){const e=this.channels.map(async a=>{const o=await a.unsubscribe();return a.teardown(),o}),n=await Promise.all(e);return await this.disconnect(),n}log(e,n,a){this.socketAdapter.log(e,n,a)}connectionState(){return this.socketAdapter.connectionState()||Eh.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,n={config:{}}){const a=`realtime:${e}`,o=this.getChannels().find(l=>l.topic===a);if(o)return o;{const l=new Oo(`realtime:${e}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(l),l}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(n=>n.topic!==e.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}
23this._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(e=null){let n,a=!1;if(e)n=e,a=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(o){this.log("error","Error fetching access token from callback",o),n=this.accessTokenValue}else n=this.accessTokenValue;a?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(o=>{const l={access_token:n,version:Tk};n&&o.updateJoinPayload(l),o.joinedOnce&&o.channelAdapter.isJoined()&&o.channelAdapter.push(aw.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${e}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(n,a)=>{n!=="disconnected"&&(n=="sent"&&this._setAuthSafely(),e&&e(n,a))}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let n;if(e)n=e;else{const a=new Blob([cO],{type:"application/javascript"});n=URL.createObjectURL(a)}return n}_initializeOptions(e){var n,a,o,l,u,d,h,m,g,y,b,_;this.worker=(n=e?.worker)!==null&&n!==void 0?n:!1,this.accessToken=(a=e?.accessToken)!==null&&a!==void 0?a:null;const S={};S.timeout=(o=e?.timeout)!==null&&o!==void 0?o:xk,S.heartbeatIntervalMs=(l=e?.heartbeatIntervalMs)!==null&&l!==void 0?l:_b.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(u=e?.disconnectOnEmptyChannelsAfterMs)!==null&&u!==void 0?u:2*((d=e?.heartbeatIntervalMs)!==null&&d!==void 0?d:_b.HEARTBEAT_INTERVAL),S.transport=(h=e?.transport)!==null&&h!==void 0?h:Ek.getWebSocketConstructor(),S.params=e?.params,S.logger=e?.logger,S.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),S.sessionStorage=(m=e?.sessionStorage)!==null&&m!==void 0?m:lO(),S.reconnectAfterMs=(g=e?.reconnectAfterMs)!==null&&g!==void 0?g:(C=>aO[C-1]||iO);let R,E;const T=(y=e?.vsn)!==null&&y!==void 0?y:Ck;switch(T){case Ak:R=(C,k)=>k(JSON.stringify(C)),E=(C,k)=>k(JSON.parse(C));break;case sw:R=this.serializer.encode.bind(this.serializer),E=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${S.vsn}`)}if(S.vsn=T,S.encode=(b=e?.encode)!==null&&b!==void 0?b:R,S.decode=(_=e?.decode)!==null&&_!==void 0?_:E,S.beforeReconnect=this._reconnectAuth.bind(this),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,S.params=Object.assign(Object.assign({},S.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e?.workerUrl,S.autoSendHeartbeat=!this.worker}return S}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
23var Uo=class extends Error{constructor(t,e){super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&e.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function dO(t,e,n){const a=new URL(e,t);if(n)for(const[o,l]of Object.entries(n))l!==void 0&&a.searchParams.set(o,l);return a.toString()}async function fO(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function hO(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:n,path:a,query:o,body:l,headers:u}){const d=dO(t.baseUrl,a,o),h=await fO(t.auth),m=await e(d,{method:n,headers:{...l?{"Content-Type":"application/json"}:{},...h,...u},body:l?JSON.stringify(l):void 0}),g=await m.text(),y=(m.headers.get("content-type")||"").includes("application/json"),b=y&&g?JSON.parse(g):g;if(!m.ok){const _=y?b:void 0,S=_?.error;throw new Uo(S?.message??`Request failed with status ${m.status}`,{status:m.status,icebergType:S?.type,icebergCode:S?.code,details:_})}return{status:m.status,headers:m.headers,data:b}}}}function Tc(t){return t.join("�")}var pO=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:Tc(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(a=>({namespace:a}))}async createNamespace(t,e){const n={namespace:t.namespace,properties:e?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Tc(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Tc(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Tc(t.namespace)}`}),!0}catch(e){if(e instanceof Uo&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(n){if(n instanceof Uo&&n.status===409)return;throw n}}};function Ga(t){return t.join("�")}var mO=class{constructor(t,e="",n){this.client=t,this.prefix=e,this.accessDelegation=n}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ga(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ga(t.namespace)}/tables`,body:e,headers:n})).data.metadata}async updateTable(t,e){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ga(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ga(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String(e?.purge??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ga(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ga(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(n){if(n instanceof Uo&&n.status===404)return!1;throw n}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(n){if(n instanceof Uo&&n.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw n}}},gO=class{constructor(t){let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const n=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=hO({baseUrl:n,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=t.accessDelegation?.join(","),this.namespaceOps=new pO(this.client,e),this.tableOps=new mO(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
23async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function $o(t){"@babel/helpers - typeof";return $o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$o(t)}function yO(t,e){if($o(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if($o(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function vO(t){var e=yO(t,"string");return $o(e)=="symbol"?e:e+""}function bO(t,e,n){return(e=vO(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function ve(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wb(Object(n),!0).forEach(function(a){bO(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wb(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}var gu=class extends Error{constructor(t,e="storage",n,a){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=a}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function yu(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var Ch=class extends gu{constructor(t,e,n,a="storage"){super(t,a,e,n),this.name=a==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=n}toJSON(){return ve({},super.toJSON())}},cw=class extends gu{constructor(t,e,n="storage"){super(t,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function Zc(t,e,n){const a=ve({},t),o=e.toLowerCase();for(const l of Object.keys(a))l.toLowerCase()===o&&delete a[l];return a[o]=n,a}function _O(t){const e={};for(const[n,a]of Object.entries(t))e[n.toLowerCase()]=a;return e}const wO=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),SO=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},xh=t=>{if(Array.isArray(t))return t.map(n=>xh(n));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([n,a])=>{const o=n.replace(/([-_][a-z])/gi,l=>l.toUpperCase().replace(/[-_]/g,""));e[o]=xh(a)}),e},EO=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),Sb=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const n=e.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(t)},RO=async(t,e,n,a)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const o=t;let l=parseInt(String(o.status),10);Number.isFinite(l)||(l=500),o.json().then(u=>{const d=u?.statusCode||u?.code||l+"";e(new Ch(Sb(u),l,d,a))}).catch(()=>{const u=l+"";e(new Ch(o.statusText||`HTTP ${l} error`,l,u,a))})}else e(new cw(Sb(t),t,a))},TO=(t,e,n,a)=>{const o={method:t,headers:e?.headers||{}};if(t==="GET"||t==="HEAD"||!a)return ve(ve({},o),n);if(SO(a)){var l;const u=e?.headers||{};let d;for(const[h,m]of Object.entries(u))h.toLowerCase()==="content-type"&&(d=m);o.headers=Zc(u,"Content-Type",(l=d)!==null&&l!==void 0?l:"application/json"),o.body=JSON.stringify(a)}else o.body=a;return e?.duplex&&(o.duplex=e.duplex),ve(ve({},o),n)};async function _o(t,e,n,a,o,l,u){return new Promise((d,h)=>{t(n,TO(e,a,o,l)).then(m=>{if(!m.ok)throw m;if(a?.noResolveJson)return m;if(u==="vectors"){const g=m.headers.get("content-type");if(m.headers.get("content-length")==="0"||m.status===204)return{};if(!g||!g.includes("application/json"))return{}}return m.json()}).then(m=>d(m)).catch(m=>RO(m,h,a,u))})}function uw(t="storage"){return{get:async(e,n,a,o)=>_o(e,"GET",n,a,o,void 0,t),post:async(e,n,a,o,l)=>_o(e,"POST",n,o,l,a,t),put:async(e,n,a,o,l)=>_o(e,"PUT",n,o,l,a,t),head:async(e,n,a,o)=>_o(e,"HEAD",n,ve(ve({},a),{},{noResolveJson:!0}),o,void 0,t),remove:async(e,n,a,o,l)=>_o(e,"DELETE",n,o,l,a,t)}}const AO=uw("storage"),{get:zo,post:jn,put:kh,head:CO,remove:Bo}=AO,fn=uw("vectors");var pi=class{constructor(t,e={},n,a="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=_O(e),this.fetch=wO(n),this.namespace=a}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=Zc(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(n){if(e.shouldThrowOnError)throw n;if(yu(n))return{data:null,error:n};throw n}}};let dw;dw=Symbol.toStringTag;var xO=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[dw]="StreamDownloadBuilder",this.promise=null}
23then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(yu(e))return{data:null,error:e};throw e}}};let fw;fw=Symbol.toStringTag;var kO=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[fw]="BlobDownloadBuilder",this.promise=null}asStream(){return new xO(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(yu(e))return{data:null,error:e};throw e}}};const th={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Eb={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var OO=class extends pi{constructor(t,e={},n,a){super(t,e,a,"storage"),this.bucketId=n}async uploadOrUpdate(t,e,n,a){var o=this;return o.handleOperation(async()=>{let l;const u=ve(ve({},Eb),a);let d=ve(ve({},o.headers),t==="POST"&&{"x-upsert":String(u.upsert)});const h=u.metadata;if(typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),h&&l.append("metadata",o.encodeMetadata(h)),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.has("cacheControl")||l.append("cacheControl",u.cacheControl),h&&!l.has("metadata")&&l.append("metadata",o.encodeMetadata(h))):(l=n,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType,h&&(d["x-metadata"]=o.toBase64(o.encodeMetadata(h))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!u.duplex&&(u.duplex="half")),a?.headers)for(const[b,_]of Object.entries(a.headers))d=Zc(d,b,_);const m=o._removeEmptyFolders(e),g=o._getFinalPath(m),y=await(t=="PUT"?kh:jn)(o.fetch,`${o.url}/object/${g}`,l,ve({headers:d},u?.duplex?{duplex:u.duplex}:{}));return{path:m,id:y.Id,fullPath:y.Key}})}async upload(t,e,n){return this.uploadOrUpdate("POST",t,e,n)}async uploadToSignedUrl(t,e,n,a){var o=this;const l=o._removeEmptyFolders(t),u=o._getFinalPath(l),d=new URL(o.url+`/object/upload/sign/${u}`);return d.searchParams.set("token",e),o.handleOperation(async()=>{let h;const m=ve(ve({},Eb),a);let g=ve(ve({},o.headers),{"x-upsert":String(m.upsert)});const y=m.metadata;if(typeof Blob<"u"&&n instanceof Blob?(h=new FormData,h.append("cacheControl",m.cacheControl),y&&h.append("metadata",o.encodeMetadata(y)),h.append("",n)):typeof FormData<"u"&&n instanceof FormData?(h=n,h.has("cacheControl")||h.append("cacheControl",m.cacheControl),y&&!h.has("metadata")&&h.append("metadata",o.encodeMetadata(y))):(h=n,g["cache-control"]=`max-age=${m.cacheControl}`,g["content-type"]=m.contentType,y&&(g["x-metadata"]=o.toBase64(o.encodeMetadata(y))),(typeof ReadableStream<"u"&&h instanceof ReadableStream||h&&typeof h=="object"&&"pipe"in h&&typeof h.pipe=="function")&&!m.duplex&&(m.duplex="half")),a?.headers)for(const[b,_]of Object.entries(a.headers))g=Zc(g,b,_);return{path:l,fullPath:(await kh(o.fetch,d.toString(),h,ve({headers:g},m?.duplex?{duplex:m.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var n=this;return n.handleOperation(async()=>{let a=n._getFinalPath(t);const o=ve({},n.headers);e?.upsert&&(o["x-upsert"]="true");const l=await jn(n.fetch,`${n.url}/object/upload/sign/${a}`,{},{headers:o}),u=new URL(n.url+l.url),d=u.searchParams.get("token");if(!d)throw new gu("No token returned by API");return{signedUrl:u.toString(),path:t,token:d}})}async update(t,e,n){return this.uploadOrUpdate("PUT",t,e,n)}async move(t,e,n){var a=this;return a.handleOperation(async()=>await jn(a.fetch,`${a.url}/object/move`,{bucketId:a.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n?.destinationBucket},{headers:a.headers}))}async copy(t,e,n){var a=this;return a.handleOperation(async()=>({path:(await jn(a.fetch,`${a.url}/object/copy`,{bucketId:a.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n?.destinationBucket},{headers:a.headers})).Key}))}async createSignedUrl(t,e,n){var a=this;return a.handleOperation(async()=>{let o=a._getFinalPath(t);const l=typeof n?.transform=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let u=await jn(a.fetch,`${a.url}/object/sign/${o}
23`,ve({expiresIn:e},l?{transform:n.transform}:{}),{headers:a.headers});const d=new URLSearchParams;n?.download&&d.set("download",n.download===!0?"":n.download),n?.cacheNonce!=null&&d.set("cacheNonce",String(n.cacheNonce));const h=d.toString();return{signedUrl:encodeURI(`${a.url}${u.signedURL}${h?`&${h}`:""}`)}})}async createSignedUrls(t,e,n){var a=this;return a.handleOperation(async()=>{const o=await jn(a.fetch,`${a.url}/object/sign/${a.bucketId}`,{expiresIn:e,paths:t},{headers:a.headers}),l=new URLSearchParams;n?.download&&l.set("download",n.download===!0?"":n.download),n?.cacheNonce!=null&&l.set("cacheNonce",String(n.cacheNonce));const u=l.toString();return o.map(d=>ve(ve({},d),{},{signedUrl:d.signedURL?encodeURI(`${a.url}${d.signedURL}${u?`&${u}`:""}`):null}))})}download(t,e,n){const a=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",o=new URLSearchParams;e?.transform&&this.applyTransformOptsToQuery(o,e.transform),e?.cacheNonce!=null&&o.set("cacheNonce",String(e.cacheNonce));const l=o.toString(),u=this._getFinalPath(t),d=()=>zo(this.fetch,`${this.url}/${a}/${u}${l?`?${l}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new kO(d,this.shouldThrowOnError)}async info(t){var e=this;const n=e._getFinalPath(t);return e.handleOperation(async()=>xh(await zo(e.fetch,`${e.url}/object/info/${n}`,{headers:e.headers})))}async exists(t){var e=this;const n=e._getFinalPath(t);try{return await CO(e.fetch,`${e.url}/object/${n}`,{headers:e.headers}),{data:!0,error:null}}catch(o){if(e.shouldThrowOnError)throw o;if(yu(o)){var a;const l=o instanceof Ch?o.status:o instanceof cw?(a=o.originalError)===null||a===void 0?void 0:a.status:void 0;if(l!==void 0&&[400,404].includes(l))return{data:!1,error:o}}throw o}}getPublicUrl(t,e){const n=this._getFinalPath(t),a=new URLSearchParams;e?.download&&a.set("download",e.download===!0?"":e.download),e?.transform&&this.applyTransformOptsToQuery(a,e.transform),e?.cacheNonce!=null&&a.set("cacheNonce",String(e.cacheNonce));const o=a.toString(),l=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${l}/public/${n}`)+(o?`?${o}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await Bo(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async purgeCache(t,e,n){var a=this;return a.handleOperation(async()=>{const o=a._getFinalPath(t),l=new URLSearchParams;e?.transformations&&l.set("transformations","true");const u=l.toString();return await Bo(a.fetch,`${a.url}/cdn/${o}${u?`?${u}`:""}`,{},{headers:a.headers},n)})}async list(t,e,n){var a=this;return a.handleOperation(async()=>{const o=e?.sortBy?ve(ve({},th.sortBy),e.sortBy):th.sortBy,l=ve(ve(ve({},th),e),{},{sortBy:o,prefix:t||""});return await jn(a.fetch,`${a.url}/object/list/${a.bucketId}`,l,{headers:a.headers},n)})}async listV2(t,e){var n=this;return n.handleOperation(async()=>{const a=ve({},t);return await jn(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,a,{headers:n.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("quality",e.quality.toString()),t}};const LO="2.110.1",Qo={"X-Client-Info":`storage-js/${LO}`};var NO=class extends pi{constructor(t,e={},n,a){const o=new URL(t);a?.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase."));const l=o.href.replace(/\/$/,""),u=ve(ve({},Qo),e);super(l,u,n,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=e.listBucketOptionsToQueryString(t);return await zo(e.fetch,`${e.url}/bucket${n}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await zo(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var n=this;return n.handleOperation(async()=>await jn(n.fetch,`${n.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async updateBucket(t,e){var n=this;return n.handleOperation(async()=>await kh(n.fetch,`${n.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await jn(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Bo(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}async purgeBucketCache(t,e,n){var a=this;return a.handleOperation(async()=>{const o=new URLSearchParams;e?.transformations&&o.set("transformations","true");const l=o.toString();return await Bo(a.fetch,`${a.url}/cdn/${t}${l?`?${l}`:""}`,{},{headers:a.headers},n)})}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},jO=class extends pi{constructor(t,e={},n){const a=t.replace(/\/$/,""),o=ve(ve({},Qo),e);super(a,o,n,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await jn(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=new URLSearchParams;t?.limit!==void 0&&n.set("limit",t.limit.toString()),t?.offset!==void 0&&n.set("offset",t.offset.toString()),t?.sortColumn&&n.set("sortColumn",t.sortColumn),t?.sortOrder&&n.set("sortOrder",t.sortOrder),t?.search&&n.set("search",t.search);const a=n.toString(),o=a?`${e.url}/bucket?${a}`:`${e.url}/bucket`;return await zo(e.fetch,o,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Bo(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!EO(t))throw new gu("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new gO({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),a=this.shouldThrowOnError;return new Proxy(n,{get(o,l){const u=o[l];return typeof u!="function"?u:async(...d)=>{try{return{data:await u.apply(o,d),error:null}}catch(h){if(a)throw h;return{data:null,error:h}}}}})}},PO=class extends pi{constructor(t,e={},n){const a=t.replace(/\/$/,""),o=ve(ve({},Qo),{},{"Content-Type":"application/json"},e);super(a,o,n,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var n=this;return n.handleOperation(async()=>await fn.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var n=this;return n.handleOperation(async()=>await fn.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers})||{})}},MO=class extends pi{constructor(t,e={},n){const a=t.replace(/\/$/,""),o=ve(ve({},Qo),{},{"Content-Type":"application/json"},e);super(a,o,n,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
23if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},DO=class extends pi{constructor(t,e={},n){const a=t.replace(/\/$/,""),o=ve(ve({},Qo),{},{"Content-Type":"application/json"},e);super(a,o,n,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await fn.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},IO=class extends DO{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new UO(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,n=this;return e().call(n,t)}async getBucket(t){var e=()=>super.getBucket,n=this;return e().call(n,t)}async listBuckets(t={}){var e=()=>super.listBuckets,n=this;return e().call(n,t)}async deleteBucket(t){var e=()=>super.deleteBucket,n=this;return e().call(n,t)}},UO=class extends PO{constructor(t,e,n,a){super(t,e,a),this.vectorBucketName=n}async createIndex(t){var e=()=>super.createIndex,n=this;return e().call(n,ve(ve({},t),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,n=this;return e().call(n,ve(ve({},t),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,n=this;return e().call(n,n.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,n=this;return e().call(n,n.vectorBucketName,t)}index(t){return new $O(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},$O=class extends MO{constructor(t,e,n,a,o){super(t,e,o),this.vectorBucketName=n,this.indexName=a}async putVectors(t){var e=()=>super.putVectors,n=this;return e().call(n,ve(ve({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(t){var e=()=>super.getVectors,n=this;return e().call(n,ve(ve({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,n=this;return e().call(n,ve(ve({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,n=this;return e().call(n,ve(ve({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,n=this;return e().call(n,ve(ve({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},zO=class extends NO{constructor(t,e={},n,a){super(t,e,n,a)}from(t){return new OO(this.url,this.headers,t,this.fetch)}get vectors(){return new IO(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new jO(this.url+"/iceberg",this.headers,this.fetch)}};const hw="2.110.1",br=30*1e3,To=3,nh=To*br,BO=2*br,qO="http://localhost:9999",HO="supabase.auth.token",VO={"X-Client-Info":`gotrue-js/${hw}`},Oh="X-Supabase-Api-Version",pw={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},GO=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,FO=600*1e3;class qo extends Error{constructor(e,n,a){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function te(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class KO extends qo{constructor(e,n,a){super(e,n,a),this.name="AuthApiError",this.status=n,this.code=a}}function YO(t){return te(t)&&t.name==="AuthApiError"}class Mn extends qo{constructor(e,n){super(e),this.name="AuthUnknownError",this.originalError=n}}class Kn extends qo{constructor(e,n,a,o){super(e,a,o),this.name=n,this.status=a}}class At extends Kn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Ac(t){return te(t)&&t.name==="AuthSessionMissingError"}class Fa extends Kn{constructor(){super("Auth session or user missing","AuthInvalidToken
23ResponseError",500,void 0)}}class Cc extends Kn{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class xc extends Kn{constructor(e,n=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function ZO(t){return te(t)&&t.name==="AuthImplicitGrantRedirectError"}class Rb extends Kn{constructor(e,n=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class JO extends Kn{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 Lh extends Kn{constructor(e,n){super(e,"AuthRetryableFetchError",n,void 0)}}function Tb(t){return te(t)&&t.name==="AuthRetryableFetchError"}class Ab extends Kn{constructor(e="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(e,"AuthRefreshDiscardedError",409,void 0)}}function QO(t){return te(t)&&t.name==="AuthRefreshDiscardedError"}class Cb extends Kn{constructor(e,n,a){super(e,"AuthWeakPasswordError",n,"weak_password"),this.reasons=a}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Jc extends Kn{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Qc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),xb=` 24\r=`.split(""),XO=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<xb.length;e+=1)t[xb[e].charCodeAt(0)]=-2;for(let e=0;e<Qc.length;e+=1)t[Qc[e].charCodeAt(0)]=e;return t})();function kb(t,e,n){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const a=e.queue>>e.queuedBits-6&63;n(Qc[a]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const a=e.queue>>e.queuedBits-6&63;n(Qc[a]),e.queuedBits-=6}}function mw(t,e,n){const a=XO[t];if(a>-1)for(e.queue=e.queue<<6|a,e.queuedBits+=6;e.queuedBits>=8;)n(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(a===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function Ob(t){const e=[],n=u=>{e.push(String.fromCodePoint(u))},a={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},l=u=>{tL(u,a,n)};for(let u=0;u<t.length;u+=1)mw(t.charCodeAt(u),o,l);return e.join("")}function WO(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function eL(t,e){for(let n=0;n<t.length;n+=1){let a=t.charCodeAt(n);if(a>55295&&a<=56319){const o=(a-55296)*1024&65535;a=(t.charCodeAt(n+1)-56320&65535|o)+65536,n+=1}WO(a,e)}}function tL(t,e,n){if(e.utf8seq===0){if(t<=127){n(t);return}for(let a=1;a<6;a+=1)if((t>>7-a&1)===0){e.utf8seq=a;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&n(e.codepoint)}}function si(t){const e=[],n={queue:0,queuedBits:0},a=o=>{e.push(o)};for(let o=0;o<t.length;o+=1)mw(t.charCodeAt(o),n,a);return new Uint8Array(e)}function nL(t){const e=[];return eL(t,n=>e.push(n)),new Uint8Array(e)}function Ks(t){const e=[],n={queue:0,queuedBits:0},a=o=>{e.push(o)};return t.forEach(o=>kb(o,n,a)),kb(null,n,a),e.join("")}function rL(t){return Math.round(Date.now()/1e3)+t}function sL(){return Symbol("auth-callback")}const Ut=()=>typeof window<"u"&&typeof document<"u",$s={tested:!1,writable:!1},gw=()=>
24{if(!Ut())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if($s.tested)return $s.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),$s.tested=!0,$s.writable=!0}catch{$s.tested=!0,$s.writable=!1}return $s.writable};function aL(t){const e={},n=new URL(t);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((o,l)=>{e[l]=o})}catch{}return n.searchParams.forEach((a,o)=>{e[o]=a}),e}const yw=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),iL=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Qa=async(t,e,n)=>{await t.setItem(e,JSON.stringify(n))},Ln=async(t,e)=>{const n=await t.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return null}},ft=async(t,e)=>{await t.removeItem(e)};class vu{constructor(){this.promise=new vu.promiseConstructor((e,n)=>{this.resolve=e,this.reject=n})}}vu.promiseConstructor=Promise;function kc(t){const e=t.split(".");if(e.length!==3)throw new Jc("Invalid JWT structure");for(let a=0;a<e.length;a++)if(!GO.test(e[a]))throw new Jc("JWT not in base64url format");return{header:JSON.parse(Ob(e[0])),payload:JSON.parse(Ob(e[1])),signature:si(e[2]),raw:{header:e[0],payload:e[1]}}}async function oL(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function lL(t,e){return new Promise((a,o)=>{(async()=>{for(let l=0;l<1/0;l++)try{const u=await t(l);if(!e(l,null,u)){a(u);return}}catch(u){if(!e(l,u)){o(u);return}}})()})}function cL(t){return("0"+t.toString(16)).substr(-2)}function uL(){const e=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",a=n.length;let o="";for(let l=0;l<56;l++)o+=n.charAt(Math.floor(Math.random()*a));return o}return crypto.getRandomValues(e),Array.from(e,cL).join("")}async function dL(t){const n=new TextEncoder().encode(t),a=await crypto.subtle.digest("SHA-256",n),o=new Uint8Array(a);return Array.from(o).map(l=>String.fromCharCode(l)).join("")}async function fL(t){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."),t;const n=await dL(t);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function zs(t,e,n=!1){const a=uL();let o=a;n&&(o+="/recovery"),await Qa(t,`${e}-code-verifier`,o);const l=await fL(a);return[l,a===l?"plain":"s256"]}const hL=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function pL(t){const e=t.headers.get(Oh);if(!e||!e.match(hL))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function mL(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function gL(t){switch(t){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 yL=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function mr(t){if(!yL.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Nn(t){if(!t.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 rh(){const t={};return new Proxy(t,{get:(e,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const a=n.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function vL(t,e){return new Proxy(t,{get:(n,a,o)=>
24{if(a==="__isInsecureUserWarningProxy")return!0;if(typeof a=="symbol"){const l=a.toString();if(l==="Symbol(Symbol.toPrimitive)"||l==="Symbol(Symbol.toStringTag)"||l==="Symbol(util.inspect.custom)"||l==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,a,o)}return!e.value&&typeof a=="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."),e.value=!0),Reflect.get(n,a,o)}})}function Lb(t){return JSON.parse(JSON.stringify(t))}const qs=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},bL=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function Nb(t){var e;if(!iL(t))throw new Lh(qs(t),0);if(bL.includes(t.status))throw new Lh(qs(t),t.status);let n;try{n=await t.json()}catch(l){throw new Mn(qs(l),l)}let a;const o=pL(t);if(o&&o.getTime()>=pw["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?a=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(a=n.error_code),a){if(a==="weak_password")throw new Cb(qs(n),t.status,((e=n.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(a==="session_not_found")throw new At}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((l,u)=>l&&typeof u=="string",!0))throw new Cb(qs(n),t.status,n.weak_password.reasons);throw new KO(qs(n),t.status||500,a)}const _L=(t,e,n,a)=>{const o={method:t,headers:e?.headers||{}};return t==="GET"?o:(o.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e?.headers),o.body=JSON.stringify(a),Object.assign(Object.assign({},o),n))};async function ce(t,e,n,a){var o;const l=Object.assign({},a?.headers);l[Oh]||(l[Oh]=pw["2024-01-01"].name),a?.jwt&&(l.Authorization=`Bearer ${a.jwt}`);const u=(o=a?.query)!==null&&o!==void 0?o:{};a?.redirectTo&&(u.redirect_to=a.redirectTo);const d=Object.keys(u).length?"?"+new URLSearchParams(u).toString():"",h=await wL(t,e,n+d,{headers:l,noResolveJson:a?.noResolveJson},{},a?.body);return a?.xform?a?.xform(h):{data:Object.assign({},h),error:null}}async function wL(t,e,n,a,o,l){const u=_L(e,a,o,l);let d;try{d=await t(n,Object.assign({},u))}catch(h){throw console.error(h),new Lh(qs(h),0)}if(d.ok||await Nb(d),a?.noResolveJson)return d;try{return await d.json()}catch(h){await Nb(h)}}function Tn(t){var e;let n=null;RL(t)&&(n=Object.assign({},t),t.expires_at||(n.expires_at=rL(t.expires_in)));const a=(e=t.user)!==null&&e!==void 0?e:typeof t?.id=="string"?t:null;return{data:{session:n,user:a},error:null}}function jb(t){const e=Tn(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((n,a)=>n&&typeof a=="string",!0)&&(e.data.weak_password=t.weak_password),e}function as(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function SL(t){return{data:t,error:null}}function EL(t){const{action_link:e,email_otp:n,hashed_token:a,redirect_to:o,verification_type:l}=t,u=mu(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),d={action_link:e,email_otp:n,hashed_token:a,redirect_to:o,verification_type:l},h=Object.assign({},u);return{data:{properties:d,user:h},error:null}}function Pb(t){return t}function RL(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const sh=["global","local","others"];class TL{constructor({url:e="",headers:n={},fetch:a,experimental:o}){this.url=e,this.headers=n,this.fetch=yw(a),this.experimental=o??{},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)}}
24async signOut(e,n=sh[0]){if(sh.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${sh.join(", ")}`);try{return await ce(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(a){if(te(a))return{data:null,error:a};throw a}}async inviteUserByEmail(e,n={}){try{return await ce(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:as})}catch(a){if(te(a))return{data:{user:null},error:a};throw a}}async generateLink(e){try{const{options:n}=e,a=mu(e,["options"]),o=Object.assign(Object.assign({},a),n);return"newEmail"in a&&(o.new_email=a?.newEmail,delete o.newEmail),await ce(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:EL,redirectTo:n?.redirectTo})}catch(n){if(te(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(e){try{return await ce(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:as})}catch(n){if(te(n))return{data:{user:null},error:n};throw n}}async listUsers(e){var n,a,o,l,u,d,h;try{const m={nextPage:null,lastPage:0,total:0},g=await ce(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(n=e?.page)===null||n===void 0?void 0:n.toString())!==null&&a!==void 0?a:"",per_page:(l=(o=e?.perPage)===null||o===void 0?void 0:o.toString())!==null&&l!==void 0?l:""},xform:Pb});if(g.error)throw g.error;const y=await g.json(),b=(u=g.headers.get("x-total-count"))!==null&&u!==void 0?u:0,_=(h=(d=g.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&h!==void 0?h:[];return _.length>0&&(_.forEach(S=>{const R=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(S.split(";")[1].split("=")[1]);m[`${E}Page`]=R}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},y),m),error:null}}catch(m){if(te(m))return{data:{users:[]},error:m};throw m}}async getUserById(e){mr(e);try{return await ce(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:as})}catch(n){if(te(n))return{data:{user:null},error:n};throw n}}async updateUserById(e,n){mr(e);try{return await ce(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:n,headers:this.headers,xform:as})}catch(a){if(te(a))return{data:{user:null},error:a};throw a}}async deleteUser(e,n=!1){mr(e);try{return await ce(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:n},xform:as})}catch(a){if(te(a))return{data:{user:null},error:a};throw a}}async _listFactors(e){mr(e.userId);try{const{data:n,error:a}=await ce(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:n,error:a}}catch(n){if(te(n))return{data:null,error:n};throw n}}async _deleteFactor(e){mr(e.userId),mr(e.id);try{return{data:await ce(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(n){if(te(n))return{data:null,error:n};throw n}}async _listOAuthClients(e){var n,a,o,l,u,d,h;try{const m={nextPage:null,lastPage:0,total:0},g=await ce(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(n=e?.page)===null||n===void 0?void 0:n.toString())!==null&&a!==void 0?a:"",per_page:(l=(o=e?.perPage)===null||o===void 0?void 0:o.toString())!==null&&l!==void 0?l:""},xform:Pb});if(g.error)throw g.error;const y=await g.json(),b=(u=g.headers.get("x-total-count"))!==null&&u!==void 0?u:0,_=(h=(d=g.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&h!==void 0?h:[];return _.length>0&&(_.forEach(S=>{const R=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(S.split(";")[1].split("=")[1]);m[`${E}Page`]=R}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},y),m),error:null}}catch(m){if(te(m))return{data:{clients:[]},error:m};throw m}}async _createOAuthClient(e){try{return await ce(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(te(n))return{data:null,error:n};throw n}}async _getOAuthClient(e){try{return await ce(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(te(n))return{data:null,error:n};throw n}}async _updateOAuthClient(e,n){try{return await ce(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:n,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(te(a))return{data:null,error:a};throw a}}async _deleteOAuthClient(e){try{return await ce(this.fetch,"DELET
24E",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(te(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(e){try{return await ce(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(te(n))return{data:null,error:n};throw n}}async _listCustomProviders(e){try{const n={};return e?.type&&(n.type=e.type),await ce(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:a=>{var o;return{data:{providers:(o=a?.providers)!==null&&o!==void 0?o:[]},error:null}}})}catch(n){if(te(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(e){try{return await ce(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(te(n))return{data:null,error:n};throw n}}async _getCustomProvider(e){try{return await ce(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(te(n))return{data:null,error:n};throw n}}async _updateCustomProvider(e,n){try{return await ce(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:n,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(te(a))return{data:null,error:a};throw a}}async _deleteCustomProvider(e){try{return await ce(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(te(n))return{data:null,error:n};throw n}}async _adminListPasskeys(e){Nn(this.experimental),mr(e.userId);try{return await ce(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(te(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(e){Nn(this.experimental),mr(e.userId),mr(e.passkeyId);try{return await ce(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(te(n))return{data:null,error:n};throw n}}}function Mb(t={}){return{getItem:e=>t[e]||null,setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}}globalThis&&gw()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class AL extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}function CL(){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 vw(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function xL(t){return parseInt(t,16)}function kL(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,a=>a.toString(16).padStart(2,"0")).join("")}function OL(t){var e;const{chainId:n,domain:a,expirationTime:o,issuedAt:l=new Date,nonce:u,notBefore:d,requestId:h,resources:m,scheme:g,uri:y,version:b}=t;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!a)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(u&&u.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${u}`);if(!y)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(b!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${b}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 25`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const _=vw(t.address),S=g?`${g}://${a}`:a,R=t.statement?`${t.statement} 26`:"",E=`${S} wants you to sign in with your Ethereum account: 27${_} 28 29${R}`;
29let T=`URI: ${y} 30Version: ${b} 31Chain ID: ${n}${u?` 32Nonce: ${u}`:""} 33Issued At: ${l.toISOString()}`;if(o&&(T+=` 34Expiration Time: ${o.toISOString()}`),d&&(T+=` 35Not Before: ${d.toISOString()}`),h&&(T+=` 36Request ID: ${h}`),m){let C=` 37Resources:`;for(const k of m){if(!k||typeof k!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${k}`);C+=` 38- ${k}`}T+=C}return`${E} 39${T}`}class vt extends Error{constructor({message:e,code:n,cause:a,name:o}){var l;super(e,{cause:a}),this.__isWebAuthnError=!0,this.name=(l=o??(a instanceof Error?a.name:void 0))!==null&&l!==void 0?l:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Xc extends vt{constructor(e,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:e}),this.name="WebAuthnUnknownError",this.originalError=n}}function LL({error:t,options:e}){var n,a,o;const{publicKey:l}=e;if(!l)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new vt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((n=l.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new vt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((a=l.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new vt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((o=l.authenticatorSelection)===null||o===void 0?void 0:o.userVerification)==="required")return new vt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new vt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new vt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return l.pubKeyCredParams.filter(d=>d.type==="public-key").length===0?new vt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new vt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const u=window.location.hostname;if(bw(u)){if(l.rp.id!==u)return new vt({message:`The RP ID "${l.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new vt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(l.user.id.byteLength<1||l.user.id.byteLength>64)return new vt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new vt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new vt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function NL({error:t,options:e}){const{publicKey:n}=e;if(!n)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new vt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new vt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const a=window.location.hostname;if(bw(a)){if(n.rpId!==a)return new vt({message:`The RP ID "${n.rpId}
39" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new vt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new vt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new vt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class jL{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const Nh=new jL;function Db(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:n,excludeCredentials:a}=t,o=mu(t,["challenge","user","excludeCredentials"]),l=si(e).buffer,u=Object.assign(Object.assign({},n),{id:si(n.id).buffer}),d=Object.assign(Object.assign({},o),{challenge:l,user:u});if(a&&a.length>0){d.excludeCredentials=new Array(a.length);for(let h=0;h<a.length;h++){const m=a[h];d.excludeCredentials[h]=Object.assign(Object.assign({},m),{id:si(m.id).buffer,type:m.type||"public-key",transports:m.transports})}}return d}function Ib(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:n}=t,a=mu(t,["challenge","allowCredentials"]),o=si(e).buffer,l=Object.assign(Object.assign({},a),{challenge:o});if(n&&n.length>0){l.allowCredentials=new Array(n.length);for(let u=0;u<n.length;u++){const d=n[u];l.allowCredentials[u]=Object.assign(Object.assign({},d),{id:si(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return l}function Ub(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t;return{id:t.id,rawId:t.id,response:{attestationObject:Ks(new Uint8Array(t.response.attestationObject)),clientDataJSON:Ks(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function $b(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t,a=t.getClientExtensionResults(),o=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Ks(new Uint8Array(o.authenticatorData)),clientDataJSON:Ks(new Uint8Array(o.clientDataJSON)),signature:Ks(new Uint8Array(o.signature)),userHandle:o.userHandle?Ks(new Uint8Array(o.userHandle)):void 0},type:"public-key",clientExtensionResults:a,authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function bw(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function Wc(){var t,e;return!!(Ut()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.get)=="function")}async function _w(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Xc("Browser returned unexpected credential type",e)}:{data:null,error:new Xc("Empty credential response",e)}}catch(e){return{data:null,error:LL({error:e,options:t})}}}async function ww(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Xc("Browser returned unexpected credential type",e)}:{data:null,error:new Xc("Empty credential response",e)}}catch(e){return{data:null,error:NL({error:e,options:t})}}}const PL={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},ML={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function eu(...t){const e=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),n=o=>o instanceof ArrayBuffer||ArrayBuffer.isView(o),a={};
39for(const o of t)if(o)for(const l in o){const u=o[l];if(u!==void 0)if(Array.isArray(u))a[l]=u;else if(n(u))a[l]=u;else if(e(u)){const d=a[l];e(d)?a[l]=eu(d,u):a[l]=eu(u)}else a[l]=u}return a}function DL(t,e){return eu(PL,t,e||{})}function IL(t,e){return eu(ML,t,e||{})}class UL{constructor(e){this.client=e,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(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:n,friendlyName:a,signal:o},l){var u;try{const{data:d,error:h}=await this.client.mfa.challenge({factorId:e,webauthn:n});if(!d)return{data:null,error:h};const m=o??Nh.createNewAbortSignal();if(d.webauthn.type==="create"){const{user:g}=d.webauthn.credential_options.publicKey;if(!g.name){const y=a;if(y)g.name=`${g.id}:${y}`;else{const _=(await this.client.getUser()).data.user,S=((u=_?.user_metadata)===null||u===void 0?void 0:u.name)||_?.email||_?.id||"User";g.name=`${g.id}:${S}`}}g.displayName||(g.displayName=g.name)}switch(d.webauthn.type){case"create":{const g=DL(d.webauthn.credential_options.publicKey,l?.create),{data:y,error:b}=await _w({publicKey:g,signal:m});return y?{data:{factorId:e,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:y}},error:null}:{data:null,error:b}}case"request":{const g=IL(d.webauthn.credential_options.publicKey,l?.request),{data:y,error:b}=await ww(Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:g,signal:m}));return y?{data:{factorId:e,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:y}},error:null}:{data:null,error:b}}}}catch(d){return te(d)?{data:null,error:d}:{data:null,error:new Mn("Unexpected error in challenge",d)}}}async _verify({challengeId:e,factorId:n,webauthn:a}){return this.client.mfa.verify({factorId:n,challengeId:e,webauthn:a})}async _authenticate({factorId:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},l){if(!n)return{data:null,error:new qo("rpId is required for WebAuthn authentication")};try{if(!Wc())return{data:null,error:new Mn("Browser does not support WebAuthn",null)};const{data:u,error:d}=await this.challenge({factorId:e,webauthn:{rpId:n,rpOrigins:a},signal:o},{request:l});if(!u)return{data:null,error:d};const{webauthn:h}=u;return this._verify({factorId:e,challengeId:u.challengeId,webauthn:{type:h.type,rpId:n,rpOrigins:a,credential_response:h.credential_response}})}catch(u){return te(u)?{data:null,error:u}:{data:null,error:new Mn("Unexpected error in authenticate",u)}}}async _register({friendlyName:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},l){if(!n)return{data:null,error:new qo("rpId is required for WebAuthn registration")};try{if(!Wc())return{data:null,error:new Mn("Browser does not support WebAuthn",null)};const{data:u,error:d}=await this._enroll({friendlyName:e});if(!u)return await this.client.mfa.listFactors().then(g=>{var y;return(y=g.data)===null||y===void 0?void 0:y.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===e&&b.status!=="unverified")}).then(g=>g?this.client.mfa.unenroll({factorId:g?.id}):void 0),{data:null,error:d};const{data:h,error:m}=await this._challenge({factorId:u.id,friendlyName:u.friendly_name,webauthn:{rpId:n,rpOrigins:a},signal:o},{create:l});return h?this._verify({factorId:u.id,challengeId:h.challengeId,webauthn:{rpId:n,rpOrigins:a,type:h.webauthn.type,credential_response:h.webauthn.credential_response}}):{data:null,error:m}}catch(u){return te(u)?{data:null,error:u}:{data:null,error:new Mn("Unexpected error in register",u)}}}}CL();const $L={url:qO,storageKey:HO,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:VO,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Ka={};class Ho{get jwks(){var e,n;return(n=(e=Ka[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(e){Ka[this.storageKey]=Object.assign(Object.assign({},Ka[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,n;return(n=(e=Ka[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Ka[this.storageKey]=Object.assign(Object.assign({},Ka[this.storageKey]),{cachedAt:e})}constructor(e){var n,a,o;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._pendingInitNotifications=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 l=Object.assign(Object.assign({},$L),e);if(this.storageKey=l.storageKey,this.instanceID=(n=Ho.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Ho.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!l.debug,typeof l.debug=="function"&&(this.logger=l.debug),this.instanceID>0&&Ut()){const u=`${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(u),this.logDebugMessages&&console.trace(u)}if(this.persistSession=l.persistSession,this.autoRefreshToken=l.autoRefreshToken,this.experimental=(a=l.experimental)!==null&&a!==void 0?a:{},this.admin=new TL({url:l.url,headers:l.headers,fetch:l.fetch,experimental:this.experimental}),this.url=l.url,this.headers=l.headers,this.fetch=yw(l.fetch),this.detectSessionInUrl=l.detectSessionInUrl,this.flowType=l.flowType,this.hasCustomAuthorizationHeader=l.hasCu
39stomAuthorizationHeader,this.throwOnError=l.throwOnError,this.lockAcquireTimeout=l.lockAcquireTimeout,l.lock!=null&&(this.lock=l.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 UL(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?(l.storage?this.storage=l.storage:gw()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Mb(this.memoryStorage)),l.userStorage&&(this.userStorage=l.userStorage)):(this.memoryStorage={},this.storage=Mb(this.memoryStorage)),Ut()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(u){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",u)}(o=this.broadcastChannel)===null||o===void 0||o.addEventListener("message",async u=>{this._debug("received broadcast notification from other tab or client",u),(u.data.event==="TOKEN_REFRESHED"||u.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(u.data.event,u.data.session,!1)}catch(d){this._debug("#broadcastChannel","error",d)}})}l.skipAutoInitialize||this.initialize().catch(u=>{this._debug("#initialize()","error",u)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${hw}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){var e;if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())();const n=await this.initializePromise,a=(e=this._pendingInitNotifications)!==null&&e!==void 0?e:[];this._pendingInitNotifications=null;for(const o of a)await this._notifyAllSubscribers(o.event,o.session,o.broadcast);return n}async _initialize(){var e;try{let n={},a="none";if(Ut()&&(n=aL(window.location.href),this._isImplicitGrantCallback(n)?a="implicit":await this._isPKCECallback(n)&&(a="pkce")),Ut()&&this.detectSessionInUrl&&a!=="none"){const{data:o,error:l}=await this._getSessionFromURL(n,a);if(l){if(this._debug("#_initialize()","error detecting session from URL",l),ZO(l)){const h=(e=l.details)===null||e===void 0?void 0:e.code;if(h==="identity_already_exists"||h==="identity_not_found"||h==="single_identity_not_deletable")return{error:l}}return{error:l}}const{session:u,redirectType:d}=o;return this._debug("#_initialize()","detected session in URL",u,"redirect type",d),await this._saveSession(u),setTimeout(async()=>{d==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",u):await this._notifyAllSubscribers("SIGNED_IN",u)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return te(n)?this._returnResult({error:n}):this._returnResult({error:new Mn("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var n,a,o;try{const l=await ce(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(a=(n=e?.options)===null||n===void 0?void 0:n.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:(o=e?.options)===null||o===void 0?void 0:o.captchaToken}},xform:Tn}),{data:u,error:d}=l;if(d||!u)return this._returnResult({data:{user:null,session:null},error:d});const h=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",h)),this._returnResult({data:{user:m,session:h},error:null})}catch(l){if(te(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signUp(e){var n,a,o;try{let l;if("email"in e){const{email:g,password:y,options:b}=e;let _=null,S=null;this.flowType==="pkce"&&([_,S]=await zs(this.storage,this.storageKey)),l=await ce(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:g,password:y,data:(n=b?.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:_,code_challenge_method:S},xform:Tn})}else if("phone"in e){const{phone:g,password:y,options:b}=e;l=await ce(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:g,password:y,data:(a=b?.data)!==null&&a!==void 0?a:{},channel:(o=b?.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:Tn})}else throw new Cc("You must provide either an email or phone number and a password");const{data:u,error:d}=l;if(d||!u)return await ft(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:d});const h=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",h)),this._returnResult({data:{user:m,session:h},error:null})}catch(l){if(await ft(this.storage,`${this.storageKey}-code-verifier`),te(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signInWithPassword(e){try{let n;if("email"in e){const{email:l,password:u,options:d}=e;n=await ce(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:l,password:u,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:jb})}else if("phone"in e){const{phone:l,password:u,options:d}=e;n=await ce(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:l,password:u,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:jb})}else throw new Cc("You must provide either an email or phone number and a password");const{data:a,error:o}=n;
39if(o)return this._returnResult({data:{user:null,session:null},error:o});if(!a||!a.session||!a.user){const l=new Fa;return this._returnResult({data:{user:null,session:null},error:l})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:Object.assign({user:a.user,session:a.session},a.weak_password?{weakPassword:a.weak_password}:null),error:o})}catch(n){if(te(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(e){var n,a,o,l;return await this._handleProviderSignIn(e.provider,{redirectTo:(n=e.options)===null||n===void 0?void 0:n.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(o=e.options)===null||o===void 0?void 0:o.queryParams,skipBrowserRedirect:(l=e.options)===null||l===void 0?void 0:l.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e)):this._exchangeCodeForSession(e)}async signInWithWeb3(e){const{chain:n}=e;switch(n){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(e){var n,a,o,l,u,d,h,m,g,y,b;let _,S;if("message"in e)_=e.message,S=e.signature;else{const{chain:R,wallet:E,statement:T,options:C}=e;let k;if(Ut())if(typeof E=="object")k=E;else{const K=window;if("ethereum"in K&&typeof K.ethereum=="object"&&"request"in K.ethereum&&typeof K.ethereum.request=="function")k=K.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 E!="object"||!C?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");k=E}const N=new URL((n=C?.url)!==null&&n!==void 0?n:window.location.href),F=await k.request({method:"eth_requestAccounts"}).then(K=>K).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!F||F.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const V=vw(F[0]);let z=(a=C?.signInWithEthereum)===null||a===void 0?void 0:a.chainId;if(!z){const K=await k.request({method:"eth_chainId"});z=xL(K)}const M={domain:N.host,address:V,statement:T,uri:N.href,version:"1",chainId:z,nonce:(o=C?.signInWithEthereum)===null||o===void 0?void 0:o.nonce,issuedAt:(u=(l=C?.signInWithEthereum)===null||l===void 0?void 0:l.issuedAt)!==null&&u!==void 0?u:new Date,expirationTime:(d=C?.signInWithEthereum)===null||d===void 0?void 0:d.expirationTime,notBefore:(h=C?.signInWithEthereum)===null||h===void 0?void 0:h.notBefore,requestId:(m=C?.signInWithEthereum)===null||m===void 0?void 0:m.requestId,resources:(g=C?.signInWithEthereum)===null||g===void 0?void 0:g.resources};_=OL(M),S=await k.request({method:"personal_sign",params:[kL(_),V]})}try{const{data:R,error:E}=await ce(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:S},!((y=e.options)===null||y===void 0)&&y.captchaToken?{gotrue_meta_security:{captcha_token:(b=e.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:Tn});if(E)throw E;if(!R||!R.session||!R.user){const T=new Fa;return this._returnResult({data:{user:null,session:null},error:T})}return R.session&&(await this._saveSession(R.session),await this._notifyAllSubscribers("SIGNED_IN",R.session)),this._returnResult({data:Object.assign({},R),error:E})}catch(R){if(te(R))return this._returnResult({data:{user:null,session:null},error:R});throw R}}async signInWithSolana(e){var n,a,o,l,u,d,h,m,g,y,b,_;let S,R;if("message"in e)S=e.message,R=e.signature;else{const{chain:E,wallet:T,statement:C,options:k}=e;let N;if(Ut())if(typeof T=="object")N=T;else{const V=window;if("solana"in V&&typeof V.solana=="object"&&("signIn"in V.solana&&typeof V.solana.signIn=="function"||"signMessage"in V.solana&&typeof V.solana.signMessage=="function"))N=V.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 T!="object"||!k?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");N=T}const F=new URL((n=k?.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in N&&N.signIn){const V=await N.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},k?.signInWithSolana),{version:"1",domain:F.host,uri:F.href}),C?{statement:C}:null));let z;if(Array.isArray(V)&&V[0]&&typeof V[0]=="object")z=V[0];else if(V&&typeof V=="object"&&"signedMessage"in V&&"signature"in V)z=V;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in z&&"signature"in z&&(typeof z.signedMessage=="string"||z.signedMessage instanceof Uint8Array)&&z.signature instanceof Uint8Array)S=typeof z.signedMessage=="string"?z.signedMessage:new TextDecoder().decode(z.signedMessage),R=z.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in N)||typeof N.signMessage!="function"||!("publicKey"in N)||typeof N!="object"||!N.publicKey||!("toBase58"in N.publicKey)||typeof N.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");S=[`${F.host} wants you to sign in with your Solana account:`,N.publicKey.toBase58(),...C?["",C,""]:[""],"Version: 1",`URI: ${F.href}`,`Issued At: ${(o=(a=k?.signInWithSolana)===null||a===void 0?void 0:a.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((l=k?.signInWithSolana)===null||l===void 0)&&l.notBefore?[`Not Before: ${k.signInWithSolana.notBefore}`]:[],...!((u=k?.signInWithSolana)===null||u===void 0)&&u.expirationTime?[`Expiration Time: ${k.signInWithSolana.expirationTime}`]:[],...!((d=k?.signInWithSolana)===null||d===void 0)&&d.chainId?[`Chain ID: ${k.signInWithSolana.chainId}`]:[],...!((h=k?.signInWithSolana)===null||h===void 0)&&h.nonce?[`Nonce: ${k.signInWithSolana.nonce}`]:[],...!((m=k?.signInWithSolana)===null||m===void 0)&&m.requestId?[`Request ID: ${
39k.signInWithSolana.requestId}`]:[],...!((y=(g=k?.signInWithSolana)===null||g===void 0?void 0:g.resources)===null||y===void 0)&&y.length?["Resources",...k.signInWithSolana.resources.map(z=>`- ${z}`)]:[]].join(` 40`);const V=await N.signMessage(new TextEncoder().encode(S),"utf8");if(!V||!(V instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");R=V}}try{const{data:E,error:T}=await ce(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:S,signature:Ks(R)},!((b=e.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(_=e.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:Tn});if(T)throw T;if(!E||!E.session||!E.user){const C=new Fa;return this._returnResult({data:{user:null,session:null},error:C})}return E.session&&(await this._saveSession(E.session),await this._notifyAllSubscribers("SIGNED_IN",E.session)),this._returnResult({data:Object.assign({},E),error:T})}catch(E){if(te(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async _exchangeCodeForSession(e){const n=await Ln(this.storage,`${this.storageKey}-code-verifier`),[a,o]=(n??"").split("/");try{if(!a&&this.flowType==="pkce")throw new JO;const{data:l,error:u}=await ce(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:a},xform:Tn});if(await ft(this.storage,`${this.storageKey}-code-verifier`),u)throw u;if(!l||!l.session||!l.user){const d=new Fa;return this._returnResult({data:{user:null,session:null,redirectType:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers(o==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l.session)),this._returnResult({data:Object.assign(Object.assign({},l),{redirectType:o??null}),error:u})}catch(l){if(await ft(this.storage,`${this.storageKey}-code-verifier`),te(l))return this._returnResult({data:{user:null,session:null,redirectType:null},error:l});throw l}}async signInWithIdToken(e){try{const{options:n,provider:a,token:o,access_token:l,nonce:u}=e,d=await ce(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:a,id_token:o,access_token:l,nonce:u,gotrue_meta_security:{captcha_token:n?.captchaToken}},xform:Tn}),{data:h,error:m}=d;if(m)return this._returnResult({data:{user:null,session:null},error:m});if(!h||!h.session||!h.user){const g=new Fa;return this._returnResult({data:{user:null,session:null},error:g})}return h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("SIGNED_IN",h.session)),this._returnResult({data:h,error:m})}catch(n){if(te(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(e){var n,a,o,l,u;try{if("email"in e){const{email:d,options:h}=e;let m=null,g=null;this.flowType==="pkce"&&([m,g]=await zs(this.storage,this.storageKey));const{error:y}=await ce(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:d,data:(n=h?.data)!==null&&n!==void 0?n:{},create_user:(a=h?.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:h?.captchaToken},code_challenge:m,code_challenge_method:g},redirectTo:h?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:y})}if("phone"in e){const{phone:d,options:h}=e,{data:m,error:g}=await ce(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:d,data:(o=h?.data)!==null&&o!==void 0?o:{},create_user:(l=h?.shouldCreateUser)!==null&&l!==void 0?l:!0,gotrue_meta_security:{captcha_token:h?.captchaToken},channel:(u=h?.channel)!==null&&u!==void 0?u:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:m?.message_id},error:g})}throw new Cc("You must provide either an email or phone number.")}catch(d){if(await ft(this.storage,`${this.storageKey}-code-verifier`),te(d))return this._returnResult({data:{user:null,session:null},error:d});throw d}}async verifyOtp(e){var n,a;try{let o,l;"options"in e&&(o=(n=e.options)===null||n===void 0?void 0:n.redirectTo,l=(a=e.options)===null||a===void 0?void 0:a.captchaToken);const{data:u,error:d}=await ce(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:l}}),redirectTo:o,xform:Tn});if(d)throw d;if(!u)throw new Error("An error occurred on token verification.");const h=u.session,m=u.user;return h?.access_token&&(await this._saveSession(h),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",h)),this._returnResult({data:{user:m,session:h},error:null})}catch(o){if(te(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithSSO(e){var n,a,o,l,u;try{let d=null,h=null;this.flowType==="pkce"&&([d,h]=await zs(this.storage,this.storageKey));const m=await ce(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(a=(n=e.options)===null||n===void 0?void 0:n.redirectTo)!==null&&a!==void 0?a:void 0}),!((o=e?.options)===null||o===void 0)&&o.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:d,code_challenge_method:h}),headers:this.headers,xform:SL});return!((l=m.data)===null||l===void 0)&&l.url&&Ut()&&!(!((u=e.options)===null||u===void 0)&&u.skipBrowserRedirect)&&window.location.assign(m.data.url),this._returnResult(m)}catch(d){if(await ft(this.storage,`${this.storageKey}-code-verifier`),te(d))return this._returnResult({data:null,error:d});throw d}}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 e=>{const{data:{session:n},error:a}=e;if(a)throw a;if(!n)throw new At;const{error:o}=await ce(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:o})})}catch(e){if(te(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const n=`${this.url}/resend`;if("email"in e){const{email:a,type:o,options:l}=e;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await zs(this.storage,this.storageKey));const{error:h}=await ce(this.fetch,"POST",n,{headers:this.headers,body:{email:a,type:o,gotrue_meta_security:{captcha_token:l?.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:l?.emailRedirectTo});return h&&await ft(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:h})}else if("phone"in e){const{phone:a,type:o,options:l}=e,{data:u,error:d}=await ce(this.fetch,"POST",n,{headers:this.headers,body:{phone:a,type:o,gotrue_meta_security:{captcha_token:l?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:u?.message_id},error:d})}throw new Cc("You must provide either an email or phone number and a type")}catch(n){if(await ft(this.storage,`${this.storageKey}-code-verifier`),te(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e)):await this._useSession(async e=>e)}async _acquireLock(e,n){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const a=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),o=(async()=>(await a,await n()))();return this.pendingInLock.push((async()=>{try{await o}catch{}})()),o}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const a=n();for(this.pendingInLock.push((async()=>{try{await a}catch{}})()),await a;this.pendingInLock.length;){const o=[...this.pendingInLock];await Promise.all(o),this.pendingInLock.splice(0,o.length)}return await a}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await e(n)}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 e=null;const n=await Ln(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?e=n:(this._debug("#getSession()","session from storage is not val
40id"),await this._removeSession())),!e)return{data:{session:null},error:null};const a=e.expires_at?e.expires_at*1e3-Date.now()<nh:!1;if(this._debug("#__loadSession()",`session has${a?"":" not"} expired`,"expires_at",e.expires_at),!a){if(this.userStorage){const u=await Ln(this.userStorage,this.storageKey+"-user");u?.user?e.user=u.user:e.user=rh()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const u={value:this.suppressGetSessionWarning};e.user=vL(e.user,u),u.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:o,error:l}=await this._callRefreshToken(e.refresh_token);if(l){if(!!(e.expires_at&&e.expires_at*1e3>Date.now())){const d=await Ln(this.storage,this.storageKey);if(d&&d.refresh_token===e.refresh_token)return this._returnResult({data:{session:e},error:null})}return this._returnResult({data:{session:null},error:l})}return this._returnResult({data:{session:o},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let n;return this.lock!=null?n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):n=await this._getUser(),n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(e){try{return e?await ce(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:as}):await this._useSession(async n=>{var a,o,l;const{data:u,error:d}=n;if(d)throw d;return!(!((a=u.session)===null||a===void 0)&&a.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new At}:await ce(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(l=(o=u.session)===null||o===void 0?void 0:o.access_token)!==null&&l!==void 0?l:void 0,xform:as})})}catch(n){if(te(n))return Ac(n)&&(await this._removeSession(),await ft(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(e,n={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,n)):await this._updateUser(e,n)}async _updateUser(e,n={}){try{return await this._useSession(async a=>{const{data:o,error:l}=a;if(l)throw l;if(!o.session)throw new At;const u=o.session;let d=null,h=null;this.flowType==="pkce"&&e.email!=null&&([d,h]=await zs(this.storage,this.storageKey));const{data:m,error:g}=await ce(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:d,code_challenge_method:h}),jwt:u.access_token,xform:as});if(g)throw g;return u.user=m.user,await this._saveSession(u),await this._notifyAllSubscribers("USER_UPDATED",u),this._returnResult({data:{user:u.user},error:null})})}catch(a){if(await ft(this.storage,`${this.storageKey}-code-verifier`),te(a))return this._returnResult({data:{user:null},error:a});throw a}}async setSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e)):await this._setSession(e)}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new At;const n=Date.now()/1e3;let a=n,o=!0,l=null;const{payload:u}=kc(e.access_token);if(u.exp&&(a=u.exp,o=a<=n),o){const{data:d,error:h}=await this._callRefreshToken(e.refresh_token);if(h)return this._returnResult({data:{user:null,session:null},error:h});if(!d)return{data:{user:null,session:null},error:null};l=d}else{const{data:d,error:h}=await this._getUser(e.access_token);if(h)return this._returnResult({data:{user:null,session:null},error:h});l={access_token:e.access_token,refresh_token:e.refresh_token,user:d.user,token_type:"bearer",expires_in:a-n,expires_at:a},await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)}return this._returnResult({data:{user:l.user,session:l},error:null})}catch(n){if(te(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e)):await this._refreshSession(e)}async _refreshSession(e){try{return await this._useSession(async n=>{var a;if(!e){const{data:u,error:d}=n;
40if(d)throw d;e=(a=u.session)!==null&&a!==void 0?a:void 0}if(!e?.refresh_token)throw new At;const{data:o,error:l}=await this._callRefreshToken(e.refresh_token);return l?this._returnResult({data:{user:null,session:null},error:l}):o?this._returnResult({data:{user:o.user,session:o},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(te(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(e,n){var a;try{if(!Ut())throw new xc("No browser detected.");if(e.error||e.error_description||e.error_code)throw new xc(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Rb("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new xc("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Rb("No code detected.");const{data:k,error:N}=await this._exchangeCodeForSession(e.code);if(N)throw N;const F=new URL(window.location.href);return F.searchParams.delete("code"),window.history.replaceState(window.history.state,"",F.toString()),{data:{session:k.session,redirectType:(a=k.redirectType)!==null&&a!==void 0?a:null},error:null}}const{provider_token:o,provider_refresh_token:l,access_token:u,refresh_token:d,expires_in:h,expires_at:m,token_type:g}=e;if(!u||!h||!d||!g)throw new xc("No session defined in URL");const y=Math.round(Date.now()/1e3),b=parseInt(h);let _=y+b;m&&(_=parseInt(m));const S=_-y;S*1e3<=br&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${S}s, should have been closer to ${b}s`);const R=_-b;y-R>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",R,_,y):y-R<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",R,_,y);const{data:E,error:T}=await this._getUser(u);if(T)throw T;const C={provider_token:o,provider_refresh_token:l,access_token:u,expires_in:b,expires_at:_,refresh_token:d,token_type:g,user:E.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:C,redirectType:e.type},error:null})}catch(o){if(te(o))return this._returnResult({data:{session:null,redirectType:null},error:o});throw o}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){const n=await Ln(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&n)}async signOut(e={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e)):await this._signOut(e)}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async n=>{var a;const{data:o,error:l}=n;if(l&&!Ac(l))return this._returnResult({error:l});const u=(a=o.session)===null||a===void 0?void 0:a.access_token;if(u){const{error:d}=await this.admin.signOut(u,e);if(d&&!(YO(d)&&(d.status===404||d.status===401||d.status===403)||Ac(d)))return this._returnResult({error:d})}return e!=="others"&&(await this._removeSession(),await ft(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const n=sL(),a={id:n,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,a),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)}):await this._emitInitialSession(n)))(),{data:{subscription:a}}}async _emitInitialSession(e){return await this._useSession(async n=>{var a,o;try{const{data:{session:l},error:u}=n;if(u)throw u;await((a=this.stateChangeEmitters.get(e))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",l)),this._debug("INITIAL_SESSION","callback id",e,"session",l)}catch(l){await((o=this.stateChangeEmitters.get(e))===null||o===void 0?void 0:o.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",l),Ac(l)?console.warn(l):console.error(l)}})}async resetPasswordForEmail(e,n={}){let a=null,o=null;this.flowType==="pkce"&&([a,o]=await zs(this.storage,this.storageKey,!0));try{return await ce(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:a,code_challenge_method:o,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(l){if(await ft(this.storage,`${this.storageKey}-code-verifier`),te(l))return this._returnResult({data:null,error:l});throw l}}async getUserIdentities(){var e;try{const{data:n,error:a}=await this.getUser();if(a)throw a;return this._returnResult({data:{identities:(e=n.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(n){if(te(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var n;try{const{data:a,error:o}=await this._useSession(async l=>{var u,d,h,m,g;const{data:y,error:b}=l;if(b)throw b;const _=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(u=e.options)===null||u===void 0?void 0:u.redirectTo,scopes:(d=e.options)===null||d===void 0?void 0:d.scopes,queryParams:(h=e.options)===null||h===void 0?void 0:h.queryParams,skipBrowserRedirect:!0});return await ce(this.fetch,"GET",_,{headers:this.headers,jwt:(g=(m=y.session)===null||m===void 0?void 0:m.access_token)!==null&&g!==void 0?g:void 0})});if(o)throw o;return Ut()&&!(!((n=e.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(a?.url),this._returnResult({data:{provider:e.provider,url:a?.url},error:null})}catch(a){if(te(a))return this._returnResult({data:{provider:e.provider,url:null},error:a});throw a}}async linkIdentityIdToken(e){return await this._useSession(async n=>{var a;try{const{error:o,data:{session:l}}=n;if(o)throw o;const{options:u,provider:d,token:h,access_token:m,nonce:g}=e,y=await ce(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(a=l?.access_token)!==null&&a!==void 0?a:void 0,body:{provider:d,id_token:h,access_token:m,nonce:g,link_identity:!0,gotrue_meta_security:{captcha_token:u?.captchaToken}},xform:Tn}),{data:b,error:_}=y;return _?this._returnResult({data:{user:null,session:null},error:_}
40):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new Fa}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:_}))}catch(o){if(await ft(this.storage,`${this.storageKey}-code-verifier`),te(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}})}async unlinkIdentity(e){try{return await this._useSession(async n=>{var a,o;const{data:l,error:u}=n;if(u)throw u;return await ce(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(o=(a=l.session)===null||a===void 0?void 0:a.access_token)!==null&&o!==void 0?o:void 0})})}catch(n){if(te(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(e){const n="#_refreshAccessToken()";this._debug(n,"begin");try{const a=Date.now();return await lL(async o=>(o>0&&await oL(200*Math.pow(2,o-1)),this._debug(n,"refreshing attempt",o),await ce(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Tn})),(o,l)=>{const u=200*Math.pow(2,o);return l&&Tb(l)&&Date.now()+u-a<br})}catch(a){if(this._debug(n,"error",a),te(a))return this._returnResult({data:{session:null,user:null},error:a});throw a}finally{this._debug(n,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,n){const a=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",n,"url",a),Ut()&&!n.skipBrowserRedirect&&window.location.assign(a),{data:{provider:e,url:a},error:null}}async _recoverAndRefresh(){var e,n;const a="#_recoverAndRefresh()";this._debug(a,"begin");try{const o=await Ln(this.storage,this.storageKey);if(o&&this.userStorage){let u=await Ln(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!u&&(u={user:o.user},await Qa(this.userStorage,this.storageKey+"-user",u)),o.user=(e=u?.user)!==null&&e!==void 0?e:rh()}else if(o&&!o.user&&!o.user){const u=await Ln(this.storage,this.storageKey+"-user");u&&u?.user?(o.user=u.user,await ft(this.storage,this.storageKey+"-user"),await Qa(this.storage,this.storageKey,o)):o.user=rh()}if(this._debug(a,"session from storage",o),!this._isValidSession(o)){this._debug(a,"session is not valid"),o!==null&&await this._removeSession();return}const l=((n=o.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<nh;if(this._debug(a,`session has${l?"":" not"} expired with margin of ${nh}s`),l){if(this.autoRefreshToken&&o.refresh_token){const{error:u}=await this._callRefreshToken(o.refresh_token);u&&(QO(u)?this._debug(a,"refresh discarded by commit guard",u):this._debug(a,"refresh failed",u))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:u,error:d}=await this._getUser(o.access_token);!d&&u?.user?(o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(a,"could not get user data, skipping SIGNED_IN notification")}catch(u){console.error("Error getting user data:",u),this._debug(a,"error getting user data, skipping SIGNED_IN notification",u)}else await this._notifyAllSubscribers("SIGNED_IN",o)}catch(o){this._debug(a,"error",o),console.error(o);return}finally{this._debug(a,"end")}}async _callRefreshToken(e){var n,a;if(!e)throw new At;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===e&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const o="#_callRefreshToken()";this._debug(o,"begin");try{this.refreshingDeferred=new vu;const l=await Ln(this.storage,this.storageKey),{data:u,error:d}=await this._refreshAccessToken(e);if(d)throw d;if(!u.session)throw new At;const h=await Ln(this.storage,this.storageKey);if(l!==null&&(h===null||h.refresh_token!==l.refresh_token)){this._debug(o,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:h?"replaced":"cleared"});const b={data:null,error:new Ab};return this.refreshingDeferred.resolve(b),b}const g=this._sessionRemovalEpoch;if(await this._saveSession(u.session),this._sessionRemovalEpoch!==g){this._debug(o,"commit guard (post-save): _removeSession ran during _saveSession, und
40oing write"),await ft(this.storage,this.storageKey),this.userStorage&&await ft(this.userStorage,this.storageKey+"-user");const b={data:null,error:new Ab};return this.refreshingDeferred.resolve(b),b}await this._notifyAllSubscribers("TOKEN_REFRESHED",u.session);const y={data:u.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(y),y}catch(l){if(this._debug(o,"error",l),te(l)){const u={data:null,error:l};if(!Tb(l)){const d=await Ln(this.storage,this.storageKey);!!(d?.expires_at&&d.expires_at*1e3>Date.now())?this._debug(o,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:e,result:u,expiresAt:Date.now()+BO},(n=this.refreshingDeferred)===null||n===void 0||n.resolve(u),u}throw(a=this.refreshingDeferred)===null||a===void 0||a.reject(l),l}finally{this.refreshingDeferred=null,this._debug(o,"end")}}async _notifyAllSubscribers(e,n,a=!0){if(this._pendingInitNotifications!==null&&a){this._pendingInitNotifications.push({event:e,session:n,broadcast:a});return}const o=`#_notifyAllSubscribers(${e})`;this._debug(o,"begin",n,`broadcast = ${a}`);try{this.broadcastChannel&&a&&this.broadcastChannel.postMessage({event:e,session:n});const l=[],u=Array.from(this.stateChangeEmitters.values()).map(async d=>{try{await d.callback(e,n)}catch(h){l.push(h)}});if(await Promise.all(u),l.length>0){for(let d=0;d<l.length;d+=1)console.error(l[d]);throw l[0]}}finally{this._debug(o,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await ft(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},e),a=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!a&&n.user&&await Qa(this.userStorage,this.storageKey+"-user",{user:n.user});const o=Object.assign({},n);delete o.user;const l=Lb(o);await Qa(this.storage,this.storageKey,l)}else{const o=Lb(n);await Qa(this.storage,this.storageKey,o)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await ft(this.storage,this.storageKey),await ft(this.storage,this.storageKey+"-code-verifier"),await ft(this.storage,this.storageKey+"-user"),this.userStorage&&await ft(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Ut()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",e)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),br);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)===null||e===void 0||e.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 e=Date.now();try{return await this._useSession(async n=>{const{data:{session:a}}=n;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((a.expires_at*1e3-e)/br);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${br}ms, refresh threshold is ${To} ticks`),o<=To&&await this._callRefreshToken(a.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof AL)this._debug("auto refresh token tick lock not available");else throw e}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const e=Date.now();try{await this._useSession(async n=>{const{data:{session:a}}=n;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((a.expires_at*1e3-e)/br);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${br}ms, refresh threshold is ${To} ticks`),o<=To&&await this._callRefreshToken(a.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ut()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const n=`#_onVisibilityChanged(${e})`;if(this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
40{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(n,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,n,a){const o=[`provider=${encodeURIComponent(n)}`];if(a?.redirectTo&&o.push(`redirect_to=${encodeURIComponent(a.redirectTo)}`),a?.scopes&&o.push(`scopes=${encodeURIComponent(a.scopes)}`),this.flowType==="pkce"){const[l,u]=await zs(this.storage,this.storageKey),d=new URLSearchParams({code_challenge:`${encodeURIComponent(l)}`,code_challenge_method:`${encodeURIComponent(u)}`});o.push(d.toString())}if(a?.queryParams){const l=new URLSearchParams(a.queryParams);o.push(l.toString())}return a?.skipBrowserRedirect&&o.push(`skip_http_redirect=${a.skipBrowserRedirect}`),`${e}?${o.join("&")}`}async _unenroll(e){try{return await this._useSession(async n=>{var a;const{data:o,error:l}=n;return l?this._returnResult({data:null,error:l}):await ce(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(a=o?.session)===null||a===void 0?void 0:a.access_token})})}catch(n){if(te(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(e){try{return await this._useSession(async n=>{var a,o;const{data:l,error:u}=n;if(u)return this._returnResult({data:null,error:u});const d=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:h,error:m}=await ce(this.fetch,"POST",`${this.url}/factors`,{body:d,headers:this.headers,jwt:(a=l?.session)===null||a===void 0?void 0:a.access_token});return m?this._returnResult({data:null,error:m}):(e.factorType==="totp"&&h.type==="totp"&&(!((o=h?.totp)===null||o===void 0)&&o.qr_code)&&(h.totp.qr_code=`data:image/svg+xml;utf-8,${h.totp.qr_code}`),this._returnResult({data:h,error:null}))})}catch(n){if(te(n))return this._returnResult({data:null,error:n});throw n}}async _verify(e){const n=async()=>{try{return await this._useSession(async a=>{var o;const{data:l,error:u}=a;if(u)return this._returnResult({data:null,error:u});const d=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?Ub(e.webauthn.credential_response):$b(e.webauthn.credential_response)})}:{code:e.code}),{data:h,error:m}=await ce(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:d,headers:this.headers,jwt:(o=l?.session)===null||o===void 0?void 0:o.access_token});return m?this._returnResult({data:null,error:m}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+h.expires_in},h)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",h),this._returnResult({data:h,error:m}))})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challenge(e){const n=async()=>{try{return await this._useSession(async a=>{var o;const{data:l,error:u}=a;if(u)return this._returnResult({data:null,error:u});const d=await ce(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(o=l?.session)===null||o===void 0?void 0:o.access_token});if(d.error)return d;const{data:h}=d;if(h.type!=="webauthn")return{data:h,error:null};switch(h.webauthn.type){case"create":return{data:Object.assign(Object.assign({},h),{webauthn:Object.assign(Object.assign({},h.webauthn),{credential_options:Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:Db(h.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},h),{webauthn:Object.assign(Object.assign({},h.webauthn),{credential_options:Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:Ib(h.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challengeAndVerify(e){const{data:n,error:a}=await this._challenge({factorId:e.factorId});return a?this._returnResult({data:null,error:a}):await this._verify({factorId:e.factorId,challengeId:n.id,code:e.code})}async _listFactors(){var e;const{data:{user:n},error:a}=await this.getUser();if(a)return{data:null,error:a};const o={all:[],phone:[],totp:[],webauthn:[]};for(const l of(e=n?.factors)!==null&&e!==void 0?e:[])o.all.push(l),l.status==="verified"&&o[l.factor_type].push(l);return{data:o,error:null}}async _getAuthenticatorAssuranceLevel(e){var n,a,o,l;if(e)try{const{payload:_}=kc(e);let S=null;_.aal&&(S=_.aal);let R=S;const{data:{user:E},error:T}=await this.getUser(e);if(T)return this._returnResult({data:null,error:T});((a=(n=E?.factors)===null||n===void 0?void 0:n.filter(N=>N.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(R="aal2");const k=_.amr||[];return{data:{currentLevel:S,nextLevel:R,currentAuthenticationMethods:k},error:null}}catch(_){if(te(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:u},error:d}
40=await this.getSession();if(d)return this._returnResult({data:null,error:d});if(!u)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:h}=kc(u.access_token);let m=null;h.aal&&(m=h.aal);let g=m;((l=(o=u.user.factors)===null||o===void 0?void 0:o.filter(_=>_.status==="verified"))!==null&&l!==void 0?l:[]).length>0&&(g="aal2");const b=h.amr||[];return{data:{currentLevel:m,nextLevel:g,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async n=>{const{data:{session:a},error:o}=n;return o?this._returnResult({data:null,error:o}):a?await ce(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:a.access_token,xform:l=>({data:l,error:null})}):this._returnResult({data:null,error:new At})})}catch(n){if(te(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(e,n){try{return await this._useSession(async a=>{const{data:{session:o},error:l}=a;if(l)return this._returnResult({data:null,error:l});if(!o)return this._returnResult({data:null,error:new At});const u=await ce(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"approve"},xform:d=>({data:d,error:null})});return u.data&&u.data.redirect_url&&Ut()&&!n?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}}async _denyAuthorization(e,n){try{return await this._useSession(async a=>{const{data:{session:o},error:l}=a;if(l)return this._returnResult({data:null,error:l});if(!o)return this._returnResult({data:null,error:new At});const u=await ce(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"deny"},xform:d=>({data:d,error:null})});return u.data&&u.data.redirect_url&&Ut()&&!n?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:n},error:a}=e;return a?this._returnResult({data:null,error:a}):n?await ce(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new At})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async n=>{const{data:{session:a},error:o}=n;return o?this._returnResult({data:null,error:o}):a?(await ce(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:a.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new At})})}catch(n){if(te(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(e,n={keys:[]}){let a=n.keys.find(d=>d.kid===e);if(a)return a;const o=Date.now();if(a=this.jwks.keys.find(d=>d.kid===e),a&&this.jwks_cached_at+FO>o)return a;const{data:l,error:u}=await ce(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(u)throw u;return!l.keys||l.keys.length===0||(this.jwks=l,this.jwks_cached_at=o,a=l.keys.find(d=>d.kid===e),!a)?null:a}async getClaims(e,n={}){try{let a=e;if(!a){const{data:_,error:S}
40=await this.getSession();if(S||!_.session)return this._returnResult({data:null,error:S});a=_.session.access_token}const{header:o,payload:l,signature:u,raw:{header:d,payload:h}}=kc(a);if(!n?.allowExpired)try{mL(l.exp)}catch(_){throw new Jc(_ instanceof Error?_.message:"JWT validation failed")}const m=!o.alg||o.alg.startsWith("HS")||!o.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(o.kid,n?.keys?{keys:n.keys}:n?.jwks);if(!m){const{error:_}=await this.getUser(a);if(_)throw _;return{data:{claims:l,header:o,signature:u},error:null}}const g=gL(o.alg),y=await crypto.subtle.importKey("jwk",m,g,!0,["verify"]);if(!await crypto.subtle.verify(g,y,u,nL(`${d}.${h}`)))throw new Jc("Invalid JWT signature");return{data:{claims:l,header:o,signature:u},error:null}}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}}async signInWithPasskey(e){var n,a,o;Nn(this.experimental);try{if(!Wc())return this._returnResult({data:null,error:new Mn("Browser does not support WebAuthn",null)});const{data:l,error:u}=await this._startPasskeyAuthentication({options:{captchaToken:(n=e?.options)===null||n===void 0?void 0:n.captchaToken}});if(u||!l)return this._returnResult({data:null,error:u});const d=Ib(l.options),h=(o=(a=e?.options)===null||a===void 0?void 0:a.signal)!==null&&o!==void 0?o:Nh.createNewAbortSignal(),{data:m,error:g}=await ww({publicKey:d,signal:h});if(g||!m)return this._returnResult({data:null,error:g??new Mn("WebAuthn ceremony failed",null)});const y=$b(m);return this._verifyPasskeyAuthentication({challengeId:l.challenge_id,credential:y})}catch(l){if(te(l))return this._returnResult({data:null,error:l});throw l}}async registerPasskey(e){var n,a;Nn(this.experimental);try{if(!Wc())return this._returnResult({data:null,error:new Mn("Browser does not support WebAuthn",null)});const{data:o,error:l}=await this._startPasskeyRegistration();if(l||!o)return this._returnResult({data:null,error:l});const u=Db(o.options),d=(a=(n=e?.options)===null||n===void 0?void 0:n.signal)!==null&&a!==void 0?a:Nh.createNewAbortSignal(),{data:h,error:m}=await _w({publicKey:u,signal:d});if(m||!h)return this._returnResult({data:null,error:m??new Mn("WebAuthn ceremony failed",null)});const g=Ub(h);return this._verifyPasskeyRegistration({challengeId:o.challenge_id,credential:g})}catch(o){if(te(o))return this._returnResult({data:null,error:o});throw o}}async _startPasskeyRegistration(){Nn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:n},error:a}=e;if(a)return this._returnResult({data:null,error:a});if(!n)return this._returnResult({data:null,error:new At});const{data:o,error:l}=await ce(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:o,error:null})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){Nn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:a},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new At});const{data:l,error:u}=await ce(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:a.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(n){if(te(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(e){var n;Nn(this.experimental);try{const{data:a,error:o}=await ce(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=e?.options)===null||n===void 0?void 0:n.captchaToken}}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:a,error:null})}catch(a){if(te(a))return this._returnResult({data:null,error:a});throw a}}async _verifyPasskeyAuthentication(e){Nn(this.experimental);try{const{data:n,error:a}=await ce(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:Tn});return a?this._returnResult({data:null,error:a}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if(te(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){Nn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:n},error:a}=e;if(a)return this._returnResult({data:null,error:a});if(!n)return this._returnResult({data:null,error:new At});const{data:o,error:l}=await ce(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:u=>({data:u,error:null})});return l?this._returnResult({data:null,error:l}):this._returnResult({data:o,error:null})})}catch(e){if(te(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){Nn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:a},error:o}=n;
40if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new At});const{data:l,error:u}=await ce(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:a.access_token,body:{friendly_name:e.friendlyName}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(n){if(te(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(e){Nn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:a},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new At});const{error:l}=await ce(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:a.access_token,noResolveJson:!0});return l?this._returnResult({data:null,error:l}):this._returnResult({data:null,error:null})})}catch(n){if(te(n))return this._returnResult({data:null,error:n});throw n}}}Ho.nextInstanceID={};const zL=Ho,BL="2.110.1";let Ao="",tu;if(typeof Deno<"u"){var ah;Ao="deno",tu=(ah=Deno.version)===null||ah===void 0?void 0:ah.deno}else if(typeof document<"u")Ao="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Ao="react-native";else{var ih;Ao="node",tu=typeof process<"u"?(ih=process.version)===null||ih===void 0?void 0:ih.replace(/^v/,""):void 0}const Sw=[`runtime=${Ao}`];tu&&Sw.push(`runtime-version=${tu}`);const qL={"X-Client-Info":`supabase-js/${BL}; ${Sw.join("; ")}`},HL={headers:qL},VL={schema:"public"},GL={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},FL={},KL={enabled:!1,respectSamplingDecision:!0};function YL(t,e,n,a){function o(l){return l instanceof n?l:new n(function(u){u(l)})}return new(n||(n=Promise))(function(l,u){function d(g){try{m(a.next(g))}catch(y){u(y)}}function h(g){try{m(a.throw(g))}catch(y){u(y)}}function m(g){g.done?l(g.value):o(g.value).then(d,h)}m((a=a.apply(t,[])).next())})}let oh=null;const ZL="@opentelemetry/api";function JL(){return oh===null&&(oh=import(ZL).catch(()=>null)),oh}function QL(){return YL(this,void 0,void 0,function*(){try{const t=yield JL();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const n=e.traceparent;return n?{traceparent:n,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function XL(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[n,a,o,l]=e;if(n.length!==2||a.length!==32||o.length!==16||l.length!==2)return null;const u=/^[0-9a-f]+$/i;return!u.test(n)||!u.test(a)||!u.test(o)||!u.test(l)||a==="00000000000000000000000000000000"||o==="0000000000000000"?null:{version:n,traceId:a,parentId:o,traceFlags:l,isSampled:(parseInt(l,16)&1)===1}}function WL(t,e){if(!t||!e||e.length===0)return!1;let n;if(t instanceof URL)n=t;else try{n=new URL(t)}catch{return!1}for(const a of e)try{if(typeof a=="string"){if(e2(n.hostname,a))return!0}else if(a instanceof RegExp){if(a.test(n.hostname))return!0}else if(typeof a=="function"&&a(n))return!0}catch{continue}return!1}function e2(t,e){if(e===t)return!0;if(e.startsWith("*.")){const n=e.slice(2);if(t.endsWith(n)&&(t===n||t.endsWith("."+n)))return!0}return!1}function t2(t){const e=[];try{const n=new URL(t);e.push(n.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function Vo(t){"@babel/helpers - typeof";return Vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vo(t)}function n2(t,e){if(Vo(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(Vo(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function r2(t){var e=n2(t,"string");return Vo(e)=="symbol"?e:e+""}function s2(t,e,n){return(e=r2(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function ct(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};
40e%2?zb(Object(n),!0).forEach(function(a){s2(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zb(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}const a2=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),i2=()=>Headers,o2=(t,e,n,a,o)=>{const l=a2(a),u=i2(),d=o?.enabled===!0,h=o?.respectSamplingDecision!==!1,m=d?t2(e):null;return async(g,y)=>{var b;const _=(b=await n())!==null&&b!==void 0?b:t;let S=new u(y?.headers);if(S.has("apikey")||S.set("apikey",t),S.has("Authorization")||S.set("Authorization",`Bearer ${_}`),m){const R=await l2(g,m,h);R&&(R.traceparent&&!S.has("traceparent")&&S.set("traceparent",R.traceparent),R.tracestate&&!S.has("tracestate")&&S.set("tracestate",R.tracestate),R.baggage&&!S.has("baggage")&&S.set("baggage",R.baggage))}return l(g,ct(ct({},y),{},{headers:S}))}};async function l2(t,e,n){if(!WL(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const a=await QL();if(!a||!a.traceparent)return null;if(n){const o=XL(a.traceparent);if(o&&!o.isSampled)return null}return a}function Bb(t){return typeof t=="boolean"?{enabled:t}:t}function c2(t){return t.endsWith("/")?t:t+"/"}function u2(t,e){var n,a,o,l,u,d;const{db:h,auth:m,realtime:g,global:y}=t,{db:b,auth:_,realtime:S,global:R}=e,E=Bb(t.tracePropagation),T=Bb(e.tracePropagation),C={db:ct(ct({},b),h),auth:ct(ct({},_),m),realtime:ct(ct({},S),g),storage:{},global:ct(ct(ct({},R),y),{},{headers:ct(ct({},(n=R?.headers)!==null&&n!==void 0?n:{}),(a=y?.headers)!==null&&a!==void 0?a:{})}),tracePropagation:{enabled:(o=(l=E?.enabled)!==null&&l!==void 0?l:T?.enabled)!==null&&o!==void 0?o:!1,respectSamplingDecision:(u=(d=E?.respectSamplingDecision)!==null&&d!==void 0?d:T?.respectSamplingDecision)!==null&&u!==void 0?u:!0},accessToken:async()=>""};return t.accessToken?C.accessToken=t.accessToken:delete C.accessToken,C}function d2(t){const e=t?.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(c2(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var f2=class extends zL{constructor(t){super(t)}},h2=class{constructor(t,e,n){var a,o;this.supabaseUrl=t,this.supabaseKey=e;const l=d2(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",l),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",l),this.storageUrl=new URL("storage/v1",l),this.functionsUrl=new URL("functions/v1",l);const u=`sb-${l.hostname.split(".")[0]}-auth-token`,d={db:VL,realtime:FL,auth:ct(ct({},GL),{},{storageKey:u}),global:HL,tracePropagation:KL},h=u2(n??{},d);if(this.settings=h,this.storageKey=(a=h.auth.storageKey)!==null&&a!==void 0?a:"",this.headers=(o=h.global.headers)!==null&&o!==void 0?o:{},h.accessToken)this.accessToken=h.accessToken,this.auth=new Proxy({},{get:(g,y)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(y)} is not possible`)}});else{var m;this.auth=this._initSupabaseAuthClient((m=h.auth)!==null&&m!==void 0?m:{},this.headers,h.global.fetch)}this.fetch=o2(e,t,this._getAccessToken.bind(this),h.global.fetch,h.tracePropagation),this.realtime=this._initRealtimeClient(ct({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},h.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(g=>this.realtime.setAuth(g)).catch(g=>console.warn("Failed to set initial Realtime auth token:",g)),this.rest=new Sk(new URL("rest/v1",l).href,{headers:this.headers,schema:h.db.schema,fetch:this.fetch,timeout:h.db.timeout,urlLengthLimit:h.db.urlLengthLimit}),this.storage=new zO(this.storageUrl.href,this.headers,this.fetch,n?.storage),h.accessToken||this._listenForAuthEvents()}get functions(){return new hk(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,n)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,n;if(t.accessToken)return await t.accessToken();const{data:a}=await t.auth.getSession();return(e=(n=a.session)===null||n===void 0?void 0:n.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:a,userStorage:o,storageKey:l,flowType:u,lock:d,debug:h,throwOnError:m,experimental:g,lockAcquireTimeout:y,skipAutoInitialize:b},_,S){const R={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new f2({url:this.authUrl.href,headers:ct(ct({},R),_),storageKey:l,autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:a,userStorage:o,flowType:u,lock:d,debug:h,throwOnError:m,experimental:g,fetch:S,lockAcquireTimeout:y,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(E=>E.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new uO(this.realtimeUrl.href,ct(ct({},t),{},{params:ct(ct({},{apikey:this.supabaseKey}),t?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e?.access_token)})}_handleTokenChanged(t,e,n){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const p2=(t,e,n)=>new h2(t,e,n);
40function m2(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const n=e.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=20:!1}m2()&&console.warn("â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");function g2(){if(typeof window>"u")return;const t=location.hostname,n=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(E=>t===E||t.endsWith("."+E)),a="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",o=n?t.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+a+")(?:-dev)?(?=\\.|$)","i"))?.[1]??t.match(new RegExp("^("+a+")(?=[.-])","i"))?.[1]:void 0,l=window.parent&&window.parent!==window;if(!o||!l)return localStorage;const u=t.endsWith(".lovableproject-dev.com")||t.endsWith(".gpt-eng.com"),d=u?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,h=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),m=h&&d.test(h)?[h]:u?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],g="lovable-preview-auth:result",y=2e3,b=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),_=(E,T,C)=>new Promise(k=>{const N=b();let F=!1,V;const z=fe=>{F||(F=!0,clearTimeout(V),window.removeEventListener("message",M),k(fe))},M=fe=>{if(m.indexOf(fe.origin)<0)return;const ie=fe.data;ie&&ie.type===g&&ie.requestId===N&&z(ie)};window.addEventListener("message",M);const K={type:E,requestId:N,projectId:o,key:T};C!==void 0&&(K.value=C);for(const fe of m)window.parent.postMessage(K,fe);V=setTimeout(()=>z(null),y)});let S=!0;const R=250;return{getItem:async E=>{let T=await _("lovable-preview-auth:get",E);return!T&&S&&(await new Promise(C=>setTimeout(C,R)),T=await _("lovable-preview-auth:get",E)),S=!1,T&&T.ok&&typeof T.value=="string"?T.value===""?(localStorage.removeItem(E),null):T.value:localStorage.getItem(E)},setItem:(E,T)=>(localStorage.setItem(E,T),_("lovable-preview-auth:set",E,T).then(C=>{C&&C.ok&&typeof C.value=="string"&&localStorage.getItem(E)===T&&(C.value===""?localStorage.removeItem(E):localStorage.setItem(E,C.value))})),removeItem:E=>(localStorage.removeItem(E),_("lovable-preview-auth:remove",E).then(()=>{}))}}function y2(){return p2("https://cvygpdykveciblknurfg.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImN2eWdwZHlrdmVjaWJsa251cmZnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzkyMjQ4NjksImV4cCI6MjA5NDgwMDg2OX0.1DxlYbhEPoc-IslteevghCy8uhpLXqCQmGHmQQHgsdM",{auth:{storage:g2(),persistSession:!0,autoRefreshToken:!0}})}let lh;const Rr=new Proxy({},{get(t,e,n){return lh||(lh=y2()),Reflect.get(lh,e,n)}}),v2=Fs({type:"function"}).client(async({next:t})=>{const{data:e}=await Rr.auth.getSession(),n=e.session?.access_token;return t({headers:n?{Authorization:`Bearer ${n}`}:{}})}),b2=Fs(),qb=ck(()=>({requestMiddleware:[b2],functionMiddleware:[v2]}));var bu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},_2=class extends bu{#e;#n;#t;constructor(){super(),this.#t=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(t){this.#t=t,this.#n?.(),this.#n=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Ew=new _2,w2={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},S2=class{#e=w2;#n=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},jh=new S2;function E2(t){setTimeout(t,0)}var R2=typeof window>"u"||"Deno"in globalThis;function Pn(){}function T2(t,e){return typeof t=="function"?t(e):t}function A2(t){return typeof t=="number"&&t>=0&&t!==1/0}function C2(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Ph(t,e){return typeof t=="function"?t(e):t}function x2(t,e){return typeof t=="function"?t(e):t}function Hb(t,e){const{type:n="all",exact:a,fetchStatus:o,predicate:l,queryKey:u,stale:d}=t;if(u){if(a){if(e.queryHash!==ap(u,e.options))return!1}else if(!Fo(e.queryKey,u))return!1}if(n!=="all"){const h=e.isActive();if(n==="active"&&!h||n==="inactive"&&h)return!1}return!(typeof d=="boolean"&&e.isStale()!==d||o&&o!==e.state.fetchStatus||l&&!l(e))}function Vb(t,e){const{exact:n,status:a,predicate:o,mutationKey:l}=t;if(l){if(!e.options.mutationKey)return!1;if(n){if(Go(e.options.mutationKey)!==Go(l))return!1}else if(!Fo(e.options.mutationKey,l))return!1}return!(a&&e.state.status!==a||o&&!o(e))}function ap(t,e){return(e?.queryKeyHashFn||Go)(t)}function Go(t){return JSON.stringify(t,(e,n)=>Mh(n)?Object.keys(n).sort().reduce((a,o)=>(a[o]=n[o],a),{}):n)}function Fo(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Fo(t[n],e[n])):!1}var k2=Object.prototype.hasOwnProperty;function Rw(t,e,n=0){if(t===e)return t;if(n>500)return e;const a=Gb(t)&&Gb(e);if(!a&&!(Mh(t)&&Mh(e)))return e;const l=(a?t:Object.keys(t)).length,u=a?e:Object.keys(e),d=u.length,h=a?new Array(d):{};let m=0;for(let g=0;g<d;g++){const y=a?g:u[g],b=t[y],_=e[y];if(b===_){h[y]=b,(a?g<l:k2.call(t,y))&&m++;continue}if(b===null||_===null||typeof b!="object"||typeof _!="object"){h[y]=_;continue}const S=Rw(b,_,n+1);h[y]=S,S===b&&m++}return l===d&&m===l?t:h}function d$(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function Gb(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Mh(t){if(!Fb(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Fb(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Fb(t){return Object.prototype.toString.call(t)==="[object Object]"}function O2(t){return new Promise(e=>{jh.setTimeout(e,t)})}function L2(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Rw(t,e):e}function N2(t,e,n=0){const a=[...t,e];return n&&a.length>n?a.slice(1):a}function j2(t,e,n=0){const a=[e,...t];return n&&a.length>n?a.slice(0,-1):a}var ip=Symbol();function Tw(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===ip?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function f$(t,e){return typeof t=="function"?t(...e):!!t}function P2(t,e,n){let a=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??=e(),a||(a=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),t}var Aw=(()=>{let t=()=>R2;return{isServer(){return t()},setIsServer(e){t=e}}})();function M2(){let t,e;const n=new Promise((o,l)=>{t=o,e=l});n.status="pending",n.catch(()=>{});function a(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{a({status:"fulfilled",value:o}),t(o)},n.reject=o=>{a({status:"rejected",reason:o}),e(o)},n}var D2=E2;function I2(){let t=[],e=0,n=d=>{d()},a=d=>{d()},o=D2;const l=d=>{e?t.push(d):o(()=>{n(d)})},u=()=>{const d=t;t=[],d.length&&o(()=>{a(()=>{d.forEach(h=>{n(h)})})})};return{batch:d=>{let h;e++;try{h=d()}finally{e--,e||u()}return h},batchCalls:d=>(...h)=>{l(()=>{d(...h)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{o=d}}}var qt=I2(),U2=class extends bu{#e=!0;#n;#t;constructor(){super(),this.#t=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n
vendor: 21,238 bytes, line 40
40)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(t){this.#t=t,this.#n?.(),this.#n=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(n=>{n(t)}))}isOnline(){return this.#e}},nu=new U2;function $2(t){return Math.min(1e3*2**t,3e4)}function Cw(t){return(t??"online")==="online"?nu.isOnline():!0}var Dh=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function xw(t){let e=!1,n=0,a;const o=M2(),l=()=>o.status!=="pending",u=R=>{if(!l()){const E=new Dh(R);b(E),t.onCancel?.(E)}},d=()=>{e=!0},h=()=>{e=!1},m=()=>Ew.isFocused()&&(t.networkMode==="always"||nu.isOnline())&&t.canRun(),g=()=>Cw(t.networkMode)&&t.canRun(),y=R=>{l()||(a?.(),o.resolve(R))},b=R=>{l()||(a?.(),o.reject(R))},_=()=>new Promise(R=>{a=E=>{(l()||m())&&R(E)},t.onPause?.()}).then(()=>{a=void 0,l()||t.onContinue?.()}),S=()=>{if(l())return;let R;const E=n===0?t.initialPromise:void 0;try{R=E??t.fn()}catch(T){R=Promise.reject(T)}Promise.resolve(R).then(y).catch(T=>{if(l())return;const C=t.retry??(Aw.isServer()?0:3),k=t.retryDelay??$2,N=typeof k=="function"?k(n,T):k,F=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,T);if(e||!F){b(T);return}n++,t.onFail?.(n,T),O2(N).then(()=>m()?void 0:_()).then(()=>{e?b(T):S()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(a?.(),o),cancelRetry:d,continueRetry:h,canStart:g,start:()=>(g()?S():_().then(S),o)}}var kw=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),A2(this.gcTime)&&(this.#e=jh.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Aw.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(jh.clearTimeout(this.#e),this.#e=void 0)}},z2=class extends kw{#e;#n;#t;#s;#r;#a;#i;constructor(t){super(),this.#i=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#s=t.client,this.#t=this.#s.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=Yb(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(t){if(this.options={...this.#a,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=Yb(this.options);e.data!==void 0&&(this.setState(Kb(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(t,e){const n=L2(this.state.data,t,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t,e){this.#o({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#r?.promise;return this.#r?.cancel(t),e?e.then(Pn).catch(Pn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>x2(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ip||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ph(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:!C2(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#r&&(this.#i||this.#l()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#l(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(h=>h.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,a=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},o=()=>{const d=Tw(this.options,e),m=(()=>{const g={client:this.#s,queryKey:this.queryKey,meta:this.meta};return a(g),g})();return this.#i=!1,this.options.persister?this.options.persister(d,m,this):d(m)},u=(()=>{const d={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return a(d),d})();this.options.behavior?.onFetch(u,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#o({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=xw({initialPromise:e?.initialPromise,fn:u.fetchFn,onCancel:d=>{d instanceof Dh&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(d,h)=>{this.#o({type:"failed",failureCount:d,error:h})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#t.config.onSuccess?.(d,this),this.#t.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof Dh){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#o({type:"error",error:d}),this.#t.config.onError?.(d,this),this.#t.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#o(t){const e=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,...B2(n.data,this.options),fetchMeta:t.meta??null};case"success":const a={...n,...Kb(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?a:void 0,a;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),qt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:t})})}};function B2(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Cw(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Kb(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Yb(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,a=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}function Zb(t){return{onFetch:(e,n)=>{const a=e.options,o=e.fetchOptions?.meta?.fetchMore?.direction,l=e.state.data?.pages||[],u=e.state.data?.pageParams||[];let d={pages:[],pageParams:[]},h=0;const m=async()=>{let g=!1;const y=S=>{P2(S,()=>e.signal,()=>g=!0)},b=Tw(e.options,e.fetchOptions),_=async(S,R,E)=>{if(g)return Promise.reject();if(R==null&&S.pages.length)return Promise.resolve(S);const C=(()=>{const V={client:e.client,queryKey:e.queryKey,pageParam:R,direction:E?"backward":"forward",meta:e.options.meta};return y(V),V})(),k=await b(C),{maxPages:N}=e.options,F=E?j2:N2;return{pages:F(S.pages,k,N),pageParams:F(S.pageParams,R,N)}};if(o&&l.length){const S=o==="backward",R=S?q2:Jb,E={pages:l,pageParams:u},T=R(a,E);d=await _(E,T,S)}else{const S=t??l.length;do{const R=h===0?u[0]??a.initialPageParam:Jb(a,d);if(h>0&&R==null)break;d=await _(d,R),h++}while(h<S)}return d};e.options.persister?e.fetchFn=()=>e.options.persister?.(m,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=m}}}function Jb(t,{pages:e,pageParams:n}){const a=e.length-1;return e.length>0?t.getNextPageParam(e[a],e,n[a],n):void 0}function q2(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}var H2=class extends kw{#e;#n;#t;#s;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#t=t.mutationCache,this.#n=[],this.state=t.state||V2(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#n.includes(t)||(this.#n.push(t),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#n=this.#n.filter(e=>e!==t),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=xw({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,u)=>{this.#r({type:"failed",failureCount:l,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const a=this.state.status==="pending",o=!this.#s.canStart();try{if(a)e();else{this.#r({type:"pending",variables:t,isPaused:o}),this.#t.config.onMutate&&await this.#t.config.onMutate(t,this,n);const u=await this.options.onMutate?.(t,n);u!==this.state.context&&this.#r({type:"pending",context:u,variables:t,isPaused:o})}const l=await this.#s.start();return await this.#t.config.onSuccess?.(l,t,this.state.context,this,n),await this.options.onSuccess?.(l,t,this.state.context,n),await this.#t.config.onSettled?.(l,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(l,null,t,this.state.context,n),this.#r({type:"success",data:l}),l}catch(l){try{await this.#t.config.onError?.(l,t,this.state.context,this,n)}catch(u){Promise.reject(u)}try{await this.options.onError?.(l,t,this.state.context,n)}catch(u){Promise.reject(u)}try{await this.#t.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,l,t,this.state.context,n)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:l}),l}finally{this.#t.runNext(this)}}#r(t){const e=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=e(this.state),qt.batch(()=>{this.#n.forEach(n=>{n.onMutationUpdate(t)}),this.#t.notify({mutation:this,type:"updated",action:t})})}};function V2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var G2=class extends bu{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(t,e,n){const a=new H2({client:t,mutationCache:this,mutationId:++this.#t,options:t.defaultMutationOptions(e),state:n});return this.add(a),a}add(t){this.#e.add(t);const e=Oc(t);if(typeof e=="string"){const n=this.#n.get(e);n?n.push(t):this.#n.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=Oc(t);if(typeof e=="string"){const n=this.#n.get(e);if(n)if(n.length>1){const a=n.indexOf(t);a!==-1&&n.splice(a,1)}else n[0]===t&&this.#n.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Oc(t);if(typeof e=="string"){const a=this.#n.get(e)?.find(o=>o.state.status==="pending");return!a||a===t}else return!0}runNext(t){const e=Oc(t);return typeof e=="string"?this.#n.get(e)?.find(a=>a!==t&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){qt.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(n=>Vb(e,n))}findAll(t={}){return this.getAll().filter(e=>Vb(t,e))}notify(t){qt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return qt.batch(()=>Promise.all(t.map(e=>e.continue().catch(Pn))))}};function Oc(t){return t.options.scope?.id}var Ow=class extends bu{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const a=e.queryKey,o=e.queryHash??ap(a,e);let l=this.get(o);return l||(l=new z2({client:t,queryKey:a,queryHash:o,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(l)),l}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){qt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(n=>Hb(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>Hb(t,n)):e}notify(t){qt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){qt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){qt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},F2=class{#e;#n;#t;#s;#r;#a;#i;#l;constructor(t={}){this.#e=t.queryCache||new Ow,this.#n=t.mutationCache||new G2,this.#t=t.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=Ew.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=nu.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#n.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=this.#e.build(this,e),a=n.state.data;return a===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Ph(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(a))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:n})=>{const a=n.data;return[e,a]})}setQueryData(t,e,n){const a=this.defaultQueryOptions({queryKey:t}),l=this.#e.get(a.queryHash)?.state.data,u=T2(e,l);if(u!==void 0)return this.#e.build(this,a).setData(u,{...n,manual:!0})}setQueriesData(t,e,n){return qt.batch(()=>this.#e.findAll(t).map(({queryKey:a})=>[a,this.setQueryData(a,e,n)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;qt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return qt.batch(()=>(n.findAll(t).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},a=qt.batch(()=>this.#e.findAll(t).map(o=>o.cancel(n)));return Promise.all(a).then(Pn).catch(Pn)}invalidateQueries(t,e={}){return qt.batch(()=>(this.#e.findAll(t).forEach(n=>{n.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},a=qt.batch(()=>this.#e.findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(Pn)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(a).then(Pn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(Ph(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Pn).catch(Pn)}fetchInfiniteQuery(t){return t.behavior=Zb(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Pn).catch(Pn)}ensureInfiniteQueryData(t){return t.behavior=Zb(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return nu.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(t){this.#t=t}setQueryDefaults(t,e){this.#s.set(Go(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#s.values()],n={};return e.forEach(a=>{Fo(t,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(t,e){this.#r.set(Go(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(a=>{Fo(t,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#t.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=ap(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===ip&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#t.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},Lw=Y.createContext(void 0),h$=t=>{const e=Y.useContext(Lw);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Qb=({client:t,children:e})=>(Y.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),D.jsx(Lw.Provider,{value:t,children:e}));const K2="/assets/styles-BYls2zvi.css";const Nw=(...t)=>t.filter((e,n,a)=>!!e&&e.trim()!==""&&a.indexOf(e)===n).join(" ").trim();const Y2=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Z2=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,a)=>a?a.toUpperCase():n.toLowerCase());const Xb=t=>{const e=Z2(t);return e.charAt(0).toUpperCase()+e.slice(1)};var J2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Q2=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};const X2=Y.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:o="",children:l,iconNode:u,...d},h)=>Y.createElement("svg",{ref:h,...J2,width:e,height:e,stroke:t,strokeWidth:a?Number(n)*24/Number(e):n,className:Nw("lucide",o),...!l&&!Q2(d)&&{"aria-hidden":"true"},...d},[...u.map(([m,g])=>Y.createElement(m,g)),...Array.isArray(l)?l:[l]]));const _u=(t,e)=>{const n=Y.forwardRef(({className:a,...o},l)=>Y.createElement(X2,{ref:l,iconNode:e,className:Nw(`lucide-${Y2(Xb(t))}`,`lucide-${t}`,a),...o}));return n.displayName=Xb(t),n};const W2=[["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"}]],eN=_u("map-pin",W2);const tN=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],nN=_u("menu",tN);const rN=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],sN=_u("message-square",rN);const aN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 4,394 bytes, line 40
40],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],iN=_u("x",aN);function jw(t){var e,n,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=jw(t[e]))&&(a&&(a+=" "),a+=n)}else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}function oN(){for(var t,e,n=0,a="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=jw(t))&&(a&&(a+=" "),a+=e);return a}const lN=(t,e)=>{const n=new Array(t.length+e.length);for(let a=0;a<t.length;a++)n[a]=t[a];for(let a=0;a<e.length;a++)n[t.length+a]=e[a];return n},cN=(t,e)=>({classGroupId:t,validator:e}),Pw=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),ru="-",Wb=[],uN="arbitrary..",dN=t=>{const e=hN(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=t;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return fN(u);const d=u.split(ru),h=d[0]===""&&d.length>1?1:0;return Mw(d,h,e)},getConflictingClassGroupIds:(u,d)=>{if(d){const h=a[u],m=n[u];return h?m?lN(m,h):h:m||Wb}return n[u]||Wb}}},Mw=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],l=n.nextPart.get(o);if(l){const m=Mw(t,e+1,l);if(m)return m}const u=n.validators;if(u===null)return;const d=e===0?t.join(ru):t.slice(e).join(ru),h=u.length;for(let m=0;m<h;m++){const g=u[m];if(g.validator(d))return g.classGroupId}},fN=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),a=e.slice(0,n);return a?uN+a:void 0})(),hN=t=>{const{theme:e,classGroups:n}=t;return pN(n,e)},pN=(t,e)=>{const n=Pw();for(const a in t){const o=t[a];op(o,n,a,e)}return n},op=(t,e,n,a)=>{const o=t.length;for(let l=0;l<o;l++){const u=t[l];mN(u,e,n,a)}},mN=(t,e,n,a)=>{if(typeof t=="string"){gN(t,e,n);return}if(typeof t=="function"){yN(t,e,n,a);return}vN(t,e,n,a)},gN=(t,e,n)=>{const a=t===""?e:Dw(e,t);a.classGroupId=n},yN=(t,e,n,a)=>{if(bN(t)){op(t(a),e,n,a);return}e.validators===null&&(e.validators=[]),e.validators.push(cN(n,t))},vN=(t,e,n,a)=>{const o=Object.entries(t),l=o.length;for(let u=0;u<l;u++){const[d,h]=o[u];op(h,Dw(e,d),n,a)}},Dw=(t,e)=>{let n=t;const a=e.split(ru),o=a.length;for(let l=0;l<o;l++){const u=a[l];let d=n.nextPart.get(u);d||(d=Pw(),n.nextPart.set(u,d)),n=d}return n},bN=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,_N=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),a=Object.create(null);const o=(l,u)=>{n[l]=u,e++,e>t&&(e=0,a=n,n=Object.create(null))};return{get(l){let u=n[l];if(u!==void 0)return u;if((u=a[l])!==void 0)return o(l,u),u},set(l,u){l in n?n[l]=u:o(l,u)}}},Ih="!",e0=":",wN=[],t0=(t,e,n,a,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:a,isExternal:o}),SN=t=>{const{prefix:e,experimentalParseClassName:n}=t;let a=o=>{const l=[];let u=0,d=0,h=0,m;const g=o.length;for(let R=0;R<g;R++){const E=o[R];if(u===0&&d===0){if(E===e0){l.push(o.slice(h,R)),h=R+1;continue}if(E==="/"){m=R;continue}}E==="["?u++:E==="]"?u--:E==="("?d++:E===")"&&d--}const y=l.length===0?o:o.slice(h);let b=y,_=!1;y.endsWith(Ih)?(b=y.slice(0,-1),_=!0):y.startsWith(Ih)&&(b=y.slice(1),_=!0);const S=m&&m>h?m-h:void 0;return t0(l,_,b,S)};if(e){const o=e+e0,l=a;a=u=>u.startsWith(o)?l(u.slice(o.length)):t0(wN,!1,u,void 0,!0)}if(n){const o=a;a=l=>n({className:l,parseClassName:o})}return a},EN=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,a)=>{e.set(n,1e6+a)}),n=>{const a=[];let o=[];for(let l=0;l<n.length;l++){const u=n[l],d=u[0]==="[",h=e.has(u);d||h?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(u)):o.push(u)}return o.length>0&&(o.sort(),a.push(...o)),a}},RN=t=>({cache:_N(t.cacheSize),parseClassName:SN(t),sortModifiers:EN(t),...dN(t)}),TN=/\s+/,AN=(t,e)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:l}=e,u=[],d=t.trim().split(TN);let h="";for(let m=d.length-1;m>=0;m-=1){const g=d[m],{isExternal:y,modifiers:b,hasImportantModifier:_,baseClassName:S,maybePostfixModifierPosition:R}=n(g);if(y){h=g+(h.length>0?" "+h:h);continue}let E=!!R,T=a(E?S.substring(0,R):S);if(!T){if(!E){h=g+(h.length>0?" "+h:h);continue}if(T=a(S),!T){h=g+(h.length>0?" "+h:h);continue}E=!1}const C=b.length===0?"":b.length===1?b[0]:l(b).join(":"),k=_?C+Ih:C,N=k+T;if(u.indexOf(N)>-1)continue;u.push(N);const F=o(T,E);for(let V=0;V<F.length;++V){const z=F[V];u.push(k+z)}h=g+(h.length>0?" "+h:h)}return h},CN=(...t)=>{let e=0,n,a,o="";for(;e<t.length;
vendor: 4,381 bytes, line 40
40)(n=t[e++])&&(a=Iw(n))&&(o&&(o+=" "),o+=a);return o},Iw=t=>{if(typeof t=="string")return t;let e,n="";for(let a=0;a<t.length;a++)t[a]&&(e=Iw(t[a]))&&(n&&(n+=" "),n+=e);return n},xN=(t,...e)=>{let n,a,o,l;const u=h=>{const m=e.reduce((g,y)=>y(g),t());return n=RN(m),a=n.cache.get,o=n.cache.set,l=d,d(h)},d=h=>{const m=a(h);if(m)return m;const g=AN(h,n);return o(h,g),g};return l=u,(...h)=>l(CN(...h))},kN=[],St=t=>{const e=n=>n[t]||kN;return e.isThemeGetter=!0,e},Uw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$w=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ON=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,LN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,NN=/\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$/,jN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,PN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,MN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wr=t=>ON.test(t),Ce=t=>!!t&&!Number.isNaN(Number(t)),es=t=>!!t&&Number.isInteger(Number(t)),ch=t=>t.endsWith("%")&&Ce(t.slice(0,-1)),gr=t=>LN.test(t),zw=()=>!0,DN=t=>NN.test(t)&&!jN.test(t),lp=()=>!1,IN=t=>PN.test(t),UN=t=>MN.test(t),$N=t=>!le(t)&&!ue(t),zN=t=>vs(t,Hw,lp),le=t=>Uw.test(t),Bs=t=>vs(t,Vw,DN),n0=t=>vs(t,YN,Ce),BN=t=>vs(t,Fw,zw),qN=t=>vs(t,Gw,lp),r0=t=>vs(t,Bw,lp),HN=t=>vs(t,qw,UN),Lc=t=>vs(t,Kw,IN),ue=t=>$w.test(t),wo=t=>na(t,Vw),VN=t=>na(t,Gw),s0=t=>na(t,Bw),GN=t=>na(t,Hw),FN=t=>na(t,qw),Nc=t=>na(t,Kw,!0),KN=t=>na(t,Fw,!0),vs=(t,e,n)=>{const a=Uw.exec(t);return a?a[1]?e(a[1]):n(a[2]):!1},na=(t,e,n=!1)=>{const a=$w.exec(t);return a?a[1]?e(a[1]):n:!1},Bw=t=>t==="position"||t==="percentage",qw=t=>t==="image"||t==="url",Hw=t=>t==="length"||t==="size"||t==="bg-size",Vw=t=>t==="length",YN=t=>t==="number",Gw=t=>t==="family-name",Fw=t=>t==="number"||t==="weight",Kw=t=>t==="shadow",ZN=()=>{const t=St("color"),e=St("font"),n=St("text"),a=St("font-weight"),o=St("tracking"),l=St("leading"),u=St("breakpoint"),d=St("container"),h=St("spacing"),m=St("radius"),g=St("shadow"),y=St("inset-shadow"),b=St("text-shadow"),_=St("drop-shadow"),S=St("blur"),R=St("perspective"),E=St("aspect"),T=St("ease"),C=St("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...N(),ue,le],V=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],M=()=>[ue,le,h],K=()=>[Wr,"full","auto",...M()],fe=()=>[es,"none","subgrid",ue,le],ie=()=>["auto",{span:["full",es,ue,le]},es,ue,le],Te=()=>[es,"auto",ue,le],$e=()=>["auto","min","max","fr",ue,le],tt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ze=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...M()],Z=()=>[Wr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],me=()=>[Wr,"screen","full","dvw","lvw","svw","min","max","fit",...M()],Me=()=>[Wr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],ee=()=>[t,ue,le],x=()=>[...N(),s0,r0,{position:[ue,le]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",GN,zN,{size:[ue,le]}],re=()=>[ch,wo,Bs],se=()=>["","none","full",m,ue,le],ge=()=>["",Ce,wo,Bs],xe=()=>["solid","dashed","dotted","double"],st=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_e=()=>[Ce,ch,s0,r0],pn=()=>["","none",S,ue,le],Vt=()=>["none",Ce,ue,le],tn=()=>["none",Ce,ue,le],Yn=()=>[Ce,ue,le],zt=()=>[Wr,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[gr],breakpoint:[gr],color:[zw],container:[gr],"drop-shadow":[gr],ease:["in","out","in-out"],font:[$N],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[gr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[gr],shadow:[gr],spacing:["px",Ce],text:[gr],"text-shadow":[gr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Wr,le,ue,E]}
vendor: 6,121 bytes, line 40
40],container:["container"],columns:[{columns:[Ce,le,ue,d]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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"],sr:["sr-only","not-sr-only"],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:F()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{"inset-s":K(),start:K()}],end:[{"inset-e":K(),end:K()}],"inset-bs":[{"inset-bs":K()}],"inset-be":[{"inset-be":K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[es,"auto",ue,le]}],basis:[{basis:[Wr,"full","auto",d,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ce,Wr,"auto","initial","none",le]}],grow:[{grow:["",Ce,ue,le]}],shrink:[{shrink:["",Ce,ue,le]}],order:[{order:[es,"first","last","none",ue,le]}],"grid-cols":[{"grid-cols":fe()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":Te()}],"col-end":[{"col-end":Te()}],"grid-rows":[{"grid-rows":fe()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":Te()}],"row-end":[{"row-end":Te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$e()}],"auto-rows":[{"auto-rows":$e()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...tt(),"normal"]}],"justify-items":[{"justify-items":[...ze(),"normal"]}],"justify-self":[{"justify-self":["auto",...ze()]}],"align-content":[{content:["normal",...tt()]}],"align-items":[{items:[...ze(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ze(),{baseline:["","last"]}]}],"place-content":[{"place-content":tt()}],"place-items":[{"place-items":[...ze(),"baseline"]}],"place-self":[{"place-self":["auto",...ze()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pbs:[{pbs:M()}],pbe:[{pbe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mbs:[{mbs:U()}],mbe:[{mbe:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...me()]}],"min-inline-size":[{"min-inline":["auto",...me()]}],"max-inline-size":[{"max-inline":["none",...me()]}],"block-size":[{block:["auto",...Me()]}],"min-block-size":[{"min-block":["auto",...Me()]}],"max-block-size":[{"max-block":["none",...Me()]}],w:[{w:[d,"screen",...Z()]}],"min-w":[{"min-w":[d,"screen","none",...Z()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",n,wo,Bs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,KN,BN]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ch,le]}],"font-family":[{font:[VN,qN,e]}],"font-features":[{"font-features":[le]}],"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:[o,ue,le]}],"line-clamp":[{"line-clamp":[Ce,"none",ue,n0]}],leading:[{leading:[l,...M()]}],"list-image":[{"list-image":["none",ue,le]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ue,le]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ee()}],"text-color":[{text:ee()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...xe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ce,"from-font","auto",ue,Bs]}],"text-decoration-color":[{decoration:ee()}],"underline-offset":[{"underline-offset":[Ce,"auto",ue,le]}],"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",ue,le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ue,le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:x()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},es,ue,le],radial:["",ue,le],conic:[es,ue,le]},FN,HN]}],"bg-color":[{bg:ee()}],"gradient-from-pos":[{from:re()}
vendor: 7,445 bytes, line 40
40],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:ee()}],"gradient-via":[{via:ee()}],"gradient-to":[{to:ee()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:ge()}],"border-w-x":[{"border-x":ge()}],"border-w-y":[{"border-y":ge()}],"border-w-s":[{"border-s":ge()}],"border-w-e":[{"border-e":ge()}],"border-w-bs":[{"border-bs":ge()}],"border-w-be":[{"border-be":ge()}],"border-w-t":[{"border-t":ge()}],"border-w-r":[{"border-r":ge()}],"border-w-b":[{"border-b":ge()}],"border-w-l":[{"border-l":ge()}],"divide-x":[{"divide-x":ge()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ge()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...xe(),"hidden","none"]}],"divide-style":[{divide:[...xe(),"hidden","none"]}],"border-color":[{border:ee()}],"border-color-x":[{"border-x":ee()}],"border-color-y":[{"border-y":ee()}],"border-color-s":[{"border-s":ee()}],"border-color-e":[{"border-e":ee()}],"border-color-bs":[{"border-bs":ee()}],"border-color-be":[{"border-be":ee()}],"border-color-t":[{"border-t":ee()}],"border-color-r":[{"border-r":ee()}],"border-color-b":[{"border-b":ee()}],"border-color-l":[{"border-l":ee()}],"divide-color":[{divide:ee()}],"outline-style":[{outline:[...xe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ce,ue,le]}],"outline-w":[{outline:["",Ce,wo,Bs]}],"outline-color":[{outline:ee()}],shadow:[{shadow:["","none",g,Nc,Lc]}],"shadow-color":[{shadow:ee()}],"inset-shadow":[{"inset-shadow":["none",y,Nc,Lc]}],"inset-shadow-color":[{"inset-shadow":ee()}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ee()}],"ring-offset-w":[{"ring-offset":[Ce,Bs]}],"ring-offset-color":[{"ring-offset":ee()}],"inset-ring-w":[{"inset-ring":ge()}],"inset-ring-color":[{"inset-ring":ee()}],"text-shadow":[{"text-shadow":["none",b,Nc,Lc]}],"text-shadow-color":[{"text-shadow":ee()}],opacity:[{opacity:[Ce,ue,le]}],"mix-blend":[{"mix-blend":[...st(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":st()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":_e()}],"mask-image-linear-to-pos":[{"mask-linear-to":_e()}],"mask-image-linear-from-color":[{"mask-linear-from":ee()}],"mask-image-linear-to-color":[{"mask-linear-to":ee()}],"mask-image-t-from-pos":[{"mask-t-from":_e()}],"mask-image-t-to-pos":[{"mask-t-to":_e()}],"mask-image-t-from-color":[{"mask-t-from":ee()}],"mask-image-t-to-color":[{"mask-t-to":ee()}],"mask-image-r-from-pos":[{"mask-r-from":_e()}],"mask-image-r-to-pos":[{"mask-r-to":_e()}],"mask-image-r-from-color":[{"mask-r-from":ee()}],"mask-image-r-to-color":[{"mask-r-to":ee()}],"mask-image-b-from-pos":[{"mask-b-from":_e()}],"mask-image-b-to-pos":[{"mask-b-to":_e()}],"mask-image-b-from-color":[{"mask-b-from":ee()}],"mask-image-b-to-color":[{"mask-b-to":ee()}],"mask-image-l-from-pos":[{"mask-l-from":_e()}],"mask-image-l-to-pos":[{"mask-l-to":_e()}],"mask-image-l-from-color":[{"mask-l-from":ee()}],"mask-image-l-to-color":[{"mask-l-to":ee()}],"mask-image-x-from-pos":[{"mask-x-from":_e()}],"mask-image-x-to-pos":[{"mask-x-to":_e()}],"mask-image-x-from-color":[{"mask-x-from":ee()}],"mask-image-x-to-color":[{"mask-x-to":ee()}],"mask-image-y-from-pos":[{"mask-y-from":_e()}],"mask-image-y-to-pos":[{"mask-y-to":_e()}],"mask-image-y-from-color":[{"mask-y-from":ee()}],"mask-image-y-to-color":[{"mask-y-to":ee()}],"mask-image-radial":[{"mask-radial":[ue,le]}],"mask-image-radial-from-pos":[{"mask-radial-from":_e()}],"mask-image-radial-to-pos":[{"mask-radial-to":_e()}],"mask-image-radial-from-color":[{"mask-radial-from":ee()}],"mask-image-radial-to-color":[{"mask-radial-to":ee()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":N()}],"mask-image-conic-pos":[{"mask-conic":[Ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":_e()}],"mask-image-conic-to-pos":[{"mask-conic-to":_e()}],"mask-image-conic-from-color":[{"mask-conic-from":ee()}],"mask-image-conic-to-color":[{"mask-conic-to":ee()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:x()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ue,le]}],filter:[{filter:["","none",ue,le]}],blur:[{blur:pn()}],brightness:[{brightness:[Ce,ue,le]}],contrast:[{contrast:[Ce,ue,le]}],"drop-shadow":[{"drop-shadow":["","none",_,Nc,Lc]}],"drop-shadow-color":[{"drop-shadow":ee()}],grayscale:[{grayscale:["",Ce,ue,le]}],"hue-rotate":[{"hue-rotate":[Ce,ue,le]}],invert:[{invert:["",Ce,ue,le]}],saturate:[{saturate:[Ce,ue,le]}],sepia:[{sepia:["",Ce,ue,le]}],"backdrop-filter":[{"backdrop-filter":["","none",ue,le]}],"backdrop-blur":[{"backdrop-blur":pn()}],"backdrop-brightness":[{"backdrop-brightness":[Ce,ue,le]}],"backdrop-contrast":[{"backdrop-contrast":[Ce,ue,le]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ce,ue,le]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ce,ue,le]}],"backdrop-invert":[{"backdrop-invert":["",Ce,ue,le]}],"backdrop-opacity":[{"backdrop-opacity":[Ce,ue,le]}],"backdrop-saturate":[{"backdrop-saturate":[Ce,ue,le]}],"backdrop-sepia":[{"backdrop-sepia":["",Ce,ue,le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ue,le]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ce,"initial",ue,le]}],ease:[{ease:["linear","initial",T,ue,le]}],delay:[{delay:[Ce,ue,le]}],animate:[{animate:["none",C,ue,le]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[R,ue,le]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:Vt()}],"rotate-x":[{"rotate-x":Vt()}],"rotate-y":[{"rotate-y":Vt()}],"rotate-z":[{"rotate-z":Vt()}],scale:[{scale:tn()}],"scale-x":[{"scale-x":tn()}],"scale-y":[{"scale-y":tn()}],"scale-z":[{"scale-z":tn()}],"scale-3d":["scale-3d"],skew:[{skew:Yn()}],"skew-x":[{"skew-x":Yn()}],"skew-y":[{"skew-y":Yn()}],transform:[{transform:[ue,le,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:zt()}],"translate-x":[{"translate-x":zt()}],"translate-y":[{"translate-y":zt()}],"translate-z":[{"translate-z":zt()}],"translate-none":["translate-none"],accent:[{accent:ee()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ee()}
40],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",ue,le]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],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-mbs":[{"scroll-mbs":M()}],"scroll-mbe":[{"scroll-mbe":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-pbs":[{"scroll-pbs":M()}],"scroll-pbe":[{"scroll-pbe":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"]}],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",ue,le]}],fill:[{fill:["none",...ee()]}],"stroke-w":[{stroke:[Ce,wo,Bs,n0]}],stroke:[{stroke:["none",...ee()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},JN=xN(ZN);function QN(...t){return JN(oN(t))}const _r={name:"Legacy Lounge",address:"1937 Clements Ferry Rd Unit C, Charleston, SC",phone:"(843) 936-2965",phoneRaw:"+18439362965",textPhone:"(843) 755-9199",textPhoneRaw:"+18437559199",textNote:"Text only â calls to this number will not be answered.",facebookUrl:"https://www.facebook.com/profile.php?id=61579359224046",instagramUrl:"https://instagram.com/legacycigarssc",mapsUrl:"https://www.google.com/maps/search/?api=1&query=1937+Clements+Ferry+Rd+Unit+C+Charleston+SC",hours:[{days:"Monday â Thursday",time:"12 PM â 10 PM"},{days:"Friday â Sunday",time:"12 PM â 11 PM"}]},Yw="/assets/legacy-badge-logo-BQeOpenD.webp",XN=`https://maps.apple.com/?q=${encodeURIComponent(_r.address)}`,a0=[{to:"/golf-simulator",label:"Golf Sim"},{to:"/membership",label:"Membership"},{to:"/reserve-the-lounge",label:"Reserve"},{to:"/humidor",label:"Humidor"},{to:"/gallery",label:"Gallery"},{to:"/events",label:"Events"}];function WN(t){if(typeof navigator>"u")return;const e=navigator.userAgent;/iPhone|iPad|iPod|Macintosh/.test(e)&&(t.preventDefault(),window.open(XN,"_blank","noopener,noreferrer"))}function ej(){const[t,e]=Y.useState(!1),[n,a]=Y.useState(!1);return Y.useEffect(()=>{const o=()=>e(window.scrollY>20);return o(),window.addEventListener("scroll",o,{passive:!0}),()=>window.removeEventListener("scroll",o)},[]),Y.useEffect(()=>{if(!(typeof document>"u"))return document.body.style.overflow=n?"hidden":"",()=>{document.body.style.overflow=""}},[n]),D.jsxs("header",{className:QN("fixed inset-x-0 top-0 z-50 transition-all duration-300 sm:top-8",t||n?"border-b border-border/60 bg-background/90 py-3 backdrop-blur-xl":"py-4 sm:py-6"),
40children:[D.jsxs("div",{className:"mx-auto grid max-w-7xl grid-cols-[minmax(0,1fr)_auto] items-center gap-3 px-4 sm:px-6 lg:flex lg:justify-between lg:px-10",children:[D.jsxs(Gs,{to:"/",onClick:()=>a(!1),className:"group flex min-w-0 items-center gap-2 sm:gap-3",children:[D.jsx("img",{src:Yw,alt:"Legacy Lounge",width:56,height:56,loading:"eager",decoding:"async",className:"h-10 w-auto shrink-0 object-contain drop-shadow-[0_0_18px_oklch(0.72_0.2_50/0.35)] transition-transform group-hover:scale-105 sm:h-14"}),D.jsxs("span",{className:"flex min-w-0 flex-col leading-tight",children:[D.jsx("span",{className:"truncate font-display text-xl tracking-wide text-cream sm:text-2xl",children:"Legacy"}),D.jsx("span",{className:"eyebrow !text-[0.6rem] sm:!text-[0.7rem]",children:"Lounge"})]})]}),D.jsx("nav",{className:"hidden items-center gap-7 lg:flex",children:a0.map(o=>D.jsx(Gs,{to:o.to,className:"text-xs uppercase tracking-[0.2em] text-muted-foreground transition-colors hover:text-gold",activeProps:{className:"text-gold"},children:o.label},o.to))}),D.jsxs("div",{className:"flex shrink-0 items-center gap-3 sm:gap-6",children:[D.jsxs("a",{href:_r.mapsUrl,target:"_blank",rel:"noopener noreferrer",onClick:WN,"aria-label":"Directions",className:"flex items-center gap-1.5 p-1 text-xs uppercase tracking-[0.2em] text-muted-foreground transition-colors hover:text-gold sm:text-sm",children:[D.jsx(eN,{className:"h-5 w-5 text-gold sm:h-4 sm:w-4"}),D.jsx("span",{className:"hidden sm:inline",children:"Directions"})]}),D.jsxs("a",{href:`sms:${_r.textPhoneRaw}`,"aria-label":`Text us at ${_r.textPhone}`,className:"flex items-center gap-2 p-1 text-sm text-cream/90 transition-colors hover:text-gold",title:_r.textNote,children:[D.jsx(sN,{className:"h-5 w-5 text-gold sm:h-4 sm:w-4"}),D.jsxs("span",{className:"hidden flex-col items-start leading-tight sm:flex",children:[D.jsx("span",{children:_r.textPhone}),D.jsx("span",{className:"text-[0.6rem] uppercase tracking-wider text-gold/80",children:"Text only"})]})]}),D.jsx("button",{type:"button",onClick:()=>a(o=>!o),"aria-label":n?"Close menu":"Open menu","aria-expanded":n,className:"-mr-1 rounded-sm p-2 text-cream transition-colors hover:text-gold lg:hidden",children:n?D.jsx(iN,{className:"h-6 w-6"}):D.jsx(nN,{className:"h-6 w-6"})})]})]}),n&&D.jsx("nav",{className:"mt-3 border-t border-border/60 bg-background/95 backdrop-blur-xl lg:hidden",children:D.jsxs("div",{className:"mx-auto flex max-w-7xl flex-col px-4 py-2 sm:px-6",children:[a0.map(o=>D.jsx(Gs,{to:o.to,onClick:()=>a(!1),className:"border-b border-border/40 py-4 text-sm uppercase tracking-[0.22em] text-cream/90 transition-colors last:border-b-0 hover:text-gold",activeProps:{className:"text-gold"},children:o.label},o.to)),D.jsx(Gs,{to:"/golf-simulator/book",onClick:()=>a(!1),className:"mt-4 mb-2 inline-flex items-center justify-center rounded-sm bg-gradient-gold px-6 py-3.5 text-xs font-medium uppercase tracking-[0.22em] text-primary-foreground",children:"Book the Simulator"})]})})]})}const Zw="legacy-lounge-age-verified";function tj(){return typeof window>"u"?!1:window.localStorage.getItem(Zw)==="true"}function i0(){typeof window<"u"&&window.localStorage.setItem(Zw,"true")}function nj(t,e){return new Date(t,e,0).getDate()}function rj(t,e,n){const a=new Date;let o=a.getFullYear()-t;const l=a.getMonth()+1-e;return(l<0||l===0&&a.getDate()<n)&&o--,o>=21}function sj({mode:t="full"}){const[e,n]=Y.useState(!1),[a,o]=Y.useState(""),[l,u]=Y.useState(""),[d,h]=Y.useState(""),[m,g]=Y.useState(null),y=Y.useRef(null),b=Y.useRef(null),_=Y.useRef(null);Y.useEffect(()=>{tj()||n(!0)},[]);const S=Y.useCallback(()=>{g(null);const C=parseInt(a,10),k=parseInt(l,10),N=parseInt(d,10);if(!a||!l||!d||isNaN(C)||isNaN(k)||isNaN(N)){g("Please enter a valid month, day, and year.");return}if(C<1||C>12){g("Please enter a valid month (01â12).");return}const F=nj(N,C);if(k<1||k>F){g("Please enter a valid day for the selected month.");return}if(N<1900||N>new Date().getFullYear()){g("Please enter a valid year.");return}if(!rj(N,C,k)){g("You must be at least 21 years old to enter this site.");return}i0(),n(!1)},[a,l,d]),R=(C,k)=>{C.key==="Enter"&&(C.preventDefault(),k?.current?k.current.focus():S())},E=()=>{i0(),n(!1)},T=()=>{g("You must be 21 or older to use the golf simulator booking.")};return e?D.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-background/95 backdrop-blur-sm px-4",children:D.jsxs("div",{className:"w-full max-w-md rounded-sm border border-gold/30 bg-card p-8 shadow-deep",children:[D.jsx("h2",{className:"text-center font-display text-3xl text-cream",children:"Age Verification"}),D.jsx("p",{className:"mt-2 text-center text-sm text-muted-foreground",children:"You must be 21 or older to enter this site."}),t==="simple"?D.jsxs("div",{className:"mt-8",children:[D.jsx("p",{className:"text-center text-lg text-cream",children:"Are you 21 or older?"}),D.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-4",children:[D.jsx("button",{onClick:E,className:"rounded-sm bg-gradient-gold px-6 py-4 text-xs font-medium uppercase tracking-[0.22em] text-primary-foreground shadow-gold transition-transform hover:-translate-y-0.5",children:"Yes"}),D.jsx("button",{onClick:T,className:"rounded-sm border border-border/60 px-6 py-4 text-xs font-medium uppercase tracking-[0.22em] text-cream transition-colors hover:border-gold hover:text-gold",children:"No"})]})]}):D.jsxs("div",{className:"mt-8 grid grid-cols-3 gap-3",children:[D.jsxs("div",{children:[D.jsx("label",{htmlFor:"age-month",className:"eyebrow mb-2 block",children:"Month"}),D.jsx("input",{id:"age-month",ref:y,type:"text",inputMode:"numeric",maxLength:2,placeholder:"MM",value:a,onChange:C=>{const k=C.target.value.replace(/\D/g,"");o(k),k.length===2&&b.current?.focus()},onKeyDown:C=>R(C,b),className:"w-full rounded-sm border border-input bg-background px-3 py-3 text-center text-lg text-foreground outline-none ring-offset-background placeholder:text-muted-foreground
40/50 focus:border-gold focus:ring-1 focus:ring-gold",autoFocus:!0})]}),D.jsxs("div",{children:[D.jsx("label",{htmlFor:"age-day",className:"eyebrow mb-2 block",children:"Day"}),D.jsx("input",{id:"age-day",ref:b,type:"text",inputMode:"numeric",maxLength:2,placeholder:"DD",value:l,onChange:C=>{const k=C.target.value.replace(/\D/g,"");u(k),k.length===2&&_.current?.focus()},onKeyDown:C=>R(C,_),className:"w-full rounded-sm border border-input bg-background px-3 py-3 text-center text-lg text-foreground outline-none ring-offset-background placeholder:text-muted-foreground/50 focus:border-gold focus:ring-1 focus:ring-gold"})]}),D.jsxs("div",{children:[D.jsx("label",{htmlFor:"age-year",className:"eyebrow mb-2 block",children:"Year"}),D.jsx("input",{id:"age-year",ref:_,type:"text",inputMode:"numeric",maxLength:4,placeholder:"YYYY",value:d,onChange:C=>{const k=C.target.value.replace(/\D/g,"");h(k)},onKeyDown:C=>R(C),className:"w-full rounded-sm border border-input bg-background px-3 py-3 text-center text-lg text-foreground outline-none ring-offset-background placeholder:text-muted-foreground/50 focus:border-gold focus:ring-1 focus:ring-gold"})]})]}),m&&D.jsx("p",{className:"mt-3 text-center text-sm text-destructive",children:m}),t!=="simple"&&D.jsx("button",{onClick:S,className:"mt-6 w-full rounded-sm bg-gradient-gold px-6 py-4 text-xs font-medium uppercase tracking-[0.22em] text-primary-foreground shadow-gold transition-transform hover:-translate-y-0.5",children:"Enter Site"}),D.jsx("p",{className:"mt-6 text-center text-xs leading-relaxed text-muted-foreground/80",children:"By accessing this website, you confirm that you are of legal age to purchase cigars in your state of residence. Please note that state, county, and local restrictions may apply. Cigars that are not legal in all 50 states will not be advertised."})]})}):null}const aj=["/contact-us","/contacto","/contatti","/kontakt","/contactez-nous","/impressum","/mentions-legales","/wp-login.php","/wp-admin","/xmlrpc.php","/.env","/robots.txt"],ij=["/wp-admin","/wp-includes","/phpmyadmin","/adminer","/.well-known/"];function Jw(t){const e=t.split("?")[0]?.toLowerCase()??"";return aj.includes(e)?!0:ij.some(n=>e.startsWith(n))}const o0="ll_visitor_id",l0="ll_session_id",c0="ll_session_ts",u0="ll_utm",oj=1800*1e3;function Qw(){return crypto.randomUUID?.()??Math.random().toString(36).slice(2)+Date.now().toString(36)}function Xw(){try{let t=localStorage.getItem(o0);return t||(t=Qw(),localStorage.setItem(o0,t)),t}catch{return"anon"}}function Ww(){try{const t=Date.now(),e=Number(sessionStorage.getItem(c0)??0);let n=sessionStorage.getItem(l0);return(!n||t-e>oj)&&(n=Qw(),sessionStorage.setItem(l0,n)),sessionStorage.setItem(c0,String(t)),n}catch{return"sess"}}function eS(){if(typeof window>"u")return{};const t=new URL(window.location.href).searchParams,e=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],n={};let a=!1;for(const o of e){const l=t.get(o);l&&(n[o]=l.slice(0,120),a=!0)}if(a){try{sessionStorage.setItem(u0,JSON.stringify(n))}catch{}return n}try{const o=sessionStorage.getItem(u0);return o?JSON.parse(o):{}}catch{return{}}}function lj(){const t=navigator.userAgent||"",e=/Mobi|Android|iPhone|iPad|iPod/i.test(t),a=/iPad|Tablet/i.test(t)?"tablet":e?"mobile":"desktop";let o="other";/Edg\//.test(t)?o="edge":/Chrome\//.test(t)&&!/Edg\//.test(t)?o="chrome":/Safari\//.test(t)&&!/Chrome\//.test(t)?o="safari":/Firefox\//.test(t)&&(o="firefox");let l="other";return/Windows/.test(t)?l="windows":/Mac OS X/.test(t)?l="macos":/Android/.test(t)?l="android":/iPhone|iPad|iPod/.test(t)?l="ios":/Linux/.test(t)&&(l="linux"),{device_type:a,browser:o,os:l}}const d0="ll_visit_logged";async function cj(){if(typeof window>"u"||Jw(window.location.pathname))return;const t=Ww();try{if(sessionStorage.getItem(d0)===t)return}catch{}const e=Xw(),n=eS(),a=lj(),o={visitor_id:e,session_id:t,landing_path:window.location.pathname+window.location.search,referrer:document.referrer?.slice(0,500)||null,utm_source:n.utm_source??null,utm_medium:n.utm_medium??null,utm_campaign:n.utm_campaign??null,utm_content:n.utm_content??null,utm_term:n.utm_term??null,...a,user_agent:navigator.userAgent?.slice(0,500)||null};try{const{error:l}=await Rr.from("analytics_visits").insert(o);l||sessionStorage.setItem(d0,t)}catch{}}async function uj(t,e={}){if(typeof window>"u")return;const n=e.path??window.location.pathname;if(Jw(n))return;const a=eS(),o={visitor_id:Xw(),session_id:Ww(),event_name:t.slice(0,80),path:n,utm_source:a.utm_source??null,utm_medium:a.utm_medium??null,utm_campaign:a.utm_campaign??null,value_cents:e.valueCents??null,reference_type:e.referenceType??null,reference_id:e.referenceId??null,metadata:e.metadata??{}};try{await Rr.from("analytics_events").insert(o)}catch{}}async function dj(t){await uj("page_view",{path:t??window.location.pathname})}const wu={aggressive_caching:!0,image_optimization:!0,analytics_logging:!0,diagnostic_profiling:!1,internal_ip_list:[]},tS="ll_perf_settings_v1";let Lo=null,So=null;function fj(){return typeof window>"u"?!1:window.location.pathname.startsWith("/admin")}function hj(){if(typeof window>"u")return null;try{const t=window.localStorage.getItem(tS);if(!t)return null;const e=JSON.parse(t);return{...wu,...e}}catch{return null}}function nS(t){if(!(typeof window>"u"))try{window.localStorage.setItem(tS,JSON.stringify(t))}catch{}}function rS(){if(Lo)return Lo;const t=hj();return t?(Lo=t,t):wu}async function sS(){if(!fj())return rS();if(So)return So;So=(async()=>{const{data:t}=await Rr.from("performance_settings").select("aggressive_caching, image_optimization, analytics_logging, diagnostic_profiling, internal_ip_list").eq("id",!0).maybeSingle(),e={...wu,...t??{}};return Lo=e,nS(e),e})();try{return await So}finally{So=null}}function aS(){const[t,e]=Y.useState(()=>rS());return Y.useEffect(()=>{let n=!1;return sS().then(a=>{n||e(a)}).catch(()=>{}),()=>{n=!0}},[]),t}async function p$(t){const{data:e,error:n}=await Rr.from("performance_settings").update({...t,updated_at:new Date().toISOString()}).eq("id",!0).select("aggressive_caching, image_optimization, analytics_logging, diagnostic_profiling, internal_ip_list").single();if(n)throw n;const a={...wu,...e};return Lo=a,nS(a),a}function f0(){const t=oi({select:n=>n.location.pathname}),{analytics_logging:e}=aS();return Y.useEffect(()=>{e&&cj()},[e]),Y.useEffect(()=>{e&&(t.startsWith("/admin")||t.startsWith("/lovable")||dj(t))},[t,e]),null}const h0={member:1,staff:2,manager:3,admin:4,super_admin:5};async function pj(t,e,n){const{data:a}=await t.from("user_roles").select("role").eq("user_id",e);return(a??[]).reduce((l,u)=>Math.max(l,h0[u.role]??0),0)>=h0[n]}function mj(t,e){if(!t)return!1;for(const n of e){const a=n.trim();if(!a)continue;if(a===t)return!0;const o=a.match(/^(\d+\.\d+\.\d+)\.\d+\/24$/);if(o&&t.startsWith(o[1]+"."))return!0;const l=a.match(/^(\d+\.\d+)\.\d+\.\d+\/16$/);if(l&&t.startsWith(l[1]+"."))return!0}return!1}let zc=null;async function gj(){try{const{data:t}=await Rr.auth.getUser();if(t.user&&await pj(Rr,t.user.id,"staff"))return!0}catch{}try{const e=(await sS()).internal_ip_list??[];if(!e.length)return!1;const a=await(await fetch("/api/public/analytics/client-ip")).json();return!!a?.ip&&mj(a.ip,e)}catch{return!1}}function iS(){return zc||(zc=gj()),zc}function oS(){zc=null}function Uh(t){if(typeof window>"u")return;const e=window.requestIdleCallback;e?e(t,{timeout:3e3}):window.setTimeout(t,1200)}const $h="G-FJBHBBLWNX",yj=["/admin","/staff","/app"],vj=/HeadlessChrome|PhantomJS|Puppeteer|Playwright|Selenium|Googlebot|bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|AhrefsBot|SemrushBot|MJ12bot|DotBot|PetalBot|facebookexternalhit|Twitterbot|LinkedInBot|WhatsApp|TelegramBot|Applebot|crawler|spider|bot\b/i,p0="ll_ga_debug";function bj(t){return yj.some(e=>t===e||t.startsWith(e+"/"))}let m0=!1;function _j(){if(typeof window>"u"||m0)return;m0=!0,window.dataLayer=window.dataLayer||[],typeof window.gtag!="function"&&(window.gtag=function(){window.dataLayer.push(arguments)}),window.gtag("js",new Date),window.gtag("config",$h,{send_page_view:!1});const t=document.createElement("script");
40t.async=!0,t.src=`https://www.googletagmanager.com/gtag/js?id=${$h}`,document.head.appendChild(t)}function wj(){return typeof navigator>"u"?!1:navigator.webdriver?!0:vj.test(navigator.userAgent||"")}function Sj(){if(typeof window>"u")return!1;try{return new URLSearchParams(window.location.search).get("ga_debug")==="1"?(sessionStorage.setItem(p0,"1"),!0):sessionStorage.getItem(p0)==="1"}catch{return!1}}function g0(){const t=oi({select:d=>d.location.pathname}),e=oi({select:d=>d.location.searchStr??""}),[n,a]=Y.useState(()=>Sj()?"test":"external"),o=Y.useRef(!1),[l,u]=Y.useState(!1);return Y.useEffect(()=>{o.current=wj(),!o.current&&Uh(()=>{_j(),u(!0)})},[]),Y.useEffect(()=>{if(o.current||n==="test")return;let d=!1;async function h(){const g=await iS();!d&&g&&a("internal")}Uh(()=>{d||h()});const{data:m}=Rr.auth.onAuthStateChange(()=>{d||(oS(),h())});return()=>{d=!0,m.subscription.unsubscribe()}},[n]),Y.useEffect(()=>{l&&(typeof window>"u"||typeof window.gtag!="function"||o.current||bj(t)||(window.gtag("set",{traffic_type:n}),window.gtag("event","page_view",{send_to:$h,page_path:t+e,page_location:window.location.href,page_title:document.title,traffic_type:n})))},[t,e,n,l]),null}const lS="1936826743695393",Ej="1349963947348855",Rj=[{id:lS,name:"global"},{id:Ej,name:"golf",routePrefix:"/golf-simulator"}],Tj=["/admin","/staff","/app"],Aj=/HeadlessChrome|PhantomJS|Puppeteer|Playwright|Selenium|Googlebot|bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|AhrefsBot|SemrushBot|MJ12bot|DotBot|PetalBot|facebookexternalhit|Twitterbot|LinkedInBot|WhatsApp|TelegramBot|Applebot|crawler|spider|bot\b/i,Cj="ll_ga_debug",y0=new Set;function xj(t){return Tj.some(e=>t===e||t.startsWith(e+"/"))}function kj(){return typeof navigator>"u"?!1:navigator.webdriver?!0:Aj.test(navigator.userAgent||"")}function Oj(){if(typeof window>"u")return!1;try{return new URLSearchParams(window.location.search).get("ga_debug")==="1"?!0:sessionStorage.getItem(Cj)==="1"}catch{return!1}}function Lj(t){return xj(t)?[]:Rj.filter(e=>e.routePrefix?t===e.routePrefix||t.startsWith(e.routePrefix+"/"):!0)}function Nj(){typeof window>"u"||window.fbq||(function(t,e,n,a){if(t.fbq)return;const o=t.fbq=function(){o.callMethod?o.callMethod.apply(o,arguments):o.queue.push(arguments)};t._fbq||(t._fbq=o),o.push=o,o.loaded=!0,o.version="2.0",o.queue=[];const l=e.createElement(n);l.async=!0,l.src=a;const u=e.getElementsByTagName(n)[0];u.parentNode.insertBefore(l,u)})(window,document,"script","https://connect.facebook.net/en_US/fbevents.js")}function jj(t){if(!(typeof window>"u"||!window.fbq))for(const e of t)y0.has(e)||(window.fbq("init",e),y0.add(e))}function v0(){const t=oi({select:d=>d.location.pathname}),e=oi({select:d=>d.location.searchStr??""}),[n,a]=Y.useState(()=>Oj()),[o,l]=Y.useState(!1),u=Y.useRef(!1);return Y.useEffect(()=>{u.current=kj(),l(!0)},[]),Y.useEffect(()=>{if(n)return;let d=!1;async function h(){const g=await iS();!d&&g&&a(!0)}Uh(()=>{d||h()});const{data:m}=Rr.auth.onAuthStateChange(()=>{d||(oS(),h())});return()=>{d=!0,m.subscription.unsubscribe()}},[n]),Y.useEffect(()=>{if(!o||typeof window>"u"||u.current||n)return;const d=Lj(t);if(d.length!==0){Nj(),jj(d.map(h=>h.id));for(const h of d)window.fbq?.("trackSingle",h.id,"PageView")}},[t,e,o,n]),null}function m$(t,e,n){if(typeof window>"u"||!window.fbq)return;const a=n?.pixelId??lS;window.fbq("trackSingle",a,t,e??{})}function b0(){const{diagnostic_profiling:t}=aS();return Y.useEffect(()=>{if(!t||typeof window>"u"||!("PerformanceObserver"in window))return;const e=(o,l,u)=>{console.info(`[perf] ${o}: ${l.toFixed(1)}ms`,u??"")},n=[],a=(o,l)=>{try{const u=new PerformanceObserver(d=>l(d.getEntries()));u.observe({type:o,buffered:!0}),n.push(u)}catch{}};return a("largest-contentful-paint",o=>{const l=o[o.length-1];l&&e("LCP",l.startTime,{size:l.size})}),a("paint",o=>{for(const l of o)l.name==="first-contentful-paint"&&e("FCP",l.startTime)}),a("layout-shift",o=>{let l=0;for(const u of o)u.hadRecentInput||(l+=u.value);l>0&&e("CLS",l*1e3,{note:"cumulative x1000"})}),a("event",o=>{for(const l of o)l.duration>40&&e(`INP-candidate:${l.name}`,l.duration)}),a("navigation",o=>{for(const l of o)e("TTFB",l.responseStart-l.requestStart)}),()=>
40{n.forEach(o=>o.disconnect())}},[t]),null}function Pj(){return D.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:D.jsxs("div",{className:"max-w-md text-center",children:[D.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),D.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),D.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),D.jsx("div",{className:"mt-6",children:D.jsx(Gs,{to:"/",className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Go home"})})]})})}function Mj({error:t,reset:e}){console.error(t);const n=kt();return D.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:D.jsxs("div",{className:"max-w-md text-center",children:[D.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),D.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Something went wrong on our end. You can try refreshing or head back home."}),D.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[D.jsx("button",{onClick:()=>{n.invalidate(),e()},className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Try again"}),D.jsx("a",{href:"/",className:"inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:"Go home"})]})]})})}const Ge=D1()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Legacy Lounge â Private Lounge in Charleston, SC"},{name:"description",content:"Charleston's destination for a private lounge experience and golf simulator. Locally owned luxury lounge on Clements Ferry Road."},{name:"author",content:"Legacy Lounge"},{property:"og:title",content:"Legacy Lounge â Private Lounge in Charleston, SC"},{property:"og:description",content:"Charleston's destination for a private lounge experience and golf simulator. Locally owned luxury lounge on Clements Ferry Road."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"},{name:"twitter:site",content:"@LegacyLoungeSC"},{name:"twitter:title",content:"Legacy Lounge â Private Lounge in Charleston, SC"},{name:"twitter:description",content:"Charleston's destination for a private lounge experience and golf simulator. Locally owned luxury lounge on Clements Ferry Road."},{name:"google-site-verification",content:"ybbphmDLgWWROiwqCWLeaMcYNy_sUsnZgTXRYhMYOuo"},{property:"og:restrictions:age",content:"21+"},{property:"og:restrictions:country:allowed",content:"US"},{name:"rating",content:"adult"},{name:"age-restriction",content:"21+"}],links:[{rel:"stylesheet",href:K2},{rel:"icon",type:"image/png",href:"/favicon.png"},{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:""},{rel:"preconnect",href:"https://cvygpdykveciblknurfg.supabase.co",crossOrigin:""},{rel:"dns-prefetch",href:"https://cvygpdykveciblknurfg.supabase.co"},{rel:"preconnect",href:"https://www.googletagmanager.com"},{rel:"preconnect",href:"https://www.google-analytics.com"},{rel:"preconnect",href:"https://connect.facebook.net"},{rel:"dns-prefetch",href:"https://connect.facebook.net"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap"}]}),shellComponent:Dj,component:Ij,notFoundComponent:Pj,errorComponent:Mj});function Dj({children:t}){return D.jsxs("html",{lang:"en",children:[D.jsx("head",{children:D.jsx(rk,{})}),D.jsxs("body",{children:[t,D.jsx(sk,{})]})]})}function Ij(){const{queryClient:t}=Ge.useRouteContext(),e=oi({select:o=>o.location.pathname}),n=e.startsWith("/app")||e.startsWith("/admin")||e.startsWith("/auth")||e.startsWith("/event-manager"),a=e.startsWith("/golf-simulator");return n?D.jsxs(Qb,{client:t,children:[D.jsx(f0,{}),D.jsx(g0,{}),D.jsx(v0,{}),D.jsx(b0,{}),D.jsx("div",{className:"min-h-screen",children:D.jsx(_h,{})})]}):D.jsxs(Qb,{client:t,children:[D.jsx(f0,{}),D.jsx(g0,{}),D.jsx(v0,{}),D.jsx(b0,{}),D.jsx(sj,{mode:a?"simple":"full"}),D.jsxs("div",{className:"flex min-h-screen flex-col",children:[D.jsx(ej,{}),D.jsx("main",{className:"flex-1",children:D.jsx(_h,{})})]})]})}const Uj="modulepreload",$j=function(t){return"/"+t},_0={}
40,W=function(e,n,a){let o=Promise.resolve();if(n&&n.length>0){let h=function(m){return Promise.all(m.map(g=>Promise.resolve(g).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");o=h(n.map(m=>{if(m=$j(m),m in _0)return;_0[m]=!0;const g=m.endsWith(".css"),y=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${y}`))return;const b=document.createElement("link");if(b.rel=g?"stylesheet":Uj,g||(b.as="script"),b.crossOrigin="",b.href=m,d&&b.setAttribute("nonce",d),document.head.appendChild(b),g)return new Promise((_,S)=>{b.addEventListener("load",_),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${m}`)))})}))}function l(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return o.then(u=>{for(const d of u||[])d.status==="rejected"&&l(d.reason);return e().catch(l)})};var He;(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function n(o){throw new Error}t.assertNever=n,t.arrayToEnum=o=>{const l={};for(const u of o)l[u]=u;return l},t.getValidEnumValues=o=>{const l=t.objectKeys(o).filter(d=>typeof o[o[d]]!="number"),u={};for(const d of l)u[d]=o[d];return t.objectValues(u)},t.objectValues=o=>t.objectKeys(o).map(function(l){return o[l]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const l=[];for(const u in o)Object.prototype.hasOwnProperty.call(o,u)&&l.push(u);return l},t.find=(o,l)=>{for(const u of o)if(l(u))return u},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function a(o,l=" | "){return o.map(u=>typeof u=="string"?`'${u}'`:u).join(l)}t.joinValues=a,t.jsonStringifyReplacer=(o,l)=>typeof l=="bigint"?l.toString():l})(He||(He={}));var w0;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(w0||(w0={}));const de=He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ns=t=>{switch(typeof t){case"undefined":return de.undefined;case"string":return de.string;case"number":return Number.isNaN(t)?de.nan:de.number;case"boolean":return de.boolean;case"function":return de.function;case"bigint":return de.bigint;case"symbol":return de.symbol;case"object":return Array.isArray(t)?de.array:t===null?de.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?de.promise:typeof Map<"u"&&t instanceof Map?de.map:typeof Set<"u"&&t instanceof Set?de.set:typeof Date<"u"&&t instanceof Date?de.date:de.object;default:return de.unknown}}
vendor: 45,467 bytes, line 40
40,J=He.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 Tr extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(l){return l.message},a={_errors:[]},o=l=>{for(const u of l.issues)if(u.code==="invalid_union")u.unionErrors.map(o);else if(u.code==="invalid_return_type")o(u.returnTypeError);else if(u.code==="invalid_arguments")o(u.argumentsError);else if(u.path.length===0)a._errors.push(n(u));else{let d=a,h=0;for(;h<u.path.length;){const m=u.path[h];h===u.path.length-1?(d[m]=d[m]||{_errors:[]},d[m]._errors.push(n(u))):d[m]=d[m]||{_errors:[]},d=d[m],h++}}};return o(this),a}static assert(e){if(!(e instanceof Tr))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},a=[];for(const o of this.issues)if(o.path.length>0){const l=o.path[0];n[l]=n[l]||[],n[l].push(e(o))}else a.push(e(o));return{formErrors:a,fieldErrors:n}}get formErrors(){return this.flatten()}}Tr.create=t=>new Tr(t);const zh=(t,e)=>{let n;switch(t.code){case J.invalid_type:t.received===de.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case J.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,He.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:n=`Unrecognized key(s) in object: ${He.joinValues(t.keys,", ")}`;break;case J.invalid_union:n="Invalid input";break;case J.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${He.joinValues(t.options)}`;break;case J.invalid_enum_value:n=`Invalid enum value. Expected ${He.joinValues(t.options)}, received '${t.received}'`;break;case J.invalid_arguments:n="Invalid function arguments";break;case J.invalid_return_type:n="Invalid function return type";break;case J.invalid_date:n="Invalid date";break;case J.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:He.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case J.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case J.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case J.custom:n="Invalid input";break;case J.invalid_intersection_types:n="Intersection results could not be merged";break;case J.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case J.not_finite:n="Number must be finite";break;default:n=e.defaultError,He.assertNever(t)}return{message:n}};let zj=zh;function Bj(){return zj}const qj=t=>{const{data:e,path:n,errorMaps:a,issueData:o}=t,l=[...n,...o.path||[]],u={...o,path:l};if(o.message!==void 0)return{...o,path:l,message:o.message};let d="";const h=a.filter(m=>!!m).slice().reverse();for(const m of h)d=m(u,{data:e,defaultError:d}).message;return{...o,path:l,message:d}};function ae(t,e){const n=Bj(),a=qj({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===zh?void 0:zh].filter(o=>!!o)});t.common.issues.push(a)}class hn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const a=[];for(const o of n){if(o.status==="aborted")return Se;o.status==="dirty"&&e.dirty(),a.push(o.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,n){const a=[];for(const o of n){const l=await o.key,u=await o.value;a.push({key:l,value:u})}return hn.mergeObjectSync(e,a)}static mergeObjectSync(e,n){const a={};for(const o of n){const{key:l,value:u}=o;if(l.status==="aborted"||u.status==="aborted")return Se;l.status==="dirty"&&e.dirty(),u.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof u.value<"u"||o.alwaysSet)&&(a[l.value]=u.value)}return{status:e.value,value:a}}}const Se=Object.freeze({status:"aborted"}),Co=t=>({status:"dirty",value:t}),An=t=>({status:"valid",value:t}),S0=t=>t.status==="aborted",E0=t=>t.status==="dirty",li=t=>t.status==="valid",su=t=>typeof Promise<"u"&&t instanceof Promise;var pe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(pe||(pe={}));class hs{constructor(e,n,a,o){this._cachedPath=[],this.parent=e,this.data=n,this._path=a,this._key=o}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 R0=(t,e)=>{if(li(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Tr(t.common.issues);return this._error=n,this._error}}};function ke(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:a,description:o}=t;if(e&&(n||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(u,d)=>{const{message:h}=t;return u.code==="invalid_enum_value"?{message:h??d.defaultError}:typeof d.data>"u"?{message:h??a??d.defaultError}:u.code!=="invalid_type"?{message:d.defaultError}:{message:h??n??d.defaultError}},description:o}}class Ue{get description(){return this._def.description}_getType(e){return ns(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:ns(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new hn,ctx:{common:e.parent.common,data:e.data,parsedType:ns(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(su(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const a=this.safeParse(e,n);if(a.success)return a.data;throw a.error}safeParse(e,n){const a={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ns(e)},o=this._parseSync({data:e,path:a.path,parent:a});return R0(a,o)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ns(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:n});return li(a)?{value:a.value}:{issues:n.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(a=>li(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(e,n){const a=await this.safeParseAsync(e,n);if(a.success)return a.data;throw a.error}async safeParseAsync(e,n){const a={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ns(e)},o=this._parse({data:e,path:a.path,parent:a}),l=await(su(o)?o:Promise.resolve(o));return R0(a,l)}refine(e,n){const a=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,l)=>{const u=e(o),d=()=>l.addIssue({code:J.custom,...a(o)});return typeof Promise<"u"&&u instanceof Promise?u.then(h=>h?!0:(d(),!1)):u?!0:(d(),!1)})}refinement(e,n){return this._refinement((a,o)=>e(a)?!0:(o.addIssue(typeof n=="function"?n(a,o):n),!1))}_refinement(e){return new di({schema:this,typeName:Ee.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return fs.create(this,this._def)}nullable(){return fi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Gn.create(this)}promise(){return lu.create(this,this._def)}or(e){return iu.create([this,e],this._def)}and(e){return ou.create(this,e,this._def)}transform(e){return new di({...ke(this._def),schema:this,typeName:Ee.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new qh({...ke(this._def),innerType:this,defaultValue:n,typeName:Ee.ZodDefault})}brand(){return new dP({typeName:Ee.ZodBranded,type:this,...ke(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Hh({...ke(this._def),innerType:this,catchValue:n,typeName:Ee.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return cp.create(this,e)}readonly(){return Vh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Hj=/^c[^\s-]{8,}$/i,Vj=/^[0-9a-z]+$/,Gj=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Fj=/^[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,Kj=/^[a-z0-9_-]{21}$/i,Yj=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Zj=/^[-+]?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)?)??$/,Jj=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Qj="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let uh;const Xj=/^(?:(?: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])$/,Wj=/^(?:(?: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])$/,eP=/^(([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]))$/,tP=/^(([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])$/,nP=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rP=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,cS="((\\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])))",sP=new RegExp(`^${cS}$`);function uS(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function aP(t){return new RegExp(`^${uS(t)}$`)}function iP(t){let e=`${cS}T${uS(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function oP(t,e){return!!((e==="v4"||!e)&&Xj.test(t)||(e==="v6"||!e)&&eP.test(t))}function lP(t,e){if(!Yj.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const a=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(a));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function cP(t,e){return!!((e==="v4"||!e)&&Wj.test(t)||(e==="v6"||!e)&&tP.test(t))}class wr extends Ue{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==de.string){const l=this._getOrReturnCtx(e);return ae(l,{code:J.invalid_type,expected:de.string,received:l.parsedType}),Se}const a=new hn;let o;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(o=this._getOrReturnCtx(e,o),ae(o,{code:J.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),a.dirty());else if(l.kind==="max")e.data.length>l.value&&(o=this._getOrReturnCtx(e,o),ae(o,{code:J.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),a.dirty());else if(l.kind==="length"){const u=e.data.length>l.value,d=e.data.length<l.value;(u||d)&&(o=this._getOrReturnCtx(e,o),u?ae(o,{code:J.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&ae(o,{code:J.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),a.dirty())}else if(l.kind==="email")Jj.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"email",code:J.invalid_string,message:l.message}),a.dirty());else if(l.kind==="emoji")uh||(uh=new RegExp(Qj,"u")),uh.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"emoji",code:J.invalid_string,message:l.message}),a.dirty());else if(l.kind==="uuid")Fj.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"uuid",code:J.invalid_string,message:l.message}),a.dirty());else if(l.kind==="nanoid")Kj.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"nanoid",code:J.invalid_string,message:l.message}),a.dirty());else if(l.kind==="cuid")Hj.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"cuid",code:J.invalid_string,message:l.message}),a.dirty());else if(l.kind==="cuid2")Vj.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"cuid2",code:J.invalid_string,message:l.message}),a.dirty());else if(l.kind==="ulid")Gj.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"ulid",code:J.invalid_string,message:l.message}),a.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),ae(o,{validation:"url",code:J.invalid_string,message:l.message}),a.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"regex",code:J.invalid_string,message:l.message}),a.dirty())):l.kind==="trim"?e.data=e.data.trim():l.kind==="includes"?e.data.includes(l.value,l.position)||(o=this._getOrReturnCtx(e,o),ae(o,{code:J.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),a.dirty()):l.kind==="toLowerCase"?e.data=e.data.toLowerCase():l.kind==="toUpperCase"?e.data=e.data.toUpperCase():l.kind==="startsWith"?e.data.startsWith(l.value)||(o=this._getOrReturnCtx(e,o),ae(o,{code:J.invalid_string,validation:{startsWith:l.value},message:l.message}),a.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(o=this._getOrReturnCtx(e,o),ae(o,{code:J.invalid_string,validation:{endsWith:l.value},message:l.message}),a.dirty()):l.kind==="datetime"?iP(l).test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{code:J.invalid_string,validation:"datetime",message:l.message}),a.dirty()):l.kind==="date"?sP.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{code:J.invalid_string,validation:"date",message:l.message}),a.dirty()):l.kind==="time"?aP(l).test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{code:J.invalid_string,validation:"time",message:l.message}),a.dirty()):l.kind==="duration"?Zj.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"duration",code:J.invalid_string,message:l.message}),a.dirty()):l.kind==="ip"?oP(e.data,l.version)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"ip",code:J.invalid_string,message:l.message}),a.dirty()):l.kind==="jwt"?lP(e.data,l.alg)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"jwt",code:J.invalid_string,message:l.message}),a.dirty()):l.kind==="cidr"?cP(e.data,l.version)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"cidr",code:J.invalid_string,message:l.message}),a.dirty()):l.kind==="base64"?nP.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"base64",code:J.invalid_string,message:l.message}),a.dirty()):l.kind==="base64url"?rP.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"base64url",code:J.invalid_string,message:l.message}),a.dirty()):He.assertNever(l);return{status:a.value,value:e.data}}_regex(e,n,a){return this.refinement(o=>e.test(o),{validation:n,code:J.invalid_string,...pe.errToObj(a)})}_addCheck(e){return new wr({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...pe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...pe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...pe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...pe.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...pe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...pe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...pe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...pe.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...pe.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...pe.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...pe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...pe.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...pe.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...pe.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...pe.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...pe.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...pe.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...pe.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...pe.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...pe.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...pe.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...pe.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...pe.errToObj(n)})}nonempty(e){return this.min(1,pe.errToObj(e))}trim(){return new wr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new wr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new wr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}wr.create=t=>new wr({checks:[],typeName:Ee.ZodString,coerce:t?.coerce??!1,...ke(t)});function uP(t,e){const n=(t.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,o=n>a?n:a,l=Number.parseInt(t.toFixed(o).replace(".","")),u=Number.parseInt(e.toFixed(o).replace(".",""));return l%u/10**o}class Qs extends Ue{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==de.number){const l=this._getOrReturnCtx(e);return ae(l,{code:J.invalid_type,expected:de.number,received:l.parsedType}),Se}let a;const o=new hn;for(const l of this._def.checks)l.kind==="int"?He.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{code:J.invalid_type,expected:"integer",received:"float",message:l.message}),o.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(a=this._getOrReturnCtx(e,a),ae(a,{code:J.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(a=this._getOrReturnCtx(e,a),ae(a,{code:J.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="multipleOf"?uP(e.data,l.value)!==0&&(a=this._getOrReturnCtx(e,a),ae(a,{code:J.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{code:J.not_finite,message:l.message}),o.dirty()):He.assertNever(l);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,pe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,pe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,pe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,pe.toString(n))}setLimit(e,n,a,o){return new Qs({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:a,message:pe.toString(o)}]})}_addCheck(e){return new Qs({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:pe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:pe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:pe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:pe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:pe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:pe.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:pe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:pe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:pe.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&He.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(n===null||a.value>n)&&(n=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Qs.create=t=>new Qs({checks:[],typeName:Ee.ZodNumber,coerce:t?.coerce||!1,...ke(t)});class Xs extends Ue{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==de.bigint)return this._getInvalidInput(e);let a;const o=new hn;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(a=this._getOrReturnCtx(e,a),ae(a,{code:J.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(a=this._getOrReturnCtx(e,a),ae(a,{code:J.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),ae(a,{code:J.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):He.assertNever(l);return{status:o.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return ae(n,{code:J.invalid_type,expected:de.bigint,received:n.parsedType}),Se}gte(e,n){return this.setLimit("min",e,!0,pe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,pe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,pe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,pe.toString(n))}setLimit(e,n,a,o){return new Xs({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:a,message:pe.toString(o)}]})}_addCheck(e){return new Xs({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:pe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:pe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:pe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:pe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:pe.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Xs.create=t=>new Xs({checks:[],typeName:Ee.ZodBigInt,coerce:t?.coerce??!1,...ke(t)});class au extends Ue{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==de.boolean){const a=this._getOrReturnCtx(e);return ae(a,{code:J.invalid_type,expected:de.boolean,received:a.parsedType}),Se}return An(e.data)}}au.create=t=>new au({typeName:Ee.ZodBoolean,coerce:t?.coerce||!1,...ke(t)});class ci extends Ue{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==de.date){const l=this._getOrReturnCtx(e);return ae(l,{code:J.invalid_type,expected:de.date,received:l.parsedType}),Se}if(Number.isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return ae(l,{code:J.invalid_date}),Se}const a=new hn;let o;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(o=this._getOrReturnCtx(e,o),ae(o,{code:J.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),a.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(o=this._getOrReturnCtx(e,o),ae(o,{code:J.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),a.dirty()):He.assertNever(l);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ci({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:pe.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:pe.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}ci.create=t=>new ci({checks:[],coerce:t?.coerce||!1,typeName:Ee.ZodDate,...ke(t)});class T0 extends Ue{_parse(e){if(this._getType(e)!==de.symbol){const a=this._getOrReturnCtx(e);return ae(a,{code:J.invalid_type,expected:de.symbol,received:a.parsedType}),Se}return An(e.data)}}T0.create=t=>new T0({typeName:Ee.ZodSymbol,...ke(t)});class A0 extends Ue{_parse(e){if(this._getType(e)!==de.undefined){const a=this._getOrReturnCtx(e);return ae(a,{code:J.invalid_type,expected:de.undefined,received:a.parsedType}),Se}return An(e.data)}}A0.create=t=>new A0({typeName:Ee.ZodUndefined,...ke(t)});class C0 extends Ue{_parse(e){if(this._getType(e)!==de.null){const a=this._getOrReturnCtx(e);return ae(a,{code:J.invalid_type,expected:de.null,received:a.parsedType}),Se}return An(e.data)}}C0.create=t=>new C0({typeName:Ee.ZodNull,...ke(t)});class x0 extends Ue{constructor(){super(...arguments),this._any=!0}_parse(e){return An(e.data)}}x0.create=t=>new x0({typeName:Ee.ZodAny,...ke(t)});class k0 extends Ue{constructor(){super(...arguments),this._unknown=!0}_parse(e){return An(e.data)}}k0.create=t=>new k0({typeName:Ee.ZodUnknown,...ke(t)});class ps extends Ue{_parse(e){const n=this._getOrReturnCtx(e);return ae(n,{code:J.invalid_type,expected:de.never,received:n.parsedType}),Se}}ps.create=t=>new ps({typeName:Ee.ZodNever,...ke(t)});class O0 extends Ue{_parse(e){if(this._getType(e)!==de.undefined){const a=this._getOrReturnCtx(e);return ae(a,{code:J.invalid_type,expected:de.void,received:a.parsedType}),Se}return An(e.data)}}O0.create=t=>new O0({typeName:Ee.ZodVoid,...ke(t)});class Gn extends Ue{_parse(e){const{ctx:n,status:a}=this._processInputParams(e),o=this._def;if(n.parsedType!==de.array)return ae(n,{code:J.invalid_type,expected:de.array,received:n.parsedType}),Se;if(o.exactLength!==null){const u=n.data.length>o.exactLength.value,d=n.data.length<o.exactLength.value;(u||d)&&(ae(n,{code:u?J.too_big:J.too_small,minimum:d?o.exactLength.value:void 0,maximum:u?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),a.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ae(n,{code:J.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),a.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ae(n,{code:J.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),a.dirty()),n.common.async)return Promise.all([...n.data].map((u,d)=>o.type._parseAsync(new hs(n,u,n.path,d)))).then(u=>hn.mergeArray(a,u));const l=[...n.data].map((u,d)=>o.type._parseSync(new hs(n,u,n.path,d)));return hn.mergeArray(a,l)}get element(){return this._def.type}min(e,n){return new Gn({...this._def,minLength:{value:e,message:pe.toString(n)}})}max(e,n){return new Gn({...this._def,maxLength:{value:e,message:pe.toString(n)}})}length(e,n){return new Gn({...this._def,exactLength:{value:e,message:pe.toString(n)}})}nonempty(e){return this.min(1,e)}}Gn.create=(t,e)=>new Gn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ee.ZodArray,...ke(e)});function Xa(t){if(t instanceof bt){const e={};for(const n in t.shape){const a=t.shape[n];e[n]=fs.create(Xa(a))}return new bt({...t._def,shape:()=>e})}else return t instanceof Gn?new Gn({...t._def,type:Xa(t.element)}):t instanceof fs?fs.create(Xa(t.unwrap())):t instanceof fi?fi.create(Xa(t.unwrap())):t instanceof Ws?Ws.create(t.items.map(e=>Xa(e))):t}class bt extends Ue{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=He.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==de.object){const m=this._getOrReturnCtx(e);return ae(m,{code:J.invalid_type,expected:de.object,received:m.parsedType}),Se}const{status:a,ctx:o}=this._processInputParams(e),{shape:l,keys:u}=this._getCached(),d=[];if(!(this._def.catchall instanceof ps&&this._def.unknownKeys==="strip"))for(const m in o.data)u.includes(m)||d.push(m);const h=[];for(const m of u){const g=l[m],y=o.data[m];h.push({key:{status:"valid",value:m},value:g._parse(new hs(o,y,o.path,m)),alwaysSet:m in o.data})}if(this._def.catchall instanceof ps){const m=this._def.unknownKeys;if(m==="passthrough")for(const g of d)h.push({key:{status:"valid",value:g},value:{status:"valid",value:o.data[g]}});else if(m==="strict")d.length>0&&(ae(o,{code:J.unrecognized_keys,keys:d}),a.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const g of d){const y=o.data[g];h.push({key:{status:"valid",value:g},value:m._parse(new hs(o,y,o.path,g)),alwaysSet:g in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const m=[];for(const g of h){const y=await g.key,b=await g.value;m.push({key:y,value:b,alwaysSet:g.alwaysSet})}return m}).then(m=>hn.mergeObjectSync(a,m)):hn.mergeObjectSync(a,h)}get shape(){return this._def.shape()}strict(e){return pe.errToObj,new bt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,a)=>{const o=this._def.errorMap?.(n,a).message??a.defaultError;return n.code==="unrecognized_keys"?{message:pe.errToObj(e).message??o}:{message:o}}}:{}})}strip(){return new bt({...this._def,unknownKeys:"strip"})}passthrough(){return new bt({...this._def,unknownKeys:"passthrough"})}extend(e){return new bt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new bt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ee.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new bt({...this._def,catchall:e})}pick(e){const n={};for(const a of He.objectKeys(e))e[a]&&this.shape[a]&&(n[a]=this.shape[a]);return new bt({...this._def,shape:()=>n})}omit(e){const n={};for(const a of He.objectKeys(this.shape))e[a]||(n[a]=this.shape[a]);return new bt({...this._def,shape:()=>n})}deepPartial(){return Xa(this)}partial(e){const n={};for(const a of He.objectKeys(this.shape)){const o=this.shape[a];e&&!e[a]?n[a]=o:n[a]=o.optional()}return new bt({...this._def,shape:()=>n})}required(e){const n={};for(const a of He.objectKeys(this.shape))if(e&&!e[a])n[a]=this.shape[a];else{let l=this.shape[a];for(;l instanceof fs;)l=l._def.innerType;n[a]=l}return new bt({...this._def,shape:()=>n})}keyof(){return dS(He.objectKeys(this.shape))}}bt.create=(t,e)=>new bt({shape:()=>t,unknownKeys:"strip",catchall:ps.create(),typeName:Ee.ZodObject,...ke(e)});bt.strictCreate=(t,e)=>new bt({shape:()=>t,unknownKeys:"strict",catchall:ps.create(),typeName:Ee.ZodObject,...ke(e)});bt.lazycreate=(t,e)=>new bt({shape:t,unknownKeys:"strip",catchall:ps.create(),typeName:Ee.ZodObject,...ke(e)});class iu extends Ue{_parse(e){const{ctx:n}=this._processInputParams(e),a=this._def.options;function o(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const u=l.map(d=>new Tr(d.ctx.common.issues));return ae(n,{code:J.invalid_union,unionErrors:u}),Se}if(n.common.async)return Promise.all(a.map(async l=>{const u={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:u}),ctx:u}})).then(o);{let l;const u=[];for(const h of a){const m={...n,common:{...n.common,issues:[]},parent:null},g=h._parseSync({data:n.data,path:n.path,parent:m});if(g.status==="valid")return g;g.status==="dirty"&&!l&&(l={result:g,ctx:m}),m.common.issues.length&&u.push(m.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=u.map(h=>new Tr(h));return ae(n,{code:J.invalid_union,unionErrors:d}),Se}}get options(){return this._def.options}}iu.create=(t,e)=>new iu({options:t,typeName:Ee.ZodUnion,...ke(e)});function Bh(t,e){const n=ns(t),a=ns(e);if(t===e)return{valid:!0,data:t};if(n===de.object&&a===de.object){const o=He.objectKeys(e),l=He.objectKeys(t).filter(d=>o.indexOf(d)!==-1),u={...t,...e};for(const d of l){const h=Bh(t[d],e[d]);if(!h.valid)return{valid:!1};u[d]=h.data}return{valid:!0,data:u}}else if(n===de.array&&a===de.array){if(t.length!==e.length)return{valid:!1};const o=[];for(let l=0;l<t.length;l++){const u=t[l],d=e[l],h=Bh(u,d);if(!h.valid)return{valid:!1};o.push(h.data)}return{valid:!0,data:o}}else return n===de.date&&a===de.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ou extends Ue{_parse(e){const{status:n,ctx:a}=this._processInputParams(e),o=(l,u)=>{if(S0(l)||S0(u))return Se;const d=Bh(l.value,u.value);return d.valid?((E0(l)||E0(u))&&n.dirty(),{status:n.value,value:d.data}):(ae(a,{code:J.invalid_intersection_types}),Se)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([l,u])=>o(l,u)):o(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}ou.create=(t,e,n)=>new ou({left:t,right:e,typeName:Ee.ZodIntersection,...ke(n)});class Ws extends Ue{_parse(e){const{status:n,ctx:a}=this._processInputParams(e);if(a.parsedType!==de.array)return ae(a,{code:J.invalid_type,expected:de.array,received:a.parsedType}),Se;if(a.data.length<this._def.items.length)return ae(a,{code:J.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Se;!this._def.rest&&a.data.length>this._def.items.length&&(ae(a,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...a.data].map((u,d)=>{const h=this._def.items[d]||this._def.rest;return h?h._parse(new hs(a,u,a.path,d)):null}).filter(u=>!!u);return a.common.async?Promise.all(l).then(u=>hn.mergeArray(n,u)):hn.mergeArray(n,l)}get items(){return this._def.items}rest(e){return new Ws({...this._def,rest:e})}}Ws.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ws({items:t,typeName:Ee.ZodTuple,rest:null,...ke(e)})};class L0 extends Ue{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:a}=this._processInputParams(e);if(a.parsedType!==de.map)return ae(a,{code:J.invalid_type,expected:de.map,received:a.parsedType}),Se;const o=this._def.keyType,l=this._def.valueType,u=[...a.data.entries()].map(([d,h],m)=>({key:o._parse(new hs(a,d,a.path,[m,"key"])),value:l._parse(new hs(a,h,a.path,[m,"value"]))}));if(a.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const h of u){const m=await h.key,g=await h.value;if(m.status==="aborted"||g.status==="aborted")return Se;(m.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(m.value,g.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const h of u){const m=h.key,g=h.value;if(m.status==="aborted"||g.status==="aborted")return Se;(m.status==="dirty"||g.status==="dirty")&&n.dirty(),d.set(m.value,g.value)}return{status:n.value,value:d}}}}L0.create=(t,e,n)=>new L0({valueType:e,keyType:t,typeName:Ee.ZodMap,...ke(n)});class Ko extends Ue{_parse(e){const{status:n,ctx:a}=this._processInputParams(e);if(a.parsedType!==de.set)return ae(a,{code:J.invalid_type,expected:de.set,received:a.parsedType}),Se;const o=this._def;o.minSize!==null&&a.data.size<o.minSize.value&&(ae(a,{code:J.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&a.data.size>o.maxSize.value&&(ae(a,{code:J.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const l=this._def.valueType;function u(h){const m=new Set;for(const g of h){if(g.status==="aborted")return Se;g.status==="dirty"&&n.dirty(),m.add(g.value)}return{status:n.value,value:m}}const d=[...a.data.values()].map((h,m)=>l._parse(new hs(a,h,a.path,m)));return a.common.async?Promise.all(d).then(h=>u(h)):u(d)}min(e,n){return new Ko({...this._def,minSize:{value:e,message:pe.toString(n)}})}max(e,n){return new Ko({...this._def,maxSize:{value:e,message:pe.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Ko.create=(t,e)=>new Ko({valueType:t,minSize:null,maxSize:null,typeName:Ee.ZodSet,...ke(e)});class N0 extends Ue{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}N0.create=(t,e)=>new N0({getter:t,typeName:Ee.ZodLazy,...ke(e)});class j0 extends Ue{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return ae(n,{received:n.data,code:J.invalid_literal,expected:this._def.value}),Se}return{status:"valid",value:e.data}}get value(){return this._def.value}}j0.create=(t,e)=>new j0({value:t,typeName:Ee.ZodLiteral,...ke(e)});function dS(t,e){return new ui({values:t,typeName:Ee.ZodEnum,...ke(e)})}class ui extends Ue{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),a=this._def.values;return ae(n,{expected:He.joinValues(a),received:n.parsedType,code:J.invalid_type}),Se}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),a=this._def.values;return ae(n,{received:n.data,code:J.invalid_enum_value,options:a}),Se}return An(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return ui.create(e,{...this._def,...n})}exclude(e,n=this._def){return ui.create(this.options.filter(a=>!e.includes(a)),{...this._def,...n})}}ui.create=dS;class P0 extends Ue{_parse(e){const n=He.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==de.string&&a.parsedType!==de.number){const o=He.objectValues(n);return ae(a,{expected:He.joinValues(o),received:a.parsedType,code:J.invalid_type}),Se}if(this._cache||(this._cache=new Set(He.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const o=He.objectValues(n);return ae(a,{received:a.data,code:J.invalid_enum_value,options:o}),Se}return An(e.data)}get enum(){return this._def.values}}P0.create=(t,e)=>new P0({values:t,typeName:Ee.ZodNativeEnum,...ke(e)});class lu extends Ue{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==de.promise&&n.common.async===!1)return ae(n,{code:J.invalid_type,expected:de.promise,received:n.parsedType}),Se;
vendor: 4,097 bytes, line 40
40const a=n.parsedType===de.promise?n.data:Promise.resolve(n.data);return An(a.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}lu.create=(t,e)=>new lu({type:t,typeName:Ee.ZodPromise,...ke(e)});class di extends Ue{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ee.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:a}=this._processInputParams(e),o=this._def.effect||null,l={addIssue:u=>{ae(a,u),u.fatal?n.abort():n.dirty()},get path(){return a.path}};if(l.addIssue=l.addIssue.bind(l),o.type==="preprocess"){const u=o.transform(a.data,l);if(a.common.async)return Promise.resolve(u).then(async d=>{if(n.value==="aborted")return Se;const h=await this._def.schema._parseAsync({data:d,path:a.path,parent:a});return h.status==="aborted"?Se:h.status==="dirty"||n.value==="dirty"?Co(h.value):h});{if(n.value==="aborted")return Se;const d=this._def.schema._parseSync({data:u,path:a.path,parent:a});return d.status==="aborted"?Se:d.status==="dirty"||n.value==="dirty"?Co(d.value):d}}if(o.type==="refinement"){const u=d=>{const h=o.refinement(d,l);if(a.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(a.common.async===!1){const d=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return d.status==="aborted"?Se:(d.status==="dirty"&&n.dirty(),u(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(d=>d.status==="aborted"?Se:(d.status==="dirty"&&n.dirty(),u(d.value).then(()=>({status:n.value,value:d.value}))))}if(o.type==="transform")if(a.common.async===!1){const u=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!li(u))return Se;const d=o.transform(u.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(u=>li(u)?Promise.resolve(o.transform(u.value,l)).then(d=>({status:n.value,value:d})):Se);He.assertNever(o)}}di.create=(t,e,n)=>new di({schema:t,typeName:Ee.ZodEffects,effect:e,...ke(n)});di.createWithPreprocess=(t,e,n)=>new di({schema:e,effect:{type:"preprocess",transform:t},typeName:Ee.ZodEffects,...ke(n)});class fs extends Ue{_parse(e){return this._getType(e)===de.undefined?An(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}fs.create=(t,e)=>new fs({innerType:t,typeName:Ee.ZodOptional,...ke(e)});class fi extends Ue{_parse(e){return this._getType(e)===de.null?An(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}fi.create=(t,e)=>new fi({innerType:t,typeName:Ee.ZodNullable,...ke(e)});class qh extends Ue{_parse(e){const{ctx:n}=this._processInputParams(e);let a=n.data;return n.parsedType===de.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}qh.create=(t,e)=>new qh({innerType:t,typeName:Ee.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ke(e)});class Hh extends Ue{_parse(e){const{ctx:n}=this._processInputParams(e),a={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return su(o)?o.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Tr(a.common.issues)},input:a.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Tr(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Hh.create=(t,e)=>new Hh({innerType:t,typeName:Ee.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ke(e)});class M0 extends Ue{_parse(e){if(this._getType(e)!==de.nan){const a=this._getOrReturnCtx(e);return ae(a,{code:J.invalid_type,expected:de.nan,received:a.parsedType}),Se}
40return{status:"valid",value:e.data}}}M0.create=t=>new M0({typeName:Ee.ZodNaN,...ke(t)});class dP extends Ue{_parse(e){const{ctx:n}=this._processInputParams(e),a=n.data;return this._def.type._parse({data:a,path:n.path,parent:n})}unwrap(){return this._def.type}}class cp extends Ue{_parse(e){const{status:n,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return l.status==="aborted"?Se:l.status==="dirty"?(n.dirty(),Co(l.value)):this._def.out._parseAsync({data:l.value,path:a.path,parent:a})})();{const o=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?Se:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:a.path,parent:a})}}static create(e,n){return new cp({in:e,out:n,typeName:Ee.ZodPipeline})}}class Vh extends Ue{_parse(e){const n=this._def.innerType._parse(e),a=o=>(li(o)&&(o.value=Object.freeze(o.value)),o);return su(n)?n.then(o=>a(o)):a(n)}unwrap(){return this._def.innerType}}Vh.create=(t,e)=>new Vh({innerType:t,typeName:Ee.ZodReadonly,...ke(e)});var Ee;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ee||(Ee={}));const hi=wr.create;Qs.create;Xs.create;au.create;ci.create;ps.create;Gn.create;const Xo=bt.create;iu.create;ou.create;Ws.create;const fP=ui.create;lu.create;fs.create;fi.create;const hP={string:(t=>wr.create({...t,coerce:!0})),number:(t=>Qs.create({...t,coerce:!0})),boolean:(t=>au.create({...t,coerce:!0})),bigint:(t=>Xs.create({...t,coerce:!0})),date:(t=>ci.create({...t,coerce:!0}))},pP=()=>W(()=>import("./unsubscribe-BE_-mJ71.js"),[]),mP=Xo({token:hi().min(6).max(400).optional()}),gP=ne("/unsubscribe")({head:()=>({meta:[{title:"Unsubscribe â Legacy Cigar Lounge"},{name:"robots",content:"noindex"}]}),validateSearch:t=>mP.parse(t),component:X(pP,"component")}),yP=()=>W(()=>import("./terms-of-service-CdvOeNVA.js"),[]),vP=ne("/terms-of-service")({head:()=>({meta:[{title:"Terms of Service â Legacy Lounge"},{name:"description",content:"The terms governing your use of Legacy Lounge's website, memberships, and on-site services in Charleston, SC."},{property:"og:title",content:"Terms of Service â Legacy Lounge"},{property:"og:description",content:"The terms governing your use of Legacy Lounge's website, memberships, and on-site services in Charleston, SC."},{property:"og:url",content:"https://legacycigarlounge.net/terms-of-service"},{property:"og:type",content:"website"}],links:[{rel:"canonical",href:"https://legacycigarlounge.net/terms-of-service"}]}),component:X(yP,"component")}),bP="/__l5e/assets-v1/a5d16eaa-e811-481b-af3e-d09f4bfc92e7/main-lounge.webp",fS={url:bP},_P="/__l5e/assets-v1/2b33e214-3bbf-4fa8-9769-d35210042969/lounge-wide.webp",hS={url:_P},wP="/__l5e/assets-v1/83c31c37-5119-47ee-8518-57cbc28b5043/lounge-humidor-loft.webp",pS={url:wP},SP="/__l5e/assets-v1/5d6abaa1-c4a7-42db-97eb-66dff46ba048/water-wall-seating.webp",mS={url:SP},EP="/__l5e/assets-v1/e1fdc6bd-dac5-4d71-ab26-fab62989b69a/staircase-loft.webp",gS={url:EP},RP="/__l5e/assets-v1/a65f3250-7aa2-410b-92bf-8ec41692ad12/bar-wine-wall.webp",yS={url:RP},TP="/__l5e/assets-v1/4685680d-9223-4df7-a209-382abf9b37de/bar-hallway.webp",AP={url:TP},CP="/__l5e/assets-v1/f16dbbd2-ea78-4da0-9625-01b5c4263ace/bar-front.webp",xP={url:CP},D0=[{url:fS.url,alt:"Main lounge at Legacy Lounge with leather seating and red walls",caption:"The Main Lounge"},{url:hS.url,alt:"Wide view of the Legacy Lounge floor with chandelier and loft",caption:"Chandelier & Loft"},{url:pS.url,alt:"Lounge seating beside the walk-in humidor at Legacy Lounge",caption:"Beside the Humidor"}
40,{url:mS.url,alt:"Illuminated water wall with leather club chairs",caption:"The Water Wall"},{url:gS.url,alt:"Lit staircase leading to the private second floor member lounge",caption:"Stairs to the Member Lounge"},{url:yS.url,alt:"Legacy Lounge bar top with wine wall behind it",caption:"The Bar & Wine Wall"},{url:AP.url,alt:"Cedar hallway leading past the bar at Legacy Lounge",caption:"Cedar Hallway"},{url:xP.url,alt:"Front of the Legacy Cigar Lounge bar with branded bar top",caption:"Front Bar"}],I0=fS.url,g$={membership:gS.url,golf:pS.url,reserve:hS.url,events:yS.url,gallery:mS.url},kP=xt({method:"GET"}).handler($t("5038e6532ac9f9e06cb2f5adcedb725eb2b84669a9c42308c008192ae0ab625a")),OP={responseTimeNote:"We typically respond to event inquiries within one business day.",amenities:["Premium walk-in cigar humidor","Luxury lounge seating","Golf simulator bay","Large-screen televisions","Food service","Beverage service","Dedicated event staff","High-speed Wi-Fi","Music & audio capabilities","Event-friendly lighting","Convenient on-site parking","Private & semi-private reservation options"].map(t=>({label:t,enabled:!0})),packages:[{name:"Light Bites",blurb:"Shareable plates and passed bites â suited to casual gatherings and networking nights.",priceLabel:"Quoted per group",enabled:!0},{name:"Social Package",blurb:"A fuller spread built for birthdays, watch parties, club nights, and social gatherings.",priceLabel:"Quoted per group",enabled:!0},{name:"Premium Event Package",blurb:"Our most complete food and beverage experience for corporate events, private parties, and larger groups.",priceLabel:"Quoted per group",enabled:!0}],faqs:[{q:"How many guests can Legacy accommodate?",a:"Our lounge comfortably hosts intimate groups of 10 up to larger gatherings of roughly 80 guests depending on format. Tell us your headcount and we'll confirm the right setup."},{q:"Can I reserve only part of the lounge?",a:"Yes. Reserved group areas let you hold a dedicated section while the lounge stays open to the public."},{q:"Can I reserve the entire lounge privately?",a:"Yes. Full private buyouts are available on select dates and times."},{q:"Is there a minimum spend?",a:"Private reservations may require a venue rental fee, a minimum event spend, or a combination of both depending on the date, time, duration, and group size."},{q:"Can food be included?",a:"Yes. We build food packages around your guest count, event length, and format."},{q:"Can drinks be included?",a:"Yes. Beverage service can be arranged as open bar, drink tickets, or on consumption."},{q:"Can we use the golf simulator?",a:"Absolutely â the simulator bay can be added to any reservation as part of your event."},{q:"Can we bring decorations?",a:"Yes, tasteful decor is welcome. We just ask that nothing is affixed to walls or fixtures and that setup is coordinated with our team."},{q:"Can we bring a birthday cake?",a:"Yes, outside cake and dessert are welcome for celebrations."},{q:"Can we hire a DJ or live entertainment?",a:"Yes. We can accommodate DJs, live musicians, and other entertainment â let us know so we can plan the space and sound."},{q:"Is parking available?",a:"Yes, convenient on-site parking is available for your guests."},{q:"How far in advance should we reserve?",a:"Prime evening and weekend dates book quickly. Two to six weeks ahead is ideal; sooner for large groups and holiday season."},{q:"Is a deposit required?",a:"Private events and larger groups typically require a deposit to hold the date. Your event lead will confirm the amount with your quote."},{q:"What is the cancellation policy?",a:"Cancellation terms are outlined in your event agreement and depend on how close to the date the change is made. Deposits may be non-refundable inside the notice window."},{q:"Is Legacy 21+?",a:"Yes. Legacy is a 21+ venue and valid ID is required for all guests."}].map(t=>({...t,enabled:!0})),testimonials:[],pricing:{showPricing:!1,venueRentalFee:"",minimumSpend:"",weekdayMinimum:"",weekendMinimum:"",eveningMinimum:"",groupReservation:"",deposit:"",depositPercent:"",standardDuration:"",overtimeRate:"",notes:""}},y$=["Corporate Event","Client Entertainment","Networking Mixer","Birthday Celebration","Bachelor Party","Retirement Party","Holiday Party","Watch Party","Club Gathering","Real Estate Event","Sales Team Event","Product Launch","Private Celebration","Other"],v$=["Under $500","$500â$1,000","$1,000â$2,500","$2,500â$5,000","$5,000+","Not sure yet"],b$=["new","contacted","quote_sent","follow_up","deposit_pending","confirmed","completed","cancelled","lost"],_$={new:"New inquiry",contacted:"Contacted",quote_sent:"Quote sent",follow_up:"Follow-up needed",deposit_pending:"Deposit pending",confirmed:"Confirmed",completed:"Completed",cancelled:"Cancelled",lost:"Lost",replied:"Contacted",archived:"Completed"},w$=["none","requested","received","waived","refunded"],LP=()=>W(()=>import("./reserve-the-lounge-m112wWJo.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])
40),NP=()=>W(()=>import("./reserve-the-lounge-mjSzJYSI.js"),__vite__mapDeps([18,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])),jP=()=>W(()=>import("./reserve-the-lounge-BwZgqj1z.js"),__vite__mapDeps([19,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])),PP=ne("/reserve-the-lounge")({head:()=>({meta:[{title:"Reserve Legacy Lounge â Private & Corporate Events in Charleston"},{name:"description",content:"Host corporate events, private celebrations, client entertainment and group gatherings at Legacy Cigar Lounge in Charleston â private buyouts, reserved group areas, food & beverage packages and a golf simulator."},{property:"og:title",content:"Reserve Legacy Lounge â Private & Corporate Events"},{property:"og:description",content:"A distinctive Charleston venue for corporate events, private celebrations, client entertainment and networking nights."},{property:"og:url",content:"https://legacycigarlounge.net/reserve-the-lounge"},{property:"og:type",content:"website"},{property:"og:image",content:`https://legacycigarlounge.net${I0}`},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:image",content:`https://legacycigarlounge.net${I0}`}],links:[{rel:"canonical",href:"https://legacycigarlounge.net/reserve-the-lounge"}]}),loader:async()=>{try{return await kP()}catch{return OP}},errorComponent:X(jP,"errorComponent"),notFoundComponent:X(NP,"notFoundComponent"),component:X(LP,"component")}),MP=()=>W(()=>import("./private-events-COT5zmd2.js"),__vite__mapDeps([20,4,9,14,21,6])),DP=ne("/private-events")({head:()=>({meta:[{title:"Private Events & Parties â Legacy Lounge"},{name:"description",content:"Book Legacy Lounge in Charleston for your private event â birthdays, corporate gatherings, bachelor parties, and more."},{property:"og:title",content:"Private Events & Parties â Legacy Lounge"},{property:"og:description",content:"Reserve our Charleston lounge for your private event or party."},{property:"og:url",content:"https://legacycigarlounge.net/private-events"},{property:"og:type",content:"website"}],links:[{rel:"canonical",href:"https://legacycigarlounge.net/private-events"}]}),component:X(MP,"component")}),IP=()=>W(()=>import("./privacy-policy-Cwwhs8Ex.js"),[]),UP=ne("/privacy-policy")({head:()=>({meta:[{title:"Privacy Policy â Legacy Lounge"},{name:"description",content:"How Legacy Lounge in Charleston, SC collects, uses, and protects your personal information."},{property:"og:title",content:"Privacy Policy â Legacy Lounge"},{property:"og:description",content:"How Legacy Lounge in Charleston, SC collects, uses, and protects your personal information."},{property:"og:url",content:"https://legacycigarlounge.net/privacy-policy"},{property:"og:type",content:"website"}],links:[{rel:"canonical",href:"https://legacycigarlounge.net/privacy-policy"}]}),component:X(IP,"component")}),$P=()=>W(()=>import("./membership-BqHf7VtG.js"),__vite__mapDeps([22,2,7,23,14,15])),zP=ne("/membership")({head:()=>({meta:[{title:"Become A Member â Legacy Lounge"},{name:"description",content:"Explore Legacy Lounge membership tiers â Locker, Out-of-State, Corporate, and Couples options in Charleston, SC."},{property:"og:title",content:"Become A Member â Legacy Lounge"},{property:"og:description",content:"Membership tiers and benefits at Legacy Lounge in Charleston, SC."},{property:"og:url",content:"https://legacycigarlounge.net/membership"},{property:"og:type",content:"website"}],links:[{rel:"canonical",href:"https://legacycigarlounge.net/membership"}]}),component:X($P,"component")}),BP=()=>W(()=>import("./humidor-Bnm5lvvd.js"),__vite__mapDeps([24,25,15,14,9,5,26])),qP=ne("/humidor")({head:()=>({meta:[{title:"Our Humidor â Walk-In Humidor | Legacy Lounge"},{name:"description",content:"Explore Legacy Lounge's walk-in humidor in Charleston, SC. Premium cigars from My Father, Perdomo, Rocky Patel, Arturo Fuente, Jaime Garcia and more."},{property:"og:title",content:"Our Humidor â Legacy Lounge"},{property:"og:description",content:"Walk-in humidor with premium cigars in Charleston, SC. Fair pricing, welcoming service."},{property:"og:url",content:"https://legacycigarlounge.net/humidor"},{property:"og:type",content:"website"},{property:"og:image",content:"https://legacycigarlounge.net/og-humidor.jpg"}],links:[{rel:"canonical",href:"https://legacycigarlounge.net/humidor"}]}),component:X(BP,"component")}),HP=()=>W(()=>
40import("./home-preview-Cm2HeqXs.js"),__vite__mapDeps([27,28,3,25,29,4,26,17,5,30,23,31,32,12])),VP=ne("/home-preview")({head:()=>({meta:[{title:"Homepage Preview â Legacy Lounge Charleston"},{name:"description",content:"Preview of the upcoming Legacy Lounge homepage layout."},{name:"robots",content:"noindex, nofollow"}],links:[{rel:"canonical",href:"https://legacycigarlounge.net/home-preview"}]}),component:X(HP,"component")}),GP=()=>W(()=>import("./gallery-ei0hQdTy.js"),__vite__mapDeps([33,2])),FP=ne("/gallery")({head:()=>({meta:[{title:"Photo Gallery â Legacy Cigar Lounge Charleston"},{name:"description",content:"Step inside Legacy Cigar Lounge in Charleston, SC â the main lounge, water wall, walk-in humidor, bar, and private second floor member lounge."},{property:"og:title",content:"Photo Gallery â Legacy Cigar Lounge Charleston"},{property:"og:description",content:"A look inside Legacy Cigar Lounge in Charleston, SC â lounge, bar, humidor, and member spaces."},{property:"og:type",content:"website"},{property:"og:url",content:"https://legacycigarlounge.net/gallery"},{property:"og:image",content:`https://legacycigarlounge.net${D0[0].url}`},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:image",content:`https://legacycigarlounge.net${D0[0].url}`}],links:[{rel:"canonical",href:"https://legacycigarlounge.net/gallery"}]}),component:X(GP,"component")}),KP=()=>W(()=>import("./event-manager-JLhTPrM-.js"),__vite__mapDeps([34,4,35])),YP=ne("/event-manager")({component:X(KP,"component"),head:()=>({meta:[{title:"Event Manager Dashboard · Legacy Cigar Lounge"},{name:"description",content:"Event clients sign in to view their registration and RSVP lists, guest counts, and event details at Legacy Cigar Lounge."},{property:"og:title",content:"Event Manager Dashboard · Legacy Cigar Lounge"},{property:"og:description",content:"Private dashboard for Legacy Cigar Lounge event clients: registrations, guest counts, event details."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"},{name:"robots",content:"noindex"}]})}),ZP=()=>W(()=>import("./contact-CPBBj0_T.js"),__vite__mapDeps([36,5,31])),JP=ne("/contact")({head:()=>({meta:[{title:"Contact â Legacy Lounge"},{name:"description",content:"Get in touch with Legacy Lounge in Charleston. Questions, reservations, or general inquiries â we're here to help."},{property:"og:title",content:"Contact â Legacy Lounge"},{property:"og:description",content:"Get in touch with Legacy Lounge in Charleston, SC."},{property:"og:url",content:"https://legacycigarlounge.net/contact"},{property:"og:type",content:"website"}],links:[{rel:"canonical",href:"https://legacycigarlounge.net/contact"}]}),component:X(ZP,"component")}),QP=()=>W(()=>import("./cigar-lounge-charleston-sc-CDJS0OY8.js"),__vite__mapDeps([37,25,5,31,26])),jc="https://legacycigarlounge.net/cigar-lounge-charleston-sc",XP=ne("/cigar-lounge-charleston-sc")({head:()=>({meta:[{title:"Cigar Lounge in Charleston, SC â Legacy Cigar Lounge"},{name:"description",content:"Looking for a cigar lounge in Charleston, SC? Legacy Cigar Lounge on Clements Ferry Road offers a walk-in humidor, premium cigars, craft cocktails, and a private golf simulator â open 7 nights a week."},{property:"og:title",content:"Cigar Lounge in Charleston, SC â Legacy Cigar Lounge"},{property:"og:description",content:"Charleston's premier cigar lounge. Walk-in humidor, premium cigars, craft cocktails, and a private golf simulator on Clements Ferry Road."},{property:"og:url",content:jc},{property:"og:type",content:"website"}],links:[{rel:"canonical",href:jc}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BarOrPub",name:"Legacy Cigar Lounge",image:`${jc.replace(/\/[^/]*$/,"")}/og-image.jpg`,telephone:_r.phone,address:{"@type":"PostalAddress",streetAddress:"1937 Clements Ferry Road, Unit C",addressLocality:"Charleston",addressRegion:"SC",postalCode:"29492",addressCountry:"US"},areaServed:["Charleston, SC","Mount Pleasant, SC","Daniel Island, SC","Isle of Palms, SC","Sullivan's Island, SC","North Charleston, SC"],url:jc,openingHours:["Mo-Th 12:00-22:00","Fr-Su 12:00-23:00"],sameAs:[_r.facebookUrl,_r.instagramUrl]})}]}),component:X(QP,"component")}),WP=()=>W(()=>import("./auth-llbO54wl.js"),__vite__mapDeps([38,39])),eM=Xo({redirect:hi().optional(),mode:fP(["signin","signup"]).optional()}),tM=ne("/auth")({head:()=>({meta:[{title:"Member Sign In â Legacy Lounge"},{name:"robots",content:"noindex,nofollow"}]}),validateSearch:t=>eM.parse(t),component:X(WP,"component")}),nM=()=>W(()=>import("./route-BEnLeaPn.js"),__vite__mapDeps([40,39,41,42,43,23])),rM=ne("/app")({head:()=>({meta:[{title:"Member Portal â Legacy Lounge"},{name:"robots",content:"noindex,nofollow"}]}),component:X(nM,"component")}),sM=()=>W(()=>import("./route-sg9w7tr1.js"),[]),aM=()=>W(()=>
40import("./route-DKh3iXpa.js"),__vite__mapDeps([44,41,4,39,45,46,47,48,49,50,51,42,12,52,8,17,53,54,14,55,56,30,57])),iM=ne("/admin")({head:()=>({meta:[{title:"Admin â Legacy Lounge"},{name:"robots",content:"noindex,nofollow"}]}),component:X(aM,"component"),errorComponent:X(sM,"errorComponent")}),oM="/assets/reveal-drape-Ba7hi_mW.jpg",lM=xt({method:"GET"}).handler($t("c6a9b66b3b85eff4b01151b72d59737aff5133c546229667c883db3072f4042a")),cM=()=>W(()=>import("./index-BY1vGnV3.js"),__vite__mapDeps([58,14,59,60,61,28,3,25,29,4,26,17,5,30,23,31,32,12])),uM=ne("/")({loader:async()=>{const{mode:t}=await lM();return{mode:t}},head:({loaderData:t})=>(t?.mode??"reveal")==="home"?{meta:[{title:"Legacy Lounge â Private Lounge in Charleston, SC"},{name:"description",content:"Charleston's destination for a private lounge experience and golf simulator. Locally owned luxury lounge on Clements Ferry Road."},{property:"og:title",content:"Legacy Lounge â Private Lounge in Charleston, SC"},{property:"og:description",content:"Charleston's destination for a private lounge experience and golf simulator. Locally owned luxury lounge on Clements Ferry Road."},{property:"og:url",content:"https://legacycigarlounge.net/"},{property:"og:type",content:"website"},{property:"og:image",content:"https://legacycigarlounge.net/og-home.jpg"},{name:"twitter:image",content:"https://legacycigarlounge.net/og-home.jpg"}],links:[{rel:"canonical",href:"https://legacycigarlounge.net/"}]}:{meta:[{title:"The Reveal â Legacy Lounge Charleston"},{name:"description",content:"Months in the making. Legacy Lounge is preparing its Re-Grand Opening in Charleston, SC. Join the VIP text list for the official date and early access."},{property:"og:title",content:"The Reveal â Legacy Lounge Charleston"},{property:"og:description",content:"Something extraordinary is almost here. Join the VIP text list for the Re-Grand Opening announcement."},{property:"og:url",content:"https://legacycigarlounge.net/"},{property:"og:type",content:"website"},{property:"og:image",content:"https://legacycigarlounge.net/og-home.jpg"},{name:"twitter:image",content:"https://legacycigarlounge.net/og-home.jpg"}],links:[{rel:"canonical",href:"https://legacycigarlounge.net/"},{rel:"preload",as:"image",href:oM,fetchPriority:"high"},{rel:"preload",as:"image",href:Yw,fetchPriority:"high"}]},component:X(cM,"component")}),dM=()=>W(()=>import("./index-xH6w9v1P.js"),__vite__mapDeps([62,29,63,2,31,9,32,14])),fM=ne("/golf-simulator/")({head:()=>({meta:[{title:"Golf Simulator â Legacy Cigar Lounge"},{name:"description",content:"Book a private full-swing golf simulator bay at Legacy Cigar Lounge in Charleston. Premium cigars, craft cocktails, and world-class courses on demand."},{property:"og:title",content:"Golf Simulator â Legacy Cigar Lounge"},{property:"og:description",content:"Book a private full-swing golf simulator bay. Premium cigars, craft cocktails, and world-class courses on demand."},{property:"og:url",content:"https://legacycigarlounge.net/golf-simulator"},{property:"og:type",content:"website"}],links:[{rel:"canonical",href:"https://legacycigarlounge.net/golf-simulator"}]}),component:X(dM,"component")}),hM=()=>W(()=>import("./events.index-M5xF3-Ng.js"),__vite__mapDeps([64,29,4,65,2,66,67,17,16,26,53])),pM=ne("/events/")({head:()=>({meta:[{title:"Events Calendar â Legacy Cigar Lounge Charleston"},{name:"description",content:"Live music, sports nights, cigar releases and special events at Legacy Cigar Lounge in Charleston, SC. Browse the calendar and buy tickets online."},{property:"og:title",content:"Events Calendar â Legacy Cigar Lounge"},{property:"og:description",content:"Live music, sports nights, cigar releases and special events at Legacy Cigar Lounge in Charleston, SC."},{property:"og:url",content:"https://legacycigarlounge.net/events"},{property:"og:type",content:"website"}],links:[{rel:"canonical",href:"https://legacycigarlounge.net/events"}]}),component:X(hM,"component")}),mM=()=>W(()=>import("./rsvp._token-DayvougY.js"),__vite__mapDeps([68,4,29,35,69])),gM=ne("/rsvp/$token")({head:()=>({meta:[{title:"Private Event RSVP · Legacy Cigar Lounge"},{name:"description",content:"RSVP to a private, invitation-only event at Legacy Cigar Lounge in Charleston, SC."},{name:"robots",content:"noindex, nofollow"},{property:"og:title",content:"Private Event RSVP · Legacy Cigar Lounge"},{property:"og:description",content:"You're invited. Reply with your attendance and party size."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}
40),component:X(mM,"component")}),yM=()=>W(()=>import("./quote._token-CCI6bKRq.js"),__vite__mapDeps([70,4,29,35,71])),vM=ne("/quote/$token")({head:()=>({meta:[{title:"Your Event Proposal · Legacy Cigar Lounge"},{name:"description",content:"Review, accept and reserve your private event at Legacy Cigar Lounge in Charleston, SC."},{name:"robots",content:"noindex, nofollow"},{property:"og:title",content:"Your Event Proposal · Legacy Cigar Lounge"},{property:"og:description",content:"Review and accept your private event proposal."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),component:X(yM,"component")}),bM=()=>W(()=>import("./organizer._token-b_A-lMd9.js"),__vite__mapDeps([72,4,29,69,73])),_M=ne("/organizer/$token")({head:()=>({meta:[{title:"Event Guest List · Legacy Cigar Lounge"},{name:"description",content:"Live RSVP totals and guest list for your private event at Legacy Cigar Lounge."},{name:"robots",content:"noindex, nofollow"},{property:"og:title",content:"Event Guest List · Legacy Cigar Lounge"},{property:"og:description",content:"Track RSVPs for your private event."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),component:X(bM,"component")}),wM=()=>W(()=>import("./orders._orderNumber-CCTJnTqm.js"),__vite__mapDeps([74,29,4,65,75,59,17,53])),SM=Xo({token:hi().min(6).max(400)}),EM=ne("/orders/$orderNumber")({head:()=>({meta:[{title:"Your tickets â Legacy Cigar Lounge"},{name:"robots",content:"noindex"}]}),validateSearch:t=>SM.parse(t),component:X(wM,"component")}),RM=()=>W(()=>import("./join._slug-RAFBBkqV.js"),__vite__mapDeps([76,29,4,2,9,59])),TM=ne("/join/$slug")({head:()=>({meta:[{title:"Join your group at Legacy Lounge | Legacy Cigar Lounge"},{name:"description",content:"Link your Legacy Lounge visits to your group or club so your spend counts toward group rewards and milestones."},{property:"og:title",content:"Join your group at Legacy Lounge"},{property:"og:description",content:"Connect your visits to your club or partner group at Legacy Cigar Lounge."},{property:"og:type",content:"website"}]}),component:X(RM,"component")}),AM=()=>W(()=>import("./manage-booking-C8zg6WRU.js"),__vite__mapDeps([77,4,63])),CM=ne("/golf-simulator/manage-booking")({head:()=>({meta:[{title:"Manage Booking â Legacy Cigar Lounge"},{name:"robots",content:"noindex"}]}),component:X(AM,"component")}),xM=()=>W(()=>import("./booking-confirmation-BrBi91kv.js"),__vite__mapDeps([78,4,63,61,79,59,5])),kM=Xo({c:hi().optional(),e:hi().optional()}),OM=ne("/golf-simulator/booking-confirmation")({validateSearch:t=>kM.parse(t),head:()=>({meta:[{title:"Booking Confirmed â Legacy Cigar Lounge"},{name:"robots",content:"noindex"}]}),component:X(xM,"component")}),LM=()=>W(()=>import("./book-BeQBIvKX.js"),__vite__mapDeps([80,29,4,63,81,61,79])),NM=ne("/golf-simulator/book")({head:()=>({meta:[{title:"Book the Simulator â Legacy Cigar Lounge"},{name:"description",content:"Reserve a private golf simulator bay at Legacy Cigar Lounge."},{name:"robots",content:"noindex"}]}),component:X(LM,"component")}),jM=()=>W(()=>import("./events.past-DKtjX0sj.js"),__vite__mapDeps([82,29,4,65,2,17])),PM=ne("/events/past")({head:()=>({meta:[{title:"Past Events â Legacy Cigar Lounge"},{name:"description",content:"A look back at past nights at Legacy Cigar Lounge in Charleston, SC â live music, sports nights and cigar releases."},{property:"og:title",content:"Past Events â Legacy Cigar Lounge"},{property:"og:description",content:"A look back at past nights at Legacy Cigar Lounge in Charleston, SC."},{property:"og:type",content:"website"},{name:"robots",content:"noindex, follow"}],links:[{rel:"canonical",href:"https://legacycigarlounge.net/events/past"}]}),component:X(jM,"component")}),S$=xt({method:"GET"}).handler($t("a1a22682efdaf368e1bf7462495ec585af2b6d478593bbc66f87b08040a8774b")),E$=xt({method:"GET"}).handler($t("4886e4db87d004df6dba7e0df9b93839651af14a53e3ade8f9fdd54d7a661d9b")),R$=xt({method:"GET"}).handler($t("459ce45d607ece5c77d9002a23ea24c8745c17b5cc14caeed2ee9ca71dfb6482")),T$=xt({method:"GET"}).handler($t("b0f913c725594ae91effb0f664781e8aa3b6fe69e3e2a07822385de28b3ec095")),A$=xt({method:"GET"}).handler($t("6109de70b12998c8cab864df789c5bb45b214d0e4435b47b70065f85027f76a6")),MM=xt({method:"GET"}).handler($t("11c8893e2fb5a020b315d46ce351859f008e3d7b8dc03b265f0549fb7225f177")),C$=xt({method:"POST"}).handler($t("660d9435e7eff4cb9137bd98c7fae0cec3c021e8190fe02a71571eebb67f9ffe")),x$=xt({method:"POST"}).handler($t("5b1e8a4227f4469bc4925d05c63ef15e6cbf1241c150ed38786417886f248451")),k$=xt({method:"POST"}).handler($t("b7d93784bcfb86222b58303c18c8944e1fb410c8348d14d22e5d865599fa5467")),O$=xt({method:"POST"}).handler($t("d963417948ebec3cacc7260c73a7a7352da164a98b3d5f372ca61031d6c475b8")),L$=xt({method:"GET"}).handler($t("9939244c4148626fd0f753bd35e65ea33d2538bd94d1b8ba91d2b4ee3bf58df8")),N$=xt({method:"POST"}).handler($t("e05b84993210b1a602a84aed31027fbe8ae2019c35957c9c1f65acc67df77272")),j$=xt({method:"GET"}).handler($t("95d1b206b5541e91c7cb9fe2453586e92e301729bc3c01777328ef733d4d1afa")),DM=()=>W(()=>import("./events._slug-CFE0rT-S.js"),__vite__mapDeps([83,29,4,65,67,59,12,60,84,50,48,17,31,56,11,85,53])),IM=()=>W(()=>import("./events._slug-COE7iXZS.js"),[]),UM=()=>W(()=>import("./events._slug-B1xy9_GJ.js"),[]),$M=ne("/events/$slug")({loader:async({params:t})=>{try{return{event:(await MM({data:{slug:t.slug}})).event}}catch{return{event:null}}},head:({params:t,loaderData:e})=>{const n=`https://legacycigarlounge.net/events/${t.slug}`,a=e?.event;if(!a)return{meta:[{title:"Event â Legacy Cigar Lounge"},{name:"robots",content:"noindex"},{property:"og:url",content:n},{property:"og:type",content:"event"}],links:[{rel:"canonical",href:n}]};const o=`${a.title} â Legacy Cigar Lounge`,l=a.short_description||a.long_description?.slice(0,200)||`Tickets for ${a.title} at Legacy Cigar Lounge in Charleston, SC.`,u=[{title:o},{name:"description",content:l},{property:"og:title",content:o},{property:"og:description",content:l},{property:"og:url",content:n},{property:"og:type",content:"event"}],d=a.cover_image_url??null,h=d?/^https?:\/\//i.test(d)?d:`https://legacycigarlounge.net${d.startsWith("/")?"":"/"}${d}`:null;
40h&&(u.push({property:"og:image",content:h}),u.push({name:"twitter:image",content:h}));const m={"@context":"https://schema.org","@type":"Event",name:a.title,startDate:a.starts_at,endDate:a.ends_at??void 0,eventStatus:a.event_status==="cancelled"?"https://schema.org/EventCancelled":a.event_status==="postponed"?"https://schema.org/EventPostponed":"https://schema.org/EventScheduled",eventAttendanceMode:"https://schema.org/OfflineEventAttendanceMode",description:l,image:h?[h]:void 0,url:n,location:{"@type":"Place",name:a.venue_name??"Legacy Cigar Lounge",address:a.venue_address??"1937 Clements Ferry Rd Unit C, Charleston, SC"},performer:a.performer_name?{"@type":"PerformingGroup",name:a.performer_name}:void 0};return{meta:u,links:[{rel:"canonical",href:n}],scripts:[{type:"application/ld+json",children:JSON.stringify(m)}]}},errorComponent:X(UM,"errorComponent"),notFoundComponent:X(IM,"notFoundComponent"),component:X(DM,"component")}),zM=()=>W(()=>import("./index-Ha1MXagV.js"),__vite__mapDeps([86,29,4,87,46,88,43,17,12])),BM=ne("/app/")({component:X(zM,"component")}),qM=()=>W(()=>import("./membership-BokUWW1F.js"),__vite__mapDeps([89,29,4,46,90,15,5,60,56,91,23,59,14,92,10])),HM=ne("/app/membership")({component:X(qM,"component")}),VM=()=>W(()=>import("./card-QAGtqUXw.js"),__vite__mapDeps([93,29,4,87,46,75])),GM=ne("/app/card")({component:X(VM,"component")}),FM=()=>W(()=>import("./benefits-Bj5RJSN7.js"),__vite__mapDeps([94,29,4,87,46,91])),KM=ne("/app/benefits")({component:X(FM,"component")}),YM=()=>W(()=>import("./account-CoatU0ck.js"),__vite__mapDeps([95,29,4,87,46])),ZM=ne("/app/account")({component:X(YM,"component")}),JM=()=>W(()=>import("./index-CcEOYy7R.js"),__vite__mapDeps([96,29,4,97,46,98,99,88,21,12,53,26,52])),QM=ne("/admin/")({component:X(JM,"component")}),XM=()=>W(()=>import("./venue-BpPO0IIG.js"),__vite__mapDeps([100,4,29,35,101,46])),WM=ne("/admin/venue")({component:X(XM,"component")}),eD=()=>W(()=>import("./utm-builder-G-p3GzH2.js"),__vite__mapDeps([102,103,15,104,54])),tD=ne("/admin/utm-builder")({component:X(eD,"component")}),nD=()=>W(()=>import("./team-DfleapUU.js"),__vite__mapDeps([105,4,29,35,103,45,46,56,106,60,107,92])),rD=ne("/admin/team")({head:()=>({meta:[{title:"Team & access â Legacy Lounge Admin"}]}),component:X(nD,"component")}),sD=()=>W(()=>import("./tapmango-Ddz855_0.js"),__vite__mapDeps([108,4,46,29])),aD=ne("/admin/tapmango")({head:()=>({meta:[{title:"TapMango integration â Legacy Lounge"},{name:"robots",content:"noindex,nofollow"}]}),component:X(sD,"component")}),iD=()=>W(()=>import("./submissions-Fa0Zt_UJ.js"),__vite__mapDeps([109,4,29,35,99,46])),oD=ne("/admin/submissions")({component:X(iD,"component")}),lD=()=>W(()=>import("./rsvps-GH87K-s6.js"),__vite__mapDeps([110,4,29,35,46,12,107])),cD=ne("/admin/rsvps")({component:X(lD,"component")}),uD=()=>W(()=>import("./reservations-zJ6QyLes.js"),__vite__mapDeps([111,4,29,35,101,46])),dD=ne("/admin/reservations")({component:X(uD,"component")}),fD=()=>W(()=>import("./performance-CJY75gHe.js"),__vite__mapDeps([112,55])),hD=ne("/admin/performance")({head:()=>({meta:[{title:"Performance Mode â Legacy Lounge"},{name:"robots",content:"noindex,nofollow"}]}),component:X(fD,"component")}),pD=()=>W(()=>import("./monitoring-DWgxdl0U.js"),__vite__mapDeps([113,4,57,46])),mD=ne("/admin/monitoring")({head:()=>({meta:[{title:"Monitoring â Admin"},{name:"robots",content:"noindex,nofollow"}]}),component:X(pD,"component")}),gD=()=>W(()=>import("./loyalty-api-D4mHUiR0.js"),__vite__mapDeps([114,4,46])),yD=ne("/admin/loyalty-api")({head:()=>({meta:[{title:"Register app API credentials â Legacy Lounge"},{name:"robots",content:"noindex,nofollow"}]}),component:X(gD,"component")}),vD=()=>W(()=>import("./login-rinA2QD9.js"),__vite__mapDeps([115,39])),bD=ne("/admin/login")({head:()=>({meta:[{title:"Admin Login â Legacy Lounge"},{name:"robots",content:"noindex,nofollow"}]}),component:X(vD,"component")}),_D=()=>W(()=>import("./insights-DnkRB24u.js"),__vite__mapDeps([116,29,4,88,46])),wD=ne("/admin/insights")({component:X(_D,"component")}),SD=()=>W(()=>import("./health-NjNxkvYg.js"),__vite__mapDeps([117,47,48,59,85])),ED=ne("/admin/health")({head:()=>({meta:[{title:"Health checks â Admin"},{name:"robots",content:"noindex,nofollow"}]}),component:X(SD,"component")}),RD=()=>W(()=>import("./analytics-CRA1nGZ6.js"),__vite__mapDeps([118,29,35,4,46,119,107])),TD=ne("/admin/analytics")({component:X(RD,"component")}),AD=()=>W(()=>import("./events._slug_.checkout-Bb62B3SJ.js"),__vite__mapDeps([120,29,4,81,65,31,60,17])
40),CD=Xo({t:hi().uuid(),q:hP.number().int().min(1).max(20)}),xD=ne("/events/$slug_/checkout")({head:()=>({meta:[{title:"Checkout â Legacy Cigar Lounge"},{name:"robots",content:"noindex"}]}),validateSearch:t=>CD.parse(t),component:X(AD,"component")}),kD=()=>W(()=>import("./sales.index-DJ0AY6GW.js"),__vite__mapDeps([121,4,29,35,122,46,71,123])),OD=ne("/admin/sales/")({component:X(kD,"component")}),LD=()=>W(()=>import("./partners.index-cInwSOBq.js"),__vite__mapDeps([124,29,47,48,49,125,126,35,103,84,50,127,51,46])),ND=ne("/admin/partners/")({component:X(LD,"component")}),jD=()=>W(()=>import("./members.index-CwJjcPAY.js"),__vite__mapDeps([128,4,88,46,29,129,125])),PD=ne("/admin/members/")({component:X(jD,"component")}),MD=()=>W(()=>import("./events.index-qzl3NcGP.js"),__vite__mapDeps([130,4,29,35,98,46,66,67,131,17,16,13,104])),DD=ne("/admin/events/")({component:X(MD,"component")}),ID=()=>W(()=>import("./bookings.index-Djn3Huex.js"),__vite__mapDeps([132,4,29,35,99,46])),UD=ne("/admin/bookings/")({component:X(ID,"component")}),$D=()=>W(()=>import("./sales.setup-CQxMgI81.js"),__vite__mapDeps([133,4,29,35,134,46,71,123])),zD=ne("/admin/sales/setup")({component:X($D,"component")}),BD=()=>W(()=>import("./sales.customers-CFlSia_4.js"),__vite__mapDeps([135,4,29,122,46,71,123])),qD=ne("/admin/sales/customers")({component:X(BD,"component")}),HD=()=>W(()=>import("./sales.check-in-Bq99HE51.js"),__vite__mapDeps([136,4,123,71,137,46])),VD=ne("/admin/sales/check-in")({head:()=>({meta:[{title:"Private Event Check-In · Legacy Admin"},{name:"description",content:"Scan guest access passes at the door for private events."},{name:"robots",content:"noindex, nofollow"},{property:"og:title",content:"Private Event Check-In · Legacy Admin"},{property:"og:description",content:"Door scanning for private event access passes."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),component:X(HD,"component")}),GD=()=>W(()=>import("./sales.calendar-D6FEKUo1.js"),__vite__mapDeps([138,4,29,122,46,71,123])),FD=ne("/admin/sales/calendar")({component:X(GD,"component")}),KD=()=>W(()=>import("./sales.analytics-B9Ye5Sj5.js"),__vite__mapDeps([139,4,29,122,46,71,123])),YD=ne("/admin/sales/analytics")({component:X(KD,"component")}),ZD=()=>W(()=>import("./partners._id-LEhspfH2.js"),__vite__mapDeps([140,29,35,103,47,48,49,127,126,84,50,51,46,125,119,106,107,104])),JD=ne("/admin/partners/$id")({component:X(ZD,"component")}),QD=()=>W(()=>import("./members.spend-y0f3X0_e.js"),__vite__mapDeps([141,29,4,46,129,90,125])),XD=ne("/admin/members/spend")({validateSearch:t=>({customer:typeof t.customer=="string"?t.customer:void 0}),component:X(QD,"component")}),WD=()=>W(()=>import("./members.scan-DwH6St1M.js"),__vite__mapDeps([142,143,4,88,46])),eI=ne("/admin/members/scan")({component:X(WD,"component")}),tI=()=>W(()=>import("./members._id-Du1B_Pd9.js"),__vite__mapDeps([144,29,4,88,46])),nI=ne("/admin/members/$id")({component:X(tI,"component")}),rI=()=>W(()=>import("./events.new-Drj5Bw9h.js"),__vite__mapDeps([145,4,35,98,46,146,29,131])),sI=ne("/admin/events/new")({component:X(rI,"component")}),aI=()=>W(()=>
40import("./events.check-in-l1hTUyq4.js"),__vite__mapDeps([147,4,143,46])),iI=ne("/admin/events/check-in")({component:X(aI,"component")}),oI=()=>W(()=>import("./events._id-CHD3ul7Y.js"),__vite__mapDeps([148,4,29,35,98,46,146,131,149])),lI=ne("/admin/events/$id")({component:X(oI,"component")}),cI=()=>W(()=>import("./bookings.golf-nFaAI8mk.js"),__vite__mapDeps([150,41])),uI=ne("/admin/bookings/golf")({component:X(cI,"component")}),dI=()=>W(()=>import("./sales.quotes.index-B8bApuZ7.js"),__vite__mapDeps([151,4,29,122,46,71,123])),fI=ne("/admin/sales/quotes/")({component:X(dI,"component")}),hI=()=>W(()=>import("./sales.quotes.new-0izKs6WZ.js"),__vite__mapDeps([152,4,35,122,46,153,29,134,71,123])),pI=ne("/admin/sales/quotes/new")({component:X(hI,"component")}),mI=()=>W(()=>import("./sales.quotes._id-BymXJFEj.js"),__vite__mapDeps([154,4,29,35,122,46,71,123,137,153,134])),gI=ne("/admin/sales/quotes/$id")({component:X(mI,"component")}),yI=()=>W(()=>import("./bookings.golf.index-CxKqHcnT.js"),__vite__mapDeps([155,29,35,4,103,97,46,61,84,50,48,47,49,127,149,156])),vI=ne("/admin/bookings/golf/")({component:X(yI,"component")}),bI=()=>W(()=>import("./bookings.golf.settings-YdIb3g_Q.js"),__vite__mapDeps([157,4,29,46,97])),_I=ne("/admin/bookings/golf/settings")({component:X(bI,"component")}),wI=()=>W(()=>import("./bookings.golf.diagnostics-CHyxs9Ii.js"),__vite__mapDeps([158,29,4,46])),SI=ne("/admin/bookings/golf/diagnostics")({component:X(wI,"component")}),EI=()=>W(()=>import("./bookings.golf.customers-fIadVa0I.js"),__vite__mapDeps([159,29,4,46])),RI=ne("/admin/bookings/golf/customers")({component:X(EI,"component")}),TI=()=>W(()=>import("./bookings.golf.calendar-DQXV_h0V.js"),__vite__mapDeps([160,29,4,97,46,61,156,35,103,84,50,48,47,49,127])),AI=ne("/admin/bookings/golf/calendar")({component:X(TI,"component")}),CI=()=>W(()=>import("./sales.quotes._id_.guests-CuSXDwNC.js"),__vite__mapDeps([161,4,29,35,123,71,73,137,46])),xI=ne("/admin/sales/quotes/$id_/guests")({head:()=>({meta:[{title:"Event Guest List · Legacy Admin"},{name:"description",content:"Manage RSVPs, guest lists and QR access passes for a private event."},{name:"robots",content:"noindex, nofollow"},{property:"og:title",content:"Event Guest List · Legacy Admin"},{property:"og:description",content:"RSVP and access pass management."},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"}]}),component:X(CI,"component")}),kI=gP.update({id:"/unsubscribe",path:"/unsubscribe",getParentRoute:()=>Ge}),OI=vP.update({id:"/terms-of-service",path:"/terms-of-service",getParentRoute:()=>Ge}),LI=PP.update({id:"/reserve-the-lounge",path:"/reserve-the-lounge",getParentRoute:()=>Ge}),NI=DP.update({id:"/private-events",path:"/private-events",getParentRoute:()=>Ge}),jI=UP.update({id:"/privacy-policy",path:"/privacy-policy",getParentRoute:()=>Ge}),PI=zP.update({id:"/membership",path:"/membership",getParentRoute:()=>Ge}),MI=qP.update({id:"/humidor",path:"/humidor",getParentRoute:()=>Ge}),DI=VP.update({id:"/home-preview",path:"/home-preview",getParentRoute:()=>Ge}),II=FP.update({id:"/gallery",path:"/gallery",getParentRoute:()=>Ge}),UI=YP.update({id:"/event-manager",path:"/event-manager",getParentRoute:()=>Ge}),$I=JP.update({id:"/contact",path:"/contact",getParentRoute:()=>Ge}),zI=XP.update({id:"/cigar-lounge-charleston-sc",path:"/cigar-lounge-charleston-sc",getParentRoute:()=>Ge}),BI=tM.update({id:"/auth",path:"/auth",getParentRoute:()=>Ge}),mi=rM.update({id:"/app",path:"/app",getParentRoute:()=>Ge}),Oe=iM.update({id:"/admin",path:"/admin",getParentRoute:()=>Ge}),qI=uM.update({id:"/",path:"/",getParentRoute:()=>Ge}),HI=fM.update({id:"/golf-simulator/",path:"/golf-simulator/",getParentRoute:()=>Ge}),VI=pM.update({id:"/events/",path:"/events/",getParentRoute:()=>Ge}),GI=gM.update({id:"/rsvp/$token",path:"/rsvp/$token",getParentRoute:()=>Ge}),FI=vM.update({id:"/quote/$token",path:"/quote/$token",getParentRoute:()=>Ge}),KI=_M.update({id:"/organizer/$token",path:"/organizer/$token",getParentRoute:()=>Ge}),YI=EM.update({id:"/orders/$orderNumber",path:"/orders/$orderNumber",getParentRoute:()=>Ge}),ZI=TM.update({id:"/join/$slug",path:"/join/$slug",getParentRoute:()=>Ge}),JI=CM.update({id:"/golf-simulator/manage-booking",path:"/golf-simulator/manage-booking",getParentRoute:()=>Ge}),QI=OM.update({id:"/golf-simulator/booking-confirmation",path:"/golf-simulator/booking-confirmation",getParentRoute:()=>Ge}),XI=NM.update({id:"/golf-simulator/book",path:"/golf-simulator/book",getParentRoute:()=>Ge}),WI=PM.update({id:"/events/past",path:"/events/past",getParentRoute:()=>Ge}),eU=$M.update({id:"/events/$slug",path:"/events/$slug",getParentRoute:()=>Ge}),tU=BM.update({id:"/",path:"/",getParentRoute:()=>mi}),nU=HM.update({id:"/membership",path:"/membership",getParentRoute:()=>mi}),rU=GM.update({id:"/card",path:"/card",getParentRoute:()=>mi}),sU=KM.update({id:"/benefits",path:"/benefits",getParentRoute:()=>mi}),aU=ZM.update({id:"/account",path:"/account",getParentRoute:()=>mi}),iU=QM.update({id:"/",path:"/",getParentRoute:()=>Oe}),oU=WM.update({id:"/venue",path:"/venue",getParentRoute:()=>Oe}),lU=tD.update({id:"/utm-builder",path:"/utm-builder",getParentRoute:()=>Oe}),cU=rD.update({id:"/team",path:"/team",getParentRoute:()=>Oe}),uU=aD.update({id:"/tapmango",path:"/tapmango",getParentRoute:()=>Oe}),dU=oD.update({id:"/submissions",path:"/submissions",getParentRoute:()=>Oe}),fU=cD.update({id:"/rsvps",path:"/rsvps",getParentRoute:()=>Oe}),hU=dD.update({id:"/reservations",path:"/reservations",getParentRoute:()=>Oe}),pU=hD.update({id:"/performance",path:"/performance",getParentRoute:()=>Oe}),mU=mD.update({id:"/monitoring",path:"/monitoring",getParentRoute:()=>Oe}),gU=yD.update({id:"/loyalty-api",path:"/loyalty-api",getParentRoute:()=>Oe}),yU=bD.update({id:"/login",path:"/login",getParentRoute:()=>Oe}),vU=wD.update({id:"/insights",path:"/insights",getParentRoute:()=>Oe}),bU=ED.update({id:"/health",path:"/health",getParentRoute:()=>Oe}),_U=TD.update({id:"/analytics",path:"/analytics",getParentRoute:()=>Oe}),wU=xD.update({id:"/events/$slug_/checkout",path:"/events/$slug/checkout",getParentRoute:()=>Ge}),SU=OD.update({id:"/sales/",path:"/sales/",getParentRoute:()=>Oe}),EU=ND.update({id:"/partners/",path:"/partners/",getParentRoute:()=>Oe}),RU=PD.update({id:"/members/",path:"/members/",getParentRoute:()=>Oe}),TU=DD.update({id:"/events/",path:"/events/",getParentRoute:()=>Oe}),AU=UD.update({id:"/bookings/",path:"/bookings/",getParentRoute:()=>Oe}),CU=zD.update({id:"/sales/setup",path:"/sales/setup",getParentRoute:()=>Oe}),xU=qD.update({id:"/sales/customers",path:"/sales/customers",getParentRoute:()=>Oe}),kU=VD.update({id:"/sales/check-in",path:"/sales/check-in",getParentRoute:()=>Oe}),OU=FD.update({id:"/sales/calendar",path:"/sales/calendar",getParentRoute:()=>Oe}),LU=YD.update({id:"/sales/analytics",path:"/sales/analytics",getParentRoute:()=>Oe}),NU=JD.update({id:"/partners/$id",path:"/partners/$id",getParentRoute:()=>Oe}),jU=XD.update({id:"/members/spend",path:"/members/spend",getParentRoute:()=>Oe}),PU=eI.update({id:"/members/scan",path:"/members/scan",getParentRoute:()=>Oe}),MU=nI.update({id:"/members/$id",path:"/members/$id",getParentRoute:()=>Oe}),DU=sI.update({id:"/events/new",path:"/events/new",getParentRoute:()=>Oe}),IU=iI.update({id:"/events/check-in",path:"/events/check-in",getParentRoute:()=>Oe}),UU=lI.update({id:"/events/$id",path:"/events/$id",getParentRoute:()=>Oe}),gi=uI.update({id:"/bookings/golf",path:"/bookings/golf",getParentRoute:()=>Oe}),$U=fI.update({id:"/sales/quotes/",path:"/sales/quotes/",getParentRoute:()=>Oe}),zU=pI.update({id:"/sales/quotes/new",path:"/sales/quotes/new",getParentRoute:()=>Oe}),BU=gI.update({id:"/sales/quotes/$id",path:"/sales/quotes/$id",getParentRoute:()=>Oe}),qU=vI.update({id:"/",path:"/",getParentRoute:()=>gi}),HU=_I.update({id:"/settings",path:"/settings",getParentRoute:()=>gi}),VU=SI.update({id:"/diagnostics",path:"/diagnostics",getParentRoute:()=>gi}),GU=RI.update({id:"/customers",path:"/customers",getParentRoute:()=>gi}),FU=AI.update({id:"/calendar",path:"/calendar",getParentRoute:()=>gi}),KU=xI.update({id:"/sales/quotes/$id_/guests",path:"/sales/quotes/$id/guests",getParentRoute:()=>Oe}),YU={AdminBookingsGolfCalendarRoute:FU,AdminBookingsGolfCustomersRoute:GU,AdminBookingsGolfDiagnosticsRoute:VU,AdminBookingsGolfSettingsRoute:HU,AdminBookingsGolfIndexRoute:qU},ZU=gi._addFileChildren(YU),JU={AdminAnalyticsRoute:_U,AdminHealthRoute:bU,AdminInsightsRoute:vU,AdminLoginRoute:yU,AdminLoyaltyApiRoute:gU,AdminMonitoringRoute:mU,AdminPerformanceRoute:pU,AdminReservationsRoute:hU,AdminRsvpsRoute:fU,AdminSubmissionsRoute:dU,AdminTapmangoRoute:uU,AdminTeamRoute:cU,AdminUtmBuilderRoute:lU,AdminVenueRoute:oU,AdminIndexRoute:iU,AdminBookingsGolfRoute:ZU,AdminEventsIdRoute:UU,AdminEventsCheckInRoute:IU,AdminEventsNewRoute:DU,AdminMembersIdRoute:MU,AdminMembersScanRoute:PU,AdminMembersSpendRoute:jU,AdminPartnersIdRoute:NU,AdminSalesAnalyticsRoute:LU,AdminSalesCalendarRoute:OU,AdminSalesCheckInRoute:kU,AdminSalesCustomersRoute:xU,AdminSalesSetupRoute:CU,AdminBookingsIndexRoute:AU,AdminEventsIndexRoute:TU,AdminMembersIndexRoute:RU,AdminPartnersIndexRoute:EU,AdminSalesIndexRoute:SU,AdminSalesQuotesIdRoute:BU,AdminSalesQuotesNewRoute:zU,AdminSalesQuotesIndexRoute:$U,AdminSalesQuotesIdGuestsRoute:KU},QU=Oe._addFileChildren(JU),XU={AppAccountRoute:aU,AppBenefitsRoute:sU,AppCardRoute:rU,AppMembershipRoute:nU,AppIndexRoute:tU},WU=mi._addFileChildren(XU),e$={IndexRoute:qI,AdminRouteRoute:QU,AppRouteRoute:WU,AuthRoute:BI,CigarLoungeCharlestonScRoute:zI,ContactRoute:$I,EventManagerRoute:UI,GalleryRoute:II,HomePreviewRoute:DI,HumidorRoute:MI,MembershipRoute:PI,PrivacyPolicyRoute:jI,PrivateEventsRoute:NI,ReserveTheLoungeRoute:LI,TermsOfServiceRoute:OI,UnsubscribeRoute:kI,EventsSlugRoute:eU,EventsPastRoute:WI,GolfSimulatorBookRoute:XI,GolfSimulatorBookingConfirmationRoute:QI,GolfSimulatorManageBookingRoute:JI,JoinSlugRoute:ZI,OrdersOrderNumberRoute:YI,OrganizerTokenRoute:KI,QuoteTokenRoute:FI,RsvpTokenRoute:GI,EventsIndexRoute:VI,GolfSimulatorIndexRoute:HI,EventsSlugCheckoutRoute:wU},t$=Ge._addFileChildren(e$),U0=t=>/Unauthorized|No authorization header/i.test(t?.message?String(t.message):""),n$=()=>{const t=new F2({queryCache:new Ow({onError:n=>{typeof window>"u"||!U0(n)||window.location.pathname.startsWith("/admin")&&window.location.replace("/admin/login")}}),defaultOptions:{queries:{staleTime:3e4,gcTime:3e5,refetchOnWindowFocus:!1,retry:(n,a)=>!U0(a)&&n<1}}});return J1({routeTree:t$,context:{queryClient:t},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function r$(){const t=await n$();let e;if(qb){const n=await qb.getOptions();n.serializationAdapters=n.serializationAdapters??[],window.__TSS_START_OPTIONS__=n,e=n.serializationAdapters,t.options.defaultSsr=n.defaultSsr}else e=[],window.__TSS_START_OPTIONS__={serializationAdapters:e};return e.push(Wx),t.options.serializationAdapters&&e.push(...t.options.serializationAdapters),t.update({basepath:"",serializationAdapters:e}),t.stores.matchesId.get().length||await r1(t),t}async function s$(){const t=await r$();return window.$_TSR?.h(),t}var dh;function a$(){return dh||(dh=s$()),D.jsx(o1,{promise:dh,children:t=>D.jsx(W1,{router:t})})}Y.startTransition(()=>{FR.hydrateRoot(document,D.jsx(Y.StrictMode,{children:D.jsx(a$,{})}))});export{Ph as $,_M as A,v$ as B,EM as C,OP as D,y$ as E,L$ as F,D0 as G,I0 as H,TM as I,Ej as J,R$ as K,Gs as L,sN as M,N$ as N,_h as O,j$ as P,$M as Q,gP as R,_r as S,MM as T,kt as U,Ht as V,bu as W,iN as X,M2 as Y,x2 as Z,d$ as _,PP as a,Pn as a0,Aw as a1,A2 as a2,C2 as a3,jh as a4,Ew as a5,B2 as a6,L2 as a7,qt as a8,f$ as a9,XD as aA,V_ as aB,lI as aC,pI as aD,gI as aE,xI as aF,Go as aa,V2 as ab,ht as ac,os as ad,Fs as ae,o$ as af,oN as ag,l$ as ah,ob as ai,mu as aj,u$ as ak,$0 as al,ai as am,b$ as an,_$ as ao,w$ as ap,sS as aq,p$ as ar,i$ as as,xD as at,C$ as au,x$ as av,k$ as aw,O$ as ax,OD as ay,JD as az,xt as b,_u as c,$t as d,g$ as e,m$ as f,eN as g,G_ as h,QN as i,D as j,Y_ as k,oi as l,h$ as m,uM as n,oM as o,Yw as p,A$ as q,Y as r,Rr as s,uj as t,F_ as u,S$ as v,T$ as w,E$ as x,gM as y,vM as z};
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.