1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NewsCarousel-CV6aGpS2.js","assets/chevron-left-BbMit-kU.js","assets/chevron-right-CSZyawM8.js","assets/EventsSection-CyckF5Jg.js","assets/calendar-plus-BOEOfC9T.js","assets/BookingSection-Bfucun7j.js","assets/party-popper-CtRrrcmZ.js","assets/users-CSG46knm.js","assets/GallerySection-BAXZrAi8.js","assets/stage-pink-CKmqeRAH.js","assets/EventsPage-BNHUypNx.js","assets/search-BGP8UhtH.js","assets/image-B_GH47Pp.js","assets/JobsPage-Xc4hewy8.js","assets/factoryMail-CrPKowdX.js","assets/map-pin-DKbvS40a.js","assets/clock-CLJ-Bkn7.js","assets/calendar-clock-COQNDUhA.js","assets/MithelfenPage-CuQrwFGO.js","assets/input-kuPZsddF.js","assets/textarea-Bi_u7zWd.js","assets/flame-D5NbyvPQ.js","assets/GalleryPage-DBMieECP.js","assets/FirmenfeierPage-r-jR7Qbg.js","assets/circle-check-B1W5BumZ.js","assets/quote-BBBkLUax.js","assets/phone-BsByq2cb.js","assets/mail-CtCRSXgK.js","assets/trophy-DZG96m95.js","assets/KontaktPage-CLyf_aZ4.js","assets/external-link-CBjNSfOr.js","assets/AuflagenPage-CTaqQD7O.js","assets/download-QZIKXqP0.js","assets/AdminDashboard-Da_4hKxX.js","assets/card-CIb9IHlC.js","assets/AdminLayout-DfgX0Z5J.js","assets/AdminEvents-Ce1xLj9j.js","assets/ImageUpload-C94Y_YMQ.js","assets/useMutation-BuEGipMs.js","assets/useNow-gnvHJvym.js","assets/label-C3ivIX3m.js","assets/select-CowHx9kH.js","assets/index-BbEjJ0-U.js","assets/daysheet-Bjv3KzPQ.js","assets/switch-CEbLirB2.js","assets/trash-2-DyKaUwPd.js","assets/pencil-DBmDfhWC.js","assets/table-CdmQi0SA.js","assets/dialog-IXECfPjI.js","assets/triangle-alert-DKOMgmn_.js","assets/loader-circle-BxvdAK5z.js","assets/type-C0TZ9ZZW.js","assets/eye-g5GNInp_.js","assets/send-BklbJWPr.js","assets/arrow-left-BL8elMMy.js","assets/file-text-C6Kjc6U4.js","assets/ban-C_9TYBN_.js","assets/AdminOrders-ths0rgCM.js","assets/badge-CYntiSap.js","assets/AdminContacts-CabZ3E6j.js","assets/AdminNewsletter-CBsgSf5n.js","assets/tabs-BQtCCa8-.js","assets/index-DiBou710.js","assets/copy-CpbjdE2v.js","assets/mail-x-Be0kRnSo.js","assets/save-2RA7YOU-.js","assets/AdminJobs-BP14S82E.js","assets/JobsManager-BB82DnD2.js","assets/AdminNews-CdouJy7s.js","assets/BesucherinfosPage-f0x2wxh7.js","assets/circle-help-esd159iW.js","assets/shirt-C8KHiHxY.js","assets/MeineTicketsPage-BYHWWtiv.js","assets/TicketVisualCard-Dmai2CAv.js","assets/index-JiZvURVH.js","assets/ProfilPage-Dz-uBUXM.js","assets/types-4og3oiYD.js","assets/EventDetailPage-PnY600rm.js","assets/checkbox-pPfErFhW.js","assets/order-confirmation-DPDNg3-4.js","assets/FundgrubePage-D5q7pkO_.js","assets/AdminLostFound-C4j5xzdF.js","assets/AdminSettings-D7rmgTq-.js","assets/AdminScanner-BYBgQ4Zn.js","assets/jsQR-CdXYt952.js","assets/circle-check-big-DxhsipvK.js","assets/circle-x-DEuSE-uH.js","assets/AdminCoupons-D2bJzhgm.js","assets/AdminLivetracking-DGvE_HZP.js","assets/AdminCustomers-Bg-1U0y5.js","assets/AdminAnalytics-DryQ_aHK.js","assets/NewsletterConfirmPage-DuSE0ktp.js","assets/NewsletterUnsubscribePage-ZF7S0l5U.js","assets/PaymentConfirmPage-BRgvNdaU.js","assets/AdminShifts-DMOb94jM.js","assets/clipboard-list-DNTcwXA4.js","assets/qr-code-BWG-MpRZ.js","assets/pin-BK_cxJJx.js","assets/SchichtenPage-DrVIdav3.js","assets/CrewPortalLayout-CboMKtBy.js","assets/CrewBewerbungPage-CF7is5hm.js","assets/CrewStartPage-BRfPHbFj.js","assets/CrewLoginPage-DZE7UFh3.js","assets/CrewProfilPage-D-7cDkl7.js","assets/CrewDienstPage-Pvp-EygD.js","assets/useCrewStaff-CR0MyHFO.js","assets/CrewTeamPage-BX0X3yCa.js","assets/CrewDashboardPage-BF7PVdzV.js","assets/AdminCrewCheckin-B77AAKYe.js"])))=>i.map(i=>d[i]); 2var Mg=e=>{throw TypeError(e)};var yd=(e,t,n)=>t.has(e)||Mg("Cannot "+n);var T=(e,t,n)=>(yd(e,t,"read from private field"),n?n.call(e):t.get(e)),Y=(e,t,n
vendor: 4,098 bytes, lines 2-10
2)=>t.has(e)?Mg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),F=(e,t,n,r)=>(yd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),se=(e,t,n)=>(yd(e,t,"access private method"),n);var Tl=(e,t,n,r)=>({set _(s){F(e,t,s,n)},get _(){return T(e,t,r)}});function KT(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var E8=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ub(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var db={exports:{}},Pu={},hb={exports:{}},ne={};/** 3 * @license React 4 * react.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var ll=Symbol.for("react.element"),qT=Symbol.for("react.portal"),GT=Symbol.for("react.fragment"),YT=Symbol.for("react.strict_mode"),QT=Symbol.for("react.profiler"),JT=Symbol.for("react.provider"),XT=Symbol.for("react.context"),ZT=Symbol.for("react.forward_ref"),ek=Symbol.for("react.suspense"),tk=Symbol.for("react.memo"),nk=Symbol.for("react.lazy"),Fg=Symbol.iterator;function rk(e){return e===null||typeof e!="object"?null:(e=Fg&&e[Fg]||e["@@iterator"],typeof e=="function"?e:null)}var fb={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},pb=Object.assign,mb={};function fo(e,t,n){this.props=e,this.context=t,this.refs=mb,this.updater=n||fb}fo.prototype.isReactComponent={};fo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};fo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function gb(){}gb.prototype=fo.prototype;function Op(e,t,n){this.props=e,this.context=t,this.refs=mb,this.updater=n||fb}var $p=Op.prototype=new gb;$p.constructor=Op;pb($p,fo.prototype);$p.isPureReactComponent=!0;var Vg=Array.isArray,vb=Object.prototype.hasOwnProperty,jp={current:null},yb={key:!0,ref:!0,__self:!0,__source:!0};function wb(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)vb.call(t,r)&&!yb.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:ll,type:e,key:i,ref:o,props:s,_owner:jp.current}}function sk(e,t){return{$$typeof:ll,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Np(e){return typeof e=="object"&&e!==null&&e.$$typeof===ll}function ik(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ug=/\/+/g;function wd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ik(""+e.key):t.toString(36)}
vendor: 4,786 bytes, lines 10-18
10function dc(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case ll:case qT:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+wd(o,0):r,Vg(s)?(n="",e!=null&&(n=e.replace(Ug,"$&/")+"/"),dc(s,t,n,"",function(c){return c})):s!=null&&(Np(s)&&(s=sk(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Ug,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Vg(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+wd(i,a);o+=dc(i,t,n,l,s)}else if(l=rk(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+wd(i,a++),o+=dc(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function kl(e,t,n){if(e==null)return e;var r=[],s=0;return dc(e,r,"","",function(i){return t.call(n,i,s++)}),r}function ok(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var dt={current:null},hc={transition:null},ak={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:hc,ReactCurrentOwner:jp};function bb(){throw Error("act(...) is not supported in production builds of React.")}ne.Children={map:kl,forEach:function(e,t,n){kl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return kl(e,function(){t++}),t},toArray:function(e){return kl(e,function(t){return t})||[]},only:function(e){if(!Np(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ne.Component=fo;ne.Fragment=GT;ne.Profiler=QT;ne.PureComponent=Op;ne.StrictMode=YT;ne.Suspense=ek;ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ak;ne.act=bb;ne.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=pb({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=jp.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)vb.call(t,l)&&!yb.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:ll,type:e.type,key:s,ref:i,props:r,_owner:o}};ne.createContext=function(e){return e={$$typeof:XT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:JT,_context:e},e.Consumer=e};ne.createElement=wb;ne.createFactory=function(e){var t=wb.bind(null,e);return t.type=e,t};ne.createRef=function(){return{current:null}};ne.forwardRef=function(e){return{$$typeof:ZT,render:e}};ne.isValidElement=Np;ne.lazy=function(e){return{$$typeof:nk,_payload:{_status:-1,_result:e},_init:ok}};ne.memo=function(e,t){return{$$typeof:tk,type:e,compare:t===void 0?null:t}};ne.startTransition=function(e){var t=hc.transition;hc.transition={};try{e()}finally{hc.transition=t}};ne.unstable_act=bb;ne.useCallback=function(e,t){return dt.current.useCallback(e,t)};ne.useContext=function(e){return dt.current.useContext(e)};ne.useDebugValue=function(){};ne.useDeferredValue=function(e){return dt.current.useDeferredValue(e)};ne.useEffect=function(e,t){return dt.current.useEffect(e,t)};ne.useId=function(){return dt.current.useId()};ne.useImperativeHandle=function(e,t,n){return dt.current.useImperativeHandle(e,t,n)};ne.useInsertionEffect=function(e,t){return dt.current.useInsertionEffect(e,t)};ne.useLayoutEffect=function(e,t){return dt.current.useLayoutEffect(e,t)};ne.useMemo=function(e,t){return dt.current.useMemo(e,t)};ne.useReducer=function(e,t,n){return dt.current.useReducer(e,t,n)};ne.useRef=function(e){return dt.current.useRef(e)};ne.useState=function(e){return dt.current.useState(e)};ne.useSyncExternalStore=function(e,t,n){return dt.current.useSyncExternalStore(e,t,n)};ne.useTransition=function(){return dt.current.useTransition()};ne.version="18.3.1";hb.exports=ne;var p=hb.exports;const j=ub(p),xb=KT({__proto__:null,default:j},[p]);/** 11 * @license React 12 * react-jsx-runtime.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var lk=p,ck=Symbol.for("react.element"),uk=Symbol.for("react.fragment"),dk=Object.prototype.hasOwnProperty,hk=lk.__SECRET_INT
vendor: 11,420 bytes, lines 18-35
18ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,fk={key:!0,ref:!0,__self:!0,__source:!0};function Sb(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)dk.call(t,r)&&!fk.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:ck,type:e,key:i,ref:o,props:s,_owner:hk.current}}Pu.Fragment=uk;Pu.jsx=Sb;Pu.jsxs=Sb;db.exports=Pu;var x=db.exports,Eb={exports:{}},jt={},_b={exports:{}},Tb={};/** 19 * @license React 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(e){function t(A,O){var L=A.length;A.push(O);e:for(;0<L;){var Z=L-1>>>1,K=A[Z];if(0<s(K,O))A[Z]=O,A[L]=K,L=Z;else break e}}function n(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var O=A[0],L=A.pop();if(L!==O){A[0]=L;e:for(var Z=0,K=A.length,te=K>>>1;Z<te;){var re=2*(Z+1)-1,Ee=A[re],je=re+1,ce=A[je];if(0>s(Ee,L))je<K&&0>s(ce,Ee)?(A[Z]=ce,A[je]=L,Z=je):(A[Z]=Ee,A[re]=L,Z=re);else if(je<K&&0>s(ce,L))A[Z]=ce,A[je]=L,Z=je;else break e}}return O}function s(A,O){var L=A.sortIndex-O.sortIndex;return L!==0?L:A.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,h=3,f=!1,w=!1,m=!1,b=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(A){for(var O=n(c);O!==null;){if(O.callback===null)r(c);else if(O.startTime<=A)r(c),O.sortIndex=O.expirationTime,t(l,O);else break;O=n(c)}}function S(A){if(m=!1,y(A),!w)if(n(l)!==null)w=!0,J(E);else{var O=n(c);O!==null&&z(S,O.startTime-A)}}function E(A,O){w=!1,m&&(m=!1,v(k),k=-1),f=!0;var L=h;try{for(y(O),d=n(l);d!==null&&(!(d.expirationTime>O)||A&&!I());){var Z=d.callback;if(typeof Z=="function"){d.callback=null,h=d.priorityLevel;var K=Z(d.expirationTime<=O);O=e.unstable_now(),typeof K=="function"?d.callback=K:d===n(l)&&r(l),y(O)}else r(l);d=n(l)}if(d!==null)var te=!0;else{var re=n(c);re!==null&&z(S,re.startTime-O),te=!1}return te}finally{d=null,h=L,f=!1}}var _=!1,C=null,k=-1,P=5,R=-1;function I(){return!(e.unstable_now()-R<P)}function N(){if(C!==null){var A=e.unstable_now();R=A;var O=!0;try{O=C(!0,A)}finally{O?Q():(_=!1,C=null)}}else _=!1}var Q;if(typeof g=="function")Q=function(){g(N)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,oe=D.port2;D.port1.onmessage=N,Q=function(){oe.postMessage(null)}}else Q=function(){b(N,0)};function J(A){C=A,_||(_=!0,Q())}function z(A,O){k=b(function(){A(e.unstable_now())},O)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(A){A.callback=null},e.unstable_continueExecution=function(){w||f||(w=!0,J(E))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(A){switch(h){case 1:case 2:case 3:var O=3;break;default:O=h}var L=h;h=O;try{return A()}finally{h=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,O){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var L=h;h=A;try{return O()}finally{h=L}},e.unstable_scheduleCallback=function(A,O,L){var Z=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?Z+L:Z):L=Z,A){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=L+K,A={id:u++,callback:O,priorityLevel:A,startTime:L,expirationTime:K,sortIndex:-1},L>Z?(A.sortIndex=L,t(c,A),n(l)===null&&A===n(c)&&(m?(v(k),k=-1):m=!0,z(S,L-Z))):(A.sortIndex=K,t(l,A),w||f||(w=!0,J(E))),A},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(A){var O=h;return function(){var L=h;h=O;try{return A.apply(this,arguments)}finally{h=L}}}})(Tb);_b.exports=Tb;var pk=_b.exports;/** 27 * @license React 28 * react-dom.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var mk=p,Ot=pk;function $(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var kb=new Set,xa={};function Ks(e,t){to(e,t),to(e+"Capture",t)}function to(e,t){for(xa[e]=t,e=0;e<t.length;e++)kb.add(t[e])}var Jn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kh=Object.prototype.hasOwnProperty,gk=/^[: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]*$/,Bg={},zg={};function vk(e){return kh.call(zg,e)?!0:kh.call(Bg,e)?!1:gk.test(e)?zg[e]=!0:(Bg[e]=!0,!1)}function yk(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function wk(e,t,n,r){if(t===null||typeof t>"u"||yk(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ht(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Xe[e]=new ht(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Xe[t]=new ht(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Xe[e]=new ht(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Xe[e]=new ht(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Xe[e]=new ht(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Xe[e]=new ht(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Xe[e]=new ht(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Xe[e]=new ht(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Xe[e]=new ht(e,5,!1,e.toLowerCase(),null,!1,!1)});var Dp=/[\-:]([a-z])/g;function Lp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Dp,Lp);Xe[t]=new ht(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Dp,Lp);Xe[t]=new ht(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Dp,Lp);Xe[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Xe[e]=new ht(e,1,!1,e.toLowerCase(),null,!1,!1)});Xe.xlinkHref=new ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Xe[e]=new ht(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ip(e,t,n,r){var s=Xe.hasOwnProperty(t)?Xe[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(wk(t,n,s,r)&&(n=null),r||s===null?vk(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var rr=mk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Cl=Symbol.for("react.element"),pi=Symbol.for("react.portal"),mi=Symbol.for("react.fragment"),Mp=Symbol.for("react.strict_mode"),Ch=Symbol.for("react.profiler"),Cb=Symbol.for("react.provider"),Pb=Symbol.for("react.context"),Fp=Symbol.for("react.forward_ref"),Ph=Symbol.for("react.suspense"),Ah=Symbol.for("react.suspense_list"),Vp=Symbol.for("react.memo"),wr=Symbol.for("react.lazy"),Ab=Symbol.for("react.offscreen"),Wg=Symbol.iterator;function $o(e){return e===null||typeof e!="object"?null:(e=Wg&&e[Wg]||e["@@iterator"],typeof e=="function"?e:null)}var Pe=Object.assign,bd;function Ko(e){if(bd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);bd=t&&t[1]||""}return` 35`+bd+e}var xd=!1;function Sd(e,t){if(!e||xd)return"";xd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}
vendor: 4,643 bytes, lines 35-38
35catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(` 36`),i=r.stack.split(` 37`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` 38`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{xd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ko(e):""}function bk(e){switch(e.tag){case 5:return Ko(e.type);case 16:return Ko("Lazy");case 13:return Ko("Suspense");case 19:return Ko("SuspenseList");case 0:case 2:case 15:return e=Sd(e.type,!1),e;case 11:return e=Sd(e.type.render,!1),e;case 1:return e=Sd(e.type,!0),e;default:return""}}function Rh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case mi:return"Fragment";case pi:return"Portal";case Ch:return"Profiler";case Mp:return"StrictMode";case Ph:return"Suspense";case Ah:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Pb:return(e.displayName||"Context")+".Consumer";case Cb:return(e._context.displayName||"Context")+".Provider";case Fp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Vp:return t=e.displayName||null,t!==null?t:Rh(e.type)||"Memo";case wr:t=e._payload,e=e._init;try{return Rh(e(t))}catch{}}return null}function xk(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Rh(t);case 8:return t===Mp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function qr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Rb(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Sk(e){var t=Rb(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pl(e){e._valueTracker||(e._valueTracker=Sk(e))}function Ob(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Rb(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Lc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Oh(e,t){var n=t.checked;return Pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Hg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=qr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $b(e,t){t=t.checked,t!=null&&Ip(e,"checked",t,!1)}function $h(e,t){$b(e,t);var n=qr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?jh(e,t.type,n):t.hasOwnProperty("defaultValue")&&jh(e,t.type,qr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Kg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}
vendor: 13,534 bytes, line 38
38function jh(e,t,n){(t!=="number"||Lc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var qo=Array.isArray;function $i(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+qr(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Nh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error($(91));return Pe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function qg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error($(92));if(qo(n)){if(1<n.length)throw Error($(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:qr(n)}}function jb(e,t){var n=qr(t.value),r=qr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Gg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Nb(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Dh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Nb(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Al,Db=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Al=Al||document.createElement("div"),Al.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Al.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Sa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var na={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ek=["Webkit","ms","Moz","O"];Object.keys(na).forEach(function(e){Ek.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),na[t]=na[e]})});function Lb(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||na.hasOwnProperty(e)&&na[e]?(""+t).trim():t+"px"}function Ib(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Lb(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var _k=Pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Lh(e,t){if(t){if(_k[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function Ih(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Mh=null;function Up(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fh=null,ji=null,Ni=null;function Yg(e){if(e=dl(e)){if(typeof Fh!="function")throw Error($(280));var t=e.stateNode;t&&(t=ju(t),Fh(e.stateNode,e.type,t))}}function Mb(e){ji?Ni?Ni.push(e):Ni=[e]:ji=e}function Fb(){if(ji){var e=ji,t=Ni;if(Ni=ji=null,Yg(e),t)for(e=0;e<t.length;e++)Yg(t[e])}}function Vb(e,t){return e(t)}function Ub(){}var Ed=!1;function Bb(e,t,n){if(Ed)return e(t,n);Ed=!0;try{return Vb(e,t,n)}finally{Ed=!1,(ji!==null||Ni!==null)&&(Ub(),Fb())}}function Ea(e,t){var n=e.stateNode;if(n===null)return null;var r=ju(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error($(231,t,typeof n));return n}var Vh=!1;if(Jn)try{var jo={};Object.defineProperty(jo,"passive",{get:function(){Vh=!0}}),window.addEventListener("test",jo,jo),window.removeEventListener("test",jo,jo)}catch{Vh=!1}function Tk(e,t,n,r,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var ra=!1,Ic=null,Mc=!1,Uh=null,kk={onError:function(e){ra=!0,Ic=e}};function Ck(e,t,n,r,s,i,o,a,l){ra=!1,Ic=null,Tk.apply(kk,arguments)}function Pk(e,t,n,r,s,i,o,a,l){if(Ck.apply(this,arguments),ra){if(ra){var c=Ic;ra=!1,Ic=null}else throw Error($(198));Mc||(Mc=!0,Uh=c)}}function qs(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function zb(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Qg(e){if(qs(e)!==e)throw Error($(188))}function Ak(e){var t=e.alternate;if(!t){if(t=qs(e),t===null)throw Error($(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return Qg(s),e;if(i===r)return Qg(s),t;i=i.sibling}throw Error($(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error($(189))}}if(n.alternate!==r)throw Error($(190))}if(n.tag!==3)throw Error($(188));return n.stateNode.current===n?e:t}function Wb(e){return e=Ak(e),e!==null?Hb(e):null}function Hb(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Hb(e);if(t!==null)return t;e=e.sibling}return null}var Kb=Ot.unstable_scheduleCallback,Jg=Ot.unstable_cancelCallback,Rk=Ot.unstable_shouldYield,Ok=Ot.unstable_requestPaint,De=Ot.unstable_now,$k=Ot.unstable_getCurrentPriorityLevel,Bp=Ot.unstable_ImmediatePriority,qb=Ot.unstable_UserBlockingPriority,Fc=Ot.unstable_NormalPriority,jk=Ot.unstable_LowPriority,Gb=Ot.unstable_IdlePriority,Au=null,Rn=null;function Nk(e){if(Rn&&typeof Rn.onCommitFiberRoot=="function")try{Rn.onCommitFiberRoot(Au,e,void 0,(e.current.flags&128)===128)}catch{}}var an=Math.clz32?Math.clz32:Ik,Dk=Math.log,Lk=Math.LN2;function Ik(e){return e>>>=0,e===0?32:31-(Dk(e)/Lk|0)|0}var Rl=64,Ol=4194304;function Go(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Vc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=Go(a):(i&=o,i!==0&&(r=Go(i)))}else o=n&~s,o!==0?r=Go(o):i!==0&&(r=Go(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-an(t),s=1<<n,r|=e[n],t&=~s;return r}function Mk(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Fk(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-an(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=Mk(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Bh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Yb(){var e=Rl;return Rl<<=1,!(Rl&4194240)&&(Rl=64),e}function _d(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function cl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-an(t),e[t]=n}function Vk(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-an(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function zp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-an(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var he=0;function Qb(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Jb,Wp,Xb,Zb,ex,zh=!1,$l=[],Ir=null,Mr=null,Fr=null,_a=new Map,Ta=new Map,xr=[],Uk="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Xg(e,t){switch(e){case"focusin":case"focusout":Ir=null;break;case"dragenter":case"dragleave":Mr=null;break;case"mouseover":case"mouseout":Fr=null;break;case"pointerover":case"pointerout":_a.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ta.delete(t.pointerId)}}function No(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=dl(t),t!==null&&Wp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Bk(e,t,n,r,s){switch(t){case"focusin":return Ir=No(Ir,e,t,n,r,s),!0;case"dragenter":return Mr=No(Mr,e,t,n,r,s),!0;case"mouseover":return Fr=No(Fr,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return _a.set(i,No(_a.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Ta.set(i,No(Ta.get(i)||null,e,t,n,r,s)),!0}return!1}function tx(e){var t=bs(e.target);if(t!==null){var n=qs(t);if(n!==null){if(t=n.tag,t===13){if(t=zb(n),t!==null){e.blockedOn=t,ex(e.priority,function(){Xb(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function fc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Wh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Mh=r,n.target.dispatchEvent(r),Mh=null}else return t=dl(n),t!==null&&Wp(t),e.blockedOn=n,!1;t.shift()}return!0}function Zg(e,t,n){fc(e)&&n.delete(t)}function zk(){zh=!1,Ir!==null&&fc(Ir)&&(Ir=null),Mr!==null&&fc(Mr)&&(Mr=null),Fr!==null&&fc(Fr)&&(Fr=null),_a.forEach(Zg),Ta.forEach(Zg)}function Do(e,t){e.blockedOn===t&&(e.blockedOn=null,zh||(zh=!0,Ot.unstable_scheduleCallback(Ot.unstable_NormalPriority,zk)))}function ka(e){function t(s){return Do(s,e)}if(0<$l.length){Do($l[0],e);for(var n=1;n<$l.length;n++){var r=$l[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ir!==null&&Do(Ir,e),Mr!==null&&Do(Mr,e),Fr!==null&&Do(Fr,e),_a.forEach(t),Ta.forEach(t),n=0;n<xr.length;n++)r=xr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<xr.length&&(n=xr[0],n.blockedOn===null);)tx(n),n.blockedOn===null&&xr.shift()}var Di=rr.ReactCurrentBatchConfig,Uc=!0;function Wk(e,t,n,r){var s=he,i=Di.transition;Di.transition=null;try{he=1,Hp(e,t,n,r)}finally{he=s,Di.transition=i}}function Hk(e,t,n,r){var s=he,i=Di.transition;Di.transition=null;try{he=4,Hp(e,t,n,r)}finally{he=s,Di.transition=i}}function Hp(e,t,n,r){if(Uc){var s=Wh(e,t,n,r);if(s===null)Nd(e,t,r,Bc,n),Xg(e,r);else if(Bk(s,e,t,n,r))r.stopPropagation();else if(Xg(e,r),t&4&&-1<Uk.indexOf(e)){for(;s!==null;){var i=dl(s);if(i!==null&&Jb(i),i=Wh(e,t,n,r),i===null&&Nd(e,t,r,Bc,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Nd(e,t,r,null,n)}}var Bc=null;function Wh(e,t,n,r){if(Bc=null,e=Up(r),e=bs(e),e!==null)if(t=qs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=zb(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Bc=e,null}
vendor: 10,401 bytes, line 38
38function nx(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch($k()){case Bp:return 1;case qb:return 4;case Fc:case jk:return 16;case Gb:return 536870912;default:return 16}default:return 16}}var Nr=null,Kp=null,pc=null;function rx(){if(pc)return pc;var e,t=Kp,n=t.length,r,s="value"in Nr?Nr.value:Nr.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return pc=s.slice(e,1<r?1-r:void 0)}function mc(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function jl(){return!0}function ev(){return!1}function Nt(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?jl:ev,this.isPropagationStopped=ev,this}return Pe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=jl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=jl)},persist:function(){},isPersistent:jl}),t}var po={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qp=Nt(po),ul=Pe({},po,{view:0,detail:0}),Kk=Nt(ul),Td,kd,Lo,Ru=Pe({},ul,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Lo&&(Lo&&e.type==="mousemove"?(Td=e.screenX-Lo.screenX,kd=e.screenY-Lo.screenY):kd=Td=0,Lo=e),Td)},movementY:function(e){return"movementY"in e?e.movementY:kd}}),tv=Nt(Ru),qk=Pe({},Ru,{dataTransfer:0}),Gk=Nt(qk),Yk=Pe({},ul,{relatedTarget:0}),Cd=Nt(Yk),Qk=Pe({},po,{animationName:0,elapsedTime:0,pseudoElement:0}),Jk=Nt(Qk),Xk=Pe({},po,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Zk=Nt(Xk),eC=Pe({},po,{data:0}),nv=Nt(eC),tC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nC={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"},rC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=rC[e])?!!t[e]:!1}function Gp(){return sC}var iC=Pe({},ul,{key:function(e){if(e.key){var t=tC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=mc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?nC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gp,charCode:function(e){return e.type==="keypress"?mc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?mc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),oC=Nt(iC),aC=Pe({},Ru,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rv=Nt(aC),lC=Pe({},ul,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gp}),cC=Nt(lC),uC=Pe({},po,{propertyName:0,elapsedTime:0,pseudoElement:0}),dC=Nt(uC),hC=Pe({},Ru,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),fC=Nt(hC),pC=[9,13,27,32],Yp=Jn&&"CompositionEvent"in window,sa=null;Jn&&"documentMode"in document&&(sa=document.documentMode);var mC=Jn&&"TextEvent"in window&&!sa,sx=Jn&&(!Yp||sa&&8<sa&&11>=sa),sv=" ",iv=!1;function ix(e,t){switch(e){case"keyup":return pC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ox(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gi=!1;function gC(e,t){switch(e){case"compositionend":return ox(t);case"keypress":return t.which!==32?null:(iv=!0,sv);case"textInput":return e=t.data,e===sv&&iv?null:e;default:return null}}function vC(e,t){if(gi)return e==="compositionend"||!Yp&&ix(e,t)?(e=rx(),pc=Kp=Nr=null,gi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return sx&&t.locale!=="ko"?null:t.data;default:return null}}var yC={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 ov(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!yC[e.type]:t==="textarea"}function ax(e,t,n,r){Mb(r),t=zc(t,"onChange"),0<t.length&&(n=new qp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ia=null,Ca=null;function wC(e){yx(e,0)}function Ou(e){var t=wi(e);if(Ob(t))return e}function bC(e,t){if(e==="change")return t}var lx=!1;if(Jn){var Pd;if(Jn){var Ad="oninput"in document;if(!Ad){var av=document.createElement("div");av.setAttribute("oninput","return;"),Ad=typeof av.oninput=="function"}Pd=Ad}else Pd=!1;lx=Pd&&(!document.documentMode||9<document.documentMode)}function lv(){ia&&(ia.detachEvent("onpropertychange",cx),Ca=ia=null)}function cx(e){if(e.propertyName==="value"&&Ou(Ca)){var t=[];ax(t,Ca,e,Up(e)),Bb(wC,t)}}function xC(e,t,n){e==="focusin"?(lv(),ia=t,Ca=n,ia.attachEvent("onpropertychange",cx)):e==="focusout"&&lv()}function SC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ou(Ca)}function EC(e,t){if(e==="click")return Ou(t)}function _C(e,t){if(e==="input"||e==="change")return Ou(t)}function TC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cn=typeof Object.is=="function"?Object.is:TC;function Pa(e,t){if(cn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!kh.call(t,s)||!cn(e[s],t[s]))return!1}return!0}function cv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function uv(e,t){var n=cv(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=cv(n)}}function ux(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ux(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function dx(){for(var e=window,t=Lc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lc(e.document)}return t}function Qp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function kC(e){var t=dx(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ux(n.ownerDocument.documentElement,n)){if(r!==null&&Qp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=uv(n,i);var o=uv(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var CC=Jn&&"documentMode"in document&&11>=document.documentMode,vi=null,Hh=null,oa=null,Kh=!1;function dv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kh||vi==null||vi!==Lc(r)||(r=vi,"selectionStart"in r&&Qp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,088 bytes, line 38
38sNode:r.focusNode,focusOffset:r.focusOffset}),oa&&Pa(oa,r)||(oa=r,r=zc(Hh,"onSelect"),0<r.length&&(t=new qp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vi)))}function Nl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var yi={animationend:Nl("Animation","AnimationEnd"),animationiteration:Nl("Animation","AnimationIteration"),animationstart:Nl("Animation","AnimationStart"),transitionend:Nl("Transition","TransitionEnd")},Rd={},hx={};Jn&&(hx=document.createElement("div").style,"AnimationEvent"in window||(delete yi.animationend.animation,delete yi.animationiteration.animation,delete yi.animationstart.animation),"TransitionEvent"in window||delete yi.transitionend.transition);function $u(e){if(Rd[e])return Rd[e];if(!yi[e])return e;var t=yi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in hx)return Rd[e]=t[n];return e}var fx=$u("animationend"),px=$u("animationiteration"),mx=$u("animationstart"),gx=$u("transitionend"),vx=new Map,hv="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function es(e,t){vx.set(e,t),Ks(t,[e])}for(var Od=0;Od<hv.length;Od++){var $d=hv[Od],PC=$d.toLowerCase(),AC=$d[0].toUpperCase()+$d.slice(1);es(PC,"on"+AC)}es(fx,"onAnimationEnd");es(px,"onAnimationIteration");es(mx,"onAnimationStart");es("dblclick","onDoubleClick");es("focusin","onFocus");es("focusout","onBlur");es(gx,"onTransitionEnd");to("onMouseEnter",["mouseout","mouseover"]);to("onMouseLeave",["mouseout","mouseover"]);to("onPointerEnter",["pointerout","pointerover"]);to("onPointerLeave",["pointerout","pointerover"]);Ks("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ks("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ks("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ks("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ks("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ks("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yo="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(" "),RC=new Set("cancel close invalid load scroll toggle".split(" ").concat(Yo));function fv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Pk(r,t,void 0,e),e.currentTarget=null}function yx(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;fv(s,a,c),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;fv(s,a,c),i=l}}}if(Mc)throw e=Uh,Mc=!1,Uh=null,e}function ye(e,t){var n=t[Jh];n===void 0&&(n=t[Jh]=new Set);var r=e+"__bubble";n.has(r)||(wx(t,e,2,!1),n.add(r))}function jd(e,t,n){var r=0;t&&(r|=4),wx(n,e,r,t)}var Dl="_reactListening"+Math.random().toString(36).slice(2);function Aa(e){if(!e[Dl]){e[Dl]=!0,kb.forEach(function(n){n!=="selectionchange"&&(RC.has(n)||jd(n,!1,e),jd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Dl]||(t[Dl]=!0,jd("selectionchange",!1,t))}}function wx(e,t,n,r){switch(nx(t)){case 1:var s=Wk;break;case 4:s=Hk;break;
vendor: 4,226 bytes, line 38
38default:s=Hp}n=s.bind(null,t,n,e),s=void 0,!Vh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Nd(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=bs(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}Bb(function(){var c=i,u=Up(n),d=[];e:{var h=vx.get(e);if(h!==void 0){var f=qp,w=e;switch(e){case"keypress":if(mc(n)===0)break e;case"keydown":case"keyup":f=oC;break;case"focusin":w="focus",f=Cd;break;case"focusout":w="blur",f=Cd;break;case"beforeblur":case"afterblur":f=Cd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=tv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=Gk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=cC;break;case fx:case px:case mx:f=Jk;break;case gx:f=dC;break;case"scroll":f=Kk;break;case"wheel":f=fC;break;case"copy":case"cut":case"paste":f=Zk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=rv}var m=(t&4)!==0,b=!m&&e==="scroll",v=m?h!==null?h+"Capture":null:h;m=[];for(var g=c,y;g!==null;){y=g;var S=y.stateNode;if(y.tag===5&&S!==null&&(y=S,v!==null&&(S=Ea(g,v),S!=null&&m.push(Ra(g,S,y)))),b)break;g=g.return}0<m.length&&(h=new f(h,w,null,n,u),d.push({event:h,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",h&&n!==Mh&&(w=n.relatedTarget||n.fromElement)&&(bs(w)||w[Xn]))break e;if((f||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,f?(w=n.relatedTarget||n.toElement,f=c,w=w?bs(w):null,w!==null&&(b=qs(w),w!==b||w.tag!==5&&w.tag!==6)&&(w=null)):(f=null,w=c),f!==w)){if(m=tv,S="onMouseLeave",v="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(m=rv,S="onPointerLeave",v="onPointerEnter",g="pointer"),b=f==null?h:wi(f),y=w==null?h:wi(w),h=new m(S,g+"leave",f,n,u),h.target=b,h.relatedTarget=y,S=null,bs(u)===c&&(m=new m(v,g+"enter",w,n,u),m.target=y,m.relatedTarget=b,S=m),b=S,f&&w)t:{for(m=f,v=w,g=0,y=m;y;y=Zs(y))g++;for(y=0,S=v;S;S=Zs(S))y++;for(;0<g-y;)m=Zs(m),g--;for(;0<y-g;)v=Zs(v),y--;for(;g--;){if(m===v||v!==null&&m===v.alternate)break t;m=Zs(m),v=Zs(v)}m=null}else m=null;f!==null&&pv(d,h,f,m,!1),w!==null&&b!==null&&pv(d,b,w,m,!0)}}e:{if(h=c?wi(c):window,f=h.nodeName&&h.nodeName.toLowerCase(),f==="select"||f==="input"&&h.type==="file")var E=bC;else if(ov(h))if(lx)E=_C;else{E=SC;var _=xC}else(f=h.nodeName)&&f.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(E=EC);if(E&&(E=E(e,c))){ax(d,E,n,u);break e}_&&_(e,h,c),e==="focusout"&&(_=h._wrapperState)&&_.controlled&&h.type==="number"&&jh(h,"number",h.value)}switch(_=c?wi(c):window,e){case"focusin":(ov(_)||_.contentEditable==="true")&&(vi=_,Hh=c,oa=null);break;case"focusout":oa=Hh=vi=null;break;case"mousedown":Kh=!0;break;case"contextmenu":case"mouseup":case"dragend":Kh=!1,dv(d,n,u);break;case"selectionchange":if(CC)break;case"keydown":case"keyup":dv(d,n,u)}var C;if(Yp)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else gi?ix(e,n)&&(k="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(k="onCompositionStart");k&&(sx&&n.locale!=="ko"&&(gi||k!=="onCompositionStart"?k==="onCompositionEnd"&&gi&&(C=rx()):(Nr=u,Kp="value"in Nr?Nr.value:Nr.textContent,gi=!0)),_=zc(c,k),0<_.length&&(k=new nv(k,e,null,n,u),d.push({event:k,listeners:_}),C?k.data=C:(C=ox(n),C!==null&&(k.data=C)))),(C=mC?gC(e,n):vC(e,n))&&
vendor: 4,519 bytes, lines 38-39
38(c=zc(c,"onBeforeInput"),0<c.length&&(u=new nv("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=C))}yx(d,t)})}function Ra(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zc(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Ea(e,n),i!=null&&r.unshift(Ra(e,i,s)),i=Ea(e,t),i!=null&&r.push(Ra(e,i,s))),e=e.return}return r}function Zs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function pv(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=Ea(n,i),l!=null&&o.unshift(Ra(n,l,a))):s||(l=Ea(n,i),l!=null&&o.push(Ra(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var OC=/\r\n?/g,$C=/\u0000|\uFFFD/g;function mv(e){return(typeof e=="string"?e:""+e).replace(OC,` 39`).replace($C,"")}function Ll(e,t,n){if(t=mv(t),mv(e)!==t&&n)throw Error($(425))}function Wc(){}var qh=null,Gh=null;function Yh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Qh=typeof setTimeout=="function"?setTimeout:void 0,jC=typeof clearTimeout=="function"?clearTimeout:void 0,gv=typeof Promise=="function"?Promise:void 0,NC=typeof queueMicrotask=="function"?queueMicrotask:typeof gv<"u"?function(e){return gv.resolve(null).then(e).catch(DC)}:Qh;function DC(e){setTimeout(function(){throw e})}function Dd(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),ka(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);ka(t)}function Vr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function vv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var mo=Math.random().toString(36).slice(2),Tn="__reactFiber$"+mo,Oa="__reactProps$"+mo,Xn="__reactContainer$"+mo,Jh="__reactEvents$"+mo,LC="__reactListeners$"+mo,IC="__reactHandles$"+mo;function bs(e){var t=e[Tn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xn]||n[Tn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=vv(e);e!==null;){if(n=e[Tn])return n;e=vv(e)}return t}e=n,n=e.parentNode}return null}function dl(e){return e=e[Tn]||e[Xn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function wi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error($(33))}function ju(e){return e[Oa]||null}var Xh=[],bi=-1;function ts(e){return{current:e}}function we(e){0>bi||(e.current=Xh[bi],Xh[bi]=null,bi--)}function ge(e,t){bi++,Xh[bi]=e.current,e.current=t}var Gr={},it=ts(Gr),bt=ts(!1),Is=Gr;function no(e,t){var n=e.type.contextTypes;if(!n)return Gr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function xt(e){return e=e.childContextTypes,e!=null}function Hc(){we(bt),we(it)}function yv(e,t,n){if(it.current!==Gr)throw Error($(168));ge(it,t),ge(bt,n)}function bx(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error($(108,xk(e)||"Unknown",s));return Pe({},n,r)}function Kc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gr,Is=it.current,ge(it,e),ge(bt,bt.current),!0}function wv(e,t,n){var r=e.stateNode;if(!r)throw Error($(169));n?(e=bx(e,t,Is),r.__reactInternalMemoizedMergedChildContext=e,we(bt),we(it),ge(it,e)):we(bt),ge(bt,n)}var Wn=null,Nu=!1,Ld=!1;function xx(e){Wn===null?Wn=[e]:Wn.push(e)}function MC(e){Nu=!0,xx(e)}function ns(){if(!Ld&&Wn!==null){Ld=!0;var e=0,t=he;try{var n=Wn;for(he=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Wn=null,Nu=!1}catch(s){throw Wn!==null&&(Wn=Wn.slice(e+1)),Kb(Bp,ns),s}finally{he=t,Ld=!1}}return null}var xi=[],Si=0,qc=null,Gc=0,Vt=[],Ut=0,Ms=null,Kn=1,qn="";function fs(e,t){xi[Si++]=Gc,xi[Si++]=qc,qc=e,Gc=t}function Sx(e,t,n){Vt[Ut++]=Kn,Vt[Ut++]=qn,Vt[Ut++]=Ms,Ms=e;var r=Kn;e=qn;var s=32-an(r)-1;r&=~(1<<s),n+=1;var i=32-an(t)+s;
vendor: 27,404 bytes, lines 39-41
39if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,Kn=1<<32-an(t)+s|n<<s|r,qn=i+e}else Kn=1<<i|n<<s|r,qn=e}function Jp(e){e.return!==null&&(fs(e,1),Sx(e,1,0))}function Xp(e){for(;e===qc;)qc=xi[--Si],xi[Si]=null,Gc=xi[--Si],xi[Si]=null;for(;e===Ms;)Ms=Vt[--Ut],Vt[Ut]=null,qn=Vt[--Ut],Vt[Ut]=null,Kn=Vt[--Ut],Vt[Ut]=null}var At=null,Pt=null,xe=!1,on=null;function Ex(e,t){var n=Bt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function bv(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,At=e,Pt=Vr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,At=e,Pt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ms!==null?{id:Kn,overflow:qn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Bt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,At=e,Pt=null,!0):!1;default:return!1}}function Zh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ef(e){if(xe){var t=Pt;if(t){var n=t;if(!bv(e,t)){if(Zh(e))throw Error($(418));t=Vr(n.nextSibling);var r=At;t&&bv(e,t)?Ex(r,n):(e.flags=e.flags&-4097|2,xe=!1,At=e)}}else{if(Zh(e))throw Error($(418));e.flags=e.flags&-4097|2,xe=!1,At=e}}}function xv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;At=e}function Il(e){if(e!==At)return!1;if(!xe)return xv(e),xe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Yh(e.type,e.memoizedProps)),t&&(t=Pt)){if(Zh(e))throw _x(),Error($(418));for(;t;)Ex(e,t),t=Vr(t.nextSibling)}if(xv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Pt=Vr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Pt=null}}else Pt=At?Vr(e.stateNode.nextSibling):null;return!0}function _x(){for(var e=Pt;e;)e=Vr(e.nextSibling)}function ro(){Pt=At=null,xe=!1}function Zp(e){on===null?on=[e]:on.push(e)}var FC=rr.ReactCurrentBatchConfig;function Io(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error($(309));var r=n.stateNode}if(!r)throw Error($(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error($(284));if(!n._owner)throw Error($(290,e))}return e}function Ml(e,t){throw e=Object.prototype.toString.call(t),Error($(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Sv(e){var t=e._init;return t(e._payload)}function Tx(e){function t(v,g){if(e){var y=v.deletions;y===null?(v.deletions=[g],v.flags|=16):y.push(g)}}function n(v,g){if(!e)return null;for(;g!==null;)t(v,g),g=g.sibling;return null}function r(v,g){for(v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function s(v,g){return v=Wr(v,g),v.index=0,v.sibling=null,v}function i(v,g,y){return v.index=y,e?(y=v.alternate,y!==null?(y=y.index,y<g?(v.flags|=2,g):y):(v.flags|=2,g)):(v.flags|=1048576,g)}function o(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,g,y,S){return g===null||g.tag!==6?(g=zd(y,v.mode,S),g.return=v,g):(g=s(g,y),g.return=v,g)}function l(v,g,y,S){var E=y.type;return E===mi?u(v,g,y.props.children,S,y.key):g!==null&&(g.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===wr&&Sv(E)===g.type)?(S=s(g,y.props),S.ref=Io(v,g,y),S.return=v,S):(S=Sc(y.type,y.key,y.props,null,v.mode,S),S.ref=Io(v,g,y),S.return=v,S)}function c(v,g,y,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==y.containerInfo||g.stateNode.implementation!==y.implementation?(g=Wd(y,v.mode,S),g.return=v,g):(g=s(g,y.children||[]),g.return=v,g)}function u(v,g,y,S,E){return g===null||g.tag!==7?(g=Ds(y,v.mode,S,E),g.return=v,g):(g=s(g,y),g.return=v,g)}function d(v,g,y){if(typeof g=="string"&&g!==""||typeof g=="number")return g=zd(""+g,v.mode,y),g.return=v,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Cl:return y=Sc(g.type,g.key,g.props,null,v.mode,y),y.ref=Io(v,null,g),y.return=v,y;case pi:return g=Wd(g,v.mode,y),g.return=v,g;case wr:var S=g._init;return d(v,S(g._payload),y)}if(qo(g)||$o(g))return g=Ds(g,v.mode,y,null),g.return=v,g;Ml(v,g)}return null}function h(v,g,y,S){var E=g!==null?g.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return E!==null?null:a(v,g,""+y,S);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Cl:return y.key===E?l(v,g,y,S):null;case pi:return y.key===E?c(v,g,y,S):null;case wr:return E=y._init,h(v,g,E(y._payload),S)}if(qo(y)||$o(y))return E!==null?null:u(v,g,y,S,null);Ml(v,y)}return null}function f(v,g,y,S,E){if(typeof S=="string"&&S!==""||typeof S=="number")return v=v.get(y)||null,a(g,v,""+S,E);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Cl:return v=v.get(S.key===null?y:S.key)||null,l(g,v,S,E);case pi:return v=v.get(S.key===null?y:S.key)||null,c(g,v,S,E);case wr:var _=S._init;return f(v,g,y,_(S._payload),E)}if(qo(S)||$o(S))return v=v.get(y)||null,u(g,v,S,E,null);Ml(g,S)}return null}function w(v,g,y,S){for(var E=null,_=null,C=g,k=g=0,P=null;C!==null&&k<y.length;k++){C.index>k?(P=C,C=null):P=C.sibling;var R=h(v,C,y[k],S);if(R===null){C===null&&(C=P);break}e&&C&&R.alternate===null&&t(v,C),g=i(R,g,k),_===null?E=R:_.sibling=R,_=R,C=P}if(k===y.length)return n(v,C),xe&&fs(v,k),E;if(C===null){for(;k<y.length;k++)C=d(v,y[k],S),C!==null&&(g=i(C,g,k),_===null?E=C:_.sibling=C,_=C);return xe&&fs(v,k),E}for(C=r(v,C);k<y.length;k++)P=f(C,v,k,y[k],S),P!==null&&(e&&P.alternate!==null&&C.delete(P.key===null?k:P.key),g=i(P,g,k),_===null?E=P:_.sibling=P,_=P);return e&&C.forEach(function(I){return t(v,I)}),xe&&fs(v,k),E}function m(v,g,y,S){var E=$o(y);if(typeof E!="function")throw Error($(150));if(y=E.call(y),y==null)throw Error($(151));for(var _=E=null,C=g,k=g=0,P=null,R=y.next();C!==null&&!R.done;k++,R=y.next()){C.index>k?(P=C,C=null):P=C.sibling;var I=h(v,C,R.value,S);if(I===null){C===null&&(C=P);break}e&&C&&I.alternate===null&&t(v,C),g=i(I,g,k),_===null?E=I:_.sibling=I,_=I,C=P}if(R.done)return n(v,C),xe&&fs(v,k),E;if(C===null){for(;!R.done;k++,R=y.next())R=d(v,R.value,S),R!==null&&(g=i(R,g,k),_===null?E=R:_.sibling=R,_=R);return xe&&fs(v,k),E}for(C=r(v,C);!R.done;k++,R=y.next())R=f(C,v,k,R.value,S),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?k:R.key),g=i(R,g,k),_===null?E=R:_.sibling=R,_=R);return e&&C.forEach(function(N){return t(v,N)}),xe&&fs(v,k),E}function b(v,g,y,S){if(typeof y=="object"&&y!==null&&y.type===mi&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Cl:e:{for(var E=y.key,_=g;_!==null;){if(_.key===E){if(E=y.type,E===mi){if(_.tag===7){n(v,_.sibling),g=s(_,y.props.children),g.return=v,v=g;break e}}else if(_.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===wr&&Sv(E)===_.type){n(v,_.sibling),g=s(_,y.props),g.ref=Io(v,_,y),g.return=v,v=g;break e}n(v,_);break}else t(v,_);_=_.sibling}y.type===mi?(g=Ds(y.props.children,v.mode,S,y.key),g.return=v,v=g):(S=Sc(y.type,y.key,y.props,null,v.mode,S),S.ref=Io(v,g,y),S.return=v,v=S)}return o(v);case pi:e:{for(_=y.key;g!==null;){if(g.key===_)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){n(v,g.sibling),g=s(g,y.children||[]),g.return=v,v=g;break e}else{n(v,g);break}else t(v,g);g=g.sibling}g=Wd(y,v.mode,S),g.return=v,v=g}return o(v);case wr:return _=y._init,b(v,g,_(y._payload),S)}if(qo(y))return w(v,g,y,S);if($o(y))return m(v,g,y,S);Ml(v,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(n(v,g.sibling),g=s(g,y),g.return=v,v=g):(n(v,g),g=zd(y,v.mode,S),g.return=v,v=g),o(v)):n(v,g)}return b}var so=Tx(!0),kx=Tx(!1),Yc=ts(null),Qc=null,Ei=null,em=null;function tm(){em=Ei=Qc=null}function nm(e){var t=Yc.current;we(Yc),e._currentValue=t}function tf(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Li(e,t){Qc=e,em=Ei=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(wt=!0),e.firstContext=null)}function Wt(e){var t=e._currentValue;if(em!==e)if(e={context:e,memoizedValue:t,next:null},Ei===null){if(Qc===null)throw Error($(308));Ei=e,Qc.dependencies={lanes:0,firstContext:e}}else Ei=Ei.next=e;return t}var xs=null;function rm(e){xs===null?xs=[e]:xs.push(e)}function Cx(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,rm(t)):(n.next=s.next,s.next=n),t.interleaved=n,Zn(e,r)}function Zn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var br=!1;function sm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Px(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Gn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ur(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ae&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Zn(e,n)}return s=r.interleaved,s===null?(t.next=t,rm(r)):(t.next=s.next,s.next=t),r.interleaved=t,Zn(e,n)}function gc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zp(e,n)}}function Ev(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Jc(e,t,n,r){var s=e.updateQueue;br=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,u=c=l=null,a=i;do{var h=a.lane,f=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,m=a;switch(h=t,f=n,m.tag){case 1:if(w=m.payload,typeof w=="function"){d=w.call(f,d,h);break e}d=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=m.payload,h=typeof w=="function"?w.call(f,d,h):w,h==null)break e;d=Pe({},d,h);break e;case 2:br=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else f={eventTime:f,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=f,l=d):u=u.next=f,o|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(u===null&&(l=d),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Vs|=o,e.lanes=o,e.memoizedState=d}}function _v(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error($(191,s));s.call(r)}}}var hl={},On=ts(hl),$a=ts(hl),ja=ts(hl);function Ss(e){if(e===hl)throw Error($(174));return e}function im(e,t){switch(ge(ja,t),ge($a,e),ge(On,hl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Dh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Dh(t,e)}we(On),ge(On,t)}function io(){we(On),we($a),we(ja)}function Ax(e){Ss(ja.current);var t=Ss(On.current),n=Dh(t,e.type);t!==n&&(ge($a,e),ge(On,n))}function om(e){$a.current===e&&(we(On),we($a))}var Te=ts(0);function Xc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Id=[];function am(){for(var e=0;e<Id.length;e++)Id[e]._workInProgressVersionPrimary=null;Id.length=0}var vc=rr.ReactCurrentDispatcher,Md=rr.ReactCurrentBatchConfig,Fs=0,Ce=null,Fe=null,He=null,Zc=!1,aa=!1,Na=0,VC=0;function Ze(){throw Error($(321))}function lm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cn(e[n],t[n]))return!1;return!0}function cm(e,t,n,r,s,i){if(Fs=i,Ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,vc.current=e===null||e.memoizedState===null?WC:HC,e=n(r,s),aa){i=0;do{if(aa=!1,Na=0,25<=i)throw Error($(301));i+=1,He=Fe=null,t.updateQueue=null,vc.current=KC,e=n(r,s)}while(aa)}if(vc.current=eu,t=Fe!==null&&Fe.next!==null,Fs=0,He=Fe=Ce=null,Zc=!1,t)throw Error($(300));return e}function um(){var e=Na!==0;return Na=0,e}function yn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return He===null?Ce.memoizedState=He=e:He=He.next=e,He}function Ht(){if(Fe===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=He===null?Ce.memoizedState:He.next;if(t!==null)He=t,Fe=e;else{if(e===null)throw Error($(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},He===null?Ce.memoizedState=He=e:He=He.next=e}return He}function Da(e,t){return typeof t=="function"?t(e):t}function Fd(e){var t=Ht(),n=t.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=e;var r=Fe,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,c=i;do{var u=c.lane;if((Fs&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,Ce.lanes|=u,Vs|=u}c=c.next}while(c!==null&&c!==i);l===null?o=r:l.next=a,cn(r,t.memoizedState)||(wt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,Ce.lanes|=i,Vs|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Vd(e){var t=Ht(),n=t.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);cn(i,t.memoizedState)||(wt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Rx(){}function Ox(e,t){var n=Ce,r=Ht(),s=t(),i=!cn(r.memoizedState,s);if(i&&(r.memoizedState=s,wt=!0),r=r.queue,dm(Nx.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||He!==null&&He.memoizedState.tag&1){if(n.flags|=2048,La(9,jx.bind(null,n,r,s,t),void 0,null),Ke===null)throw Error($(349));Fs&30||$x(n,t,s)}return s}function $x(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ce.updateQueue,t===null?(t={lastEffect:null,stores:null},Ce.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function jx(e,t,n,r){t.value=n,t.getSnapshot=r,Dx(t)&&Lx(e)}function Nx(e,t,n){return n(function(){Dx(t)&&Lx(e)})}function Dx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!cn(e,n)}catch{return!0}}function Lx(e){var t=Zn(e,1);t!==null&&ln(t,e,1,-1)}function Tv(e){var t=yn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Da,lastRenderedState:e},t.queue=e,e=e.dispatch=zC.bind(null,Ce,e),[t.memoizedState,e]}function La(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ce.updateQueue,t===null?(t={lastEffect:null,stores:null},Ce.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Ix(){return Ht().memoizedState}function yc(e,t,n,r){var s=yn();Ce.flags|=e,s.memoizedState=La(1|t,n,void 0,r===void 0?null:r)}function Du(e,t,n,r){var s=Ht();r=r===void 0?null:r;var i=void 0;if(Fe!==null){var o=Fe.memoizedState;if(i=o.destroy,r!==null&&lm(r,o.deps)){s.memoizedState=La(t,n,i,r);return}}Ce.flags|=e,s.memoizedState=La(1|t,n,i,r)}function kv(e,t){return yc(8390656,8,e,t)}function dm(e,t){return Du(2048,8,e,t)}function Mx(e,t){return Du(4,2,e,t)}function Fx(e,t){return Du(4,4,e,t)}function Vx(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ux(e,t,n){return n=n!=null?n.concat([e]):null,Du(4,4,Vx.bind(null,t,e),n)}function hm(){}function Bx(e,t){var n=Ht();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&lm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function zx(e,t){var n=Ht();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&lm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Wx(e,t,n){return Fs&21?(cn(n,t)||(n=Yb(),Ce.lanes|=n,Vs|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,wt=!0),e.memoizedState=n)}function UC(e,t){var n=he;he=n!==0&&4>n?n:4,e(!0);var r=Md.transition;Md.transition={};try{e(!1),t()}finally{he=n,Md.transition=r}}function Hx(){return Ht().memoizedState}function BC(e,t,n){var r=zr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Kx(e))qx(t,n);else if(n=Cx(e,t,n,r),n!==null){var s=ct();ln(n,e,r,s),Gx(n,t,r)}}function zC(e,t,n){var r=zr(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Kx(e))qx(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,cn(a,o)){var l=t.interleaved;l===null?(s.next=s,rm(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Cx(e,t,s,r),n!==null&&(s=ct(),ln(n,e,r,s),Gx(n,t,r))}}function Kx(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function qx(e,t){aa=Zc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Gx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zp(e,n)}}var eu={readContext:Wt,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useInsertionEffect:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useMutableSource:Ze,useSyncExternalStore:Ze,useId:Ze,unstable_isNewReconciler:!1},WC={readContext:Wt,useCallback:function(e,t){return yn().memoizedState=[e,t===void 0?null:t],e},useContext:Wt,useEffect:kv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,yc(4194308,4,Vx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return yc(4194308,4,e,t)},useInsertionEffect:function(e,t){return yc(4,2,e,t)},useMemo:function(e,t){var n=yn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=yn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=BC.bind(null,Ce,e),[r.memoizedState,e]},useRef:function(e){var t=yn();return e={current:e},t.memoizedState=e},useState:Tv,useDebugValue:hm,useDeferredValue:function(e){return yn().memoizedState=e},useTransition:function(){var e=Tv(!1),t=e[0];return e=UC.bind(null,e[1]),yn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ce,s=yn();if(xe){if(n===void 0)throw Error($(407));n=n()}else{if(n=t(),Ke===null)throw Error($(349));Fs&30||$x(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,kv(Nx.bind(null,r,i,e),[e]),r.flags|=2048,La(9,jx.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=yn(),t=Ke.identifierPrefix;if(xe){var n=qn,r=Kn;n=(r&~(1<<32-an(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Na++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=VC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},HC={readContext:Wt,useCallback:Bx,useContext:Wt,useEffect:dm,useImperativeHandle:Ux,useInsertionEffect:Mx,useLayoutEffect:Fx,useMemo:zx,useReducer:Fd,useRef:Ix,useState:function(){return Fd(Da)},useDebugValue:hm,useDeferredValue:function(e){var t=Ht();return Wx(t,Fe.memoizedState,e)},useTransition:function(){var e=Fd(Da)[0],t=Ht().memoizedState;return[e,t]},useMutableSource:Rx,useSyncExternalStore:Ox,useId:Hx,unstable_isNewReconciler:!1},KC={readContext:Wt,useCallback:Bx,useContext:Wt,useEffect:dm,useImperativeHandle:Ux,useInsertionEffect:Mx,useLayoutEffect:Fx,useMemo:zx,useReducer:Vd,useRef:Ix,useState:function(){return Vd(Da)},useDebugValue:hm,useDeferredValue:function(e){var t=Ht();return Fe===null?t.memoizedState=e:Wx(t,Fe.memoizedState,e)},useTransition:function(){var e=Vd(Da)[0],t=Ht().memoizedState;return[e,t]},useMutableSource:Rx,useSyncExternalStore:Ox,useId:Hx,unstable_isNewReconciler:!1};function en(e,t){if(e&&e.defaultProps){t=Pe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function nf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Pe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Lu={isMounted:function(e){return(e=e._reactInternals)?qs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ct(),s=zr(e),i=Gn(r,s);i.payload=t,n!=null&&(i.callback=n),t=Ur(e,i,s),t!==null&&(ln(t,e,s,r),gc(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ct(),s=zr(e),i=Gn(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ur(e,i,s),t!==null&&(ln(t,e,s,r),gc(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ct(),r=zr(e),s=Gn(n,r);s.tag=2,t!=null&&(s.callback=t),t=Ur(e,s,r),t!==null&&(ln(t,e,r,n),gc(t,e,r))}};function Cv(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Pa(n,r)||!Pa(s,i):!0}function Yx(e,t,n){var r=!1,s=Gr,i=t.contextType;return typeof i=="object"&&i!==null?i=Wt(i):(s=xt(t)?Is:it.current,r=t.contextTypes,i=(r=r!=null)?no(e,s):Gr),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Lu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Pv(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Lu.enqueueReplaceState(t,t.state,null)}function rf(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},sm(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Wt(i):(i=xt(t)?Is:it.current,s.context=no(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(nf(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Lu.enqueueReplaceState(s,s.state,null),Jc(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function oo(e,t){try{var n="",r=t;do n+=bk(r),r=r.return;while(r);var s=n}catch(i){s=` 40Error generating stack: `+i.message+` 41`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Ud(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function sf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var qC=typeof WeakMap=="function"?WeakMap:Map;function Qx(e,t,n){n=Gn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){nu||(nu=!0,mf=r),sf(e,t)},n}function Jx(e,t,n){n=Gn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){sf(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){sf(e,t),typeof r!="function"&&(Br===null?Br=new Set([this]):Br.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Av(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new qC;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=aP.bind(null,e,t,n),t.then(e,e))}function Rv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ov(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Gn(-1,1),t.tag=2,Ur(n,t,1))),n.lanes|=1),e)}var GC=rr.ReactCurrentOwner,wt=!1;function lt(e,t,n,r){t.child=e===null?kx(t,null,n,r):so(t,e.child,n,r)}function $v(e,t,n,r,s){n=n.render;var i=t.ref;return Li(t,s),r=cm(e,t,n,r,i,s),n=um(),e!==null&&!wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,er(e,t,s)):(xe&&n&&Jp(t),t.flags|=1,lt(e,t,r,s),t.child)}function jv(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!bm(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Xx(e,t,i,r,s)):(e=Sc(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Pa,n(o,r)&&e.ref===t.ref)return er(e,t,s)}return t.flags|=1,e=Wr(i,r),e.ref=t.ref,e.return=t,t.child=e}function Xx(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Pa(i,r)&&e.ref===t.ref)if(wt=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(wt=!0);else return t.lanes=e.lanes,er(e,t,s)}return of(e,t,n,r,s)}function Zx(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ge(Ti,_t),_t|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ge(Ti,_t),_t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ge(Ti,_t),_t|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ge(Ti,_t),_t|=r;return lt(e,t,s,n),t.child}function eS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}
vendor: 6,335 bytes, line 41
41function of(e,t,n,r,s){var i=xt(n)?Is:it.current;return i=no(t,i),Li(t,s),n=cm(e,t,n,r,i,s),r=um(),e!==null&&!wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,er(e,t,s)):(xe&&r&&Jp(t),t.flags|=1,lt(e,t,n,s),t.child)}function Nv(e,t,n,r,s){if(xt(n)){var i=!0;Kc(t)}else i=!1;if(Li(t,s),t.stateNode===null)wc(e,t),Yx(t,n,r),rf(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Wt(c):(c=xt(n)?Is:it.current,c=no(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Pv(t,o,r,c),br=!1;var h=t.memoizedState;o.state=h,Jc(t,r,o,s),l=t.memoizedState,a!==r||h!==l||bt.current||br?(typeof u=="function"&&(nf(t,n,u,r),l=t.memoizedState),(a=br||Cv(t,n,a,r,h,l,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Px(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:en(t.type,a),o.props=c,d=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Wt(l):(l=xt(n)?Is:it.current,l=no(t,l));var f=n.getDerivedStateFromProps;(u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||h!==l)&&Pv(t,o,r,l),br=!1,h=t.memoizedState,o.state=h,Jc(t,r,o,s);var w=t.memoizedState;a!==d||h!==w||bt.current||br?(typeof f=="function"&&(nf(t,n,f,r),w=t.memoizedState),(c=br||Cv(t,n,c,r,h,w,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,w,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,w,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),o.props=r,o.state=w,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return af(e,t,n,r,i,s)}function af(e,t,n,r,s,i){eS(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&wv(t,n,!1),er(e,t,i);r=t.stateNode,GC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=so(t,e.child,null,i),t.child=so(t,null,a,i)):lt(e,t,a,i),t.memoizedState=r.state,s&&wv(t,n,!0),t.child}function tS(e){var t=e.stateNode;t.pendingContext?yv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&yv(e,t.context,!1),im(e,t.containerInfo)}function Dv(e,t,n,r,s){return ro(),Zp(s),t.flags|=256,lt(e,t,n,r),t.child}var lf={dehydrated:null,treeContext:null,retryLane:0};function cf(e){return{baseLanes:e,cachePool:null,transitions:null}}function nS(e,t,n){var r=t.pendingProps,s=Te.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ge(Te,s&1),e===null)return ef(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Fu(o,r,0,null),e=Ds(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=cf(n),t.memoizedState=lf,e):fm(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return YC(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Wr(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Wr(a,i):(i=Ds(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?cf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=lf,r}return i=e.child,e=i.sibling,r=Wr(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function fm(e,t){return t=Fu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fl(e,t,n,r){return r!==null&&Zp(r),so(t,e.child,null,n),e=fm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function YC(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Ud(Error($(422))),Fl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Fu({mode:"visible",children:r.children},s,0,null),i=Ds(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&so(t,e.child,null,o),t.child.memoizedState=cf(o),t.memoizedState=lf,i);if(!(t.mode&1))return Fl(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error($(419)),r=Ud(i,r,void 0),Fl(e,t,o,r)}if(a=(o&e.childLanes)!==0,wt||a){if(r=Ke,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Zn(e,s),ln(r,e,s,-1))}
vendor: 5,772 bytes, line 41
41return wm(),r=Ud(Error($(421))),Fl(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=lP.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Pt=Vr(s.nextSibling),At=t,xe=!0,on=null,e!==null&&(Vt[Ut++]=Kn,Vt[Ut++]=qn,Vt[Ut++]=Ms,Kn=e.id,qn=e.overflow,Ms=t),t=fm(t,r.children),t.flags|=4096,t)}function Lv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),tf(e.return,t,n)}function Bd(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function rS(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(lt(e,t,r.children,n),r=Te.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Lv(e,n,t);else if(e.tag===19)Lv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ge(Te,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Xc(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Bd(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Xc(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Bd(t,!0,n,null,i);break;case"together":Bd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function wc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function er(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Vs|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,n=Wr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Wr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function QC(e,t,n){switch(t.tag){case 3:tS(t),ro();break;case 5:Ax(t);break;case 1:xt(t.type)&&Kc(t);break;case 4:im(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ge(Yc,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ge(Te,Te.current&1),t.flags|=128,null):n&t.child.childLanes?nS(e,t,n):(ge(Te,Te.current&1),e=er(e,t,n),e!==null?e.sibling:null);ge(Te,Te.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return rS(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ge(Te,Te.current),r)break;return null;case 22:case 23:return t.lanes=0,Zx(e,t,n)}return er(e,t,n)}var sS,uf,iS,oS;sS=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};uf=function(){};iS=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Ss(On.current);var i=null;switch(n){case"input":s=Oh(e,s),r=Oh(e,r),i=[];break;case"select":s=Pe({},s,{value:void 0}),r=Pe({},r,{value:void 0}),i=[];break;case"textarea":s=Nh(e,s),r=Nh(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Wc)}Lh(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(xa.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(xa.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&ye("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};oS=function(e,t,n,r){n!==r&&(t.flags|=4)};function Mo(e,t){if(!xe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function et(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function JC(e,t,n){var r=t.pendingProps;switch(Xp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(t),null;case 1:return xt(t.type)&&Hc(),et(t),null;case 3:return r=t.stateNode,io(),we(bt),we(it),am(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Il(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,on!==null&&(yf(on),on=null))),uf(e,t),et(t),null;case 5:om(t);var s=Ss(ja.current);
vendor: 32,328 bytes, line 41
41if(n=t.type,e!==null&&t.stateNode!=null)iS(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error($(166));return et(t),null}if(e=Ss(On.current),Il(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Tn]=t,r[Oa]=i,e=(t.mode&1)!==0,n){case"dialog":ye("cancel",r),ye("close",r);break;case"iframe":case"object":case"embed":ye("load",r);break;case"video":case"audio":for(s=0;s<Yo.length;s++)ye(Yo[s],r);break;case"source":ye("error",r);break;case"img":case"image":case"link":ye("error",r),ye("load",r);break;case"details":ye("toggle",r);break;case"input":Hg(r,i),ye("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ye("invalid",r);break;case"textarea":qg(r,i),ye("invalid",r)}Lh(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Ll(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Ll(r.textContent,a,e),s=["children",""+a]):xa.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ye("scroll",r)}switch(n){case"input":Pl(r),Kg(r,i,!0);break;case"textarea":Pl(r),Gg(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Wc)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Nb(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Tn]=t,e[Oa]=r,sS(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ih(n,r),n){case"dialog":ye("cancel",e),ye("close",e),s=r;break;case"iframe":case"object":case"embed":ye("load",e),s=r;break;case"video":case"audio":for(s=0;s<Yo.length;s++)ye(Yo[s],e);s=r;break;case"source":ye("error",e),s=r;break;case"img":case"image":case"link":ye("error",e),ye("load",e),s=r;break;case"details":ye("toggle",e),s=r;break;case"input":Hg(e,r),s=Oh(e,r),ye("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Pe({},r,{value:void 0}),ye("invalid",e);break;case"textarea":qg(e,r),s=Nh(e,r),ye("invalid",e);break;default:s=r}Lh(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Ib(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Db(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Sa(e,l):typeof l=="number"&&Sa(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(xa.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ye("scroll",e):l!=null&&Ip(e,i,l,o))}switch(n){case"input":Pl(e),Kg(e,r,!1);break;case"textarea":Pl(e),Gg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+qr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?$i(e,!!r.multiple,i,!1):r.defaultValue!=null&&$i(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Wc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return et(t),null;case 6:if(e&&t.stateNode!=null)oS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error($(166));if(n=Ss(ja.current),Ss(On.current),Il(t)){if(r=t.stateNode,n=t.memoizedProps,r[Tn]=t,(i=r.nodeValue!==n)&&(e=At,e!==null))switch(e.tag){case 3:Ll(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ll(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Tn]=t,t.stateNode=r}return et(t),null;case 13:if(we(Te),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(xe&&Pt!==null&&t.mode&1&&!(t.flags&128))_x(),ro(),t.flags|=98560,i=!1;else if(i=Il(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error($(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error($(317));i[Tn]=t}else ro(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;et(t),i=!1}else on!==null&&(yf(on),on=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Te.current&1?Ue===0&&(Ue=3):wm())),t.updateQueue!==null&&(t.flags|=4),et(t),null);case 4:return io(),uf(e,t),e===null&&Aa(t.stateNode.containerInfo),et(t),null;case 10:return nm(t.type._context),et(t),null;case 17:return xt(t.type)&&Hc(),et(t),null;case 19:if(we(Te),i=t.memoizedState,i===null)return et(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Mo(i,!1);else{if(Ue!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Xc(e),o!==null){for(t.flags|=128,Mo(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ge(Te,Te.current&1|2),t.child}e=e.sibling}i.tail!==null&&De()>ao&&(t.flags|=128,r=!0,Mo(i,!1),t.lanes=4194304)}else{if(!r)if(e=Xc(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!xe)return et(t),null}else 2*De()-i.renderingStartTime>ao&&n!==1073741824&&(t.flags|=128,r=!0,Mo(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=De(),t.sibling=null,n=Te.current,ge(Te,r?n&1|2:n&1),t):(et(t),null);case 22:case 23:return ym(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?_t&1073741824&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function XC(e,t){switch(Xp(t),t.tag){case 1:return xt(t.type)&&Hc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return io(),we(bt),we(it),am(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return om(t),null;case 13:if(we(Te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));ro()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(Te),null;case 4:return io(),null;case 10:return nm(t.type._context),null;case 22:case 23:return ym(),null;case 24:return null;default:return null}}var Vl=!1,rt=!1,ZC=typeof WeakSet=="function"?WeakSet:Set,M=null;function _i(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){$e(e,t,r)}else n.current=null}function df(e,t,n){try{n()}catch(r){$e(e,t,r)}}var Iv=!1;function eP(e,t){if(qh=Uc,e=dx(),Qp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,d=e,h=null;t:for(;;){for(var f;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(f=d.firstChild)!==null;)h=d,d=f;for(;;){if(d===e)break t;if(h===n&&++c===s&&(a=o),h===i&&++u===r&&(l=o),(f=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=f}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gh={focusedElem:e,selectionRange:n},Uc=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var m=w.memoizedProps,b=w.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:en(t.type,m),b);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(S){$e(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return w=Iv,Iv=!1,w}function la(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&df(t,n,i)}s=s.next}while(s!==r)}}function Iu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function hf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function aS(e){var t=e.alternate;t!==null&&(e.alternate=null,aS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Tn],delete t[Oa],delete t[Jh],delete t[LC],delete t[IC])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function lS(e){return e.tag===5||e.tag===3||e.tag===4}function Mv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||lS(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ff(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Wc));else if(r!==4&&(e=e.child,e!==null))for(ff(e,t,n),e=e.sibling;e!==null;)ff(e,t,n),e=e.sibling}function pf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(pf(e,t,n),e=e.sibling;e!==null;)pf(e,t,n),e=e.sibling}var Ye=null,sn=!1;function dr(e,t,n){for(n=n.child;n!==null;)cS(e,t,n),n=n.sibling}function cS(e,t,n){if(Rn&&typeof Rn.onCommitFiberUnmount=="function")try{Rn.onCommitFiberUnmount(Au,n)}catch{}switch(n.tag){case 5:rt||_i(n,t);case 6:var r=Ye,s=sn;Ye=null,dr(e,t,n),Ye=r,sn=s,Ye!==null&&(sn?(e=Ye,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ye.removeChild(n.stateNode));break;case 18:Ye!==null&&(sn?(e=Ye,n=n.stateNode,e.nodeType===8?Dd(e.parentNode,n):e.nodeType===1&&Dd(e,n),ka(e)):Dd(Ye,n.stateNode));break;case 4:r=Ye,s=sn,Ye=n.stateNode.containerInfo,sn=!0,dr(e,t,n),Ye=r,sn=s;break;case 0:case 11:case 14:case 15:if(!rt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&df(n,t,o),s=s.next}while(s!==r)}dr(e,t,n);break;case 1:if(!rt&&(_i(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){$e(n,t,a)}dr(e,t,n);break;case 21:dr(e,t,n);break;case 22:n.mode&1?(rt=(r=rt)||n.memoizedState!==null,dr(e,t,n),rt=r):dr(e,t,n);break;default:dr(e,t,n)}}function Fv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ZC),t.forEach(function(r){var s=cP.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Qt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ye=a.stateNode,sn=!1;break e;case 3:Ye=a.stateNode.containerInfo,sn=!0;break e;case 4:Ye=a.stateNode.containerInfo,sn=!0;break e}a=a.return}if(Ye===null)throw Error($(160));cS(i,o,s),Ye=null,sn=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){$e(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)uS(t,e),t=t.sibling}function uS(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Qt(t,e),gn(e),r&4){try{la(3,e,e.return),Iu(3,e)}catch(m){$e(e,e.return,m)}try{la(5,e,e.return)}catch(m){$e(e,e.return,m)}}break;case 1:Qt(t,e),gn(e),r&512&&n!==null&&_i(n,n.return);break;case 5:if(Qt(t,e),gn(e),r&512&&n!==null&&_i(n,n.return),e.flags&32){var s=e.stateNode;try{Sa(s,"")}catch(m){$e(e,e.return,m)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&$b(s,i),Ih(a,o);var c=Ih(a,i);for(o=0;o<l.length;o+=2){var u=l[o],d=l[o+1];u==="style"?Ib(s,d):u==="dangerouslySetInnerHTML"?Db(s,d):u==="children"?Sa(s,d):Ip(s,u,d,c)}switch(a){case"input":$h(s,i);break;case"textarea":jb(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?$i(s,!!i.multiple,f,!1):h!==!!i.multiple&&(i.defaultValue!=null?$i(s,!!i.multiple,i.defaultValue,!0):$i(s,!!i.multiple,i.multiple?[]:"",!1))}s[Oa]=i}catch(m){$e(e,e.return,m)}}break;case 6:if(Qt(t,e),gn(e),r&4){if(e.stateNode===null)throw Error($(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(m){$e(e,e.return,m)}}break;case 3:if(Qt(t,e),gn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ka(t.containerInfo)}catch(m){$e(e,e.return,m)}break;case 4:Qt(t,e),gn(e);break;case 13:Qt(t,e),gn(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(gm=De())),r&4&&Fv(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(rt=(c=rt)||u,Qt(t,e),rt=c):Qt(t,e),gn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(M=e,u=e.child;u!==null;){for(d=M=u;M!==null;){switch(h=M,f=h.child,h.tag){case 0:case 11:case 14:case 15:la(4,h,h.return);break;case 1:_i(h,h.return);var w=h.stateNode;if(typeof w.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(m){$e(r,n,m)}}break;case 5:_i(h,h.return);break;case 22:if(h.memoizedState!==null){Uv(d);continue}}f!==null?(f.return=h,M=f):Uv(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{s=d.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Lb("display",o))}catch(m){$e(e,e.return,m)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(m){$e(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Qt(t,e),gn(e),r&4&&Fv(e);break;case 21:break;default:Qt(t,e),gn(e)}}function gn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(lS(n)){var r=n;break e}n=n.return}throw Error($(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Sa(s,""),r.flags&=-33);var i=Mv(e);pf(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Mv(e);ff(e,a,o);break;default:throw Error($(161))}}catch(l){$e(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function tP(e,t,n){M=e,dS(e)}function dS(e,t,n){for(var r=(e.mode&1)!==0;M!==null;){var s=M,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Vl;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||rt;a=Vl;var c=rt;if(Vl=o,(rt=l)&&!c)for(M=s;M!==null;)o=M,l=o.child,o.tag===22&&o.memoizedState!==null?Bv(s):l!==null?(l.return=o,M=l):Bv(s);for(;i!==null;)M=i,dS(i),i=i.sibling;M=s,Vl=a,rt=c}Vv(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,M=i):Vv(e)}}function Vv(e){for(;M!==null;){var t=M;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:rt||Iu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!rt)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:en(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&_v(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}_v(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&ka(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}rt||t.flags&512&&hf(t)}catch(h){$e(t,t.return,h)}}if(t===e){M=null;break}if(n=t.sibling,n!==null){n.return=t.return,M=n;break}M=t.return}}function Uv(e){for(;M!==null;){var t=M;if(t===e){M=null;break}var n=t.sibling;if(n!==null){n.return=t.return,M=n;break}M=t.return}}function Bv(e){for(;M!==null;){var t=M;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Iu(4,t)}catch(l){$e(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){$e(t,s,l)}}var i=t.return;try{hf(t)}catch(l){$e(t,i,l)}break;case 5:var o=t.return;try{hf(t)}catch(l){$e(t,o,l)}}}catch(l){$e(t,t.return,l)}if(t===e){M=null;break}var a=t.sibling;if(a!==null){a.return=t.return,M=a;break}M=t.return}}var nP=Math.ceil,tu=rr.ReactCurrentDispatcher,pm=rr.ReactCurrentOwner,zt=rr.ReactCurrentBatchConfig,ae=0,Ke=null,Me=null,Je=0,_t=0,Ti=ts(0),Ue=0,Ia=null,Vs=0,Mu=0,mm=0,ca=null,yt=null,gm=0,ao=1/0,Un=null,nu=!1,mf=null,Br=null,Ul=!1,Dr=null,ru=0,ua=0,gf=null,bc=-1,xc=0;function ct(){return ae&6?De():bc!==-1?bc:bc=De()}function zr(e){return e.mode&1?ae&2&&Je!==0?Je&-Je:FC.transition!==null?(xc===0&&(xc=Yb()),xc):(e=he,e!==0||(e=window.event,e=e===void 0?16:nx(e.type)),e):1}function ln(e,t,n,r){if(50<ua)throw ua=0,gf=null,Error($(185));cl(e,n,r),(!(ae&2)||e!==Ke)&&(e===Ke&&(!(ae&2)&&(Mu|=n),Ue===4&&Sr(e,Je)),St(e,r),n===1&&ae===0&&!(t.mode&1)&&(ao=De()+500,Nu&&ns()))}function St(e,t){var n=e.callbackNode;Fk(e,t);var r=Vc(e,e===Ke?Je:0);if(r===0)n!==null&&Jg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Jg(n),t===1)e.tag===0?MC(zv.bind(null,e)):xx(zv.bind(null,e)),NC(function(){!(ae&6)&&ns()}),n=null;else{switch(Qb(r)){case 1:n=Bp;break;case 4:n=qb;break;case 16:n=Fc;break;case 536870912:n=Gb;break;default:n=Fc}n=wS(n,hS.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function hS(e,t){if(bc=-1,xc=0,ae&6)throw Error($(327));var n=e.callbackNode;if(Ii()&&e.callbackNode!==n)return null;var r=Vc(e,e===Ke?Je:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=su(e,r);else{t=r;var s=ae;ae|=2;var i=pS();(Ke!==e||Je!==t)&&(Un=null,ao=De()+500,Ns(e,t));do try{iP();break}catch(a){fS(e,a)}while(!0);tm(),tu.current=i,ae=s,Me!==null?t=0:(Ke=null,Je=0,t=Ue)}if(t!==0){if(t===2&&(s=Bh(e),s!==0&&(r=s,t=vf(e,s))),t===1)throw n=Ia,Ns(e,0),Sr(e,r),St(e,De()),n;if(t===6)Sr(e,r);else{if(s=e.current.alternate,!(r&30)&&!rP(s)&&(t=su(e,r),t===2&&(i=Bh(e),i!==0&&(r=i,t=vf(e,i))),t===1))throw n=Ia,Ns(e,0),Sr(e,r),St(e,De()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error($(345));case 2:ps(e,yt,Un);break;case 3:if(Sr(e,r),(r&130023424)===r&&(t=gm+500-De(),10<t)){if(Vc(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){ct(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Qh(ps.bind(null,e,yt,Un),t);break}ps(e,yt,Un);break;case 4:if(Sr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-an(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=De()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*nP(r/1960))-r,10<r){e.timeoutHandle=Qh(ps.bind(null,e,yt,Un),r);break}ps(e,yt,Un);break;case 5:ps(e,yt,Un);break;default:throw Error($(329))}}}return St(e,De()),e.callbackNode===n?hS.bind(null,e):null}function vf(e,t){var n=ca;return e.current.memoizedState.isDehydrated&&(Ns(e,t).flags|=256),e=su(e,t),e!==2&&(t=yt,yt=n,t!==null&&yf(t)),e}function yf(e){yt===null?yt=e:yt.push.apply(yt,e)}function rP(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!cn(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Sr(e,t){for(t&=~mm,t&=~Mu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-an(t),r=1<<n;e[n]=-1,t&=~r}}function zv(e){if(ae&6)throw Error($(327));Ii();var t=Vc(e,0);if(!(t&1))return St(e,De()),null;var n=su(e,t);if(e.tag!==0&&n===2){var r=Bh(e);r!==0&&(t=r,n=vf(e,r))}if(n===1)throw n=Ia,Ns(e,0),Sr(e,t),St(e,De()),n;if(n===6)throw Error($(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ps(e,yt,Un),St(e,De()),null}function vm(e,t){var n=ae;ae|=1;try{return e(t)}finally{ae=n,ae===0&&(ao=De()+500,Nu&&ns())}}function Us(e){Dr!==null&&Dr.tag===0&&!(ae&6)&&Ii();var t=ae;ae|=1;var n=zt.transition,r=he;try{if(zt.transition=null,he=1,e)return e()}finally{he=r,zt.transition=n,ae=t,!(ae&6)&&ns()}}function ym(){_t=Ti.current,we(Ti)}function Ns(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,jC(n)),Me!==null)for(n=Me.return;n!==null;){var r=n;switch(Xp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Hc();break;case 3:io(),we(bt),we(it),am();break;case 5:om(r);break;case 4:io();break;case 13:we(Te);break;case 19:we(Te);break;case 10:nm(r.type._context);break;case 22:case 23:ym()}n=n.return}if(Ke=e,Me=e=Wr(e.current,null),Je=_t=t,Ue=0,Ia=null,mm=Mu=Vs=0,yt=ca=null,xs!==null){for(t=0;t<xs.length;t++)if(n=xs[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}xs=null}return e}function fS(e,t){do{var n=Me;try{if(tm(),vc.current=eu,Zc){for(var r=Ce.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Zc=!1}if(Fs=0,He=Fe=Ce=null,aa=!1,Na=0,pm.current=null,n===null||n.return===null){Ue=1,Ia=t,Me=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=Je,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=Rv(o);if(f!==null){f.flags&=-257,Ov(f,o,a,i,t),f.mode&1&&Av(i,c,t),t=f,l=c;var w=t.updateQueue;if(w===null){var m=new Set;m.add(l),t.updateQueue=m}else w.add(l);break e}else{if(!(t&1)){Av(i,c,t),wm();break e}l=Error($(426))}}else if(xe&&a.mode&1){var b=Rv(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Ov(b,o,a,i,t),Zp(oo(l,a));break e}}i=l=oo(l,a),Ue!==4&&(Ue=2),ca===null?ca=[i]:ca.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=Qx(i,l,t);Ev(i,v);break e;case 1:a=l;var g=i.type,y=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Br===null||!Br.has(y)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=Jx(i,a,t);Ev(i,S);break e}}i=i.return}while(i!==null)}gS(n)}catch(E){t=E,Me===n&&n!==null&&(Me=n=n.return);continue}break}while(!0)}function pS(){var e=tu.current;return tu.current=eu,e===null?eu:e}function wm(){(Ue===0||Ue===3||Ue===2)&&(Ue=4),Ke===null||!(Vs&268435455)&&!(Mu&268435455)||Sr(Ke,Je)}function su(e,t){var n=ae;ae|=2;var r=pS();(Ke!==e||Je!==t)&&(Un=null,Ns(e,t));do try{sP();break}catch(s){fS(e,s)}while(!0);if(tm(),ae=n,tu.current=r,Me!==null)throw Error($(261));return Ke=null,Je=0,Ue}function sP(){for(;Me!==null;)mS(Me)}function iP(){for(;Me!==null&&!Rk();)mS(Me)}function mS(e){var t=yS(e.alternate,e,_t);e.memoizedProps=e.pendingProps,t===null?gS(e):Me=t,pm.current=null}function gS(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=XC(n,t),n!==null){n.flags&=32767,Me=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ue=6,Me=null;return}}else if(n=JC(n,t,_t),n!==null){Me=n;return}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);Ue===0&&(Ue=5)}function ps(e,t,n){var r=he,s=zt.transition;try{zt.transition=null,he=1,oP(e,t,n,r)}finally{zt.transition=s,he=r}return null}function oP(e,t,n,r){do Ii();while(Dr!==null);if(ae&6)throw Error($(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error($(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Vk(e,i),e===Ke&&(Me=Ke=null,Je=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ul||(Ul=!0,wS(Fc,function(){return Ii(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=zt.transition,zt.transition=null;var o=he;he=1;var a=ae;ae|=4,pm.current=null,eP(e,n),uS(n,e),kC(Gh),Uc=!!qh,Gh=qh=null,e.current=n,tP(n),Ok(),ae=a,he=o,zt.transition=i}else e.current=n;if(Ul&&(Ul=!1,Dr=e,ru=s),i=e.pendingLanes,i===0&&(Br=null),Nk(n.stateNode),St(e,De()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(nu)throw nu=!1,e=mf,mf=null,e;return ru&1&&e.tag!==0&&Ii(),i=e.pendingLanes,i&1?e===gf?ua++:(ua=0,gf=e):ua=0,ns(),null}function Ii(){if(Dr!==null){var e=Qb(ru),t=zt.transition,n=he;try{if(zt.transition=null,he=16>e?16:e,Dr===null)var r=!1;else{if(e=Dr,Dr=null,ru=0,ae&6)throw Error($(331));var s=ae;for(ae|=4,M=e.current;M!==null;){var i=M,o=i.child;if(M.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(M=c;M!==null;){var u=M;switch(u.tag){case 0:case 11:case 15:la(8,u,i)}var d=u.child;if(d!==null)d.return=u,M=d;else for(;M!==null;){u=M;var h=u.sibling,f=u.return;if(aS(u),u===c){M=null;break}if(h!==null){h.return=f,M=h;break}M=f}}}var w=i.alternate;if(w!==null){var m=w.child;if(m!==null){w.child=null;do{var b=m.sibling;m.sibling=null,m=b}while(m!==null)}}M=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,M=o;else e:for(;M!==null;){if(i=M,i.flags&2048)switch(i.tag){case 0:case 11:case 15:la(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,M=v;break e}M=i.return}}var g=e.current;for(M=g;M!==null;){o=M;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,M=y;else e:for(o=g;M!==null;){if(a=M,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Iu(9,a)}}catch(E){$e(a,a.return,E)}if(a===o){M=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,M=S;break e}M=a.return}}if(ae=s,ns(),Rn&&typeof Rn.onPostCommitFiberRoot=="function")try{Rn.onPostCommitFiberRoot(Au,e)}catch{}r=!0}return r}finally{he=n,zt.transition=t}}return!1}function Wv(e,t,n){t=oo(n,t),t=Qx(e,t,1),e=Ur(e,t,1),t=ct(),e!==null&&(cl(e,1,t),St(e,t))}function $e(e,t,n){if(e.tag===3)Wv(e,e,n);else for(;t!==null;){if(t.tag===3){Wv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Br===null||!Br.has(r))){e=oo(n,e),e=Jx(t,e,1),t=Ur(t,e,1),e=ct(),t!==null&&(cl(t,1,e),St(t,e));break}}t=t.return}}function aP(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ct(),e.pingedLanes|=e.suspendedLanes&n,Ke===e&&(Je&n)===n&&(Ue===4||Ue===3&&(Je&130023424)===Je&&500>De()-gm?Ns(e,0):mm|=n),St(e,t)}function vS(e,t){t===0&&(e.mode&1?(t=Ol,Ol<<=1,!(Ol&130023424)&&(Ol=4194304)):t=1);var n=ct();e=Zn(e,t),e!==null&&(cl(e,t,n),St(e,n))}function lP(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vS(e,n)}function cP(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error($(314))}r!==null&&r.delete(t),vS(e,n)}var yS;yS=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||bt.current)wt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return wt=!1,QC(e,t,n);wt=!!(e.flags&131072)}else wt=!1,xe&&t.flags&1048576&&Sx(t,Gc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;wc(e,t),e=t.pendingProps;var s=no(t,it.current);Li(t,n),s=cm(null,t,r,e,s,n);var i=um();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xt(r)?(i=!0,Kc(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,sm(t),s.updater=Lu,t.stateNode=s,s._reactInternals=t,rf(t,r,e,n),t=af(null,t,r,!0,i,n)):(t.tag=0,xe&&i&&Jp(t),lt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(wc(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=dP(r),e=en(r,e),s){case 0:t=of(null,t,r,e,n);break e;case 1:t=Nv(null,t,r,e,n);break e;case 11:t=$v(null,t,r,e,n);break e;case 14:t=jv(null,t,r,en(r.type,e),n);break e}throw Error($(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:en(r,s),of(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:en(r,s),Nv(e,t,r,s,n);case 3:e:{if(tS(t),e===null)throw Error($(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Px(e,t),Jc(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=oo(Error($(423)),t),t=Dv(e,t,r,n,s);break e}else if(r!==s){s=oo(Error($(424)),t),t=Dv(e,t,r,n,s);break e}else for(Pt=Vr(t.stateNode.containerInfo.firstChild),At=t,xe=!0,on=null,n=kx(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ro(),r===s){t=er(e,t,n);break e}lt(e,t,r,n)}t=t.child}return t;case 5:return Ax(t),e===null&&ef(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Yh(r,s)?o=null:i!==null&&Yh(r,i)&&(t.flags|=32),eS(e,t),lt(e,t,o,n),t.child;case 6:return e===null&&ef(t),null;case 13:return nS(e,t,n);case 4:return im(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=so(t,null,r,n):lt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:en(r,s),$v(e,t,r,s,n);case 7:return lt(e,t,t.pendingProps,n),t.child;case 8:return lt(e,t,t.pendingProps.children,n),t.child;case 12:return lt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,ge(Yc,r._currentValue),r._currentValue=o,i!==null)if(cn(i.value,o)){if(i.children===s.children&&!bt.current){t=er(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Gn(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),tf(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error($(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),tf(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}lt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Li(t,n),s=Wt(s),r=r(s),t.flags|=1,lt(e,t,r,n),t.child;case 14:return r=t.type,s=en(r,t.pendingProps),s=en(r.type,s),jv(e,t,r,s,n);case 15:return Xx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:en(r,s),wc(e,t),t.tag=1,xt(r)?(e=!0,Kc(t)):e=!1,Li(t,n),Yx(t,r,s),rf(t,r,s,n),af(null,t,r,!0,e,n);case 19:return rS(e,t,n);
vendor: 9,497 bytes, line 41
41case 22:return Zx(e,t,n)}throw Error($(156,t.tag))};function wS(e,t){return Kb(e,t)}function uP(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bt(e,t,n,r){return new uP(e,t,n,r)}function bm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function dP(e){if(typeof e=="function")return bm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fp)return 11;if(e===Vp)return 14}return 2}function Wr(e,t){var n=e.alternate;return n===null?(n=Bt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Sc(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")bm(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case mi:return Ds(n.children,s,i,t);case Mp:o=8,s|=8;break;case Ch:return e=Bt(12,n,t,s|2),e.elementType=Ch,e.lanes=i,e;case Ph:return e=Bt(13,n,t,s),e.elementType=Ph,e.lanes=i,e;case Ah:return e=Bt(19,n,t,s),e.elementType=Ah,e.lanes=i,e;case Ab:return Fu(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Cb:o=10;break e;case Pb:o=9;break e;case Fp:o=11;break e;case Vp:o=14;break e;case wr:o=16,r=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=Bt(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Ds(e,t,n,r){return e=Bt(7,e,r,t),e.lanes=n,e}function Fu(e,t,n,r){return e=Bt(22,e,r,t),e.elementType=Ab,e.lanes=n,e.stateNode={isHidden:!1},e}function zd(e,t,n){return e=Bt(6,e,null,t),e.lanes=n,e}function Wd(e,t,n){return t=Bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hP(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_d(0),this.expirationTimes=_d(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_d(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function xm(e,t,n,r,s,i,o,a,l){return e=new hP(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Bt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},sm(i),e}function fP(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:pi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function bS(e){if(!e)return Gr;e=e._reactInternals;e:{if(qs(e)!==e||e.tag!==1)throw Error($(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(xt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error($(171))}if(e.tag===1){var n=e.type;if(xt(n))return bx(e,n,t)}return t}function xS(e,t,n,r,s,i,o,a,l){return e=xm(n,r,!0,e,s,i,o,a,l),e.context=bS(null),n=e.current,r=ct(),s=zr(n),i=Gn(r,s),i.callback=t??null,Ur(n,i,s),e.current.lanes=s,cl(e,s,r),St(e,r),e}function Vu(e,t,n,r){var s=t.current,i=ct(),o=zr(s);return n=bS(n),t.context===null?t.context=n:t.pendingContext=n,t=Gn(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ur(s,t,o),e!==null&&(ln(e,s,o,i),gc(e,s,o)),o}function iu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Hv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Sm(e,t){Hv(e,t),(e=e.alternate)&&Hv(e,t)}function pP(){return null}var SS=typeof reportError=="function"?reportError:function(e){console.error(e)};function Em(e){this._internalRoot=e}Uu.prototype.render=Em.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($(409));Vu(e,t,null,null)};Uu.prototype.unmount=Em.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Us(function(){Vu(null,e,null,null)}),t[Xn]=null}};function Uu(e){this._internalRoot=e}Uu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Zb();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xr.length&&t!==0&&t<xr[n].priority;n++);xr.splice(n,0,e),n===0&&tx(e)}};function _m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Bu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Kv(){}function mP(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=iu(o);i.call(c)}}var o=xS(t,r,e,0,null,!1,!1,"",Kv);return e._reactRootContainer=o,e[Xn]=o.current,Aa(e.nodeType===8?e.parentNode:e),Us(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=iu(l);a.call(c)}}var l=xm(e,0,!1,null,null,!1,!1,"",Kv);return e._reactRootContainer=l,e[Xn]=l.current,Aa(e.nodeType===8?e.parentNode:e),Us(function(){Vu(t,l,n,r)}),l}function zu(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=iu(o);a.call(l)}}Vu(t,o,e,s)}else o=mP(n,t,e,s,r);return iu(o)}Jb=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Go(t.pendingLanes);n!==0&&(zp(t,n|1),St(t,De()),!(ae&6)&&(ao=De()+500,ns()))}break;case 13:Us(function(){var r=Zn(e,1);if(r!==null){var s=ct();ln(r,e,1,s)}}),Sm(e,1)}};Wp=function(e){if(e.tag===13){var t=Zn(e,134217728);if(t!==null){var n=ct();ln(t,e,134217728,n)}Sm(e,134217728)}};Xb=function(e){if(e.tag===13){var t=zr(e),n=Zn(e,t);if(n!==null){var r=ct();ln(n,e,t,r)}Sm(e,t)}};Zb=function(){return he};ex=function(e,t){var n=he;try{return he=e,t()}finally{he=n}};Fh=function(e,t,n){switch(t){case"input":if($h(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=ju(r);if(!s)throw Error($(90));Ob(r),$h(r,s)}}}break;case"textarea":jb(e,n);break;case"select":t=n.value,t!=null&&$i(e,!!n.multiple,t,!1)}};Vb=vm;Ub=Us;var gP={usingClientEntryPoint:!1,Events:[dl,wi,ju,Mb,Fb,vm]},Fo={findFiberByHostInstance:bs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},vP={bundleType:Fo.bundleType,version:Fo.version,rendererPackageName:Fo.rendererPackageName,rendererConfig:Fo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:rr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Wb(e),e===null?null:e.stateNode},findFiberByHostInstance:Fo.findFiberByHostInstance||pP,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bl.isDisabled&&Bl.supportsFiber)try{Au=Bl.inject(vP),Rn=Bl}catch{}}jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gP;jt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_m(t))throw Error($(200));return fP(e,t,null,n)};jt.createRoot=function(e,t){if(!_m(e))throw Error($(299));var n=!1,r="",s=SS;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=xm(e,1,!1,null,null,n,!1,r,s),e[Xn]=t.current,Aa(e.nodeType===8?e.parentNode:e),new Em(t)};jt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error($(188)):(e=Object.keys(e).join(","),Error($(268,e)));return e=Wb(t),e=e===null?null:e.stateNode,e};jt.flushSync=function(e){return Us(e)};jt.hydrate=function(e,t,n){if(!Bu(t))throw Error($(200));return zu(null,e,t,!0,n)};jt.hydrateRoot=function(e,t,n){if(!_m(e))throw Error($(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=SS;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=xS(t,null,e,1,n??null,s,!1,i,o),e[Xn]=t.current,Aa(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Uu(t)};jt.render=function(e,t,n){if(!Bu(t))throw Error($(200));return zu(null,e,t,!1,n)};jt.unmountComponentAtNode=function(e){if(!Bu(e))throw Error($(40
41));return e._reactRootContainer?(Us(function(){zu(null,null,e,!1,function(){e._reactRootContainer=null,e[Xn]=null})}),!0):!1};jt.unstable_batchedUpdates=vm;jt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Bu(n))throw Error($(200));if(e==null||e._reactInternals===void 0)throw Error($(38));return zu(e,t,n,!1,r)};jt.version="18.3.1-next-f1338f8080-20240426";function ES(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ES)}catch(e){console.error(e)}}ES(),Eb.exports=jt;var go=Eb.exports;const _S=ub(go);var TS,qv=go;TS=qv.createRoot,qv.hydrateRoot;const yP="modulepreload",wP=function(e){return"/"+e},Gv={},B=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=wP(l),l in Gv)return;Gv[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":yP,c||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((h,f)=>{d.addEventListener("load",h),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})},bP=1,xP=1e6;let Hd=0;function SP(){return Hd=(Hd+1)%Number.MAX_SAFE_INTEGER,Hd.toString()}const Kd=new Map,Yv=e=>{if(Kd.has(e))return;const t=setTimeout(()=>{Kd.delete(e),da({type:"REMOVE_TOAST",toastId:e})},xP);Kd.set(e,t)},EP=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,bP)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Yv(n):e.toasts.forEach(r=>{Yv(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Ec=[];let _c={toasts:[]};function da(e){_c=EP(_c,e),Ec.forEach(t=>{t(_c)})}function _P({...e}){const t=SP(),n=s=>da({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>da({type:"DISMISS_TOAST",toastId:t});return da({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function TP(){const[e,t]=p.useState(_c);return p.useEffect(()=>(Ec.push(t),()=>{const n=Ec.indexOf(t);n>-1&&Ec.splice(n,1)}),[e]),{...e,toast:_P,dismiss:n=>da({type:"DISMISS_TOAST",toastId:n})}}function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U.apply(null,arguments)}function Se(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function kP(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function fl(...e){return t=>e.forEach(n=>kP(n,t))}function Be(...e){return p.useCallback(fl(...e),e)}function _8(e,t){const n=p.createContext(t);function r(i){const{children:o,...a}=i,l=p.useMemo(()=>a,Object.values(a));return p.createElement(n.Provider,{value:l},o)}function s(i){const o=p.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,s]}function vo(e,t=[]){let n=[];function r(i,o){const a=p.createContext(o),l=n.length;n=[...n,o];function c(d){const{scope:h,children:f,...w}=d,m=(h==null?void 0:h[e][l])||a,b=p.useMemo(()=>w,Object.values(w));return p.createElement(m.Provider,{value:b},f)}function u(d,h){const f=(h==null?void 0:h[e][l])||a,w=p.useContext(f);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,u]}const s=()=>{const i=n.map(o=>p.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,CP(s,...t)]}function CP(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:c}
41)=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}const wf=p.forwardRef((e,t)=>{const{children:n,...r}=e,s=p.Children.toArray(n),i=s.find(AP);if(i){const o=i.props.children,a=s.map(l=>l===i?p.Children.count(o)>1?p.Children.only(null):p.isValidElement(o)?o.props.children:null:l);return p.createElement(bf,U({},r,{ref:t}),p.isValidElement(o)?p.cloneElement(o,void 0,a):null)}return p.createElement(bf,U({},r,{ref:t}),n)});wf.displayName="Slot";const bf=p.forwardRef((e,t)=>{const{children:n,...r}=e;return p.isValidElement(n)?p.cloneElement(n,{...RP(r,n.props),ref:t?fl(t,n.ref):n.ref}):p.Children.count(n)>1?p.Children.only(null):null});bf.displayName="SlotClone";const PP=({children:e})=>p.createElement(p.Fragment,null,e);function AP(e){return p.isValidElement(e)&&e.type===PP}function RP(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{i(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function OP(e){const t=e+"CollectionProvider",[n,r]=vo(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=f=>{const{scope:w,children:m}=f,b=j.useRef(null),v=j.useRef(new Map).current;return j.createElement(s,{scope:w,itemMap:v,collectionRef:b},m)},a=e+"CollectionSlot",l=j.forwardRef((f,w)=>{const{scope:m,children:b}=f,v=i(a,m),g=Be(w,v.collectionRef);return j.createElement(wf,{ref:g},b)}),c=e+"CollectionItemSlot",u="data-radix-collection-item",d=j.forwardRef((f,w)=>{const{scope:m,children:b,...v}=f,g=j.useRef(null),y=Be(w,g),S=i(c,m);return j.useEffect(()=>(S.itemMap.set(g,{ref:g,...v}),()=>void S.itemMap.delete(g))),j.createElement(wf,{[u]:"",ref:y},b)});function h(f){const w=i(e+"CollectionConsumer",f);return j.useCallback(()=>{const b=w.collectionRef.current;if(!b)return[];const v=Array.from(b.querySelectorAll(`[${u}]`));return Array.from(w.itemMap.values()).sort((S,E)=>v.indexOf(S.ref.current)-v.indexOf(E.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:o,Slot:l,ItemSlot:d},h,r]}const kS=p.forwardRef((e,t)=>{const{children:n,...r}=e,s=p.Children.toArray(n),i=s.find(jP);if(i){const o=i.props.children,a=s.map(l=>l===i?p.Children.count(o)>1?p.Children.only(null):p.isValidElement(o)?o.props.children:null:l);return p.createElement(xf,U({},r,{ref:t}),p.isValidElement(o)?p.cloneElement(o,void 0,a):null)}return p.createElement(xf,U({},r,{ref:t}),n)});kS.displayName="Slot";const xf=p.forwardRef((e,t)=>{const{children:n,...r}=e;return p.isValidElement(n)?p.cloneElement(n,{...NP(r,n.props),ref:t?fl(t,n.ref):n.ref}):p.Children.count(n)>1?p.Children.only(null):null});xf.displayName="SlotClone";const $P=({children:e})=>p.createElement(p.Fragment,null,e);function jP(e){return p.isValidElement(e)&&e.type===$P}function NP(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{i(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}const DP=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ze=DP.reduce((e,t)=>{const n=p.forwardRef((r,s)=>{const{asChild:i,...o}=r,a=i?kS:t;return p.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),p.createElement(a,U({},o,{ref:s}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function CS(e,t){e&&go.flushSync(()=>e.dispatchEvent(t))}function Ve(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function LP(e,t=globalThis==null?void 0:globalThis.document){const n=Ve(e);p.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Sf="dismissableLayer.update",IP="dismissableLayer.pointerDownOutside",MP="dismissableLayer.focusOutside";let Qv;const PS=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Tm=p.forwardRef((e,t)=>
41{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=e,u=p.useContext(PS),[d,h]=p.useState(null),f=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,w]=p.useState({}),m=Be(t,k=>h(k)),b=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=b.indexOf(v),y=d?b.indexOf(d):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,E=y>=g,_=VP(k=>{const P=k.target,R=[...u.branches].some(I=>I.contains(P));!E||R||(i==null||i(k),a==null||a(k),k.defaultPrevented||l==null||l())},f),C=UP(k=>{const P=k.target;[...u.branches].some(I=>I.contains(P))||(o==null||o(k),a==null||a(k),k.defaultPrevented||l==null||l())},f);return LP(k=>{y===u.layers.size-1&&(s==null||s(k),!k.defaultPrevented&&l&&(k.preventDefault(),l()))},f),p.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Qv=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Jv(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Qv)}},[d,f,r,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Jv())},[d,u]),p.useEffect(()=>{const k=()=>w({});return document.addEventListener(Sf,k),()=>document.removeEventListener(Sf,k)},[]),p.createElement(ze.div,U({},c,{ref:m,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,_.onPointerDownCapture)}))}),FP=p.forwardRef((e,t)=>{const n=p.useContext(PS),r=p.useRef(null),s=Be(t,r);return p.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),p.createElement(ze.div,U({},e,{ref:s}))});function VP(e,t=globalThis==null?void 0:globalThis.document){const n=Ve(e),r=p.useRef(!1),s=p.useRef(()=>{});return p.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let c=function(){AS(IP,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function UP(e,t=globalThis==null?void 0:globalThis.document){const n=Ve(e),r=p.useRef(!1);return p.useEffect(()=>{const s=i=>{i.target&&!r.current&&AS(MP,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Jv(){const e=new CustomEvent(Sf);document.dispatchEvent(e)}function AS(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?CS(s,i):s.dispatchEvent(i)}const BP=Tm,zP=FP,RS=p.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...s}=e;return r?_S.createPortal(p.createElement(ze.div,U({},s,{ref:t})),r):null}),Yr=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{};function WP(e,t){return p.useReducer((n,r)=>{const s=t[n][r];return s??n},e)}const sr=e=>{const{present:t,children:n}=e,r=HP(t),s=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=Be(r.ref,s.ref);return typeof n=="function"||r.isPresent?p.cloneElement(s,{ref:i}):null};sr.displayName="Presence";function HP(e){const[t,n]=p.useState(),r=p.useRef({}),s=p.useRef(e),i=p.useRef("none"),o=e?"mounted":"unmounted",[a,l]=WP(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=zl(r.current);i.current=a==="mounted"?c:"none"},[a]),Yr(()=>{const c=r.current,u=s.current;if(u!==e){const h=i.current,f=zl(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),Yr(()=>{if(t){const c=d=>{const f=zl(r.current).includes(d.animationName);d.target===t&&f&&go.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(i.current=zl(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:p.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function zl(e){return(e==null?void 0:e.animationName)||"none"}function OS({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=KP({defaultProp:t,onChange:n}),i=e!==void 0,o=i?e:r,a=Ve(n),l=p.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&a(d)}else s(c)},[i,e,s,a]);return[o,l]}function KP({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,s=p.useRef(r),i=Ve(t);return p.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}const km=p.forwardRef((e,t)=>
41p.createElement(ze.span,U({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),qP=km,$S="ToastProvider",[Cm,GP,YP]=OP("Toast"),[jS,T8]=vo("Toast",[YP]),[QP,Wu]=jS($S),NS=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=p.useState(null),[c,u]=p.useState(0),d=p.useRef(!1),h=p.useRef(!1);return p.createElement(Cm.Provider,{scope:t},p.createElement(QP,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:p.useCallback(()=>u(f=>f+1),[]),onToastRemove:p.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h},o))};NS.propTypes={label(e){if(e.label&&typeof e.label=="string"&&!e.label.trim()){const t=`Invalid prop \`label\` supplied to \`${$S}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};const JP="ToastViewport",XP=["F8"],Ef="toast.viewportPause",_f="toast.viewportResume",ZP=p.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=XP,label:s="Notifications ({hotkey})",...i}=e,o=Wu(JP,n),a=GP(n),l=p.useRef(null),c=p.useRef(null),u=p.useRef(null),d=p.useRef(null),h=Be(t,d,o.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=o.toastCount>0;p.useEffect(()=>{const b=v=>{var g;r.every(S=>v[S]||v.code===S)&&((g=d.current)===null||g===void 0||g.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),p.useEffect(()=>{const b=l.current,v=d.current;if(w&&b&&v){const g=()=>{if(!o.isClosePausedRef.current){const _=new CustomEvent(Ef);v.dispatchEvent(_),o.isClosePausedRef.current=!0}},y=()=>{if(o.isClosePausedRef.current){const _=new CustomEvent(_f);v.dispatchEvent(_),o.isClosePausedRef.current=!1}},S=_=>{!b.contains(_.relatedTarget)&&y()},E=()=>{b.contains(document.activeElement)||y()};return b.addEventListener("focusin",g),b.addEventListener("focusout",S),b.addEventListener("pointermove",g),b.addEventListener("pointerleave",E),window.addEventListener("blur",g),window.addEventListener("focus",y),()=>{b.removeEventListener("focusin",g),b.removeEventListener("focusout",S),b.removeEventListener("pointermove",g),b.removeEventListener("pointerleave",E),window.removeEventListener("blur",g),window.removeEventListener("focus",y)}}},[w,o.isClosePausedRef]);const m=p.useCallback(({tabbingDirection:b})=>{const g=a().map(y=>{const S=y.ref.current,E=[S,...mA(S)];return b==="forwards"?E:E.reverse()});return(b==="forwards"?g.reverse():g).flat()},[a]);return p.useEffect(()=>{const b=d.current;if(b){const v=g=>{const y=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!y){const k=document.activeElement,P=g.shiftKey;if(g.target===b&&P){var E;(E=c.current)===null||E===void 0||E.focus();return}const N=m({tabbingDirection:P?"backwards":"forwards"}),Q=N.findIndex(D=>D===k);if(qd(N.slice(Q+1)))g.preventDefault();else{var _,C;P?(_=c.current)===null||_===void 0||_.focus():(C=u.current)===null||C===void 0||C.focus()}}};return b.addEventListener("keydown",v),()=>b.removeEventListener("keydown",v)}},[a,m]),p.createElement(zP,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:w?void 0:"none"}},w&&p.createElement(Xv,{ref:c,onFocusFromOutsideViewport:()=>{const b=m({tabbingDirection:"forwards"});qd(b)}}),p.createElement(Cm.Slot,{scope:n},p.createElement(ze.ol,U({tabIndex:-1},i,{ref:h}))),w&&p.createElement(Xv,{ref:u,onFocusFromOutsideViewport:()=>{const b=m({tabbingDirection:"backwards"});qd(b)}}))}),eA="ToastFocusProxy",Xv=p.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=Wu(eA,n);return p.createElement(km,U({"aria-hidden":!0,tabIndex:0},s,{ref:t,style:{position:"fixed"},onFocus:o=>{var a;const l=o.relatedTarget;!((a=i.viewport)!==null&&a!==void 0&&a.contains(l))&&r()}}))}),Hu="Toast",tA="toast.swipeStart",nA="toast.swipeMove",rA="toast.swipeCancel",sA="toast.swipeEnd",iA=p.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=e,[a=!0,l]=OS({prop:r,defaultProp:s,onChange:i});return p.createElement(sr,{present:n||a},p.createElement(DS,U({open:a},o,{ref:t,onClose:()=>l(!1),onPause:Ve(e.onPause),onResume:Ve(e.onResume),onSwipeStart:Se(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Se(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Se(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Se(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})))}),[oA,aA]=jS(Hu,{onClose(){}}),DS=p.forwardRef((e,t)=>
41{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:f,...w}=e,m=Wu(Hu,n),[b,v]=p.useState(null),g=Be(t,D=>v(D)),y=p.useRef(null),S=p.useRef(null),E=s||m.duration,_=p.useRef(0),C=p.useRef(E),k=p.useRef(0),{onToastAdd:P,onToastRemove:R}=m,I=Ve(()=>{var D;(b==null?void 0:b.contains(document.activeElement))&&((D=m.viewport)===null||D===void 0||D.focus()),o()}),N=p.useCallback(D=>{!D||D===1/0||(window.clearTimeout(k.current),_.current=new Date().getTime(),k.current=window.setTimeout(I,D))},[I]);p.useEffect(()=>{const D=m.viewport;if(D){const oe=()=>{N(C.current),c==null||c()},J=()=>{const z=new Date().getTime()-_.current;C.current=C.current-z,window.clearTimeout(k.current),l==null||l()};return D.addEventListener(Ef,J),D.addEventListener(_f,oe),()=>{D.removeEventListener(Ef,J),D.removeEventListener(_f,oe)}}},[m.viewport,E,l,c,N]),p.useEffect(()=>{i&&!m.isClosePausedRef.current&&N(E)},[i,E,m.isClosePausedRef,N]),p.useEffect(()=>(P(),()=>R()),[P,R]);const Q=p.useMemo(()=>b?FS(b):null,[b]);return m.viewport?p.createElement(p.Fragment,null,Q&&p.createElement(lA,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0},Q),p.createElement(oA,{scope:n,onClose:I},go.createPortal(p.createElement(Cm.ItemSlot,{scope:n},p.createElement(BP,{asChild:!0,onEscapeKeyDown:Se(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||I(),m.isFocusedToastEscapeKeyDownRef.current=!1})},p.createElement(ze.li,U({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection},w,{ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Se(e.onKeyDown,D=>{D.key==="Escape"&&(a==null||a(D.nativeEvent),D.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,I()))}),onPointerDown:Se(e.onPointerDown,D=>{D.button===0&&(y.current={x:D.clientX,y:D.clientY})}),onPointerMove:Se(e.onPointerMove,D=>{if(!y.current)return;const oe=D.clientX-y.current.x,J=D.clientY-y.current.y,z=!!S.current,A=["left","right"].includes(m.swipeDirection),O=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,L=A?O(0,oe):0,Z=A?0:O(0,J),K=D.pointerType==="touch"?10:2,te={x:L,y:Z},re={originalEvent:D,delta:te};z?(S.current=te,Wl(nA,d,re,{discrete:!1})):Zv(te,m.swipeDirection,K)?(S.current=te,Wl(tA,u,re,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(oe)>K||Math.abs(J)>K)&&(y.current=null)}),onPointerUp:Se(e.onPointerUp,D=>{const oe=S.current,J=D.target;if(J.hasPointerCapture(D.pointerId)&&J.releasePointerCapture(D.pointerId),S.current=null,y.current=null,oe){const z=D.currentTarget,A={originalEvent:D,delta:oe};Zv(oe,m.swipeDirection,m.swipeThreshold)?Wl(sA,f,A,{discrete:!0}):Wl(rA,h,A,{discrete:!0}),z.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})))),m.viewport))):null});DS.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){const t=`Invalid prop \`type\` supplied to \`${Hu}\`. Expected \`foreground | background\`.`;return new Error(t)}return null}};const lA=e=>{const{__scopeToast:t,children:n,...r}=e,s=Wu(Hu,t),[i,o]=p.useState(!1),[a,l]=p.useState(!1);return fA(()=>o(!0)),p.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:p.createElement(RS,{asChild:!0},p.createElement(km,r,i&&p.createElement(p.Fragment,null,s.label," ",n)))},cA=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.createElement(ze.div,U({},r,{ref:t}))}),uA=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.createElement(ze.div,U({},r,{ref:t}))}),dA="ToastAction",LS=p.forwardRef((e,t)=>{const{altText:n,...r}=e;return n?p.createElement(MS,{altText:n,asChild:!0},p.createElement(IS,U({},r,{ref:t}))):null});LS.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${dA}\``)}};const hA="ToastClose",IS=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=aA(hA,n);return p.createElement(MS,{asChild:!0},p.createElement(ze.button,U({type:"button"},r,{ref:t,onClick:Se(e.onClick,s.onClose)})))}),MS=p.forwardRef((e,t)=>
41{const{__scopeToast:n,altText:r,...s}=e;return p.createElement(ze.div,U({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0},s,{ref:t}))});function FS(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),pA(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...FS(r))}}),t}function Wl(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?CS(s,i):s.dispatchEvent(i)}const Zv=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),i=r>s;return t==="left"||t==="right"?i&&r>n:!i&&s>n};function fA(e=()=>{}){const t=Ve(e);Yr(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function pA(e){return e.nodeType===e.ELEMENT_NODE}function mA(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function qd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}const gA=NS,VS=ZP,US=iA,BS=cA,zS=uA,WS=LS,HS=IS;function KS(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=KS(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function qS(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=KS(e))&&(r&&(r+=" "),r+=t);return r}const ey=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ty=qS,GS=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ty(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const h=ey(u)||ey(d);return s[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(w=>{let[m,b]=w;return Array.isArray(b)?b.includes({...i,...a}[m]):{...i,...a}[m]===b})?[...c,d,h]:c},[]);return ty(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** 42 * @license lucide-react v0.462.0 - ISC 43 * 44 * This source code is licensed under the ISC license. 45 * See the LICENSE file in the root directory of this source tree. 46 */const vA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),YS=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 47 * @license lucide-react v0.462.0 - ISC 48 * 49 * This source code is licensed under the ISC license. 50 * See the LICENSE file in the root directory of this source tree. 51 */var yA={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"};/** 52 * @license lucide-react v0.462.0 - ISC 53 * 54 * This source code is licensed under the ISC license. 55 * See the LICENSE file in the root directory of this source tree. 56 */const wA=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>p.createElement("svg",{ref:l,...yA,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:YS("lucide",s),...a},[...o.map(([c,u])=>p.createElement(c,u)),...Array.isArray(i)?i:[i]]));/** 57 * @license lucide-react v0.462.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const ft=(e,t)=>{const n=p.forwardRef(({className:r,...s},i)=>p.createElement(wA,{ref:i,iconNode:t,className:YS(`lucide-${vA(e)}`,r),...s}));return n.displayName=`${e}`,n};/** 62 * @license lucide-react v0.462.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const bA=ft("Beer",[["path",{d:"M17 11h1a3 3 0 0 1 0 6h-1",key:"1yp76v"}],["path",{d:"M9 12v6",key:"1u1cab"}],["path",{d:"M13 12v6",key:"1sugkk"}],["path",{d:"M14 7.5c-1 0-1.44.5-3 .5s-2-.5-3-.5-1.72.5-2.5.5a2.5 2.5 0 0 1 0-5c.78 0 1.57.5 2.5.5S9.44 2 11 2s2 1.5 3 1.5 1.72-.5 2.5-.5a2.5 2.5 0 0 1 0 5c-.78 0-1.5-.5-2.5-.5Z",key:"1510fo"}],["path",{d:"M5 8v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"19jb7n"}]]);/** 67 * @license lucide-react v0.462.0 - ISC 68 * 69 * This source code is licensed under the ISC license. 70 * See the LICENSE file in the root directory of this source tree. 71 */const xA=ft("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** 72 * @license lucide-react v0.462.0 - ISC 73 * 74 * This source code is licensed under the ISC license. 75 * See the LICENSE file in the root directory of this source tree. 76 */const SA=ft("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
76],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** 77 * @license lucide-react v0.462.0 - ISC 78 * 79 * This source code is licensed under the ISC license. 80 * See the LICENSE file in the root directory of this source tree. 81 */const EA=ft("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** 82 * @license lucide-react v0.462.0 - ISC 83 * 84 * This source code is licensed under the ISC license. 85 * See the LICENSE file in the root directory of this source tree. 86 */const QS=ft("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 87 * @license lucide-react v0.462.0 - ISC 88 * 89 * This source code is licensed under the ISC license. 90 * See the LICENSE file in the root directory of this source tree. 91 */const _A=ft("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 92 * @license lucide-react v0.462.0 - ISC 93 * 94 * This source code is licensed under the ISC license. 95 * See the LICENSE file in the root directory of this source tree. 96 */const TA=ft("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 97 * @license lucide-react v0.462.0 - ISC 98 * 99 * This source code is licensed under the ISC license. 100 * See the LICENSE file in the root directory of this source tree. 101 */const kA=ft("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 102 * @license lucide-react v0.462.0 - ISC 103 * 104 * This source code is licensed under the ISC license. 105 * See the LICENSE file in the root directory of this source tree. 106 */const CA=ft("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/** 107 * @license lucide-react v0.462.0 - ISC 108 * 109 * This source code is licensed under the ISC license. 110 * See the LICENSE file in the root directory of this source tree. 111 */const JS=ft("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 112 * @license lucide-react v0.462.0 - ISC 113 * 114 * This source code is licensed under the ISC license. 115 * See the LICENSE file in the root directory of this source tree. 116 */const XS=ft("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** 117 * @license lucide-react v0.462.0 - ISC 118 * 119 * This source code is licensed under the ISC license. 120 * See the LICENSE file in the root directory of this source tree. 121 */const PA=ft("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** 122 * @license lucide-react v0.462.0 - ISC 123 * 124 * This source code is licensed under the ISC license. 125 * See the LICENSE file in the root directory of this source tree. 126 */const ZS=ft("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);/** 127 * @license lucide-react v0.462.0 - ISC 128 * 129 * This source code is licensed under the ISC license. 130 * See the LICENSE file in the root directory of this source tree. 131 */const ny=ft("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 132 * @license lucide-react v0.462.0 - ISC 133 * 134 * This source code is licensed under the ISC license. 135 * See the LICENSE file in the root directory of this source tree. 136 */const Pm=ft("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,914 bytes, line 136
136],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Am="-",AA=e=>{const t=OA(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Am);return a[0]===""&&a.length!==1&&a.shift(),e1(a,t)||RA(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},e1=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?e1(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Am);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},ry=/^\[(.+)\]$/,RA=e=>{if(ry.test(e)){const t=ry.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},OA=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return jA(Object.entries(e.classGroups),n).forEach(([i,o])=>{Tf(o,r,i,t)}),r},Tf=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:sy(t,s);i.classGroupId=n;return}if(typeof s=="function"){if($A(s)){Tf(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{Tf(o,sy(t,i),n,r)})})},sy=(e,t)=>{let n=e;return t.split(Am).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},$A=e=>e.isThemeGetter,jA=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[n,s]}):e,NA=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},t1="!",DA=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let c=0,u=0,d;for(let b=0;b<a.length;b++){let v=a[b];if(c===0){if(v===s&&(r||a.slice(b,b+i)===t)){l.push(a.slice(u,b)),u=b+i;continue}if(v==="/"){d=b;continue}}v==="["?c++:v==="]"&&c--}const h=l.length===0?a:a.substring(u),f=h.startsWith(t1),w=f?h.substring(1):h,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:w,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},LA=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},IA=e=>({cache:NA(e.cacheSize),parseClassName:DA(e),...AA(e)}),MA=/\s+/,FA=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(MA);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:f}=n(c);let w=!!f,m=r(w?h.substring(0,f):h);if(!m){if(!w){a=c+(a.length>0?" "+a:a);continue}if(m=r(h),!m){a=c+(a.length>0?" "+a:a);continue}w=!1}const b=LA(u).join(":"),v=d?b+t1:b,g=v+m;if(i.includes(g))continue;i.push(g);const y=s(m,w);for(let S=0;S<y.length;++S){const E=y[S];i.push(v+E)}a=c+(a.length>0?" "+a:a)}return a};function VA(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=n1(t))&&(r&&(r+=" "),r+=n);return r}const n1=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=n1(e[r]))&&(n&&(n+=" "),n+=t);return n};function UA(e,...t){let n,r,s,i=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=IA(c),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=FA(l,n);return s(l,u),u}return function(){return i(VA.apply(null,arguments))}}const ve=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},r1=/^\[(?:([a-z-]+):)?(.+)\]$/i,BA=/^\d+\/\d+$/,zA=new Set(["px","full","screen"]),WA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,HA=/\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$/,KA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,qA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mn=e=>Mi(e)||zA.has(e)||BA.test(e),hr=e=>yo(e,"length",nR),Mi=e=>!!e&&!Number.isNaN(Number(e)),Gd=e=>yo(e,"number",Mi),Vo=e=>!!e&&Number.isInteger(Number(e)),YA=e=>e.endsWith("%")&&Mi(e.slice(0,-1)),ee=e=>r1.test(e),fr=e=>WA.test(e),QA=new Set(["length","size","percentage"]),JA=e=>yo(e,QA,s1),XA=e=>yo(e,"position",s1),ZA=new Set(["image","url"]),eR=e=>yo(e,ZA,sR),tR=e=>yo(e,"",rR),Uo=()=>!0,yo=(e,t,n)=>{const r=r1.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},nR=e=>HA.test(e)&&!KA.test(e),s1=()=>!1,rR=e=>qA.test(e),sR=e=>GA.test(e),iR=()=>{const e=ve("colors"),t=ve("spacing"),n=ve("blur"),r=ve("brightness"),s=ve("borderColor"),i=ve("borderRadius"),o=ve("borderSpacing"),a=ve("borderWidth"),l=ve("contrast"),c=ve("grayscale"),u=ve("hueRotate"),d=ve("invert"),h=ve("gap"),f=ve("gradientColorStops"),w=ve("gradientColorStopPositions"),m=ve("inset"),b=ve("margin"),v=ve("opacity"),g=ve("padding"),y=ve("saturate"),S=ve("scale"),E=ve("sepia"),_=ve("skew"),C=ve("space"),k=ve("translate"),P=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",ee,t],N=()=>[ee,t],Q=()=>["",Mn,hr],D=()=>["auto",Mi,ee],oe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],J=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",ee],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>[Mi,ee];return{cacheSize:500,separator:":",theme:{colors:[Uo],spacing:[Mn,hr],blur:["none","",fr,ee],brightness:Z(),borderColor:[e],borderRadius:["n
136one","","full",fr,ee],borderSpacing:N(),borderWidth:Q(),contrast:Z(),grayscale:O(),hueRotate:Z(),invert:O(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[YA,hr],inset:I(),margin:I(),opacity:Z(),padding:N(),saturate:Z(),scale:Z(),sepia:O(),skew:Z(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",ee]}],container:["container"],columns:[{columns:[fr]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...oe(),ee]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Vo,ee]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ee]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",Vo,ee]}],"grid-cols":[{"grid-cols":[Uo]}],"col-start-end":[{col:["auto",{span:["full",Vo,ee]},ee]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[Uo]}],"row-start-end":[{row:["auto",{span:[Vo,ee]},ee]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ee]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ee,t]}],"min-w":[{"min-w":[ee,t,"min","max","fit"]}],"max-w":[{"max-w":[ee,t,"none","full","min","max","fit","prose",{screen:[fr]},fr]}],h:[{h:[ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",fr,hr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Gd]}],"font-family":[{font:[Uo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ee]}],"line-clamp":[{"line-clamp":["none",Mi,Gd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Mn,ee]}],"list-image":[{"list-image":["none",ee]}],"list-style-type":[{list:["none","disc","decimal",ee]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Mn,hr]}],"underline-offset":[{"underline-offset":["auto",Mn,ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...oe(),XA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",JA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},eR]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}
vendor: 5,180 bytes, line 136
136],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...J(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:J()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...J()]}],"outline-offset":[{"outline-offset":[Mn,ee]}],"outline-w":[{outline:[Mn,hr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Mn,hr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",fr,tR]}],"shadow-color":[{shadow:[Uo]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",fr,ee]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ee]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",ee]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Vo,ee]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ee]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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"]}
136],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",ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Mn,hr,Gd]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},oR=UA(iR);function fn(...e){return oR(qS(e))}const aR=gA,i1=p.forwardRef(({className:e,...t},n)=>x.jsx(VS,{ref:n,className:fn("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));i1.displayName=VS.displayName;const lR=GS("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),o1=p.forwardRef(({className:e,variant:t,...n},r)=>x.jsx(US,{ref:r,className:fn(lR({variant:t}),e),...n}));o1.displayName=US.displayName;const cR=p.forwardRef(({className:e,...t},n)=>x.jsx(WS,{ref:n,className:fn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));cR.displayName=WS.displayName;const a1=p.forwardRef(({className:e,...t},n)=>x.jsx(HS,{ref:n,className:fn("absolute right-2 top-2 rounded-md p-1 text-foreground
136/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:x.jsx(Pm,{className:"h-4 w-4"})}));a1.displayName=HS.displayName;const l1=p.forwardRef(({className:e,...t},n)=>x.jsx(BS,{ref:n,className:fn("text-sm font-semibold",e),...t}));l1.displayName=BS.displayName;const c1=p.forwardRef(({className:e,...t},n)=>x.jsx(zS,{ref:n,className:fn("text-sm opacity-90",e),...t}));c1.displayName=zS.displayName;function uR(){const{toasts:e}=TP();return x.jsxs(aR,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return x.jsxs(o1,{...i,children:[x.jsxs("div",{className:"grid gap-1",children:[n&&x.jsx(l1,{children:n}),r&&x.jsx(c1,{children:r})]}),s,x.jsx(a1,{})]},t)}),x.jsx(i1,{})]})}var iy=["light","dark"],dR="(prefers-color-scheme: dark)",hR=p.createContext(void 0),fR={setTheme:e=>{},themes:[]},pR=()=>{var e;return(e=p.useContext(hR))!=null?e:fR};p.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",u=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(w=>`'${w}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=s?iy.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(w,m=!1,b=!0)=>{let v=o?o[w]:w,g=m?w+"|| ''":`'${v}'`,y="";return s&&b&&!m&&iy.includes(w)&&(y+=`d.style.colorScheme = '${w}';`),n==="class"?m||v?y+=`c.add(${g})`:y+="null":v&&(y+=`d[s](n,${g})`),y},f=e?`!function(){${u}${h(e)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${dR}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}${c?"":"else{"+h(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}else{${h(i,!1,!1)};}${d}}catch(t){}}();`;return p.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:f}})});var mR=e=>{switch(e){case"success":return yR;case"info":return bR;case"warning":return wR;case"error":return xR;default:return null}},gR=Array(12).fill(0),vR=({visible:e,className:t})=>j.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},j.createElement("div",{className:"sonner-spinner"},gR.map((n,r)=>j.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),yR=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),wR=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),bR=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),xR=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),SR=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},j.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),j.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ER=()=>{let[e,t]=j.useState(document.hidden);return j.useEffect(()=>{let n=()=>{t(document.hidden)};
136return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},kf=1,_R=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:kf++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:n}),{...a,...e,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
136this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,i,o=r.then(async l=>{if(i=["resolve",l],j.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(kR(l)&&!l.ok){s=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:c,description:u})}else if(t.success!==void 0){s=!1;let c=typeof t.success=="function"?await t.success(l):t.success,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let c=typeof t.error=="function"?await t.error(l):t.error,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||kf++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},gt=new _R,TR=(e,t)=>{let n=(t==null?void 0:t.id)||kf++;return gt.addToast({title:e,...t,id:n}),n},kR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",CR=TR,PR=()=>gt.toasts,AR=()=>gt.getActiveToasts(),k8=Object.assign(CR,{success:gt.success,info:gt.info,warning:gt.warning,error:gt.error,custom:gt.custom,message:gt.message,promise:gt.promise,dismiss:gt.dismiss,loading:gt.loading},{getHistory:PR,getToasts:AR});function RR(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}RR(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
136left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
136:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
136--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 137`);function Hl(e){return e.label!==void 0}var OR=3,$R="32px",jR="16px",oy=4e3,NR=356,DR=14,LR=20,IR=200;function Jt(...e){return e.filter(Boolean).join(" ")}function MR(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var FR=e=>{var t,n,r,s,i,o,a,l,c,u,d;let{invert:h,toast:f,unstyled:w,interacting:m,setHeights:b,visibleToasts:v,heights:g,index:y,toasts:S,expanded:E,removeToast:_,defaultRichColors:C,closeButton:k,style:P,cancelButtonStyle:R,actionButtonStyle:I,className:N="",descriptionClassName:Q="",duration:D,position:oe,gap:J,loadingIcon:z,expandByDefault:A,classNames:O,icons:L,closeButtonAriaLabel:Z="Close toast",pauseWhenPageIsHidden:K}=e,[te,re]=j.useState(null),[Ee,je]=j.useState(null),[ce,Po]=j.useState(!1),[pn,Ys]=j.useState(!1),[os,Ao]=j.useState(!1),[Sl,fd]=j.useState(!1),[as,Ro]=j.useState(!1),[pd,Oo]=j.useState(0),[md,El]=j.useState(0),mn=j.useRef(f.duration||D||oy),jg=j.useRef(null),ls=j.useRef(null),IT=y===0,MT=y+1<=v,Dt=f.type,Qs=f.dismissible!==!1,FT=f.className||"",VT=f.descriptionClassName||"",_l=j.useMemo(()=>g.findIndex(X=>X.toastId===f.id)||0,[g,f.id]),UT=j.useMemo(()=>{var X;return(X=f.closeButton)!=null?X:k},[f.closeButton,k]),Ng=j.useMemo(()=>f.duration||D||oy,[f.duration,D]),gd=j.useRef(0),Js=j.useRef(0),Dg=j.useRef(0),Xs=j.useRef(null),[BT,zT]=oe.split("-"),Lg=j.useMemo(()=>g.reduce((X,fe,be)=>be>=_l?X:X+fe.height,0),[g,_l]),Ig=ER(),WT=f.invert||h,vd=Dt==="loading";Js.current=j.useMemo(()=>
137_l*J+Lg,[_l,Lg]),j.useEffect(()=>{mn.current=Ng},[Ng]),j.useEffect(()=>{Po(!0)},[]),j.useEffect(()=>{let X=ls.current;if(X){let fe=X.getBoundingClientRect().height;return El(fe),b(be=>[{toastId:f.id,height:fe,position:f.position},...be]),()=>b(be=>be.filter(qt=>qt.toastId!==f.id))}},[b,f.id]),j.useLayoutEffect(()=>{if(!ce)return;let X=ls.current,fe=X.style.height;X.style.height="auto";let be=X.getBoundingClientRect().height;X.style.height=fe,El(be),b(qt=>qt.find(Gt=>Gt.toastId===f.id)?qt.map(Gt=>Gt.toastId===f.id?{...Gt,height:be}:Gt):[{toastId:f.id,height:be,position:f.position},...qt])},[ce,f.title,f.description,b,f.id]);let lr=j.useCallback(()=>{Ys(!0),Oo(Js.current),b(X=>X.filter(fe=>fe.toastId!==f.id)),setTimeout(()=>{_(f)},IR)},[f,_,b,Js]);j.useEffect(()=>{if(f.promise&&Dt==="loading"||f.duration===1/0||f.type==="loading")return;let X;return E||m||K&&Ig?(()=>{if(Dg.current<gd.current){let fe=new Date().getTime()-gd.current;mn.current=mn.current-fe}Dg.current=new Date().getTime()})():mn.current!==1/0&&(gd.current=new Date().getTime(),X=setTimeout(()=>{var fe;(fe=f.onAutoClose)==null||fe.call(f,f),lr()},mn.current)),()=>clearTimeout(X)},[E,m,f,Dt,K,Ig,lr]),j.useEffect(()=>{f.delete&&lr()},[lr,f.delete]);function HT(){var X,fe,be;return L!=null&&L.loading?j.createElement("div",{className:Jt(O==null?void 0:O.loader,(X=f==null?void 0:f.classNames)==null?void 0:X.loader,"sonner-loader"),"data-visible":Dt==="loading"},L.loading):z?j.createElement("div",{className:Jt(O==null?void 0:O.loader,(fe=f==null?void 0:f.classNames)==null?void 0:fe.loader,"sonner-loader"),"data-visible":Dt==="loading"},z):j.createElement(vR,{className:Jt(O==null?void 0:O.loader,(be=f==null?void 0:f.classNames)==null?void 0:be.loader),visible:Dt==="loading"})}return j.createElement("li",{tabIndex:0,ref:ls,className:Jt(N,FT,O==null?void 0:O.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,O==null?void 0:O.default,O==null?void 0:O[Dt],(n=f==null?void 0:f.classNames)==null?void 0:n[Dt]),"data-sonner-toast":"","data-rich-colors":(r=f.richColors)!=null?r:C,"data-styled":!(f.jsx||f.unstyled||w),"data-mounted":ce,"data-promise":!!f.promise,"data-swiped":as,"data-removed":pn,"data-visible":MT,"data-y-position":BT,"data-x-position":zT,"data-index":y,"data-front":IT,"data-swiping":os,"data-dismissible":Qs,"data-type":Dt,"data-invert":WT,"data-swipe-out":Sl,"data-swipe-direction":Ee,"data-expanded":!!(E||A&&ce),style:{"--index":y,"--toasts-before":y,"--z-index":S.length-y,"--offset":`${pn?pd:Js.current}px`,"--initial-height":A?"auto":`${md}px`,...P,...f.style},onDragEnd:()=>{Ao(!1),re(null),Xs.current=null},onPointerDown:X=>{vd||!Qs||(jg.current=new Date,Oo(Js.current),X.target.setPointerCapture(X.pointerId),X.target.tagName!=="BUTTON"&&(Ao(!0),Xs.current={x:X.clientX,y:X.clientY}))},onPointerUp:()=>{var X,fe,be,qt;if(Sl||!Qs)return;Xs.current=null;let Gt=Number(((X=ls.current)==null?void 0:X.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),cr=Number(((fe=ls.current)==null?void 0:fe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),cs=new Date().getTime()-((be=jg.current)==null?void 0:be.getTime()),Yt=te==="x"?Gt:cr,ur=Math.abs(Yt)/cs;if(Math.abs(Yt)>=LR||ur>.11){Oo(Js.current),(qt=f.onDismiss)==null||qt.call(f,f),je(te==="x"?Gt>0?"right":"left":cr>0?"down":"up"),lr(),fd(!0),Ro(!1);return}Ao(!1),re(null)},onPointerMove:X=>{var fe,be,qt,Gt;if(!Xs.current||!Qs||((fe=window.getSelection())==null?void 0:fe.toString().length)>0)return;let cr=X.clientY-Xs.current.y,cs=X.clientX-Xs.current.x,Yt=(be=e.swipeDirections)!=null?be:MR(oe);!te&&(Math.abs(cs)>1||Math.abs(cr)>1)&&re(Math.abs(cs)>Math.abs(cr)?"x":"y");let ur={x:0,y:0};te==="y"?(Yt.includes("top")||Yt.includes("bottom"))&&(Yt.includes("top")&&cr<0||Yt.includes("bottom")&&cr>0)&&(ur.y=cr):te==="x"&&(Yt.includes("left")||Yt.includes("right"))&&(Yt.includes("left")&&cs<0||Yt.includes("right")&&cs>0)&&(ur.x=cs),(Math.abs(ur.x)>0||Math.abs(ur.y)>0)&&Ro(!0),(qt=ls.current)==null||qt.style.setProperty("--swipe-amount-x",`${ur.x}px`),(Gt=ls.current)==null||Gt.style.setProperty("--swipe-amount-y",`${ur.y}px`)}},UT&&!f.jsx?j.createElement("button",{"aria-label":Z,"data-disabled":vd,"data-close-button":!0,onClick:vd||!Qs?()=>{}:()=>{var X;lr(),(X=f.onDismiss)==null||X.call(f,f)},className:Jt(O==null?void 0:O.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(i=L==null?void 0:L.close)!=null?i:SR):null,f.jsx||p.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:j.createElement(j.Fragment,null,Dt||f.icon||f.promise?j.createElement("div",{"data-icon":"",className:Jt(O==null?void 0:O.icon,(o=f==null?void 0:f.classNames)==null?void 0:o.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||HT():null,f.type!=="loading"?f.icon||(L==null?void 0:L[Dt])||mR(Dt):null):null,j.createElement("div",{"data-content":"",className:Jt(O==null?void 0:O.content,(a=f==null?void 0:f.classNames)==null?void 0:a.content)},j.createElement("div",{"data-title":"",className:Jt(O==null?void 0:O.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},typeof f.title=="function"?f.title():f.title),f.description?j.createElement("div",{"data-description":"",className:Jt(Q,VT,O==null?void 0:O.de
137scription,(c=f==null?void 0:f.classNames)==null?void 0:c.description)},typeof f.description=="function"?f.description():f.description):null),p.isValidElement(f.cancel)?f.cancel:f.cancel&&Hl(f.cancel)?j.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||R,onClick:X=>{var fe,be;Hl(f.cancel)&&Qs&&((be=(fe=f.cancel).onClick)==null||be.call(fe,X),lr())},className:Jt(O==null?void 0:O.cancelButton,(u=f==null?void 0:f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,p.isValidElement(f.action)?f.action:f.action&&Hl(f.action)?j.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||I,onClick:X=>{var fe,be;Hl(f.action)&&((be=(fe=f.action).onClick)==null||be.call(fe,X),!X.defaultPrevented&&lr())},className:Jt(O==null?void 0:O.actionButton,(d=f==null?void 0:f.classNames)==null?void 0:d.actionButton)},f.action.label):null))};function ay(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function VR(e,t){let n={};return[e,t].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?jR:$R;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var UR=p.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:h,style:f,visibleToasts:w=OR,toastOptions:m,dir:b=ay(),gap:v=DR,loadingIcon:g,icons:y,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:E}=e,[_,C]=j.useState([]),k=j.useMemo(()=>Array.from(new Set([r].concat(_.filter(K=>K.position).map(K=>K.position)))),[_,r]),[P,R]=j.useState([]),[I,N]=j.useState(!1),[Q,D]=j.useState(!1),[oe,J]=j.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),z=j.useRef(null),A=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=j.useRef(null),L=j.useRef(!1),Z=j.useCallback(K=>{C(te=>{var re;return(re=te.find(Ee=>Ee.id===K.id))!=null&&re.delete||gt.dismiss(K.id),te.filter(({id:Ee})=>Ee!==K.id)})},[]);return j.useEffect(()=>gt.subscribe(K=>{if(K.dismiss){C(te=>te.map(re=>re.id===K.id?{...re,delete:!0}:re));return}setTimeout(()=>{_S.flushSync(()=>{C(te=>{let re=te.findIndex(Ee=>Ee.id===K.id);return re!==-1?[...te.slice(0,re),{...te[re],...K},...te.slice(re+1)]:[K,...te]})})})}),[]),j.useEffect(()=>{if(u!=="system"){J(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window>"u")return;let K=window.matchMedia("(prefers-color-scheme: dark)");try{K.addEventListener("change",({matches:te})=>{J(te?"dark":"light")})}catch{K.addListener(({matches:re})=>{try{J(re?"dark":"light")}catch(Ee){console.error(Ee)}})}},[u]),j.useEffect(()=>{_.length<=1&&N(!1)},[_]),j.useEffect(()=>{let K=te=>{var re,Ee;s.every(je=>te[je]||te.code===je)&&(N(!0),(re=z.current)==null||re.focus()),te.code==="Escape"&&(document.activeElement===z.current||(Ee=z.current)!=null&&Ee.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[s]),j.useEffect(()=>{if(z.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,L.current=!1)}},[z.current]),j.createElement("section",{ref:t,"aria-label":`${S} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((K,te)=>{var re;let[Ee,je]=K.split("-");return _.length?j.createElement("ol",{key:K,dir:b==="auto"?ay():b,tabIndex:-1,ref:z,className:a,"data-sonner-toaster":!0,"data-theme":oe,"data-y-position":Ee,"data-lifted":I&&_.length>1&&!i,"data-x-position":je,style:{"--front-toast-height":`${((re=P[0])==null?void 0:re.height)||0}px`,"--width":`${NR}px`,"--gap":`${v}px`,...f,...VR(l,c)},onBlur:ce=>{L.current&&!ce.currentTarget.contains(ce.relatedTarget)&&(L.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||L.current||(L.current=!0,O.current=ce.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{Q||N(!1)},onDragEnd:()=>N(!1),onPointerDown:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||D(!0)},onPointerUp:()=>D(!1)},_.filter(ce=>!ce.position&&te===0||ce.position===K).map((ce,Po)=>{var pn,Ys;return j.createElement(FR,{key:ce.id,icons:y,index:Po,toast:ce,defaultRichColors:d,duration:(pn=m==null?void 0:m.duration)!=null?pn:h,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:w,closeButton:(Ys=m==null?void 0:m.closeButton)!=null?Ys:o,interacting:Q,position:K,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:Z,toasts:_.filter(os=>os.position==ce.position),heights:P.filter(os=>os.position==ce.position),setHeights:R,expandByDefault:i,gap:v,loadingIcon:g,expanded:I,pauseWhenPageIsHidden:E,swipeDirections:e.swipeDirections})})):null}))});const BR=({...e})=>{const{theme:t="system"}=pR();return x.jsx(UR,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},zR=xb.useId||(()=>{});let WR=0;function HR(e){const[t,n]=p.useState(zR());return Yr(()=>{e||n(r=>r??String(WR++))},[e]),e||(t?`radix-${t}`:"")}const KR=["top","right","bottom","left"],Qr=Math.min,Tt=Math.max,ou=Math.round,Kl=Math.floor,$n=e=>({x:e,y:e}
vendor: 11,774 bytes, line 137
137),qR={left:"right",right:"left",bottom:"top",top:"bottom"},GR={start:"end",end:"start"};function Cf(e,t,n){return Tt(e,Qr(t,n))}function tr(e,t){return typeof e=="function"?e(t):e}function nr(e){return e.split("-")[0]}function wo(e){return e.split("-")[1]}function Rm(e){return e==="x"?"y":"x"}function Om(e){return e==="y"?"height":"width"}const YR=new Set(["top","bottom"]);function Pn(e){return YR.has(nr(e))?"y":"x"}function $m(e){return Rm(Pn(e))}function QR(e,t,n){n===void 0&&(n=!1);const r=wo(e),s=$m(e),i=Om(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=au(o)),[o,au(o)]}function JR(e){const t=au(e);return[Pf(e),t,Pf(t)]}function Pf(e){return e.replace(/start|end/g,t=>GR[t])}const ly=["left","right"],cy=["right","left"],XR=["top","bottom"],ZR=["bottom","top"];function eO(e,t,n){switch(e){case"top":case"bottom":return n?t?cy:ly:t?ly:cy;case"left":case"right":return t?XR:ZR;default:return[]}}function tO(e,t,n,r){const s=wo(e);let i=eO(nr(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Pf)))),i}function au(e){return e.replace(/left|right|bottom|top/g,t=>qR[t])}function nO(e){return{top:0,right:0,bottom:0,left:0,...e}}function u1(e){return typeof e!="number"?nO(e):{top:e,right:e,bottom:e,left:e}}function lu(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function uy(e,t,n){let{reference:r,floating:s}=e;const i=Pn(t),o=$m(t),a=Om(o),l=nr(t),c=i==="y",u=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,h=r[a]/2-s[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-s.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-s.width,y:d};break;default:f={x:r.x,y:r.y}}switch(wo(t)){case"start":f[o]-=h*(n&&c?-1:1);break;case"end":f[o]+=h*(n&&c?-1:1);break}return f}const rO=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=uy(c,r,l),h=r,f={},w=0;for(let m=0;m<a.length;m++){const{name:b,fn:v}=a[m],{x:g,y,data:S,reset:E}=await v({x:u,y:d,initialPlacement:r,placement:h,strategy:s,middlewareData:f,rects:c,platform:o,elements:{reference:e,floating:t}});u=g??u,d=y??d,f={...f,[b]:{...f[b],...S}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(c=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):E.rects),{x:u,y:d}=uy(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:s,middlewareData:f}};async function Ma(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=tr(t,e),w=u1(f),b=a[h?d==="floating"?"reference":"floating":d],v=lu(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),g=d==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},E=lu(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:y,strategy:l}):g);return{top:(v.top-E.top+w.top)/S.y,bottom:(E.bottom-v.bottom+w.bottom)/S.y,left:(v.left-E.left+w.left)/S.x,right:(E.right-v.right+w.right)/S.x}}const sO=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=tr(e,t)||{};if(c==null)return{};const d=u1(u),h={x:n,y:r},f=$m(s),w=Om(f),m=await o.getDimensions(c),b=f==="y",v=b?"top":"left",g=b?"bottom":"right",y=b?"clientHeight":"clientWidth",S=i.reference[w]+i.reference[f]-h[f]-i.floating[w],E=h[f]-i.reference[f],_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let C=_?_[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(_)))&&(C=a.floating[y]||i.floating[w]);const k=S/2-E/2,P=C/2-m[w]/2-1,R=Qr(d[v],P),I=Qr(d[g],P),N=R,Q=C-m[w]-I,D=C/2-m[w]/2+k,oe=Cf(N,D,Q),J=!l.arrow&&wo(s)!=null&&D!==oe&&i.reference[w]/2-(D<N?R:I)-m[w]/2<0,z=J?D<N?D-N:D-Q:0;return{[f]:h[f]+z,data:{[f]:oe,centerOffset:D-oe-z,...J&&{alignmentOffset:z}},reset:J}}}),iO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...b}=tr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=nr(s),g=Pn(a),y=nr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=h||(y||!m?[au(a)]:JR(a)),_=w!=="none";!h&&_&&E.push(...tO(a,m,w,S));const C=[a,...E],k=await Ma(t,b),P=[];let R=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&P.push(k[v]),d){const D=QR(s,o,S);P.push(k[D[0]],k[D[1]])}if(R=[...R,{placement:s,overflows:P}],!P.every(D=>D<=0)){var I,N;const D=(((I=i.flip)==null?void 0:I.index)||0)+1,oe=C[D];if(oe&&(!(d==="alignment"?g!==Pn(oe):!1)||R.every(A=>A.overflows[0]>0&&Pn(A.placement)===g)))return{data:{index:D,overflows:R},reset:{placement:oe}};let J=(N=R.filter(z=>z.overflows[0]<=0).sort((z,A)=>z.overflows[1]-A.overflows[1])[0])==null?void 0:N.placement;if(!J)switch(f){case"bestFit":{var Q;const z=(Q=R.filter(A=>{if(_){const O=Pn(A.placement);return O===g||O==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(O=>O>0).reduce((O,L)=>O+L,0)]).sort((A,O)=>A[1]-O[1])[0])==null?void 0:Q[0];z&&(J=z);break}case"initialPlacement":J=a;break}if(s!==J)return{reset:{placement:J}}}return{}}}};function dy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function hy(e){return KR.some(t=>e[t]>=0)}const oO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=tr(e,t);switch(r){case"referenceHidden":{const i=await Ma(t,{...s,elementContext:"reference"}),o=dy(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:hy(o)}}}case"escaped":{const i=await Ma(t,{...s,altBoundary:!0}),o=dy(i,n.floating);return{data:{escapedOffsets:o,escaped:hy(o)}}}default:return{}}}}},d1=new Set(["left","top"]);async function aO(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=nr(n),a=wo(n),l=Pn(n)==="y",c=d1.has(o)?-1:1,u=i&&l?-1:1,d=tr(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:w}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof w=="number"&&(f=a==="end"?w*-1:w),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const lO=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await aO(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},cO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:v,y:g}=b;return{x:v,y:g}}},...l}=tr(e,t),c={x:n,y:r},u=await Ma(t,l),d=Pn(nr(s)),h=Rm(d);let f=c[h],w=c[d];if(i){const b=h==="y"?"top":"left",v=h==="y"?"bottom":"right",g=f+u[b],y=f-u[v];f=Cf(g,f,y)}if(o){const b=d==="y"?"top":"left",v=d==="y"?"bottom":"right",g=w+u[b],y=w-u[v];w=Cf(g,w,y)}const m=a.fn({...t,[h]:f,[d]:w});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[d]:o}}}}}},uO=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=tr(e,t),u={x:n,y:r},d=Pn(s),h=Rm(d);let f=u[h],w=u[d];const m=tr(a,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const y=h==="y"?"height":"width",S=i.reference[h]-i.floating[y]+b.mainAxis,E=i.reference[h]+i.reference[y]-b.mainAxis;f<S?f=S:f>E&&(f=E)}if(c){var v,g;const y=h==="y"?"width":"height",S=d1.has(nr(s)),E=i.reference[d]-i.floating[y]+(S&&((v=o.offset)==null?void 0:v[d])||0)+(S?0:b.crossAxis),_=i.reference[d]+i.reference[y]+(S?0:((g=o.offset)==null?void 0:g[d])||0)-(S?b.crossAxis:0);w<E?w=E:w>_&&(w=_)}return{[h]:f,[d]:w}}}},dO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...c}=tr(e,t),u=await Ma(t,c),d=nr(s),h=wo(s),f=Pn(s)==="y",{width:w,height:m}=i.floating;let b,v;d==="top"||d==="bottom"?(b=d,v=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,b=h==="end"?"top":"bottom");const g=m-u.top-u.bottom,y=w-u.left-u.right,S=Qr(m-u[b],g),E=Qr(w-u[v],y),_=!t.middlewareData.shift;let C=S,k=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=g),_&&!h){const R=Tt(u.left,0),I=Tt(u.right,0),N=Tt(u.top,0),Q=Tt(u.bottom,0);f?k=w-2*(R!==0||I!==0?R+I:Tt(u.left,u.right)):C=m-2*(N!==0||Q!==0?N+Q:Tt(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:C});const P=await o.getDimensions(a.floating);return w!==P.width||m!==P.height?{reset:{rects:!0}}:{}}}};function Ku(){return typeof window<"u"}function bo(e){return h1(e)?(e.nodeName||"").toLowerCase():"#document"}function Rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function In(e){var t;return(t=(h1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function h1(e){return Ku()?e instanceof Node||e instanceof Rt(e).Node:!1}function un(e){return Ku()?e instanceof Element||e instanceof Rt(e).Element:!1}function Dn(e){return Ku()?e instanceof HTMLElement||e instanceof Rt(e).HTMLElement:!1}function fy(e){return!Ku()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rt(e).ShadowRoot}const hO=new Set(["inline","contents"]);function pl(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!hO.has(s)}const fO=new Set(["table","td","th"]);function pO(e){return fO.has(bo(e))}const mO=[":popover-open",":modal"];function qu(e){return mO.some(t=>{try{return e.matches(t)}catch{return!1}})}const gO=["transform","translate","scale","rotate","perspective"],vO=["transform","translate","scale","rotate","perspective","filter"],yO=["paint","layout","strict","content"];function jm(e){const t=Nm(),n=un(e)?dn(e):e;return gO.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||vO.some(r=>(n.willChange||"").includes(r))||yO.some(r=>(n.contain||"").includes(r))}function wO(e){let t=Jr(e);for(;Dn(t)&&!lo(t);){if(jm(t))return t;if(qu(t))return null;t=Jr(t)}return null}function Nm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const bO=new Set(["html","body","#document"]);function lo(e){return bO.has(bo(e))}function dn(e){return Rt(e).getComputedStyle(e)}function Gu(e){return un(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jr(e){if(bo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fy(e)&&e.host||In(e);return fy(t)?t.host:t}function f1(e){const t=Jr(e);return lo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Dn(t)&&pl(t)?t:f1(t)}
vendor: 4,925 bytes, line 137
137function Fa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=f1(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=Rt(s);if(i){const a=Af(o);return t.concat(o,o.visualViewport||[],pl(s)?s:[],a&&n?Fa(a):[])}return t.concat(s,Fa(s,[],n))}function Af(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function p1(e){const t=dn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Dn(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=ou(n)!==i||ou(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function Dm(e){return un(e)?e:e.contextElement}function Fi(e){const t=Dm(e);if(!Dn(t))return $n(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=p1(t);let o=(i?ou(n.width):n.width)/r,a=(i?ou(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const xO=$n(0);function m1(e){const t=Rt(e);return!Nm()||!t.visualViewport?xO:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function SO(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rt(e)?!1:t}function Bs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=Dm(e);let o=$n(1);t&&(r?un(r)&&(o=Fi(r)):o=Fi(e));const a=SO(i,n,r)?m1(i):$n(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(i){const h=Rt(i),f=r&&un(r)?Rt(r):r;let w=h,m=Af(w);for(;m&&r&&f!==w;){const b=Fi(m),v=m.getBoundingClientRect(),g=dn(m),y=v.left+(m.clientLeft+parseFloat(g.paddingLeft))*b.x,S=v.top+(m.clientTop+parseFloat(g.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=y,c+=S,w=Rt(m),m=Af(w)}}return lu({width:u,height:d,x:l,y:c})}function Lm(e,t){const n=Gu(e).scrollLeft;return t?t.left+n:Bs(In(e)).left+n}function g1(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:Lm(e,r)),i=r.top+t.scrollTop;return{x:s,y:i}}function EO(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=In(r),a=t?qu(t.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=$n(1);const u=$n(0),d=Dn(r);if((d||!d&&!i)&&((bo(r)!=="body"||pl(o))&&(l=Gu(r)),Dn(r))){const f=Bs(r);c=Fi(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const h=o&&!d&&!i?g1(o,l,!0):$n(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function _O(e){return Array.from(e.getClientRects())}function TO(e){const t=In(e),n=Gu(e),r=e.ownerDocument.body,s=Tt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Tt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Lm(e);const a=-n.scrollTop;return dn(r).direction==="rtl"&&(o+=Tt(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function kO(e,t){const n=Rt(e),r=In(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=Nm();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const CO=new Set(["absolute","fixed"]);function PO(e,t){const n=Bs(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=Dn(e)?Fi(e):$n(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,c=r*i.y;return{width:o,height:a,x:l,y:c}}function py(e,t,n){let r;if(t==="viewport")r=kO(e,n);else if(t==="document")r=TO(In(e));else if(un(t))r=PO(t,n);else{const s=m1(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return lu(r)}function v1(e,t){const n=Jr(e);return n===t||!un(n)||lo(n)?!1:dn(n).position==="fixed"||v1(n,t)}function AO(e,t){const n=t.get(e);if(n)return n;let r=Fa(e,[],!1).filter(a=>un(a)&&bo(a)!=="body"),s=null;const i=dn(e).position==="fixed";let o=i?Jr(e):e;for(;un(o)&&!lo(o);){const a=dn(o),l=jm(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&CO.has(s.position)||pl(o)&&!l&&v1(e,o))?r=r.filter(u=>u!==o):s=a,o=Jr(o)}return t.set(e,r),r}function RO(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?qu(t)?[]:AO(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const d=py(t,u,s);return c.top=Tt(d.top,c.top),c.right=Qr(d.right,c.right),c.bottom=Qr(d.bottom,c.bottom),c.left=Tt(d.left,c.left),c},py(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function OO(e){const{width:t,height:n}=p1(e);return{width:t,height:n}}function $O(e,t,n){const r=Dn(t),s=In(t),i=n==="fixed",o=Bs(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=$n(0);function c(){l.x=Lm(s)}if(r||!r&&!i)if((bo(t)!=="body"||pl(s))&&(a=Gu(t)),r){const f=Bs(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else s&&c();i&&!r&&s&&c();const u=s&&!r&&!i?g1(s,a):$n(0),d=o.left+a.scrollLeft-l.x-u.x,h=o.top+a.scrollTop-l.y-u.y;return{x:d,y:h,width:o.width,height:o.height}}function Yd(e){return dn(e).position==="static"}function my(e,t){if(!Dn(e)||dn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return In(e)===n&&(n=n.ownerDocument.body),n}function y1(e,t){const n=Rt(e);
vendor: 4,384 bytes, line 137
137if(qu(e))return n;if(!Dn(e)){let s=Jr(e);for(;s&&!lo(s);){if(un(s)&&!Yd(s))return s;s=Jr(s)}return n}let r=my(e,t);for(;r&&pO(r)&&Yd(r);)r=my(r,t);return r&&lo(r)&&Yd(r)&&!jm(r)?n:r||wO(e)||n}const jO=async function(e){const t=this.getOffsetParent||y1,n=this.getDimensions,r=await n(e.floating);return{reference:$O(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NO(e){return dn(e).direction==="rtl"}const DO={convertOffsetParentRelativeRectToViewportRelativeRect:EO,getDocumentElement:In,getClippingRect:RO,getOffsetParent:y1,getElementRects:jO,getClientRects:_O,getDimensions:OO,getScale:Fi,isElement:un,isRTL:NO};function w1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function LO(e,t){let n=null,r;const s=In(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:f}=c;if(a||t(),!h||!f)return;const w=Kl(d),m=Kl(s.clientWidth-(u+h)),b=Kl(s.clientHeight-(d+f)),v=Kl(u),y={rootMargin:-w+"px "+-m+"px "+-b+"px "+-v+"px",threshold:Tt(0,Qr(1,l))||1};let S=!0;function E(_){const C=_[0].intersectionRatio;if(C!==l){if(!S)return o();C?o(!1,C):r=setTimeout(()=>{o(!1,1e-7)},1e3)}C===1&&!w1(c,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(E,{...y,root:s.ownerDocument})}catch{n=new IntersectionObserver(E,y)}n.observe(e)}return o(!0),i}function IO(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Dm(e),u=s||i?[...c?Fa(c):[],...Fa(t)]:[];u.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?LO(c,n):null;let h=-1,f=null;o&&(f=new ResizeObserver(v=>{let[g]=v;g&&g.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let w,m=l?Bs(e):null;l&&b();function b(){const v=Bs(e);m&&!w1(m,v)&&n(),m=v,w=requestAnimationFrame(b)}return n(),()=>{var v;u.forEach(g=>{s&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),d==null||d(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(w)}}const MO=lO,FO=cO,VO=iO,UO=dO,BO=oO,gy=sO,zO=uO,WO=(e,t,n)=>{const r=new Map,s={platform:DO,...n},i={...s.platform,_c:r};return rO(e,t,{...s,platform:i})};var HO=typeof document<"u",KO=function(){},Tc=HO?p.useLayoutEffect:KO;function cu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!cu(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!cu(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function b1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vy(e,t){const n=b1(e);return Math.round(t*n)/n}function Qd(e){const t=p.useRef(e);return Tc(()=>{t.current=e}),t}function qO(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=p.useState(r);cu(h,r)||f(r);const[w,m]=p.useState(null),[b,v]=p.useState(null),g=p.useCallback(A=>{A!==_.current&&(_.current=A,m(A))},[]),y=p.useCallback(A=>{A!==C.current&&(C.current=A,v(A))},[]),S=i||w,E=o||b,_=p.useRef(null),C=p.useRef(null),k=p.useRef(u),P=l!=null,R=Qd(l),I=Qd(s),N=Qd(c),Q=p.useCallback(()=>{if(!_.current||!C.current)return;const A={placement:t,strategy:n,middleware:h};I.current&&(A.platform=I.current),WO(_.current,C.current,A).then(O=>{const L={...O,isPositioned:N.current!==!1};D.current&&!cu(k.current,L)&&(k.current=L,go.flushSync(()=>{d(L)}))})},[h,t,n,I,N]);Tc(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[c]);const D=p.useRef(!1);Tc(()=>(D.current=!0,()=>{D.current=!1}),[]),Tc(()=>
137{if(S&&(_.current=S),E&&(C.current=E),S&&E){if(R.current)return R.current(S,E,Q);Q()}},[S,E,Q,R,P]);const oe=p.useMemo(()=>({reference:_,floating:C,setReference:g,setFloating:y}),[g,y]),J=p.useMemo(()=>({reference:S,floating:E}),[S,E]),z=p.useMemo(()=>{const A={position:n,left:0,top:0};if(!J.floating)return A;const O=vy(J.floating,u.x),L=vy(J.floating,u.y);return a?{...A,transform:"translate("+O+"px, "+L+"px)",...b1(J.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:L}},[n,a,J.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:Q,refs:oe,elements:J,floatingStyles:z}),[u,Q,oe,J,z])}const GO=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?gy({element:r.current,padding:s}).fn(n):{}:r?gy({element:r,padding:s}).fn(n):{}}}},YO=(e,t)=>({...MO(e),options:[e,t]}),QO=(e,t)=>({...FO(e),options:[e,t]}),JO=(e,t)=>({...zO(e),options:[e,t]}),XO=(e,t)=>({...VO(e),options:[e,t]}),ZO=(e,t)=>({...UO(e),options:[e,t]}),e$=(e,t)=>({...BO(e),options:[e,t]}),t$=(e,t)=>({...GO(e),options:[e,t]});function n$(e){const[t,n]=p.useState(void 0);return Yr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const x1="Popper",[S1,Yu]=vo(x1),[r$,E1]=S1(x1),s$=e=>{const{__scopePopper:t,children:n}=e,[r,s]=p.useState(null);return p.createElement(r$,{scope:t,anchor:r,onAnchorChange:s},n)},i$="PopperAnchor",o$=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=E1(i$,n),o=p.useRef(null),a=Be(t,o);return p.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:p.createElement(ze.div,U({},s,{ref:a}))}),_1="PopperContent",[a$,C8]=S1(_1),l$=p.forwardRef((e,t)=>{var n,r,s,i,o,a,l,c;const{__scopePopper:u,side:d="bottom",sideOffset:h=0,align:f="center",alignOffset:w=0,arrowPadding:m=0,avoidCollisions:b=!0,collisionBoundary:v=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:S=!1,updatePositionStrategy:E="optimized",onPlaced:_,...C}=e,k=E1(_1,u),[P,R]=p.useState(null),I=Be(t,as=>R(as)),[N,Q]=p.useState(null),D=n$(N),oe=(n=D==null?void 0:D.width)!==null&&n!==void 0?n:0,J=(r=D==null?void 0:D.height)!==null&&r!==void 0?r:0,z=d+(f!=="center"?"-"+f:""),A=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},O=Array.isArray(v)?v:[v],L=O.length>0,Z={padding:A,boundary:O.filter(c$),altBoundary:L},{refs:K,floatingStyles:te,placement:re,isPositioned:Ee,middlewareData:je}=qO({strategy:"fixed",placement:z,whileElementsMounted:(...as)=>IO(...as,{animationFrame:E==="always"}),elements:{reference:k.anchor},middleware:[YO({mainAxis:h+J,alignmentAxis:w}),b&&QO({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?JO():void 0,...Z}),b&&XO({...Z}),ZO({...Z,apply:({elements:as,rects:Ro,availableWidth:pd,availableHeight:Oo})=>{const{width:md,height:El}=Ro.reference,mn=as.floating.style;mn.setProperty("--radix-popper-available-width",`${pd}px`),mn.setProperty("--radix-popper-available-height",`${Oo}px`),mn.setProperty("--radix-popper-anchor-width",`${md}px`),mn.setProperty("--radix-popper-anchor-height",`${El}px`)}}),N&&t$({element:N,padding:m}),u$({arrowWidth:oe,arrowHeight:J}),S&&e$({strategy:"referenceHidden",...Z})]}),[ce,Po]=T1(re),pn=Ve(_);Yr(()=>{Ee&&(pn==null||pn())},[Ee,pn]);const Ys=(s=je.arrow)===null||s===void 0?void 0:s.x,os=(i=je.arrow)===null||i===void 0?void 0:i.y,Ao=((o=je.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[Sl,fd]=p.useState();return Yr(()=>{P&&fd(window.getComputedStyle(P).zIndex)},[P]),p.createElement("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:Ee?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Sl,"--radix-popper-transform-origin":[(a=je.transformOrigin)===null||a===void 0?void 0:a.x,(l=je.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},p.createElement(a$,{scope:u,placedSide:ce,onArrowChange:Q,arrowX:Ys,arrowY:os,shouldHideArrow:Ao},p.createElement(ze.div,U({"data-side":ce,"data-align":Po},C,{ref:I,style:{...C.style,animation:Ee?void 0:"none",opacity:(c=je.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function c$(e){return e!==null}const u$=e=>({name:"transformOrigin",options:e,fn(t){var n,r,s,i,o;const{placement:a,rects:l,middlewareData:c}=t,d=((n=c.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,h=d?0:e.arrowWidth,f=d?0:e.arrowHeight,[w,m]=T1(a),b={start:"0%",center:"50%",end:"100%"}[m],v=((r=(s=c.arrow)===null||s===void 0?void 0:s.x)!==null&&r!==void 0?r:0)+h/2,g=((i=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+f/2;let y="",S="";return w==="bottom"?(y=d?b:`${v}px`,S=`${-f}px`):w==="top"?(y=d?b:`${v}px`,S=`${l.floating.height+f}px`):w==="right"?(y=`${-f}px`,S=d?b:`${g}px`):w==="left"&&(y=`${l.floating.width+f}px`,S=d?b:`${g}px`),{data:{x:y,y:S}}}});function T1(e){const[t,n="center"]=e.split("-");return[t,n]}const d$=s$,h$=o$,k1=l$,f$=p.forwardRef((e,t)=>
137{const{children:n,...r}=e,s=p.Children.toArray(n),i=s.find(p$);if(i){const o=i.props.children,a=s.map(l=>l===i?p.Children.count(o)>1?p.Children.only(null):p.isValidElement(o)?o.props.children:null:l);return p.createElement(Rf,U({},r,{ref:t}),p.isValidElement(o)?p.cloneElement(o,void 0,a):null)}return p.createElement(Rf,U({},r,{ref:t}),n)});f$.displayName="Slot";const Rf=p.forwardRef((e,t)=>{const{children:n,...r}=e;return p.isValidElement(n)?p.cloneElement(n,{...m$(r,n.props),ref:t?fl(t,n.ref):n.ref}):p.Children.count(n)>1?p.Children.only(null):null});Rf.displayName="SlotClone";const C1=({children:e})=>p.createElement(p.Fragment,null,e);function p$(e){return p.isValidElement(e)&&e.type===C1}function m$(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{i(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}const[Qu,P8]=vo("Tooltip",[Yu]),g$=Yu(),v$="TooltipProvider",y$=700,yy="tooltip.open",[w$,b$]=Qu(v$),x$=e=>{const{__scopeTooltip:t,delayDuration:n=y$,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,[o,a]=p.useState(!0),l=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),p.createElement(w$,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:p.useCallback(()=>{window.clearTimeout(c.current),a(!1)},[]),onClose:p.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:p.useCallback(u=>{l.current=u},[]),disableHoverableContent:s},i)},P1="Tooltip",[A8,Im]=Qu(P1),S$="TooltipPortal",[R8,E$]=Qu(S$,{forceMount:void 0}),Va="TooltipContent",_$=p.forwardRef((e,t)=>{const n=E$(Va,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=Im(Va,e.__scopeTooltip);return p.createElement(sr,{present:r||o.open},o.disableHoverableContent?p.createElement(A1,U({side:s},i,{ref:t})):p.createElement(T$,U({side:s},i,{ref:t})))}),T$=p.forwardRef((e,t)=>{const n=Im(Va,e.__scopeTooltip),r=b$(Va,e.__scopeTooltip),s=p.useRef(null),i=Be(t,s),[o,a]=p.useState(null),{trigger:l,onClose:c}=n,u=s.current,{onPointerInTransitChange:d}=r,h=p.useCallback(()=>{a(null),d(!1)},[d]),f=p.useCallback((w,m)=>{const b=w.currentTarget,v={x:w.clientX,y:w.clientY},g=C$(v,b.getBoundingClientRect()),y=P$(v,g),S=A$(m.getBoundingClientRect()),E=O$([...y,...S]);a(E),d(!0)},[d]);return p.useEffect(()=>()=>h(),[h]),p.useEffect(()=>{if(l&&u){const w=b=>f(b,u),m=b=>f(b,l);return l.addEventListener("pointerleave",w),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",w),u.removeEventListener("pointerleave",m)}}},[l,u,f,h]),p.useEffect(()=>{if(o){const w=m=>{const b=m.target,v={x:m.clientX,y:m.clientY},g=(l==null?void 0:l.contains(b))||(u==null?void 0:u.contains(b)),y=!R$(v,o);g?h():y&&(h(),c())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,u,o,c,h]),p.createElement(A1,U({},e,{ref:i}))}),[k$,O8]=Qu(P1,{isInside:!1}),A1=p.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=Im(Va,n),c=g$(n),{onClose:u}=l;return p.useEffect(()=>(document.addEventListener(yy,u),()=>document.removeEventListener(yy,u)),[u]),p.useEffect(()=>{if(l.trigger){const d=h=>{const f=h.target;f!=null&&f.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),p.createElement(Tm,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:u},p.createElement(k1,U({"data-state":l.stateAttribute},c,a,{ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),p.createElement(C1,null,r),p.createElement(k$,{scope:n,isInside:!0},p.createElement(qP,{id:l.contentId,role:"tooltip"},s||r))))});function C$(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function P$(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function A$(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function R$(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;
137o=i++){const a=t[i].x,l=t[i].y,c=t[o].x,u=t[o].y;l>r!=u>r&&n<(c-a)*(r-l)/(u-l)+a&&(s=!s)}return s}function O$(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),$$(t)}function $$(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const j$=x$,R1=_$,N$=j$,D$=p.forwardRef(({className:e,sideOffset:t=4,...n},r)=>x.jsx(R1,{ref:r,sideOffset:t,className:fn("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));D$.displayName=R1.displayName;var ml=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},zs=typeof window>"u"||"Deno"in globalThis;function vt(){}function L$(e,t){return typeof e=="function"?e(t):e}function Of(e){return typeof e=="number"&&e>=0&&e!==1/0}function O1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Hr(e,t){return typeof e=="function"?e(t):e}function Ft(e,t){return typeof e=="function"?e(t):e}function wy(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Mm(o,t.options))return!1}else if(!Ba(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function by(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Ua(t.options.mutationKey)!==Ua(i))return!1}else if(!Ba(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Mm(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ua)(e)}function Ua(e){return JSON.stringify(e,(t,n)=>jf(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Ba(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ba(e[n],t[n])):!1}function $1(e,t){if(e===t)return e;const n=xy(e)&&xy(t);if(n||jf(e)&&jf(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<o;u++){const d=n?u:i[u];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,c++):(a[d]=$1(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&c++)}return s===o&&c===s?e:a}return t}function $f(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function xy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jf(e){if(!Sy(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Sy(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Sy(e){return Object.prototype.toString.call(e)==="[object Object]"}function I$(e){return new Promise(t=>{setTimeout(t,e)})}function Nf(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?$1(e,t):t}function M$(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function F$(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Fm=Symbol();function j1(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Fm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function V$(e,t){return typeof e=="function"?e(...t):!!e}var Ts,kr,zi,tb,U$=(tb=class extends ml{constructor(){super();Y(this,Ts);Y(this,kr);Y(this,zi);F(this,zi,t=>{if(!zs&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,kr)||this.setEventListener(T(this,zi))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,kr))==null||t.call(this),F(this,kr,void 0))}setEventListener(t){var n;F(this,zi,t),(n=T(this,kr))==null||n.call(this),F(this,kr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){T(this,Ts)!==t&&(F(this,Ts,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 2,136 bytes, line 137
137this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,Ts)=="boolean"?T(this,Ts):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ts=new WeakMap,kr=new WeakMap,zi=new WeakMap,tb),Vm=new U$,Wi,Cr,Hi,nb,B$=(nb=class extends ml{constructor(){super();Y(this,Wi,!0);Y(this,Cr);Y(this,Hi);F(this,Hi,t=>{if(!zs&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,Cr)||this.setEventListener(T(this,Hi))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Cr))==null||t.call(this),F(this,Cr,void 0))}setEventListener(t){var n;F(this,Hi,t),(n=T(this,Cr))==null||n.call(this),F(this,Cr,t(this.setOnline.bind(this)))}setOnline(t){T(this,Wi)!==t&&(F(this,Wi,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return T(this,Wi)}},Wi=new WeakMap,Cr=new WeakMap,Hi=new WeakMap,nb),uu=new B$;function Df(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function z$(e){return Math.min(1e3*2**e,3e4)}function N1(e){return(e??"online")==="online"?uu.isOnline():!0}var D1=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Jd(e){return e instanceof D1}function L1(e){let t=!1,n=0,r=!1,s;const i=Df(),o=m=>{var b;r||(h(new D1(m)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>Vm.isFocused()&&(e.networkMode==="always"||uu.isOnline())&&e.canRun(),u=()=>N1(e.networkMode)&&e.canRun(),d=m=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,m),s==null||s(),i.resolve(m))},h=m=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,m),s==null||s(),i.reject(m))},f=()=>new Promise(m=>{var b;s=v=>{(r||c())&&m(v)},(b=e.onPause)==null||b.call(e)}).then(()=>{var m;s=void 0,r||(m=e.onContinue)==null||m.call(e)}),w=()=>
137{if(r)return;let m;const b=n===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(d).catch(v=>{var _;if(r)return;const g=e.retry??(zs?0:3),y=e.retryDelay??z$,S=typeof y=="function"?y(n,v):y,E=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,v);if(t||!E){h(v);return}n++,(_=e.onFail)==null||_.call(e,n,v),I$(S).then(()=>c()?void 0:f()).then(()=>{t?h(v):w()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?w():f().then(w),i)}}var W$=e=>setTimeout(e,0);function H$(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=W$;const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Qe=H$(),ks,rb,I1=(rb=class{constructor(){Y(this,ks)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Of(this.gcTime)&&F(this,ks,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zs?1/0:5*60*1e3))}clearGcTimeout(){T(this,ks)&&(clearTimeout(T(this,ks)),F(this,ks,void 0))}},ks=new WeakMap,rb),Ki,Cs,Mt,Ps,tt,sl,As,nn,Vn,sb,K$=(sb=class extends I1{constructor(t){super();Y(this,nn);Y(this,Ki);Y(this,Cs);Y(this,Mt);Y(this,Ps);Y(this,tt);Y(this,sl);Y(this,As);F(this,As,!1),F(this,sl,t.defaultOptions),this.setOptions(t.options),this.observers=[],F(this,Ps,t.client),F(this,Mt,T(this,Ps).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,F(this,Ki,q$(this.options)),this.state=t.state??T(this,Ki),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,tt))==null?void 0:t.promise}setOptions(t){this.options={...T(this,sl),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Mt).remove(this)}setData(t,n){const r=Nf(this.state.data,t,this.options);return se(this,nn,Vn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){se(this,nn,Vn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=T(this,tt))==null?void 0:r.promise;return(s=T(this,tt))==null||s.cancel(t),n?n.then(vt).catch(vt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Ki))}isActive(){return this.observers.some(t=>Ft(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Fm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Hr(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:!O1(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,Mt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(T(this,tt)&&(T(this,As)?T(this,tt).cancel({revert:!0}):T(this,tt).cancelRetry()),this.scheduleGc()),T(this,Mt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||se(this,nn,Vn).call(this,{type:"invalidate"})}
vendor: 8,387 bytes, line 137
137fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(T(this,tt))return T(this,tt).continueRetry(),T(this,tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(f=>f.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(F(this,As,!0),r.signal)})},i=()=>{const h=j1(this.options,n),w=(()=>{const m={client:T(this,Ps),queryKey:this.queryKey,meta:this.meta};return s(m),m})();return F(this,As,!1),this.options.persister?this.options.persister(h,w,this):h(w)},a=(()=>{const h={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:T(this,Ps),state:this.state,fetchFn:i};return s(h),h})();(c=this.options.behavior)==null||c.onFetch(a,this),F(this,Cs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&se(this,nn,Vn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=h=>{var f,w,m,b;Jd(h)&&h.silent||se(this,nn,Vn).call(this,{type:"error",error:h}),Jd(h)||((w=(f=T(this,Mt).config).onError)==null||w.call(f,h,this),(b=(m=T(this,Mt).config).onSettled)==null||b.call(m,this.state.data,h,this)),this.scheduleGc()};return F(this,tt,L1({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var f,w,m,b;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(v){l(v);return}(w=(f=T(this,Mt).config).onSuccess)==null||w.call(f,h,this),(b=(m=T(this,Mt).config).onSettled)==null||b.call(m,h,this.state.error,this),this.scheduleGc()},onError:l,onFail:(h,f)=>{se(this,nn,Vn).call(this,{type:"failed",failureCount:h,error:f})},onPause:()=>{se(this,nn,Vn).call(this,{type:"pause"})},onContinue:()=>{se(this,nn,Vn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),T(this,tt).start()}},Ki=new WeakMap,Cs=new WeakMap,Mt=new WeakMap,Ps=new WeakMap,tt=new WeakMap,sl=new WeakMap,As=new WeakMap,nn=new WeakSet,Vn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...M1(r.data,this.options),fetchMeta:t.meta??null};case"success":return F(this,Cs,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Jd(s)&&s.revert&&T(this,Cs)?{...T(this,Cs),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Qe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,Mt).notify({query:this,type:"updated",action:t})})},sb);function M1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:N1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function q$(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var bn,ib,G$=(ib=class extends ml{constructor(t={}){super();Y(this,bn);this.config=t,F(this,bn,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??Mm(s,n);let o=this.get(i);return o||(o=new K$({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){T(this,bn).has(t.queryHash)||(T(this,bn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=T(this,bn).get(t.queryHash);n&&(t.destroy(),n===t&&T(this,bn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Qe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,bn).get(t)}getAll(){return[...T(this,bn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>wy(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>wy(t,r)):n}notify(t){Qe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},bn=new WeakMap,ib),xn,ot,Rs,Sn,mr,ob,Y$=(ob=class extends I1{constructor(t){super();Y(this,Sn);Y(this,xn);Y(this,ot);Y(this,Rs);this.mutationId=t.mutationId,F(this,ot,t.mutationCache),F(this,xn,[]),this.state=t.state||Q$(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,xn).includes(t)||(T(this,xn).push(t),this.clearGcTimeout(),T(this,ot).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){F(this,xn,T(this,xn).filter(n=>n!==t)),this.scheduleGc(),T(this,ot).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,xn).length||(this.state.status==="pending"?this.scheduleGc():T(this,ot).remove(this))}continue(){var t;return((t=T(this,Rs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,c,u,d,h,f,w,m,b,v,g,y,S,E,_,C,k;const n=()=>{se(this,Sn,mr).call(this,{type:"continue"})};F(this,Rs,L1({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,R)=>{se(this,Sn,mr).call(this,{type:"failed",failureCount:P,error:R})},onPause:()=>{se(this,Sn,mr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,ot).canRun(this)}));const r=this.state.status==="pending",s=!T(this,Rs).canStart();try{if(r)n();else{se(this,Sn,mr).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=T(this,ot).config).onMutate)==null?void 0:o.call(i,t,this));const R=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));R!==this.state.context&&se(this,Sn,mr).call(this,{type:"pending",context:R,variables:t,isPaused:s})}const P=await T(this,Rs).start();return await((u=(c=T(this,ot).config).onSuccess)==null?void 0:u.call(c,P,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,P,t,this.state.context)),await((w=(f=T(this,ot).config).onSettled)==null?void 0:w.call(f,P,null,this.state.variables,this.state.context,this)),await((b=(m=this.options).onSettled)==null?void 0:b.call(m,P,null,t,this.state.context)),se(this,Sn,mr).call(this,{type:"success",data:P}),P}catch(P){try{throw await((g=(v=T(this,ot).config).onError)==null?void 0:g.call(v,P,t,this.state.context,this)),await((S=(y=this.options).onError)==null?void 0:S.call(y,P,t,this.state.context)),await((_=(E=T(this,ot).config).onSettled)==null?void 0:_.call(E,void 0,P,this.state.variables,this.state.context,this)),await((k=(C=this.options).onSettled)==null?void 0:k.call(C,void 0,P,t,this.state.context)),P}finally{se(this,Sn,mr).call(this,{type:"error",error:P})}}finally{T(this,ot).runNext(this)}}},xn=new WeakMap,ot=new WeakMap,Rs=new WeakMap,Sn=new WeakSet,mr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Qe.batch(()=>
137{T(this,xn).forEach(r=>{r.onMutationUpdate(t)}),T(this,ot).notify({mutation:this,type:"updated",action:t})})},ob);function Q$(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Hn,rn,il,ab,J$=(ab=class extends ml{constructor(t={}){super();Y(this,Hn);Y(this,rn);Y(this,il);this.config=t,F(this,Hn,new Set),F(this,rn,new Map),F(this,il,0)}build(t,n,r){const s=new Y$({mutationCache:this,mutationId:++Tl(this,il)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){T(this,Hn).add(t);const n=ql(t);if(typeof n=="string"){const r=T(this,rn).get(n);r?r.push(t):T(this,rn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(T(this,Hn).delete(t)){const n=ql(t);if(typeof n=="string"){const r=T(this,rn).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&T(this,rn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=ql(t);if(typeof n=="string"){const r=T(this,rn).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=ql(t);if(typeof n=="string"){const s=(r=T(this,rn).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Qe.batch(()=>{T(this,Hn).forEach(t=>{this.notify({type:"removed",mutation:t})}),T(this,Hn).clear(),T(this,rn).clear()})}getAll(){return Array.from(T(this,Hn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>by(n,r))}findAll(t={}){return this.getAll().filter(n=>by(t,n))}notify(t){Qe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Qe.batch(()=>Promise.all(t.map(n=>n.continue().catch(vt))))}},Hn=new WeakMap,rn=new WeakMap,il=new WeakMap,ab);function ql(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ey(e){return{onFetch:(t,n)=>{var u,d,h,f,w;const r=t.options,s=(h=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((f=t.state.data)==null?void 0:f.pages)||[],o=((w=t.state.data)==null?void 0:w.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const b=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=j1(t.options,t.fetchOptions),g=async(y,S,E)=>{if(m)return Promise.reject();if(S==null&&y.pages.length)return Promise.resolve(y);const C=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:S,direction:E?"backward":"forward",meta:t.options.meta};return b(I),I})(),k=await v(C),{maxPages:P}=t.options,R=E?F$:M$;return{pages:R(y.pages,k,P),pageParams:R(y.pageParams,S,P)}};if(s&&i.length){const y=s==="backward",S=y?F1:Lf,E={pages:i,pageParams:o},_=S(r,E);a=await g(E,_,y)}else{const y=e??i.length;do{const S=l===0?o[0]??r.initialPageParam:Lf(r,a);if(l>0&&S==null)break;a=await g(a,S),l++}while(l<y)}return a};t.options.persister?t.fetchFn=()=>{var m,b;return(b=(m=t.options).persister)==null?void 0:b.call(m,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Lf(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function F1(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function $8(e,t){return t?Lf(e,t)!=null:!1}function j8(e,t){return!t||!e.getPreviousPageParam?!1:F1(e,t)!=null}var Ae,Pr,Ar,qi,Gi,Rr,Yi,Qi,lb,X$=(lb=class{constructor(e={}){Y(this,Ae);Y(this,Pr);Y(this,Ar);Y(this,qi);Y(this,Gi);Y(this,Rr);Y(this,Yi);Y(this,Qi);F(this,Ae,e.queryCache||new G$),F(this,Pr,e.mutationCache||new J$),F(this,Ar,e.defaultOptions||{}),F(this,qi,new Map),F(this,Gi,new Map),F(this,Rr,0)}mount(){Tl(this,Rr)._++,T(this,Rr)===1&&(F(this,Yi,Vm.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ae).onFocus())})),F(this,Qi,uu.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ae).onOnline())})))}unmount(){var e,t;Tl(this,Rr)._--,T(this,Rr)===0&&((e=T(this,Yi))==null||e.call(this),F(this,Yi,void 0),(t=T(this,Qi))==null||t.call(this),F(this,Qi,void 0))}isFetching(e){return T(this,Ae).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,Pr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ae).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=T(this,Ae).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Hr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return T(this,Ae).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=T(this,Ae).get(r.queryHash),i=s==null?void 0:s.state.data,o=L$(t,i);if(o!==void 0)return T(this,Ae).build(this,r).setData(o,{...n,manual:!0})}
vendor: 11,458 bytes, line 137
137setQueriesData(e,t,n){return Qe.batch(()=>T(this,Ae).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ae).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=T(this,Ae);Qe.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=T(this,Ae);return Qe.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Qe.batch(()=>T(this,Ae).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(vt).catch(vt)}invalidateQueries(e,t={}){return Qe.batch(()=>(T(this,Ae).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Qe.batch(()=>T(this,Ae).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(vt)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(vt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=T(this,Ae).build(this,t);return n.isStaleByTime(Hr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(vt).catch(vt)}fetchInfiniteQuery(e){return e.behavior=Ey(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(vt).catch(vt)}ensureInfiniteQueryData(e){return e.behavior=Ey(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return uu.isOnline()?T(this,Pr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Ae)}getMutationCache(){return T(this,Pr)}getDefaultOptions(){return T(this,Ar)}setDefaultOptions(e){F(this,Ar,e)}setQueryDefaults(e,t){T(this,qi).set(Ua(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,qi).values()],n={};return t.forEach(r=>{Ba(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){T(this,Gi).set(Ua(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,Gi).values()],n={};return t.forEach(r=>{Ba(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,Ar).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Mm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Fm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,Ar).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Ae).clear(),T(this,Pr).clear()}},Ae=new WeakMap,Pr=new WeakMap,Ar=new WeakMap,qi=new WeakMap,Gi=new WeakMap,Rr=new WeakMap,Yi=new WeakMap,Qi=new WeakMap,lb),mt,ie,ol,at,Os,Ji,Or,$r,al,Xi,Zi,$s,js,jr,eo,ue,Qo,If,Mf,Ff,Vf,Uf,Bf,zf,V1,cb,Z$=(cb=class extends ml{constructor(t,n){super();Y(this,ue);Y(this,mt);Y(this,ie);Y(this,ol);Y(this,at);Y(this,Os);Y(this,Ji);Y(this,Or);Y(this,$r);Y(this,al);Y(this,Xi);Y(this,Zi);Y(this,$s);Y(this,js);Y(this,jr);Y(this,eo,new Set);this.options=n,F(this,mt,t),F(this,$r,null),F(this,Or,Df()),this.options.experimental_prefetchInRender||T(this,Or).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,ie).addObserver(this),_y(T(this,ie),this.options)?se(this,ue,Qo).call(this):this.updateResult(),se(this,ue,Vf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Wf(T(this,ie),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Wf(T(this,ie),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,se(this,ue,Uf).call(this),se(this,ue,Bf).call(this),T(this,ie).removeObserver(this)}setOptions(t){const n=this.options,r=T(this,ie);if(this.options=T(this,mt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ft(this.options.enabled,T(this,ie))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");se(this,ue,zf).call(this),T(this,ie).setOptions(this.options),n._defaulted&&!$f(this.options,n)&&T(this,mt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,ie),observer:this});const s=this.hasListeners();s&&Ty(T(this,ie),r,this.options,n)&&se(this,ue,Qo).call(this),this.updateResult(),s&&(T(this,ie)!==r||Ft(this.options.enabled,T(this,ie))!==Ft(n.enabled,T(this,ie))||Hr(this.options.staleTime,T(this,ie))!==Hr(n.staleTime,T(this,ie)))&&se(this,ue,If).call(this);const i=se(this,ue,Mf).call(this);s&&(T(this,ie)!==r||Ft(this.options.enabled,T(this,ie))!==Ft(n.enabled,T(this,ie))||i!==T(this,jr))&&se(this,ue,Ff).call(this,i)}getOptimisticResult(t){const n=T(this,mt).getQueryCache().build(T(this,mt),t),r=this.createResult(n,t);return t2(this,r)&&(F(this,at,r),F(this,Ji,this.options),F(this,Os,T(this,ie).state)),r}getCurrentResult(){return T(this,at)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),Reflect.get(r,s))})}trackProp(t){T(this,eo).add(t)}getCurrentQuery(){return T(this,ie)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=T(this,mt).defaultQueryOptions(t),r=T(this,mt).getQueryCache().build(T(this,mt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return se(this,ue,Qo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,at)))}createResult(t,n){var P;const r=T(this,ie),s=this.options,i=T(this,at),o=T(this,Os),a=T(this,Ji),c=t!==r?t.state:T(this,ol),{state:u}=t;let d={...u},h=!1,f;if(n._optimisticResults){const R=this.hasListeners(),I=!R&&_y(t,n),N=R&&Ty(t,r,n,s);(I||N)&&(d={...d,...M1(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:w,errorUpdatedAt:m,status:b}=d;f=d.data;let v=!1;if(n.placeholderData!==void 0&&f===void 0&&b==="pending"){let R;i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(R=i.data,v=!0):R=typeof n.placeholderData=="function"?n.placeholderData((P=T(this,Zi))==null?void 0:P.state.data,T(this,Zi)):n.placeholderData,R!==void 0&&(b="success",f=Nf(i==null?void 0:i.data,R,n),h=!0)}if(n.select&&f!==void 0&&!v)if(i&&f===(o==null?void 0:o.data)&&n.select===T(this,al))f=T(this,Xi);else try{F(this,al,n.select),f=n.select(f),f=Nf(i==null?void 0:i.data,f,n),F(this,Xi,f),F(this,$r,null)}catch(R){F(this,$r,R)}T(this,$r)&&(w=T(this,$r),f=T(this,Xi),m=Date.now(),b="error");const g=d.fetchStatus==="fetching",y=b==="pending",S=b==="error",E=y&&g,_=f!==void 0,k={status:b,fetchStatus:d.fetchStatus,isPending:y,isSuccess:b==="success",isError:S,isInitialLoading:E,isLoading:E,data:f,dataUpdatedAt:d.dataUpdatedAt,error:w,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:g,isRefetching:g&&!y,isLoadingError:S&&!_,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:S&&_,isStale:Um(t,n),refetch:this.refetch,promise:T(this,Or),isEnabled:Ft(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=Q=>{k.status==="error"?Q.reject(k.error):k.data!==void 0&&Q.resolve(k.data)},I=()=>{const Q=F(this,Or,k.promise=Df());R(Q)},N=T(this,Or);switch(N.status){case"pending":t.queryHash===r.queryHash&&R(N);break;case"fulfilled":(k.status==="error"||k.data!==N.value)&&I();break;case"rejected":(k.status!=="error"||k.error!==N.reason)&&I();break}}return k}updateResult(){const t=T(this,at),n=this.createResult(T(this,ie),this.options);if(F(this,Os,T(this,ie).state),F(this,Ji,this.options),T(this,Os).data!==void 0&&F(this,Zi,T(this,ie)),$f(n,t))return;F(this,at,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!T(this,eo).size)return!0;const o=new Set(i??T(this,eo));return this.options.throwOnError&&o.add("error"),Object.keys(T(this,at)).some(a=>{const l=a;return T(this,at)[l]!==t[l]&&o.has(l)})};se(this,ue,V1).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&se(this,ue,Vf).call(this)}},mt=new WeakMap,ie=new WeakMap,ol=new WeakMap,at=new WeakMap,Os=new WeakMap,Ji=new WeakMap,Or=new WeakMap,$r=new WeakMap,al=new WeakMap,Xi=new WeakMap,Zi=new WeakMap,$s=new WeakMap,js=new WeakMap,jr=new WeakMap,eo=new WeakMap,ue=new WeakSet,Qo=function(t){se(this,ue,zf).call(this);let n=T(this,ie).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(vt)),n},If=function(){se(this,ue,Uf).call(this);const t=Hr(this.options.staleTime,T(this,ie));if(zs||T(this,at).isStale||!Of(t))return;const r=O1(T(this,at).dataUpdatedAt,t)+1;F(this,$s,setTimeout(()=>{T(this,at).isStale||this.updateResult()},r))},Mf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,ie)):this.options.refetchInterval)??!1},Ff=function(t){se(this,ue,Bf).call(this),F(this,jr,t),!(zs||Ft(this.options.enabled,T(this,ie))===!1||!Of(T(this,jr))||T(this,jr)===0)&&F(this,js,setInterval(()=>{(this.options.refetchIntervalInBackground||Vm.isFocused())&&se(this,ue,Qo).call(this)},T(this,jr)))},Vf=function(){se(this,ue,If).call(this),se(this,ue,Ff).call(this,se(this,ue,Mf).call(this))},Uf=function(){T(this,$s)&&(clearTimeout(T(this,$s)),F(this,$s,void 0))},Bf=function(){T(this,js)&&(clearInterval(T(this,js)),F(this,js,void 0))},zf=function(){const t=T(this,mt).getQueryCache().build(T(this,mt),this.options);if(t===T(this,ie))return;const n=T(this,ie);F(this,ie,t),F(this,ol,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},V1=function(t){Qe.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(T(this,at))}),T(this,mt).getQueryCache().notify({query:T(this,ie),type:"observerResultsUpdated"})})},cb);function e2(e,t){return Ft(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function _y(e,t){return e2(e,t)||e.state.data!==void 0&&Wf(e,t,t.refetchOnMount)}function Wf(e,t,n){if(Ft(t.enabled,e)!==!1&&Hr(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Um(e,t)}return!1}function Ty(e,t,n,r){return(e!==t||Ft(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Um(e,n)}function Um(e,t){return Ft(t.enabled,e)!==!1&&e.isStaleByTime(Hr(t.staleTime,e))}function t2(e,t){return!$f(e.getCurrentResult(),t)}var U1=p.createContext(void 0),n2=e=>{const t=p.useContext(U1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},r2=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(U1.Provider,{value:e,children:t})),B1=p.createContext(!1),s2=()=>p.useContext(B1);B1.Provider;function i2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
137var o2=p.createContext(i2()),a2=()=>p.useContext(o2),l2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},c2=e=>{p.useEffect(()=>{e.clearReset()},[e])},u2=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||V$(n,[e.error,r])),d2=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},h2=(e,t)=>e.isLoading&&e.isFetching&&!t,f2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ky=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function p2(e,t,n){var d,h,f,w,m;const r=s2(),s=a2(),i=n2(),o=i.defaultQueryOptions(e);(h=(d=i.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,o),o._optimisticResults=r?"isRestoring":"optimistic",d2(o),l2(o,s),c2(s);const a=!i.getQueryCache().get(o.queryHash),[l]=p.useState(()=>new t(i,o)),c=l.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(b=>{const v=u?l.subscribe(Qe.batchCalls(b)):vt;return l.updateResult(),v},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),p.useEffect(()=>{l.setOptions(o)},[o,l]),f2(o,c))throw ky(o,l,s);if(u2({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw c.error;if((w=(f=i.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||w.call(f,o,c),o.experimental_prefetchInRender&&!zs&&h2(c,r)){const b=a?ky(o,l,s):(m=i.getQueryCache().get(o.queryHash))==null?void 0:m.promise;b==null||b.catch(vt).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function z1(e,t){return p2(e,Z$)}/** 138 * @remix-run/router v1.23.0 139 * 140 * Copyright (c) Remix Software Inc. 141 * 142 * This source code is licensed under the MIT license found in the 143 * LICENSE.md file in the root directory of this source tree. 144 * 145 * @license MIT 146 */function za(){return za=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},za.apply(this,arguments)}var Lr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Lr||(Lr={}));const Cy="popstate";function m2(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return Hf("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:du(s)}return v2(t,n,null,e)}function Le(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function W1(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function g2(){return Math.random().toString(36).substr(2,8)}function Py(e,t){return{usr:e.state,key:e.key,idx:t}}function Hf(e,t,n,r){return n===void 0&&(n=null),za({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?xo(t):t,{state:n,key:t&&t.key||r||g2()})}function du(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function xo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function v2(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Lr.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(za({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function d(){a=Lr.Pop;let b=u(),v=b==null?null:b-c;c=b,l&&l({action:a,location:m.location,delta:v})}function h(b,v){a=Lr.Push;let g=Hf(m.location,b,v);c=u()+1;let y=Py(g,c),S=m.createHref(g);try{o.pushState(y,"",S)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(S)}i&&l&&l({action:a,location:m.location,delta:1})}function f(b,v){a=Lr.Replace;let g=Hf(m.location,b,v);c=u();let y=Py(g,c),S=m.createHref(g);o.replaceState(y,"",S),i&&l&&l({action:a,location:m.location,delta:0})}function w(b){let v=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof b=="string"?b:du(b);return g=g.replace(/ $/,"%20"),Le(v,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,v)}let m={get action(){return a},get location(){return e(s,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Cy,d),l=b,()=>{s.removeEventListener(Cy,d),l=null}},createHref(b){return t(s,b)},createURL:w,encodeLocation(b){let v=w(b);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:h,replace:f,go(b){return o.go(b)}};return m}var Ay;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ay||(Ay={}));function y2(e,t,n){return n===void 0&&(n="/"),w2(e,t,n,!1)}function w2(e,t,n,r){let s=typeof t=="string"?xo(t):t,i=Bm(s.pathname||"/",n);if(i==null)return null;let o=H1(e);b2(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=O2(i);a=A2(o[l],c,r)}return a}function H1(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Le(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not val
146id. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Kr([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(Le(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),H1(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:C2(c,i.index),routesMeta:u})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of K1(i.path))s(i,o,l)}),t}function K1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=K1(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function b2(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:P2(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const x2=/^:[\w-]+$/,S2=3,E2=2,_2=1,T2=10,k2=-2,Ry=e=>e==="*";function C2(e,t){let n=e.split("/"),r=n.length;return n.some(Ry)&&(r+=k2),t&&(r+=E2),n.filter(s=>!Ry(s)).reduce((s,i)=>s+(x2.test(i)?S2:i===""?_2:T2),r)}function P2(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function A2(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=i==="/"?t:t.slice(i.length)||"/",d=Oy({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),h=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Oy({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;
vendor: 6,917 bytes, lines 146-155
146Object.assign(s,d.params),o.push({params:s,pathname:Kr([i,d.pathname]),pathnameBase:D2(Kr([i,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(i=Kr([i,d.pathnameBase]))}return o}function Oy(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=R2(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:h,isOptional:f}=u;if(h==="*"){let m=a[d]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const w=a[d];return f&&!w?c[h]=void 0:c[h]=(w||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function R2(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),W1(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function O2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return W1(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Bm(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function $2(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?xo(e):e;return{pathname:n?n.startsWith("/")?n:j2(n,t):t,search:L2(r),hash:I2(s)}}function j2(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Xd(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function N2(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function zm(e,t){let n=N2(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Wm(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=xo(e):(s=za({},e),Le(!s.pathname||!s.pathname.includes("?"),Xd("?","pathname","search",s)),Le(!s.pathname||!s.pathname.includes("#"),Xd("#","pathname","hash",s)),Le(!s.search||!s.search.includes("#"),Xd("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),d-=1;s.pathname=h.join("/")}a=d>=0?t[d]:"/"}let l=$2(s,a),c=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Kr=e=>e.join("/").replace(/\/\/+/g,"/"),D2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),L2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,I2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function M2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const q1=["post","put","patch","delete"];new Set(q1);const F2=["get",...q1];new Set(F2);/** 147 * React Router v6.30.1 148 * 149 * Copyright (c) Remix Software Inc. 150 * 151 * This source code is licensed under the MIT license found in the 152 * LICENSE.md file in the root directory of this source tree. 153 * 154 * @license MIT 155 */function Wa(){return Wa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wa.apply(this,arguments)}const Hm=p.createContext(null),V2=p.createContext(null),rs=p.createContext(null),Ju=p.createContext(null),ir=p.createContext({outlet:null,matches:[],isDataRoute:!1}),G1=p.createContext(null);function U2(e,t){let{relative:n}=t===void 0?{}:t;So()||Le(!1);let{basename:r,navigator:s}=p.useContext(rs),{hash:i,pathname:o,search:a}=Q1(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Kr([r,o])),s.createHref({pathname:l,search:a,hash:i})}function So(){return p.useContext(Ju)!=null}function ss(){return So()||Le(!1),p.useContext(Ju).location}function Y1(e){p.useContext(rs).static||p.useLayoutEffect(e)}function Km(){let{isDataRoute:e}=p.useContext(ir);return e?ej():B2()}function B2(){So()||Le(!1);let e=p.useContext(Hm),{basename:t,future:n,navigator:r}=p.useContext(rs),{matches:s}=p.useContext(ir),{pathname:i}=ss(),o=JSON.stringify(zm(s,n.v7_relativeSplatPath)),a=p.useRef(!1);return Y1(()=>{a.current=!0}),p.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=Wm(c,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Kr([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,o,i,e])}function N8(){let{matches:e}=p.useContext(ir),t=e[e.length-1];return t?t.params:{}}function Q1(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=p.useContext(rs),{matches:s}=p.useContext(ir),{pathname:i}=ss(),o=JSON.stringify(zm(s,r.v7_relativeSplatPath));return p.useMemo(()=>Wm(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function z2(e,t){return W2(e,t)}function W2(e,t,n,r){So()||Le(!1);let{navigator:s}=p.useContext(rs),{matches:i}=p.useContext(ir),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=ss(),u;if(t){var d;let b=typeof t=="string"?xo(t):t;l==="/"||(d=b.pathname)!=null&&d.startsWith(l)||Le(!1),u=b}else u=c;let h=u.pathname||"/",f=h;if(l!=="/"){let b=l.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(b.length).join("/")}let w=y2(e,{pathname:f}),m=Y2(w&&w.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Kr([l,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Kr([l,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return t&&m?p.createElement(Ju.Provider,{value:{location:Wa({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Lr.Pop}},m):m}function H2(){let e=Z2(),t=M2(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application
155Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:s},n):null,null)}const K2=p.createElement(H2,null);class q2 extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?p.createElement(ir.Provider,{value:this.props.routeContext},p.createElement(G1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function G2(e){let{routeContext:t,match:n,children:r}=e,s=p.useContext(Hm);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(ir.Provider,{value:t},r)}function Y2(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||Le(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<o.length;u++){let d=o[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:h,errors:f}=n,w=d.route.loader&&h[d.route.id]===void 0&&(!f||f[d.route.id]===void 0);if(d.route.lazy||w){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,d,h)=>{let f,w=!1,m=null,b=null;n&&(f=a&&d.route.id?a[d.route.id]:void 0,m=d.route.errorElement||K2,l&&(c<0&&h===0?(w=!0,b=null):c===h&&(w=!0,b=d.route.hydrateFallbackElement||null)));let v=t.concat(o.slice(0,h+1)),g=()=>{let y;return f?y=m:w?y=b:d.route.Component?y=p.createElement(d.route.Component,null):d.route.element?y=d.route.element:y=u,p.createElement(G2,{match:d,routeContext:{outlet:u,matches:v,isDataRoute:n!=null},children:y})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?p.createElement(q2,{location:n.location,revalidation:n.revalidation,component:m,error:f,children:g(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):g()},null)}var J1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(J1||{}),hu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(hu||{});function Q2(e){let t=p.useContext(Hm);return t||Le(!1),t}function J2(e){let t=p.useContext(V2);return t||Le(!1),t}function X2(e){let t=p.useContext(ir);return t||Le(!1),t}function X1(e){let t=X2(),n=t.matches[t.matches.length-1];return n.route.id||Le(!1),n.route.id}function Z2(){var e;let t=p.useContext(G1),n=J2(hu.UseRouteError),r=X1(hu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function ej(){let{router:e}=Q2(J1.UseNavigateStable),t=X1(hu.UseNavigateStable),n=p.useRef(!1);return Y1(()=>{n.current=!0}),p.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Wa({fromRouteId:t},i)))},[e,t])}function tj(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function D8(e){let{to:t,replace:n,state:r,relative:s}=e;So()||Le(!1);let{future:i,static:o}=p.useContext(rs),{matches:a}=p.useContext(ir),{pathname:l}=ss(),c=Km(),u=Wm(t,zm(a,i.v7_relativeSplatPath),l,s==="path"),d=JSON.stringify(u);return p.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:s}),[c,d,s,n,r]),null}function H(e){Le(!1)}function nj(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Lr.Po
155p,navigator:i,static:o=!1,future:a}=e;So()&&Le(!1);let l=t.replace(/^\/*/,"/"),c=p.useMemo(()=>({basename:l,navigator:i,static:o,future:Wa({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=xo(r));let{pathname:u="/",search:d="",hash:h="",state:f=null,key:w="default"}=r,m=p.useMemo(()=>{let b=Bm(u,l);return b==null?null:{location:{pathname:b,search:d,hash:h,state:f,key:w},navigationType:s}},[l,u,d,h,f,w,s]);return m==null?null:p.createElement(rs.Provider,{value:c},p.createElement(Ju.Provider,{children:n,value:m}))}function rj(e){let{children:t,location:n}=e;return z2(Kf(t),n)}new Promise(()=>{});function Kf(e,t){t===void 0&&(t=[]);let n=[];return p.Children.forEach(e,(r,s)=>{if(!p.isValidElement(r))return;let i=[...t,s];if(r.type===p.Fragment){n.push.apply(n,Kf(r.props.children,i));return}r.type!==H&&Le(!1),!r.props.index||!r.props.children||Le(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Kf(r.props.children,i)),n.push(o)}),n}/** 156 * React Router DOM v6.30.1 157 * 158 * Copyright (c) Remix Software Inc. 159 * 160 * This source code is licensed under the MIT license found in the 161 * LICENSE.md file in the root directory of this source tree. 162 * 163 * @license MIT 164 */function qf(){return qf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qf.apply(this,arguments)}function sj(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function ij(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function oj(e,t){return e.button===0&&(!t||t==="_self")&&!ij(e)}function Gf(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function aj(e,t){let n=Gf(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const lj=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],cj="6";try{window.__reactRouterVersion=cj}catch{}const uj="startTransition",$y=xb[uj];function dj(e){let{basename:t,children:n,future:r,window:s}=e,i=p.useRef();i.current==null&&(i.current=m2({window:s,v5Compat:!0}));let o=i.current,[a,l]=p.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=p.useCallback(d=>{c&&$y?$y(()=>l(d)):l(d)},[l,c]);return p.useLayoutEffect(()=>o.listen(u),[o,u]),p.useEffect(()=>tj(r),[r]),p.createElement(nj,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const hj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",fj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_e=p.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,h=sj(t,lj),{basename:f}=p.useContext(rs),w,m=!1;if(typeof c=="string"&&fj.test(c)&&(w=c,hj))try{let y=new URL(window.location.href),S=c.startsWith("//")?new URL(y.protocol+c):new URL(c),E=Bm(S.pathname,f);S.origin===y.origin&&E!=null?c=E+S.search+S.hash:m=!0}catch{}let b=U2(c,{relative:s}),v=pj(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:d});function g(y){r&&r(y),y.defaultPrevented||v(y)}return p.createElement("a",qf({},h,{href:w||b,onClick:m||i?r:g,ref:n,target:l}))});var jy;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(jy||(jy={}));var Ny;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ny||(Ny={}));function pj(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=Km(),c=ss(),u=Q1(e,{relative:o});return p.useCallback(d=>
164{if(oj(d,n)){d.preventDefault();let h=r!==void 0?r:du(c)===du(u);l(e,{replace:h,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,u,r,s,n,e,i,o,a])}function L8(e){let t=p.useRef(Gf(e)),n=p.useRef(!1),r=ss(),s=p.useMemo(()=>aj(r.search,n.current?null:t.current),[r.search]),i=Km(),o=p.useCallback((a,l)=>{const c=Gf(typeof a=="function"?a(s):a);n.current=!0,i("?"+c,l)},[i,s]);return[s,o]}function Xu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function mj(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}const gj=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class qm extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class vj extends qm{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Dy extends qm{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Ly extends qm{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Yf;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Yf||(Yf={}));class yj{constructor(t,{headers:n={},customFetch:r,region:s=Yf.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=gj(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return mj(this,arguments,void 0,function*(n,r={}){var s;let i,o;try{const{headers:a,method:l,body:c,signal:u,timeout:d}=r;let h={},{region:f}=r;f||(f=this.region);const w=new URL(`${this.url}/${n}`);f&&f!=="any"&&(h["x-region"]=f,w.searchParams.set("forceFunctionRegion",f));let m;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(h["Content-Type"]="application/octet-stream",m=c):typeof c=="string"?(h["Content-Type"]="text/plain",m=c):typeof FormData<"u"&&c instanceof FormData?m=c:(h["Content-Type"]="application/json",m=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?m=JSON.stringify(c):m=c;let b=u;d&&(o=new AbortController,i=setTimeout(()=>o.abort(),d),u?(b=o.signal,u.addEventListener("abort",()=>o.abort())):b=o.signal);const v=yield this.fetch(w.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},h),this.headers),a),body:m,signal:b}).catch(E=>{throw new vj(E)}),g=v.headers.get("x-relay-error");if(g&&g==="true")throw new Dy(v);if(!v.ok)throw new Ly(v);let y=((s=v.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),S;return y==="application/json"?S=yield v.json():y==="application/octet-stream"||y==="application/pdf"?S=yield v.blob():y==="text/event-stream"?S=v:y==="multipart/form-data"?S=yield v.formData():S=yield v.text(),{data:S,error:null,response:v}}catch(a){return{data:null,error:a,response:a instanceof Ly||a instanceof Dy?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const Z1=3,Iy=e=>Math.min(1e3*2**e,3e4),wj=[520,503],eE=["GET","HEAD","OPTIONS"];var bj=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
164de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function My(e,t){return new Promise(n=>{if(t!=null&&t.aborted){n();return}const r=setTimeout(()=>{t==null||t.removeEventListener("abort",s),n()},e);function s(){clearTimeout(r),n()}t==null||t.addEventListener("abort",s)})}function xj(e,t,n,r){return!(!r||n>=Z1||!eE.includes(e)||!wj.includes(t))}var Sj=class{constructor(e){var t,n,r,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=e.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(s=e.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=e.retry)!==null&&i!==void 0?i:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let i=(async()=>{let o=0;for(;;){const c=new Headers(n.headers);o>0&&c.set("X-Retry-Count",String(o));let u;try{u=await r(n.url.toString(),{method:n.method,headers:c,body:JSON.stringify(n.body),signal:n.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!eE.includes(n.method))throw d;if(n.retryEnabled&&o<Z1){const h=Iy(o);o++,await My(h,n.signal);continue}throw d}if(xj(n.method,u.status,o,n.retryEnabled)){var a,l;const d=(a=(l=u.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,h=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:Iy(o);await u.text(),o++,await My(h,n.signal);continue}return await n.processResponse(u)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",c="",u="";const d=o==null?void 0:o.cause;if(d){var h,f,w,m;const g=(h=d==null?void 0:d.message)!==null&&h!==void 0?h:"",y=(f=d==null?void 0:d.code)!==null&&f!==void 0?f:"";l=`${(w=o==null?void 0:o.name)!==null&&w!==void 0?w:"FetchError"}: ${o==null?void 0:o.message}`,l+=` 165 166Caused by: ${(m=d==null?void 0:d.name)!==null&&m!==void 0?m:"Error"}: ${g}`,y&&(l+=` (${y})`),d!=null&&d.stack&&(l+=` 167${d.stack}`)}else{var b;l=(b=o==null?void 0:o.stack)!==null&&b!==void 0?b:""}const v=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",v>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${v} 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.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",v>this.urlLengthLimit&&(c+=`. Your request URL is ${v} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}}
167)),i.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,s=null,i=e.status,o=e.statusText;if(e.ok){var a,l;if(t.method!=="HEAD"){var c;const h=await e.text();h===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((c=t.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text"))?r=h:r=JSON.parse(h))}const u=(a=t.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),d=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");u&&d&&d.length>1&&(s=parseInt(d[1])),t.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(n={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,s=null,i=406,o="Not Acceptable"):r.length===1?r=r[0]:r=null)}else{const u=await e.text();try{n=JSON.parse(u),Array.isArray(n)&&e.status===404&&(r=[],n=null,i=200,o="OK")}catch{e.status===404&&u===""?(i=204,o="No Content"):n={message:u}}if(n&&t.shouldThrowOnError)throw new bj(n)}return{success:n===null,error:n,data:r,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},Ej=class extends Sj{select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Fy=new RegExp("[,()]");var ui=class extends Ej{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&Fy.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&Fy.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>
167n!==void 0).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},_j=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:s=8e3,retry:i}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},s=n?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),r&&l.append("Prefer",`count=${r}`),new ui({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),n||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>
1670){const l=[...new Set(a)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new ui({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),r&&l.append("Prefer",`count=${r}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const c=e.reduce((u,d)=>u.concat(Object.keys(d)),[]);if(c.length>0){const u=[...new Set(c)].map(d=>`"${d}"`);a.searchParams.set("columns",u.join(","))}}return new ui({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new ui({method:r,url:s,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new ui({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Ha(e){"@babel/helpers - typeof";return Ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ha(e)}function Tj(e,t){if(Ha(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ha(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kj(e){var t=Tj(e,"string");return Ha(t)=="symbol"?t:t+""}function Cj(e,t,n){return(t=kj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Gl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vy(Object(n),!0).forEach(function(r){Cj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Pj=class tE{constructor(t,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(c,u)=>{const d=new AbortController,h=setTimeout(()=>d.abort(),i),f=u==null?void 0:u.signal;if(f){if(f.aborted)return clearTimeout(h),l(c,u);const w=()=>{clearTimeout(h),d.abort()};return f.addEventListener("abort",w,{once:!0}),l(c,Gl(Gl({},u),{},{signal:d.signal})).finally(()=>{clearTimeout(h),f.removeEventListener("abort",w)})}return l(c,Gl(Gl({},u),{},{signal:d.signal})).finally(()=>clearTimeout(h))}:this.fetch=l,this.retry=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new _j(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new tE(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let c;const u=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(u)),d=r&&Object.values(n).some(u);d?(a="POST",c=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([f,w])=>w!==void 0).map(([f,w])=>[f,Array.isArray(w)?`{${w.join(",")}}`:`${w}
167`]).forEach(([f,w])=>{l.searchParams.append(f,w)})):(a="POST",c=n);const h=new Headers(this.headers);return d?h.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&h.set("Prefer",`count=${i}`),new ui({method:a,url:l,headers:h,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class Aj{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.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"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const n=globalThis.process;if(n){const r=n.versions;if(r&&r.node){const s=r.node,i=parseInt(s.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 168import ws from "ws" 169new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=` 170 171Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const Rj="2.103.0",Oj=`realtime-js/${Rj}`,$j="1.0.0",nE="2.0.0",jj=nE,Nj=1e4,Dj=100,Er={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},rE={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Qf={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class Lj{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,n,r){var s,i;const o=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",c=t.payload.event,u=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(u).length===0?"":JSON.stringify(u);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const h=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+c.length+d.length,f=new ArrayBuffer(this.HEADER_LENGTH+h);let w=new DataView(f),m=0;w.setUint8(m++,this.KINDS.userBroadcastPush),w.setUint8(m++,l.length),w.setUint8(m++,a.length),w.setUint8(m++,o.length),w.setUint8(m++,c.length),w.setUint8(m++,d.length),w.setUint8(m++,n),Array.from(l,v=>w.setUint8(m++,v.charCodeAt(0))),Array.from(a,v=>w.setUint8(m++,v.charCodeAt(0))),Array.from(o,v=>w.setUint8(m++,v.charCodeAt(0))),Array.from(c,v=>w.setUint8(m++,v.charCodeAt(0))),Array.from(d,v=>w.setUint8(m++,v.charCodeAt(0)));var b=new Uint8Array(f.byteLength+r.byteLength);return b.set(new Uint8Array(f),0),b.set(new Uint8Array(r),f.byteLength),b.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[s,i,o,a,l]=r;
171return n({join_ref:s,ref:i,topic:o,event:a,payload:l})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,s)}}_decodeUserBroadcast(t,n,r){const s=n.getUint8(1),i=n.getUint8(2),o=n.getUint8(3),a=n.getUint8(4);let l=this.HEADER_LENGTH+4;const c=r.decode(t.slice(l,l+s));l=l+s;const u=r.decode(t.slice(l,l+i));l=l+i;const d=r.decode(t.slice(l,l+o));l=l+o;const h=t.slice(l,t.byteLength),f=a===this.JSON_ENCODING?JSON.parse(r.decode(h)):h,w={type:this.BROADCAST_EVENT,event:u,payload:f};return o>0&&(w.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}var me;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(me||(me={}));const Uy=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=Ij(o,e,t,s),i),{}):{}},Ij=(e,t,n,r)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=n[e];return i&&!r.includes(i)?sE(i,o):Jf(o)},sE=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return Uj(t,n)}switch(e){case me.bool:return Mj(t);case me.float4:case me.float8:case me.int2:case me.int4:case me.int8:case me.numeric:case me.oid:return Fj(t);case me.json:case me.jsonb:return Vj(t);case me.timestamp:return Bj(t);case me.abstime:case me.date:case me.daterange:case me.int4range:case me.int8range:case me.money:case me.reltime:case me.text:case me.time:case me.timestamptz:case me.timetz:case me.tsrange:case me.tstzrange:return Jf(t);default:return Jf(t)}},Jf=e=>e,Mj=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},Fj=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},Vj=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},Uj=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let i;const o=e.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>sE(t,a))}return e},Bj=e=>typeof e=="string"?e.replace(" ","T"):e,iE=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var ha=e=>typeof e=="function"?e:function(){return e},zj=typeof self<"u"?self:null,di=typeof window<"u"?window:null,wn=zj||di||globalThis,Wj="2.0.0",Hj=1e4,Kj=1e3,En={connecting:0,open:1,closing:2,closed:3},pt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Bn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Xf={longpoll:"longpoll",websocket:"websocket"},qj={complete:4},Zf="base64url.bearer.phx.",Yl=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}
vendor: 8,135 bytes, line 171
171matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},oE=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},Gj=class{constructor(e,t,n){this.state=pt.closed,this.topic=e,this.params=ha(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Yl(this,Bn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new oE(()=>{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=pt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=pt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=pt.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=pt.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 Yl(this,Bn.leave,ha({}),this.timeout).send(),this.state=pt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Bn.reply,(r,s)=>{this.trigger(this.replyEventName(s),r)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=pt.closed,this.bindings=[]}onClose(e){this.on(Bn.close,e)}onError(e){return this.on(Bn.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new Yl(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=pt.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Bn.close,"leave")},n=new Yl(this,Bn.leave,ha({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic!==e?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=pt.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let s=this.onMessage(e,t,n,r);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,n));for(let o=0;o<i.length;o++)i[o].callback(s,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===pt.closed}isErrored(){return this.state===pt.errored}isJoined(){return this.state===pt.joined}isJoining(){return this.state===pt.joining}isLeaving(){return this.state===pt.leaving}},fu=class{static request(e,t,n,r,s,i,o){if(wn.XDomainRequest){let a=new wn.XDomainRequest;return this.xdomainRequest(a,e,t,r,s,i,o)}else if(wn.XMLHttpRequest){let a=new wn.XMLHttpRequest;return this.xhrRequest(a,e,t,n,r,s,i,o)}else{if(wn.fetch&&wn.AbortController)return this.fetchRequest(e,t,n,r,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,r,s,i,o){let a={method:e,headers:n,body:r},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),wn.fetch(t,a).then(c=>c.text()).then(c=>this.parseJSON(c)).then(c=>o&&o(c)).catch(c=>{c.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(e,t,n,r,s,i,o){return e.timeout=s,e.open(t,n),e.onload=()=>{let a=this.parseJSON(e.responseText);o&&o(a)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,s,i,o,a){e.open(t,n,!0),e.timeout=i;for(let[l,c]of Object.entries(r))e.setRequestHeader(l,c);return e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===qj.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},o&&(e.ontimeout=o),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let s=t?`${t}[${r}]`:r,i=e[r];typeof i=="object"?n.push(this.serialize(i,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},Yj=e=>{let t="",n=new Uint8Array(e),r=n.byteLength;for(let s=0;s<r;s++)t+=String.fromCharCode(n[s]);return btoa(t)},ei=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Zf)&&(this.authToken=atob(t[1].slice(Zf.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=En.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Xf.websocket),"$1/"+Xf.longpoll)}endpointURL(){return fu.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=En.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===En.open||this.readyState===En.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:n,token:r,messages:s}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=En.open,this.onopen({}),this.poll();break;
171case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(e){typeof e!="string"&&(e=Yj(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(` 172`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,n){for(let s of this.reqs)s.abort();this.readyState=En.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r,s){let i,o=()=>{this.reqs.delete(i),r()};i=fu.request(e,this.endpointURL(),t,n,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},Qj=class Jo{constructor(t,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Jo.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=Jo.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(r.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Jo.syncDiff(this.state,s,i,o),a())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Jo.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,r,s){let i=this.clone(t),o={},a={};return this.map(i,(l,c)=>{n[l]||(a[l]=c)}),this.map(n,(l,c)=>{let u=i[l];if(u){let d=c.metas.map(m=>m.phx_ref),h=u.metas.map(m=>m.phx_ref),f=c.metas.filter(m=>h.indexOf(m.phx_ref)<0),w=u.metas.filter(m=>d.indexOf(m.phx_ref)<0);f.length>0&&(o[l]=c,o[l].metas=f),w.length>0&&(a[l]=this.clone(u),a[l].metas=w)}else o[l]=c}),this.syncDiff(i,{joins:o,leaves:a},r,s)}static syncDiff(t,n,r,s){let{joins:i,leaves:o}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let c=t[a];if(t[a]=this.clone(l),c){let u=t[a].metas.map(h=>h.phx_ref),d=c.metas.filter(h=>u.indexOf(h.phx_ref)<0);t[a].metas.unshift(...d)}r(a,c,l)}),this.map(o,(a,l)=>{let c=t[a];if(!c)return;let u=l.metas.map(d=>d.phx_ref);c.metas=c.metas.filter(d=>u.indexOf(d.phx_ref)<0),s(a,c,l),c.metas.length===0&&delete t[a]}),t}static list(t,n){return n||(n=function(r,s){return s}),this.map(t,(r,s)=>n(r,s))}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Ql={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,s,i,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:s,event:i,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:s,payload:i}=e,o=this.META_LENGTH+t.length+n.length+s.length+r.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,t.length),l.setUint8(c++,n.length),l.setUint8(c++,s.length),l.setUint8(c++,r.length),Array.from(t,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(s,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(c++,d.charCodeAt(0)));var u=new Uint8Array(a.byteLength+i.byteLength);return u.set(new Uint8Array(a),0),u.set(new Uint8Array(i),a.byteLength),u.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}}
172,decodePush(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=n.decode(e.slice(o,o+r));o=o+r;let l=n.decode(e.slice(o,o+s));o=o+s;let c=n.decode(e.slice(o,o+i));o=o+i;let u=e.slice(o,e.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:u}},decodeReply(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(e.slice(a,a+r));a=a+r;let c=n.decode(e.slice(a,a+s));a=a+s;let u=n.decode(e.slice(a,a+i));a=a+i;let d=n.decode(e.slice(a,a+o));a=a+o;let h=e.slice(a,e.byteLength),f={status:d,response:h};return{join_ref:l,ref:c,topic:u,event:Bn.reply,payload:f}},decodeBroadcast(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=this.HEADER_LENGTH+2,o=n.decode(e.slice(i,i+r));i=i+r;let a=n.decode(e.slice(i,i+s));i=i+s;let l=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},Jj=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||Hj,this.transport=t.transport||wn.WebSocket||ei,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||wn&&wn.sessionStorage,this.establishedConnections=0,this.defaultEncoder=Ql.encode.bind(Ql),this.defaultDecoder=Ql.decode.bind(Ql),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ei?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;di&&di.addEventListener&&(di.addEventListener("pagehide",r=>{this.conn&&(this.disconnect(),n=this.connectClock)}),di.addEventListener("pageshow",r=>{n===this.connectClock&&(n=null,this.connect())}),di.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=r=>t.rejoinAfterMs?t.rejoinAfterMs(r):[1e3,2e3,5e3][r-1]||1e4,this.reconnectAfterMs=r=>t.reconnectAfterMs?t.reconnectAfterMs(r):[10,50,100,150,200,250,500,1e3,2e3][r-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(r,s,i)=>{console.log(`${r}: ${s}`,i)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=ha(t.params||{}),this.endPoint=`${e}/${Xf.websocket}`,this.vsn=t.vsn||Wj,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new oE(()=>
172{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return ei}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=fu.appendParams(fu.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ha(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ei?this.connectWithF
vendor: 4,339 bytes, line 172
172allback(ei,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage(s=>{s.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case ei:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Zf}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,s,i,o=this.transportName(e),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,t),i=this.onError(l=>{this.log("transport","error",l),r&&!n&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,t),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),Kj,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===En.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError()}
172triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Bn.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case En.connecting:return"connecting";case En.open:return"open";case En.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new Gj(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:s,join_ref:i}=e;this.log("push",`${t} ${n} (${i}, ${s})`,r)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:n,event:r,payload:s,ref:i,join_ref:o}=t;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${n} ${r} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(n,r,s,o)&&l.trigger(r,s,i,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class fa{constructor(t,n){const r=Zj(n);this.presence=new Qj(t.getChannel(),r),this.presence.onJoin((s,i,o)=>{const a=fa.onJoinPayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=fa.onLeavePayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return fa.transformState(this.presence.state)}static transformState(t){return t=Xj(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return n[r]=kc(s),n},{})}static onJoinPayload(t,n,r){const s=By(n),i=kc(r);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,n,r){const s=By(n),i=kc(r);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function kc(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function Xj(e){return JSON.parse(JSON.stringify(e))}function Zj(e){return(e==null?void 0:e.events)&&{events:e.events}}function By(e){return e!=null&&e.metas?kc(e):[]}var zy;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(zy||(zy={}));class eN{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new fa(this.channel.channelAdapter,n)}}class tN{constructor(t,n,r){const s=nN(r);this.channel=t.getSocket().channel(n,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,n,r){let s;try{s=this.channel.push(t,n,r)}catch{throw`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`}if(this.channel.pushBuffer.length>Dj){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===Er.joined}isJoined(){return this.state===Er.joined}isJoining(){return this.state===Er.joining}isClosed(){return this.state===Er.closed}isLeaving(){return this.state===Er.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function nN(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var Wy;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Wy||(Wy={}));var ki;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(ki||(ki={}));var zn;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(zn||(zn={}));class pa{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,n={config:{}},r){var s,i;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new tN(this.socket.socketAdapter,t,this.params),this.presence=new eN(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=iE(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,c=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(f=>f.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[ki.PRESENCE]&&this.bindings[ki.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,d={},h={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(f=>{t==null||t(zn.CHANNEL_ERROR,f)}),this._onClose(()=>t==null?void 0:t(zn.CLOSED)),this.updateJoinPayload(Object.assign({config:h},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:f})=>{if(this.socket._isManualToken()||this.socket.setAuth(),f===void 0){t==null||t(zn.SUBSCRIBED);return}this._updatePostgresBindings(f,t)}).receive("error",f=>{this.state=Er.errored,t==null||t(zn.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(f).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(zn.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var r;const s=this.bindings.postgres_changes,i=(r=s==null?void 0:s.length)!==null&&r!==void 0?r:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:c,schema:u,table:d,filter:h}}=l,f=t&&t[a];if(f&&f.event===c&&pa.isFilterValueEqual(f.schema,u)&&pa.isFilterValueEqual(f.table,d)&&pa.isFilterValueEqual(f.filter,h))o.push(Object.assign(Object.assign({},l),{id:f.id}));else{this.unsubscribe(),this.state=Er.errored,n==null||n(zn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Er.errored&&n&&n(zn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=t===ki.PRESENCE||t===ki.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,n,r)}async httpSend(t,n,r={}){var s;if(n==null)return Promise.reject("Payload is required for httpSend()");const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;
172try{const c=await a.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(t,n={}){var r,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_on(t,n,r){const s=t.toLocaleLowerCase(),i=this.channelAdapter.on(t,r),o={type:s,filter:n,callback:r,ref:i};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,r)=>{var s,i,o,a,l,c,u;const d=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,r))return!1;const h=(s=this.bindings[d])===null||s===void 0?void 0:s.find(f=>f.ref===t.ref);if(!h)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in h){const f=h.id,w=(i=h.filter)===null||i===void 0?void 0:i.event;return f&&((o=n.ids)===null||o===void 0?void 0:o.includes(f))&&(w==="*"||(w==null?void 0:w.toLocaleLowerCase())===((a=n.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const f=(c=(l=h==null?void 0:h.filter)===null||l===void 0?void 0:l.event)===null||c===void 0?void 0:c.toLocaleLowerCase();return f==="*"||f===((u=n==null?void 0:n.event)===null||u===void 0?void 0:u.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===d})}_notThisChannelEvent(t,n){const{close:r,error:s,leave:i,join:o}=rE;return n&&[r,s,i,o].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,r)=>{if(typeof n=="object"&&"ids"in n){const s=n.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:c}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:c}),this._getPayloadRecords(s))}return n})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const r of t.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=Uy(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=Uy(t.columns,t.old_record)),n}}class rN{constructor(t,n){this.socket=new Jj(t,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,n,r,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{t(),i("ok")},n,r)})}push(t){this.socket.push(t)}log(t,n,r){this.socket.log(t,n,r)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Qf.connecting}isDisconnecting(){return this.socket.connectionState()==Qf.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const sN={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},iN=[1e3,2e3,5e3,1e4],oN=1e4,aN=` 173 addEventListener("message", (e) => { 174 if (e.data.event === "start") { 175 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 176 } 177 });`;class lN{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
177,this.ref=0,this.serializer=new Lj,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const s=this._initializeOptions(n);this.socketAdapter=new rN(t,s),this.httpEndpoint=iE(t),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const n=t.message;throw n.includes("Node.js")?new Error(`${n} 178 179To use Realtime in Node.js, you need to provide a WebSocket implementation: 180 181Option 1: Use Node.js 22+ which has native WebSocket support 182Option 2: Install and provide the "ws" package: 183 184 npm install ws 185 186 import ws from "ws" 187 const client = new RealtimeClient(url, { 188 ...options, 189 transport: ws 190 })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=this.channels.map(async r=>{const s=await r.unsubscribe();return r.teardown(),s}),n=await Promise.all(t);return this.disconnect(),n}log(t,n,r){this.socketAdapter.log(t,n,r)}connectionState(){return this.socketAdapter.connectionState()||Qf.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new pa(`realtime:${t}`,n,this);return this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const i={access_token:n,version:Oj};n&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(rE.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(n,r)=>{n=="sent"&&this._setAuthSafely(),t&&t(n,r)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([aN],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(t){var n,r,s,i,o,a,l,c,u;this.worker=(n=t==null?void 0:t.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=t==null?void 0:t.accessToken)!==null&&r!==void 0?r:null;const d={};
190d.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:Nj,d.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:sN.HEARTBEAT_INTERVAL,d.transport=(o=t==null?void 0:t.transport)!==null&&o!==void 0?o:Aj.getWebSocketConstructor(),d.params=t==null?void 0:t.params,d.logger=t==null?void 0:t.logger,d.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),d.reconnectAfterMs=(a=t==null?void 0:t.reconnectAfterMs)!==null&&a!==void 0?a:m=>iN[m-1]||oN;let h,f;const w=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:jj;switch(w){case $j:h=(m,b)=>b(JSON.stringify(m)),f=(m,b)=>b(JSON.parse(m));break;case nE:h=this.serializer.encode.bind(this.serializer),f=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${d.vsn}`)}if(d.vsn=w,d.encode=(c=t==null?void 0:t.encode)!==null&&c!==void 0?c:h,d.decode=(u=t==null?void 0:t.decode)!==null&&u!==void 0?u:f,d.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,d.params=Object.assign(Object.assign({},d.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,d.autoSendHeartbeat=!this.worker}return d}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var Ka=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function cN(e,t,n){const r=new URL(t,e);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function uN(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function dN(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const a=cN(e.baseUrl,r,s),l=await uN(e.auth),c=await t(a,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),u=await c.text(),d=(c.headers.get("content-type")||"").includes("application/json"),h=d&&u?JSON.parse(u):u;if(!c.ok){const f=d?h:void 0,w=f==null?void 0:f.error;throw new Ka((w==null?void 0:w.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:w==null?void 0:w.type,icebergCode:w==null?void 0:w.code,details:f})}return{status:c.status,headers:c.headers,data:h}}}}function Jl(e){return e.join("�")}var hN=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Jl(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Jl(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Jl(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Jl(e.namespace)}`}),!0}catch(t){if(t instanceof Ka&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Ka&&n.status===409)return;throw n}}};function ti(e){return e.join("�")}var fN=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ti(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ti(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ti(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ti(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ti(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ti(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Ka&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Ka&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},pN=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=dN({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new hN(this.client,t),this.tableOps=new fN(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
190async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},Zu=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}};function ed(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var ep=class extends Zu{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},aE=class extends Zu{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const mN=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),gN=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},tp=e=>{if(Array.isArray(e))return e.map(n=>tp(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=tp(r)}),t},vN=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function qa(e){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qa(e)}function yN(e,t){if(qa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(qa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wN(e){var t=yN(e,"string");return qa(t)=="symbol"?t:t+""}function bN(e,t,n){return(t=wN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hy(Object(n),!0).forEach(function(r){bN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const Ky=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},xN=async(e,t,n,r)=>{if(e!==null&&typeof e=="object"&&typeof e.json=="function"){const s=e;let i=parseInt(s.status,10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new ep(Ky(o),i,a,r))}).catch(()=>{const o=i+"";t(new ep(s.statusText||`HTTP ${i} error`,i,o,r))})}else t(new aE(Ky(e),e,r))},SN=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!r)return q(q({},s),n);if(gN(r)){var i;const o=(t==null?void 0:t.headers)||{};let a;for(const[l,c]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=c);s.headers=EN(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(r)}else s.body=r;return t!=null&&t.duplex&&(s.duplex=t.duplex),q(q({},s),n)};function EN(e,t,n){const r=q({},e);for(const s of Object.keys(r))s.toLowerCase()===t.toLowerCase()&&delete r[s];return r[t]=n,r}async function Bo(e,t,n,r,s,i,o){return new Promise((a,l)=>{e(n,SN(t,r,s,i)).then(c=>{if(!c.ok)throw c;if(r!=null&&r.noResolveJson)return c;if(o==="vectors"){const u=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!u||!u.includes("application/json"))return{}}return c.json()}).then(c=>a(c)).catch(c=>xN(c,l,r,o))})}function lE(e="storage"){return{get:async(t,n,r,s)=>Bo(t,"GET",n,r,s,void 0,e),post:async(t,n,r,s,i)=>Bo(t,"POST",n,s,i,r,e),put:async(t,n,r,s,i)=>Bo(t,"PUT",n,s,i,r,e),head:async(t,n,r,s)=>Bo(t,"HEAD",n,q(q({},r),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,n,r,s,i)=>Bo(t,"DELETE",n,s,i,r,e)}}const _N=lE("storage"),{get:Ga,post:tn,put:np,head:TN,remove:Gm}=_N,kt=lE("vectors");var Eo=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=Object.fromEntries(Object.entries(t).map(([s,i])=>[s.toLowerCase(),i])),this.fetch=mN(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=q(q({},this.headers),{},{[e.toLowerCase()]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(ed(n))return{data:null,error:n};throw n}}},kN=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(ed(t))return{data:null,error:t};throw t}}};let cE;cE=Symbol.toStringTag;var CN=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[cE]="BlobDownloadBuilder",this.promise=null}asStream(){return new kN(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(ed(t))return{data:null,error:t};throw t}}};const PN={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},qy={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};
190var AN=class extends Eo{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var s=this;return s.handleOperation(async()=>{let i;const o=q(q({},qy),r);let a=q(q({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers&&(a=q(q({},a),r.headers));const c=s._removeEmptyFolders(t),u=s._getFinalPath(c),d=await(e=="PUT"?np:tn)(s.fetch,`${s.url}/object/${u}`,i,q({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:c,id:d.Id,fullPath:d.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const c=q(q({},qy),r),u=q(q({},s.headers),{"x-upsert":String(c.upsert)});return typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",c.cacheControl)):(l=n,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType),{path:i,fullPath:(await np(s.fetch,a.toString(),l,{headers:u})).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const s=q({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await tn(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(n.url+i.url),a=o.searchParams.get("token");if(!a)throw new Zu("No token returned by API");return{signedUrl:o.toString(),path:e,token:a}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await tn(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
190stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await tn(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(e);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await tn(r.fetch,`${r.url}/object/sign/${s}`,q({expiresIn:t},i?{transform:n.transform}:{}),{headers:r.headers});const a=new URLSearchParams;n!=null&&n.download&&a.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&a.set("cacheNonce",String(n.cacheNonce));const l=a.toString(),c=i&&o.signedURL.includes("/object/sign/")?o.signedURL.replace("/object/sign/","/render/image/sign/"):o.signedURL;return{signedUrl:encodeURI(`${r.url}${c}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const s=await tn(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),i=new URLSearchParams;n!=null&&n.download&&i.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&i.set("cacheNonce",String(n.cacheNonce));const o=i.toString();return s.map(a=>q(q({},a),{},{signedUrl:a.signedURL?encodeURI(`${r.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",s=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(s,t.transform),(t==null?void 0:t.cacheNonce)!=null&&s.set("cacheNonce",String(t.cacheNonce));const i=s.toString(),o=this._getFinalPath(e),a=()=>Ga(this.fetch,`${this.url}/${r}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new CN(a,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>tp(await Ga(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await TN(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(ed(s)){var r;const i=s instanceof ep?s.status:s instanceof aE?(r=s.originalError)===null||r===void 0?void 0:r.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=new URLSearchParams;t!=null&&t.download&&r.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(r,t.transform),(t==null?void 0:t.cacheNonce)!=null&&r.set("cacheNonce",String(t.cacheNonce));const s=r.toString(),i=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}`)+(s?`?${s}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await Gm(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const s=q(q(q({},PN),t),{},{prefix:e||""});return await tn(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=q({},e);return await tn(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const RN="2.103.0",gl={"X-Client-Info":`storage-js/${RN}`};var ON=class extends Eo{constructor(e,t={},n,r){const s=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=q(q({},gl),t);super(i,o,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await Ga(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Ga(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await tn(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await np(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await tn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Gm(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}}
190,$N=class extends Eo{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=q(q({},gl),t);super(r,s,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await tn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),s=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await Ga(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Gm(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!vN(e))throw new Zu("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 pN({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},jN=class extends Eo{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=q(q({},gl),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await kt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await kt.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await kt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await kt.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},NN=class extends Eo{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=q(q({},gl),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await kt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await kt.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await kt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await kt.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await kt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},DN=class extends Eo{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=q(q({},gl),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await kt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await kt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await kt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await kt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},LN=class extends DN{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new IN(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},IN=class extends jN{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName}))}
190async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new MN(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},MN=class extends NN{constructor(e,t,n,r,s){super(e,t,s),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},FN=class extends ON{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new AN(this.url,this.headers,e,this.fetch)}get vectors(){return new LN(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new $N(this.url+"/iceberg",this.headers,this.fetch)}};const uE="2.103.0",hi=30*1e3,rp=3,Zd=rp*hi,VN="http://localhost:9999",UN="supabase.auth.token",BN={"X-Client-Info":`gotrue-js/${uE}`},sp="X-Supabase-Api-Version",dE={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},zN=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,WN=10*60*1e3;class Ya extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function V(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class HN extends Ya{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function KN(e){return V(e)&&e.name==="AuthApiError"}class ws extends Ya{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class or extends Ya{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class Et extends or{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Xl(e){return V(e)&&e.name==="AuthSessionMissingError"}class ni extends or{constructor(){super("Auth session or user missing","AuthInvalidToken
190ResponseError",500,void 0)}}class Zl extends or{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class ec extends or{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function qN(e){return V(e)&&e.name==="AuthImplicitGrantRedirectError"}class Gy extends or{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class GN extends or{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 ip extends or{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function eh(e){return V(e)&&e.name==="AuthRetryableFetchError"}class Yy extends or{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class op extends or{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const pu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Qy=` 191\r=`.split(""),YN=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Qy.length;t+=1)e[Qy[t].charCodeAt(0)]=-2;for(let t=0;t<pu.length;t+=1)e[pu[t].charCodeAt(0)]=t;return e})();function Jy(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(pu[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(pu[r]),t.queuedBits-=6}}function hE(e,t,n){const r=YN[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Xy(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{XN(o,r,n)};for(let o=0;o<e.length;o+=1)hE(e.charCodeAt(o),s,i);return t.join("")}function QN(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function JN(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}QN(r,t)}}function XN(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function Vi(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)hE(e.charCodeAt(s),n,r);return new Uint8Array(t)}function ZN(e){const t=[];return JN(e,n=>t.push(n)),new Uint8Array(t)}function Es(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>Jy(s,n,r)),Jy(null,n,r),t.join("")}function eD(e){return Math.round(Date.now()/1e3)+e}function tD(){return Symbol("auth-callback")}const Ge=()=>typeof window<"u"&&typeof document<"u",us={tested:!1,writable:!1},fE=()=>{if(!Ge())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(us.tested)return us.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),us.tested=!0,us.writable=!0}catch{us.tested=!0,us.writable=!1}return us.writable};function nD(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
191h((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const pE=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),rD=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",fi=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},ds=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},qe=async(e,t)=>{await e.removeItem(t)};class td{constructor(){this.promise=new td.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}td.promiseConstructor=Promise;function tc(e){const t=e.split(".");if(t.length!==3)throw new op("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!zN.test(t[r]))throw new op("JWT not in base64url format");return{header:JSON.parse(Xy(t[0])),payload:JSON.parse(Xy(t[1])),signature:Vi(t[2]),raw:{header:t[0],payload:t[1]}}}async function sD(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function iD(e,t){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){r(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function oD(e){return("0"+e.toString(16)).substr(-2)}function aD(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,oD).join("")}async function lD(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function cD(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await lD(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ri(e,t,n=!1){const r=aD();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await fi(e,`${t}-code-verifier`,s);const i=await cD(r);return[i,r===i?"plain":"s256"]}const uD=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function dD(e){const t=e.headers.get(sp);if(!t||!t.match(uD))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function hD(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function fD(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const pD=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function si(e){if(!pD.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function th(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function mD(e,t){return new Proxy(e,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,s)}})}function Zy(e){return JSON.parse(JSON.stringify(e))}const ms=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),gD=[502,503,504];async function e0(e){var t;if(!rD(e))throw new ip(ms(e),0);if(gD.includes(e.status))throw new ip(ms(e),e.status);let n;try{n=await e.json()}catch(i){throw new ws(ms(i),i)}let r;const s=dD(e);if(s&&s.getTime()>=dE["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new Yy(ms(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new Et}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,o)=>
191i&&typeof o=="string",!0))throw new Yy(ms(n),e.status,n.weak_password.reasons);throw new HN(ms(n),e.status||500,r)}const vD=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function W(e,t,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[sp]||(i[sp]=dE["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await yD(e,t,n+a,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function yD(e,t,n,r,s,i){const o=vD(t,r,s,i);let a;try{a=await e(n,Object.assign({},o))}catch(l){throw console.error(l),new ip(ms(l),0)}if(a.ok||await e0(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await e0(l)}}function Xt(e){var t;let n=null;xD(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=eD(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function t0(e){const t=Xt(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function _r(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function wD(e){return{data:e,error:null}}function bD(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,o=Xu(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function n0(e){return e}function xD(e){return e.access_token&&e.refresh_token&&e.expires_in}const nh=["global","local","others"];class SD{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=pE(r),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)}}async signOut(t,n=nh[0]){if(nh.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${nh.join(", ")}`);try{return await W(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(V(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await W(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:_r})}catch(r){if(V(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Xu(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await W(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:bD,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(V(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await W(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:_r})}catch(n){if(V(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await W(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:n0});if(u.error)throw u.error;const d=await u.json(),h=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(w=>{const m=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(w.split(";")[1].split("=")[1]);c[`${b}Page`]=m}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(V(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){si(t);try{return await W(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:_r})}catch(n){if(V(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){si(t);try{return await W(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:_r})}catch(r){if(V(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){si(t);
191try{return await W(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:_r})}catch(r){if(V(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){si(t.userId);try{const{data:n,error:r}=await W(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(V(n))return{data:null,error:n};throw n}}async _deleteFactor(t){si(t.userId),si(t.id);try{return{data:await W(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(V(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await W(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:n0});if(u.error)throw u.error;const d=await u.json(),h=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(w=>{const m=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(w.split(";")[1].split("=")[1]);c[`${b}Page`]=m}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(V(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(t){try{return await W(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(V(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await W(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(V(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await W(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(V(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await W(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(V(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await W(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(V(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t!=null&&t.type&&(n.type=t.type),await W(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var s;return{data:{providers:(s=r==null?void 0:r.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(n){if(V(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await W(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(V(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await W(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(V(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await W(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(V(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(t){try{return await W(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(V(n))return{data:null,error:n};throw n}}}function r0(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const vn={debug:!!(globalThis&&fE()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};
191class mE extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class s0 extends mE{}async function ED(e,t,n){vn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{r.abort(),vn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){clearTimeout(s),vn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{vn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw vn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new s0(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(vn.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(s),await n()}})}catch(i){if(t>0&&clearTimeout(s),(i==null?void 0:i.name)==="AbortError"&&t>0){if(r.signal.aborted)return vn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async o=>{if(o){vn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await n()}finally{vn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw vn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new s0(`Lock "${e}" was released because another request stole it`)}throw i}}function _D(){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 gE(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function TD(e){return parseInt(e,16)}function kD(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function CD(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:c,scheme:u,uri:d,version:h}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(h!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${h}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 192`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const f=gE(e.address),w=u?`${u}://${r}`:r,m=e.statement?`${e.statement} 193`:"",b=`${w} wants you to sign in with your Ethereum account: 194${f} 195 196${m}`;let v=`URI: ${d} 197Version: ${h} 198Chain ID: ${n}${o?` 199Nonce: ${o}`:""} 200Issued At: ${i.toISOString()}`;if(s&&(v+=` 201Expiration Time: ${s.toISOString()}`),a&&(v+=` 202Not Before: ${a.toISOString()}`),l&&(v+=` 203Request ID: ${l}`),c){let g=` 204Resources:`;
204for(const y of c){if(!y||typeof y!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${y}`);g+=` 205- ${y}`}v+=g}return`${b} 206${v}`}class Ie extends Error{constructor({message:t,code:n,cause:r,name:s}){var i;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}}class mu extends Ie{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function PD({error:e,options:t}){var n,r,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ie({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Ie({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Ie({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Ie({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Ie({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Ie({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Ie({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Ie({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(vE(o)){if(i.rp.id!==o)return new Ie({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ie({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Ie({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Ie({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Ie({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function AD({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ie({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Ie({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(vE(r)){if(n.rpId!==r)return new Ie({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ie({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Ie({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ER
206ROR",cause:e})}return new Ie({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class RD{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const OD=new RD;function $D(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,s=Xu(e,["challenge","user","excludeCredentials"]),i=Vi(t).buffer,o=Object.assign(Object.assign({},n),{id:Vi(n.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(r&&r.length>0){a.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const c=r[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:Vi(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function jD(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=Xu(e,["challenge","allowCredentials"]),s=Vi(t).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const a=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:Vi(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function ND(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:Es(new Uint8Array(e.response.attestationObject)),clientDataJSON:Es(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function DD(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Es(new Uint8Array(s.authenticatorData)),clientDataJSON:Es(new Uint8Array(s.clientDataJSON)),signature:Es(new Uint8Array(s.signature)),userHandle:s.userHandle?Es(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function vE(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function i0(){var e,t;return!!(Ge()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function LD(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new mu("Browser returned unexpected credential type",t)}:{data:null,error:new mu("Empty credential response",t)}}catch(t){return{data:null,error:PD({error:t,options:e})}}}async function ID(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new mu("Browser returned unexpected credential type",t)}:{data:null,error:new mu("Empty credential response",t)}}catch(t){return{data:null,error:AD({error:t,options:e})}}}const MD={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},FD={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function gu(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(t(o)){const a=r[i];
206t(a)?r[i]=gu(a,o):r[i]=gu(o)}else r[i]=o}return r}function VD(e,t){return gu(MD,e,t||{})}function UD(e,t){return gu(FD,e,t||{})}class BD{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!a)return{data:null,error:l};const c=s??OD.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;if(!u.name){const d=r;if(d)u.name=`${u.id}:${d}`;else{const f=(await this.client.getUser()).data.user,w=((o=f==null?void 0:f.user_metadata)===null||o===void 0?void 0:o.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";u.name=`${u.id}:${w}`}}u.displayName||(u.displayName=u.name)}switch(a.webauthn.type){case"create":{const u=VD(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:h}=await LD({publicKey:u,signal:c});return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}case"request":{const u=UD(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:h}=await ID(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}}}catch(a){return V(a)?{data:null,error:a}:{data:null,error:new ws("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Ya("rpId is required for WebAuthn authentication")};try{if(!i0())return{data:null,error:new ws("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(o){return V(o)?{data:null,error:o}:{data:null,error:new ws("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Ya("rpId is required for WebAuthn registration")};try{if(!i0())return{data:null,error:new ws("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(u=>{var d;return(d=u.data)===null||d===void 0?void 0:d.all.find(h=>h.factor_type==="webauthn"&&h.friendly_name===t&&h.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(o){return V(o)?{data:null,error:o}:{data:null,error:new ws("Unexpected error in register",o)}}}}_D();const zD={url:VN,storageKey:UN,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:BN,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function o0(e,t,n){return await n()}const ii={};class Qa{get jwks(){var t,n;return(n=(t=ii[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){ii[this.storageKey]=Object.assign(Object.assign({},ii[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=ii[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){ii[this.storageKey]=Object.assign(Object.assign({},ii[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},zD),t);
206if(this.storageKey=i.storageKey,this.instanceID=(n=Qa.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Qa.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&Ge()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new SD({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=pE(i.fetch),this.lock=i.lock||o0,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&Ge()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=ED:this.lock=o0,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 BD(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.persistSession?(i.storage?this.storage=i.storage:fE()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=r0(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=r0(this.memoryStorage)),Ge()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${uE}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(Ge()&&(n=nD(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),Ge()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),qN(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return V(n)?this._returnResult({error:n}):this._returnResult({error:new ws("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const i=await W(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Xt}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(V(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var n,r,s;try{let i;if("email"in t){const{email:u,password:d,options:h}=t;let f=null,w=null;this.flowType==="pkce"&&([f,w]=await ri(this.storage,this.storageKey)),i=await W(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:u,password:d,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:f,code_challenge_method:w},xform:Xt})}else if("phone"in t){const{phone:u,password:d,options:h}=t;i=await W(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:d,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},channel:(s=h==null?void 0:h.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:Xt})}else throw new Zl("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await qe(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(await qe(this.storage,`${this.storageKey}-code-verifier`),V(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let n;if("email"in t){const{email:i,password:o,options:a}=t;n=await W(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:t0})}else if("phone"in t){const{phone:i,password:o,options:a}=t;n=await W(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:t0})}else throw new Zl("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const i=new ni;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(V(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,s,i,o,a,l,c,u,d,h;let f,w;if("message"in t)f=t.message,w=t.signature;else{const{chain:m,wallet:b,statement:v,options:g}=t;let y;if(Ge())if(typeof b=="object")y=b;else{const P=window;if("ethereum"in P&&typeof P.ethereum=="object"&&"request"in P.ethereum&&typeof P.ethereum.request=="function")y=P.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof b!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");y=b}const S=new URL((n=g==null?void 0:g.url)!==null&&n!==void 0?n:window.location.href),E=await y.request({method:"eth_requestAccounts"}).then(P=>P).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!E||E.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const _=gE(E[0]);let C=(r=g==null?void 0:g.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!C){const P=await y.request({method:"eth_chainId"});C=TD(P)}const k={domain:S.host,address:_,statement:v,uri:S.href,version:"1",chainId:C,nonce:(s=g==null?void 0:g.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=g==null?void 0:g.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=g==null?void 0:g.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=g==null?void 0:g.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=g==null?void 0:g.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=g==null?void 0:g.signInWithEthereum)===null||u===void 0?void 0:u.resources};f=CD(k),w=await y.request({method:"personal_sign",params:[kD(f),_]})}try{const{data:m,error:b}=await W(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:w},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Xt});if(b)throw b;if(!m||!m.session||!m.user){const v=new ni;return this._returnResult({data:{user:null,session:null},error:v})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:b})}catch(m){if(V(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(t){var n,r,s,i,o,a,l,c,u,d,h,f;let w,m;if("message"in t)w=t.message,m=t.signature;else{const{chain:b,wallet:v,statement:g,options:y}=t;let S;if(Ge())if(typeof v=="object")S=v;else{const _=window;if("solana"in _&&typeof _.solana=="object"&&("signIn"in _.solana&&typeof _.solana.signIn=="function"||"signMessage"in _.solana&&typeof _.solana.signMessage=="function"))S=_.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=v}const E=new URL((n=y==null?void 0:y.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const _=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},y==null?void 0:y.signInWithSolana),{version:"1",domain:E.host,uri:E.href}),g?{statement:g}:null));let C;if(Array.isArray(_)&&_[0]&&typeof _[0]=="object")C=_[0];else if(_&&typeof _=="object"&&"signedMessage"in _&&"signature"in _)C=_;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in C&&"signature"in C&&(typeof C.signedMessage=="string"||C.signedMessage instanceof Uint8Array)&&C.signature instanceof Uint8Array)w=typeof C.signedMessage=="string"?C.signedMessage:new TextDecoder().decode(C.signedMessage),m=C.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${E.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...g?["",g,""]:[""],"Version: 1",`URI: ${E.href}`,`Issued At: ${(s=(r=y==null?void 0:y.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=y==null?void 0:y.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${y.signInWithSolana.notBefore}`]:[],...!((o=y==null?void 0:y.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${y.signInWithSolana.expirationTime}`]:[],...!((a=y==null?void 0:y.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${y.signInWithSolana.chainId}`]:[],...!((l=y==null?void 0:y.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${y.signInWithSolana.nonce}`]:[],...!((c=y==null?void 0:y.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${y.signInWithSolana.requestId}`]:[],...!((d=(u=y==null?void 0:y.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||d===void 0)&&d.length?["Resources",...y.signInWithSolana.resources.map(C=>
206`- ${C}`)]:[]].join(` 207`);const _=await S.signMessage(new TextEncoder().encode(w),"utf8");if(!_||!(_ instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=_}}try{const{data:b,error:v}=await W(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:Es(m)},!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Xt});if(v)throw v;if(!b||!b.session||!b.user){const g=new ni;return this._returnResult({data:{user:null,session:null},error:g})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:v})}catch(b){if(V(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(t){const n=await ds(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new GN;const{data:i,error:o}=await W(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Xt});if(await qe(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new ni;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await qe(this.storage,`${this.storageKey}-code-verifier`),V(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=t,a=await W(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Xt}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new ni;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(n){if(V(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,i,o;try{if("email"in t){const{email:a,options:l}=t;let c=null,u=null;this.flowType==="pkce"&&([c,u]=await ri(this.storage,this.storageKey));const{error:d}=await W(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:a,options:l}=t,{data:c,error:u}=await W(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new Zl("You must provide either an email or phone number.")}catch(a){if(await qe(this.storage,`${this.storageKey}-code-verifier`),V(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var n,r;try{let s,i;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,i=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await W(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Xt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(V(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await ri(this.storage,this.storageKey));const c=await W(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:wD});return!((i=c.data)===null||i===void 0)&&i.url&&Ge()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await qe(this.storage,`${this.storageKey}-code-verifier`),V(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new Et;const{error:s}=await W(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(V(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:i}=t,{error:o}=await W(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:r,type:s,options:i}=t,{data:o,error:a}=await W(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new Zl("You must provide either an email or phone number and a type")}catch(n){if(V(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await ds(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
207id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<Zd:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await ds(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=th()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=mD(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await W(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:_r}):await this._useSession(async n=>{var r,s,i;const{data:o,error:a}=n;if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Et}:await W(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:_r})})}catch(n){if(V(n))return Xl(n)&&(await this._removeSession(),await qe(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new Et;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await ri(this.storage,this.storageKey));const{data:c,error:u}=await W(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:_r});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(r){if(await qe(this.storage,`${this.storageKey}-code-verifier`),V(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Et;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=tc(t.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if(V(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:a}=n;if(a)throw a;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new Et;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(V(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}
207async _getSessionFromURL(t,n){try{if(!Ge())throw new ec("No browser detected.");if(t.error||t.error_description||t.error_code)throw new ec(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Gy("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ec("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Gy("No code detected.");const{data:g,error:y}=await this._exchangeCodeForSession(t.code);if(y)throw y;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:g.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:c}=t;if(!i||!a||!o||!c)throw new ec("No session defined in URL");const u=Math.round(Date.now()/1e3),d=parseInt(a);let h=u+d;l&&(h=parseInt(l));const f=h-u;f*1e3<=hi&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${d}s`);const w=h-d;u-w>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",w,h,u):u-w<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",w,h,u);const{data:m,error:b}=await this._getUser(i);if(b)throw b;const v={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:d,expires_at:h,refresh_token:o,token_type:c,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:v,redirectType:t.type},error:null})}catch(r){if(V(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await ds(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i&&!Xl(i))return this._returnResult({error:i});const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(KN(a)&&(a.status===404||a.status===401||a.status===403)||Xl(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await qe(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=tD(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),Xl(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await ri(this.storage,this.storageKey,!0));try{return await W(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(await qe(this.storage,`${this.storageKey}-code-verifier`),V(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(V(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,a,l,c,u;const{data:d,error:h}=i;if(h)throw h;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await W(this.fetch,"GET",f,{headers:this.headers,jwt:(u=(c=d.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return Ge()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(V(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;
207if(s)throw s;const{options:o,provider:a,token:l,access_token:c,nonce:u}=t,d=await W(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:a,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Xt}),{data:h,error:f}=d;return f?this._returnResult({data:{user:null,session:null},error:f}):!h||!h.session||!h.user?this._returnResult({data:{user:null,session:null},error:new ni}):(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:f}))}catch(s){if(await qe(this.storage,`${this.storageKey}-code-verifier`),V(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await W(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(V(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await iD(async s=>(s>
2070&&await sD(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await W(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Xt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&eh(i)&&Date.now()+o-r<hi})}catch(r){if(this._debug(n,"error",r),V(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),Ge()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await ds(this.storage,this.storageKey);if(s&&this.userStorage){let o=await ds(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await fi(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:th()}else if(s&&!s.user&&!s.user){const o=await ds(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await qe(this.storage,this.storageKey+"-user"),await fi(this.storage,this.storageKey,s)):s.user=th()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Zd;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${Zd}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),eh(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new Et;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new td;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new Et;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),V(i)){const o={data:null,error:i};return eh(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,n)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await qe(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await fi(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=Zy(s);await fi(this.storage,this.storageKey,i)}else{const s=Zy(n);await fi(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await qe(this.storage,this.storageKey),await qe(this.storage,this.storageKey+"-code-verifier"),await qe(this.storage,this.storageKey+"-user"),this.userStorage&&await qe(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Ge()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
207catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),hi);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/hi);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${hi}ms, refresh threshold is ${rp} ticks`),s<=rp&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof mE)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ge()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,o]=await ri(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await W(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(V(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:c}=await W(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if(V(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?ND(t.webauthn.credential_response):DD(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await W(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(n){if(V(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=await W(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:$D(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:jD(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(V(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,s,i;if(t)try{const{payload:f}=tc(t);let w=null;f.aal&&(w=f.aal);let m=w;const{data:{user:b},error:v}=await this.getUser(t);if(v)return this._returnResult({data:null,error:v});((r=(n=b==null?void 0:b.factors)===null||n===void 0?void 0:n.filter(S=>S.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(m="aal2");const y=f.amr||[];return{data:{currentLevel:w,nextLevel:m,currentAuthenticationMethods:y},error:null}}catch(f){if(V(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:o},error:a}
207=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=tc(o.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(u="aal2");const h=l.amr||[];return{data:{currentLevel:c,nextLevel:u,currentAuthenticationMethods:h},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await W(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Et})})}catch(n){if(V(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Et});const o=await W(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Ge()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(V(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Et});const o=await W(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Ge()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(V(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await W(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Et})})}catch(t){if(V(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await W(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Et})})}catch(n){if(V(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(a=>a.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===t),r&&this.jwks_cached_at+WN>s)return r;const{data:i,error:o}=await W(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(a=>a.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:f,error:w}
207=await this.getSession();if(w||!f.session)return this._returnResult({data:null,error:w});r=f.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=tc(r);n!=null&&n.allowExpired||hD(i.exp);const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!c){const{error:f}=await this.getUser(r);if(f)throw f;return{data:{claims:i,header:s,signature:o},error:null}}const u=fD(s.alg),d=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,d,o,ZN(`${a}.${l}`)))throw new op("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(V(r))return this._returnResult({data:null,error:r});throw r}}}Qa.nextInstanceID={};const WD=Qa,HD="2.103.0";let Xo="";typeof Deno<"u"?Xo="deno":typeof document<"u"?Xo="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Xo="react-native":Xo="node";const KD={"X-Client-Info":`supabase-js-${Xo}/${HD}`},qD={headers:KD},GD={schema:"public"},YD={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},QD={};function Ja(e){"@babel/helpers - typeof";return Ja=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ja(e)}function JD(e,t){if(Ja(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ja(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XD(e){var t=JD(e,"string");return Ja(t)=="symbol"?t:t+""}function ZD(e,t,n){return(t=XD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a0(Object(n),!0).forEach(function(r){ZD(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const eL=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),tL=()=>Headers,nL=(e,t,n)=>{const r=eL(n),s=tL();return async(i,o)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let c=new s(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),r(i,Re(Re({},o),{},{headers:c}))}};function rL(e){return e.endsWith("/")?e:e+"/"}function sL(e,t){var n,r;const{db:s,auth:i,realtime:o,global:a}=e,{db:l,auth:c,realtime:u,global:d}=t,h={db:Re(Re({},l),s),auth:Re(Re({},c),i),realtime:Re(Re({},u),o),storage:{},global:Re(Re(Re({},d),a),{},{headers:Re(Re({},(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?h.accessToken=e.accessToken:delete h.accessToken,h}function iL(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(rL(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var oL=class extends WD{constructor(e){super(e)}},aL=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const i=iL(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:GD,realtime:QD,auth:Re(Re({},YD),{},{storageKey:o}),global:qD},l=sL(n??{},a);if(this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(u,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=nL(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Re({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new Pj(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new FN(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new yj(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
207channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:c},u,d){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new oL({url:this.authUrl.href,headers:Re(Re({},h),u),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(f=>f.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new lN(this.realtimeUrl.href,Re(Re({},e),{},{params:Re(Re({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const lL=(e,t,n)=>new aL(e,t,n);function cL(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}cL()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function uL(){var b,v;if(typeof window>"u")return;const e=location.hostname,n=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(g=>e===g||e.endsWith("."+g)),r="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=n?((b=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+r+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:b[1])??((v=e.match(new RegExp("^("+r+")(?=[.-])","i")))==null?void 0:v[1]):void 0,i=window.parent&&window.parent!==window;if(!s||!i)return localStorage;const o=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),a=o?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),c=l&&a.test(l)?[l]:o?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],u="lovable-preview-auth:result",d=2e3,h=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),f=(g,y,S)=>new Promise(E=>{const _=h();let C=!1,k;const P=N=>{C||(C=!0,clearTimeout(k),window.removeEventListener("message",R),E(N))},R=N=>{if(c.indexOf(N.origin)<0)return;const Q=N.data;Q&&Q.type===u&&Q.requestId===_&&P(Q)};window.addEventListener("message",R);const I={type:g,requestId:_,projectId:s,key:y};S!==void 0&&(I.value=S);for(const N of c)window.parent.postMessage(I,N);k=setTimeout(()=>P(null),d)});let w=!0;const m=250;return{getItem:async g=>{let y=await f("lovable-preview-auth:get",g);return!y&&w&&(await new Promise(S=>setTimeout(S,m)),y=await f("lovable-preview-auth:get",g)),w=!1,y&&y.ok&&typeof y.value=="string"?y.value===""?(localStorage.removeItem(g),null):y.value:localStorage.getItem(g)},setItem:(g,y)=>(localStorage.setItem(g,y),f("lovable-preview-auth:set",g,y).then(S=>{S&&S.ok&&typeof S.value=="string"&&localStorage.getItem(g)===y&&(S.value===""?localStorage.removeItem(g):localStorage.setItem(g,S.value))})),removeItem:g=>(localStorage.removeItem(g),f("lovable-preview-auth:remove",g).then(()=>{}))}}const dL="https://xavuuhdcjlfvojdjuvoh.supabase.co",hL="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InhhdnV1aGRjamxmdm9qZGp1dm9oIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzMwMDgyMDEsImV4cCI6MjA4ODU4NDIwMX0.MWDdoI21f4wqtlxfDr9MDzo7BrfduausYFqJDHjt0fU",Ct=lL(dL,hL,{auth:{storage:uL(),persistSession:!0,autoRefreshToken:!0}}),yE=p.createContext({session:null,user:null,loading:!0,signOut:async()=>{}}),Ym=()=>p.useContext(yE);function fL({children:e}){const[t,n]=p.useState(null),[r,s]=p.useState(!0);p.useEffect(()=>{const{data:{subscription:o}}=Ct.auth.onAuthStateChange((a,l)=>{n(l),s(!1)});return Ct.auth.getSession().then(({data:{session:a}})=>{n(a),s(!1)}),()=>o.unsubscribe()},[]);const i=async()=>{await Ct.auth.signOut()};return x.jsx(yE.Provider,{value:{session:t,user:(t==null?void 0:t.user)??null,loading:r,signOut:i},children:e})}function l0(e,t){if(typeof e=="function")return e(t);
207e!=null&&(e.current=t)}function pL(...e){return t=>{let n=!1;const r=e.map(s=>{const i=l0(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():l0(e[s],null)}}}}var wE=p.forwardRef((e,t)=>{const{children:n,...r}=e,s=p.Children.toArray(n),i=s.find(gL);if(i){const o=i.props.children,a=s.map(l=>l===i?p.Children.count(o)>1?p.Children.only(null):p.isValidElement(o)?o.props.children:null:l);return x.jsx(ap,{...r,ref:t,children:p.isValidElement(o)?p.cloneElement(o,void 0,a):null})}return x.jsx(ap,{...r,ref:t,children:n})});wE.displayName="Slot";var ap=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const s=yL(n);return p.cloneElement(n,{...vL(r,n.props),ref:t?pL(t,s):s})}return p.Children.count(n)>1?p.Children.only(null):null});ap.displayName="SlotClone";var mL=({children:e})=>x.jsx(x.Fragment,{children:e});function gL(e){return p.isValidElement(e)&&e.type===mL}function vL(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{i(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function yL(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const wL=GS("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ws=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?wE:"button";return x.jsx(o,{className:fn(wL({variant:t,size:n,className:e})),ref:i,...s})});Ws.displayName="Button";const Cc={necessary:!0,statistics:!1,marketing:!1,external_media:!1},c0="factory_cookie_consent",bL="factory_cookie_consent_ts",bE=p.createContext({consent:Cc,hasConsented:!1,updateConsent:()=>{},openSettings:()=>{}}),xL=()=>p.useContext(bE);function SL({children:e}){const[t,n]=p.useState(Cc),[r,s]=p.useState(!0),[i,o]=p.useState(!1),[a,l]=p.useState(!1);p.useEffect(()=>{const f=localStorage.getItem(c0);if(f)try{n({...Cc,...JSON.parse(f),necessary:!0}),s(!0)}catch{s(!1),o(!0)}else s(!1),o(!0)},[]);const c=p.useCallback(f=>{const w={...f,necessary:!0};n(w),s(!0),o(!1),l(!1),localStorage.setItem(c0,JSON.stringify(w)),localStorage.setItem(bL,new Date().toISOString())},[]),u=()=>c({necessary:!0,statistics:!0,marketing:!0,external_media:!0}),d=()=>c(Cc),h=p.useCallback(()=>{o(!0),l(!0)},[]);return x.jsxs(bE.Provider,{value:{consent:t,hasConsented:r,updateConsent:c,openSettings:h},children:[e,i&&x.jsx("div",{role:"dialog","aria-label":"Cookie-Einstellungen","aria-modal":"true",className:"fixed inset-0 z-[9999] flex items-end sm:items-center justify-center bg-foreground
207/40 backdrop-blur-sm p-4",children:x.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-2xl max-w-lg w-full p-6 md:p-8 max-h-[90vh] overflow-y-auto",children:[x.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[x.jsx(XS,{className:"w-6 h-6 text-warm-accent shrink-0","aria-hidden":"true"}),x.jsx("h2",{className:"font-display text-lg font-semibold text-foreground",children:"Datenschutzeinstellungen"})]}),x.jsxs("p",{className:"text-muted-foreground text-sm font-body leading-relaxed mb-4",children:["Wir verwenden Cookies und ähnliche Technologien, um Ihnen die bestmögliche Nutzung unserer Website zu ermöglichen. Sie können Ihre Einstellungen jederzeit anpassen."," ",x.jsx(_e,{to:"/datenschutz",className:"text-primary underline hover:text-warm-accent",children:"Datenschutzerklärung"})," · ",x.jsx(_e,{to:"/cookie-richtlinie",className:"text-primary underline hover:text-warm-accent",children:"Cookie-Richtlinie"})]}),a?x.jsx(EL,{consent:t,onSave:c}):x.jsxs("button",{onClick:()=>l(!0),className:"text-sm text-primary underline hover:text-warm-accent mb-4 block",children:[x.jsx(JS,{className:"w-3.5 h-3.5 inline mr-1","aria-hidden":"true"}),"Individuelle Einstellungen"]}),!a&&x.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 mt-2",children:[x.jsxs(Ws,{onClick:u,className:"flex-1 gap-2",children:[x.jsx(QS,{className:"w-4 h-4","aria-hidden":"true"})," Alle akzeptieren"]}),x.jsxs(Ws,{onClick:d,variant:"outline",className:"flex-1 gap-2",children:[x.jsx(Pm,{className:"w-4 h-4","aria-hidden":"true"})," Nur notwendige"]})]})]})})]})}function EL({consent:e,onSave:t}){const[n,r]=p.useState(e),s=[{key:"necessary",label:"Technisch notwendig",desc:"Erforderlich für die Grundfunktionen der Website (z. B. Sitzungsverwaltung, Sicherheit).",disabled:!0},{key:"statistics",label:"Statistik",desc:"Helfen uns zu verstehen, wie Besucher die Website nutzen (z. B. Seitenaufrufe, Verweildauer)."},{key:"marketing",label:"Marketing",desc:"Werden verwendet, um Besuchern relevante Werbung und Kampagnen anzuzeigen."},{key:"external_media",label:"Externe Medien",desc:"Erlaubt das Laden externer Inhalte wie Google Maps, YouTube-Videos und Social-Media-Feeds."}];return x.jsxs("div",{className:"space-y-3 mb-4",children:[s.map(i=>x.jsxs("label",{className:`flex items-start gap-3 p-3 rounded-lg border transition-colors cursor-pointer ${n[i.key]?"border-primary bg-primary/5":"border-border"} ${i.disabled?"opacity-80 cursor-not-allowed":""}`,children:[x.jsx("input",{type:"checkbox",checked:n[i.key],disabled:i.disabled,onChange:()=>r(o=>({...o,[i.key]:!o[i.key]})),className:"mt-1 accent-primary w-4 h-4","aria-label":i.label}),x.jsxs("div",{children:[x.jsx("span",{className:"font-display text-sm font-medium text-foreground",children:i.label}),i.disabled&&x.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:"(immer aktiv)"}),x.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i.desc})]})]},i.key)),x.jsxs("div",{className:"flex gap-3 pt-2",children:[x.jsxs(Ws,{onClick:()=>t(n),className:"flex-1 gap-2",children:[x.jsx(QS,{className:"w-4 h-4","aria-hidden":"true"})," Auswahl speichern"]}),x.jsx(Ws,{onClick:()=>t({necessary:!0,statistics:!0,marketing:!0,external_media:!0}),variant:"outline",className:"flex-1",children:"Alle akzeptieren"})]})]})}const u0=crypto.randomUUID(),d0=document.referrer||"",_L=window.location.search;function TL(){const e=new URLSearchParams(_L),t=e.get("utm_source"),n=e.get("utm_medium")||"",r=e.get("utm_campaign")||"";if(t)return{source:t,medium:n,campaign:r};if(!d0)return{source:"direct",medium:"none",campaign:""};try{const s=new URL(d0).hostname.toLowerCase();return s.includes("google")?{source:"Google",medium:"organic",campaign:""}:s.includes("bing")?{source:"Bing",medium:"organic",campaign:""}:s.includes("facebook")||s.includes("fb.com")||s.includes("fbcdn")?{source:"Facebook",medium:"social",campaign:""}:s.includes("instagram")?{source:"Instagram",medium:"social",campaign:""}:s.includes("tiktok")?{source:"TikTok",medium:"social",campaign:""}:s.includes("twitter")||s.includes("t.co")||s.includes("x.com")?{source:"X / Twitter",medium:"social",campaign:""}:s.includes("youtube")?{source:"YouTube",medium:"social",campaign:""}:s.includes("linkedin")?{source:"LinkedIn",medium:"social",campaign:""}:s.includes("pinterest")?{source:"Pinterest",medium:"social",campaign:""}:s.includes("snapchat")?{source:"Snapchat",medium:"social",campaign:""}:{source:s,medium:"referral",campaign:""}}catch{return{source:"direct",medium:"none",campaign:""}}}const Fn=TL();let zo=null;function kL(){const e=ss(),t=p.useRef(null);p.useEffect(()=>{if(!e.pathname.startsWith("/admin")){if(t.current!==e.pathname){t.current=e.pathname;const n=()=>{Ct.from("page_views").insert({session_id:u0,page:e.pathname,source:Fn.source,medium:Fn.medium,campaign:Fn.campaign}).then()};"requestIdleCallback"in window?window.requestIdleCallback(n):setTimeout(n,100)}zo?zo.track({page:e.pathname,entered_at:new Date().toISOString(),source:Fn.source,medium:Fn.medium,campaign:Fn.campaign}):(zo=Ct.channel("site-visitors",{config:{presence:{key:u0}}}),zo.subscribe(async n=>{n==="SUBSCRIBED"&&await zo.track({page:e.pathname,entered_at:new Date().toISOString(),source:Fn.source,medium:Fn.medium,campaign:Fn.campaign})}))}},[e.pathname])}
vendor: 17,890 bytes, lines 207-215
207const lp="/assets/factory-logo-BJOYmvKV.png",Qm=p.createContext({});function _o(e){const t=p.useRef(null);return t.current===null&&(t.current=e()),t.current}const nd=p.createContext(null),rd=p.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class CL extends p.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function PL({children:e,isPresent:t}){const n=p.useId(),r=p.useRef(null),s=p.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=p.useContext(rd);return p.useInsertionEffect(()=>{const{width:o,height:a,top:l,left:c}=s.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return i&&(u.nonce=i),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` 208 [data-motion-pop-id="${n}"] { 209 position: absolute !important; 210 width: ${o}px !important; 211 height: ${a}px !important; 212 top: ${l}px !important; 213 left: ${c}px !important; 214 } 215 `),()=>{document.head.removeChild(u)}},[t]),x.jsx(CL,{isPresent:t,childRef:r,sizeRef:s,children:p.cloneElement(e,{ref:r})})}const AL=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=_o(RL),l=p.useId(),c=p.useCallback(d=>{a.set(d,!0);for(const h of a.values())if(!h)return;r&&r()},[a,r]),u=p.useMemo(()=>({id:l,initial:t,isPresent:n,custom:s,onExitComplete:c,register:d=>(a.set(d,!1),()=>a.delete(d))}),i?[Math.random(),c]:[n,c]);return p.useMemo(()=>{a.forEach((d,h)=>a.set(h,!1))},[n]),p.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),o==="popLayout"&&(e=x.jsx(PL,{isPresent:n,children:e})),x.jsx(nd.Provider,{value:u,children:e})};function RL(){return new Map}function xE(e=!0){const t=p.useContext(nd);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=p.useId();p.useEffect(()=>{e&&s(i)},[e]);const o=p.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const nc=e=>e.key||"";function h0(e){const t=[];return p.Children.forEach(e,n=>{p.isValidElement(n)&&t.push(n)}),t}const Jm=typeof window<"u",sd=Jm?p.useLayoutEffect:p.useEffect,OL=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1})=>{const[a,l]=xE(o),c=p.useMemo(()=>h0(e),[e]),u=o&&!a?[]:c.map(nc),d=p.useRef(!0),h=p.useRef(c),f=_o(()=>new Map),[w,m]=p.useState(c),[b,v]=p.useState(c);sd(()=>{d.current=!1,h.current=c;for(let S=0;S<b.length;S++){const E=nc(b[S]);u.includes(E)?f.delete(E):f.get(E)!==!0&&f.set(E,!1)}},[b,u.length,u.join("-")]);const g=[];if(c!==w){let S=[...c];for(let E=0;E<b.length;E++){const _=b[E],C=nc(_);u.includes(C)||(S.splice(E,0,_),g.push(_))}i==="wait"&&g.length&&(S=g),v(h0(S)),m(c);return}const{forceRender:y}=p.useContext(Qm);return x.jsx(x.Fragment,{children:b.map(S=>{const E=nc(S),_=o&&!a?!1:c===b||u.includes(E),C=()=>{if(f.has(E))f.set(E,!0);else return;let k=!0;f.forEach(P=>{P||(k=!1)}),k&&(y==null||y(),v(h.current),o&&(l==null||l()),r&&r())};return x.jsx(AL,{isPresent:_,initial:!d.current||n?void 0:!1,custom:_?void 0:t,presenceAffectsLayout:s,mode:i,onExitComplete:_?void 0:C,children:S},E)})})},ut=e=>e;let $L=ut,cp=ut;function Xm(e){let t;return()=>(t===void 0&&(t=e()),t)}const Hs=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Yn=e=>e*1e3,Qn=e=>e/1e3,jL={skipAnimations:!1,useManualTiming:!1};function NL(e){let t=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(c){i.has(c)&&(l.schedule(c),e()),c(o)}const l={schedule:(c,u=!1,d=!1)=>{const f=d&&r?t:n;return u&&i.add(c),f.has(c)||f.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(o=c,r){s=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,s&&(s=!1,l.process(c))}};return l}const rc=["read","resolveKeyframes","update","preRender","render","postRender"],DL=40;function SE(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=rc.reduce((v,g)=>(v[g]=NL(i),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=o,f=()=>{const v=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(v-s.timestamp,DL),1),s.timestamp=v,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),h.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(f))},w=()=>{n=!0,r=!0,s.isProcessing||e(f)};return{schedule:rc.reduce((v,g)=>{const y=o[g];return v[g]=(S,E=!1,_=!1)=>(n||w(),y.schedule(S,E,_)),v},{}),cancel:v=>{for(let g=0;g<rc.length;g++)o[rc[g]].cancel(v)},state:s,steps:o}}const{schedule:le,cancel:hn,state:We,steps:rh}=SE(typeof requestAnimationFrame<"u"?requestAnimationFrame:ut,!0),EE=p.createContext({strict:!1}),f0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},co={};for(const e in f0)co[e]={isEnabled:t=>f0[e].some(n=>!!t[n])};function LL(e){for(const t in e)co[t]={...co[t],...e[t]}}const IL=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function vu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||IL.has(e)}let _E=e=>!vu(e);function ML(e){e&&(_E=t=>t.startsWith("on")?!vu(t):e(t))}try{ML(require("@emotion/is-prop-valid").default)}catch{}function FL(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(_E(s)||n===!0&&vu(s)||!t&&!vu(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function VL(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const id=p.createContext({});function Xa(e){return typeof e=="string"||Array.isArray(e)}function od(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Zm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],eg=["initial",...Zm];function ad(e){return od(e.animate)||eg.some(t=>Xa(e[t]))}function TE(e){return!!(ad(e)||e.variants)}function UL(e,t){if(ad(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Xa(n)?n:void 0,animate:Xa(r)?r:void 0}}return e.inherit!==!1?t:{}}function BL(e){const{initial:t,animate:n}=UL(e,p.useContext(id));return p.useMemo(()=>({initial:t,animate:n}),[p0(t),p0(n)])}function p0(e){return Array.isArray(e)?e.join(" "):e}const zL=Symbol.for("motionComponentSymbol");function Ci(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function WL(e,t,n){return p.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Ci(n)&&(n.current=r))},[t])}const tg=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),HL="framerAppearId",kE="data-"+tg(HL),{schedule:ng,cancel:I8}=SE(queueMicrotask,!1),CE=p.createContext({});function KL(e,t,n,r,s){var i,o;const{visualElement:a}=p.useContext(id),l=p.useContext(EE),c=p.useContext(nd),u=p.useContext(rd).reducedMotion,d=p.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const h=d.current,f=p.useContext(CE);h&&!h.projection&&s&&(h.type==="html"||h.type==="svg")&&qL(d.current,n,s,f);const w=p.useRef(!1);p.useInsertionEffect(()=>{h&&w.current&&h.update(n,c)});const m=n[kE],b=p.useRef(!!m&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,m))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,m)));return sd(()=>{h&&(w.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),ng.render(h.render),b.current&&h.animationState&&h.animationState.animateChanges())}),p.useEffect(()=>{h&&(!b.current&&h.animationState&&h.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,m)}),b.current=!1))}),h}function qL(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:PE(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Ci(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function PE(e){if(e)return e.options.allowProjection!==!1?e.projection:PE(e.parent)}function GL({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var i,o;e&&LL(e);function a(c,u){let d;const h={...p.useContext(rd),...c,layoutId:YL(c)},{isStatic:f}=h,w=BL(c),m=r(c,f);if(!f&&Jm){QL();const b=JL(h);d=b.MeasureLayout,w.visualElement=KL(s,m,h,t,b.ProjectionNode)}return x.jsxs(id.Provider,{value:w,children:[d&&w.visualElement?x.jsx(d,{visualElement:w.visualElement,...h}):null,n(s,c,WL(m,w.visualElement,u),m,f,w.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${(o=(i=s.displayName)!==null&&i!==void 0?i:s.name)!==null&&o!==void 0?o:""})`}`;const l=p.forwardRef(a);return l[zL]=s,l}function YL({layoutId:e}){const t=p.useContext(Qm).id;return t&&e!==void 0?t+"-"+e:e}function QL(e,t){p.useContext(EE).strict}function JL(e){const{drag:t,layout:n}=co;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const XL=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function rg(e){return typeof e!="string"||e.includes("-")?!1:!!(XL.indexOf(e)>-1||/[A-Z]/u.test(e))}function m0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function sg(e,t,n,r){if(typeof t=="function"){const[s,i]=m0(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=m0(r);t=t(n!==void 0?n:e.custom,s,i)}return t}const up=e=>Array.isArray(e),ZL=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),eI=e=>up(e)?e[e.length-1]||0:e,st=e=>!!(e&&e.getVelocity);function Pc(e){const t=st(e)?e.get():e;return ZL(t)?t.toValue():t}function tI({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,i){const o={latestValues:nI(r,s,i,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const AE=e=>(t,n)=>{const r=p.useContext(id),s=p.useContext(nd),i=()=>tI(e,t,r,s);return n?i():_o(i)};function nI(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=Pc(i[h]);let{initial:o,animate:a}=e;const l=ad(e),c=TE(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!od(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const w=sg(e,h[f]);if(w){const{transitionEnd:m,transition:b,...v}=w;for(const g in v){let y=v[g];if(Array.isArray(y)){const S=u?y.length-1:0;y=y[S]}y!==null&&(s[g]=y)}for(const g in m)s[g]=m[g]}}}return s}const To=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Gs=new Set(To),RE=e=>t=>typeof t=="string"&&t.startsWith(e),OE=RE("--"),rI=RE("var(--"),ig=e=>rI(e)?sI.test(e.split("/*")[0].trim()):!1,sI=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,$E=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ln=(e,t,n)=>n>t?t:n<e?e:n,ko={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Za={...ko,transform:e=>Ln(0,1,e)},sc={...ko,default:1},vl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),gr=vl("deg"),jn=vl("%"),G=vl("px"),iI=vl("vh"),oI=vl("vw"),g0={...jn,parse:e=>jn.parse(e)/100,transform:e=>jn.transform(e*100)},aI={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,radius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,top:G,right:G,bottom:G,left:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,backgroundPositionX:G,backgroundPositionY:G},lI={rotate:gr,rotateX:gr,rotateY:gr,rotateZ:gr,scale:sc,scaleX:sc,scaleY:sc,scaleZ:sc,skew:gr,skewX:gr,skewY:gr,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:Za,originX:g0,originY:g0,originZ:G},v0={...ko,transform:Math.round},og={...aI,...lI,zIndex:v0,size:G,fillOpacity:Za,strokeOpacity:Za,numOctaves:v0},cI={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},uI=To.length;function dI(e,t,n){let r="",s=!0;for(let i=0;i<uI;i++){const o=To[i],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=$E(a,og[o]);if(!l){s=!1;const u=cI[o]||o;r+=`${u}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function ag(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(Gs.has(l)){o=!0;continue}else if(OE(l)){s[l]=c;continue}else{const u=$E(c,og[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(o||n?r.transform=dI(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}const hI={offset:"stroke-dashoffset",array:"stroke-dasharray"},fI={offset:"strokeDashoffset",array:"strokeDasharray"};function pI(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?hI:fI;e[i.offset]=G.transform(-r);const o=G.transform(t),a=G.transform(n);e[i.array]=`${o} ${a}`}function y0(e,t,n){return typeof e=="string"?e:G.transform(t+n*e)}function mI(e,t,n){const r=y0(t,e.x,e.width),s=y0(n,e.y,e.height);return`${r} ${s}`}function lg(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(ag(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f,dimensions:w}=e;h.transform&&(w&&(f.transform=h.transform),delete h.transform),w&&(s!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=mI(w,s!==void 0?s:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&pI(h,o,a,l,!1)}const cg=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),jE=()=>({...cg(),attrs:{}}),ug=e=>typeof e=="string"&&e.toLowerCase()==="svg";function NE(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const DE=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function LE(e,t,n,r){NE(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(DE.has(s)?s:tg(s),t.attrs[s])}const yu={};function gI(e){Object.assign(yu,e)}function IE(e,{layout:t,layoutId:n}){return Gs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!yu[e]||e==="opacity")}function dg(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(st(s[o])||t.style&&st(t.style[o])||IE(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}function ME(e,t,n){const r=dg(e,t,n);for(const s in e)if(st(e[s])||st(t[s])){const i=To.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}function vI(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const w0=["x","y","width","height","cx","cy","r"],yI={useVisualState:AE({scrapeMotionValuesFromProps:ME,createRenderState:jE,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let i=!!e.drag;if(!i){for(const a in s)if(Gs.has(a)){i=!0;break}}if(!i)return;let o=!t;if(t)for(let a=0;a<w0.length;a++){const l=w0[a];e[l]!==t[l]&&(o=!0)}o&&le.read(()=>{vI(n,r),le.render(()=>{lg(r,s,ug(n.tagName),e.transformTemplate),LE(n,r)})})}})},wI={useVisualState:AE({scrapeMotionValuesFromProps:dg,createRenderState:cg})};function FE(e,t,n){for(const r in t)!st(t[r])&&!IE(r,n)&&(e[r]=t[r])}function bI({transformTemplate:e},t){return p.useMemo(()=>{const n=cg();return ag(n,t,e),Object.assign({},n.vars,n.style)},[t])}function xI(e,t){const n=e.style||{},r={};return FE(r,n,e),Object.assign(r,bI(e,t)),r}function SI(e,t){const n={},r=xI(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}
215`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function EI(e,t,n,r){const s=p.useMemo(()=>{const i=jE();return lg(i,t,ug(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};FE(i,e.style,e),s.style={...i,...s.style}}return s}function _I(e=!1){return(n,r,s,{latestValues:i},o)=>{const l=(rg(n)?EI:SI)(r,i,o,n),c=FL(r,typeof n=="string",e),u=n!==p.Fragment?{...c,...l,ref:s}:{},{children:d}=r,h=p.useMemo(()=>st(d)?d.get():d,[d]);return p.createElement(n,{...u,children:h})}}function TI(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...rg(r)?yI:wI,preloadedFeatures:e,useRender:_I(s),createVisualElement:t,Component:r};return GL(o)}}function VE(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function ld(e,t,n){const r=e.getProps();return sg(r,t,n!==void 0?n:r.custom,e)}const UE=Xm(()=>window.ScrollTimeline!==void 0);class kI{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(s=>{if(UE()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class CI extends kI{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function hg(e,t){return e?e[t]||e.default||e:void 0}const dp=2e4;function BE(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<dp;)t+=n,r=e.next(t);return t>=dp?1/0:t}function fg(e){return typeof e=="function"}function b0(e,t){e.timeline=t,e.onfinish=null}const pg=e=>Array.isArray(e)&&typeof e[0]=="number",PI={linearEasing:void 0};function AI(e,t){const n=Xm(e);return()=>{var r;return(r=PI[t])!==null&&r!==void 0?r:n()}}const wu=AI(()=>{try{document.createElement("div").animate({opacity:0}
vendor: 21,704 bytes, line 215
215,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),zE=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=e(Hs(0,s-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function WE(e){return!!(typeof e=="function"&&wu()||!e||typeof e=="string"&&(e in hp||wu())||pg(e)||Array.isArray(e)&&e.every(WE))}const Zo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,hp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Zo([0,.65,.55,1]),circOut:Zo([.55,0,1,.45]),backIn:Zo([.31,.01,.66,-.59]),backOut:Zo([.33,1.53,.69,.99])};function HE(e,t){if(e)return typeof e=="function"&&wu()?zE(e,t):pg(e)?Zo(e):Array.isArray(e)?e.map(n=>HE(n,t)||hp.easeOut):hp[e]}const Zt={x:!1,y:!1};function KE(){return Zt.x||Zt.y}function qE(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let s=document;const i=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function GE(e,t){const n=qE(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function x0(e){return t=>{t.pointerType==="touch"||KE()||e(t)}}function RI(e,t,n={}){const[r,s,i]=GE(e,n),o=x0(a=>{const{target:l}=a,c=t(a);if(typeof c!="function"||!l)return;const u=x0(d=>{c(d),l.removeEventListener("pointerleave",u)});l.addEventListener("pointerleave",u,s)});return r.forEach(a=>{a.addEventListener("pointerenter",o,s)}),i}const YE=(e,t)=>t?e===t?!0:YE(e,t.parentElement):!1,mg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,OI=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function $I(e){return OI.has(e.tagName)||e.tabIndex!==-1}const ea=new WeakSet;function S0(e){return t=>{t.key==="Enter"&&e(t)}}function sh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const jI=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=S0(()=>{if(ea.has(n))return;sh(n,"down");const s=S0(()=>{sh(n,"up")}),i=()=>sh(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function E0(e){return mg(e)&&!KE()}function NI(e,t,n={}){const[r,s,i]=GE(e,n),o=a=>{const l=a.currentTarget;if(!E0(a)||ea.has(l))return;ea.add(l);const c=t(a),u=(f,w)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),!(!E0(f)||!ea.has(l))&&(ea.delete(l),typeof c=="function"&&c(f,{success:w}))},d=f=>{u(f,n.useGlobalTarget||YE(l,f.target))},h=f=>{u(f,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",h,s)};return r.forEach(a=>{!$I(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),a.addEventListener("focus",c=>jI(c,s),s)}),i}function DI(e){return e==="x"||e==="y"?Zt[e]?null:(Zt[e]=!0,()=>{Zt[e]=!1}):Zt.x||Zt.y?null:(Zt.x=Zt.y=!0,()=>{Zt.x=Zt.y=!1})}const QE=new Set(["width","height","top","left","right","bottom",...To]);let Ac;function LI(){Ac=void 0}const Nn={now:()=>(Ac===void 0&&Nn.set(We.isProcessing||jL.useManualTiming?We.timestamp:performance.now()),Ac),set:e=>{Ac=e,queueMicrotask(LI)}};function gg(e,t){e.indexOf(t)===-1&&e.push(t)}function vg(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class yg{constructor(){this.subscriptions=[]}add(t){return gg(this.subscriptions,t),()=>vg(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function wg(e,t){return t?e*(1e3/t):0}const _0=30,II=e=>!isNaN(parseFloat(e)),ma={current:void 0};class MI{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const i=Nn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Nn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=II(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new yg);const r=this.events[t].add(n);return t==="change"?()=>{r(),le.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return ma.current&&ma.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Nn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>_0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,_0);return wg(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function An(e,t){return new MI(e,t)}function FI(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,An(n))}function VI(e,t){const n=ld(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=eI(i[o]);FI(e,o,a)}}function UI(e){return!!(st(e)&&e.add)}function fp(e,t){const n=e.getValue("willChange");if(UI(n))return n.add(t)}function JE(e){return e.props[kE]}const XE=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,BI=1e-7,zI=12;function WI(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=XE(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>BI&&++a<zI);return o}function yl(e,t,n,r){if(e===t&&n===r)return ut;const s=i=>WI(i,0,1,e,n);return i=>i===0||i===1?i:XE(s(i),t,r)}const ZE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,e_=e=>t=>1-e(1-t),t_=yl(.33,1.53,.69,.99),bg=e_(t_),n_=ZE(bg),r_=e=>(e*=2)<1?.5*bg(e):.5*(2-Math.pow(2,-10*(e-1))),xg=e=>1-Math.sin(Math.acos(e)),s_=e_(xg),i_=ZE(xg),o_=e=>/^0[^.\s]+$/u.test(e);function HI(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||o_(e):!0}const ga=e=>Math.round(e*1e5)/1e5,Sg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function KI(e){return e==null}const qI=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Eg=(e,t)=>n=>!!(typeof n=="string"&&qI.test(n)&&n.startsWith(e)||t&&!KI(n)&&Object.prototype.hasOwnProperty.call(n,t)),a_=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Sg);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},GI=e=>Ln(0,255,e),ih={...ko,transform:e=>Math.round(GI(e))},_s={test:Eg("rgb","red"),parse:a_("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ih.transform(e)+", "+ih.transform(t)+", "+ih.transform(n)+", "+ga(Za.transform(r))+")"};function YI(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const pp={test:Eg("#"),parse:YI,transform:_s.transform},Pi={test:Eg("hsl","hue"),parse:a_("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jn.transform(ga(t))+", "+jn.transform(ga(n))+", "+ga(Za.transform(r))+")"},nt={test:e=>_s.test(e)||pp.test(e)||Pi.test(e),parse:e=>_s.test(e)?_s.parse(e):Pi.test(e)?Pi.parse(e):pp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?_s.transform(e):Pi.transform(e)},QI=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function JI(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Sg))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(QI))===null||n===void 0?void 0:n.length)||0)>0}const l_="number",c_="color",XI="var",ZI="var(",T0="${}",eM=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function el(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(eM,l=>(nt.test(l)?(r.color.push(i),s.push(c_),n.push(nt.parse(l))):l.startsWith(ZI)?(r.var.push(i),s.push(XI),n.push(l)):(r.number.push(i),s.push(l_),n.push(parseFloat(l))),++i,T0)).split(T0);return{values:n,split:a,indexes:r,types:s}}function u_(e){return el(e).values}function d_(e){const{split:t,types:n}=el(e),r=t.length;return s=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],s[o]!==void 0){const a=n[o];a===l_?i+=ga(s[o]):a===c_?i+=nt.transform(s[o]):i+=s[o]}return i}}const tM=e=>typeof e=="number"?0:e;function nM(e){const t=u_(e);return d_(e)(t.map(tM))}const Xr={test:JI,parse:u_,createTransformer:d_,getAnimatableNone:nM},rM=new Set(["brightness","contrast","saturate","opacity"]);function sM(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Sg)||[];if(!r)return e;const s=n.replace(r,"");let i=rM.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const iM=/\b([a-z-]*)\(.*?\)/gu,mp={...Xr,getAnimatableNone:e=>{const t=e.match(iM);return t?t.map(sM).join(" "):e}},oM={...og,color:nt,backgroundColor:nt,outlineColor:nt,fill:nt,stroke:nt,borderColor:nt,borderTopColor:nt,borderRightColor:nt,borderBottomColor:nt,borderLeftColor:nt,filter:mp,WebkitFilter:mp},_g=e=>oM[e];function h_(e,t){let n=_g(e);return n!==mp&&(n=Xr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const aM=new Set(["auto","none","0"]);function lM(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!aM.has(i)&&el(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=h_(n,s)}const k0=e=>e===ko||e===G,C0=(e,t)=>parseFloat(e.split(", ")[t]),P0=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/u);if(s)return C0(s[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?C0(i[1],e):0}},cM=new Set(["x","y","z"]),uM=To.filter(e=>!cM.has(e));function dM(e){const t=[];return uM.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const uo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:P0(4,13),y:P0(5,14)};uo.translateX=uo.x;uo.translateY=uo.y;const Ls=new Set;let gp=!1,vp=!1;function f_(){if(vp){const e=Array.from(Ls).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=dM(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}vp=!1,gp=!1,Ls.forEach(e=>e.complete()),Ls.clear()}function p_(){Ls.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(vp=!0)})}function hM(){p_(),f_()}class Tg{constructor(t,n,r,s,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ls.add(this),gp||(gp=!0,le.read(p_),le.resolveKeyframes(f_))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const o=s==null?void 0:s.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),s&&o===void 0&&s.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ls.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ls.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const m_=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),fM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pM(e){const t=fM.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function g_(e,t,n=1){const[r,s]=pM(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return m_(o)?parseFloat(o):o}return ig(s)?g_(s,t,n+1):s}const v_=e=>t=>t.test(e),mM={test:e=>e==="auto",parse:e=>e},y_=[ko,G,jn,gr,oI,iI,mM],A0=e=>y_.find(v_(e));class w_ extends Tg{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),ig(c))){const u=g_(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!QE.has(r)||t.length!==2)return;const[s,i]=t,o=A0(s),a=A0(i);if(o!==a)if(k0(o)&&k0(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)HI(t[s])&&r.push(s);r.length&&lM(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=uo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,a=s[o];s[o]=uo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const R0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Xr.test(e)||e==="0")&&!e.startsWith("url("));function gM(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function vM(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=R0(s,t),a=R0(i,t);return!o||!a?!1:gM(e)||(n==="spring"||fg(n))&&r}const yM=e=>e!==null;function cd(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(yM),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const wM=40;class b_{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Nn.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>wM?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&hM(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Nn.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:i,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!vM(t,r,s,i))if(o)this.options.duration=0;else{l&&l(cd(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ke=(e,t,n)=>e+(t-e)*n;function oh(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function bM({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=oh(l,a,e+1/3),i=oh(l,a,e),o=oh(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function bu(e,t){return n=>n>0?t:e}const ah=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},xM=[pp,_s,Pi],SM=e=>xM.find(t=>t.test(e));function O0(e){const t=SM(e);if(!t)return!1;let n=t.parse(e);return t===Pi&&(n=bM(n)),n}const $0=(e,t)=>{const n=O0(e),r=O0(t);if(!n||!r)return bu(e,t);const s={...n};return i=>(s.red=ah(n.red,r.red,i),s.green=ah(n.green,r.green,i),s.blue=ah(n.blue,r.blue,i),s.alpha=ke(n.alpha,r.alpha,i),_s.transform(s))},EM=(e,t)=>n=>t(e(n)),wl=(...e)=>e.reduce(EM),yp=new Set(["none","hidden"]);function _M(e,t){return yp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function TM(e,t){return n=>ke(e,t,n)}function kg(e){return typeof e=="number"?TM:typeof e=="string"?ig(e)?bu:nt.test(e)?$0:PM:Array.isArray(e)?x_:typeof e=="object"?nt.test(e)?$0:kM:bu}function x_(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>kg(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function kM(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=kg(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function CM(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],a=e.indexes[o][s[o]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[i]=l,s[o]++}return r}const PM=(e,t)=>{const n=Xr.createTransformer(t),r=el(e),s=el(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?yp.has(e)&&!s.values.length||yp.has(t)&&!r.values.length?_M(e,t):wl(x_(CM(r,s),s.values),n):bu(e,t)};function S_(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ke(e,t,n):kg(e)(e,t)}const AM=5;function E_(e,t,n){const r=Math.max(t-AM,0);return wg(n-e(r),t-r)}const Oe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},lh=.001;function RM({duration:e=Oe.duration,bounce:t=Oe.bounce,velocity:n=Oe.velocity,mass:r=Oe.mass}){let s,i,o=1-t;o=Ln(Oe.minDamping,Oe.maxDamping,o),e=Ln(Oe.minDuration,Oe.maxDuration,Qn(e)),o<1?(s=c=>{const u=c*o,d=u*e,h=u-n,f=wp(c,o),w=Math.exp(-d);return lh-h/f*w},i=c=>{const d=c*o*e,h=d*n+n,f=Math.pow(o,2)*Math.pow(c,2)*e,w=Math.exp(-d),m=wp(Math.pow(c,2),o);return(-s(c)+lh>0?-1:1)*((h-f)*w)/m}):(s=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-lh+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=$M(s,i,a);if(e=Yn(e),isNaN(l))return{stiffness:Oe.stiffness,damping:Oe.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const OM=12;function $M(e,t,n){let r=n;for(let s=1;s<OM;s++)r=r-e(r)/t(r);return r}function wp(e,t){return e*Math.sqrt(1-t*t)}const jM=["duration","bounce"],NM=["stiffness","damping","mass"];function j0(e,t){return t.some(n=>e[n]!==void 0)}function DM(e){let t={velocity:Oe.velocity,stiffness:Oe.stiffness,damping:Oe.damping,mass:Oe.mass,isResolvedFromDuration:!1,...e};if(!j0(e,NM)&&j0(e,jM))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Ln(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Oe.mass,stiffness:s,damping:i}}else{const n=RM(e);t={...t,...n,mass:Oe.mass},t.isResolvedFromDuration=!0}return t}function __(e=Oe.visualDuration,t=Oe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:f}=DM({...n,velocity:-Qn(n.velocity||0)}),w=h||0,m=c/(2*Math.sqrt(l*u)),b=o-i,v=Qn(Math.sqrt(l/u)),g=Math.abs(b)<5;r||(r=g?Oe.restSpeed.granular:Oe.restSpeed.default),s||(s=g?Oe.restDelta.granular:Oe.restDelta.default);let y;if(m<1){const E=wp(v,m);y=_=>{const C=Math.exp(-m*v*_);return o-C*((w+m*v*b)/E*Math.sin(E*_)+b*Math.cos(E*_))}}else if(m===1)y=E=>o-Math.exp(-v*E)*(b+(w+v*b)*E);else{const E=v*Math.sqrt(m*m-1);y=_=>{const C=Math.exp(-m*v*_),k=Math.min(E*_,300);return o-C*((w+m*v*b)*Math.sinh(k)+E*b*Math.cosh(k))/E}}
vendor: 4,910 bytes, line 215
215const S={calculatedDuration:f&&d||null,next:E=>{const _=y(E);if(f)a.done=E>=d;else{let C=0;m<1&&(C=E===0?Yn(w):E_(y,E,_));const k=Math.abs(C)<=r,P=Math.abs(o-_)<=s;a.done=k&&P}return a.value=a.done?o:_,a},toString:()=>{const E=Math.min(BE(S),dp),_=zE(C=>S.next(E*C).value,E,30);return E+"ms "+_}};return S}function N0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},f=k=>a!==void 0&&k<a||l!==void 0&&k>l,w=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let m=n*t;const b=d+m,v=o===void 0?b:o(b);v!==b&&(m=v-d);const g=k=>-m*Math.exp(-k/r),y=k=>v+g(k),S=k=>{const P=g(k),R=y(k);h.done=Math.abs(P)<=c,h.value=h.done?v:R};let E,_;const C=k=>{f(h.value)&&(E=k,_=__({keyframes:[h.value,w(h.value)],velocity:E_(y,k,h.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:k=>{let P=!1;return!_&&E===void 0&&(P=!0,S(k),C(k)),E!==void 0&&k>=E?_.next(k-E):(!P&&S(k),h)}}}const LM=yl(.42,0,1,1),IM=yl(0,0,.58,1),T_=yl(.42,0,.58,1),MM=e=>Array.isArray(e)&&typeof e[0]!="number",D0={linear:ut,easeIn:LM,easeInOut:T_,easeOut:IM,circIn:xg,circInOut:i_,circOut:s_,backIn:bg,backInOut:n_,backOut:t_,anticipate:r_},L0=e=>{if(pg(e)){cp(e.length===4);const[t,n,r,s]=e;return yl(t,n,r,s)}else if(typeof e=="string")return cp(D0[e]!==void 0),D0[e];return e};function FM(e,t,n){const r=[],s=n||S_,i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||ut:t;a=wl(l,a)}r.push(a)}return r}function Cg(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(cp(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=FM(t,r,s),l=a.length,c=u=>{if(o&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const h=Hs(e[d],e[d+1],u);return a[d](h)};return n?u=>c(Ln(e[0],e[i-1],u)):c}function VM(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Hs(0,t,r);e.push(ke(n,1,s))}}function k_(e){const t=[0];return VM(t,e.length-1),t}function UM(e,t){return e.map(n=>n*t)}function BM(e,t){return e.map(()=>t||T_).splice(0,e.length-1)}function xu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=MM(r)?r.map(L0):L0(r),i={done:!1,value:t[0]},o=UM(n&&n.length===t.length?n:k_(t),e),a=Cg(o,t,{ease:Array.isArray(s)?s:BM(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const zM=e=>{const t=({timestamp:n})=>e(n);return{start:()=>le.update(t,!0),stop:()=>hn(t),now:()=>We.isProcessing?We.timestamp:Nn.now()}},WM={decay:N0,inertia:N0,tween:xu,keyframes:xu,spring:__},HM=e=>e/100;class Pg extends b_{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:s,keyframes:i}=this.options,o=(s==null?void 0:s.KeyframeResolver)||Tg,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new o(i,a,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=this.options,a=fg(n)?n:WM[n]||xu;let l,c;a!==xu&&typeof t[0]!="number"&&(l=wl(HM,S_(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});i==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=BE(u));const{calculatedDuration:d}=u,h=d+s,f=h*(r+1)-s;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:h,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:f,repeatType:w,repeatDelay:m,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-h*(this.speed>=0?1:-1),g=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let y=this.currentTime,S=i;
vendor: 59,178 bytes, line 215
215if(f){const k=Math.min(this.currentTime,u)/d;let P=Math.floor(k),R=k%1;!R&&k>=1&&(R=1),R===1&&P--,P=Math.min(P,f+1),!!(P%2)&&(w==="reverse"?(R=1-R,m&&(R-=m/d)):w==="mirror"&&(S=o)),y=Ln(0,1,R)*d}const E=g?{done:!1,value:l[0]}:S.next(y);a&&(E.value=a(E.value));let{done:_}=E;!g&&c!==null&&(_=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return C&&s!==void 0&&(E.value=cd(l,this.options,s)),b&&b(E.value),C&&this.finish(),E}get duration(){const{resolved:t}=this;return t?Qn(t.calculatedDuration):0}get time(){return Qn(this.currentTime)}set time(t){t=Yn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Qn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=zM,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const KM=new Set(["opacity","clipPath","filter","transform"]);function qM(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=HE(a,s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const GM=Xm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Su=10,YM=2e4;function QM(e){return fg(e.type)||e.type==="spring"||!WE(e.ease)}function JM(e,t){const n=new Pg({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let i=0;for(;!r.done&&i<YM;)r=n.sample(i),s.push(r.value),i+=Su;return{times:void 0,keyframes:s,duration:i-Su,ease:"linear"}}const C_={anticipate:r_,backInOut:n_,circInOut:i_};function XM(e){return e in C_}class I0 extends b_{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:i}=this.options;this.resolver=new w_(i,(o,a)=>this.onKeyframesResolved(o,a),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:i,type:o,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof i=="string"&&wu()&&XM(i)&&(i=C_[i]),QM(this.options)){const{onComplete:d,onUpdate:h,motionValue:f,element:w,...m}=this.options,b=JM(t,m);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,s=b.times,i=b.ease,o="keyframes"}const u=qM(a.owner.current,l,t,{...this.options,duration:r,times:s,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(b0(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(cd(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:s,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Qn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Qn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Yn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return ut;const{animation:r}=n;b0(r,t)}return ut}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:i,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:h,...f}=this.options,w=new Pg({...f,keyframes:r,duration:s,type:i,ease:o,times:a,isGenerator:!0}),m=Yn(this.time);c.setWithVelocity(w.sample(m-Su).value,w.sample(m).value,Su)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:i,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return GM()&&r&&KM.has(r)&&!l&&!c&&!s&&i!=="mirror"&&o!==0&&a!=="inertia"}}const ZM={type:"spring",stiffness:500,damping:25,restSpeed:10},e5=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),t5={type:"keyframes",duration:.8},n5={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},r5=(e,{keyframes:t})=>t.length>2?t5:Gs.has(e)?e.startsWith("scale")?e5(t[1]):ZM:n5;function s5({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Ag=(e,t,n,r={},s,i)=>o=>{const a=hg(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Yn(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};s5(a)||(u={...u,...r5(e,u)}),u.duration&&(u.duration=Yn(u.duration)),u.repeatDelay&&(u.repeatDelay=Yn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),d&&!i&&t.get()!==void 0){const h=cd(u.keyframes,a);if(h!==void 0)return le.update(()=>{u.onUpdate(h),u.onComplete()}),new CI([])}return!i&&I0.supports(u)?new I0(u):new Pg(u)};function i5({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function P_(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(o=r);const c=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const d in l){const h=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),f=l[d];if(f===void 0||u&&i5(u,d))continue;const w={delay:n,...hg(o||{},d)};let m=!1;if(window.MotionHandoffAnimation){const v=JE(e);if(v){const g=window.MotionHandoffAnimation(v,d,le);g!==null&&(w.startTime=g,m=!0)}}fp(e,d),h.start(Ag(d,h,f,e.shouldReduceMotion&&QE.has(d)?{type:!1}:w,e,m));const b=h.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{le.update(()=>{a&&VI(e,a)})}),c}function bp(e,t,n={}){var r;const s=ld(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(P_(e,s,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=i;return o5(e,t,u+c,d,h,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[o,a]:[a,o];return c().then(()=>u())}else return Promise.all([o(),a(n.delay)])}function o5(e,t,n=0,r=0,s=1,i){const o=[],a=(e.variantChildren.size-1)*r,l=s===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(a5).forEach((c,u)=>{c.notify("AnimationStart",t),o.push(bp(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function a5(e,t){return e.sortNodePosition(t)}function l5(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>bp(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=bp(e,t,n);else{const s=typeof t=="function"?ld(e,t,n.custom):t;r=Promise.all(P_(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const c5=eg.length;function A_(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?A_(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<c5;n++){const r=eg[n],s=e.props[r];(Xa(s)||s===!1)&&(t[r]=s)}return t}const u5=[...Zm].reverse(),d5=Zm.length;function h5(e){return t=>Promise.all(t.map(({animation:n,options:r})=>l5(e,n,r)))}function f5(e){let t=h5(e),n=M0(),r=!0;const s=l=>(c,u)=>{var d;const h=ld(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:f,transitionEnd:w,...m}=h;c={...c,...m,...w}}return c};function i(l){t=l(e)}function o(l){const{props:c}=e,u=A_(e.parent)||{},d=[],h=new Set;let f={},w=1/0;for(let b=0;b<d5;b++){const v=u5[b],g=n[v],y=c[v]!==void 0?c[v]:u[v],S=Xa(y),E=v===l?g.isActive:null;E===!1&&(w=b);let _=y===u[v]&&y!==c[v]&&S;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),g.protectedKeys={...f},!g.isActive&&E===null||!y&&!g.prevProp||od(y)||typeof y=="boolean")continue;const C=p5(g.prevProp,y);let k=C||v===l&&g.isActive&&!_&&S||b>w&&S,P=!1;const R=Array.isArray(y)?y:[y];let I=R.reduce(s(v),{});E===!1&&(I={});const{prevResolvedValues:N={}}=g,Q={...N,...I},D=z=>{k=!0,h.has(z)&&(P=!0,h.delete(z)),g.needsAnimating[z]=!0;const A=e.getValue(z);A&&(A.liveStyle=!1)};for(const z in Q){const A=I[z],O=N[z];if(f.hasOwnProperty(z))continue;let L=!1;up(A)&&up(O)?L=!VE(A,O):L=A!==O,L?A!=null?D(z):h.add(z):A!==void 0&&h.has(z)?D(z):g.protectedKeys[z]=!0}g.prevProp=y,g.prevResolvedValues=I,g.isActive&&(f={...f,...I}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(_&&C)||P)&&d.push(...R.map(z=>({animation:z,options:{type:v}})))}if(h.size){const b={};h.forEach(v=>{const g=e.getBaseTarget(v),y=e.getValue(v);y&&(y.liveStyle=!0),b[v]=g??null}),d.push({animation:b})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(h=>{var f;return(f=h.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=o(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=M0(),r=!0}}}function p5(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!VE(t,e):!1}function hs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function M0(){return{animate:hs(!0),whileInView:hs(),whileHover:hs(),whileTap:hs(),whileDrag:hs(),whileFocus:hs(),exit:hs()}}class is{constructor(t){this.isMounted=!1,this.node=t}update(){}}class m5 extends is{constructor(t){super(t),t.animationState||(t.animationState=f5(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();od(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let g5=0;class v5 extends is{constructor(){super(...arguments),this.id=g5++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const y5={animation:{Feature:m5},exit:{Feature:v5}};function tl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function bl(e){return{point:{x:e.pageX,y:e.pageY}}}const w5=e=>t=>mg(t)&&e(t,bl(t));function va(e,t,n,r){return tl(e,t,w5(n),r)}const F0=(e,t)=>Math.abs(e-t);function b5(e,t){const n=F0(e.x,t.x),r=F0(e.y,t.y);return Math.sqrt(n**2+r**2)}class R_{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=uh(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,f=b5(d.offset,{x:0,y:0})>=3;if(!h&&!f)return;const{point:w}=d,{timestamp:m}=We;this.history.push({...w,timestamp:m});const{onStart:b,onMove:v}=this.handlers;h||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ch(h,this.transformPagePoint),le.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:f,onSessionEnd:w,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=uh(d.type==="pointercancel"?this.lastMoveEventInfo:ch(h,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,b),w&&w(d,b)},!mg(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const o=bl(t),a=ch(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=We;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,uh(a,this.history)),this.removeListeners=wl(va(this.contextWindow,"pointermove",this.handlePointerMove),va(this.contextWindow,"pointerup",this.handlePointerUp),va(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),hn(this.updatePoint)}}function ch(e,t){return t?{point:t(e.point)}:e}function V0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function uh({point:e},t){return{point:e,delta:V0(e,O_(t)),offset:V0(e,x5(t)),velocity:S5(t,.1)}}function x5(e){return e[0]}function O_(e){return e[e.length-1]}function S5(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=O_(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Yn(t)));)n--;if(!r)return{x:0,y:0};const i=Qn(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const $_=1e-4,E5=1-$_,_5=1+$_,j_=.01,T5=0-j_,k5=0+j_;function $t(e){return e.max-e.min}function C5(e,t,n){return Math.abs(e-t)<=n}function U0(e,t,n,r=.5){e.origin=r,e.originPoint=ke(t.min,t.max,e.origin),e.scale=$t(n)/$t(t),e.translate=ke(n.min,n.max,e.origin)-e.originPoint,(e.scale>=E5&&e.scale<=_5||isNaN(e.scale))&&(e.scale=1),(e.translate>=T5&&e.translate<=k5||isNaN(e.translate))&&(e.translate=0)}function ya(e,t,n,r){U0(e.x,t.x,n.x,r?r.originX:void 0),U0(e.y,t.y,n.y,r?r.originY:void 0)}function B0(e,t,n){e.min=n.min+t.min,e.max=e.min+$t(t)}function P5(e,t,n){B0(e.x,t.x,n.x),B0(e.y,t.y,n.y)}function z0(e,t,n){e.min=t.min-n.min,e.max=e.min+$t(t)}function wa(e,t,n){z0(e.x,t.x,n.x),z0(e.y,t.y,n.y)}function A5(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ke(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ke(n,e,r.max):Math.min(e,n)),e}function W0(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function R5(e,{top:t,left:n,bottom:r,right:s}){return{x:W0(e.x,n,s),y:W0(e.y,t,r)}}function H0(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function O5(e,t){return{x:H0(e.x,t.x),y:H0(e.y,t.y)}}function $5(e,t){let n=.5;const r=$t(e),s=$t(t);return s>r?n=Hs(t.min,t.max-r,e.min):r>s&&(n=Hs(e.min,e.max-s,t.min)),Ln(0,1,n)}function j5(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const xp=.35;function N5(e=xp){return e===!1?e=0:e===!0&&(e=xp),{x:K0(e,"left","right"),y:K0(e,"top","bottom")}}function K0(e,t,n){return{min:q0(e,t),max:q0(e,n)}}function q0(e,t){return typeof e=="number"?e:e[t]||0}const G0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ai=()=>({x:G0(),y:G0()}),Y0=()=>({min:0,max:0}),Ne=()=>({x:Y0(),y:Y0()});function It(e){return[e("x"),e("y")]}function N_({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function D5({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function L5(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function dh(e){return e===void 0||e===1}function Sp({scale:e,scaleX:t,scaleY:n}){return!dh(e)||!dh(t)||!dh(n)}function gs(e){return Sp(e)||D_(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function D_(e){return Q0(e.x)||Q0(e.y)}function Q0(e){return e&&e!=="0%"}function Eu(e,t,n){const r=e-n,s=t*r;return n+s}function J0(e,t,n,r,s){return s!==void 0&&(e=Eu(e,s,r)),Eu(e,n,r)+t}function Ep(e,t=0,n=1,r,s){e.min=J0(e.min,t,n,r,s),e.max=J0(e.max,t,n,r,s)}function L_(e,{x:t,y:n}){Ep(e.x,t.translate,t.scale,t.originPoint),Ep(e.y,n.translate,n.scale,n.originPoint)}const X0=.999999999999,Z0=1.0000000000001;function I5(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let a=0;a<s;a++){i=n[a],o=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Oi(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,L_(e,o)),r&&gs(i.latestValues)&&Oi(e,i.latestValues))}t.x<Z0&&t.x>X0&&(t.x=1),t.y<Z0&&t.y>X0&&(t.y=1)}function Ri(e,t){e.min=e.min+t,e.max=e.max+t}function ew(e,t,n,r,s=.5){const i=ke(e.min,e.max,s);Ep(e,t,n,i,r)}function Oi(e,t){ew(e.x,t.x,t.scaleX,t.scale,t.originX),ew(e.y,t.y,t.scaleY,t.scale,t.originY)}function I_(e,t){return N_(L5(e.getBoundingClientRect(),t))}function M5(e,t,n){const r=I_(e,n),{scroll:s}=t;return s&&(Ri(r.x,s.offset.x),Ri(r.y,s.offset.y)),r}const M_=({current:e})=>e?e.ownerDocument.defaultView:null,F5=new WeakMap;class V5{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ne(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(bl(u).point)},i=(u,d)=>{const{drag:h,dragPropagation:f,onDragStart:w}=this.getProps();if(h&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=DI(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),It(b=>{let v=this.getAxisMotionValue(b).get()||0;if(jn.test(v)){const{projection:g}=this.visualElement;if(g&&g.layout){const y=g.layout.layoutBox[b];y&&(v=$t(y)*(parseFloat(v)/100))}}this.originPoint[b]=v}),w&&le.postRender(()=>w(u,d)),fp(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(u,d)=>{const{dragPropagation:h,dragDirectionLock:f,onDirectionLock:w,onDrag:m}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=d;if(f&&this.currentDirection===null){this.currentDirection=U5(b),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>It(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new R_(t,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:M_(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&le.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!ic(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=A5(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Ci(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=R5(s.layoutBox,n):this.constraints=!1,this.elastic=N5(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&It(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=j5(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ci(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=M5(r,s.root,this.visualElement.getTransformPagePoint());let o=O5(s.layout.layoutBox,i);if(n){const a=n(D5(o));this.hasMutatedConstraints=!!a,a&&(o=N_(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=It(u=>{if(!ic(u,n,this.currentDirection))return;let d=l&&l[u]||{};o&&(d={min:0,max:0});const h=s?200:1e6,f=s?40:1e7,w={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,w)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return fp(this.visualElement,t),r.start(Ag(t,r,0,n,this.visualElement,!1))}stopAnimation(){It(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){It(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){It(n=>{const{drag:r}=this.getProps();if(!ic(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n];i.set(t[n]-ke(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ci(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};It(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=$5({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),It(o=>{if(!ic(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(ke(l,c,s[o]))})}addListeners(){if(!this.visualElement.current)return;F5.set(this.visualElement,this);const t=this.visualElement.current,n=va(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Ci(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),le.read(r);const o=tl(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(It(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=xp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function ic(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function U5(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class B5 extends is{constructor(t){super(t),this.removeGroupControls=ut,this.removeListeners=ut,this.controls=new V5(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const tw=e=>(t,n)=>{e&&le.postRender(()=>e(t,n))};class z5 extends is{constructor(){super(...arguments),this.removePointerDownListener=ut}onPointerDown(t){this.session=new R_(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:M_(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:tw(t),onStart:tw(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&le.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=va(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Rc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function nw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Wo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(G.test(e))e=parseFloat(e);else return e;const n=nw(e,t.target.x),r=nw(e,t.target.y);return`${n}% ${r}%`}},W5={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Xr.parse(e);if(s.length>5)return r;const i=Xr.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const c=ke(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}};class H5 extends p.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;gI(K5),i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Rc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,o=r.projection;return o&&(o.isPresent=i,s||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||le.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ng.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function F_(e){const[t,n]=xE(),r=p.useContext(Qm);return x.jsx(H5,{...e,layoutGroup:r,switchLayoutGroup:p.useContext(CE),isPresent:t,safeToRemove:n})}const K5={borderRadius:{...Wo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wo,borderTopRightRadius:Wo,borderBottomLeftRadius:Wo,borderBottomRightRadius:Wo,boxShadow:W5};function q5(e,t,n){const r=st(e)?e:An(e);return r.start(Ag("",r,t,n)),r.animation}function G5(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Y5=(e,t)=>e.depth-t.depth;class Q5{constructor(){this.children=[],this.isDirty=!1}add(t){gg(this.children,t),this.isDirty=!0}remove(t){vg(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Y5),this.isDirty=!1,this.children.forEach(t)}}function J5(e,t){const n=Nn.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(hn(r),e(i-t))};return le.read(r,!0),()=>hn(r)}const V_=["TopLeft","TopRight","BottomLeft","BottomRight"],X5=V_.length,rw=e=>typeof e=="string"?parseFloat(e):e,sw=e=>typeof e=="number"||G.test(e);function Z5(e,t,n,r,s,i){s?(e.opacity=ke(0,n.opacity!==void 0?n.opacity:1,e3(r)),e.opacityExit=ke(t.opacity!==void 0?t.opacity:1,0,t3(r))):i&&(e.opacity=ke(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<X5;o++){const a=`border${V_[o]}Radius`;let l=iw(t,a),c=iw(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||sw(l)===sw(c)?(e[a]=Math.max(ke(rw(l),rw(c),r),0),(jn.test(c)||jn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=ke(t.rotate||0,n.rotate||0,r))}function iw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const e3=U_(0,.5,s_),t3=U_(.5,.95,ut);function U_(e,t,n){return r=>r<e?0:r>t?1:n(Hs(e,t,r))}function ow(e,t){e.min=t.min,e.max=t.max}function Lt(e,t){ow(e.x,t.x),ow(e.y,t.y)}function aw(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function lw(e,t,n,r,s){return e-=t,e=Eu(e,1/n,r),s!==void 0&&(e=Eu(e,1/s,r)),e}function n3(e,t=0,n=1,r=.5,s,i=e,o=e){if(jn.test(t)&&(t=parseFloat(t),t=ke(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=ke(i.min,i.max,r);e===i&&(a-=t),e.min=lw(e.min,t,n,a,s),e.max=lw(e.max,t,n,a,s)}function cw(e,t,[n,r,s],i,o){n3(e,t[n],t[r],t[s],t.scale,i,o)}const r3=["x","scaleX","originX"],s3=["y","scaleY","originY"];function uw(e,t,n,r){cw(e.x,t,r3,n?n.x:void 0,r?r.x:void 0),cw(e.y,t,s3,n?n.y:void 0,r?r.y:void 0)}function dw(e){return e.translate===0&&e.scale===1}function B_(e){return dw(e.x)&&dw(e.y)}function hw(e,t){return e.min===t.min&&e.max===t.max}function i3(e,t){return hw(e.x,t.x)&&hw(e.y,t.y)}function fw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function z_(e,t){return fw(e.x,t.x)&&fw(e.y,t.y)}function pw(e){return $t(e.x)/$t(e.y)}function mw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class o3{constructor(){this.members=[]}add(t){gg(this.members,t),t.scheduleRender()}remove(t){if(vg(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function a3(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:h,skewX:f,skewY:w}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),f&&(r+=`skewX(${f}deg) `),w&&(r+=`skewY(${w}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const vs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},ta=typeof window<"u"&&window.MotionDebug!==void 0,hh=["","X","Y","Z"],l3={visibility:"hidden"},gw=1e3;let c3=0;function fh(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function W_(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=JE(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",le,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&W_(r)}function H_({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=c3++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ta&&(vs.totalNodes=vs.resolvedTargetDeltas=vs.recalculatedProjection=0),this.nodes.forEach(h3),this.nodes.forEach(v3),this.nodes.forEach(y3),this.nodes.forEach(f3),ta&&window.MotionDebug.record(vs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Q5)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new yg),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=G5(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const h=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=J5(h,250),Rc.hasAnimatedSinceResize&&(Rc.hasAnimatedSinceResize=!1,this.nodes.forEach(yw))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:f,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||E3,{onLayoutAnimationStart:b,onLayoutAnimationComplete:v}=u.getProps(),g=!this.targetLayout||!z_(this.targetLayout,w)||f,y=!h&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,y);const S={...hg(m,"layout"),onPlay:b,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else h||yw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,hn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(w3),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&W_(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(vw);return}this.isUpdating||this.nodes.forEach(m3),this.isUpdating=!1,this.nodes.forEach(g3),this.nodes.forEach(u3),this.nodes.forEach(d3),this.clearAllSnapshots();const a=Nn.now();We.delta=Ln(0,1e3/60,a-We.timestamp),We.timestamp=a,We.isProcessing=!0,rh.update.process(We),rh.preRender.process(We),rh.render.process(We),We.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ng.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(p3),this.sharedNodes.forEach(b3)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,le.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ne(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!B_(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&(a||gs(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),_3(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return Ne();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(T3))){const{scroll:u}=this.root;u&&(Ri(l.x,u.offset.x),Ri(l.y,u.offset.y))}return l}removeElementScroll(o){var a;const l=Ne();if(Lt(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:h}=u;u!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&Lt(l,o),Ri(l.x,d.offset.x),Ri(l.y,d.offset.y))}return l}applyTransform(o,a=!1){const l=Ne();Lt(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Oi(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),gs(u.latestValues)&&Oi(l,u.latestValues)}return gs(this.latestValues)&&Oi(l,this.latestValues),l}removeTransform(o){const a=Ne();Lt(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!gs(c.latestValues))continue;Sp(c.latestValues)&&c.updateSnapshot();const u=Ne(),d=c.measurePageBox();Lt(u,d),uw(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return gs(this.latestValues)&&uw(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==We.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!(!this.layout||!(d||h))){if(this.resolvedRelativeTargetAt=We.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ne(),this.relativeTargetOrigin=Ne(),wa(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Lt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ne(),this.targetWithTransforms=Ne()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),P5(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Lt(this.target,this.layout.layoutBox),L_(this.target,this.targetDelta)):Lt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ne(),this.relativeTargetOrigin=Ne(),wa(this.relativeTargetOrigin,this.target,f.target),Lt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ta&&vs.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Sp(this.parent.latestValues)||D_(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===We.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Lt(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;I5(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Ne());const{target:w}=a;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(aw(this.prevProjectionDelta.x,this.projectionDelta.x),aw(this.prevProjectionDelta.y,this.projectionDelta.y)),ya(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!mw(this.projectionDelta.x,this.prevProjectionDelta.x)||!mw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w)),ta&&vs.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ai(),this.projectionDelta=Ai(),this.projectionDeltaWithTransform=Ai()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Ai();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Ne(),f=l?l.source:void 0,w=this.layout?this.layout.source:void 0,m=f!==w,b=this.getStack(),v=!b||b.members.length<=1,g=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(S3));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const E=S/1e3;ww(d.x,o.x,E),ww(d.y,o.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wa(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),x3(this.relativeTarget,this.relativeTargetOrigin,h,E),y&&i3(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Ne()),Lt(y,this.relativeTarget)),m&&(this.animationValues=u,Z5(u,c,this.latestValues,E,g,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(hn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=le.update(()=>{Rc.hasAnimatedSinceResize=!0,this.currentAnimation=q5(0,gw,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(gw),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&K_(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ne();const d=$t(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=$t(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Lt(a,l),Oi(a,u),ya(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new o3),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&fh("z",o,c,this.animationValues);for(let u=0;u<hh.length;u++)fh(`rotate${hh[u]}`,o,c,this.animationValues),fh(`skew${hh[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return l3;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Pc(o==null?void 0:o.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Pc(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!gs(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=a3(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:f,y:w}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${w.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=d===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in yu){if(h[m]===void 0)continue;const{correct:b,applyTo:v}=yu[m],g=c.transform==="none"?h[m]:b(h[m],d);if(v){const y=v.length;for(let S=0;S<y;S++)c[v[S]]=g}else c[m]=g}return this.options.layoutId&&(c.pointerEvents=d===this?Pc(o==null?void 0:o.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(vw),this.root.sharedNodes.clear()}}}function u3(e){e.updateLayout()}function d3(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;i==="size"?It(d=>{const h=o?n.measuredBox[d]:n.layoutBox[d],f=$t(h);h.min=r[d].min,h.max=h.min+f}):K_(i,n.layoutBox,r)&&It(d=>{const h=o?n.measuredBox[d]:n.layoutBox[d],f=$t(r[d]);h.max=h.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const a=Ai();ya(a,r,n.layoutBox);const l=Ai();o?ya(l,e.applyTransform(s,!0),n.measuredBox):ya(l,r,n.layoutBox);const c=!B_(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const w=Ne();wa(w,n.layoutBox,h.layoutBox);const m=Ne();wa(m,r,f.layoutBox),z_(w,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=w,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function h3(e){ta&&vs.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function f3(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function p3(e){e.clearSnapshot()}function vw(e){e.clearMeasurements()}function m3(e){e.isLayoutDirty=!1}function g3(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function yw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function v3(e){e.resolveTargetDelta()}function y3(e){e.calcProjection()}function w3(e){e.resetSkewAndRotation()}function b3(e){e.removeLeadSnapshot()}function ww(e,t,n){e.translate=ke(t.translate,0,n),e.scale=ke(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function bw(e,t,n,r){e.min=ke(t.min,n.min,r),e.max=ke(t.max,n.max,r)}function x3(e,t,n,r){bw(e.x,t.x,n.x,r),bw(e.y,t.y,n.y,r)}function S3(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const E3={duration:.45,ease:[.4,0,.1,1]},xw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Sw=xw("applewebkit/")&&!xw("chrome/")?Math.round:ut;function Ew(e){e.min=Sw(e.min),e.max=Sw(e.max)}function _3(e){Ew(e.x),Ew(e.y)}function K_(e,t,n){return e==="position"||e==="preserve-aspect"&&!C5(pw(t),pw(n),.2)}function T3(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const k3=H_({attachResizeListener:(e,t)=>tl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ph={current:void 0},q_=H_({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ph.current){const e=new k3({});e.mount(window),e.setOptions({layoutScroll:!0}),ph.current=e}return ph.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),C3={pan:{Feature:z5},drag:{Feature:B5,ProjectionNode:q_,MeasureLayout:F_}};function _w(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&le.postRender(()=>i(t,bl(t)))}class P3 extends is{mount(){const{current:t}=this.node;t&&(this.unmount=RI(t,n=>(_w(this.node,n,"Start"),r=>_w(this.node,r,"End"))))}unmount(){}}class A3 extends is{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=wl(tl(this.node.current,"focus",()=>this.onFocus()),tl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Tw(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&le.postRender(()=>i(t,bl(t)))}class R3 extends is{mount(){const{current:t}=this.node;t&&(this.unmount=NI(t,n=>(Tw(this.node,n,"Start"),(r,{success:s})=>Tw(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const _p=new WeakMap,mh=new WeakMap,O3=e=>{const t=_p.get(e.target);t&&t(e)},$3=e=>{e.forEach(O3)};function j3({root:e,...t}){const n=e||document;mh.has(n)||mh.set(n,{});const r=mh.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver($3,{root:e,...t})),r[s]}function N3(e,t,n){const r=j3(t);return _p.set(e,n),r.observe(e),()=>{_p.delete(e),r.unobserve(e)}}const D3={some:0,all:1};class L3 extends is{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:D3[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=c?u:d;h&&h(l)};return N3(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(I3(t,n))&&this.startObserver()}unmount(){}}function I3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const M3={inView:{Feature:L3},tap:{Feature:R3},focus:{Feature:A3},hover:{Feature:P3}},F3={layout:{ProjectionNode:q_,MeasureLayout:F_}},Tp={current:null},G_={current:!1};
vendor: 5,193 bytes, line 215
215function V3(){if(G_.current=!0,!!Jm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Tp.current=e.matches;e.addListener(t),t()}else Tp.current=!1}const U3=[...y_,nt,Xr],B3=e=>U3.find(v_(e)),kw=new WeakMap;function z3(e,t,n){for(const r in t){const s=t[r],i=n[r];if(st(s))e.addValue(r,s);else if(st(i))e.addValue(r,An(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,An(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Cw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class W3{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Tg,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Nn.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,le.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=o;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=ad(n),this.isVariantNode=TE(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const w=h[f];l[f]!==void 0&&st(w)&&w.set(l[f],!1)}}mount(t){this.current=t,kw.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),G_.current||V3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Tp.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){kw.delete(this.current),this.projection&&this.projection.unmount(),hn(this.notifyUpdate),hn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Gs.has(t),s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&le.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in co){const n=co[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ne()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Cw.length;r++){const s=Cw[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=z3(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}
215addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=An(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(m_(s)||o_(s))?s=parseFloat(s):!B3(s)&&Xr.test(n)&&(s=h_(t,n)),this.setBaseTarget(t,st(s)?s.get():s)),st(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const o=sg(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(s=o[t])}if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!st(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new yg),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Y_ extends W3{constructor(){super(...arguments),this.KeyframeResolver=w_}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;st(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function H3(e){return window.getComputedStyle(e)}class K3 extends Y_{constructor(){super(...arguments),this.type="html",this.renderInstance=NE}readValueFromInstance(t,n){if(Gs.has(n)){const r=_g(n);return r&&r.default||0}else{const r=H3(t),s=(OE(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return I_(t,n)}build(t,n,r){ag(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return dg(t,n,r)}}class q3 extends Y_{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ne}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Gs.has(n)){const r=_g(n);return r&&r.default||0}return n=DE.has(n)?n:tg(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ME(t,n,r)}build(t,n,r){lg(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){LE(t,n,r,s)}mount(t){this.isSVGTag=ug(t.tagName),super.mount(t)}}const G3=(e,t)=>rg(e)?new q3(t):new K3(t,{allowProjection:e!==p.Fragment}),Y3=TI({...y5,...M3,...C3,...F3},G3),_n=VL(Y3);function Q_(e,t){let n;const r=()=>{const{currentTime:s}=t,o=(s===null?0:s.value)/100;n!==o&&e(o),n=o};return le.update(r,!0),()=>hn(r)}const Oc=new WeakMap;let vr;function Q3(e,t){if(t){const{inlineSize:n,blockSize:r}=t[0];return{width:n,height:r}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function J3({target:e,contentRect:t,borderBoxSize:n}){var r;(r=Oc.get(e))===null||r===void 0||r.forEach(s=>{s({target:e,contentSize:t,get size(){return Q3(e,n)}})})}function X3(e){e.forEach(J3)}function Z3(){typeof ResizeObserver>"u"||(vr=new ResizeObserver(X3))}function eF(e,t){vr||Z3();const n=qE(e);return n.forEach(r=>{let s=Oc.get(r);s||(s=new Set,Oc.set(r,s)),s.add(t),vr==null||vr.observe(r)}),()=>{n.forEach(r=>{const s=Oc.get(r);s==null||s.delete(t),s!=null&&s.size||vr==null||vr.unobserve(r)})}}const $c=new Set;let ba;function tF(){ba=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};
215$c.forEach(n=>n(t))},window.addEventListener("resize",ba)}function nF(e){return $c.add(e),ba||tF(),()=>{$c.delete(e),!$c.size&&ba&&(ba=void 0)}}function rF(e,t){return typeof e=="function"?nF(e):eF(e,t)}const sF=50,Pw=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),iF=()=>({time:0,x:Pw(),y:Pw()}),oF={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Aw(e,t,n,r){const s=n[t],{length:i,position:o}=oF[t],a=s.current,l=n.time;s.current=e[`scroll${o}`],s.scrollLength=e[`scroll${i}`]-e[`client${i}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=Hs(0,s.scrollLength,s.current);const c=r-l;s.velocity=c>sF?0:wg(s.current-a,c)}function aF(e,t,n){Aw(e,"x",t,n),Aw(e,"y",t,n),t.time=n}function lF(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(r instanceof HTMLElement)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const s=r.getBoundingClientRect();r=r.parentElement;const i=r.getBoundingClientRect();n.x+=s.left-i.left,n.y+=s.top-i.top}else if(r instanceof SVGGraphicsElement){const{x:s,y:i}=r.getBBox();n.x+=s,n.y+=i;let o=null,a=r.parentNode;for(;!o;)a.tagName==="svg"&&(o=a),a=r.parentNode;r=o}else break;return n}const kp={start:0,center:.5,end:1};function Rw(e,t,n=0){let r=0;if(e in kp&&(e=kp[e]),typeof e=="string"){const s=parseFloat(e);e.endsWith("px")?r=s:e.endsWith("%")?e=s/100:e.endsWith("vw")?r=s/100*document.documentElement.clientWidth:e.endsWith("vh")?r=s/100*document.documentElement.clientHeight:e=s}return typeof e=="number"&&(r=t*e),n+r}const cF=[0,0];function uF(e,t,n,r){let s=Array.isArray(e)?e:cF,i=0,o=0;return typeof e=="number"?s=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?s=e.split(" "):s=[e,kp[e]?e:"0"]),i=Rw(s[0],n,r),o=Rw(s[1],t),i-o}const dF={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},hF={x:0,y:0};function fF(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function pF(e,t,n){const{offset:r=dF.All}=n,{target:s=e,axis:i="y"}=n,o=i==="y"?"height":"width",a=s!==e?lF(s,e):hF,l=s===e?{width:e.scrollWidth,height:e.scrollHeight}:fF(s),c={width:e.clientWidth,height:e.clientHeight};t[i].offset.length=0;let u=!t[i].interpolate;const d=r.length;for(let h=0;h<d;h++){const f=uF(r[h],c[o],l[o],a[i]);!u&&f!==t[i].interpolatorOffsets[h]&&(u=!0),t[i].offset[h]=f}u&&(t[i].interpolate=Cg(t[i].offset,k_(r),{clamp:!1}),t[i].interpolatorOffsets=[...t[i].offset]),t[i].progress=Ln(0,1,t[i].interpolate(t[i].current))}function mF(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight}function gF(e,t,n,r={}){return{measure:()=>mF(e,r.target,n),update:s=>{aF(e,n,s),(r.offset||r.target)&&pF(e,n,r)},notify:()=>t(n)}}const Ho=new WeakMap,Ow=new WeakMap,gh=new WeakMap,$w=e=>e===document.documentElement?window:e;function Rg(e,{container:t=document.documentElement,...n}={}){let r=gh.get(t);r||(r=new Set,gh.set(t,r));const s=iF(),i=gF(t,e,s,n);if(r.add(i),!Ho.has(t)){const a=()=>{for(const h of r)h.measure()},l=()=>{for(const h of r)h.update(We.timestamp)},c=()=>{for(const h of r)h.notify()},u=()=>{le.read(a,!1,!0),le.read(l,!1,!0),le.update(c,!1,!0)};Ho.set(t,u);const d=$w(t);window.addEventListener("resize",u,{passive:!0}),t!==document.documentElement&&Ow.set(t,rF(t,u)),d.addEventListener("scroll",u,{passive:!0})}const o=Ho.get(t);return le.read(o,!1,!0),()=>{var a;hn(o);const l=gh.get(t);if(!l||(l.delete(i),l.size))return;const c=Ho.get(t);Ho.delete(t),c&&($w(t).removeEventListener("scroll",c),(a=Ow.get(t))===null||a===void 0||a(),window.removeEventListener("resize",c))}}function vF({source:e,container:t,axis:n="y"}){e&&(t=e);const r={value:0},s=Rg(i=>{r.value=i[n].progress*100},{container:t,axis:n});return{currentTime:r,cancel:s}}const vh=new Map;function J_({source:e,container:t=document.documentElement,axis:n="y"}={}){e&&(t=e),vh.has(t)||vh.set(t,{});const r=vh.get(t);return r[n]||(r[n]=UE()?new ScrollTimeline({source:t,axis:n}):vF({source:t,axis:n})),r[n]}function yF(e){return e.length===2}function X_(e){return e&&(e.target||e.offset)}function wF(e,t){return yF(e)||X_(t)?Rg(n=>{e(n[t.axis].progress,n)},t):Q_(e,J_(t))}function bF(e,t){if(e.flatten(),X_(t))return e.pause(),Rg(n=>{e.time=e.duration*n[t.axis].progress},t);{const n=J_(t);return e.attachTimeline?e.attachTimeline(n,r=>(r.pause(),Q_(s=>{r.time=r.duration*s},n))):ut}}function xF(e,{axis:t="y",...n}={}){const r={axis:t,...n};return typeof e=="function"?wF(e,r):bF(e,r)}
215function jw(e,t){$L(!!(!t||t.current))}const SF=()=>({scrollX:An(0),scrollY:An(0),scrollXProgress:An(0),scrollYProgress:An(0)});function EF({container:e,target:t,layoutEffect:n=!0,...r}={}){const s=_o(SF);return(n?sd:p.useEffect)(()=>(jw("target",t),jw("container",e),xF((o,{x:a,y:l})=>{s.scrollX.set(a.current),s.scrollXProgress.set(a.progress),s.scrollY.set(l.current),s.scrollYProgress.set(l.progress)},{...r,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0})),[e,t,JSON.stringify(r.offset)]),s}function _F(e){const t=_o(()=>An(e)),{isStatic:n}=p.useContext(rd);if(n){const[,r]=p.useState(e);p.useEffect(()=>t.on("change",r),[])}return t}function Z_(e,t){const n=_F(t()),r=()=>n.set(t());return r(),sd(()=>{const s=()=>le.preRender(r,!1,!0),i=e.map(o=>o.on("change",s));return()=>{i.forEach(o=>o()),hn(r)}}),n}const TF=e=>e&&typeof e=="object"&&e.mix,kF=e=>TF(e)?e.mix:void 0;function CF(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],s=e[1+n],i=e[2+n],o=e[3+n],a=Cg(s,i,{mixer:kF(i[0]),...o});return t?a(r):a}function PF(e){ma.current=[],e();const t=Z_(ma.current,e);return ma.current=void 0,t}function yh(e,t,n,r){if(typeof e=="function")return PF(e);const s=typeof t=="function"?t:CF(t,n,r);return Array.isArray(e)?Nw(e,s):Nw([e],([i])=>s(i))}function Nw(e,t){const n=_o(()=>[]);return Z_(e,()=>{n.length=0;const r=e.length;for(let s=0;s<r;s++)n[s]=e[s].get();return t(n)})}function AF(){const{user:e,loading:t}=Ym(),{data:n,isLoading:r}=z1({queryKey:["admin-check",e==null?void 0:e.id],enabled:!!e,queryFn:async()=>{const{data:s,error:i}=await Ct.from("user_roles").select("role").eq("user_id",e.id);if(i)return{isAdmin:!1,roles:[]};const o=s.map(a=>a.role);return{isAdmin:o.includes("admin"),roles:o}}});return{isAdmin:(n==null?void 0:n.isAdmin)??!1,roles:(n==null?void 0:n.roles)??[],loading:t||r}}let wh=0;function RF(){p.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:Dw()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Dw()),wh++,()=>{wh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),wh--}},[])}function Dw(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const bh="focusScope.autoFocusOnMount",xh="focusScope.autoFocusOnUnmount",Lw={bubbles:!1,cancelable:!0},OF=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,l]=p.useState(null),c=Ve(s),u=Ve(i),d=p.useRef(null),h=Be(t,m=>l(m)),f=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let m=function(y){if(f.paused||!a)return;const S=y.target;a.contains(S)?d.current=S:yr(d.current,{select:!0})},b=function(y){if(f.paused||!a)return;const S=y.relatedTarget;S!==null&&(a.contains(S)||yr(d.current,{select:!0}))},v=function(y){if(document.activeElement===document.body)for(const E of y)E.removedNodes.length>0&&yr(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const g=new MutationObserver(v);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),g.disconnect()}}},[r,a,f.paused]),p.useEffect(()=>{if(a){Mw.add(f);const m=document.activeElement;if(!a.contains(m)){const v=new CustomEvent(bh,Lw);a.addEventListener(bh,c),a.dispatchEvent(v),v.defaultPrevented||($F(IF(eT(a)),{select:!0}),document.activeElement===m&&yr(a))}return()=>{a.removeEventListener(bh,c),setTimeout(()=>{const v=new CustomEvent(xh,Lw);a.addEventListener(xh,u),a.dispatchEvent(v),v.defaultPrevented||yr(m??document.body,{select:!0}),a.removeEventListener(xh,u),Mw.remove(f)},0)}}},[a,c,u,f]);const w=p.useCallback(m=>{if(!n&&!r||f.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(b&&v){const g=m.currentTarget,[y,S]=jF(g);y&&S?!m.shiftKey&&v===S?(m.preventDefault(),n&&yr(y,{select:!0})):m.shiftKey&&v===y&&(m.preventDefault(),n&&yr(S,{select:!0})):v===g&&m.preventDefault()}},[n,r,f.paused]);return p.createElement(ze.div,U({tabIndex:-1},o,{ref:h,onKeyDown:w}))});function $F(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(yr(r,{select:t}),document.activeElement!==n)return}function jF(e){const t=eT(e),n=Iw(t,e),r=Iw(t.reverse(),e);return[n,r]}function eT(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Iw(e,t){for(const n of e)if(!NF(n,{upTo:t}))return n}function NF(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function DF(e){return e instanceof HTMLInputElement&&"select"in e}function yr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&DF(e)&&t&&e.select()}}const Mw=LF();function LF(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Fw(e,t),e.unshift(t)},remove(t){var n;e=Fw(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Fw(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function IF(e){return e.filter(t=>t.tagName!=="A")}const tT=p.forwardRef((e,t)=>
vendor: 5,567 bytes, line 215
215{const{children:n,...r}=e,s=p.Children.toArray(n),i=s.find(FF);if(i){const o=i.props.children,a=s.map(l=>l===i?p.Children.count(o)>1?p.Children.only(null):p.isValidElement(o)?o.props.children:null:l);return p.createElement(Cp,U({},r,{ref:t}),p.isValidElement(o)?p.cloneElement(o,void 0,a):null)}return p.createElement(Cp,U({},r,{ref:t}),n)});tT.displayName="Slot";const Cp=p.forwardRef((e,t)=>{const{children:n,...r}=e;return p.isValidElement(n)?p.cloneElement(n,{...VF(r,n.props),ref:t?fl(t,n.ref):n.ref}):p.Children.count(n)>1?p.Children.only(null):null});Cp.displayName="SlotClone";const MF=({children:e})=>p.createElement(p.Fragment,null,e);function FF(e){return p.isValidElement(e)&&e.type===MF}function VF(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{i(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}var UF=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},oi=new WeakMap,oc=new WeakMap,ac={},Sh=0,nT=function(e){return e&&(e.host||nT(e.parentNode))},BF=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=nT(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},zF=function(e,t,n,r){var s=BF(t,Array.isArray(e)?e:[e]);ac[n]||(ac[n]=new WeakMap);var i=ac[n],o=[],a=new Set,l=new Set(s),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};s.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(a.has(h))u(h);else try{var f=h.getAttribute(r),w=f!==null&&f!=="false",m=(oi.get(h)||0)+1,b=(i.get(h)||0)+1;oi.set(h,m),i.set(h,b),o.push(h),m===1&&w&&oc.set(h,!0),b===1&&h.setAttribute(n,"true"),w||h.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",h,v)}})};return u(t),a.clear(),Sh++,function(){o.forEach(function(d){var h=oi.get(d)-1,f=i.get(d)-1;oi.set(d,h),i.set(d,f),h||(oc.has(d)||d.removeAttribute(r),oc.delete(d)),f||d.removeAttribute(n)}),Sh--,Sh||(oi=new WeakMap,oi=new WeakMap,oc=new WeakMap,ac={})}},WF=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=UF(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),zF(r,s,n,"aria-hidden")):function(){return null}},Tr=function(){return Tr=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Tr.apply(this,arguments)};function HF(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function KF(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var jc="right-scroll-bar-position",Nc="width-before-scroll-bar",qF="with-scroll-bars-hidden",GF="--removed-body-scroll-bar-size";function Eh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function YF(e,t){var n=p.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var QF=typeof window<"u"?p.useLayoutEffect:p.useEffect,Vw=new WeakMap;function JF(e,t){var n=YF(null,function(r){return e.forEach(function(s){return Eh(s,r)})});return QF(function(){var r=Vw.get(n);if(r){var s=new Set(r),i=new Set(e),o=n.current;s.forEach(function(a){i.has(a)||Eh(a,null)}),i.forEach(function(a){s.has(a)||Eh(a,o)})}Vw.set(n,e)},[e]),n}var _u=function(){return _u=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},_u.apply(this,arguments)};function XF(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function ZF(e){return e}function e4(e,t){t===void 0&&(t=ZF);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var o=t(i,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(i),o=n}var l=function(){var u=o;o=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),n}}}};return s}function t4(e){e===void 0&&(e={});var t=e4(null);return t.options=_u({async:!0,ssr:!1},e),t}var rT=function(e){var t=e.sideCar,n=XF(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,_u({},n))};
vendor: 4,816 bytes, lines 215-252
215rT.isSideCarExport=!0;function n4(e,t){return e.useMedium(t),rT}var sT=t4(),_h=function(){},ud=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:_h,onWheelCapture:_h,onTouchMoveCapture:_h}),s=r[0],i=r[1],o=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,h=e.sideCar,f=e.noIsolation,w=e.inert,m=e.allowPinchZoom,b=e.as,v=b===void 0?"div":b,g=HF(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),y=h,S=JF([n,t]),E=Tr(Tr({},g),s);return p.createElement(p.Fragment,null,u&&p.createElement(y,{sideCar:sT,removeScrollBar:c,shards:d,noIsolation:f,inert:w,setCallbacks:i,allowPinchZoom:!!m,lockRef:n}),o?p.cloneElement(p.Children.only(a),Tr(Tr({},E),{ref:S})):p.createElement(v,Tr({},E,{className:l,ref:S}),a))});ud.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ud.classNames={fullWidth:Nc,zeroRight:jc};var r4=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function s4(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=r4();return t&&e.setAttribute("nonce",t),e}function i4(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function o4(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var a4=function(){var e=0,t=null;return{add:function(n){e==0&&(t=s4())&&(i4(t,n),o4(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},l4=function(){var e=a4();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},iT=function(){var e=l4(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},c4={left:0,top:0,right:0,gap:0},Th=function(e){return parseInt(e||"",10)||0},u4=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Th(n),Th(r),Th(s)]},d4=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return c4;var t=u4(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},h4=iT(),Ui="data-scroll-locked",f4=function(e,t,n,r){var s=e.left,i=e.top,o=e.right,a=e.gap;return n===void 0&&(n="margin"),` 216 .`.concat(qF,` { 217 overflow: hidden `).concat(r,`; 218 padding-right: `).concat(a,"px ").concat(r,`; 219 } 220 body[`).concat(Ui,`] { 221 overflow: hidden `).concat(r,`; 222 overscroll-behavior: contain; 223 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 224 padding-left: `.concat(s,`px; 225 padding-top: `).concat(i,`px; 226 padding-right: `).concat(o,`px; 227 margin-left:0; 228 margin-top:0; 229 margin-right: `).concat(a,"px ").concat(r,`; 230 `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` 231 } 232 233 .`).concat(jc,` { 234 right: `).concat(a,"px ").concat(r,`; 235 } 236 237 .`).concat(Nc,` { 238 margin-right: `).concat(a,"px ").concat(r,`; 239 } 240 241 .`).concat(jc," .").concat(jc,` { 242 right: 0 `).concat(r,`; 243 } 244 245 .`).concat(Nc," .").concat(Nc,` { 246 margin-right: 0 `).concat(r,`; 247 } 248 249 body[`).concat(Ui,`] { 250 `).concat(GF,": ").concat(a,`px; 251 } 252`)},Uw=function(){var e=parseInt(document.body.getAttribute(Ui)||"0",10);return isFinite(e)?e:0},p4=function(){p.useEffect(function(){return document.body.setAttribute(Ui,(Uw()+1).toString()),function(){var e=Uw()-1;e<=0?document.body.removeAttribute(Ui):document.body.setAttribute(Ui,e.toString())}},[])},m4=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;p4();var i=p.useMemo(function(){return d4(s)},[s]);return p.createElement(h4,{styles:f4(i,!t,s,n?"":"!important")})},Pp=!1;if(typeof window<"u")try{var lc=Object.defineProperty({},"passive",{get:function(){return Pp=!0,!0}});window.addEventListener("test",lc,lc),window.removeEventListener("test",lc,lc)}catch{Pp=!1}var ai=Pp?{passive:!1}:!1,g4=function(e){return e.tagName==="TEXTAREA"},oT=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!g4(e)&&n[t]==="visible")},v4=function(e){return oT(e,"overflowY")},y4=function(e){return oT(e,"overflowX")},Bw=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=aT(e,n);if(r){var s=lT(e,n),i=s[1],o=s[2];if(i>o)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},w4=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},b4=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},aT=function(e,t){return e==="v"?v4(t):y4(t)},lT=function(e,t){return e==="v"?w4(t):b4(t)},x4=function(e,t){return e==="h"&&t==="rtl"?-1:1}
252,S4=function(e,t,n,r,s){var i=x4(e,window.getComputedStyle(t).direction),o=i*r,a=n.target,l=t.contains(a),c=!1,u=o>0,d=0,h=0;do{var f=lT(e,a),w=f[0],m=f[1],b=f[2],v=m-b-i*w;(w||v)&&aT(e,a)&&(d+=v,h+=w),a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&(d===0||!s)||!u&&(h===0||!s))&&(c=!0),c},cc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},zw=function(e){return[e.deltaX,e.deltaY]},Ww=function(e){return e&&"current"in e?e.current:e},E4=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_4=function(e){return` 253 .block-interactivity-`.concat(e,` {pointer-events: none;} 254 .allow-interactivity-`).concat(e,` {pointer-events: all;} 255`)},T4=0,li=[];function k4(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),s=p.useState(T4++)[0],i=p.useState(function(){return iT()})[0],o=p.useRef(e);p.useEffect(function(){o.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var m=KF([e.lockRef.current],(e.shards||[]).map(Ww),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=p.useCallback(function(m,b){if("touches"in m&&m.touches.length===2)return!o.current.allowPinchZoom;var v=cc(m),g=n.current,y="deltaX"in m?m.deltaX:g[0]-v[0],S="deltaY"in m?m.deltaY:g[1]-v[1],E,_=m.target,C=Math.abs(y)>Math.abs(S)?"h":"v";if("touches"in m&&C==="h"&&_.type==="range")return!1;var k=Bw(C,_);if(!k)return!0;if(k?E=C:(E=C==="v"?"h":"v",k=Bw(C,_)),!k)return!1;if(!r.current&&"changedTouches"in m&&(y||S)&&(r.current=E),!E)return!0;var P=r.current||E;return S4(P,b,m,P==="h"?y:S,!0)},[]),l=p.useCallback(function(m){var b=m;if(!(!li.length||li[li.length-1]!==i)){var v="deltaY"in b?zw(b):cc(b),g=t.current.filter(function(E){return E.name===b.type&&E.target===b.target&&E4(E.delta,v)})[0];if(g&&g.should){b.cancelable&&b.preventDefault();return}if(!g){var y=(o.current.shards||[]).map(Ww).filter(Boolean).filter(function(E){return E.contains(b.target)}),S=y.length>0?a(b,y[0]):!o.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),c=p.useCallback(function(m,b,v,g){var y={name:m,delta:b,target:v,should:g};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(S){return S!==y})},1)},[]),u=p.useCallback(function(m){n.current=cc(m),r.current=void 0},[]),d=p.useCallback(function(m){c(m.type,zw(m),m.target,a(m,e.lockRef.current))},[]),h=p.useCallback(function(m){c(m.type,cc(m),m.target,a(m,e.lockRef.current))},[]);p.useEffect(function(){return li.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,ai),document.addEventListener("touchmove",l,ai),document.addEventListener("touchstart",u,ai),function(){li=li.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,ai),document.removeEventListener("touchmove",l,ai),document.removeEventListener("touchstart",u,ai)}},[]);var f=e.removeScrollBar,w=e.inert;return p.createElement(p.Fragment,null,w?p.createElement(i,{styles:_4(s)}):null,f?p.createElement(m4,{gapMode:"margin"}):null)}const C4=n4(sT,k4);var cT=p.forwardRef(function(e,t){return p.createElement(ud,Tr({},e,{ref:t,sideCar:C4}))});cT.classNames=ud.classNames;const uT="Popover",[dT,F8]=vo(uT,[Yu]),Og=Yu(),[P4,Co]=dT(uT),A4=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!1}=e,a=Og(t),l=p.useRef(null),[c,u]=p.useState(!1),[d=!1,h]=OS({prop:r,defaultProp:s,onChange:i});return p.createElement(d$,a,p.createElement(P4,{scope:t,contentId:HR(),triggerRef:l,open:d,onOpenChange:h,onOpenToggle:p.useCallback(()=>h(f=>!f),[h]),hasCustomAnchor:c,onCustomAnchorAdd:p.useCallback(()=>u(!0),[]),onCustomAnchorRemove:p.useCallback(()=>u(!1),[]),modal:o},n))},R4="PopoverTrigger",O4=p.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Co(R4,n),i=Og(n),o=Be(t,s.triggerRef),a=p.createElement(ze.button,U({type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":pT(s.open
255)},r,{ref:o,onClick:Se(e.onClick,s.onOpenToggle)}));return s.hasCustomAnchor?a:p.createElement(h$,U({asChild:!0},i),a)}),hT="PopoverPortal",[$4,j4]=dT(hT,{forceMount:void 0}),N4=e=>{const{__scopePopover:t,forceMount:n,children:r,container:s}=e,i=Co(hT,t);return p.createElement($4,{scope:t,forceMount:n},p.createElement(sr,{present:n||i.open},p.createElement(RS,{asChild:!0,container:s},r)))},nl="PopoverContent",D4=p.forwardRef((e,t)=>{const n=j4(nl,e.__scopePopover),{forceMount:r=n.forceMount,...s}=e,i=Co(nl,e.__scopePopover);return p.createElement(sr,{present:r||i.open},i.modal?p.createElement(L4,U({},s,{ref:t})):p.createElement(I4,U({},s,{ref:t})))}),L4=p.forwardRef((e,t)=>{const n=Co(nl,e.__scopePopover),r=p.useRef(null),s=Be(t,r),i=p.useRef(!1);return p.useEffect(()=>{const o=r.current;if(o)return WF(o)},[]),p.createElement(cT,{as:tT,allowPinchZoom:!0},p.createElement(fT,U({},e,{ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),i.current||(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Se(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:Se(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})))}),I4=p.forwardRef((e,t)=>{const n=Co(nl,e.__scopePopover),r=p.useRef(!1),s=p.useRef(!1);return p.createElement(fT,U({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=e.onCloseAutoFocus)===null||o===void 0||o.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=e.onInteractOutside)===null||o===void 0||o.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}}))}),fT=p.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,h=Co(nl,n),f=Og(n);return RF(),p.createElement(OF,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i},p.createElement(Tm,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1)},p.createElement(k1,U({"data-state":pT(h.open),role:"dialog",id:h.contentId},f,d,{ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))});function pT(e){return e?"open":"closed"}const M4=A4,F4=O4,V4=N4,mT=D4,U4=M4,B4=F4,gT=p.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>x.jsx(V4,{children:x.jsx(mT,{ref:s,align:t,sideOffset:n,className:fn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));gT.displayName=mT.displayName;const z4=p.createContext(void 0);function W4(e){const t=p.useContext(z4);return e||t||"ltr"}function H4(e,[t,n]){return Math.min(n,Math.max(t,e))}function K4(e,t){return p.useReducer((n,r)=>{const s=t[n][r];return s??n},e)}const vT="ScrollArea",[yT,V8]=vo(vT),[q4,Kt]=yT(vT),G4=p.forwardRef((e,t)=>
255{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:i=600,...o}=e,[a,l]=p.useState(null),[c,u]=p.useState(null),[d,h]=p.useState(null),[f,w]=p.useState(null),[m,b]=p.useState(null),[v,g]=p.useState(0),[y,S]=p.useState(0),[E,_]=p.useState(!1),[C,k]=p.useState(!1),P=Be(t,I=>l(I)),R=W4(s);return p.createElement(q4,{scope:n,type:r,dir:R,scrollHideDelay:i,scrollArea:a,viewport:c,onViewportChange:u,content:d,onContentChange:h,scrollbarX:f,onScrollbarXChange:w,scrollbarXEnabled:E,onScrollbarXEnabledChange:_,scrollbarY:m,onScrollbarYChange:b,scrollbarYEnabled:C,onScrollbarYEnabledChange:k,onCornerWidthChange:g,onCornerHeightChange:S},p.createElement(ze.div,U({dir:R},o,{ref:P,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})))}),Y4="ScrollAreaViewport",Q4=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...s}=e,i=Kt(Y4,n),o=p.useRef(null),a=Be(t,o,i.onViewportChange);return p.createElement(p.Fragment,null,p.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),p.createElement(ze.div,U({"data-radix-scroll-area-viewport":""},s,{ref:a,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),p.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),ar="ScrollAreaScrollbar",wT=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Kt(ar,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,a=e.orientation==="horizontal";return p.useEffect(()=>(a?i(!0):o(!0),()=>{a?i(!1):o(!1)}),[a,i,o]),s.type==="hover"?p.createElement(J4,U({},r,{ref:t,forceMount:n})):s.type==="scroll"?p.createElement(X4,U({},r,{ref:t,forceMount:n})):s.type==="auto"?p.createElement(bT,U({},r,{ref:t,forceMount:n})):s.type==="always"?p.createElement($g,U({},r,{ref:t})):null}),J4=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Kt(ar,e.__scopeScrollArea),[i,o]=p.useState(!1);return p.useEffect(()=>{const a=s.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),o(!0)},u=()=>{l=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",u)}}},[s.scrollArea,s.scrollHideDelay]),p.createElement(sr,{present:n||i},p.createElement(bT,U({"data-state":i?"visible":"hidden"},r,{ref:t})))}),X4=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Kt(ar,e.__scopeScrollArea),i=e.orientation==="horizontal",o=hd(()=>l("SCROLL_END"),100),[a,l]=K4("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,s.scrollHideDelay,l]),p.useEffect(()=>{const c=s.viewport,u=i?"scrollLeft":"scrollTop";if(c){let d=c[u];const h=()=>{const f=c[u];d!==f&&(l("SCROLL"),o()),d=f};return c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[s.viewport,i,l,o]),p.createElement(sr,{present:n||a!=="hidden"},p.createElement($g,U({"data-state":a==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:Se(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Se(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),bT=p.forwardRef((e,t)=>{const n=Kt(ar,e.__scopeScrollArea),{forceMount:r,...s}=e,[i,o]=p.useState(!1),a=e.orientation==="horizontal",l=hd(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;o(a?c:u)}},10);return ho(n.viewport,l),ho(n.content,l),p.createElement(sr,{present:r||i},p.createElement($g,U({"data-state":i?"visible":"hidden"},s,{ref:t})))}),$g=p.forwardRef((e,t)=>
255{const{orientation:n="vertical",...r}=e,s=Kt(ar,e.__scopeScrollArea),i=p.useRef(null),o=p.useRef(0),[a,l]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=_T(a.viewport,a.content),u={...r,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:h=>i.current=h,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:h=>o.current=h};function d(h,f){return o6(h,o.current,a,f)}return n==="horizontal"?p.createElement(Z4,U({},u,{ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const h=s.viewport.scrollLeft,f=Hw(h,a,s.dir);i.current.style.transform=`translate3d(${f}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=d(h,s.dir))}})):n==="vertical"?p.createElement(e6,U({},u,{ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const h=s.viewport.scrollTop,f=Hw(h,a);i.current.style.transform=`translate3d(0, ${f}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=d(h))}})):null}),Z4=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,i=Kt(ar,e.__scopeScrollArea),[o,a]=p.useState(),l=p.useRef(null),c=Be(t,l,i.onScrollbarXChange);return p.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.createElement(ST,U({"data-orientation":"horizontal"},s,{ref:c,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":dd(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(i.viewport){const h=i.viewport.scrollLeft+u.deltaX;e.onWheelScroll(h),kT(h,d)&&u.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Tu(o.paddingLeft),paddingEnd:Tu(o.paddingRight)}})}}))}),e6=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,i=Kt(ar,e.__scopeScrollArea),[o,a]=p.useState(),l=p.useRef(null),c=Be(t,l,i.onScrollbarYChange);return p.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.createElement(ST,U({"data-orientation":"vertical"},s,{ref:c,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":dd(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(i.viewport){const h=i.viewport.scrollTop+u.deltaY;e.onWheelScroll(h),kT(h,d)&&u.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Tu(o.paddingTop),paddingEnd:Tu(o.paddingBottom)}})}}))}),[t6,xT]=yT(ar),ST=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...h}=e,f=Kt(ar,n),[w,m]=p.useState(null),b=Be(t,P=>m(P)),v=p.useRef(null),g=p.useRef(""),y=f.viewport,S=r.content-r.viewport,E=Ve(u),_=Ve(l),C=hd(d,10);function k(P){if(v.current){const R=P.clientX-v.current.left,I=P.clientY-v.current.top;c({x:R,y:I})}}return p.useEffect(()=>{const P=R=>{const I=R.target;(w==null?void 0:w.contains(I))&&E(R,S)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[y,w,S,E]),p.useEffect(_,[r,_]),ho(w,C),ho(f.content,C),p.createElement(t6,{scope:n,scrollbar:w,hasThumb:s,onThumbChange:Ve(i),onThumbPointerUp:Ve(o),onThumbPositionChange:_,onThumbPointerDown:Ve(a)},p.createElement(ze.div,U({},h,{ref:b,style:{position:"absolute",...h.style},onPointerDown:Se(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),v.current=w.getBoundingClientRect(),g.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),k(P))}),onPointerMove:Se(e.onPointerMove,k),onPointerUp:Se(e.onPointerUp,P=>{const R=P.target;R.hasPointerCapture(P.pointerId)&&R.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=g.current,f.viewport&&(f.viewport.style.scrollBehavior=""),v.current=null})})))}),Ap="ScrollAreaThumb",n6=p.forwardRef((e,t)=>
255{const{forceMount:n,...r}=e,s=xT(Ap,e.__scopeScrollArea);return p.createElement(sr,{present:n||s.hasThumb},p.createElement(r6,U({ref:t},r)))}),r6=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,i=Kt(Ap,n),o=xT(Ap,n),{onThumbPositionChange:a}=o,l=Be(t,d=>o.onThumbChange(d)),c=p.useRef(),u=hd(()=>{c.current&&(c.current(),c.current=void 0)},100);return p.useEffect(()=>{const d=i.viewport;if(d){const h=()=>{if(u(),!c.current){const f=a6(d,a);c.current=f,a()}};return a(),d.addEventListener("scroll",h),()=>d.removeEventListener("scroll",h)}},[i.viewport,u,a]),p.createElement(ze.div,U({"data-state":o.hasThumb?"visible":"hidden"},s,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Se(e.onPointerDownCapture,d=>{const f=d.target.getBoundingClientRect(),w=d.clientX-f.left,m=d.clientY-f.top;o.onThumbPointerDown({x:w,y:m})}),onPointerUp:Se(e.onPointerUp,o.onThumbPointerUp)}))}),ET="ScrollAreaCorner",s6=p.forwardRef((e,t)=>{const n=Kt(ET,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.createElement(i6,U({},e,{ref:t})):null}),i6=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=Kt(ET,n),[i,o]=p.useState(0),[a,l]=p.useState(0),c=!!(i&&a);return ho(s.scrollbarX,()=>{var u;const d=((u=s.scrollbarX)===null||u===void 0?void 0:u.offsetHeight)||0;s.onCornerHeightChange(d),l(d)}),ho(s.scrollbarY,()=>{var u;const d=((u=s.scrollbarY)===null||u===void 0?void 0:u.offsetWidth)||0;s.onCornerWidthChange(d),o(d)}),c?p.createElement(ze.div,U({},r,{ref:t,style:{width:i,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function Tu(e){return e?parseInt(e,10):0}function _T(e,t){const n=e/t;return isNaN(n)?0:n}function dd(e){const t=_T(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function o6(e,t,n,r="ltr"){const s=dd(n),i=s/2,o=t||i,a=s-o,l=n.scrollbar.paddingStart+o,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,u=n.content-n.viewport,d=r==="ltr"?[0,u]:[u*-1,0];return TT([l,c],d)(e)}function Hw(e,t,n="ltr"){const r=dd(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,a=i-r,l=n==="ltr"?[0,o]:[o*-1,0],c=H4(e,l);return TT([0,o],[0,a])(c)}function TT(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function kT(e,t){return e>0&&e<t}const a6=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=n.left!==i.left,a=n.top!==i.top;(o||a)&&t(),n=i,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function hd(e,t){const n=Ve(e),r=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),p.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function ho(e,t){const n=Ve(t);Yr(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}const CT=G4,l6=Q4,c6=s6,PT=p.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(CT,{ref:r,className:fn("relative overflow-hidden",e),...n,children:[x.jsx(l6,{className:"h-full w-full rounded-[inherit]",children:t}),x.jsx(AT,{}),x.jsx(c6,{})]}));PT.displayName=CT.displayName;const AT=p.forwardRef(({className:e,orientation:t="vertical",...n},r)=>x.jsx(wT,{ref:r,orientation:t,className:fn("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:x.jsx(n6,{className:"relative flex-1 rounded-full bg-border"})}));AT.displayName=wT.displayName;function pe(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Zr(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const RT=6048e5,u6=864e5,uc=43200,Kw=1440;let d6={};function xl(){return d6}function rl(e,t){var a,l,c,u;const n=xl(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,s=pe(e),i=s.getDay(),o=(i<r?7:0)+i-r;return s.setDate(s.getDate()-o),s.setHours(0,0,0,0),s}function ku(e){return rl(e,{weekStartsOn:1}
255)}function OT(e){const t=pe(e),n=t.getFullYear(),r=Zr(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const s=ku(r),i=Zr(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=ku(i);return t.getTime()>=s.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function qw(e){const t=pe(e);return t.setHours(0,0,0,0),t}function Cu(e){const t=pe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function h6(e,t){const n=qw(e),r=qw(t),s=+n-Cu(n),i=+r-Cu(r);return Math.round((s-i)/u6)}function f6(e){const t=OT(e),n=Zr(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ku(n)}function Dc(e,t){const n=pe(e),r=pe(t),s=n.getTime()-r.getTime();return s<0?-1:s>0?1:s}function p6(e){return Zr(e,Date.now())}function m6(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function g6(e){if(!m6(e)&&typeof e!="number")return!1;const t=pe(e);return!isNaN(Number(t))}function v6(e,t){const n=pe(e),r=pe(t),s=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return s*12+i}function y6(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function w6(e,t){return+pe(e)-+pe(t)}function b6(e){const t=pe(e);return t.setHours(23,59,59,999),t}function x6(e){const t=pe(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function S6(e){const t=pe(e);return+b6(t)==+x6(t)}function E6(e,t){const n=pe(e),r=pe(t),s=Dc(n,r),i=Math.abs(v6(n,r));let o;if(i<1)o=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-s*i);let a=Dc(n,r)===-s;S6(pe(e))&&i===1&&Dc(e,r)===1&&(a=!1),o=s*(i-Number(a))}return o===0?0:o}function _6(e,t,n){const r=w6(e,t)/1e3;return y6(n==null?void 0:n.roundingMethod)(r)}function T6(e){const t=pe(e),n=Zr(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const k6={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},C6=(e,t,n)=>{let r;const s=k6[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Bi(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const P6={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},A6={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},R6={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},O6={date:Bi({formats:P6,defaultWidth:"full"}),time:Bi({formats:A6,defaultWidth:"full"}),dateTime:Bi({formats:R6,defaultWidth:"full"})},$6={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},j6=(e,t,n,r)=>$6[e];function kn(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):o;s=e.formattingValues[a]||e.formattingValues[o]}else{const o=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;s=e.values[a]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return s[i]}}const N6={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},D6={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},L6={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},I6={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
255ay","Saturday"]},M6={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},F6={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},V6=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},U6={ordinalNumber:V6,era:kn({values:N6,defaultWidth:"wide"}),quarter:kn({values:D6,defaultWidth:"wide",argumentCallback:e=>e-1}),month:kn({values:L6,defaultWidth:"wide"}),day:kn({values:I6,defaultWidth:"wide"}),dayPeriod:kn({values:M6,defaultWidth:"wide",formattingValues:F6,defaultFormattingWidth:"wide"})};function Cn(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;const o=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?z6(a,d=>d.test(o)):B6(a,d=>d.test(o));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(o.length);return{value:c,rest:u}}}function B6(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function z6(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function $T(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const a=t.slice(s.length);return{value:o,rest:a}}}const W6=/^(\d+)(th|st|nd|rd)?/i,H6=/\d+/i,K6={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},q6={any:[/^b/i,/^(a|c)/i]},G6={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Y6={any:[/1/i,/2/i,/3/i,/4/i]},Q6={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},J6={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},X6={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Z6={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},eV={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},tV={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},nV={ordinalNumber:$T({matchPattern:W6,parsePattern:H6,valueCallback:e=>parseInt(e,10)}),era:Cn({matchPatterns:K6,defaultMatchWidth:"wide",parsePatterns:q6,defaultParseWidth:"any"}),quarter:Cn({matchPatterns:G6,defaultMatchWidth:"wide",parsePatterns:Y6,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Cn({matchPatterns:Q6,defaultMatchWidth:"wide",parsePatterns:J6,defaultParseWidth:"any"}),day:Cn({matchPatterns:X6,defaultMatchWidth:"wide",parsePatterns:Z6,defaultParseWidth:"any"}),dayPeriod:Cn({matchPatterns:eV,defaultMatchWidth:"any",parsePatterns:tV,defaultParseWidth:"any"})},jT={code:"en-US",formatDistance:C6,formatLong:O6,formatRelative:j6,localize:U6,match:nV,options:{weekStartsOn:0,firstWeekContainsDate:1}};function rV(e){const t=pe(e);return h6(t,T6(t))+1}function sV(e){const t=pe(e),n=+ku(t)-+f6(t);return Math.round(n/RT)+1}function NT(e,t){var u,d,h,f;const n=pe(e),r=n.getFullYear(),s=xl(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??s.firstWeekContainsDate??((f=(h=s.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,o=Zr(e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const a=rl(o,t),l=Zr(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=rl(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function iV(e,t){var a,l,c,u;const n=xl(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,s=NT(e,t),i=Zr(e,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),rl(i,t)}function oV(e,t){const n=pe(e),r=+rl(n,t)-+iV(n,t);return Math.round(r/RT)+1}function de(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const pr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return de(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):de(n+1,2)},d(e,t){return de(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return de(e.getHours()%12||12,t.length)},H(e,t){return de(e.getHours(),t.length)},m(e,t){return de(e.getMinutes(),t.length)},s(e,t){return de(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return de(s,t.length)}},ci={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Gw={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return pr.y(e,t)},Y:function(e,t,n,r){const s=NT(e,r),i=s>0?s:1-s;if(t==="YY"){const o=i%100;return de(o,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):de(i,t.length)},R:function(e,t){const n=OT(e);return de(n,t.length)},u:function(e,t){const n=e.getFullYear();return de(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return de(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return de(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return pr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return de(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const s=oV(e,r);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):de(s,t.length)},I:function(e,t,n){const r=sV(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):de(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):pr.d(e,t)},D:function(e,t,n){const r=rV(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):de(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return de(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return de(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),s=r===0?7:r;switch(t){case"i":return String(s);case"ii":return de(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let s;
vendor: 4,744 bytes, line 255
255switch(r===12?s=ci.noon:r===0?s=ci.midnight:s=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let s;switch(r>=17?s=ci.evening:r>=12?s=ci.afternoon:r>=4?s=ci.morning:s=ci.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return pr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):pr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):de(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):de(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):pr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):pr.s(e,t)},S:function(e,t){return pr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Qw(r);case"XXXX":case"XX":return ys(r);case"XXXXX":case"XXX":default:return ys(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Qw(r);case"xxxx":case"xx":return ys(r);case"xxxxx":case"xxx":default:return ys(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Yw(r,":");case"OOOO":default:return"GMT"+ys(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Yw(r,":");case"zzzz":default:return"GMT"+ys(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return de(r,t.length)},T:function(e,t,n){const r=e.getTime();return de(r,t.length)}};function Yw(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+t+de(i,2)}function Qw(e,t){return e%60===0?(e>0?"-":"+")+de(Math.abs(e)/60,2):ys(e,t)}function ys(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=de(Math.trunc(r/60),2),i=de(r%60,2);return n+s+t+i}const Jw=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},DT=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},aV=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return Jw(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Jw(r,t)).replace("{{time}}",DT(s,t))},lV={p:DT,P:aV},cV=/^D+$/,uV=/^Y+$/,dV=["D","DD","YY","YYYY"];function hV(e){return cV.test(e)}function fV(e){return uV.test(e)}function pV(e,t,n){const r=mV(e,t,n);if(console.warn(r),dV.includes(e))throw new RangeError(r)}function mV(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const gV=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vV=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yV=/^'([^]*?)'?$/,wV=/''/g,bV=/[a-zA-Z]/;function xV(e,t,n){var u,d,h,f,w,m,b,v;const r=xl(),s=(n==null?void 0:n.locale)??r.locale??jT,i=(n==null?void 0:n.firstWeekContainsDate)??((d=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((m=(w=n==null?void 0:n.locale)==null?void 0:w.options)==null?void 0:m.weekStartsOn)??r.weekStartsOn??((v=(b=r.locale)==null?void 0:b.options)==null?void 0:v.weekStartsOn)??0,a=pe(e);if(!g6(a))throw new RangeError("Invalid time value");let l=t.match(vV).map(g=>{const y=g[0];if(y==="p"||y==="P"){const S=lV[y];return S(g,s.formatLong)}return g}).join("").match(gV).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const y=g[0];if(y==="'")return{isToken:!1,value:SV(g)};if(Gw[y])return{isToken:!0,value:g};
255if(y.match(bV))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:g}});s.localize.preprocessor&&(l=s.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:o,locale:s};return l.map(g=>{if(!g.isToken)return g.value;const y=g.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&fV(y)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&hV(y))&&pV(y,t,String(e));const S=Gw[y[0]];return S(a,y,s.localize,c)}).join("")}function SV(e){const t=e.match(yV);return t?t[1].replace(wV,"'"):e}function EV(e,t,n){const r=xl(),s=(n==null?void 0:n.locale)??r.locale??jT,i=2520,o=Dc(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:o});let l,c;o>0?(l=pe(t),c=pe(e)):(l=pe(e),c=pe(t));const u=_6(c,l),d=(Cu(c)-Cu(l))/1e3,h=Math.round((u-d)/60);let f;if(h<2)return n!=null&&n.includeSeconds?u<5?s.formatDistance("lessThanXSeconds",5,a):u<10?s.formatDistance("lessThanXSeconds",10,a):u<20?s.formatDistance("lessThanXSeconds",20,a):u<40?s.formatDistance("halfAMinute",0,a):u<60?s.formatDistance("lessThanXMinutes",1,a):s.formatDistance("xMinutes",1,a):h===0?s.formatDistance("lessThanXMinutes",1,a):s.formatDistance("xMinutes",h,a);if(h<45)return s.formatDistance("xMinutes",h,a);if(h<90)return s.formatDistance("aboutXHours",1,a);if(h<Kw){const w=Math.round(h/60);return s.formatDistance("aboutXHours",w,a)}else{if(h<i)return s.formatDistance("xDays",1,a);if(h<uc){const w=Math.round(h/Kw);return s.formatDistance("xDays",w,a)}else if(h<uc*2)return f=Math.round(h/uc),s.formatDistance("aboutXMonths",f,a)}if(f=E6(c,l),f<12){const w=Math.round(h/uc);return s.formatDistance("xMonths",w,a)}else{const w=f%12,m=Math.trunc(f/12);return w<3?s.formatDistance("aboutXYears",m,a):w<9?s.formatDistance("overXYears",m,a):s.formatDistance("almostXYears",m+1,a)}}function _V(e,t){return EV(e,p6(e),t)}const Xw={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},TV=(e,t,n)=>{let r;const s=n!=null&&n.addSuffix?Xw[e].withPreposition:Xw[e].standalone;return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:"vor "+r:r},kV={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},CV={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},PV={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},AV={date:Bi({formats:kV,defaultWidth:"full"}),time:Bi({formats:CV,defaultWidth:"full"}),dateTime:Bi({formats:PV,defaultWidth:"full"})},RV={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},OV=(e,t,n,r)=>RV[e],$V={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},jV={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},Rp={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},NV={narrow:Rp.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:Rp.wide},DV={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},LV={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nac
255hm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},IV={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},MV=e=>Number(e)+".",FV={ordinalNumber:MV,era:kn({values:$V,defaultWidth:"wide"}),quarter:kn({values:jV,defaultWidth:"wide",argumentCallback:e=>e-1}),month:kn({values:Rp,formattingValues:NV,defaultWidth:"wide"}),day:kn({values:DV,defaultWidth:"wide"}),dayPeriod:kn({values:LV,defaultWidth:"wide",formattingValues:IV,defaultFormattingWidth:"wide"})},VV=/^(\d+)(\.)?/i,UV=/\d+/i,BV={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},zV={any:[/^v/i,/^n/i]},WV={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},HV={any:[/1/i,/2/i,/3/i,/4/i]},KV={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},qV={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},GV={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},YV={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},QV={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},JV={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},XV={ordinalNumber:$T({matchPattern:VV,parsePattern:UV,valueCallback:e=>parseInt(e)}),era:Cn({matchPatterns:BV,defaultMatchWidth:"wide",parsePatterns:zV,defaultParseWidth:"any"}),quarter:Cn({matchPatterns:WV,defaultMatchWidth:"wide",parsePatterns:HV,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Cn({matchPatterns:KV,defaultMatchWidth:"wide",parsePatterns:qV,defaultParseWidth:"any"}),day:Cn({matchPatterns:GV,defaultMatchWidth:"wide",parsePatterns:YV,defaultParseWidth:"any"}),dayPeriod:Cn({matchPatterns:QV,defaultMatchWidth:"wide",parsePatterns:JV,defaultParseWidth:"any"})},LT={code:"de",formatDistance:TV,formatLong:AV,formatRelative:OV,localize:FV,match:XV,options:{weekStartsOn:1,firstWeekContainsDate:4}};function ZV(){const{user:e}=Ym(),[t,n]=p.useState([]),[r,s]=p.useState(!1),i=t.filter(l=>!l.is_read).length;p.useEffect(()=>{if(!e)return;(async()=>{const{data:u}=await Ct.from("notifications").select("*").eq("user_id",e.id).order("created_at",{ascending:!1}).limit(20);u&&n(u)})();const c=Ct.channel("notifications").on("postgres_changes",{event:"INSERT",schema:"public",table:"notifications",filter:`user_id=eq.${e.id}`},u=>{n(d=>[u.new,...d])}).subscribe();return()=>{Ct.removeChannel(c)}},[e]);const o=async l=>{await Ct.from("notifications").update({is_read:!0}).eq("id",l),n(c=>c.map(u=>u.id===l?{...u,is_read:!0}:u))},a=async()=>{const l=t.filter(c=>!c.is_read).map(c=>c.id);l.length!==0&&(await Ct.from("notifications").update({is_read:!0}).in("id",l),n(c=>c.map(u=>({...u,is_read:!0}))))};return e?x.jsxs(U4,{open:r,onOpenChange:s,children:[x.jsx(B4,{asChild:!0,children:x.jsxs(Ws,{variant:"ghost",size:"icon",className:"relative",children:[x.jsx(xA,{className:"h-5 w-5"}),i>0&&x.jsx("span",{className:"absolute -top-1 -right-1 h-5 w-5 rounded-full bg-primary text-primary-foreground text-xs flex items-center justify-center font-medium",children:i>9?"9+":i}),x.jsx("span",{className:"sr-only",children:"Benachrichtigungen"})]})}),x.jsxs(gT,{className:"w-80 p-0",align:"end",children:[x.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[x.jsx("h3",{className:"font-display font-semibold text-foreground",children:"Benachrichtigungen"}),i>0&&x.jsx(Ws,{variant:"ghost",size:"sm",onClick:a,className:"text-xs",children:"Alle gelesen"})]}),x.jsx(PT,{className:"h-[300px]",children:t.length===0?x.jsx("div",{className:"p-4 text-center text-muted-foreground text-sm",children:"Keine Benachrichtigungen"}):x.jsx("div",{className:"divide-y divide-border",children:t.map(l=>x.jsx("div",{className:`p-4 hover:bg-muted/50 transition-colors cursor-pointer ${l.is_read?"":"bg-primary/5"}`,onClick:()=>{o(l.id),l.link&&s(!1)},children:l.link?x.jsx(_e,{to:l.link,className:"block",children:x.jsx(Zw,{notification:l})}):x.jsx(Zw,{notification:l})},l.id))})})]})]}):null}function Zw({notification:e}){return x.jsx(x.Fragment,{children:x.jsxs("div",{className:"flex items-start gap-2",children:[!e.is_read&&x.jsx("span",{className:"w-2 h-2 rounded-full bg-primary mt-1.5 flex-shrink-0"}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsx("p",{className:"font-medium text-sm text-foreground",children:e.title}),x.jsx("p",{className:"text-sm text-muted-foreground mt-0.5 line-clamp-2",children:e.message}
255),x.jsx("p",{className:"text-xs text-muted-foreground/70 mt-1",children:_V(new Date(e.created_at),{addSuffix:!0,locale:LT})})]})]})})}const eb=[{label:"Programm",href:"/events"},{label:"Das Haus",href:"/about"},{label:"Besucherinfos",href:"/besucherinfos"},{label:"Factory mieten",href:"/booking"},{label:"Fundgrube",href:"/fundgrube"},{label:"Kontakt",href:"/kontakt"}];function eU(){const[e,t]=p.useState(!1),[n,r]=p.useState(!1),{user:s,signOut:i}=Ym(),{isAdmin:o}=AF();return p.useEffect(()=>{const a=()=>t(window.scrollY>50);return window.addEventListener("scroll",a),()=>window.removeEventListener("scroll",a)},[]),x.jsxs(x.Fragment,{children:[x.jsx("nav",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${e?"bg-card/95 backdrop-blur-md border-b border-border shadow-sm":"bg-warm-dark/90 backdrop-blur-sm"}`,children:x.jsxs("div",{className:"container flex items-center justify-between h-16 md:h-20",children:[x.jsx(_e,{to:"/",className:"flex items-center",children:x.jsx("img",{src:lp,alt:"Factory Magdeburg",className:`h-8 md:h-10 w-auto transition-all duration-300 ${e?"brightness-0":"brightness-0 invert"}`})}),x.jsx("div",{className:"hidden lg:flex items-center gap-8",children:eb.map(a=>x.jsx(_e,{to:a.href,className:`font-display text-sm tracking-wider transition-colors ${e?"text-muted-foreground hover:text-foreground":"text-primary-foreground/70 hover:text-primary-foreground"}`,children:a.label.toUpperCase()},a.label))}),x.jsx("div",{className:"hidden lg:flex items-center gap-4",children:s?x.jsxs(x.Fragment,{children:[o&&x.jsx(_e,{to:"/admin",className:`transition-colors ${e?"text-muted-foreground hover:text-foreground":"text-primary-foreground/70 hover:text-primary-foreground"}`,title:"Admin",children:x.jsx(XS,{className:"w-5 h-5"})}),x.jsx(ZV,{}),x.jsx(_e,{to:"/profil",className:`transition-colors ${e?"text-muted-foreground hover:text-foreground":"text-primary-foreground/70 hover:text-primary-foreground"}`,title:"Profil",children:x.jsx(ny,{className:"w-5 h-5"})}),x.jsxs(_e,{to:"/meine-tickets",className:`font-display text-sm tracking-wider flex items-center gap-1.5 transition-colors ${e?"text-muted-foreground hover:text-foreground":"text-primary-foreground/70 hover:text-primary-foreground"}`,children:[x.jsx(ZS,{className:"w-4 h-4"})," MEINE TICKETS"]}),x.jsx(_e,{to:"/events",className:"font-display text-sm tracking-wider bg-primary text-primary-foreground px-6 py-2.5 rounded-sm hover:opacity-90 transition-opacity",children:"TICKETSHOP"}),x.jsx("button",{onClick:i,className:`transition-colors ${e?"text-muted-foreground hover:text-foreground":"text-primary-foreground/70 hover:text-primary-foreground"}`,title:"Abmelden",children:x.jsx(TA,{className:"w-5 h-5"})})]}):x.jsxs(x.Fragment,{children:[x.jsxs(_e,{to:"/auth",className:`font-display text-sm tracking-wider flex items-center gap-1.5 transition-colors ${e?"text-muted-foreground hover:text-foreground":"text-primary-foreground/70 hover:text-primary-foreground"}`,children:[x.jsx(ny,{className:"w-4 h-4"})," LOGIN"]}),x.jsx(_e,{to:"/events",className:"font-display text-sm tracking-wider bg-primary text-primary-foreground px-6 py-2.5 rounded-sm hover:opacity-90 transition-opacity",children:"TICKETSHOP"})]})}),x.jsx("button",{onClick:()=>r(!0),className:`lg:hidden ${e?"text-foreground":"text-primary-foreground"}`,children:x.jsx(kA,{className:"w-6 h-6"})})]})}),x.jsx(OL,{children:n&&x.jsxs(_n.div,{initial:{opacity:0}
255,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] bg-warm-dark flex flex-col",children:[x.jsxs("div",{className:"container flex items-center justify-between h-16",children:[x.jsx("img",{src:lp,alt:"Factory Magdeburg",className:"h-8 w-auto brightness-0 invert"}),x.jsx("button",{onClick:()=>r(!1),children:x.jsx(Pm,{className:"w-6 h-6 text-primary-foreground"})})]}),x.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-6",children:[eb.map((a,l)=>x.jsx(_n.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:l*.05},children:x.jsx(_e,{to:a.href,onClick:()=>r(!1),className:"font-display text-3xl tracking-wider text-primary-foreground hover:text-warm-highlight transition-colors",children:a.label.toUpperCase()})},a.label)),x.jsx(_n.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},children:s?x.jsx("button",{onClick:()=>{i(),r(!1)},className:"font-display text-xl tracking-wider text-primary-foreground/60",children:"ABMELDEN"}):x.jsx(_e,{to:"/auth",onClick:()=>r(!1),className:"font-display text-3xl tracking-wider text-warm-highlight",children:"LOGIN"})})]})]})})]})}const tU="/assets/hero-header-BwOpmVYx.jpg";function nU(e){const[t,n]=p.useState({days:0,hours:0,minutes:0,seconds:0});return p.useEffect(()=>{if(!e)return;const r=()=>{const i=new Date(e).getTime()-Date.now();if(i<=0){n({days:0,hours:0,minutes:0,seconds:0});return}n({days:Math.floor(i/864e5),hours:Math.floor(i%864e5/36e5),minutes:Math.floor(i%36e5/6e4),seconds:Math.floor(i%6e4/1e3)})};r();const s=setInterval(r,1e3);return()=>clearInterval(s)},[e]),t}function rU(){const e=p.useRef(null),{scrollYProgress:t}=EF({target:e,offset:["start start","end start"]}),n=yh(t,[0,1],["0%","30%"]),r=yh(t,[0,1],["0%","50%"]),s=yh(t,[0,.8],[1,0]),{data:i}=z1({queryKey:["next-event"],queryFn:async()=>{const{data:a,error:l}=await Ct.from("events").select("id, title, date, price_cents, sold_out, external_ticket_url").eq("is_published",!0).gte("date",new Date().toISOString()).order("date",{ascending:!0}).limit(1).maybeSingle();if(l)throw l;if(!a)return null;const{data:c}=await Ct.from("ticket_types").select("price_cents").eq("event_id",a.id).eq("is_active",!0).eq("is_sold_out",!1).order("price_cents",{ascending:!0}).limit(1),u=c&&c.length>0,d=u?c[0].price_cents:a.price_cents;return{...a,display_price_cents:d,has_internal_tickets:u}}}),o=nU((i==null?void 0:i.date)??null);return x.jsxs("section",{ref:e,className:"relative h-screen flex items-center justify-center overflow-hidden",children:[x.jsxs(_n.div,{className:"absolute inset-0",style:{y:n},children:[x.jsx("img",{src:tU,alt:"Factory Magdeburg",className:"absolute inset-x-0 bottom-0 w-full h-[130%] object-cover object-[center_100%]"}),x.jsx("div",{className:"absolute inset-0 bg-warm-dark/50"})]}),x.jsxs(_n.div,{className:"relative z-10 text-center container",style:{y:r,opacity:s},children:[x.jsxs(_n.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8},children:[x.jsx("img",{src:lp,alt:"Factory Magdeburg",className:"w-64 sm:w-80 md:w-96 lg:w-[28rem] mx-auto"}),x.jsx("p",{className:"text-primary-foreground/70 font-body text-sm md:text-base mt-4 tracking-widest uppercase",children:"Industrial Concert Venue"})]}),i&&x.jsxs(_n.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.2},className:"mt-8",children:[x.jsx("p",{className:"font-display text-[10px] tracking-[0.3em] text-warm-highlight/80 mb-3",children:"NAECHSTES EVENT"}),x.jsx("p",{className:"font-display text-lg sm:text-xl md:text-2xl text-primary-foreground font-semibold mb-1",children:i.title}),x.jsx("p",{className:"text-primary-foreground/60 text-sm mb-4",children:xV(new Date(i.date),"EEEE, dd. MMMM yyyy - HH:mm 'Uhr'",{locale:LT})}),x.jsx("div",{className:"flex justify-center gap-3 sm:gap-5 mb-6",children:[["days","TAGE"],["hours","STD"],["minutes","MIN"],["seconds","SEK"]].map(([a,l])=>x.jsxs("div",{className:"flex flex-col items-center",children:[x.jsx("span",{className:"font-display text-3xl sm:text-4xl md:text-5xl font-bold text-primary-foreground tabular-nums",children:String(o[a]).padStart(2,"0")}),x.jsx("span",{className:"font-display text-[9px] tracking-[0.2em] text-primary-foreground
255/50 mt-1",children:l})]},a))}),!i.sold_out&&x.jsxs(_e,{to:"/events",className:"inline-flex items-center gap-2 font-display text-sm tracking-wider bg-warm-accent text-white px-8 py-3 rounded-sm hover:opacity-90 transition-opacity",children:[x.jsx(ZS,{className:"w-4 h-4"}),i.external_ticket_url&&!i.has_internal_tickets?"ZU DEN TICKETS":(i.display_price_cents??i.price_cents)>0?`TICKETS AB ${((i.display_price_cents??i.price_cents)/100).toFixed(0)} EUR`:"KOSTENLOSE TICKETS"]})]}),!i&&x.jsxs(_n.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.3},className:"flex flex-col sm:flex-row gap-4 justify-center mt-10",children:[x.jsx(_e,{to:"/events",className:"font-display text-sm tracking-wider bg-primary text-primary-foreground px-10 py-4 rounded-sm hover:opacity-90 transition-opacity",children:"PROGRAMM"}),x.jsx(_e,{to:"/booking",className:"font-display text-sm tracking-wider border border-primary-foreground/40 text-primary-foreground px-10 py-4 rounded-sm hover:bg-primary-foreground/10 transition-colors",children:"LOCATION MIETEN"})]})]}),x.jsx(_n.div,{animate:{y:[0,8,0]},transition:{repeat:1/0,duration:2},className:"absolute bottom-8 left-1/2 -translate-x-1/2 z-10",style:{opacity:s},children:x.jsx(_A,{className:"w-6 h-6 text-primary-foreground/50"})})]})}const sU="/assets/crowd-blue-C2A2AHaj.jpg",iU="/assets/band-live-CCSpNQI6.jpg",oU="/assets/venue-stage-BwuajLxx.jpg",aU="/assets/crowd-faces-DhVrOaZx.jpg",lU=[{title:"Programm",desc:"Konzerte & Events",icon:EA,img:iU,href:"/events"},{title:"Das Haus",desc:"Die Location",icon:CA,img:oU,href:"/about"},{title:"Gallery",desc:"Impressionen",icon:bA,img:sU,href:"/gallery"},{title:"Factory mieten",desc:"Ihre Veranstaltung",icon:SA,img:aU,href:"/booking"}];function cU(){return x.jsx("section",{className:"py-16 md:py-24",children:x.jsx("div",{className:"container",children:x.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6",children:lU.map((e,t)=>x.jsx(_n.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:t*.1},children:x.jsxs(_e,{to:e.href,className:"group block text-center",children:[x.jsxs("div",{className:"relative w-32 h-32 md:w-40 md:h-40 mx-auto rounded-full overflow-hidden mb-4 border-4 border-border group-hover:border-primary transition-colors",children:[x.jsx("img",{src:e.img,alt:e.title,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-500"}),x.jsx("div",{className:"absolute inset-0 bg-warm-dark/20 group-hover:bg-warm-dark/10 transition-colors"})]}),x.jsx("h3",{className:"font-display text-lg md:text-xl text-foreground",children:e.title}),x.jsx("p",{className:"text-muted-foreground text-sm",children:e.desc})]})},e.title))})})})}const uU="/assets/factory-logo-dark-BdVSw7Ga.png",dU="/assets/ib-sachsen-anhalt-mark-BjFq7OJC.png",hU=[{label:"Programm",href:"/events"},{label:"Ticketshop",href:"/events"},{label:"Location mieten",href:"/booking"},{label:"Das Haus",href:"/about"},{label:"Jobs",href:"/jobs"},{label:"FAQ",href:"/faq"},{label:"Kontakt",href:"/kontakt"}],fU=[{label:"Impressum",href:"/impressum"},{label:"Datenschutz",href:"/datenschutz"},{label:"Cookie-Richtlinie",href:"/cookie-richtlinie"},{label:"AGB",href:"/agb"},{label:"Widerruf",href:"/widerrufsbelehrung"},{label:"Barrierefreiheit",href:"/barrierefreiheit"},{label:"Newsletter abmelden",href:"/newsletter/abmelden"}];function pU(){const{openSettings:e}=xL();return x.jsxs(x.Fragment,{children:[x.jsx("section",{"aria-label":"Förderer und Nachhaltigkeit",className:"border-t border-border bg-background py-8",children:x.jsx("div",{className:"container",children:x.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-center gap-8 md:gap-16",children:[x.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground text-sm text-center md:text-left",children:[x.jsx(PA,{className:"w-5 h-5 text-primary shrink-0","aria-hidden":"true"}),x.jsxs("span",{children:["Wir produzieren und speichern unseren Strom autark durch"," ",x.jsx("span",{className:"text-foreground font-medium",children:"100 % Solarenergie"}),"."," ",x.jsx(_e,{to:"/auflagen",className:"underline underline-offset-2 hover:text-foreground transition-colors",children:"Weitere Informationen"})]})]}),x.jsx("div",{className:"hidden md:block h-10 w-px bg-border","aria-hidden":"true"}),x.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground text-sm text-center md:text-left",children:[x.jsx("span",{children:"Unterstützt durch die"}),x.jsx("img",{src:dU,alt:"Investitionsbank Sachsen-Anhalt Logo",className:"h-9 w-auto",loading:"lazy"}),x.jsx("span",{className:"text-foreground font-medium",children:"Investitionsbank Sachsen-Anhalt"})]})]})})}),x.jsx("footer",{className:"border-t border-border py-16 bg-card",role:"contentinfo",children:x.jsxs("div",{className:"container",children:[x.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-12",children:[x.jsxs("div",{children:[x.jsx("img",{src:uU,alt:"Factory Magdeburg",className:"h-10 w-auto mb-4"}),x.jsxs("address",{className:"text-muted-foreground text-sm leading-relaxed not-italic",children:["Spirit Events",x.jsx("br",{}),"Werner und Peschke GbR",x.jsx("br",{}),"Karl-Schmidt-Str. 42",x.jsx("br",{}),"39104 Magdeburg",x.jsx("br",{}),x.jsx("a",{href:"mailto:[email protected]",className:"hover:text-foreground transition-colors",children:"[email protected]"})]})]}),x.jsxs("div",{children:[x.jsx("p",{className:"font-display text-sm tracking-wider text-foreground mb-4",children:"NAVIGATION"}),x.jsx("nav",{"aria-label":"Footer-Navigation",children:x.jsx("ul",{className:"grid grid-cols-2 gap-2",children:hU.map(t=>x.jsx("li",{children:x.jsx(_e,{to:t.href,className:"text-muted-foreground text-sm hover:text-foreground transition-colors",children:t.label})},t.label))})})]}),x.jsxs("div",{children:[x.jsx("p",{className:"font-display text-sm tracking-wider text-foreground mb-4",children:"RECHTLICHES"}),x.jsx("nav",{"aria-label":"Rechtliche Links",children:x.jsxs("ul",{className:"flex flex-col gap-2",children:[fU.map(t=>x.jsx("li",{children:x.jsx(_e,{to:t.href,className:"text-muted-foreground text-sm hover:text-foreground transition-colors",children:t.label})},t.label)),x.jsx("li",{children:x.jsxs("button",{onClick:e,className:"text-muted-foreground text-sm hover:text-foreground transition-colors inline-flex items-center gap-1.5",type:"button",children:[x.jsx(JS,{className:"w-3.5 h-3.5","aria-hidden":"true"}),"Datenschutzeinstellungen"]})})]})})]}),x.jsxs("div",{children:[x.jsx("p",{className:"font-display text-sm tracking-wider text-foreground mb-4",children:"FOLGT UNS"}),x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx("a",{href:"https://www.facebook.com/factorymagdeburg/events",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground text-sm hover:text-foreground transition-colors",children:"Facebook"}),x.jsx("a",{href:"https://www.instagram.com/factory_magdeburg_official/",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground text-sm hover:text-foreground transition-colors",children:"Instagram"})]})]})]}),x.jsxs("div",{className:"border-t border-border mt-12 pt-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[x.jsxs("p",{className:"text-muted-foreground text-xs",children:["© ",new Date().getFullYear()," Spirit Events â Werner und Peschke GbR. Alle Rechte vorbehalten."]}),x.jsxs("div",{className:"flex flex-wrap gap-4",children:[x.jsx(_e,{to:"/impressum",className:"text-muted-foreground text-xs hover:text-foreground transition-colors",children:"Impressum"}),x.jsx(_e,{to:"/datenschutz",className:"text-muted-foreground text-xs hover:text-foreground transition-colors",children:"Datenschutz"}),x.jsx(_e,{to:"/agb",className:"text-muted-foreground text-xs hover:text-foreground transition-colors",children:"AGB"}),x.jsx("button",{onClick:e,className:"text-muted-foreground text-xs hover:text-foreground transition-colors",type:"button",children:"Cookie-Einstellungen"})]})]})]})})]})}const mU=p.lazy(()=>B(()=>import("./NewsCarousel-CV6aGpS2.js"),__vite__mapDeps([0,1,2])).then(e=>({default:e.NewsCarousel}))),gU=p.lazy(()=>B(()=>import("./EventsSection-CyckF5Jg.js"),__vite__mapDeps([3,4])).then(e=>({default:e.EventsSection}))),vU=p.lazy(()=>B(()=>import("./AboutSection-dMN1xgJW.js"),[]).then(e=>({default:e.AboutSection}))),yU=p.lazy(()=>B(()=>import("./BookingSection-Bfucun7j.js"),__vite__mapDeps([5,6,7])).then(e=>({default:e.BookingSection}))),wU=p.lazy(()=>B(()=>import("./GallerySection-BAXZrAi8.js"),__vite__mapDeps([8,9])).then(e=>({default:e.GallerySection}))),bU=p.lazy(()=>B(()=>import("./ReviewsSection-WV7WHV9v.js"),[]).then(e=>({default:e.ReviewsSection}))),xU=()=>x.jsxs("div",{className:"min-h-screen bg-background",children:[x.jsx(eU,{}),x.jsx(rU,{}),x.jsx(cU,{}),x.jsxs(p.Suspense,{fallback:x.jsx("div",{className:"min-h-[200px]"}),children:[x.jsx(mU,{}),x.jsx(gU,{}),x.jsx(vU,{}),x.jsx(yU,{}),x.jsx(wU,{}),x.jsx(bU,{})]}),x.jsx(pU,{})]}),SU=()=>{const e=ss();return p.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),x.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:x.jsxs("div",{className:"text-center",children:[x.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),x.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),x.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},EU=p.lazy(()=>B(()=>import("./EventsPage-BNHUypNx.js"),__vite__mapDeps([10,11,4,12]))),_U=p.lazy(()=>B(()=>import("./AboutPage-DZgNzR96.js"),[])),TU=p.lazy(()=>B(()=>import("./BookingPage-vq2eRQkL.js"),[])),kU=p.lazy(()=>B(()=>import("./JobsPage-Xc4hewy8.js"),__vite__mapDeps([13,14,15,16,17])
255)),CU=p.lazy(()=>B(()=>import("./MithelfenPage-CuQrwFGO.js"),__vite__mapDeps([18,19,20,14,17,21,7]))),PU=p.lazy(()=>B(()=>import("./FAQPage-CN2fmKao.js"),[])),AU=p.lazy(()=>B(()=>import("./GalleryPage-DBMieECP.js"),__vite__mapDeps([22,8,9]))),RU=p.lazy(()=>B(()=>import("./FirmenfeierPage-r-jR7Qbg.js"),__vite__mapDeps([23,9,24,7,25,26,27,2,6,28]))),OU=p.lazy(()=>B(()=>import("./KontaktPage-CLyf_aZ4.js"),__vite__mapDeps([29,15,30]))),$U=p.lazy(()=>B(()=>import("./ImpressumPage-C6yIp6xM.js"),[])),jU=p.lazy(()=>B(()=>import("./DatenschutzPage-CbiV56H7.js"),[])),NU=p.lazy(()=>B(()=>import("./CookieRichtliniePage-DUgEiAXz.js"),[])),DU=p.lazy(()=>B(()=>import("./AGBPage-DWGh-LDt.js"),[])),LU=p.lazy(()=>B(()=>import("./WiderrufsbelehrungPage-Czf_fsZe.js"),[])),IU=p.lazy(()=>B(()=>import("./BarrierefreiheitPage-DKnQhkgb.js"),[])),MU=p.lazy(()=>B(()=>import("./AuflagenPage-CTaqQD7O.js"),__vite__mapDeps([31,32]))),FU=p.lazy(()=>B(()=>import("./AuthPage-CGcHk2lq.js"),[])),VU=p.lazy(()=>B(()=>import("./ResetPasswordPage-BQ-t_f51.js"),[])),UU=p.lazy(()=>B(()=>import("./AdminDashboard-Da_4hKxX.js"),__vite__mapDeps([33,34,35,1,7,17,27,11]))),BU=p.lazy(()=>B(()=>import("./AdminEvents-Ce1xLj9j.js"),__vite__mapDeps([36,37,38,39,19,40,20,41,42,43,44,45,7,46,35,1,17,27,11,47,48,49,50,51,52,16,12,53,54,55,56]))),zU=p.lazy(()=>B(()=>import("./AdminOrders-ths0rgCM.js"),__vite__mapDeps([57,35,1,7,17,27,11,47,48,19,58,52,50,55,32]))),WU=p.lazy(()=>B(()=>import("./AdminContacts-CabZ3E6j.js"),__vite__mapDeps([59,38,35,1,7,17,27,11,47,20,48,58,45,50]))),HU=p.lazy(()=>B(()=>import("./AdminNewsletter-CBsgSf5n.js"),__vite__mapDeps([60,35,1,7,17,27,11,61,62,44,42,46,63,45,55,16,53,24,19,37,32,64,51,52,49,20,40,54,65,12,25]))),KU=p.lazy(()=>B(()=>import("./AdminJobs-BP14S82E.js"),__vite__mapDeps([66,35,1,7,17,27,11,67,38,19,40,20,44,42,61,62,41,43,14,45]))),qU=p.lazy(()=>B(()=>import("./AdminNews-CdouJy7s.js"),__vite__mapDeps([68,37,38,35,1,7,17,27,11,19,40,20,47,48,44,42,46,45]))),GU=p.lazy(()=>B(()=>import("./BesucherinfosPage-f0x2wxh7.js"),__vite__mapDeps([69,70,27,15,16,71,56]))),YU=p.lazy(()=>B(()=>import("./MeineTicketsPage-BYHWWtiv.js"),__vite__mapDeps([72,34,73,74]))),QU=p.lazy(()=>B(()=>import("./ProfilPage-Dz-uBUXM.js"),__vite__mapDeps([75,19,40,34,27,50,26,65,76]))),JU=p.lazy(()=>B(()=>import("./EventDetailPage-PnY600rm.js"),__vite__mapDeps([77,19,78,42,79,54,16,15,7,30,4,27]))),XU=p.lazy(()=>B(()=>import("./FundgrubePage-D5q7pkO_.js"),__vite__mapDeps([80,19,40,20,11,70,53,76]))),ZU=p.lazy(()=>B(()=>import("./AdminLostFound-C4j5xzdF.js"),__vite__mapDeps([81,38,35,1,7,17,27,11,47,24,45]))),e8=p.lazy(()=>B(()=>import("./AdminSettings-D7rmgTq-.js"),__vite__mapDeps([82,38,35,1,7,17,27,11,19,40,30,65]))),t8=p.lazy(()=>B(()=>import("./AdminScanner-BYBgQ4Zn.js"),__vite__mapDeps([83,35,1,7,17,27,11,19,41,42,84,85,49,86]))),n8=p.lazy(()=>B(()=>import("./AdminCoupons-D2bJzhgm.js"),__vite__mapDeps([87,35,1,7,17,27,11,38,19,41,42,44,45]))),r8=p.lazy(()=>B(()=>import("./AdminLivetracking-DGvE_HZP.js"),__vite__mapDeps([88,35,1,7,17,27,11,61,62,58,47,34]))),s8=p.lazy(()=>B(()=>import("./AdminCustomers-Bg-1U0y5.js"),__vite__mapDeps([89,35,1,7,17,27,11,47,48,19,40,58,78,42,52,46,50,53,64]))),i8=p.lazy(()=>B(()=>import("./AdminAnalytics-DryQ_aHK.js"),__vite__mapDeps([90,19,47,62,2,35,1,7,17,27,11,32]))),o8=p.lazy(()=>B(()=>import("./NewsletterConfirmPage-DuSE0ktp.js"),__vite__mapDeps([91,24,86]))),a8=p.lazy(()=>B(()=>import("./NewsletterUnsubscribePage-ZF7S0l5U.js"),__vite__mapDeps([92,19,64,24,86]))),l8=p.lazy(()=>B(()=>import("./PaymentConfirmPage-BRgvNdaU.js"),__vite__mapDeps([93,19,79,73,74,86,54,16,85]))),c8=p.lazy(()=>B(()=>import("./AdminShifts-DMOb94jM.js"),__vite__mapDeps([94,35,1,7,17,27,11,61,62,48,19,40,38,20,41,42,43,65,53,45,39,44,46,16,63,2,95,24,96,97,67,14]))),u8=p.lazy(()=>B(()=>import("./SchichtenPage-DrVIdav3.js"),__vite__mapDeps([98,38,99,17,96,7,21]))),d8=p.lazy(()=>B(()=>import("./CrewBewerbungPage-CF7is5hm.js"),__vite__mapDeps([100,19,40,20,43,24,50,54]))),h8=p.lazy(()=>B(()=>import("./CrewStartPage-BRfPHbFj.js"),__vite__mapDeps([101,99,17,96,7,19,40,43,50]))),f8=p.lazy(()=>B(()=>import("./CrewLoginPage-DZE7UFh3.js"),__vite__mapDeps([102,99,17,96,7,19,40,50]))),p8=p.lazy(()=>B(()=>import("./CrewProfilPage-D-7cDkl7.js"),__vite__mapDeps([103,99,17,96,7,19,40,20,43,50]))),m8=p.lazy(()=>B(()=>import("./CrewDienstPage-Pvp-EygD.js"),__vite__mapDeps([104,74,99,17,96,7,105,43,20,95,16,15,26,71,24]))),g8=p.lazy(()=>B(()=>import("./CrewTeamPage-BX0X3yCa.js"),__vite__mapDeps([106,38,99,17,96,7,20,41,42,105,97,53,55,28]))),v8=p.lazy(()=>B(()=>import("./CrewDashboardPage-BF7PVdzV.js"),__vite__mapDeps([107,99,17,96,7,48,105,43,24,55,16,15,26,71]))),y8=p.lazy(()=>B(()=>import("./AdminCrewCheckin-B77AAKYe.js"),__vite__mapDeps([108,84,35,1,7,17,27,11,96,24]))),w8=new X$;function b8(){return kL(),null}const x8=()=>x.jsx(r2,{client:w8,children:x.jsx(fL,{children:x.jsxs(N$,{children:[x.jsx(uR,{}),x.jsx(BR,{}),x.jsxs(dj,{children:[x.jsx(b8,{}),x.jsxs(SL,{children:[x.jsx("a",{href:"#main-content",className:"sr-only focu
255s:not-sr-only focus:absolute focus:top-2 focus:left-2 focus:z-[10000] focus:bg-primary focus:text-primary-foreground focus:px-4 focus:py-2 focus:rounded-sm focus:font-display focus:text-sm",children:"Zum Inhalt springen"}),x.jsx(p.Suspense,{fallback:x.jsx("div",{className:"min-h-screen bg-background"}),children:x.jsxs(rj,{children:[x.jsx(H,{path:"/",element:x.jsx(xU,{})}),x.jsx(H,{path:"/events",element:x.jsx(EU,{})}),x.jsx(H,{path:"/events/:id",element:x.jsx(JU,{})}),x.jsx(H,{path:"/about",element:x.jsx(_U,{})}),x.jsx(H,{path:"/booking",element:x.jsx(TU,{})}),x.jsx(H,{path:"/jobs",element:x.jsx(kU,{})}),x.jsx(H,{path:"/mithelfen",element:x.jsx(CU,{})}),x.jsx(H,{path:"/faq",element:x.jsx(PU,{})}),x.jsx(H,{path:"/gallery",element:x.jsx(AU,{})}),x.jsx(H,{path:"/firmenfeiern",element:x.jsx(RU,{})}),x.jsx(H,{path:"/kontakt",element:x.jsx(OU,{})}),x.jsx(H,{path:"/impressum",element:x.jsx($U,{})}),x.jsx(H,{path:"/datenschutz",element:x.jsx(jU,{})}),x.jsx(H,{path:"/cookie-richtlinie",element:x.jsx(NU,{})}),x.jsx(H,{path:"/agb",element:x.jsx(DU,{})}),x.jsx(H,{path:"/widerrufsbelehrung",element:x.jsx(LU,{})}),x.jsx(H,{path:"/barrierefreiheit",element:x.jsx(IU,{})}),x.jsx(H,{path:"/auflagen",element:x.jsx(MU,{})}),x.jsx(H,{path:"/besucherinfos",element:x.jsx(GU,{})}),x.jsx(H,{path:"/meine-tickets",element:x.jsx(YU,{})}),x.jsx(H,{path:"/profil",element:x.jsx(QU,{})}),x.jsx(H,{path:"/auth",element:x.jsx(FU,{})}),x.jsx(H,{path:"/reset-password",element:x.jsx(VU,{})}),x.jsx(H,{path:"/admin",element:x.jsx(UU,{})}),x.jsx(H,{path:"/admin/events",element:x.jsx(BU,{})}),x.jsx(H,{path:"/admin/orders",element:x.jsx(zU,{})}),x.jsx(H,{path:"/admin/customers",element:x.jsx(s8,{})}),x.jsx(H,{path:"/admin/contacts",element:x.jsx(WU,{})}),x.jsx(H,{path:"/admin/newsletter",element:x.jsx(HU,{})}),x.jsx(H,{path:"/admin/jobs",element:x.jsx(KU,{})}),x.jsx(H,{path:"/admin/news",element:x.jsx(qU,{})}),x.jsx(H,{path:"/admin/fundgrube",element:x.jsx(ZU,{})}),x.jsx(H,{path:"/admin/settings",element:x.jsx(e8,{})}),x.jsx(H,{path:"/admin/scanner",element:x.jsx(t8,{})}),x.jsx(H,{path:"/admin/coupons",element:x.jsx(n8,{})}),x.jsx(H,{path:"/admin/livetracking",element:x.jsx(r8,{})}),x.jsx(H,{path:"/admin/analytics",element:x.jsx(i8,{})}),x.jsx(H,{path:"/admin/schichtplanung",element:x.jsx(c8,{})}),x.jsx(H,{path:"/crew",element:x.jsx(v8,{})}),x.jsx(H,{path:"/schichten",element:x.jsx(u8,{})}),x.jsx(H,{path:"/crew-bewerbung",element:x.jsx(d8,{})}),x.jsx(H,{path:"/crew-start",element:x.jsx(h8,{})}),x.jsx(H,{path:"/crew-login",element:x.jsx(f8,{})}),x.jsx(H,{path:"/crew-profil",element:x.jsx(p8,{})}),x.jsx(H,{path:"/crew-dienst",element:x.jsx(m8,{})}),x.jsx(H,{path:"/crew-team",element:x.jsx(g8,{})}),x.jsx(H,{path:"/admin/crew-checkin",element:x.jsx(y8,{})}),x.jsx(H,{path:"/fundgrube",element:x.jsx(XU,{})}),x.jsx(H,{path:"/newsletter/bestaetigen/:token",element:x.jsx(o8,{})}),x.jsx(H,{path:"/newsletter/abmelden",element:x.jsx(a8,{})}),x.jsx(H,{path:"/zahlung/bestaetigung",element:x.jsx(l8,{})}),x.jsx(H,{path:"*",element:x.jsx(SU,{})})]})})]})]})]})})});TS(document.getElementById("root")).render(x.jsx(x8,{}));export{OP as $,OL as A,Ws as B,EA as C,fn as D,fl as E,pU as F,wL as G,Ym as H,D8 as I,TP as J,N8 as K,_e as L,CA as M,eU as N,QS as O,sU as P,aU as Q,j as R,wE as S,ZS as T,ny as U,AF as V,kA as W,Pm as X,lp as Y,TA as Z,U as _,EF as a,JS as a0,ml as a1,$f as a2,Ua as a3,Q$ as a4,Qe as a5,vt as a6,V$ as a7,Z$ as a8,Ey as a9,CS as aA,L8 as aB,tU as aC,SA as aD,pe as aE,Zr as aF,qS as aG,$8 as aa,j8 as ab,p2 as ac,GS as ad,sr as ae,WF as af,RF as ag,OF as ah,Tm as ai,HR as aj,cT as ak,RS as al,_8 as am,Yu as an,d$ as ao,h$ as ap,Yr as aq,go as ar,km as as,Ve as at,k1 as au,ub as av,E8 as aw,qw as ax,p6 as ay,B as az,yh as b,k8 as c,LT as d,ft as e,xV as f,iU as g,xL as h,Km as i,x as j,ss as k,n2 as l,_n as m,_A as n,vo as o,Be as p,OS as q,p as r,Ct as s,Se as t,z1 as u,oU as v,ze as w,n$ as x,H4 as y,W4 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.