1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Admin-3QfNKAi3.js","assets/collapsible-CGNOAUK9.js","assets/index-CTTlZyi1.js","assets/index-5nUyNvdk.js","assets/alert-dialog-BzsBGyUH.js","assets/index-qlCfq1iU.js","assets/folder-open-ClMOQmCh.js","assets/megaphone-UFiZZjZa.js","assets/archive-BiAaAe8Z.js","assets/chart-column-D4CjyD3f.js","assets/chevron-down-NdAWgFXx.js","assets/chevron-right-C-AANvrj.js","assets/pencil-6Fd3SzbJ.js","assets/external-link-CRyMBOJw.js","assets/rotate-ccw-Bs4W5XNy.js","assets/plus-Cqy-lZEY.js","assets/panels-top-left-q31IBFfb.js","assets/palette-h-KognfA.js","assets/book-open-gcpWZkXW.js","assets/trash-2-C_ExJudZ.js","assets/link-2-rOgVNiCy.js","assets/save-DPaTNXIk.js","assets/TemplateEditor-C8olcwv7.js","assets/switch-R7tQopJH.js","assets/index-lsJT7hvD.js","assets/eye-ImTQYhdb.js","assets/sparkles-bF5Ja6D6.js","assets/type-Dvwb_nfN.js","assets/Analytics-B1ZAszyO.js","assets/chevron-left-BozfoBK0.js","assets/users-IsDvkdZw.js","assets/generateCategoricalChart-CAZb-NTV.js","assets/LineChart-BWjqAU_E.js","assets/mouse-pointer-click-SzNXXAgv.js","assets/trending-up-qYPfUyDw.js","assets/history-Dr0Ildos.js","assets/AdminSettings-DRBg3CzV.js","assets/card-sOprZ9Cl.js","assets/circle-ZO8Db3ox.js","assets/loader-circle-CzrPW_1R.js","assets/shield-check-ChRW_UOB.js","assets/ellipsis-BXo4nB2L.js","assets/AdminCommercialModels-CAQkHD50.js","assets/layers-VvT17abM.js","assets/AdminLayout-D1Urz6yd.js","assets/settings-s4ATRuto.js","assets/AdminCareer-SPETuwQL.js","assets/textarea-zjXnVdF3.js","assets/AdminHome-B4Opd_GA.js","assets/Catalogue-CNxuQguM.js","assets/WebsitePreview-gs5AABcL.js","assets/AudiencePages-tX2-zcW6.js","assets/LiveSite-Do-lKSDi.js","assets/LiveSite-DTDmwqcQ.css","assets/PlusLayout-CgVeajeX.js","assets/data-Bk-dbTy9.js","assets/sun-DfPyoi_T.js","assets/library-Jkw0tDx1.js","assets/coins-DqVzI7a7.js","assets/PlusToday-C9G_aYru.js","assets/bits-DDoa0efX.js","assets/Mima-taTeaXyA.js","assets/send-horizontal-BZLS6B59.js","assets/TodayProduction-D0Ufm591.js","assets/store-OkFa0lIi.js","assets/fixtures-HX2LbNAm.
1js","assets/ui-D0TMubvh.js","assets/arrow-up-right-CM1WcTEK.js","assets/AreaChart-W1kPKozV.js","assets/Area-B9PPoj0d.js","assets/minus-BXarD9Ex.js","assets/PlusPlans-DiZRXM9j.js","assets/PlusInventory-BaRy1hav.js","assets/store-BMJ-p-XA.js","assets/search-r5jH6YNG.js","assets/TitleNew-Cu1qAHp9.js","assets/epub-B7_oxEV0.js","assets/browser-C1dUGcVA.js","assets/fields-fboMuSdr.js","assets/fixtures-DlSI1V6a.js","assets/file-up-CTZrdKrb.js","assets/triangle-alert-CJvPnWXo.js","assets/circle-check-1v2UHw_t.js","assets/TitleMetadata-DJROXXSL.js","assets/PlusWork-By42vJKQ.js","assets/TitleProductionPanel-BskyIW_S.js","assets/BarChart-BsFoaCOg.js","assets/PlusSales-CyMnv0s_.js","assets/PlusPlaceholder-BYqzP-6M.js","assets/PlusMarketing-B3kBzOnp.js","assets/marketing-Du1Hnke1.js","assets/PlusCampaign-DJJ2rnlg.js","assets/pen-line-Rcqos7m9.js","assets/PlusAnalytics-BAQAZqqW.js","assets/forecast-w_TbtAvg.js","assets/PlusAdvance-BdYmmV1E.js","assets/PlusStudio-Du6FhLEd.js","assets/studio-BYl_gQCT.js","assets/StudioWrite-BcC4WNKG.js","assets/columns-2-W5yi8AOd.js","assets/StudioCovers-DBer-I0k.js","assets/refresh-cw-B36Mw7AA.js","assets/StudioAudio-I7vYqjH4.js","assets/play-aSs2oLhk.js","assets/PlusMima-DorTr4Vf.js","assets/paperclip-C2Hbj-nV.js","assets/PlusSettings-Bcg07VWF.js","assets/plug-BEAs2eZF.js","assets/building-2-mQCwgp_X.js","assets/PlusConnections-BUOuS-M-.js","assets/unlink-PclN5ttB.js","assets/PubLayout-OzpNDos2.js","assets/store-DBwKroHm.js","assets/mimaConnections-3pAPrPHA.js","assets/Conversation-08URfiwj.js","assets/send-BMCLgMN3.js","assets/scale-CkU61RJJ.js","assets/PubSetup-BElBdzCN.js","assets/PubToday-I6j6bIrb.js","assets/selectors-BPRlBixK.js","assets/PubCatalogue-DIHfARVa.js","assets/PubTitle-62rduueJ.js","assets/PubOpportunities-DlCooLSY.js","assets/PubOpportunity-CtbXyr7s.js","assets/PubSales-sbj-nKtt.js","assets/PubMarketing-B10RvgG4.js","assets/PubStudio-DQ_QQ1oW.js","assets/PubRights-BcpAImrd.js","assets/PubKnowledge-CQcN8MkH.js","assets/PubData-BaTOchW-.js","assets/PubTeam-CP9HDv8p.js","assets/PubMimaWorkspace-CLJJyqac.js","assets/AgentLayout-C0J5QC7h.js","assets/store-D7F2-8QC.js","assets/AgMima-DJtf33Fi.js","assets/AgToday-DBq22OS0.js","assets/ui-DZo5VuYQ.js","assets/AgClients-L2if060N.js","assets/AgClient-BZQJ39Ay.js","assets/AgTitle-73IggaJT.js","assets/AgBuyers-Pl5dFuU9.js","assets/AgBuyer-9Yvyl67h.js","assets/AgSubmissions-CXeeEFtF.js","assets/AgSubmission-vlNzQsUB.js","assets/AgOpportunities-ByTLx6yi.js","assets/AgOpportunity-wC6o4ZyB.js","assets/AgDeals-CzcCatpF.js","assets/AgFinance-CrdXUMCE.js","assets/AgStudio-Dg3lLj7K.js","assets/AgMimaWorkspace-CUTqMAmZ.js","assets/AgTeam-BLttnTHd.js","assets/ProductionList-BYS4Ocpr.js","assets/ProductionRoot-CxALKC0-.js","assets/bits-DKxmUDDN.js","assets/ProductionDetail-YmFILBM7.js","assets/ProductionWizard-B1WLv4b6.js"])))=>i.map(i=>d[i]); 2var pf=t=>{throw TypeError(t)};var yu=(t,e,r)=>e.has(t)||pf("Cannot "+r);var A=(t,e,r)=>(yu(t,e,"read from private field"),r?r.call(t):e.get(t)),oe=(t,e,r)=>e.has(t)?pf("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ee=(t,e,r,n)=>(yu(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Ge=(t,e,r)=>(yu(t,e,"access private method"),r);var qo=(t,e,r,n)=>({set _(s){ee(t,e,s,r)},get _(){return A(t,e,n)}});function Vm(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(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"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(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 n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var ms=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}
vendor: 4,533 bytes, lines 2-10
2function Ao(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var Wm={exports:{}},Il={},Hm={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 Ro=Symbol.for("react.element"),$_=Symbol.for("react.portal"),M_=Symbol.for("react.fragment"),U_=Symbol.for("react.strict_mode"),z_=Symbol.for("react.profiler"),F_=Symbol.for("react.provider"),B_=Symbol.for("react.context"),V_=Symbol.for("react.forward_ref"),W_=Symbol.for("react.suspense"),H_=Symbol.for("react.memo"),q_=Symbol.for("react.lazy"),mf=Symbol.iterator;function K_(t){return t===null||typeof t!="object"?null:(t=mf&&t[mf]||t["@@iterator"],typeof t=="function"?t:null)}var qm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Km=Object.assign,Gm={};function mi(t,e,r){this.props=t,this.context=e,this.refs=Gm,this.updater=r||qm}mi.prototype.isReactComponent={};mi.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};mi.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Qm(){}Qm.prototype=mi.prototype;function Md(t,e,r){this.props=t,this.context=e,this.refs=Gm,this.updater=r||qm}var Ud=Md.prototype=new Qm;Ud.constructor=Md;Km(Ud,mi.prototype);Ud.isPureReactComponent=!0;var gf=Array.isArray,Jm=Object.prototype.hasOwnProperty,zd={current:null},Ym={key:!0,ref:!0,__self:!0,__source:!0};function Xm(t,e,r){var n,s={},i=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)Jm.call(e,n)&&!Ym.hasOwnProperty(n)&&(s[n]=e[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(t&&t.defaultProps)for(n in a=t.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:Ro,type:t,key:i,ref:o,props:s,_owner:zd.current}}function G_(t,e){return{$$typeof:Ro,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Fd(t){return typeof t=="object"&&t!==null&&t.$$typeof===Ro}function Q_(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var vf=/\/+/g;function wu(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Q_(""+t.key):e.toString(36)}function Sa(t,e,r,n,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Ro:case $_:o=!0}}if(o)return o=t,s=s(o),t=n===""?"."+wu(o,0):n,gf(s)?(r="",t!=null&&(r=t.replace(vf,"$&/")+"/"),Sa(s,e,r,"",function(u){return u})):s!=null&&(Fd(s)&&(s=G_(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(vf,"$&/")+"/")+t)),e.push(s)),1;if(o=0,n=n===""?".":n+":",gf(t))for(var a=0;a<t.length;a++){i=t[a];var l=n+wu(i,a);o+=Sa(i,e,r,l,s)}else if(l=K_(t),typeof l=="function")for(t=l.call(t),a=0;!(i=t.next()).done;)i=i.value,l=n+wu(i,a++),o+=Sa(i,e,r,l,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function Ko(t,e,r){if(t==null)return t;var n=[],s=0;return Sa(t,n,"","",function(i){return e.call(r,i,s++)}),n}function J_(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var at={current:null},ka={transition:null},Y_={ReactCurrentDispatcher:at,ReactCurrentBatchConfig:ka,ReactCurrentOwner:zd};function Zm(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 4,178 bytes, lines 10-26
10ne.Children={map:Ko,forEach:function(t,e,r){Ko(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return Ko(t,function(){e++}),e},toArray:function(t){return Ko(t,function(e){return e})||[]},only:function(t){if(!Fd(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};ne.Component=mi;ne.Fragment=M_;ne.Profiler=z_;ne.PureComponent=Md;ne.StrictMode=U_;ne.Suspense=W_;ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y_;ne.act=Zm;ne.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=Km({},t.props),s=t.key,i=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,o=zd.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)Jm.call(e,l)&&!Ym.hasOwnProperty(l)&&(n[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:Ro,type:t.type,key:s,ref:i,props:n,_owner:o}};ne.createContext=function(t){return t={$$typeof:B_,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:F_,_context:t},t.Consumer=t};ne.createElement=Xm;ne.createFactory=function(t){var e=Xm.bind(null,t);return e.type=t,e};ne.createRef=function(){return{current:null}};ne.forwardRef=function(t){return{$$typeof:V_,render:t}};ne.isValidElement=Fd;ne.lazy=function(t){return{$$typeof:q_,_payload:{_status:-1,_result:t},_init:J_}};ne.memo=function(t,e){return{$$typeof:H_,type:t,compare:e===void 0?null:e}};ne.startTransition=function(t){var e=ka.transition;ka.transition={};try{t()}finally{ka.transition=e}};ne.unstable_act=Zm;ne.useCallback=function(t,e){return at.current.useCallback(t,e)};ne.useContext=function(t){return at.current.useContext(t)};ne.useDebugValue=function(){};ne.useDeferredValue=function(t){return at.current.useDeferredValue(t)};ne.useEffect=function(t,e){return at.current.useEffect(t,e)};ne.useId=function(){return at.current.useId()};ne.useImperativeHandle=function(t,e,r){return at.current.useImperativeHandle(t,e,r)};ne.useInsertionEffect=function(t,e){return at.current.useInsertionEffect(t,e)};ne.useLayoutEffect=function(t,e){return at.current.useLayoutEffect(t,e)};ne.useMemo=function(t,e){return at.current.useMemo(t,e)};ne.useReducer=function(t,e,r){return at.current.useReducer(t,e,r)};ne.useRef=function(t){return at.current.useRef(t)};ne.useState=function(t){return at.current.useState(t)};ne.useSyncExternalStore=function(t,e,r){return at.current.useSyncExternalStore(t,e,r)};ne.useTransition=function(){return at.current.useTransition()};ne.version="18.3.1";Hm.exports=ne;var g=Hm.exports;const $=$d(g),eg=Vm({__proto__:null,default:$},[g]);/** 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 X_=g,Z_=Symbol.for("react.element"),eb=Symbol.for("react.fragment"),tb=Object.prototype.hasOwnProperty,rb=X_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,nb={key:!0,ref:!0,__self:!0,__source:!0};function tg(t,e,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)tb.call(e,n)&&!nb.hasOwnProperty(n)&&(s[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)s[n]===void 0&&(s[n]=e[n]);return{$$typeof:Z_,type:t,key:i,ref:o,props:s,_owner:rb.current}}Il.Fragment=eb;Il.jsx=tg;Il.jsxs=tg;Wm.exports=Il;var d=Wm.exports,rg={exports:{}},Pt={},ng={exports:{}},sg={};/** 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(t){function e(j,O){var z=j.length;j.push(O);e:for(;0<z;){var K=z-1>>>1,q=j[K];if(0<s(q,O))j[K]=O,j[z]=q,z=K;else break e}}function r(j){return j.length===0?null:j[0]}
vendor: 10,467 bytes, lines 26-35
26function n(j){if(j.length===0)return null;var O=j[0],z=j.pop();if(z!==O){j[0]=z;e:for(var K=0,q=j.length,Y=q>>>1;K<Y;){var te=2*(K+1)-1,ce=j[te],Ne=te+1,se=j[Ne];if(0>s(ce,z))Ne<q&&0>s(se,ce)?(j[K]=se,j[Ne]=z,K=Ne):(j[K]=ce,j[te]=z,K=te);else if(Ne<q&&0>s(se,z))j[K]=se,j[Ne]=z,K=Ne;else break e}}return O}function s(j,O){var z=j.sortIndex-O.sortIndex;return z!==0?z:j.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,h=null,p=3,f=!1,_=!1,y=!1,b=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(j){for(var O=r(u);O!==null;){if(O.callback===null)n(u);else if(O.startTime<=j)n(u),O.sortIndex=O.expirationTime,e(l,O);else break;O=r(u)}}function x(j){if(y=!1,w(j),!_)if(r(l)!==null)_=!0,W(E);else{var O=r(u);O!==null&&Q(x,O.startTime-j)}}function E(j,O){_=!1,y&&(y=!1,v(C),C=-1),f=!0;var z=p;try{for(w(O),h=r(l);h!==null&&(!(h.expirationTime>O)||j&&!D());){var K=h.callback;if(typeof K=="function"){h.callback=null,p=h.priorityLevel;var q=K(h.expirationTime<=O);O=t.unstable_now(),typeof q=="function"?h.callback=q:h===r(l)&&n(l),w(O)}else n(l);h=r(l)}if(h!==null)var Y=!0;else{var te=r(u);te!==null&&Q(x,te.startTime-O),Y=!1}return Y}finally{h=null,p=z,f=!1}}var S=!1,k=null,C=-1,T=5,P=-1;function D(){return!(t.unstable_now()-P<T)}function I(){if(k!==null){var j=t.unstable_now();P=j;var O=!0;try{O=k(!0,j)}finally{O?M():(S=!1,k=null)}}else S=!1}var M;if(typeof m=="function")M=function(){m(I)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,V=R.port2;R.port1.onmessage=I,M=function(){V.postMessage(null)}}else M=function(){b(I,0)};function W(j){k=j,S||(S=!0,M())}function Q(j,O){C=b(function(){j(t.unstable_now())},O)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(j){j.callback=null},t.unstable_continueExecution=function(){_||f||(_=!0,W(E))},t.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<j?Math.floor(1e3/j):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(j){switch(p){case 1:case 2:case 3:var O=3;break;default:O=p}var z=p;p=O;try{return j()}finally{p=z}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(j,O){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var z=p;p=j;try{return O()}finally{p=z}},t.unstable_scheduleCallback=function(j,O,z){var K=t.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?K+z:K):z=K,j){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=z+q,j={id:c++,callback:O,priorityLevel:j,startTime:z,expirationTime:q,sortIndex:-1},z>K?(j.sortIndex=z,e(u,j),r(l)===null&&j===r(u)&&(y?(v(C),C=-1):y=!0,Q(x,z-K))):(j.sortIndex=q,e(l,j),_||f||(_=!0,W(E))),j},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(j){var O=p;return function(){var z=p;p=O;try{return j.apply(this,arguments)}finally{p=z}}}})(sg);ng.exports=sg;var sb=ng.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 ib=g,Ct=sb;function L(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var ig=new Set,eo={};function us(t,e){ri(t,e),ri(t+"Capture",e)}function ri(t,e){for(eo[t]=e,t=0;t<e.length;t++)ig.add(e[t])}var Dr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cc=Object.prototype.hasOwnProperty,ob=/^[: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]*$/,yf={},wf={};function ab(t){return cc.call(wf,t)?!0:cc.call(yf,t)?!1:ob.test(t)?wf[t]=!0:(yf[t]=!0,!1)}function lb(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function ub(t,e,r,n){if(e===null||typeof e>"u"||lb(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function lt(t,e,r,n,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var He={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){He[t]=new lt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];He[e]=new lt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){He[t]=new lt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){He[t]=new lt(t,2,!1,t,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(t){He[t]=new lt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){He[t]=new lt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){He[t]=new lt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){He[t]=new lt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){He[t]=new lt(t,5,!1,t.toLowerCase(),null,!1,!1)});var Bd=/[\-:]([a-z])/g;function Vd(t){return t[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(t){var e=t.replace(Bd,Vd);He[e]=new lt(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Bd,Vd);He[e]=new lt(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Bd,Vd);He[e]=new lt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){He[t]=new lt(t,1,!1,t.toLowerCase(),null,!1,!1)});He.xlinkHref=new lt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){He[t]=new lt(t,1,!1,t.toLowerCase(),null,!0,!0)});function Wd(t,e,r,n){var s=He.hasOwnProperty(e)?He[e]:null;(s!==null?s.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(ub(e,r,s,n)&&(r=null),n||s===null?ab(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):s.mustUseProperty?t[s.propertyName]=r===null?s.type===3?!1:"":r:(e=s.attributeName,n=s.attributeNamespace,r===null?t.removeAttribute(e):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var Br=ib.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Go=Symbol.for("react.element"),Ss=Symbol.for("react.portal"),ks=Symbol.for("react.fragment"),Hd=Symbol.for("react.strict_mode"),dc=Symbol.for("react.profiler"),og=Symbol.for("react.provider"),ag=Symbol.for("react.context"),qd=Symbol.for("react.forward_ref"),hc=Symbol.for("react.suspense"),fc=Symbol.for("react.suspense_list"),Kd=Symbol.for("react.memo"),Xr=Symbol.for("react.lazy"),lg=Symbol.for("react.offscreen"),_f=Symbol.iterator;function Ti(t){return t===null||typeof t!="object"?null:(t=_f&&t[_f]||t["@@iterator"],typeof t=="function"?t:null)}var Ee=Object.assign,_u;function Mi(t){if(_u===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);_u=e&&e[1]||""}return` 35`+_u+t}var bu=!1;function xu(t,e){if(!t||bu)return"";bu=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var n=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){n=u}t.call(e.prototype)}else{try{throw Error()}catch(u){n=u}t()}}
vendor: 16,737 bytes, lines 35-38
35catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(` 36`),i=n.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 t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{bu=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Mi(t):""}function cb(t){switch(t.tag){case 5:return Mi(t.type);case 16:return Mi("Lazy");case 13:return Mi("Suspense");case 19:return Mi("SuspenseList");case 0:case 2:case 15:return t=xu(t.type,!1),t;case 11:return t=xu(t.type.render,!1),t;case 1:return t=xu(t.type,!0),t;default:return""}}function pc(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ks:return"Fragment";case Ss:return"Portal";case dc:return"Profiler";case Hd:return"StrictMode";case hc:return"Suspense";case fc:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case ag:return(t.displayName||"Context")+".Consumer";case og:return(t._context.displayName||"Context")+".Provider";case qd:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Kd:return e=t.displayName||null,e!==null?e:pc(t.type)||"Memo";case Xr:e=t._payload,t=t._init;try{return pc(t(e))}catch{}}return null}function db(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pc(e);case 8:return e===Hd?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function En(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ug(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function hb(t){var e=ug(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Qo(t){t._valueTracker||(t._valueTracker=hb(t))}function cg(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=ug(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Va(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function mc(t,e){var r=e.checked;return Ee({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function bf(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=En(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function dg(t,e){e=e.checked,e!=null&&Wd(t,"checked",e,!1)}function gc(t,e){dg(t,e);var r=En(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?vc(t,e.type,r):e.hasOwnProperty("defaultValue")&&vc(t,e.type,En(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function xf(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function vc(t,e,r){(e!=="number"||Va(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Ui=Array.isArray;function Ds(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s<r.length;s++)e["$"+r[s]]=!0;for(r=0;r<t.length;r++)s=e.hasOwnProperty("$"+t[r].value),t[r].selected!==s&&(t[r].selected=s),s&&n&&(t[r].defaultSelected=!0)}else{for(r=""+En(r),e=null,s=0;s<t.length;s++){if(t[s].value===r){t[s].selected=!0,n&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function yc(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(L(91));return Ee({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Ef(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(L(92));if(Ui(r)){if(1<r.length)throw Error(L(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:En(r)}}function hg(t,e){var r=En(e.value),n=En(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function Sf(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function fg(t){switch(t){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 wc(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?fg(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Jo,pg=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,s){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Jo=Jo||document.createElement("div"),Jo.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Jo.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function to(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Wi={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},fb=["Webkit","ms","Moz","O"];Object.keys(Wi).forEach(function(t){fb.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Wi[e]=Wi[t]})});function mg(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Wi.hasOwnProperty(t)&&Wi[t]?(""+e).trim():e+"px"}function gg(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=mg(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var pb=Ee({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 _c(t,e){if(e){if(pb[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(L(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(L(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(L(61))}if(e.style!=null&&typeof e.style!="object")throw Error(L(62))}}function bc(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 xc=null;function Gd(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ec=null,$s=null,Ms=null;function kf(t){if(t=Io(t)){if(typeof Ec!="function")throw Error(L(280));var e=t.stateNode;e&&(e=Ul(e),Ec(t.stateNode,t.type,e))}}function vg(t){$s?Ms?Ms.push(t):Ms=[t]:$s=t}function yg(){if($s){var t=$s,e=Ms;if(Ms=$s=null,kf(t),e)for(t=0;t<e.length;t++)kf(e[t])}}function wg(t,e){return t(e)}function _g(){}var Eu=!1;function bg(t,e,r){if(Eu)return t(e,r);Eu=!0;try{return wg(t,e,r)}finally{Eu=!1,($s!==null||Ms!==null)&&(_g(),yg())}}function ro(t,e){var r=t.stateNode;if(r===null)return null;var n=Ul(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(L(231,e,typeof r));return r}var Sc=!1;if(Dr)try{var Pi={};Object.defineProperty(Pi,"passive",{get:function(){Sc=!0}}),window.addEventListener("test",Pi,Pi),window.removeEventListener("test",Pi,Pi)}catch{Sc=!1}function mb(t,e,r,n,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(r,u)}catch(c){this.onError(c)}}var Hi=!1,Wa=null,Ha=!1,kc=null,gb={onError:function(t){Hi=!0,Wa=t}};function vb(t,e,r,n,s,i,o,a,l){Hi=!1,Wa=null,mb.apply(gb,arguments)}function yb(t,e,r,n,s,i,o,a,l){if(vb.apply(this,arguments),Hi){if(Hi){var u=Wa;Hi=!1,Wa=null}else throw Error(L(198));Ha||(Ha=!0,kc=u)}}function cs(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function xg(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Cf(t){if(cs(t)!==t)throw Error(L(188))}function wb(t){var e=t.alternate;if(!e){if(e=cs(t),e===null)throw Error(L(188));return e!==t?null:t}for(var r=t,n=e;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return Cf(s),t;if(i===n)return Cf(s),e;i=i.sibling}throw Error(L(188))}if(r.return!==n.return)r=s,n=i;else{for(var o=!1,a=s.child;a;){if(a===r){o=!0,r=s,n=i;break}if(a===n){o=!0,n=s,r=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===r){o=!0,r=i,n=s;break}if(a===n){o=!0,n=i,r=s;break}a=a.sibling}if(!o)throw Error(L(189))}}if(r.alternate!==n)throw Error(L(190))}if(r.tag!==3)throw Error(L(188));return r.stateNode.current===r?t:e}function Eg(t){return t=wb(t),t!==null?Sg(t):null}function Sg(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Sg(t);if(e!==null)return e;t=t.sibling}return null}var kg=Ct.unstable_scheduleCallback,Tf=Ct.unstable_cancelCallback,_b=Ct.unstable_shouldYield,bb=Ct.unstable_requestPaint,Te=Ct.unstable_now,xb=Ct.unstable_getCurrentPriorityLevel,Qd=Ct.unstable_ImmediatePriority,Cg=Ct.unstable_UserBlockingPriority,qa=Ct.unstable_NormalPriority,Eb=Ct.unstable_LowPriority,Tg=Ct.unstable_IdlePriority,Ll=null,_r=null;function Sb(t){if(_r&&typeof _r.onCommitFiberRoot=="function")try{_r.onCommitFiberRoot(Ll,t,void 0,(t.current.flags&128)===128)}catch{}}var Zt=Math.clz32?Math.clz32:Tb,kb=Math.log,Cb=Math.LN2;function Tb(t){return t>>>=0,t===0?32:31-(kb(t)/Cb|0)|0}var Yo=64,Xo=4194304;function zi(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Ka(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=zi(a):(i&=o,i!==0&&(n=zi(i)))}else o=r&~s,o!==0?n=zi(o):i!==0&&(n=zi(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-Zt(e),s=1<<r,n|=t[r],e&=~s;return n}function Pb(t,e){switch(t){case 1:case 2:case 4:return e+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 e+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 jb(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var o=31-Zt(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=Pb(a,e)):l<=e&&(t.expiredLanes|=a),i&=~a}}function Cc(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Pg(){var t=Yo;return Yo<<=1,!(Yo&4194240)&&(Yo=64),t}function Su(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function Oo(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Zt(e),t[e]=r}function Ab(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var s=31-Zt(r),i=1<<s;e[s]=0,n[s]=-1,t[s]=-1,r&=~i}}function Jd(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-Zt(r),s=1<<n;s&e|t[n]&e&&(t[n]|=e),r&=~s}}var le=0;function jg(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Ag,Yd,Rg,Og,Ng,Tc=!1,Zo=[],fn=null,pn=null,mn=null,no=new Map,so=new Map,en=[],Rb="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 Pf(t,e){switch(t){case"focusin":case"focusout":fn=null;break;case"dragenter":case"dragleave":pn=null;break;case"mouseover":case"mouseout":mn=null;break;case"pointerover":case"pointerout":no.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":so.delete(e.pointerId)}}function ji(t,e,r,n,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},e!==null&&(e=Io(e),e!==null&&Yd(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function Ob(t,e,r,n,s){switch(e){case"focusin":return fn=ji(fn,t,e,r,n,s),!0;case"dragenter":return pn=ji(pn,t,e,r,n,s),!0;case"mouseover":return mn=ji(mn,t,e,r,n,s),!0;case"pointerover":var i=s.pointerId;return no.set(i,ji(no.get(i)||null,t,e,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,so.set(i,ji(so.get(i)||null,t,e,r,n,s)),!0}return!1}function Ig(t){var e=Wn(t.target);if(e!==null){var r=cs(e);if(r!==null){if(e=r.tag,e===13){if(e=xg(r),e!==null){t.blockedOn=e,Ng(t.priority,function(){Rg(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Ca(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=Pc(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);xc=n,r.target.dispatchEvent(n),xc=null}else return e=Io(r),e!==null&&Yd(e),t.blockedOn=r,!1;e.shift()}return!0}function jf(t,e,r){Ca(t)&&r.delete(e)}function Nb(){Tc=!1,fn!==null&&Ca(fn)&&(fn=null),pn!==null&&Ca(pn)&&(pn=null),mn!==null&&Ca(mn)&&(mn=null),no.forEac
vendor: 11,468 bytes, line 38
38h(jf),so.forEach(jf)}function Ai(t,e){t.blockedOn===e&&(t.blockedOn=null,Tc||(Tc=!0,Ct.unstable_scheduleCallback(Ct.unstable_NormalPriority,Nb)))}function io(t){function e(s){return Ai(s,t)}if(0<Zo.length){Ai(Zo[0],t);for(var r=1;r<Zo.length;r++){var n=Zo[r];n.blockedOn===t&&(n.blockedOn=null)}}for(fn!==null&&Ai(fn,t),pn!==null&&Ai(pn,t),mn!==null&&Ai(mn,t),no.forEach(e),so.forEach(e),r=0;r<en.length;r++)n=en[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<en.length&&(r=en[0],r.blockedOn===null);)Ig(r),r.blockedOn===null&&en.shift()}var Us=Br.ReactCurrentBatchConfig,Ga=!0;function Ib(t,e,r,n){var s=le,i=Us.transition;Us.transition=null;try{le=1,Xd(t,e,r,n)}finally{le=s,Us.transition=i}}function Lb(t,e,r,n){var s=le,i=Us.transition;Us.transition=null;try{le=4,Xd(t,e,r,n)}finally{le=s,Us.transition=i}}function Xd(t,e,r,n){if(Ga){var s=Pc(t,e,r,n);if(s===null)Iu(t,e,n,Qa,r),Pf(t,n);else if(Ob(s,t,e,r,n))n.stopPropagation();else if(Pf(t,n),e&4&&-1<Rb.indexOf(t)){for(;s!==null;){var i=Io(s);if(i!==null&&Ag(i),i=Pc(t,e,r,n),i===null&&Iu(t,e,n,Qa,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else Iu(t,e,n,null,r)}}var Qa=null;function Pc(t,e,r,n){if(Qa=null,t=Gd(n),t=Wn(t),t!==null)if(e=cs(t),e===null)t=null;else if(r=e.tag,r===13){if(t=xg(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Qa=t,null}function Lg(t){switch(t){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(xb()){case Qd:return 1;case Cg:return 4;case qa:case Eb:return 16;case Tg:return 536870912;default:return 16}default:return 16}}var cn=null,Zd=null,Ta=null;function Dg(){if(Ta)return Ta;var t,e=Zd,r=e.length,n,s="value"in cn?cn.value:cn.textContent,i=s.length;for(t=0;t<r&&e[t]===s[t];t++);var o=r-t;for(n=1;n<=o&&e[r-n]===s[i-n];n++);return Ta=s.slice(t,1<n?1-n:void 0)}function Pa(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function ea(){return!0}function Af(){return!1}function jt(t){function e(r,n,s,i,o){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(r=t[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ea:Af,this.isPropagationStopped=Af,this}return Ee(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=ea)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ea)},persist:function(){},isPersistent:ea}),e}var gi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eh=jt(gi),No=Ee({},gi,{view:0,detail:0}),Db=jt(No),ku,Cu,Ri,Dl=Ee({},No,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:th,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Ri&&(Ri&&t.type==="mousemove"?(ku=t.screenX-Ri.screenX,Cu=t.screenY-Ri.screenY):Cu=ku=0,Ri=t),ku)},movementY:function(t){return"movementY"in t?t.movementY:Cu}}),Rf=jt(Dl),$b=Ee({},Dl,{dataTransfer:0}),Mb=jt($b),Ub=Ee({},No,{relatedTarget:0}),Tu=jt(Ub),zb=Ee({},gi,{animationName:0,elapsedTime:0,pseudoElement:0}),Fb=jt(zb),Bb=Ee({},gi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Vb=jt(Bb),Wb=Ee({},gi,{data:0}),Of=jt(Wb),Hb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qb={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"},Kb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gb(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Kb[t])?!!e[t]:!1}function th(){return Gb}var Qb=Ee({},No,{key:function(t){if(t.key){var e=Hb[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Pa(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?qb[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:th,charCode:function(t){return t.type==="keypress"?Pa(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Pa(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Jb=jt(Qb),Yb=Ee({},Dl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Nf=jt(Yb),Xb=Ee({},No,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:th}),Zb=jt(Xb),ex=Ee({},gi,{propertyName:0,elapsedTime:0,pseudoElement:0}),tx=jt(ex),rx=Ee({},Dl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),nx=jt(rx),sx=[9,13,27,32],rh=Dr&&"CompositionEvent"in window,qi=null;Dr&&"documentMode"in document&&(qi=document.documentMode);var ix=Dr&&"TextEvent"in window&&!qi,$g=Dr&&(!rh||qi&&8<qi&&11>=qi),If=" ",Lf=!1;function Mg(t,e){switch(t){case"keyup":return sx.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ug(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Cs=!1;function ox(t,e){switch(t){case"compositionend":return Ug(e);case"keypress":return e.which!==32?null:(Lf=!0,If);case"textInput":return t=e.data,t===If&&Lf?null:t;default:return null}}function ax(t,e){if(Cs)return t==="compositionend"||!rh&&Mg(t,e)?(t=Dg(),Ta=Zd=cn=null,Cs=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return $g&&e.locale!=="ko"?null:e.data;default:return null}}var lx={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 Df(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!lx[t.type]:e==="textarea"}function zg(t,e,r,n){vg(n),e=Ja(e,"onChange"),0<e.length&&(r=new eh("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var Ki=null,oo=null;function ux(t){Yg(t,0)}function $l(t){var e=js(t);if(cg(e))return t}function cx(t,e){if(t==="change")return e}var Fg=!1;if(Dr){var Pu;if(Dr){var ju="oninput"in document;if(!ju){var $f=document.createElement("div");$f.setAttribute("oninput","return;"),ju=typeof $f.oninput=="function"}Pu=ju}else Pu=!1;Fg=Pu&&(!document.documentMode||9<document.documentMode)}function Mf(){Ki&&(Ki.detachEvent("onpropertychange",Bg),oo=Ki=null)}function Bg(t){if(t.propertyName==="value"&&$l(oo)){var e=[];zg(e,oo,t,Gd(t)),bg(ux,e)}}function dx(t,e,r){t==="focusin"?(Mf(),Ki=e,oo=r,Ki.attachEvent("onpropertychange",Bg)):t==="focusout"&&Mf()}function hx(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return $l(oo)}function fx(t,e){if(t==="click")return $l(e)}function px(t,e){if(t==="input"||t==="change")return $l(e)}function mx(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var tr=typeof Object.is=="function"?Object.is:mx;function ao(t,e){if(tr(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!cc.call(e,s)||!tr(t[s],e[s]))return!1}return!0}function Uf(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function zf(t,e){var r=Uf(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Uf(r)}}function Vg(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Vg(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Wg(){for(var t=window,e=Va();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Va(t.document)}return e}function nh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function gx(t){var e=Wg(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&Vg(r.ownerDocument.documentElement,r)){if(n!==null&&nh(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=zf(r,i);var o=zf(r,n);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var vx=Dr&&"documentMode"in document&&11>
vendor: 4,756 bytes, line 38
38=document.documentMode,Ts=null,jc=null,Gi=null,Ac=!1;function Ff(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ac||Ts==null||Ts!==Va(n)||(n=Ts,"selectionStart"in n&&nh(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Gi&&ao(Gi,n)||(Gi=n,n=Ja(jc,"onSelect"),0<n.length&&(e=new eh("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=Ts)))}function ta(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var Ps={animationend:ta("Animation","AnimationEnd"),animationiteration:ta("Animation","AnimationIteration"),animationstart:ta("Animation","AnimationStart"),transitionend:ta("Transition","TransitionEnd")},Au={},Hg={};Dr&&(Hg=document.createElement("div").style,"AnimationEvent"in window||(delete Ps.animationend.animation,delete Ps.animationiteration.animation,delete Ps.animationstart.animation),"TransitionEvent"in window||delete Ps.transitionend.transition);function Ml(t){if(Au[t])return Au[t];if(!Ps[t])return t;var e=Ps[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in Hg)return Au[t]=e[r];return t}var qg=Ml("animationend"),Kg=Ml("animationiteration"),Gg=Ml("animationstart"),Qg=Ml("transitionend"),Jg=new Map,Bf="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 jn(t,e){Jg.set(t,e),us(e,[t])}for(var Ru=0;Ru<Bf.length;Ru++){var Ou=Bf[Ru],yx=Ou.toLowerCase(),wx=Ou[0].toUpperCase()+Ou.slice(1);jn(yx,"on"+wx)}jn(qg,"onAnimationEnd");jn(Kg,"onAnimationIteration");jn(Gg,"onAnimationStart");jn("dblclick","onDoubleClick");jn("focusin","onFocus");jn("focusout","onBlur");jn(Qg,"onTransitionEnd");ri("onMouseEnter",["mouseout","mouseover"]);ri("onMouseLeave",["mouseout","mouseover"]);ri("onPointerEnter",["pointerout","pointerover"]);ri("onPointerLeave",["pointerout","pointerover"]);us("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));us("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));us("onBeforeInput",["compositionend","keypress","textInput","paste"]);us("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));us("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));us("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fi="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(" "),_x=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fi));function Vf(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,yb(n,e,void 0,t),t.currentTarget=null}function Yg(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],s=n.event;n=n.listeners;e:{var i=void 0;if(e)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Vf(s,a,u),i=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;Vf(s,a,u),i=l}}}if(Ha)throw t=kc,Ha=!1,kc=null,t}function me(t,e){var r=e[Lc];r===void 0&&(r=e[Lc]=new Set);var n=t+"__bubble";r.has(n)||(Xg(e,t,2,!1),r.add(n))}function Nu(t,e,r){var n=0;e&&(n|=4),Xg(r,t,n,e)}var ra="_reactListening"+Math.random().toString(36).slice(2);function lo(t){if(!t[ra]){t[ra]=!0,ig.forEach(function(r){r!=="selectionchange"&&(_x.has(r)||Nu(r,!1,t),Nu(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[ra]||(e[ra]=!0,Nu("selectionchange",!1,e))}}function Xg(t,e,r,n){switch(Lg(e)){case 1:var s=Ib;break;case 4:s=Lb;break;default:s=Xd}r=s.bind(null,e,r,t),s=void 0,!Sc||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),n?s!==void 0?t.addEventListener(e,r,{capture:!0,passive:s}):t.addEventListener(e,r,!0):s!==void 0?t.addEventListener(e,r,{passive:s}):t.addEventListener(e,r,!1)}function Iu(t,e,r,n,s){var i=n;
vendor: 5,434 bytes, lines 38-39
38if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=n.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=Wn(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}bg(function(){var u=i,c=Gd(r),h=[];e:{var p=Jg.get(t);if(p!==void 0){var f=eh,_=t;switch(t){case"keypress":if(Pa(r)===0)break e;case"keydown":case"keyup":f=Jb;break;case"focusin":_="focus",f=Tu;break;case"focusout":_="blur",f=Tu;break;case"beforeblur":case"afterblur":f=Tu;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=Rf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=Mb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=Zb;break;case qg:case Kg:case Gg:f=Fb;break;case Qg:f=tx;break;case"scroll":f=Db;break;case"wheel":f=nx;break;case"copy":case"cut":case"paste":f=Vb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=Nf}var y=(e&4)!==0,b=!y&&t==="scroll",v=y?p!==null?p+"Capture":null:p;y=[];for(var m=u,w;m!==null;){w=m;var x=w.stateNode;if(w.tag===5&&x!==null&&(w=x,v!==null&&(x=ro(m,v),x!=null&&y.push(uo(m,x,w)))),b)break;m=m.return}0<y.length&&(p=new f(p,_,null,r,c),h.push({event:p,listeners:y}))}}if(!(e&7)){e:{if(p=t==="mouseover"||t==="pointerover",f=t==="mouseout"||t==="pointerout",p&&r!==xc&&(_=r.relatedTarget||r.fromElement)&&(Wn(_)||_[$r]))break e;if((f||p)&&(p=c.window===c?c:(p=c.ownerDocument)?p.defaultView||p.parentWindow:window,f?(_=r.relatedTarget||r.toElement,f=u,_=_?Wn(_):null,_!==null&&(b=cs(_),_!==b||_.tag!==5&&_.tag!==6)&&(_=null)):(f=null,_=u),f!==_)){if(y=Rf,x="onMouseLeave",v="onMouseEnter",m="mouse",(t==="pointerout"||t==="pointerover")&&(y=Nf,x="onPointerLeave",v="onPointerEnter",m="pointer"),b=f==null?p:js(f),w=_==null?p:js(_),p=new y(x,m+"leave",f,r,c),p.target=b,p.relatedTarget=w,x=null,Wn(c)===u&&(y=new y(v,m+"enter",_,r,c),y.target=w,y.relatedTarget=b,x=y),b=x,f&&_)t:{for(y=f,v=_,m=0,w=y;w;w=gs(w))m++;for(w=0,x=v;x;x=gs(x))w++;for(;0<m-w;)y=gs(y),m--;for(;0<w-m;)v=gs(v),w--;for(;m--;){if(y===v||v!==null&&y===v.alternate)break t;y=gs(y),v=gs(v)}y=null}else y=null;f!==null&&Wf(h,p,f,y,!1),_!==null&&b!==null&&Wf(h,b,_,y,!0)}}e:{if(p=u?js(u):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var E=cx;else if(Df(p))if(Fg)E=px;else{E=hx;var S=dx}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(E=fx);if(E&&(E=E(t,u))){zg(h,E,r,c);break e}S&&S(t,p,u),t==="focusout"&&(S=p._wrapperState)&&S.controlled&&p.type==="number"&&vc(p,"number",p.value)}switch(S=u?js(u):window,t){case"focusin":(Df(S)||S.contentEditable==="true")&&(Ts=S,jc=u,Gi=null);break;case"focusout":Gi=jc=Ts=null;break;case"mousedown":Ac=!0;break;case"contextmenu":case"mouseup":case"dragend":Ac=!1,Ff(h,r,c);break;case"selectionchange":if(vx)break;case"keydown":case"keyup":Ff(h,r,c)}var k;if(rh)e:{switch(t){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Cs?Mg(t,r)&&(C="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(C="onCompositionStart");C&&($g&&r.locale!=="ko"&&(Cs||C!=="onCompositionStart"?C==="onCompositionEnd"&&Cs&&(k=Dg()):(cn=c,Zd="value"in cn?cn.value:cn.textContent,Cs=!0)),S=Ja(u,C),0<S.length&&(C=new Of(C,t,null,r,c),h.push({event:C,listeners:S}),k?C.data=k:(k=Ug(r),k!==null&&(C.data=k)))),(k=ix?ox(t,r):ax(t,r))&&(u=Ja(u,"onBeforeInput"),0<u.length&&(c=new Of("onBeforeInput","beforeinput",null,r,c),h.push({event:c,listeners:u}),c.data=k))}Yg(h,e)})}function uo(t,e,r){return{instance:t,listener:e,currentTarget:r}}function Ja(t,e){for(var r=e+"Capture",n=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=ro(t,r),i!=null&&n.unshift(uo(t,i,s)),i=ro(t,e),i!=null&&n.push(uo(t,i,s))),t=t.return}return n}function gs(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Wf(t,e,r,n,s){for(var i=e._reactName,o=[];r!==null&&r!==n;){var a=r,l=a.alternate,u=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&u!==null&&(a=u,s?(l=ro(r,i),l!=null&&o.unshift(uo(r,l,a))):s||(l=ro(r,i),l!=null&&o.push(uo(r,l,a)))),r=r.return}o.length!==0&&t.push({event:e,listeners:o})}var bx=/\r\n?/g,xx=/\u0000|\uFFFD/g;function Hf(t){return(typeof t=="string"?t:""+t).replace(bx,` 39`).replace(xx,"")}function na(t,e,r){if(e=Hf(e),Hf(t)!==e&&r)throw Error(L(425))}function Ya(){}var Rc=null,Oc=null;function Nc(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Ic=typeof setTimeout=="function"?setTimeout:void 0,Ex=typeof clearTimeout=="function"?clearTimeout:void 0,qf=typeof Promise=="function"?Promise:void 0,Sx=typeof queueMicrotask=="function"?queueMicrotask:typeof qf<"u"?function(t){return qf.resolve(null).then(t).cat
vendor: 4,824 bytes, line 39
39ch(kx)}:Ic;function kx(t){setTimeout(function(){throw t})}function Lu(t,e){var r=e,n=0;do{var s=r.nextSibling;if(t.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){t.removeChild(s),io(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);io(e)}function gn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Kf(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var vi=Math.random().toString(36).slice(2),yr="__reactFiber$"+vi,co="__reactProps$"+vi,$r="__reactContainer$"+vi,Lc="__reactEvents$"+vi,Cx="__reactListeners$"+vi,Tx="__reactHandles$"+vi;function Wn(t){var e=t[yr];if(e)return e;for(var r=t.parentNode;r;){if(e=r[$r]||r[yr]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=Kf(t);t!==null;){if(r=t[yr])return r;t=Kf(t)}return e}t=r,r=t.parentNode}return null}function Io(t){return t=t[yr]||t[$r],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function js(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(L(33))}function Ul(t){return t[co]||null}var Dc=[],As=-1;function An(t){return{current:t}}function ge(t){0>As||(t.current=Dc[As],Dc[As]=null,As--)}function fe(t,e){As++,Dc[As]=t.current,t.current=e}var Sn={},et=An(Sn),gt=An(!1),ns=Sn;function ni(t,e){var r=t.type.contextTypes;if(!r)return Sn;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function vt(t){return t=t.childContextTypes,t!=null}function Xa(){ge(gt),ge(et)}function Gf(t,e,r){if(et.current!==Sn)throw Error(L(168));fe(et,e),fe(gt,r)}function Zg(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error(L(108,db(t)||"Unknown",s));return Ee({},r,n)}function Za(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Sn,ns=et.current,fe(et,t),fe(gt,gt.current),!0}function Qf(t,e,r){var n=t.stateNode;if(!n)throw Error(L(169));r?(t=Zg(t,e,ns),n.__reactInternalMemoizedMergedChildContext=t,ge(gt),ge(et),fe(et,t)):ge(gt),fe(gt,r)}var Rr=null,zl=!1,Du=!1;function ev(t){Rr===null?Rr=[t]:Rr.push(t)}function Px(t){zl=!0,ev(t)}function Rn(){if(!Du&&Rr!==null){Du=!0;var t=0,e=le;try{var r=Rr;for(le=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}Rr=null,zl=!1}catch(s){throw Rr!==null&&(Rr=Rr.slice(t+1)),kg(Qd,Rn),s}finally{le=e,Du=!1}}return null}var Rs=[],Os=0,el=null,tl=0,Rt=[],Ot=0,ss=null,Nr=1,Ir="";function Dn(t,e){Rs[Os++]=tl,Rs[Os++]=el,el=t,tl=e}function tv(t,e,r){Rt[Ot++]=Nr,Rt[Ot++]=Ir,Rt[Ot++]=ss,ss=t;var n=Nr;t=Ir;var s=32-Zt(n)-1;n&=~(1<<s),r+=1;var i=32-Zt(e)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,Nr=1<<32-Zt(e)+s|r<<s|n,Ir=i+t}else Nr=1<<i|r<<s|n,Ir=t}function sh(t){t.return!==null&&(Dn(t,1),tv(t,1,0))}function ih(t){for(;t===el;)el=Rs[--Os],Rs[Os]=null,tl=Rs[--Os],Rs[Os]=null;for(;t===ss;)ss=Rt[--Ot],Rt[Ot]=null,Ir=Rt[--Ot],Rt[Ot]=null,Nr=Rt[--Ot],Rt[Ot]=null}var St=null,Et=null,we=!1,Xt=null;function rv(t,e){var r=Nt(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function Jf(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,St=t,Et=gn(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,St=t,Et=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=ss!==null?{id:Nr,overflow:Ir}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=Nt(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,St=t,Et=null,!0):!1;default:return!1}}function $c(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Mc(t){if(we){var e=Et;if(e){var r=e;if(!Jf(t,e)){if($c(t))throw Error(L(418));e=gn(r.nextSibling);var n=St;e&&Jf(t,e)?rv(n,r):(t.flags=t.flags&-4097|2,we=!1,St=t)}}else{if($c(t))throw Error(L(418));t.flags=t.flags&-4097|2,we=!1,St=t}}}function Yf(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;St=t}function sa(t){if(t!==St)return!1;if(!we)return Yf(t),we=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Nc(t.type,t.memoizedProps)),e&&(e=Et)){if($c(t))throw nv(),Error(L(418));for(;e;)rv(t,e),e=gn(e.nextSibling)}if(Yf(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(L(317));e:{for(t=t.nextSibling,e=0;t;
vendor: 12,477 bytes, line 39
39){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){Et=gn(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}Et=null}}else Et=St?gn(t.stateNode.nextSibling):null;return!0}function nv(){for(var t=Et;t;)t=gn(t.nextSibling)}function si(){Et=St=null,we=!1}function oh(t){Xt===null?Xt=[t]:Xt.push(t)}var jx=Br.ReactCurrentBatchConfig;function Oi(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(L(309));var n=r.stateNode}if(!n)throw Error(L(147,t));var s=n,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},e._stringRef=i,e)}if(typeof t!="string")throw Error(L(284));if(!r._owner)throw Error(L(290,t))}return t}function ia(t,e){throw t=Object.prototype.toString.call(e),Error(L(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Xf(t){var e=t._init;return e(t._payload)}function sv(t){function e(v,m){if(t){var w=v.deletions;w===null?(v.deletions=[m],v.flags|=16):w.push(m)}}function r(v,m){if(!t)return null;for(;m!==null;)e(v,m),m=m.sibling;return null}function n(v,m){for(v=new Map;m!==null;)m.key!==null?v.set(m.key,m):v.set(m.index,m),m=m.sibling;return v}function s(v,m){return v=_n(v,m),v.index=0,v.sibling=null,v}function i(v,m,w){return v.index=w,t?(w=v.alternate,w!==null?(w=w.index,w<m?(v.flags|=2,m):w):(v.flags|=2,m)):(v.flags|=1048576,m)}function o(v){return t&&v.alternate===null&&(v.flags|=2),v}function a(v,m,w,x){return m===null||m.tag!==6?(m=Vu(w,v.mode,x),m.return=v,m):(m=s(m,w),m.return=v,m)}function l(v,m,w,x){var E=w.type;return E===ks?c(v,m,w.props.children,x,w.key):m!==null&&(m.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Xr&&Xf(E)===m.type)?(x=s(m,w.props),x.ref=Oi(v,m,w),x.return=v,x):(x=La(w.type,w.key,w.props,null,v.mode,x),x.ref=Oi(v,m,w),x.return=v,x)}function u(v,m,w,x){return m===null||m.tag!==4||m.stateNode.containerInfo!==w.containerInfo||m.stateNode.implementation!==w.implementation?(m=Wu(w,v.mode,x),m.return=v,m):(m=s(m,w.children||[]),m.return=v,m)}function c(v,m,w,x,E){return m===null||m.tag!==7?(m=ts(w,v.mode,x,E),m.return=v,m):(m=s(m,w),m.return=v,m)}function h(v,m,w){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Vu(""+m,v.mode,w),m.return=v,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Go:return w=La(m.type,m.key,m.props,null,v.mode,w),w.ref=Oi(v,null,m),w.return=v,w;case Ss:return m=Wu(m,v.mode,w),m.return=v,m;case Xr:var x=m._init;return h(v,x(m._payload),w)}if(Ui(m)||Ti(m))return m=ts(m,v.mode,w,null),m.return=v,m;ia(v,m)}return null}function p(v,m,w,x){var E=m!==null?m.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return E!==null?null:a(v,m,""+w,x);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Go:return w.key===E?l(v,m,w,x):null;case Ss:return w.key===E?u(v,m,w,x):null;case Xr:return E=w._init,p(v,m,E(w._payload),x)}if(Ui(w)||Ti(w))return E!==null?null:c(v,m,w,x,null);ia(v,w)}return null}function f(v,m,w,x,E){if(typeof x=="string"&&x!==""||typeof x=="number")return v=v.get(w)||null,a(m,v,""+x,E);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Go:return v=v.get(x.key===null?w:x.key)||null,l(m,v,x,E);case Ss:return v=v.get(x.key===null?w:x.key)||null,u(m,v,x,E);case Xr:var S=x._init;return f(v,m,w,S(x._payload),E)}if(Ui(x)||Ti(x))return v=v.get(w)||null,c(m,v,x,E,null);ia(m,x)}return null}function _(v,m,w,x){for(var E=null,S=null,k=m,C=m=0,T=null;k!==null&&C<w.length;C++){k.index>C?(T=k,k=null):T=k.sibling;var P=p(v,k,w[C],x);if(P===null){k===null&&(k=T);break}t&&k&&P.alternate===null&&e(v,k),m=i(P,m,C),S===null?E=P:S.sibling=P,S=P,k=T}if(C===w.length)return r(v,k),we&&Dn(v,C),E;if(k===null){for(;C<w.length;C++)k=h(v,w[C],x),k!==null&&(m=i(k,m,C),S===null?E=k:S.sibling=k,S=k);return we&&Dn(v,C),E}for(k=n(v,k);C<w.length;C++)T=f(k,v,C,w[C],x),T!==null&&(t&&T.alternate!==null&&k.delete(T.key===null?C:T.key),m=i(T,m,C),S===null?E=T:S.sibling=T,S=T);return t&&k.forEach(function(D){return e(v,D)}),we&&Dn(v,C),E}function y(v,m,w,x){var E=Ti(w);if(typeof E!="function")throw Error(L(150));if(w=E.call(w),w==null)throw Error(L(151));for(var S=E=null,k=m,C=m=0,T=null,P=w.next();k!==null&&!P.done;C++,P=w.next()){k.index>C?(T=k,k=null):T=k.sibling;var D=p(v,k,P.value,x);if(D===null){k===null&&(k=T);break}t&&k&&D.alternate===null&&e(v,k),m=i(D,m,C),S===null?E=D:S.sibling=D,S=D,k=T}if(P.done)return r(v,k),we&&Dn(v,C),E;if(k===null){for(;!P.done;C++,P=w.next())P=h(v,P.value,x),P!==null&&(m=i(P,m,C),S===null?E=P:S.sibling=P,S=P);return we&&Dn(v,C),E}for(k=n(v,k);!P.done;C++,P=w.next())P=f(k,v,C,P.value,x),P!==null&&(t&&P.alternate!==null&&k.delete(P.key===null?C:P.key),m=i(P,m,C),S===null?E=P:S.sibling=P,S=P);return t&&k.forEach(function(I){return e(v,I)}),we&&Dn(v,C),E}function b(v,m,w,x){if(typeof w=="object"&&w!==null&&w.type===ks&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Go:e:{for(var E=w.key,S=m;S!==null;){if(S.key===E){if(E=w.type,E===ks){if(S.tag===7){r(v,S.sibling),m=s(S,w.props.children),m.return=v,v=m;break e}}else if(S.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Xr&&Xf(E)===S.type){r(v,S.sibling),m=s(S,w.props),m.ref=Oi(v,S,w),m.return=v,v=m;break e}r(v,S);break}else e(v,S);S=S.sibling}w.type===ks?(m=ts(w.props.children,v.mode,x,w.key),m.return=v,v=m):(x=La(w.type,w.key,w.props,null,v.mode,x),x.ref=Oi(v,m,w),x.return=v,v=x)}return o(v);case Ss:e:{for(S=w.key;m!==null;){if(m.key===S)if(m.tag===4&&m.stateNode.containerInfo===w.containerInfo&&m.stateNode.implementation===w.implementation){r(v,m.sibling),m=s(m,w.children||[]),m.return=v,v=m;break e}else{r(v,m);break}else e(v,m);m=m.sibling}m=Wu(w,v.mode,x),m.return=v,v=m}return o(v);case Xr:return S=w._init,b(v,m,S(w._payload),x)}if(Ui(w))return _(v,m,w,x);if(Ti(w))return y(v,m,w,x);ia(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,m!==null&&m.tag===6?(r(v,m.sibling),m=s(m,w),m.return=v,v=m):(r(v,m),m=Vu(w,v.mode,x),m.return=v,v=m),o(v)):r(v,m)}return b}var ii=sv(!0),iv=sv(!1),rl=An(null),nl=null,Ns=null,ah=null;function lh(){ah=Ns=nl=null}function uh(t){var e=rl.current;ge(rl),t._currentValue=e}function Uc(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function zs(t,e){nl=t,ah=Ns=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(mt=!0),t.firstContext=null)}function Lt(t){var e=t._currentValue;if(ah!==t)if(t={context:t,memoizedValue:e,next:null},Ns===null){if(nl===null)throw Error(L(308));Ns=t,nl.dependencies={lanes:0,firstContext:t}}else Ns=Ns.next=t;return e}var Hn=null;function ch(t){Hn===null?Hn=[t]:Hn.push(t)}function ov(t,e,r,n){var s=e.interleaved;return s===null?(r.next=r,ch(e)):(r.next=s.next,s.next=r),e.interleaved=r,Mr(t,n)}function Mr(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var Zr=!1;function dh(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function av(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Lr(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function vn(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,ie&2){var s=n.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),n.pending=e,Mr(t,r)}return s=n.interleaved,s===null?(e.next=e,ch(n)):(e.next=s.next,s.next=e),n.interleaved=e,Mr(t,r)}function ja(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Jd(t,r)}}function Zf(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=e:i=i.next=e}else s=i=e;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function sl(t,e,r,n){var s=t.updateQueue;Zr=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var h=s.baseState;o=0,c=u=l=null,a=i;do{var p=a.lane,f=a.eventTime;if((n&p)===p){c!==null&&(c=c.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var _=t,y=a;switch(p=e,f=r,y.tag){case 1:if(_=y.payload,typeof _=="function"){h=_.call(f,h,p);break e}h=_;break e;case 3:_.flags=_.flags&-65537|128;case 0:if(_=y.payload,p=typeof _=="function"?_.call(f,h,p):_,p==null)break e;h=Ee({},h,p);break e;case 2:Zr=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else f={eventTime:f,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=f,l=h):c=c.next=f,o|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(c===null&&(l=h),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);os|=o,t.lanes=o,t.memoizedState=h}}function ep(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(L(191,s));s.call(n)}}}var Lo={},br=An(Lo),ho=An(Lo),fo=An(Lo);function qn(t){if(t===Lo)throw Error(L(174));return t}function hh(t,e){switch(fe(fo,e),fe(ho,t),fe(br,Lo),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:wc(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=wc(e,t)}ge(br),fe(br,e)}function oi(){ge(br),ge(ho),ge(fo)}function lv(t){qn(fo.current);var e=qn(br.current),r=wc(e,t.type);e!==r&&(fe(ho,t),fe(br,r))}function fh(t){ho.current===t&&(ge(br),ge(ho))}var _e=An(0);function il(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var $u=[];function ph(){for(var t=0;t<$u.length;t++)$u[t]._workInProgressVersionPrimary=null;$u.length=0}var Aa=Br.ReactCurrentDispatcher,Mu=Br.ReactCurrentBatchConfig,is=0,be=null,Ie=null,$e=null,ol=!1,Qi=!1,po=0,Ax=0;function Qe(){throw Error(L(321))}function mh(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!tr(t[r],e[r]))return!1;return!0}function gh(t,e,r,n,s,i){if(is=i,be=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Aa.current=t===null||t.memoizedState===null?Ix:Lx,t=r(n,s),Qi){i=0;do{if(Qi=!1,po=0,25<=i)throw Error(L(301));i+=1,$e=Ie=null,e.updateQueue=null,Aa.current=Dx,t=r(n,s)}while(Qi)}if(Aa.current=al,e=Ie!==null&&Ie.next!==null,is=0,$e=Ie=be=null,ol=!1,e)throw Error(L(300));return t}function vh(){var t=po!==0;return po=0,t}function fr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $e===null?be.memoizedState=$e=t:$e=$e.next=t,$e}function Dt(){if(Ie===null){var t=be.alternate;t=t!==null?t.memoizedState:null}else t=Ie.next;var e=$e===null?be.memoizedState:$e.next;if(e!==null)$e=e,Ie=t;else{if(t===null)throw Error(L(310));Ie=t,t={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},$e===null?be.memoizedState=$e=t:$e=$e.next=t}return $e}function mo(t,e){return typeof e=="function"?e(t):e}function Uu(t){var e=Dt(),r=e.queue;if(r===null)throw Error(L(311));r.lastRenderedReducer=t;
vendor: 4,649 bytes, line 39
39var n=Ie,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var a=o=null,l=null,u=i;do{var c=u.lane;if((is&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:t(n,u.action);else{var h={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=h,o=n):l=l.next=h,be.lanes|=c,os|=c}u=u.next}while(u!==null&&u!==i);l===null?o=n:l.next=a,tr(n,e.memoizedState)||(mt=!0),e.memoizedState=n,e.baseState=o,e.baseQueue=l,r.lastRenderedState=n}if(t=r.interleaved,t!==null){s=t;do i=s.lane,be.lanes|=i,os|=i,s=s.next;while(s!==t)}else s===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function zu(t){var e=Dt(),r=e.queue;if(r===null)throw Error(L(311));r.lastRenderedReducer=t;var n=r.dispatch,s=r.pending,i=e.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=t(i,o.action),o=o.next;while(o!==s);tr(i,e.memoizedState)||(mt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),r.lastRenderedState=i}return[i,n]}function uv(){}function cv(t,e){var r=be,n=Dt(),s=e(),i=!tr(n.memoizedState,s);if(i&&(n.memoizedState=s,mt=!0),n=n.queue,yh(fv.bind(null,r,n,t),[t]),n.getSnapshot!==e||i||$e!==null&&$e.memoizedState.tag&1){if(r.flags|=2048,go(9,hv.bind(null,r,n,s,e),void 0,null),Me===null)throw Error(L(349));is&30||dv(r,e,s)}return s}function dv(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=be.updateQueue,e===null?(e={lastEffect:null,stores:null},be.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function hv(t,e,r,n){e.value=r,e.getSnapshot=n,pv(e)&&mv(t)}function fv(t,e,r){return r(function(){pv(e)&&mv(t)})}function pv(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!tr(t,r)}catch{return!0}}function mv(t){var e=Mr(t,1);e!==null&&er(e,t,1,-1)}function tp(t){var e=fr();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:t},e.queue=t,t=t.dispatch=Nx.bind(null,be,t),[e.memoizedState,t]}function go(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=be.updateQueue,e===null?(e={lastEffect:null,stores:null},be.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function gv(){return Dt().memoizedState}function Ra(t,e,r,n){var s=fr();be.flags|=t,s.memoizedState=go(1|e,r,void 0,n===void 0?null:n)}function Fl(t,e,r,n){var s=Dt();n=n===void 0?null:n;var i=void 0;if(Ie!==null){var o=Ie.memoizedState;if(i=o.destroy,n!==null&&mh(n,o.deps)){s.memoizedState=go(e,r,i,n);return}}be.flags|=t,s.memoizedState=go(1|e,r,i,n)}function rp(t,e){return Ra(8390656,8,t,e)}function yh(t,e){return Fl(2048,8,t,e)}function vv(t,e){return Fl(4,2,t,e)}function yv(t,e){return Fl(4,4,t,e)}function wv(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function _v(t,e,r){return r=r!=null?r.concat([t]):null,Fl(4,4,wv.bind(null,e,t),r)}function wh(){}function bv(t,e){var r=Dt();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&mh(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function xv(t,e){var r=Dt();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&mh(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function Ev(t,e,r){return is&21?(tr(r,e)||(r=Pg(),be.lanes|=r,os|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,mt=!0),t.memoizedState=r)}function Rx(t,e){var r=le;le=r!==0&&4>r?r:4,t(!0);var n=Mu.transition;Mu.transition={};try{t(!1),e()}finally{le=r,Mu.transition=n}}function Sv(){return Dt().memoizedState}function Ox(t,e,r){var n=wn(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},kv(t))Cv(e,r);else if(r=ov(t,e,r,n),r!==null){var s=ot();er(r,t,n,s),Tv(r,e,n)}}function Nx(t,e,r){var n=wn(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(kv(t))Cv(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,tr(a,o)){var l=e.interleaved;l===null?(s.next=s,ch(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}r=ov(t,e,s,n),r!==null&&(s=ot(),er(r,t,n,s),Tv(r,e,n))}}function kv(t){var e=t.alternate;return t===be||e!==null&&e===be}function Cv(t,e){Qi=ol=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function Tv(t,e,r){if(r&4194240){var n=e.lanes;
vendor: 6,961 bytes, lines 39-41
39n&=t.pendingLanes,r|=n,e.lanes=r,Jd(t,r)}}var al={readContext:Lt,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useInsertionEffect:Qe,useLayoutEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useMutableSource:Qe,useSyncExternalStore:Qe,useId:Qe,unstable_isNewReconciler:!1},Ix={readContext:Lt,useCallback:function(t,e){return fr().memoizedState=[t,e===void 0?null:e],t},useContext:Lt,useEffect:rp,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Ra(4194308,4,wv.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Ra(4194308,4,t,e)},useInsertionEffect:function(t,e){return Ra(4,2,t,e)},useMemo:function(t,e){var r=fr();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=fr();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=Ox.bind(null,be,t),[n.memoizedState,t]},useRef:function(t){var e=fr();return t={current:t},e.memoizedState=t},useState:tp,useDebugValue:wh,useDeferredValue:function(t){return fr().memoizedState=t},useTransition:function(){var t=tp(!1),e=t[0];return t=Rx.bind(null,t[1]),fr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=be,s=fr();if(we){if(r===void 0)throw Error(L(407));r=r()}else{if(r=e(),Me===null)throw Error(L(349));is&30||dv(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,rp(fv.bind(null,n,i,t),[t]),n.flags|=2048,go(9,hv.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=fr(),e=Me.identifierPrefix;if(we){var r=Ir,n=Nr;r=(n&~(1<<32-Zt(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=po++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=Ax++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},Lx={readContext:Lt,useCallback:bv,useContext:Lt,useEffect:yh,useImperativeHandle:_v,useInsertionEffect:vv,useLayoutEffect:yv,useMemo:xv,useReducer:Uu,useRef:gv,useState:function(){return Uu(mo)},useDebugValue:wh,useDeferredValue:function(t){var e=Dt();return Ev(e,Ie.memoizedState,t)},useTransition:function(){var t=Uu(mo)[0],e=Dt().memoizedState;return[t,e]},useMutableSource:uv,useSyncExternalStore:cv,useId:Sv,unstable_isNewReconciler:!1},Dx={readContext:Lt,useCallback:bv,useContext:Lt,useEffect:yh,useImperativeHandle:_v,useInsertionEffect:vv,useLayoutEffect:yv,useMemo:xv,useReducer:zu,useRef:gv,useState:function(){return zu(mo)},useDebugValue:wh,useDeferredValue:function(t){var e=Dt();return Ie===null?e.memoizedState=t:Ev(e,Ie.memoizedState,t)},useTransition:function(){var t=zu(mo)[0],e=Dt().memoizedState;return[t,e]},useMutableSource:uv,useSyncExternalStore:cv,useId:Sv,unstable_isNewReconciler:!1};function Ht(t,e){if(t&&t.defaultProps){e=Ee({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function zc(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:Ee({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var Bl={isMounted:function(t){return(t=t._reactInternals)?cs(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=ot(),s=wn(t),i=Lr(n,s);i.payload=e,r!=null&&(i.callback=r),e=vn(t,i,s),e!==null&&(er(e,t,s,n),ja(e,t,s))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=ot(),s=wn(t),i=Lr(n,s);i.tag=1,i.payload=e,r!=null&&(i.callback=r),e=vn(t,i,s),e!==null&&(er(e,t,s,n),ja(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=ot(),n=wn(t),s=Lr(r,n);s.tag=2,e!=null&&(s.callback=e),e=vn(t,s,n),e!==null&&(er(e,t,n,r),ja(e,t,n))}};function np(t,e,r,n,s,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,i,o):e.prototype&&e.prototype.isPureReactComponent?!ao(r,n)||!ao(s,i):!0}function Pv(t,e,r){var n=!1,s=Sn,i=e.contextType;return typeof i=="object"&&i!==null?i=Lt(i):(s=vt(e)?ns:et.current,n=e.contextTypes,i=(n=n!=null)?ni(t,s):Sn),e=new e(r,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Bl,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function sp(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&Bl.enqueueReplaceState(e,e.state,null)}function Fc(t,e,r,n){var s=t.stateNode;s.props=r,s.state=t.memoizedState,s.refs={},dh(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=Lt(i):(i=vt(e)?ns:et.current,s.context=ni(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(zc(t,e,i,r),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&Bl.enqueueReplaceState(s,s.state,null),sl(t,r,s,n),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function ai(t,e){try{var r="",n=e;do r+=cb(n),n=n.return;while(n);var s=r}catch(i){s=` 40Error generating stack: `+i.message+` 41`+i.stack}return{value:t,source:e,stack:s,digest:null}}function Fu(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function Bc(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var $x=typeof WeakMap=="function"?WeakMap:Map;function jv(t,e,r){r=Lr(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){ul||(ul=!0,Xc=n),Bc(t,e)},r}function Av(t,e,r){r=Lr(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var s=e.value;r.payload=function(){return n(s)},r.callback=function(){Bc(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Bc(t,e),typeof n!="function"&&(yn===null?yn=new Set([this]):yn.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function ip(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new $x;var s=new Set;n.set(e,s)}else s=n.get(e),s===void 0&&(s=new Set,n.set(e,s));s.has(r)||(s.add(r),t=Yx.bind(null,t,e,r),e.then(t,t))}function op(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function ap(t,e,r,n,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=Lr(-1,1),e.tag=2,vn(r,e,1))),r.lanes|=1),t)}var Mx=Br.ReactCurrentOwner,mt=!1;function st(t,e,r,n){e.child=t===null?iv(e,null,r,n):ii(e,t.child,r,n)}function lp(t,e,r,n,s){r=r.render;var i=e.ref;
vendor: 6,220 bytes, line 41
41return zs(e,s),n=gh(t,e,r,n,i,s),r=vh(),t!==null&&!mt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Ur(t,e,s)):(we&&r&&sh(e),e.flags|=1,st(t,e,n,s),e.child)}function up(t,e,r,n,s){if(t===null){var i=r.type;return typeof i=="function"&&!Th(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=i,Rv(t,e,i,n,s)):(t=La(r.type,null,n,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:ao,r(o,n)&&t.ref===e.ref)return Ur(t,e,s)}return e.flags|=1,t=_n(i,n),t.ref=e.ref,t.return=e,e.child=t}function Rv(t,e,r,n,s){if(t!==null){var i=t.memoizedProps;if(ao(i,n)&&t.ref===e.ref)if(mt=!1,e.pendingProps=n=i,(t.lanes&s)!==0)t.flags&131072&&(mt=!0);else return e.lanes=t.lanes,Ur(t,e,s)}return Vc(t,e,r,n,s)}function Ov(t,e,r){var n=e.pendingProps,s=n.children,i=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},fe(Ls,_t),_t|=r;else{if(!(r&1073741824))return t=i!==null?i.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,fe(Ls,_t),_t|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,fe(Ls,_t),_t|=n}else i!==null?(n=i.baseLanes|r,e.memoizedState=null):n=r,fe(Ls,_t),_t|=n;return st(t,e,s,r),e.child}function Nv(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function Vc(t,e,r,n,s){var i=vt(r)?ns:et.current;return i=ni(e,i),zs(e,s),r=gh(t,e,r,n,i,s),n=vh(),t!==null&&!mt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Ur(t,e,s)):(we&&n&&sh(e),e.flags|=1,st(t,e,r,s),e.child)}function cp(t,e,r,n,s){if(vt(r)){var i=!0;Za(e)}else i=!1;if(zs(e,s),e.stateNode===null)Oa(t,e),Pv(e,r,n),Fc(e,r,n,s),n=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=Lt(u):(u=vt(r)?ns:et.current,u=ni(e,u));var c=r.getDerivedStateFromProps,h=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==u)&&sp(e,o,n,u),Zr=!1;var p=e.memoizedState;o.state=p,sl(e,n,o,s),l=e.memoizedState,a!==n||p!==l||gt.current||Zr?(typeof c=="function"&&(zc(e,r,c,n),l=e.memoizedState),(a=Zr||np(e,r,a,n,p,l,u))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),o.props=n,o.state=l,o.context=u,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,av(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:Ht(e.type,a),o.props=u,h=e.pendingProps,p=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=Lt(l):(l=vt(r)?ns:et.current,l=ni(e,l));var f=r.getDerivedStateFromProps;(c=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||p!==l)&&sp(e,o,n,l),Zr=!1,p=e.memoizedState,o.state=p,sl(e,n,o,s);var _=e.memoizedState;a!==h||p!==_||gt.current||Zr?(typeof f=="function"&&(zc(e,r,f,n),_=e.memoizedState),(u=Zr||np(e,r,u,n,p,_,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,_,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,_,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=_),o.props=n,o.state=_,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),n=!1)}return Wc(t,e,r,n,i,s)}function Wc(t,e,r,n,s,i){Nv(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return s&&Qf(e,r,!1),Ur(t,e,i);n=e.stateNode,Mx.current=e;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=ii(e,t.child,null,i),e.child=ii(e,null,a,i)):st(t,e,a,i),e.memoizedState=n.state,s&&Qf(e,r,!0),e.child}function Iv(t){var e=t.stateNode;e.pendingContext?Gf(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Gf(t,e.context,!1),hh(t,e.containerInfo)}function dp(t,e,r,n,s){return si(),oh(s),e.flags|=256,st(t,e,r,n),e.child}var Hc={dehydrated:null,treeContext:null,retryLane:0};function qc(t){return{baseLanes:t,cachePool:null,transitions:null}}function Lv(t,e,r){var n=e.pendingProps,s=_e.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),fe(_e,s&1),t===null)return Mc(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,t=n.fallback,i?(n=e.mode,i=e.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Hl(o,n,0,null),t=ts(t,n,r,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=qc(r),e.memoizedState=Hc,t):_h(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Ux(t,e,o,n,a,s,r);if(i){i=n.fallback,o=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&e.child!==s?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=_n(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=_n(a,i):(i=ts(i,o,r,null),i.flags|=2),i.return=e,n.return=e,n.sibling=i,e.child=n,n=i,i=e.child,o=t.child.memoizedState,o=o===null?qc(r):{base
vendor: 8,213 bytes, line 41
41Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~r,e.memoizedState=Hc,n}return i=t.child,t=i.sibling,n=_n(i,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function _h(t,e){return e=Hl({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function oa(t,e,r,n){return n!==null&&oh(n),ii(e,t.child,null,r),t=_h(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Ux(t,e,r,n,s,i,o){if(r)return e.flags&256?(e.flags&=-257,n=Fu(Error(L(422))),oa(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=n.fallback,s=e.mode,n=Hl({mode:"visible",children:n.children},s,0,null),i=ts(i,s,o,null),i.flags|=2,n.return=e,i.return=e,n.sibling=i,e.child=n,e.mode&1&&ii(e,t.child,null,o),e.child.memoizedState=qc(o),e.memoizedState=Hc,i);if(!(e.mode&1))return oa(t,e,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(L(419)),n=Fu(i,n,void 0),oa(t,e,o,n)}if(a=(o&t.childLanes)!==0,mt||a){if(n=Me,n!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Mr(t,s),er(n,t,s,-1))}return Ch(),n=Fu(Error(L(421))),oa(t,e,o,n)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=Xx.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,Et=gn(s.nextSibling),St=e,we=!0,Xt=null,t!==null&&(Rt[Ot++]=Nr,Rt[Ot++]=Ir,Rt[Ot++]=ss,Nr=t.id,Ir=t.overflow,ss=e),e=_h(e,n.children),e.flags|=4096,e)}function hp(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Uc(t.return,e,r)}function Bu(t,e,r,n,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function Dv(t,e,r){var n=e.pendingProps,s=n.revealOrder,i=n.tail;if(st(t,e,n.children,r),n=_e.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&hp(t,r,e);else if(t.tag===19)hp(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(fe(_e,n),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(r=e.child,s=null;r!==null;)t=r.alternate,t!==null&&il(t)===null&&(s=r),r=r.sibling;r=s,r===null?(s=e.child,e.child=null):(s=r.sibling,r.sibling=null),Bu(e,!1,s,r,i);break;case"backwards":for(r=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&il(t)===null){e.child=s;break}t=s.sibling,s.sibling=r,r=s,s=t}Bu(e,!0,r,null,i);break;case"together":Bu(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Oa(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Ur(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),os|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(L(153));if(e.child!==null){for(t=e.child,r=_n(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=_n(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function zx(t,e,r){switch(e.tag){case 3:Iv(e),si();break;case 5:lv(e);break;case 1:vt(e.type)&&Za(e);break;case 4:hh(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,s=e.memoizedProps.value;fe(rl,n._currentValue),n._currentValue=s;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(fe(_e,_e.current&1),e.flags|=128,null):r&e.child.childLanes?Lv(t,e,r):(fe(_e,_e.current&1),t=Ur(t,e,r),t!==null?t.sibling:null);fe(_e,_e.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return Dv(t,e,r);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),fe(_e,_e.current),n)break;return null;case 22:case 23:return e.lanes=0,Ov(t,e,r)}return Ur(t,e,r)}var $v,Kc,Mv,Uv;$v=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Kc=function(){};Mv=function(t,e,r,n){var s=t.memoizedProps;if(s!==n){t=e.stateNode,qn(br.current);var i=null;switch(r){case"input":s=mc(t,s),n=mc(t,n),i=[];break;case"select":s=Ee({},s,{value:void 0}),n=Ee({},n,{value:void 0}),i=[];break;case"textarea":s=yc(t,s),n=yc(t,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Ya)}_c(r,n);var o;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(eo.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var l=n[u];if(a=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(eo.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&me("scroll",t),i||a===l||(i=[])):(i=i||[]).push(u,l))}r&&(i=i||[]).push("style",r);var u=i;(e.updateQueue=u)&&(e.flags|=4)}};Uv=function(t,e,r,n){r!==n&&(e.flags|=4)};function Ni(t,e){if(!we)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function Je(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function Fx(t,e,r){var n=e.pendingProps;switch(ih(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(e),null;case 1:return vt(e.type)&&Xa(),Je(e),null;case 3:return n=e.stateNode,oi(),ge(gt),ge(et),ph(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(sa(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Xt!==null&&(td(Xt),Xt=null))),Kc(t,e),Je(e),null;case 5:fh(e);var s=qn(fo.current);if(r=e.type,t!==null&&e.stateNode!=null)Mv(t,e,r,n,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(L(166));return Je(e),null}if(t=qn(br.current),sa(e)){n=e.stateNode,r=e.type;var i=e.memoizedProps;switch(n[yr]=e,n[co]=i,t=(e.mode&1)!==0,r){case"dialog":me("cancel",n),me("close",n);break;case"iframe":case"object":case"embed":me("load",n);break;case"video":case"audio":for(s=0;s<Fi.length;s++)me(Fi[s],n);break;case"source":me("error",n);break;case"img":case"image":case"link":me("error",n),me("load",n);break;case"details":me("toggle",n);break;case"input":bf(n,i),me("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},me("invalid",n);break;case"textarea":Ef(n,i),me("invalid",n)}_c(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 31,278 bytes, line 41
41o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&na(n.textContent,a,t),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&na(n.textContent,a,t),s=["children",""+a]):eo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&me("scroll",n)}switch(r){case"input":Qo(n),xf(n,i,!0);break;case"textarea":Qo(n),Sf(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=Ya)}n=s,e.updateQueue=n,n!==null&&(e.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=fg(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[yr]=e,t[co]=n,$v(t,e,!1,!1),e.stateNode=t;e:{switch(o=bc(r,n),r){case"dialog":me("cancel",t),me("close",t),s=n;break;case"iframe":case"object":case"embed":me("load",t),s=n;break;case"video":case"audio":for(s=0;s<Fi.length;s++)me(Fi[s],t);s=n;break;case"source":me("error",t),s=n;break;case"img":case"image":case"link":me("error",t),me("load",t),s=n;break;case"details":me("toggle",t),s=n;break;case"input":bf(t,n),s=mc(t,n),me("invalid",t);break;case"option":s=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},s=Ee({},n,{value:void 0}),me("invalid",t);break;case"textarea":Ef(t,n),s=yc(t,n),me("invalid",t);break;default:s=n}_c(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?gg(t,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&pg(t,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&to(t,l):typeof l=="number"&&to(t,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(eo.hasOwnProperty(i)?l!=null&&i==="onScroll"&&me("scroll",t):l!=null&&Wd(t,i,l,o))}switch(r){case"input":Qo(t),xf(t,n,!1);break;case"textarea":Qo(t),Sf(t);break;case"option":n.value!=null&&t.setAttribute("value",""+En(n.value));break;case"select":t.multiple=!!n.multiple,i=n.value,i!=null?Ds(t,!!n.multiple,i,!1):n.defaultValue!=null&&Ds(t,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=Ya)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Je(e),null;case 6:if(t&&e.stateNode!=null)Uv(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(L(166));if(r=qn(fo.current),qn(br.current),sa(e)){if(n=e.stateNode,r=e.memoizedProps,n[yr]=e,(i=n.nodeValue!==r)&&(t=St,t!==null))switch(t.tag){case 3:na(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&na(n.nodeValue,r,(t.mode&1)!==0)}i&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[yr]=e,e.stateNode=n}return Je(e),null;case 13:if(ge(_e),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(we&&Et!==null&&e.mode&1&&!(e.flags&128))nv(),si(),e.flags|=98560,i=!1;else if(i=sa(e),n!==null&&n.dehydrated!==null){if(t===null){if(!i)throw Error(L(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(L(317));i[yr]=e}else si(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Je(e),i=!1}else Xt!==null&&(td(Xt),Xt=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||_e.current&1?Le===0&&(Le=3):Ch())),e.updateQueue!==null&&(e.flags|=4),Je(e),null);case 4:return oi(),Kc(t,e),t===null&&lo(e.stateNode.containerInfo),Je(e),null;case 10:return uh(e.type._context),Je(e),null;case 17:return vt(e.type)&&Xa(),Je(e),null;case 19:if(ge(_e),i=e.memoizedState,i===null)return Je(e),null;if(n=(e.flags&128)!==0,o=i.rendering,o===null)if(n)Ni(i,!1);else{if(Le!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=il(t),o!==null){for(e.flags|=128,Ni(i,!1),n=o.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)i=r,t=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=t,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,t=o.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return fe(_e,_e.current&1|2),e.child}t=t.sibling}i.tail!==null&&Te()>li&&(e.flags|=128,n=!0,Ni(i,!1),e.lanes=4194304)}else{if(!n)if(t=il(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Ni(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!we)return Je(e),null}else 2*Te()-i.renderingStartTime>li&&r!==1073741824&&(e.flags|=128,n=!0,Ni(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(r=i.last,r!==null?r.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Te(),e.sibling=null,r=_e.current,fe(_e,n?r&1|2:r&1),e):(Je(e),null);case 22:case 23:return kh(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?_t&1073741824&&(Je(e),e.subtreeFlags&6&&(e.flags|=8192)):Je(e),null;case 24:return null;case 25:return null}throw Error(L(156,e.tag))}function Bx(t,e){switch(ih(e),e.tag){case 1:return vt(e.type)&&Xa(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return oi(),ge(gt),ge(et),ph(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return fh(e),null;case 13:if(ge(_e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(L(340));si()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ge(_e),null;case 4:return oi(),null;case 10:return uh(e.type._context),null;case 22:case 23:return kh(),null;case 24:return null;default:return null}}var aa=!1,Xe=!1,Vx=typeof WeakSet=="function"?WeakSet:Set,F=null;function Is(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ke(t,e,n)}else r.current=null}function Gc(t,e,r){try{r()}catch(n){ke(t,e,n)}}var fp=!1;function Wx(t,e){if(Rc=Ga,t=Wg(),nh(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,c=0,h=t,p=null;t:for(;;){for(var f;h!==r||s!==0&&h.nodeType!==3||(a=o+s),h!==i||n!==0&&h.nodeType!==3||(l=o+n),h.nodeType===3&&(o+=h.nodeValue.length),(f=h.firstChild)!==null;)p=h,h=f;for(;;){if(h===t)break t;if(p===r&&++u===s&&(a=o),p===i&&++c===n&&(l=o),(f=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=f}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Oc={focusedElem:t,selectionRange:r},Ga=!1,F=e;F!==null;)if(e=F,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,F=t;else for(;F!==null;){e=F;try{var _=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var y=_.memoizedProps,b=_.memoizedState,v=e.stateNode,m=v.getSnapshotBeforeUpdate(e.elementType===e.type?y:Ht(e.type,y),b);v.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(x){ke(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,F=t;break}F=e.return}return _=fp,fp=!1,_}function Ji(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&Gc(e,r,i)}s=s.next}while(s!==n)}}function Vl(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Qc(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function zv(t){var e=t.alternate;e!==null&&(t.alternate=null,zv(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[yr],delete e[co],delete e[Lc],delete e[Cx],delete e[Tx])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Fv(t){return t.tag===5||t.tag===3||t.tag===4}function pp(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Fv(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Jc(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Ya));else if(n!==4&&(t=t.child,t!==null))for(Jc(t,e,r),t=t.sibling;t!==null;)Jc(t,e,r),t=t.sibling}function Yc(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Yc(t,e,r),t=t.sibling;t!==null;)Yc(t,e,r),t=t.sibling}var Be=null,Jt=!1;function Gr(t,e,r){for(r=r.child;r!==null;)Bv(t,e,r),r=r.sibling}function Bv(t,e,r){if(_r&&typeof _r.onCommitFiberUnmount=="function")try{_r.onCommitFiberUnmount(Ll,r)}catch{}switch(r.tag){case 5:Xe||Is(r,e);case 6:var n=Be,s=Jt;Be=null,Gr(t,e,r),Be=n,Jt=s,Be!==null&&(Jt?(t=Be,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Be.removeChild(r.stateNode));break;case 18:Be!==null&&(Jt?(t=Be,r=r.stateNode,t.nodeType===8?Lu(t.parentNode,r):t.nodeType===1&&Lu(t,r),io(t)):Lu(Be,r.stateNode));break;case 4:n=Be,s=Jt,Be=r.stateNode.containerInfo,Jt=!0,Gr(t,e,r),Be=n,Jt=s;break;case 0:case 11:case 14:case 15:if(!Xe&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Gc(r,e,o),s=s.next}while(s!==n)}Gr(t,e,r);break;case 1:if(!Xe&&(Is(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){ke(r,e,a)}Gr(t,e,r);break;case 21:Gr(t,e,r);break;case 22:r.mode&1?(Xe=(n=Xe)||r.memoizedState!==null,Gr(t,e,r),Xe=n):Gr(t,e,r);break;default:Gr(t,e,r)}}function mp(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new Vx),e.forEach(function(n){var s=Zx.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Bt(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Be=a.stateNode,Jt=!1;break e;case 3:Be=a.stateNode.containerInfo,Jt=!0;break e;case 4:Be=a.stateNode.containerInfo,Jt=!0;break e}a=a.return}if(Be===null)throw Error(L(160));Bv(i,o,s),Be=null,Jt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){ke(s,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)Vv(e,t),e=e.sibling}function Vv(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Bt(e,t),hr(t),n&4){try{Ji(3,t,t.return),Vl(3,t)}catch(y){ke(t,t.return,y)}try{Ji(5,t,t.return)}catch(y){ke(t,t.return,y)}}break;case 1:Bt(e,t),hr(t),n&512&&r!==null&&Is(r,r.return);break;case 5:if(Bt(e,t),hr(t),n&512&&r!==null&&Is(r,r.return),t.flags&32){var s=t.stateNode;try{to(s,"")}catch(y){ke(t,t.return,y)}}if(n&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,o=r!==null?r.memoizedProps:i,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&dg(s,i),bc(a,o);var u=bc(a,i);for(o=0;o<l.length;o+=2){var c=l[o],h=l[o+1];c==="style"?gg(s,h):c==="dangerouslySetInnerHTML"?pg(s,h):c==="children"?to(s,h):Wd(s,c,h,u)}switch(a){case"input":gc(s,i);break;case"textarea":hg(s,i);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?Ds(s,!!i.multiple,f,!1):p!==!!i.multiple&&(i.defaultValue!=null?Ds(s,!!i.multiple,i.defaultValue,!0):Ds(s,!!i.multiple,i.multiple?[]:"",!1))}s[co]=i}catch(y){ke(t,t.return,y)}}break;case 6:if(Bt(e,t),hr(t),n&4){if(t.stateNode===null)throw Error(L(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(y){ke(t,t.return,y)}}break;case 3:if(Bt(e,t),hr(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{io(e.containerInfo)}catch(y){ke(t,t.return,y)}break;case 4:Bt(e,t),hr(t);break;case 13:Bt(e,t),hr(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Eh=Te())),n&4&&mp(t);break;case 22:if(c=r!==null&&r.memoizedState!==null,t.mode&1?(Xe=(u=Xe)||c,Bt(e,t),Xe=u):Bt(e,t),hr(t),n&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(F=t,c=t.child;c!==null;){for(h=F=c;F!==null;){switch(p=F,f=p.child,p.tag){case 0:case 11:case 14:case 15:Ji(4,p,p.return);break;case 1:Is(p,p.return);var _=p.stateNode;if(typeof _.componentWillUnmount=="function"){n=p,r=p.return;try{e=n,_.props=e.memoizedProps,_.state=e.memoizedState,_.componentWillUnmount()}catch(y){ke(n,r,y)}}break;case 5:Is(p,p.return);break;case 22:if(p.memoizedState!==null){vp(h);continue}}f!==null?(f.return=p,F=f):vp(h)}c=c.sibling}e:for(c=null,h=t;;){if(h.tag===5){if(c===null){c=h;try{s=h.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=h.stateNode,l=h.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=mg("display",o))}catch(y){ke(t,t.return,y)}}}else if(h.tag===6){if(c===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(y){ke(t,t.return,y)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===t)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;c===h&&(c=null),h=h.return}c===h&&(c=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Bt(e,t),hr(t),n&4&&mp(t);break;case 21:break;default:Bt(e,t),hr(t)}}function hr(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(Fv(r)){var n=r;break e}r=r.return}throw Error(L(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(to(s,""),n.flags&=-33);var i=pp(t);Yc(t,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=pp(t);Jc(t,a,o);break;default:throw Error(L(161))}}catch(l){ke(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Hx(t,e,r){F=t,Wv(t)}function Wv(t,e,r){for(var n=(t.mode&1)!==0;F!==null;){var s=F,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||aa;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Xe;a=aa;var u=Xe;if(aa=o,(Xe=l)&&!u)for(F=s;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?yp(s):l!==null?(l.return=o,F=l):yp(s);for(;i!==null;)F=i,Wv(i),i=i.sibling;F=s,aa=a,Xe=u}gp(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,F=i):gp(t)}}function gp(t){for(;F!==null;){var e=F;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Xe||Vl(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!Xe)if(r===null)n.componentDidMount();else{var s=e.elementType===e.type?r.memoizedProps:Ht(e.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&ep(e,i,n);break;case 3:var o=e.updateQueue;if(o!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}ep(e,o,r)}break;case 5:var a=e.stateNode;if(r===null&&e.flags&4){r=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var h=c.dehydrated;h!==null&&io(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}Xe||e.flags&512&&Qc(e)}catch(p){ke(e,e.return,p)}}if(e===t){F=null;break}if(r=e.sibling,r!==null){r.return=e.return,F=r;break}F=e.return}}function vp(t){for(;F!==null;){var e=F;if(e===t){F=null;break}var r=e.sibling;if(r!==null){r.return=e.return,F=r;break}F=e.return}}function yp(t){for(;F!==null;){var e=F;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{Vl(4,e)}catch(l){ke(e,r,l)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var s=e.return;try{n.componentDidMount()}catch(l){ke(e,s,l)}}var i=e.return;try{Qc(e)}catch(l){ke(e,i,l)}break;case 5:var o=e.return;try{Qc(e)}catch(l){ke(e,o,l)}}}catch(l){ke(e,e.return,l)}if(e===t){F=null;break}var a=e.sibling;if(a!==null){a.return=e.return,F=a;break}F=e.return}}var qx=Math.ceil,ll=Br.ReactCurrentDispatcher,bh=Br.ReactCurrentOwner,It=Br.ReactCurrentBatchConfig,ie=0,Me=null,Oe=null,We=0,_t=0,Ls=An(0),Le=0,vo=null,os=0,Wl=0,xh=0,Yi=null,ft=null,Eh=0,li=1/0,Ar=null,ul=!1,Xc=null,yn=null,la=!1,dn=null,cl=0,Xi=0,Zc=null,Na=-1,Ia=0;function ot(){return ie&6?Te():Na!==-1?Na:Na=Te()}function wn(t){return t.mode&1?ie&2&&We!==0?We&-We:jx.transition!==null?(Ia===0&&(Ia=Pg()),Ia):(t=le,t!==0||(t=window.event,t=t===void 0?16:Lg(t.type)),t):1}function er(t,e,r,n){if(50<Xi)throw Xi=0,Zc=null,Error(L(185));Oo(t,r,n),(!(ie&2)||t!==Me)&&(t===Me&&(!(ie&2)&&(Wl|=r),Le===4&&tn(t,We)),yt(t,n),r===1&&ie===0&&!(e.mode&1)&&(li=Te()+500,zl&&Rn()))}function yt(t,e){var r=t.callbackNode;jb(t,e);var n=Ka(t,t===Me?We:0);if(n===0)r!==null&&Tf(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&Tf(r),e===1)t.tag===0?Px(wp.bind(null,t)):ev(wp.bind(null,t)),Sx(function(){!(ie&6)&&Rn()}),r=null;else{switch(jg(n)){case 1:r=Qd;break;case 4:r=Cg;break;case 16:r=qa;break;case 536870912:r=Tg;break;default:r=qa}r=Xv(r,Hv.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function Hv(t,e){if(Na=-1,Ia=0,ie&6)throw Error(L(327));var r=t.callbackNode;if(Fs()&&t.callbackNode!==r)return null;var n=Ka(t,t===Me?We:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=dl(t,n);else{e=n;var s=ie;ie|=2;var i=Kv();(Me!==t||We!==e)&&(Ar=null,li=Te()+500,es(t,e));do try{Qx();break}catch(a){qv(t,a)}while(!0);lh(),ll.current=i,ie=s,Oe!==null?e=0:(Me=null,We=0,e=Le)}if(e!==0){if(e===2&&(s=Cc(t),s!==0&&(n=s,e=ed(t,s))),e===1)throw r=vo,es(t,0),tn(t,n),yt(t,Te()),r;if(e===6)tn(t,n);else{if(s=t.current.alternate,!(n&30)&&!Kx(s)&&(e=dl(t,n),e===2&&(i=Cc(t),i!==0&&(n=i,e=ed(t,i))),e===1))throw r=vo,es(t,0),tn(t,n),yt(t,Te()),r;switch(t.finishedWork=s,t.finishedLanes=n,e){case 0:case 1:throw Error(L(345));case 2:$n(t,ft,Ar);break;case 3:if(tn(t,n),(n&130023424)===n&&(e=Eh+500-Te(),10<e)){if(Ka(t,0)!==0)break;if(s=t.suspendedLanes,(s&n)!==n){ot(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=Ic($n.bind(null,t,ft,Ar),e);break}$n(t,ft,Ar);break;case 4:if(tn(t,n),(n&4194240)===n)break;for(e=t.eventTimes,s=-1;0<n;){var o=31-Zt(n);i=1<<o,o=e[o],o>s&&(s=o),n&=~i}if(n=s,n=Te()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*qx(n/1960))-n,10<n){t.timeoutHandle=Ic($n.bind(null,t,ft,Ar),n);break}$n(t,ft,Ar);break;case 5:$n(t,ft,Ar);break;default:throw Error(L(329))}}}return yt(t,Te()),t.callbackNode===r?Hv.bind(null,t):null}function ed(t,e){var r=Yi;return t.current.memoizedState.isDehydrated&&(es(t,e).flags|=256),t=dl(t,e),t!==2&&(e=ft,ft=r,e!==null&&td(e)),t}function td(t){ft===null?ft=t:ft.push.apply(ft,t)}function Kx(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!tr(i(),s))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function tn(t,e){for(e&=~xh,e&=~Wl,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-Zt(e),n=1<<r;t[r]=-1,e&=~n}}function wp(t){if(ie&6)throw Error(L(327));Fs();var e=Ka(t,0);if(!(e&1))return yt(t,Te()),null;var r=dl(t,e);if(t.tag!==0&&r===2){var n=Cc(t);n!==0&&(e=n,r=ed(t,n))}if(r===1)throw r=vo,es(t,0),tn(t,e),yt(t,Te()),r;if(r===6)throw Error(L(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,$n(t,ft,Ar),yt(t,Te()),null}function Sh(t,e){var r=ie;ie|=1;try{return t(e)}finally{ie=r,ie===0&&(li=Te()+500,zl&&Rn())}}function as(t){dn!==null&&dn.tag===0&&!(ie&6)&&Fs();var e=ie;ie|=1;var r=It.transition,n=le;try{if(It.transition=null,le=1,t)return t()}finally{le=n,It.transition=r,ie=e,!(ie&6)&&Rn()}}function kh(){_t=Ls.current,ge(Ls)}function es(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,Ex(r)),Oe!==null)for(r=Oe.return;r!==null;){var n=r;switch(ih(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Xa();break;case 3:oi(),ge(gt),ge(et),ph();break;case 5:fh(n);break;case 4:oi();break;case 13:ge(_e);break;case 19:ge(_e);break;case 10:uh(n.type._context);break;case 22:case 23:kh()}r=r.return}if(Me=t,Oe=t=_n(t.current,null),We=_t=e,Le=0,vo=null,xh=Wl=os=0,ft=Yi=null,Hn!==null){for(e=0;e<Hn.length;e++)if(r=Hn[e],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=s,n.next=o}r.pending=n}Hn=null}return t}function qv(t,e){do{var r=Oe;try{if(lh(),Aa.current=al,ol){for(var n=be.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}ol=!1}if(is=0,$e=Ie=be=null,Qi=!1,po=0,bh.current=null,r===null||r.return===null){Le=1,vo=e,Oe=null;break}e:{var i=t,o=r.return,a=r,l=e;if(e=We,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,h=c.tag;if(!(c.mode&1)&&(h===0||h===11||h===15)){var p=c.alternate;p?(c.updateQueue=p.updateQueue,c.memoizedState=p.memoizedState,c.lanes=p.lanes):(c.updateQueue=null,c.memoizedState=null)}var f=op(o);if(f!==null){f.flags&=-257,ap(f,o,a,i,e),f.mode&1&&ip(i,u,e),e=f,l=u;var _=e.updateQueue;if(_===null){var y=new Set;y.add(l),e.updateQueue=y}else _.add(l);break e}else{if(!(e&1)){ip(i,u,e),Ch();break e}l=Error(L(426))}}else if(we&&a.mode&1){var b=op(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),ap(b,o,a,i,e),oh(ai(l,a));break e}}i=l=ai(l,a),Le!==4&&(Le=2),Yi===null?Yi=[i]:Yi.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var v=jv(i,l,e);Zf(i,v);break e;case 1:a=l;var m=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof m.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(yn===null||!yn.has(w)))){i.flags|=65536,e&=-e,i.lanes|=e;var x=Av(i,a,e);Zf(i,x);break e}}i=i.return}while(i!==null)}Qv(r)}catch(E){e=E,Oe===r&&r!==null&&(Oe=r=r.return);continue}break}while(!0)}function Kv(){var t=ll.current;return ll.current=al,t===null?al:t}function Ch(){(Le===0||Le===3||Le===2)&&(Le=4),Me===null||!(os&268435455)&&!(Wl&268435455)||tn(Me,We)}function dl(t,e){var r=ie;ie|=2;var n=Kv();(Me!==t||We!==e)&&(Ar=null,es(t,e));do try{Gx();break}catch(s){qv(t,s)}while(!0);if(lh(),ie=r,ll.current=n,Oe!==null)throw Error(L(261));return Me=null,We=0,Le}function Gx(){for(;Oe!==null;)Gv(Oe)}function Qx(){for(;Oe!==null&&!_b();)Gv(Oe)}function Gv(t){var e=Yv(t.alternate,t,_t);t.memoizedProps=t.pendingProps,e===null?Qv(t):Oe=e,bh.current=null}function Qv(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=Bx(r,e),r!==null){r.flags&=32767,Oe=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Le=6,Oe=null;return}}else if(r=Fx(r,e,_t),r!==null){Oe=r;return}if(e=e.sibling,e!==null){Oe=e;return}Oe=e=t}while(e!==null);Le===0&&(Le=5)}function $n(t,e,r){var n=le,s=It.transition;try{It.transition=null,le=1,Jx(t,e,r,n)}finally{It.transition=s,le=n}return null}function Jx(t,e,r,n){do Fs();while(dn!==null);if(ie&6)throw Error(L(327));r=t.finishedWork;var s=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(L(177));t.callbackNode=null,t.callbackPriority=0;var i=r.lanes|r.childLanes;if(Ab(t,i),t===Me&&(Oe=Me=null,We=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||la||(la=!0,Xv(qa,function(){return Fs(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=It.transition,It.transition=null;var o=le;le=1;var a=ie;ie|=4,bh.current=null,Wx(t,r),Vv(r,t),gx(Oc),Ga=!!Rc,Oc=Rc=null,t.current=r,Hx(r),bb(),ie=a,le=o,It.transition=i}else t.current=r;if(la&&(la=!1,dn=t,cl=s),i=t.pendingLanes,i===0&&(yn=null),Sb(r.stateNode),yt(t,Te()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)s=e[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(ul)throw ul=!1,t=Xc,Xc=null,t;return cl&1&&t.tag!==0&&Fs(),i=t.pendingLanes,i&1?t===Zc?Xi++:(Xi=0,Zc=t):Xi=0,Rn(),null}function Fs(){if(dn!==null){var t=jg(cl),e=It.transition,r=le;try{if(It.transition=null,le=16>t?16:t,dn===null)var n=!1;else{if(t=dn,dn=null,cl=0,ie&6)throw Error(L(331));var s=ie;for(ie|=4,F=t.current;F!==null;){var i=F,o=i.child;if(F.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(F=u;F!==null;){var c=F;switch(c.tag){case 0:case 11:case 15:Ji(8,c,i)}var h=c.child;if(h!==null)h.return=c,F=h;else for(;F!==null;){c=F;var p=c.sibling,f=c.return;if(zv(c),c===u){F=null;break}if(p!==null){p.return=f,F=p;break}F=f}}}var _=i.alternate;if(_!==null){var y=_.child;if(y!==null){_.child=null;do{var b=y.sibling;y.sibling=null,y=b}while(y!==null)}}F=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,F=o;else e:for(;F!==null;){if(i=F,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Ji(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,F=v;break e}F=i.return}}var m=t.current;for(F=m;F!==null;){o=F;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,F=w;else e:for(o=m;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Vl(9,a)}}catch(E){ke(a,a.return,E)}if(a===o){F=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,F=x;break e}F=a.return}}if(ie=s,Rn(),_r&&typeof _r.onPostCommitFiberRoot=="function")try{_r.onPostCommitFiberRoot(Ll,t)}catch{}n=!0}return n}finally{le=r,It.transition=e}}return!1}function _p(t,e,r){e=ai(r,e),e=jv(t,e,1),t=vn(t,e,1),e=ot(),t!==null&&(Oo(t,1,e),yt(t,e))}function ke(t,e,r){if(t.tag===3)_p(t,t,r);else for(;e!==null;){if(e.tag===3){_p(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(yn===null||!yn.has(n))){t=ai(r,t),t=Av(e,t,1),e=vn(e,t,1),t=ot(),e!==null&&(Oo(e,1,t),yt(e,t));break}}e=e.return}}function Yx(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=ot(),t.pingedLanes|=t.suspendedLanes&r,Me===t&&(We&r)===r&&(Le===4||Le===3&&(We&130023424)===We&&500>Te()-Eh?es(t,0):xh|=r),yt(t,e)}function Jv(t,e){e===0&&(t.mode&1?(e=Xo,Xo<<=1,!(Xo&130023424)&&(Xo=4194304)):e=1);var r=ot();t=Mr(t,e),t!==null&&(Oo(t,e,r),yt(t,r))}function Xx(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),Jv(t,r)}function Zx(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(L(314))}n!==null&&n.delete(e),Jv(t,r)}var Yv;Yv=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||gt.current)mt=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return mt=!1,zx(t,e,r);mt=!!(t.flags&131072)}else mt=!1,we&&e.flags&1048576&&tv(e,tl,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Oa(t,e),t=e.pendingProps;var s=ni(e,et.current);zs(e,r),s=gh(null,e,n,t,s,r);var i=vh();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,vt(n)?(i=!0,Za(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,dh(e),s.updater=Bl,e.stateNode=s,s._reactInternals=e,Fc(e,n,t,r),e=Wc(null,e,n,!0,i,r)):(e.tag=0,we&&i&&sh(e),st(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Oa(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=tE(n),t=Ht(n,t),s){case 0:e=Vc(null,e,n,t,r);break e;case 1:e=cp(null,e,n,t,r);break e;case 11:e=lp(null,e,n,t,r);break e;case 14:e=up(null,e,n,Ht(n.type,t),r);break e}throw Error(L(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Ht(n,s),Vc(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Ht(n,s),cp(t,e,n,s,r);case 3:e:{if(Iv(e),t===null)throw Error(L(387));n=e.pendingProps,i=e.memoizedState,s=i.element,av(t,e),sl(e,n,null,r);var o=e.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=ai(Error(L(423)),e),e=dp(t,e,n,r,s);break e}else if(n!==s){s=ai(Error(L(424)),e),e=dp(t,e,n,r,s);break e}else for(Et=gn(e.stateNode.containerInfo.firstChild),St=e,we=!0,Xt=null,r=iv(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(si(),n===s){e=Ur(t,e,r);break e}st(t,e,n,r)}e=e.child}return e;case 5:return lv(e),t===null&&Mc(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,Nc(n,s)?o=null:i!==null&&Nc(n,i)&&(e.flags|=32),Nv(t,e),st(t,e,o,r),e.child;case 6:return t===null&&Mc(e),null;case 13:return Lv(t,e,r);case 4:return hh(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=ii(e,null,n,r):st(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Ht(n,s),lp(t,e,n,s,r);case 7:return st(t,e,e.pendingProps,r),e.child;case 8:return st(t,e,e.pendingProps.children,r),e.child;case 12:return st(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,fe(rl,n._currentValue),n._currentValue=o,i!==null)if(tr(i.value,o)){if(i.children===s.children&&!gt.current){e=Ur(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=Lr(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Uc(i.return,r,e),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(L(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Uc(o,r,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}st(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,zs(e,r),s=Lt(s),n=n(s),e.flags|=1,st(t,e,n,r),e.child;case 14:return n=e.type,s=Ht(n,e.pendingProps),s=Ht(n.type,s),up(t,e,n,s,r);
vendor: 7,118 bytes, line 41
41case 15:return Rv(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Ht(n,s),Oa(t,e),e.tag=1,vt(n)?(t=!0,Za(e)):t=!1,zs(e,r),Pv(e,n,s),Fc(e,n,s,r),Wc(null,e,n,!0,t,r);case 19:return Dv(t,e,r);case 22:return Ov(t,e,r)}throw Error(L(156,e.tag))};function Xv(t,e){return kg(t,e)}function eE(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nt(t,e,r,n){return new eE(t,e,r,n)}function Th(t){return t=t.prototype,!(!t||!t.isReactComponent)}function tE(t){if(typeof t=="function")return Th(t)?1:0;if(t!=null){if(t=t.$$typeof,t===qd)return 11;if(t===Kd)return 14}return 2}function _n(t,e){var r=t.alternate;return r===null?(r=Nt(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function La(t,e,r,n,s,i){var o=2;if(n=t,typeof t=="function")Th(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case ks:return ts(r.children,s,i,e);case Hd:o=8,s|=8;break;case dc:return t=Nt(12,r,e,s|2),t.elementType=dc,t.lanes=i,t;case hc:return t=Nt(13,r,e,s),t.elementType=hc,t.lanes=i,t;case fc:return t=Nt(19,r,e,s),t.elementType=fc,t.lanes=i,t;case lg:return Hl(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case og:o=10;break e;case ag:o=9;break e;case qd:o=11;break e;case Kd:o=14;break e;case Xr:o=16,n=null;break e}throw Error(L(130,t==null?t:typeof t,""))}return e=Nt(o,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function ts(t,e,r,n){return t=Nt(7,t,n,e),t.lanes=r,t}function Hl(t,e,r,n){return t=Nt(22,t,n,e),t.elementType=lg,t.lanes=r,t.stateNode={isHidden:!1},t}function Vu(t,e,r){return t=Nt(6,t,null,e),t.lanes=r,t}function Wu(t,e,r){return e=Nt(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function rE(t,e,r,n,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Su(0),this.expirationTimes=Su(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Su(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Ph(t,e,r,n,s,i,o,a,l){return t=new rE(t,e,r,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Nt(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},dh(i),t}function nE(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ss,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function Zv(t){if(!t)return Sn;t=t._reactInternals;e:{if(cs(t)!==t||t.tag!==1)throw Error(L(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(vt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(L(171))}if(t.tag===1){var r=t.type;if(vt(r))return Zg(t,r,e)}return e}function ey(t,e,r,n,s,i,o,a,l){return t=Ph(r,n,!0,t,s,i,o,a,l),t.context=Zv(null),r=t.current,n=ot(),s=wn(r),i=Lr(n,s),i.callback=e??null,vn(r,i,s),t.current.lanes=s,Oo(t,s,n),yt(t,n),t}function ql(t,e,r,n){var s=e.current,i=ot(),o=wn(s);return r=Zv(r),e.context===null?e.context=r:e.pendingContext=r,e=Lr(i,o),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=vn(s,e,o),t!==null&&(er(t,s,o,i),ja(t,s,o)),o}function hl(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function bp(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function jh(t,e){bp(t,e),(t=t.alternate)&&bp(t,e)}function sE(){return null}var ty=typeof reportError=="function"?reportError:function(t){console.error(t)};function Ah(t){this._internalRoot=t}Kl.prototype.render=Ah.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(L(409));ql(t,e,null,null)};Kl.prototype.unmount=Ah.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;as(function(){ql(null,t,null,null)}),e[$r]=null}};function Kl(t){this._internalRoot=t}Kl.prototype.unstable_scheduleHydration=function(t){if(t){var e=Og();t={blockedOn:null,target:t,priority:e};for(var r=0;r<en.length&&e!==0&&e<en[r].priority;r++);en.splice(r,0,t),r===0&&Ig(t)}};function Rh(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Gl(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function xp(){}function iE(t,e,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var u=hl(o);i.call(u)}}var o=ey(e,n,t,0,null,!1,!1,"",xp);return t._reactRootContainer=o,t[$r]=o.current,lo(t.nodeType===8?t.parentNode:t),as(),o}for(;s=t.lastChild;)t.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=hl(l);a.call(u)}}var l=Ph(t,0,!1,null,null,!1,!1,"",xp);return t._reactRootContainer=l,t[$r]=l.current,lo(t.nodeType===8?t.parentNode:t),as(function(){ql(e,l,r,n)}),l}function Ql(t,e,r,n,s){var i=r._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=hl(o);a.call(l)}}ql(e,o,t,s)}else o=iE(r,e,t,s,n);return hl(o)}Ag=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=zi(e.pendingLanes);r!==0&&(Jd(e,r|1),yt(e,Te()),!(ie&6)&&(li=Te()+500,Rn()))}break;case 13:as(function(){var n=Mr(t,1);if(n!==null){var s=ot();er(n,t,1,s)}}),jh(t,1)}};Yd=function(t){if(t.tag===13){var e=Mr(t,134217728);if(e!==null){var r=ot();er(e,t,134217728,r)}jh(t,134217728)}};Rg=function(t){if(t.tag===13){var e=wn(t),r=Mr(t,e);if(r!==null){var n=ot();er(r,t,e,n)}jh(t,e)}};Og=function(){return le};Ng=function(t,e){var r=le;try{return le=t,e()}finally{le=r}};Ec=function(t,e,r){switch(e){case"input":if(gc(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var s=Ul(n);if(!s)throw Error(L(90));cg(n),gc(n,s)}}}break;case"textarea":hg(t,r);break;case"select":e=r.value,e!=null&&Ds(t,!!r.multiple,e,!1)}};wg=Sh;
41_g=as;var oE={usingClientEntryPoint:!1,Events:[Io,js,Ul,vg,yg,Sh]},Ii={findFiberByHostInstance:Wn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},aE={bundleType:Ii.bundleType,version:Ii.version,rendererPackageName:Ii.rendererPackageName,rendererConfig:Ii.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Br.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Eg(t),t===null?null:t.stateNode},findFiberByHostInstance:Ii.findFiberByHostInstance||sE,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 ua=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ua.isDisabled&&ua.supportsFiber)try{Ll=ua.inject(aE),_r=ua}catch{}}Pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oE;Pt.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Rh(e))throw Error(L(200));return nE(t,e,null,r)};Pt.createRoot=function(t,e){if(!Rh(t))throw Error(L(299));var r=!1,n="",s=ty;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=Ph(t,1,!1,null,null,r,!1,n,s),t[$r]=e.current,lo(t.nodeType===8?t.parentNode:t),new Ah(e)};Pt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(L(188)):(t=Object.keys(t).join(","),Error(L(268,t)));return t=Eg(e),t=t===null?null:t.stateNode,t};Pt.flushSync=function(t){return as(t)};Pt.hydrate=function(t,e,r){if(!Gl(e))throw Error(L(200));return Ql(null,t,e,!0,r)};Pt.hydrateRoot=function(t,e,r){if(!Rh(t))throw Error(L(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=ty;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),e=ey(e,null,t,1,r??null,s,!1,i,o),t[$r]=e.current,lo(t),n)for(t=0;t<n.length;t++)r=n[t],s=r._getVersion,s=s(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,s]:e.mutableSourceEagerHydrationData.push(r,s);return new Kl(e)};Pt.render=function(t,e,r){if(!Gl(e))throw Error(L(200));return Ql(null,t,e,!1,r)};Pt.unmountComponentAtNode=function(t){if(!Gl(t))throw Error(L(40));return t._reactRootContainer?(as(function(){Ql(null,null,t,!1,function(){t._reactRootContainer=null,t[$r]=null})}),!0):!1};Pt.unstable_batchedUpdates=Sh;Pt.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!Gl(r))throw Error(L(200));if(t==null||t._reactInternals===void 0)throw Error(L(38));return Ql(t,e,r,!1,n)};Pt.version="18.3.1-next-f1338f8080-20240426";function ry(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ry)}catch(t){console.error(t)}}ry(),rg.exports=Pt;var Do=rg.exports;const ny=$d(Do);var sy,Ep=Do;sy=Ep.createRoot,Ep.hydrateRoot;const lE="modulepreload",uE=function(t){return"/"+t},Sp={},U=function(e,r,n){let s=Promise.resolve();if(r&&r.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(r.map(l=>{if(l=uE(l),l in Sp)return;Sp[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":lE,u||(h.as="script"),h.crossOrigin="",h.href=l,a&&h.setAttribute("nonce",a),document.head.appendChild(h),u)return new Promise((p,f)=>{h.addEventListener("load",p),h.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 e().catch(i)})},cE=1,dE=1e6;let Hu=0;function hE(){return Hu=(Hu+1)%Number.MAX_SAFE_INTEGER,Hu.toString()}const qu=new Map,kp=t=>{if(qu.has(t))return;const e=setTimeout(()=>{qu.delete(t),Zi({type:"REMOVE_TOAST",toastId:t})},dE);qu.set(t,e)},fE=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,cE)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(r=>r.id===e.toast.id?{...r,...e.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=e;
41return r?kp(r):t.toasts.forEach(n=>{kp(n.id)}),{...t,toasts:t.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(r=>r.id!==e.toastId)}}},Da=[];let $a={toasts:[]};function Zi(t){$a=fE($a,t),Da.forEach(e=>{e($a)})}function pE({...t}){const e=hE(),r=s=>Zi({type:"UPDATE_TOAST",toast:{...s,id:e}}),n=()=>Zi({type:"DISMISS_TOAST",toastId:e});return Zi({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||n()}}}),{id:e,dismiss:n,update:r}}function mE(){const[t,e]=g.useState($a);return g.useEffect(()=>(Da.push(e),()=>{const r=Da.indexOf(e);r>-1&&Da.splice(r,1)}),[t]),{...t,toast:pE,dismiss:r=>Zi({type:"DISMISS_TOAST",toastId:r})}}function Pe(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Cp(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function iy(...t){return e=>{let r=!1;const n=t.map(s=>{const i=Cp(s,e);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():Cp(t[s],null)}}}}function Tt(...t){return g.useCallback(iy(...t),t)}function NO(t,e){const r=g.createContext(e),n=i=>{const{children:o,...a}=i,l=g.useMemo(()=>a,Object.values(a));return d.jsx(r.Provider,{value:l,children:o})};n.displayName=t+"Provider";function s(i){const o=g.useContext(r);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[n,s]}function $o(t,e=[]){let r=[];function n(i,o){const a=g.createContext(o),l=r.length;r=[...r,o];const u=h=>{var v;const{scope:p,children:f,..._}=h,y=((v=p==null?void 0:p[t])==null?void 0:v[l])||a,b=g.useMemo(()=>_,Object.values(_));return d.jsx(y.Provider,{value:b,children:f})};u.displayName=i+"Provider";function c(h,p){var y;const f=((y=p==null?void 0:p[t])==null?void 0:y[l])||a,_=g.useContext(f);if(_)return _;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,c]}const s=()=>{const i=r.map(o=>g.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return g.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,gE(s,...e)]}function gE(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const h=l(i)[`__scope${u}`];return{...a,...h}},{});return g.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function fl(t){const e=yE(t),r=g.forwardRef((n,s)=>{const{children:i,...o}=n,a=g.Children.toArray(i),l=a.find(_E);if(l){const u=l.props.children,c=a.map(h=>h===l?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:h);return d.jsx(e,{...o,ref:s,children:g.isValidElement(u)?g.cloneElement(u,void 0,c):null})}return d.jsx(e,{...o,ref:s,children:i})});return r.displayName=`${t}.Slot`,r}var vE=fl("Slot");function yE(t){const e=g.forwardRef((r,n)=>{const{children:s,...i}=r;if(g.isValidElement(s)){const o=xE(s),a=bE(i,s.props);return s.type!==g.Fragment&&(a.ref=n?iy(n,o):o),g.cloneElement(s,a)}return g.Children.count(s)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var oy=Symbol("radix.slottable");function wE(t){const e=({children:r})=>d.jsx(d.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=oy,e}function _E(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===oy}function bE(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}function xE(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.
vendor: 9,581 bytes, line 41
41isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function EE(t){const e=t+"CollectionProvider",[r,n]=$o(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:b,children:v}=y,m=$.useRef(null),w=$.useRef(new Map).current;return d.jsx(s,{scope:b,itemMap:w,collectionRef:m,children:v})};o.displayName=e;const a=t+"CollectionSlot",l=fl(a),u=$.forwardRef((y,b)=>{const{scope:v,children:m}=y,w=i(a,v),x=Tt(b,w.collectionRef);return d.jsx(l,{ref:x,children:m})});u.displayName=a;const c=t+"CollectionItemSlot",h="data-radix-collection-item",p=fl(c),f=$.forwardRef((y,b)=>{const{scope:v,children:m,...w}=y,x=$.useRef(null),E=Tt(b,x),S=i(c,v);return $.useEffect(()=>(S.itemMap.set(x,{ref:x,...w}),()=>void S.itemMap.delete(x))),d.jsx(p,{[h]:"",ref:E,children:m})});f.displayName=c;function _(y){const b=i(t+"CollectionConsumer",y);return $.useCallback(()=>{const m=b.collectionRef.current;if(!m)return[];const w=Array.from(m.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((S,k)=>w.indexOf(S.ref.current)-w.indexOf(k.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:u,ItemSlot:f},_,n]}var SE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ue=SE.reduce((t,e)=>{const r=fl(`Primitive.${e}`),n=g.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function ay(t,e){t&&Do.flushSync(()=>t.dispatchEvent(e))}function kn(t){const e=g.useRef(t);return g.useEffect(()=>{e.current=t}),g.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function kE(t,e=globalThis==null?void 0:globalThis.document){const r=kn(t);g.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var CE="DismissableLayer",rd="dismissableLayer.update",TE="dismissableLayer.pointerDownOutside",PE="dismissableLayer.focusOutside",Tp,ly=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Oh=g.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=t,u=g.useContext(ly),[c,h]=g.useState(null),p=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=g.useState({}),_=Tt(e,k=>h(k)),y=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(b),m=c?y.indexOf(c):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=m>=v,E=AE(k=>{const C=k.target,T=[...u.branches].some(P=>P.contains(C));!x||T||(s==null||s(k),o==null||o(k),k.defaultPrevented||a==null||a())},p),S=RE(k=>{const C=k.target;[...u.branches].some(P=>P.contains(C))||(i==null||i(k),o==null||o(k),k.defaultPrevented||a==null||a())},p);return kE(k=>{m===u.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},p),g.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Tp=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Pp(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Tp)}},[c,p,r,u]),g.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Pp())},[c,u]),g.useEffect(()=>{const k=()=>f({});return document.addEventListener(rd,k),()=>document.removeEventListener(rd,k)},[]),d.jsx(Ue.div,{...l,ref:_,style:{pointerEvents:w?x?"auto":"none":void 0,...t.style},onFocusCapture:Pe(t.onFocusCapture,S.onFocusCapture),onBlurCapture:Pe(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Pe(t.onPointerDownCapture,E.onPointerDownCapture)})});Oh.displayName=CE;var jE="DismissableLayerBranch",uy=g.forwardRef((t,e)=>{const r=g.useContext(ly),n=g.useRef(null),s=Tt(e,n);return g.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),d.jsx(Ue.div,{...t,ref:s})});uy.displayName=jE;function AE(t,e=globalThis==null?void 0:globalThis.document){const r=kn(t),n=g.useRef(!1),s=g.useRef(()=>{});return g.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){cy(TE,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function RE(t,e=globalThis==null?void 0:globalThis.document){const r=kn(t),n=g.useRef(!1);return g.useEffect(()=>{const s=i=>{i.target&&!n.current&&cy(PE,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Pp(){const t=new CustomEvent(rd);document.dispatchEvent(t)}function cy(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?ay(s,i):s.dispatchEvent(i)}var OE=Oh,NE=uy,Cn=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},IE="Portal",dy=g.forwardRef((t,e)=>{var a;const{container:r,...n}=t,[s,i]=g.useState(!1);Cn(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?ny.createPortal(d.jsx(Ue.div,{...n,ref:e}),o):null});dy.displayName=IE;function LE(t,e){return g.useReducer((r,n)=>e[r][n]??r,t)}var Jl=t=>{const{present:e,children:r}=t,n=DE(e),s=typeof r=="function"?r({present:n.isPresent}):g.Children.only(r),i=Tt(n.ref,$E(s));return typeof r=="function"||n.isPresent?g.cloneElement(s,{ref:i}):null};Jl.displayName="Presence";function DE(t){const[e,r]=g.useState(),n=g.useRef(null),s=g.useRef(t),i=g.useRef("none"),o=t?"mounted":"unmounted",[a,l]=LE(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=ca(n.current);i.current=a==="mounted"?u:"none"},[a]),Cn(()=>{const u=n.current,c=s.current;if(c!==t){const p=i.current,f=ca(u);t?l("MOUNT"):f==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&p!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),Cn(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,h=f=>{const y=ca(n.current).includes(f.animationName);if(f.target===e&&y&&(l("ANIMATION_END"),!s.current)){const b=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=b)})}},p=f=>{f.target===e&&(i.current=ca(n.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function ca(t){return(t==null?void 0:t.animationName)||"none"}function $E(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var ME=eg[" useInsertionEffect ".trim().toString()]||Cn;function hy({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[s,i,o]=UE({defaultProp:e,onChange:r}),a=t!==void 0,l=a?t:s;{const c=g.useRef(t!==void 0);g.useEffect(()=>{const h=c.current;h!==a&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,n])}const u=g.useCallback(c=>{var h;if(a){const p=zE(c)?c(t):c;p!==t&&((h=o.current)==null||h.call(o,p))}else i(c)},[a,t,i,o]);return[l,u]}function UE({defaultProp:t,onChange:e}){const[r,n]=g.useState(t),s=g.useRef(r),i=g.useRef(e);return ME(()=>{i.current=e},[e]),g.useEffect(()=>{var o;s.current!==r&&((o=i.current)==null||o.call(i,r),s.current=r)},[r,s]),[r,n,i]}function zE(t){return typeof t=="function"}var FE=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),BE="VisuallyHidden",Yl=g.forwardRef((t,e)=>d.jsx(Ue.span,{...t,ref:e,style:{...FE,...t.style}}));Yl.displayName=BE;var VE=Yl,Nh="ToastProvider",[Ih,WE,HE]=EE("Toast"),[fy,IO]=$o("Toast",[HE]),[qE,Xl]=fy(Nh),py=t=>{const{__scopeToast:e,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=g.useState(null),[u,c]=g.useState(0),h=g.useRef(!1),p=g.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Nh}\`. Expected non-empty \`string\`.`),d.jsx(Ih.Provider,{scope:e,children:d.jsx(qE,{scope:e,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:
41a,onViewportChange:l,onToastAdd:g.useCallback(()=>c(f=>f+1),[]),onToastRemove:g.useCallback(()=>c(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:p,children:o})})};py.displayName=Nh;var my="ToastViewport",KE=["F8"],nd="toast.viewportPause",sd="toast.viewportResume",gy=g.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=KE,label:s="Notifications ({hotkey})",...i}=t,o=Xl(my,r),a=WE(r),l=g.useRef(null),u=g.useRef(null),c=g.useRef(null),h=g.useRef(null),p=Tt(e,h,o.onViewportChange),f=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=o.toastCount>0;g.useEffect(()=>{const b=v=>{var w;n.length!==0&&n.every(x=>v[x]||v.code===x)&&((w=h.current)==null||w.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]),g.useEffect(()=>{const b=l.current,v=h.current;if(_&&b&&v){const m=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(nd);v.dispatchEvent(S),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(sd);v.dispatchEvent(S),o.isClosePausedRef.current=!1}},x=S=>{!b.contains(S.relatedTarget)&&w()},E=()=>{b.contains(document.activeElement)||w()};return b.addEventListener("focusin",m),b.addEventListener("focusout",x),b.addEventListener("pointermove",m),b.addEventListener("pointerleave",E),window.addEventListener("blur",m),window.addEventListener("focus",w),()=>{b.removeEventListener("focusin",m),b.removeEventListener("focusout",x),b.removeEventListener("pointermove",m),b.removeEventListener("pointerleave",E),window.removeEventListener("blur",m),window.removeEventListener("focus",w)}}},[_,o.isClosePausedRef]);const y=g.useCallback(({tabbingDirection:b})=>{const m=a().map(w=>{const x=w.ref.current,E=[x,...o1(x)];return b==="forwards"?E:E.reverse()});return(b==="forwards"?m.reverse():m).flat()},[a]);return g.useEffect(()=>{const b=h.current;if(b){const v=m=>{var E,S,k;const w=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!w){const C=document.activeElement,T=m.shiftKey;if(m.target===b&&T){(E=u.current)==null||E.focus();return}const I=y({tabbingDirection:T?"backwards":"forwards"}),M=I.findIndex(R=>R===C);Ku(I.slice(M+1))?m.preventDefault():T?(S=u.current)==null||S.focus():(k=c.current)==null||k.focus()}};return b.addEventListener("keydown",v),()=>b.removeEventListener("keydown",v)}},[a,y]),d.jsxs(NE,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&d.jsx(id,{ref:u,onFocusFromOutsideViewport:()=>{const b=y({tabbingDirection:"forwards"});Ku(b)}}),d.jsx(Ih.Slot,{scope:r,children:d.jsx(Ue.ol,{tabIndex:-1,...i,ref:p})}),_&&d.jsx(id,{ref:c,onFocusFromOutsideViewport:()=>{const b=y({tabbingDirection:"backwards"});Ku(b)}})]})});gy.displayName=my;var vy="ToastFocusProxy",id=g.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,i=Xl(vy,r);return d.jsx(Yl,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&n()}})});id.displayName=vy;var Mo="Toast",GE="toast.swipeStart",QE="toast.swipeMove",JE="toast.swipeCancel",YE="toast.swipeEnd",yy=g.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=hy({prop:n,defaultProp:s??!0,onChange:i,caller:Mo});return d.jsx(Jl,{present:r||a,children:d.jsx(e1,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:kn(t.onPause),onResume:kn(t.onResume),onSwipeStart:Pe(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Pe(t.onSwipeMove,u=>{const{x:c,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:Pe(t.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Pe(t.onSwipeEnd,u=>{const{x:c,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),l(!1)})})})});yy.displayName=Mo;var[XE,ZE]=fy(Mo,{onClose(){}}),e1=g.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:h,onSwipeCancel:p,onSwipeEnd:f,..._}=t,y=Xl(Mo,r),[b,v]=g.useState(null),m=Tt(e,R=>v(R)),w=g.useRef(null),x=g.useRef(null),E=s||y.duration,S=g.useRef(0),k=g.useRef(E),C=g.useRef(0),{onToastAdd:T,onToastRemove:P}=y,D=kn(()=>{var V;(b==null?void 0:b.contains(document.activeElement))&&((V=y.viewport)==null||V.focus()),o()}),I=g.useCallback(R=>
41{!R||R===1/0||(window.clearTimeout(C.current),S.current=new Date().getTime(),C.current=window.setTimeout(D,R))},[D]);g.useEffect(()=>{const R=y.viewport;if(R){const V=()=>{I(k.current),u==null||u()},W=()=>{const Q=new Date().getTime()-S.current;k.current=k.current-Q,window.clearTimeout(C.current),l==null||l()};return R.addEventListener(nd,W),R.addEventListener(sd,V),()=>{R.removeEventListener(nd,W),R.removeEventListener(sd,V)}}},[y.viewport,E,l,u,I]),g.useEffect(()=>{i&&!y.isClosePausedRef.current&&I(E)},[i,E,y.isClosePausedRef,I]),g.useEffect(()=>(T(),()=>P()),[T,P]);const M=g.useMemo(()=>b?ky(b):null,[b]);return y.viewport?d.jsxs(d.Fragment,{children:[M&&d.jsx(t1,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:M}),d.jsx(XE,{scope:r,onClose:D,children:Do.createPortal(d.jsx(Ih.ItemSlot,{scope:r,children:d.jsx(OE,{asChild:!0,onEscapeKeyDown:Pe(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||D(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(Ue.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,..._,ref:m,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Pe(t.onKeyDown,R=>{R.key==="Escape"&&(a==null||a(R.nativeEvent),R.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:Pe(t.onPointerDown,R=>{R.button===0&&(w.current={x:R.clientX,y:R.clientY})}),onPointerMove:Pe(t.onPointerMove,R=>{if(!w.current)return;const V=R.clientX-w.current.x,W=R.clientY-w.current.y,Q=!!x.current,j=["left","right"].includes(y.swipeDirection),O=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,z=j?O(0,V):0,K=j?0:O(0,W),q=R.pointerType==="touch"?10:2,Y={x:z,y:K},te={originalEvent:R,delta:Y};Q?(x.current=Y,da(QE,h,te,{discrete:!1})):jp(Y,y.swipeDirection,q)?(x.current=Y,da(GE,c,te,{discrete:!1}),R.target.setPointerCapture(R.pointerId)):(Math.abs(V)>q||Math.abs(W)>q)&&(w.current=null)}),onPointerUp:Pe(t.onPointerUp,R=>{const V=x.current,W=R.target;if(W.hasPointerCapture(R.pointerId)&&W.releasePointerCapture(R.pointerId),x.current=null,w.current=null,V){const Q=R.currentTarget,j={originalEvent:R,delta:V};jp(V,y.swipeDirection,y.swipeThreshold)?da(YE,f,j,{discrete:!0}):da(JE,p,j,{discrete:!0}),Q.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),t1=t=>{const{__scopeToast:e,children:r,...n}=t,s=Xl(Mo,e),[i,o]=g.useState(!1),[a,l]=g.useState(!1);return s1(()=>o(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:d.jsx(dy,{asChild:!0,children:d.jsx(Yl,{...n,children:i&&d.jsxs(d.Fragment,{children:[s.label," ",r]})})})},r1="ToastTitle",wy=g.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return d.jsx(Ue.div,{...n,ref:e})});wy.displayName=r1;var n1="ToastDescription",_y=g.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return d.jsx(Ue.div,{...n,ref:e})});_y.displayName=n1;var by="ToastAction",xy=g.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?d.jsx(Sy,{altText:r,asChild:!0,children:d.jsx(Lh,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${by}\`. Expected non-empty \`string\`.`),null)});xy.displayName=by;var Ey="ToastClose",Lh=g.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=ZE(Ey,r);return d.jsx(Sy,{asChild:!0,children:d.jsx(Ue.button,{type:"button",...n,ref:e,onClick:Pe(t.onClick,s.onClose)})})});Lh.displayName=Ey;var Sy=g.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return d.jsx(Ue.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:e})});function ky(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),i1(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...ky(n))}}),e}function da(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?ay(s,i):s.dispatchEvent(i)}var jp=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function s1(t=()=>{}){const e=kn(t);Cn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function i1(t){return t.nodeType===t.ELEMENT_NODE}function o1(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Ku(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}var a1=py,Cy=gy,Ty=yy,Py=wy,jy=_y,Ay=xy,Ry=Lh;function Oy(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=Oy(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Ny(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=Oy(t))&&(n&&(n+=" "),n+=e);return n}const Ap=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Rp=Ny,Dh=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return Rp(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(u=>{const c=r==null?void 0:r[u],h=i==null?void 0:i[u];if(c===null)return null;const p=Ap(c)||Ap(h);return s[u][p]}),a=r&&Object.entries(r).reduce((u,c)=>{let[h,p]=c;
vendor: 4,615 bytes, lines 41-105
41return p===void 0||(u[h]=p),u},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((u,c)=>{let{class:h,className:p,...f}=c;return Object.entries(f).every(_=>{let[y,b]=_;return Array.isArray(b)?b.includes({...i,...a}[y]):{...i,...a}[y]===b})?[...u,h,p]:u},[]);return Rp(t,o,l,r==null?void 0:r.class,r==null?void 0:r.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 l1=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Iy=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).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 u1={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 c1=g.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>g.createElement("svg",{ref:l,...u1,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:Iy("lucide",s),...a},[...o.map(([u,c])=>g.createElement(u,c)),...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 wt=(t,e)=>{const r=g.forwardRef(({className:n,...s},i)=>g.createElement(c1,{ref:i,iconNode:e,className:Iy(`lucide-${l1(t)}`,n),...s}));return r.displayName=`${t}`,r};/** 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 od=wt("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 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 Ly=wt("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 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 d1=wt("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/** 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 h1=wt("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 Dy=wt("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 f1=wt("Dot",[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]]);/** 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 p1=wt("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** 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 m1=wt("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** 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 ad=wt("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 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 g1=wt("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 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 v1=wt("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** 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 y1=wt("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"}]]);/** 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 w1=wt("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** 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 $y=wt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),$h="-",_1=t=>{const e=x1(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:o=>{const a=o.split($h);return a[0]===""&&a.length!==1&&a.shift(),My(a,e)||b1(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},My=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),s=n?My(t.slice(1),n):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join($h);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Op=/^\[(.+)\]$/,b1=t=>{if(Op.test(t)){const e=Op.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},x1=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return S1(Object.entries(t.classGroups),r).forEach(([i,o])=>{ld(o,n,i,e)}),n},ld=(t,e,r,n)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:Np(e,s);i.classGroupId=r;return}if(typeof s=="function"){if(E1(s)){ld(s(n),e,r,n);return}e.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{ld(o,Np(e,i),r,n)})})},Np=(t,e)=>{let r=t;
vendor: 4,751 bytes, line 131
131return e.split($h).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},E1=t=>t.isThemeGetter,S1=(t,e)=>e?t.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[r,s]}):t,k1=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),e++,e>t&&(e=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}},Uy="!",C1=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,s=e[0],i=e.length,o=a=>{const l=[];let u=0,c=0,h;for(let b=0;b<a.length;b++){let v=a[b];if(u===0){if(v===s&&(n||a.slice(b,b+i)===e)){l.push(a.slice(c,b)),c=b+i;continue}if(v==="/"){h=b;continue}}v==="["?u++:v==="]"&&u--}const p=l.length===0?a:a.substring(c),f=p.startsWith(Uy),_=f?p.substring(1):p,y=h&&h>c?h-c:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:_,maybePostfixModifierPosition:y}};return r?a=>r({className:a,parseClassName:o}):o},T1=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},P1=t=>({cache:k1(t.cacheSize),parseClassName:C1(t),..._1(t)}),j1=/\s+/,A1=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split(j1);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:f}=r(u);let _=!!f,y=n(_?p.substring(0,f):p);if(!y){if(!_){a=u+(a.length>0?" "+a:a);continue}if(y=n(p),!y){a=u+(a.length>0?" "+a:a);continue}_=!1}const b=T1(c).join(":"),v=h?b+Uy:b,m=v+y;if(i.includes(m))continue;i.push(m);const w=s(y,_);for(let x=0;x<w.length;++x){const E=w[x];i.push(v+E)}a=u+(a.length>0?" "+a:a)}return a};function R1(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=zy(e))&&(n&&(n+=" "),n+=r);return n}const zy=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=zy(t[n]))&&(r&&(r+=" "),r+=e);return r};function O1(t,...e){let r,n,s,i=o;function o(l){const u=e.reduce((c,h)=>h(c),t());return r=P1(u),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const u=n(l);if(u)return u;const c=A1(l,r);return s(l,c),c}return function(){return i(R1.apply(null,arguments))}}const pe=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},Fy=/^\[(?:([a-z-]+):)?(.+)\]$/i,N1=/^\d+\/\d+$/,I1=new Set(["px","full","screen"]),L1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,D1=/\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$/,$1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,M1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,U1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pr=t=>Bs(t)||I1.has(t)||N1.test(t),Qr=t=>yi(t,"length",K1),Bs=t=>!!t&&!Number.isNaN(Number(t)),Gu=t=>yi(t,"number",Bs),Li=t=>!!t&&Number.isInteger(Number(t)),z1=t=>t.endsWith("%")&&Bs(t.slice(0,-1)),re=t=>Fy.test(t),Jr=t=>L1.test(t),F1=new Set(["length","size","percentage"]),B1=t=>yi(t,F1,By),V1=t=>yi(t,"position",By),W1=new Set(["image","url"]),H1=t=>yi(t,W1,Q1),q1=t=>yi(t,"",G1),Di=()=>!0,yi=(t,e,r)=>{const n=Fy.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},K1=t=>D1.test(t)&&!$1.test(t),By=()=>!1,G1=t=>M1.test(t),Q1=t=>U1.test(t),J1=()=>{const t=pe("colors"),e=pe("spacing"),r=pe("blur"),n=pe("brightness"),s=pe("borderColor"),i=pe("borderRadius"),o=pe("borderSpacing"),a=pe("borderWidth"),l=pe("contrast"),u=pe("grayscale"),c=pe("hueRotate"),h=pe("invert"),p=pe("gap"),f=pe("gradientColorStops"),_=pe("gradientColorStopPositions"),y=pe("inset"),b=pe("margin"),v=pe("opacity"),m=pe("padding"),w=pe("saturate"),x=pe("scale"),E=pe("sepia"),S=pe("skew"),k=pe("space"),C=pe("translate"),T=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",re,e],I=()=>[re,e],M=()=>["",Pr,Qr],R=()=>["auto",Bs,re],V=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",re],z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[Bs,re];return{cacheSize:500,separator:":",theme:{colors:[Di],spacing:[Pr,Qr],blur:["none","",Jr,re],brightness:K(),borderColor:[t],borderRadius:["n
131one","","full",Jr,re],borderSpacing:I(),borderWidth:M(),contrast:K(),grayscale:O(),hueRotate:K(),invert:O(),gap:I(),gradientColorStops:[t],gradientColorStopPositions:[z1,Qr],inset:D(),margin:D(),opacity:K(),padding:I(),saturate:K(),scale:K(),sepia:O(),skew:K(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",re]}],container:["container"],columns:[{columns:[Jr]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"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:[...V(),re]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Li,re]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",re]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",Li,re]}],"grid-cols":[{"grid-cols":[Di]}],"col-start-end":[{col:["auto",{span:["full",Li,re]},re]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[Di]}],"row-start-end":[{row:["auto",{span:[Li,re]},re]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",re]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],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":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",re,e]}],"min-w":[{"min-w":[re,e,"min","max","fit"]}],"max-w":[{"max-w":[re,e,"none","full","min","max","fit","prose",{screen:[Jr]},Jr]}],h:[{h:[re,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[re,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[re,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[re,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Jr,Qr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Gu]}],"font-family":[{font:[Di]}],"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",re]}],"line-clamp":[{"line-clamp":["none",Bs,Gu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Pr,re]}],"list-image":[{"list-image":["none",re]}],"list-style-type":[{list:["none","disc","decimal",re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Pr,Qr]}],"underline-offset":[{"underline-offset":["auto",Pr,re]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re]}],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",re]}],"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:[...V(),V1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",B1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},H1]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[_]}
vendor: 5,180 bytes, line 131
131],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"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:[...W(),"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:W()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[Pr,re]}],"outline-w":[{outline:[Pr,Qr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Pr,Qr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Jr,q1]}],"shadow-color":[{shadow:[Di]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Jr,re]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"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",re]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",re]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Li,re]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",re]}],accent:[{accent:["auto",t]}],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",re]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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"]}
131],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",re]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Pr,Qr,Gu]}],stroke:[{stroke:[t,"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"]}}},Y1=O1(J1);function tt(...t){return Y1(Ny(t))}const X1=a1,Vy=g.forwardRef(({className:t,...e},r)=>d.jsx(Cy,{ref:r,className:tt("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]",t),...e}));Vy.displayName=Cy.displayName;const Z1=Dh("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"}}),Wy=g.forwardRef(({className:t,variant:e,...r},n)=>d.jsx(Ty,{ref:n,className:tt(Z1({variant:e}),t),...r}));Wy.displayName=Ty.displayName;const eS=g.forwardRef(({className:t,...e},r)=>d.jsx(Ay,{ref:r,className:tt("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",t),...e}));eS.displayName=Ay.displayName;const Hy=g.forwardRef(({className:t,...e},r)=>d.jsx(Ry,{ref:r,className:tt("absolute right-2 top-2 rounded-md p-1 text-foreground
131/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",t),"toast-close":"",...e,children:d.jsx($y,{className:"h-4 w-4"})}));Hy.displayName=Ry.displayName;const qy=g.forwardRef(({className:t,...e},r)=>d.jsx(Py,{ref:r,className:tt("text-sm font-semibold",t),...e}));qy.displayName=Py.displayName;const Ky=g.forwardRef(({className:t,...e},r)=>d.jsx(jy,{ref:r,className:tt("text-sm opacity-90",t),...e}));Ky.displayName=jy.displayName;function tS(){const{toasts:t}=mE();return d.jsxs(X1,{children:[t.map(function({id:e,title:r,description:n,action:s,...i}){return d.jsxs(Wy,{...i,children:[d.jsxs("div",{className:"grid gap-1",children:[r&&d.jsx(qy,{children:r}),n&&d.jsx(Ky,{children:n})]}),s,d.jsx(Hy,{})]},e)}),d.jsx(Vy,{})]})}var Ip=["light","dark"],rS="(prefers-color-scheme: dark)",nS=g.createContext(void 0),sS={setTheme:t=>{},themes:[]},iS=()=>{var t;return(t=g.useContext(nS))!=null?t:sS};g.memo(({forcedTheme:t,storageKey:e,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let u=i==="system",c=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(_=>`'${_}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,h=s?Ip.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(_,y=!1,b=!0)=>{let v=o?o[_]:_,m=y?_+"|| ''":`'${v}'`,w="";return s&&b&&!y&&Ip.includes(_)&&(w+=`d.style.colorScheme = '${_}';`),r==="class"?y||v?w+=`c.add(${m})`:w+="null":v&&(w+=`d[s](n,${m})`),w},f=t?`!function(){${c}${p(t)}}()`:n?`!function(){try{${c}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${u})){var t='${rS}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}${u?"":"else{"+p(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${e}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}else{${p(i,!1,!1)};}${h}}catch(t){}}();`;return g.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:f}})});var oS=t=>{switch(t){case"success":return uS;case"info":return dS;case"warning":return cS;case"error":return hS;default:return null}},aS=Array(12).fill(0),lS=({visible:t,className:e})=>$.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},$.createElement("div",{className:"sonner-spinner"},aS.map((r,n)=>$.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),uS=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.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"})),cS=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},$.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"})),dS=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.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"})),hS=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.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"})),fS=$.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"},$.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),$.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),pS=()=>{let[t,e]=$.useState(document.hidden);return $.useEffect(()=>{let r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t},ud=1,mS=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>
131{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:r,...n}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:ud++,i=this.toasts.find(a=>a.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:r}),{...a,...t,id:s,dismissible:o,title:r}):a):this.addToast({title:r,...n,dismissible:o,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(r=>r({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let r;e.loading!==void 0&&(r=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let n=t instanceof Promise?t:t(),s=r!==void 0,i,o=n.then(async l=>{if(i=["resolve",l],$.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(vS(l)&&!l.ok){s=!1;let u=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,c=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:r,type:"error",message:u,description:c})}else if(e.success!==void 0){s=!1;let u=typeof e.success=="function"?await e.success(l):e.success,c=typeof e.description=="function"?await e.description(l):e.description;this.create({id:r,type:"success",message:u,description:c})}}).catch(async l=>{if(i=["reject",l],e.error!==void 0){s=!1;let u=typeof e.error=="function"?await e.error(l):e.error,c=typeof e.description=="function"?await e.description(l):e.description;this.create({id:r,type:"error",message:u,description:c})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,u)=>o.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(t,e)=>{let r=(e==null?void 0:e.id)||ud++;return this.create({jsx:t(r),id:r,...e}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ht=new mS,gS=(t,e)=>{let r=(e==null?void 0:e.id)||ud++;return ht.addToast({title:t,...e,id:r}),r},vS=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",yS=gS,wS=()=>ht.toasts,_S=()=>ht.getActiveToasts(),Ve=Object.assign(yS,{success:ht.success,info:ht.info,warning:ht.warning,error:ht.error,custom:ht.custom,message:ht.message,promise:ht.promise,dismiss:ht.dismiss,loading:ht.loading},{getHistory:wS,getToasts:_S});function bS(t,{insertAt:e}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}bS(`: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;
131left: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}
131: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%);
131--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%)} 132`);function ha(t){return t.label!==void 0}var xS=3,ES="32px",SS="16px",Lp=4e3,kS=356,CS=14,TS=20,PS=200;function Vt(...t){return t.filter(Boolean).join(" ")}function jS(t){let[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}var AS=t=>{var e,r,n,s,i,o,a,l,u,c,h;let{invert:p,toast:f,unstyled:_,interacting:y,setHeights:b,visibleToasts:v,heights:m,index:w,toasts:x,expanded:E,removeToast:S,defaultRichColors:k,closeButton:C,style:T,cancelButtonStyle:P,actionButtonStyle:D,className:I="",descriptionClassName:M="",duration:R,position:V,gap:W,loadingIcon:Q,expandByDefault:j,classNames:O,icons:z,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:q}=t,[Y,te]=$.useState(null),[ce,Ne]=$.useState(null),[se,Tr]=$.useState(!1),[sr,ir]=$.useState(!1),[or,ar]=$.useState(!1),[lr,J]=$.useState(!1),[X,je]=$.useState(!1),[qe,De]=$.useState(0),[ae,Ke]=$.useState(0),ur=$.useRef(f.duration||R||Lp),ut=$.useRef(null),rt=$.useRef(null),$t=w===0,cr=w+1<=v,Ce=f.type,ct=f.dismissible!==!1,Bo=f.className||"",Vo=f.descriptionClassName||"",fs=$.useMemo(()=>m.findIndex(Z=>Z.toastId===f.id)||0,[m,f.id]),gu=$.useMemo(()=>{var Z;return(Z=f.closeButton)!=null?Z:C},[f.closeButton,C]),Wo=$.useMemo(()=>f.duration||R||Lp,[f.duration,R]),Mt=$.useRef(0),dr=$.useRef(0),Ho=$.useRef(0),ps=$.useRef(null),[N_,I_]=V.split("-"),hf=$.useMemo(()=>m.reduce((Z,ue,ve)=>ve>=fs?Z:Z+ue.height,0),[m,fs]),ff=pS(),L_=f.invert||p,vu=Ce==="loading";dr.current=$.useMemo(()=>fs*W+hf,[fs,hf]),$.useEffect(()=>{ur.current=Wo},[Wo]),$.useEffect(()=>{Tr(!0)},[]),$.useEffect(()=>{let Z=rt.current;if(Z){let ue=Z.getBoundingClientRect().height;return Ke(ue),b(ve=>[{toastId:f.id,height:ue,position:f.position},...ve]),()=>b(ve=>ve.filter(Ut=>Ut.toastId!==f.id))}},[b,f.id]),$.useLayoutEffect(()=>{if(!se)return;let Z=rt.current,ue=Z.style.height;Z.style.height="auto";let ve=Z.getBoundingClientRect().height;Z.style.height=ue,Ke(ve),b(Ut=>Ut.find(zt=>zt.toastId===f.id)?Ut.map(zt=>zt.toastId===f.id?{...zt,height:ve}:zt):[{toastId:f.id,height:ve,position:f.position},...Ut])},[se,f.title,f.description,b,f.id]);let Hr=$.useCallback(()=>{ir(!0),De(dr.current),b(Z=>Z.filter(ue=>ue.toastId!==f.id)),setTimeout(()=>{S(f)},PS)},[f,S,b,dr]);$.useEffect(()=>{if(f.promise&&Ce==="loading"||f.duration===1/0||f.type==="loading")return;let Z;return E||y||q&&ff?(()=>{if(Ho.current<Mt.current){let ue=new Date().getTime()-Mt.current;ur.current=ur.current-ue}
132Ho.current=new Date().getTime()})():ur.current!==1/0&&(Mt.current=new Date().getTime(),Z=setTimeout(()=>{var ue;(ue=f.onAutoClose)==null||ue.call(f,f),Hr()},ur.current)),()=>clearTimeout(Z)},[E,y,f,Ce,q,ff,Hr]),$.useEffect(()=>{f.delete&&Hr()},[Hr,f.delete]);function D_(){var Z,ue,ve;return z!=null&&z.loading?$.createElement("div",{className:Vt(O==null?void 0:O.loader,(Z=f==null?void 0:f.classNames)==null?void 0:Z.loader,"sonner-loader"),"data-visible":Ce==="loading"},z.loading):Q?$.createElement("div",{className:Vt(O==null?void 0:O.loader,(ue=f==null?void 0:f.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":Ce==="loading"},Q):$.createElement(lS,{className:Vt(O==null?void 0:O.loader,(ve=f==null?void 0:f.classNames)==null?void 0:ve.loader),visible:Ce==="loading"})}return $.createElement("li",{tabIndex:0,ref:rt,className:Vt(I,Bo,O==null?void 0:O.toast,(e=f==null?void 0:f.classNames)==null?void 0:e.toast,O==null?void 0:O.default,O==null?void 0:O[Ce],(r=f==null?void 0:f.classNames)==null?void 0:r[Ce]),"data-sonner-toast":"","data-rich-colors":(n=f.richColors)!=null?n:k,"data-styled":!(f.jsx||f.unstyled||_),"data-mounted":se,"data-promise":!!f.promise,"data-swiped":X,"data-removed":sr,"data-visible":cr,"data-y-position":N_,"data-x-position":I_,"data-index":w,"data-front":$t,"data-swiping":or,"data-dismissible":ct,"data-type":Ce,"data-invert":L_,"data-swipe-out":lr,"data-swipe-direction":ce,"data-expanded":!!(E||j&&se),style:{"--index":w,"--toasts-before":w,"--z-index":x.length-w,"--offset":`${sr?qe:dr.current}px`,"--initial-height":j?"auto":`${ae}px`,...T,...f.style},onDragEnd:()=>{ar(!1),te(null),ps.current=null},onPointerDown:Z=>{vu||!ct||(ut.current=new Date,De(dr.current),Z.target.setPointerCapture(Z.pointerId),Z.target.tagName!=="BUTTON"&&(ar(!0),ps.current={x:Z.clientX,y:Z.clientY}))},onPointerUp:()=>{var Z,ue,ve,Ut;if(lr||!ct)return;ps.current=null;let zt=Number(((Z=rt.current)==null?void 0:Z.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),qr=Number(((ue=rt.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Nn=new Date().getTime()-((ve=ut.current)==null?void 0:ve.getTime()),Ft=Y==="x"?zt:qr,Kr=Math.abs(Ft)/Nn;if(Math.abs(Ft)>=TS||Kr>.11){De(dr.current),(Ut=f.onDismiss)==null||Ut.call(f,f),Ne(Y==="x"?zt>0?"right":"left":qr>0?"down":"up"),Hr(),J(!0),je(!1);return}ar(!1),te(null)},onPointerMove:Z=>{var ue,ve,Ut,zt;if(!ps.current||!ct||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;let qr=Z.clientY-ps.current.y,Nn=Z.clientX-ps.current.x,Ft=(ve=t.swipeDirections)!=null?ve:jS(V);!Y&&(Math.abs(Nn)>1||Math.abs(qr)>1)&&te(Math.abs(Nn)>Math.abs(qr)?"x":"y");let Kr={x:0,y:0};Y==="y"?(Ft.includes("top")||Ft.includes("bottom"))&&(Ft.includes("top")&&qr<0||Ft.includes("bottom")&&qr>0)&&(Kr.y=qr):Y==="x"&&(Ft.includes("left")||Ft.includes("right"))&&(Ft.includes("left")&&Nn<0||Ft.includes("right")&&Nn>0)&&(Kr.x=Nn),(Math.abs(Kr.x)>0||Math.abs(Kr.y)>0)&&je(!0),(Ut=rt.current)==null||Ut.style.setProperty("--swipe-amount-x",`${Kr.x}px`),(zt=rt.current)==null||zt.style.setProperty("--swipe-amount-y",`${Kr.y}px`)}},gu&&!f.jsx?$.createElement("button",{"aria-label":K,"data-disabled":vu,"data-close-button":!0,onClick:vu||!ct?()=>{}:()=>{var Z;Hr(),(Z=f.onDismiss)==null||Z.call(f,f)},className:Vt(O==null?void 0:O.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(i=z==null?void 0:z.close)!=null?i:fS):null,f.jsx||g.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:$.createElement($.Fragment,null,Ce||f.icon||f.promise?$.createElement("div",{"data-icon":"",className:Vt(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||D_():null,f.type!=="loading"?f.icon||(z==null?void 0:z[Ce])||oS(Ce):null):null,$.createElement("div",{"data-content":"",className:Vt(O==null?void 0:O.content,(a=f==null?void 0:f.classNames)==null?void 0:a.content)},$.createElement("div",{"data-title":"",className:Vt(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?$.createElement("div",{"data-description":"",className:Vt(M,Vo,O==null?void 0:O.de
132scription,(u=f==null?void 0:f.classNames)==null?void 0:u.description)},typeof f.description=="function"?f.description():f.description):null),g.isValidElement(f.cancel)?f.cancel:f.cancel&&ha(f.cancel)?$.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||P,onClick:Z=>{var ue,ve;ha(f.cancel)&&ct&&((ve=(ue=f.cancel).onClick)==null||ve.call(ue,Z),Hr())},className:Vt(O==null?void 0:O.cancelButton,(c=f==null?void 0:f.classNames)==null?void 0:c.cancelButton)},f.cancel.label):null,g.isValidElement(f.action)?f.action:f.action&&ha(f.action)?$.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||D,onClick:Z=>{var ue,ve;ha(f.action)&&((ve=(ue=f.action).onClick)==null||ve.call(ue,Z),!Z.defaultPrevented&&Hr())},className:Vt(O==null?void 0:O.actionButton,(h=f==null?void 0:f.classNames)==null?void 0:h.actionButton)},f.action.label):null))};function Dp(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function RS(t,e){let r={};return[t,e].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?SS:ES;function l(u){["top","right","bottom","left"].forEach(c=>{r[`${o}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${o}-${u}`]=a:r[`${o}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(a)}),r}var OS=g.forwardRef(function(t,e){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:h,duration:p,style:f,visibleToasts:_=xS,toastOptions:y,dir:b=Dp(),gap:v=CS,loadingIcon:m,icons:w,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:E}=t,[S,k]=$.useState([]),C=$.useMemo(()=>Array.from(new Set([n].concat(S.filter(q=>q.position).map(q=>q.position)))),[S,n]),[T,P]=$.useState([]),[D,I]=$.useState(!1),[M,R]=$.useState(!1),[V,W]=$.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=$.useRef(null),j=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=$.useRef(null),z=$.useRef(!1),K=$.useCallback(q=>{k(Y=>{var te;return(te=Y.find(ce=>ce.id===q.id))!=null&&te.delete||ht.dismiss(q.id),Y.filter(({id:ce})=>ce!==q.id)})},[]);return $.useEffect(()=>ht.subscribe(q=>{if(q.dismiss){k(Y=>Y.map(te=>te.id===q.id?{...te,delete:!0}:te));return}setTimeout(()=>{ny.flushSync(()=>{k(Y=>{let te=Y.findIndex(ce=>ce.id===q.id);return te!==-1?[...Y.slice(0,te),{...Y[te],...q},...Y.slice(te+1)]:[q,...Y]})})})}),[]),$.useEffect(()=>{if(c!=="system"){W(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:Y})=>{W(Y?"dark":"light")})}catch{q.addListener(({matches:te})=>{try{W(te?"dark":"light")}catch(ce){console.error(ce)}})}},[c]),$.useEffect(()=>{S.length<=1&&I(!1)},[S]),$.useEffect(()=>{let q=Y=>{var te,ce;s.every(Ne=>Y[Ne]||Y.code===Ne)&&(I(!0),(te=Q.current)==null||te.focus()),Y.code==="Escape"&&(document.activeElement===Q.current||(ce=Q.current)!=null&&ce.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[s]),$.useEffect(()=>{if(Q.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,z.current=!1)}},[Q.current]),$.createElement("section",{ref:e,"aria-label":`${x} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((q,Y)=>{var te;let[ce,Ne]=q.split("-");return S.length?$.createElement("ol",{key:q,dir:b==="auto"?Dp():b,tabIndex:-1,ref:Q,className:a,"data-sonner-toaster":!0,"data-theme":V,"data-y-position":ce,"data-lifted":D&&S.length>1&&!i,"data-x-position":Ne,style:{"--front-toast-height":`${((te=T[0])==null?void 0:te.height)||0}px`,"--width":`${kS}px`,"--gap":`${v}px`,...f,...RS(l,u)},onBlur:se=>{z.current&&!se.currentTarget.contains(se.relatedTarget)&&(z.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||z.current||(z.current=!0,O.current=se.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{M||I(!1)},onDragEnd:()=>I(!1),onPointerDown:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||R(!0)},onPointerUp:()=>R(!1)},S.filter(se=>!se.position&&Y===0||se.position===q).map((se,Tr)=>{var sr,ir;return $.createElement(AS,{key:se.id,icons:w,index:Tr,toast:se,defaultRichColors:h,duration:(sr=y==null?void 0:y.duration)!=null?sr:p,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:r,visibleToasts:_,closeButton:(ir=y==null?void 0:y.closeButton)!=null?ir:o,interacting:M,position:q,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:K,toasts:S.filter(or=>or.position==se.position),heights:T.filter(or=>or.position==se.position),setHeights:P,expandByDefault:i,gap:v,loadingIcon:m,expanded:D,pauseWhenPageIsHidden:E,swipeDirections:t.swipeDirections})})):null}))});const NS=({...t})=>{const{theme:e="system"}=iS();return d.jsx(OS,{theme:e,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"}},...t})},IS=["top","right","bottom","left"],Tn=Math.min,bt=Math.max,pl=Math.round,fa=Math.floor,xr=t=>({x:t,y:t}
vendor: 11,921 bytes, line 132
132),LS={left:"right",right:"left",bottom:"top",top:"bottom"},DS={start:"end",end:"start"};function cd(t,e,r){return bt(t,Tn(e,r))}function zr(t,e){return typeof t=="function"?t(e):t}function Fr(t){return t.split("-")[0]}function wi(t){return t.split("-")[1]}function Mh(t){return t==="x"?"y":"x"}function Uh(t){return t==="y"?"height":"width"}const $S=new Set(["top","bottom"]);function wr(t){return $S.has(Fr(t))?"y":"x"}function zh(t){return Mh(wr(t))}function MS(t,e,r){r===void 0&&(r=!1);const n=wi(t),s=zh(t),i=Uh(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=ml(o)),[o,ml(o)]}function US(t){const e=ml(t);return[dd(t),e,dd(e)]}function dd(t){return t.replace(/start|end/g,e=>DS[e])}const $p=["left","right"],Mp=["right","left"],zS=["top","bottom"],FS=["bottom","top"];function BS(t,e,r){switch(t){case"top":case"bottom":return r?e?Mp:$p:e?$p:Mp;case"left":case"right":return e?zS:FS;default:return[]}}function VS(t,e,r,n){const s=wi(t);let i=BS(Fr(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(dd)))),i}function ml(t){return t.replace(/left|right|bottom|top/g,e=>LS[e])}function WS(t){return{top:0,right:0,bottom:0,left:0,...t}}function Gy(t){return typeof t!="number"?WS(t):{top:t,right:t,bottom:t,left:t}}function gl(t){const{x:e,y:r,width:n,height:s}=t;return{width:n,height:s,top:r,left:e,right:e+n,bottom:r+s,x:e,y:r}}function Up(t,e,r){let{reference:n,floating:s}=t;const i=wr(e),o=zh(e),a=Uh(o),l=Fr(e),u=i==="y",c=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,p=n[a]/2-s[a]/2;let f;switch(l){case"top":f={x:c,y:n.y-s.height};break;case"bottom":f={x:c,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:h};break;case"left":f={x:n.x-s.width,y:h};break;default:f={x:n.x,y:n.y}}switch(wi(e)){case"start":f[o]-=p*(r&&u?-1:1);break;case"end":f[o]+=p*(r&&u?-1:1);break}return f}const HS=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let u=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:c,y:h}=Up(u,n,l),p=n,f={},_=0;for(let y=0;y<a.length;y++){const{name:b,fn:v}=a[y],{x:m,y:w,data:x,reset:E}=await v({x:c,y:h,initialPlacement:n,placement:p,strategy:s,middlewareData:f,rects:u,platform:o,elements:{reference:t,floating:e}});c=m??c,h=w??h,f={...f,[b]:{...f[b],...x}},E&&_<=50&&(_++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(u=E.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):E.rects),{x:c,y:h}=Up(u,p,l)),y=-1)}return{x:c,y:h,placement:p,strategy:s,middlewareData:f}};async function yo(t,e){var r;e===void 0&&(e={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=zr(e,t),_=Gy(f),b=a[p?h==="floating"?"reference":"floating":h],v=gl(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),m=h==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},E=gl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:w,strategy:l}):m);return{top:(v.top-E.top+_.top)/x.y,bottom:(E.bottom-v.bottom+_.bottom)/x.y,left:(v.left-E.left+_.left)/x.x,right:(E.right-v.right+_.right)/x.x}}const qS=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:u,padding:c=0}=zr(t,e)||{};if(u==null)return{};const h=Gy(c),p={x:r,y:n},f=zh(s),_=Uh(f),y=await o.getDimensions(u),b=f==="y",v=b?"top":"left",m=b?"bottom":"right",w=b?"clientHeight":"clientWidth",x=i.reference[_]+i.reference[f]-p[f]-i.floating[_],E=p[f]-i.reference[f],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let k=S?S[w]:0;(!k||!await(o.isElement==null?void 0:o.isElement(S)))&&(k=a.floating[w]||i.floating[_]);const C=x/2-E/2,T=k/2-y[_]/2-1,P=Tn(h[v],T),D=Tn(h[m],T),I=P,M=k-y[_]-D,R=k/2-y[_]/2+C,V=cd(I,R,M),W=!l.arrow&&wi(s)!=null&&R!==V&&i.reference[_]/2-(R<I?P:D)-y[_]/2<0,Q=W?R<I?R-I:R-M:0;return{[f]:p[f]+Q,data:{[f]:V,centerOffset:R-V-Q,...W&&{alignmentOffset:Q}},reset:W}}}),KS=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:y=!0,...b}=zr(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const v=Fr(s),m=wr(a),w=Fr(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=p||(w||!y?[ml(a)]:US(a)),S=_!=="none";!p&&S&&E.push(...VS(a,y,_,x));const k=[a,...E],C=await yo(e,b),T=[];let P=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&T.push(C[v]),h){const R=MS(s,o,x);T.push(C[R[0]],C[R[1]])}if(P=[...P,{placement:s,overflows:T}],!T.every(R=>R<=0)){var D,I;const R=(((D=i.flip)==null?void 0:D.index)||0)+1,V=k[R];if(V&&(!(h==="alignment"?m!==wr(V):!1)||P.every(j=>j.overflows[0]>0&&wr(j.placement)===m)))return{data:{index:R,overflows:P},reset:{placement:V}};let W=(I=P.filter(Q=>Q.overflows[0]<=0).sort((Q,j)=>Q.overflows[1]-j.overflows[1])[0])==null?void 0:I.placement;if(!W)switch(f){case"bestFit":{var M;const Q=(M=P.filter(j=>{if(S){const O=wr(j.placement);return O===m||O==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(O=>O>0).reduce((O,z)=>O+z,0)]).sort((j,O)=>j[1]-O[1])[0])==null?void 0:M[0];Q&&(W=Q);break}case"initialPlacement":W=a;break}if(s!==W)return{reset:{placement:W}}}return{}}}};function zp(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Fp(t){return IS.some(e=>t[e]>=0)}const GS=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=zr(t,e);switch(n){case"referenceHidden":{const i=await yo(e,{...s,elementContext:"reference"}),o=zp(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Fp(o)}}}case"escaped":{const i=await yo(e,{...s,altBoundary:!0}),o=zp(i,r.floating);return{data:{escapedOffsets:o,escaped:Fp(o)}}}default:return{}}}}},Qy=new Set(["left","top"]);async function QS(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Fr(r),a=wi(r),l=wr(r)==="y",u=Qy.has(o)?-1:1,c=i&&l?-1:1,h=zr(e,t);let{mainAxis:p,crossAxis:f,alignmentAxis:_}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof _=="number"&&(f=a==="end"?_*-1:_),l?{x:f*c,y:p*u}:{x:p*u,y:f*c}}const JS=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=e,l=await QS(e,t);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},YS=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:v,y:m}=b;return{x:v,y:m}}},...l}=zr(t,e),u={x:r,y:n},c=await yo(e,l),h=wr(Fr(s)),p=Mh(h);let f=u[p],_=u[h];if(i){const b=p==="y"?"top":"left",v=p==="y"?"bottom":"right",m=f+c[b],w=f-c[v];f=cd(m,f,w)}if(o){const b=h==="y"?"top":"left",v=h==="y"?"bottom":"right",m=_+c[b],w=_-c[v];_=cd(m,_,w)}const y=a.fn({...e,[p]:f,[h]:_});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[p]:i,[h]:o}}}}}},XS=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=zr(t,e),c={x:r,y:n},h=wr(s),p=Mh(h);let f=c[p],_=c[h];const y=zr(a,e),b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=p==="y"?"height":"width",x=i.reference[p]-i.floating[w]+b.mainAxis,E=i.reference[p]+i.reference[w]-b.mainAxis;f<x?f=x:f>E&&(f=E)}if(u){var v,m;const w=p==="y"?"width":"height",x=Qy.has(Fr(s)),E=i.reference[h]-i.floating[w]+(x&&((v=o.offset)==null?void 0:v[h])||0)+(x?0:b.crossAxis),S=i.reference[h]+i.reference[w]+(x?0:((m=o.offset)==null?void 0:m[h])||0)-(x?b.crossAxis:0);_<E?_=E:_>S&&(_=S)}return{[p]:f,[h]:_}}}},ZS=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:s,rects:i,platform:o,elements:a}=e,{apply:l=()=>{},...u}=zr(t,e),c=await yo(e,u),h=Fr(s),p=wi(s),f=wr(s)==="y",{width:_,height:y}=i.floating;let b,v;h==="top"||h==="bottom"?(b=h,v=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=h,b=p==="end"?"top":"bottom");const m=y-c.top-c.bottom,w=_-c.left-c.right,x=Tn(y-c[b],m),E=Tn(_-c[v],w),S=!e.middlewareData.shift;let k=x,C=E;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(C=w),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(k=m),S&&!p){const P=bt(c.left,0),D=bt(c.right,0),I=bt(c.top,0),M=bt(c.bottom,0);f?C=_-2*(P!==0||D!==0?P+D:bt(c.left,c.right)):k=y-2*(I!==0||M!==0?I+M:bt(c.top,c.bottom))}await l({...e,availableWidth:C,availableHeight:k});const T=await o.getDimensions(a.floating);return _!==T.width||y!==T.height?{reset:{rects:!0}}:{}}}};function Zl(){return typeof window<"u"}function _i(t){return Jy(t)?(t.nodeName||"").toLowerCase():"#document"}function kt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Sr(t){var e;return(e=(Jy(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Jy(t){return Zl()?t instanceof Node||t instanceof kt(t).Node:!1}function rr(t){return Zl()?t instanceof Element||t instanceof kt(t).Element:!1}function Er(t){return Zl()?t instanceof HTMLElement||t instanceof kt(t).HTMLElement:!1}function Bp(t){return!Zl()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof kt(t).ShadowRoot}const ek=new Set(["inline","contents"]);function Uo(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=nr(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!ek.has(s)}const tk=new Set(["table","td","th"]);function rk(t){return tk.has(_i(t))}const nk=[":popover-open",":modal"];function eu(t){return nk.some(e=>{try{return t.matches(e)}catch{return!1}})}const sk=["transform","translate","scale","rotate","perspective"],ik=["transform","translate","scale","rotate","perspective","filter"],ok=["paint","layout","strict","content"];function Fh(t){const e=Bh(),r=rr(t)?nr(t):t;return sk.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||ik.some(n=>(r.willChange||"").includes(n))||ok.some(n=>(r.contain||"").includes(n))}function ak(t){let e=Pn(t);for(;Er(e)&&!ui(e);){if(Fh(e))return e;if(eu(e))return null;e=Pn(e)}return null}function Bh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lk=new Set(["html","body","#document"]);function ui(t){return lk.has(_i(t))}function nr(t){return kt(t).getComputedStyle(t)}function tu(t){return rr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Pn(t){if(_i(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Bp(t)&&t.host||Sr(t);return Bp(e)?e.host:e}function Yy(t){const e=Pn(t);return ui(e)?t.ownerDocument?t.ownerDocument.body:t.body:Er(e)&&Uo(e)?e:Yy(e)}function wo(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=Yy(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=kt(s);if(i){const a=hd(o);
vendor: 5,412 bytes, line 132
132return e.concat(o,o.visualViewport||[],Uo(s)?s:[],a&&r?wo(a):[])}return e.concat(s,wo(s,[],r))}function hd(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Xy(t){const e=nr(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Er(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=pl(r)!==i||pl(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Vh(t){return rr(t)?t:t.contextElement}function Vs(t){const e=Vh(t);if(!Er(e))return xr(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=Xy(e);let o=(i?pl(r.width):r.width)/n,a=(i?pl(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const uk=xr(0);function Zy(t){const e=kt(t);return!Bh()||!e.visualViewport?uk:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ck(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==kt(t)?!1:e}function ls(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=Vh(t);let o=xr(1);e&&(n?rr(n)&&(o=Vs(n)):o=Vs(t));const a=ck(i,r,n)?Zy(i):xr(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,c=s.width/o.x,h=s.height/o.y;if(i){const p=kt(i),f=n&&rr(n)?kt(n):n;let _=p,y=hd(_);for(;y&&n&&f!==_;){const b=Vs(y),v=y.getBoundingClientRect(),m=nr(y),w=v.left+(y.clientLeft+parseFloat(m.paddingLeft))*b.x,x=v.top+(y.clientTop+parseFloat(m.paddingTop))*b.y;l*=b.x,u*=b.y,c*=b.x,h*=b.y,l+=w,u+=x,_=kt(y),y=hd(_)}}return gl({width:c,height:h,x:l,y:u})}function Wh(t,e){const r=tu(t).scrollLeft;return e?e.left+r:ls(Sr(t)).left+r}function e0(t,e,r){r===void 0&&(r=!1);const n=t.getBoundingClientRect(),s=n.left+e.scrollLeft-(r?0:Wh(t,n)),i=n.top+e.scrollTop;return{x:s,y:i}}function dk(t){let{elements:e,rect:r,offsetParent:n,strategy:s}=t;const i=s==="fixed",o=Sr(n),a=e?eu(e.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=xr(1);const c=xr(0),h=Er(n);if((h||!h&&!i)&&((_i(n)!=="body"||Uo(o))&&(l=tu(n)),Er(n))){const f=ls(n);u=Vs(n),c.x=f.x+n.clientLeft,c.y=f.y+n.clientTop}const p=o&&!h&&!i?e0(o,l,!0):xr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:r.y*u.y-l.scrollTop*u.y+c.y+p.y}}function hk(t){return Array.from(t.getClientRects())}function fk(t){const e=Sr(t),r=tu(t),n=t.ownerDocument.body,s=bt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=bt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Wh(t);const a=-r.scrollTop;return nr(n).direction==="rtl"&&(o+=bt(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function pk(t,e){const r=kt(t),n=Sr(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=Bh();(!u||u&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const mk=new Set(["absolute","fixed"]);function gk(t,e){const r=ls(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=Er(t)?Vs(t):xr(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,u=n*i.y;return{width:o,height:a,x:l,y:u}}function Vp(t,e,r){let n;if(e==="viewport")n=pk(t,r);else if(e==="document")n=fk(Sr(t));else if(rr(e))n=gk(e,r);else{const s=Zy(t);n={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return gl(n)}function t0(t,e){const r=Pn(t);return r===e||!rr(r)||ui(r)?!1:nr(r).position==="fixed"||t0(r,e)}function vk(t,e){const r=e.get(t);if(r)return r;let n=wo(t,[],!1).filter(a=>rr(a)&&_i(a)!=="body"),s=null;const i=nr(t).position==="fixed";let o=i?Pn(t):t;for(;rr(o)&&!ui(o);){const a=nr(o),l=Fh(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&mk.has(s.position)||Uo(o)&&!l&&t0(t,o))?n=n.filter(c=>c!==o):s=a,o=Pn(o)}return e.set(t,n),n}function yk(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?eu(e)?[]:vk(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((u,c)=>{const h=Vp(e,c,s);return u.top=bt(h.top,u.top),u.right=Tn(h.right,u.right),u.bottom=Tn(h.bottom,u.bottom),u.left=bt(h.left,u.left),u},Vp(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function wk(t){const{width:e,height:r}=Xy(t);return{width:e,height:r}}function _k(t,e,r){const n=Er(e),s=Sr(e),i=r==="fixed",o=ls(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=xr(0);function u(){l.x=Wh(s)}if(n||!n&&!i)if((_i(e)!=="body"||Uo(s))&&(a=tu(e)),n){const f=ls(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else s&&u();i&&!n&&s&&u();const c=s&&!n&&!i?e0(s,a):xr(0),h=o.left+a.scrollLeft-l.x-c.x,p=o.top+a.scrollTop-l.y-c.y;return{x:h,y:p,width:o.width,height:o.height}}function Qu(t){return nr(t).position==="static"}function Wp(t,e){if(!Er(t)||nr(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Sr(t)===r&&(r=r.ownerDocument.body),r}function r0(t,e){const r=kt(t);if(eu(t))return r;if(!Er(t)){let s=Pn(t);for(;s&&!ui(s);){if(rr(s)&&!Qu(s))return s;s=Pn(s)}return r}let n=Wp(t,e);for(;n&&rk(n)&&Qu(n);)n=Wp(n,e);return n&&ui(n)&&Qu(n)&&!Fh(n)?r:n||ak(t)||r}const bk=async function(t){const e=this.getOffsetParent||r0,r=this.getDimensions,n=await r(t.floating);return{reference:_k(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function xk(t){return nr(t).direction==="rtl"}const Ek={convertOffsetParentRelativeRectToViewportRelativeRect:dk,getDocumentElement:Sr,getClippingRect:yk,getOffsetParent:r0,getElementRects:bk,getClientRects:hk,getDimensions:wk,get
vendor: 10,337 bytes, line 132
132Scale:Vs,isElement:rr,isRTL:xk};function n0(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Sk(t,e){let r=null,n;const s=Sr(t);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=t.getBoundingClientRect(),{left:c,top:h,width:p,height:f}=u;if(a||e(),!p||!f)return;const _=fa(h),y=fa(s.clientWidth-(c+p)),b=fa(s.clientHeight-(h+f)),v=fa(c),w={rootMargin:-_+"px "+-y+"px "+-b+"px "+-v+"px",threshold:bt(0,Tn(1,l))||1};let x=!0;function E(S){const k=S[0].intersectionRatio;if(k!==l){if(!x)return o();k?o(!1,k):n=setTimeout(()=>{o(!1,1e-7)},1e3)}k===1&&!n0(u,t.getBoundingClientRect())&&o(),x=!1}try{r=new IntersectionObserver(E,{...w,root:s.ownerDocument})}catch{r=new IntersectionObserver(E,w)}r.observe(t)}return o(!0),i}function kk(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Vh(t),c=s||i?[...u?wo(u):[],...wo(e)]:[];c.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});const h=u&&a?Sk(u,r):null;let p=-1,f=null;o&&(f=new ResizeObserver(v=>{let[m]=v;m&&m.target===u&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(e)})),r()}),u&&!l&&f.observe(u),f.observe(e));let _,y=l?ls(t):null;l&&b();function b(){const v=ls(t);y&&!n0(y,v)&&r(),y=v,_=requestAnimationFrame(b)}return r(),()=>{var v;c.forEach(m=>{s&&m.removeEventListener("scroll",r),i&&m.removeEventListener("resize",r)}),h==null||h(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(_)}}const Ck=JS,Tk=YS,Pk=KS,jk=ZS,Ak=GS,Hp=qS,Rk=XS,Ok=(t,e,r)=>{const n=new Map,s={platform:Ek,...r},i={...s.platform,_c:n};return HS(t,e,{...s,platform:i})};var Nk=typeof document<"u",Ik=function(){},Ma=Nk?g.useLayoutEffect:Ik;function vl(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!vl(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!vl(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function s0(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function qp(t,e){const r=s0(t);return Math.round(e*r)/r}function Ju(t){const e=g.useRef(t);return Ma(()=>{e.current=t}),e}function Lk(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,h]=g.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[p,f]=g.useState(n);vl(p,n)||f(n);const[_,y]=g.useState(null),[b,v]=g.useState(null),m=g.useCallback(j=>{j!==S.current&&(S.current=j,y(j))},[]),w=g.useCallback(j=>{j!==k.current&&(k.current=j,v(j))},[]),x=i||_,E=o||b,S=g.useRef(null),k=g.useRef(null),C=g.useRef(c),T=l!=null,P=Ju(l),D=Ju(s),I=Ju(u),M=g.useCallback(()=>{if(!S.current||!k.current)return;const j={placement:e,strategy:r,middleware:p};D.current&&(j.platform=D.current),Ok(S.current,k.current,j).then(O=>{const z={...O,isPositioned:I.current!==!1};R.current&&!vl(C.current,z)&&(C.current=z,Do.flushSync(()=>{h(z)}))})},[p,e,r,D,I]);Ma(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,h(j=>({...j,isPositioned:!1})))},[u]);const R=g.useRef(!1);Ma(()=>(R.current=!0,()=>{R.current=!1}),[]),Ma(()=>{if(x&&(S.current=x),E&&(k.current=E),x&&E){if(P.current)return P.current(x,E,M);M()}},[x,E,M,P,T]);const V=g.useMemo(()=>({reference:S,floating:k,setReference:m,setFloating:w}),[m,w]),W=g.useMemo(()=>({reference:x,floating:E}),[x,E]),Q=g.useMemo(()=>{const j={position:r,left:0,top:0};if(!W.floating)return j;const O=qp(W.floating,c.x),z=qp(W.floating,c.y);return a?{...j,transform:"translate("+O+"px, "+z+"px)",...s0(W.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:z}},[r,a,W.floating,c.x,c.y]);return g.useMemo(()=>({...c,update:M,refs:V,elements:W,floatingStyles:Q}),[c,M,V,W,Q])}const Dk=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?Hp({element:n.current,padding:s}).fn(r):{}:n?Hp({element:n,padding:s}).fn(r):{}}}},$k=(t,e)=>({...Ck(t),options:[t,e]}),Mk=(t,e)=>({...Tk(t),options:[t,e]}),Uk=(t,e)=>({...Rk(t),options:[t,e]}),zk=(t,e)=>({...Pk(t),options:[t,e]}),Fk=(t,e)=>({...jk(t),options:[t,e]}),Bk=(t,e)=>({...Ak(t),options:[t,e]}),Vk=(t,e)=>({...Dk(t),options:[t,e]});var Wk="Arrow",i0=g.forwardRef((t,e)=>{const{children:r,width:n=10,height:s=5,...i}=t;return d.jsx(Ue.svg,{...i,ref:e,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});i0.displayName=Wk;var Hk=i0;function o0(t){const[e,r]=g.useState(void 0);return Cn(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var Hh="Popper",[a0,l0]=$o(Hh),[qk,u0]=a0(Hh),c0=t=>{const{__scopePopper:e,children:r}=t,[n,s]=g.useState(null);return d.jsx(qk,{scope:e,anchor:n,onAnchorChange:s,children:r})};c0.displayName=Hh;var d0="PopperAnchor",h0=g.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=u0(d0,r),o=g.useRef(null),a=Tt(e,o);return g.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:d.jsx(Ue.div,{...s,ref:a})});h0.displayName=d0;var qh="PopperContent",[Kk,Gk]=a0(qh),f0=g.forwardRef((t,e)=>{var se,Tr,sr,ir,or,ar;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:_,...y}=t,b=u0(qh,r),[v,m]=g.useState(null),w=Tt(e,lr=>m(lr)),[x,E]=g.useState(null),S=o0(x),k=(S==null?void 0:S.width)??0,C=(S==null?void 0:S.height)??0,T=n+(i!=="center"?"-"+i:""),P=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},D=Array.isArray(u)?u:[u],I=D.length>0,M={padding:P,boundary:D.filter(Jk),altBoundary:I},{refs:R,floatingStyles:V,placement:W,isPositioned:Q,middlewareData:j}=Lk({strategy:"fixed",placement:T,whileElementsMounted:(...lr)=>kk(...lr,{animationFrame:f==="always"}),elements:{reference:b.anchor},middleware:[$k({mainAxis:s+C,alignmentAxis:o}),l&&Mk({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Uk():void 0,...M}),l&&zk({...M}),Fk({...M,apply:({elements:lr,rects:J,availableWidth:X,availableHeight:je})=>{const{width:qe,height:De}=J.reference,ae=lr.floating.style;ae.setProperty("--radix-popper-available-width",`${X}px`),ae.setProperty("--radix-popper-available-height",`${je}px`),ae.setProperty("--radix-popper-anchor-width",`${qe}px`),ae.setProperty("--radix-popper-anchor-height",`${De}px`)}}),x&&Vk({element:x,padding:a}),Yk({arrowWidth:k,arrowHeight:C}),p&&Bk({strategy:"referenceHidden",...M})]}),[O,z]=g0(W),K=kn(_);Cn(()=>{Q&&(K==null||K())},[Q,K]);const q=(se=j.arrow)==null?void 0:se.x,Y=(Tr=j.arrow)==null?void 0:Tr.y,te=((sr=j.arrow)==null?void 0:sr.centerOffset)!==0,[ce,Ne]=g.useState();return Cn(()=>{v&&Ne(window.getComputedStyle(v).zIndex)},[v]),d.jsx("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:Q?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[(ir=j.transformOrigin)==null?void 0:ir.x,(or=j.transformOrigin)==null?void 0:or.y].join(" "),...((ar=j.hide)==null?void 0:ar.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:d.jsx(Kk,{scope:r,placedSide:O,onArrowChange:E,arrowX:q,arrowY:Y,shouldHideArrow:te,children:d.jsx(Ue.div,{"data-side":O,"data-align":z,...y,ref:w,style:{...y.style,animation:Q?void 0:"none"}})})})});f0.displayName=qh;var p0="PopperArrow",Qk={top:"bottom",right:"left",bottom:"top",left:"right"},m0=g.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,i=Gk(p0,n),o=Qk[i.placedSide];return d.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:d.jsx(Hk,{...s,ref:r,style:{...s.style,display:"block"}})})});m0.displayName=p0;function Jk(t){return t!==null}var Yk=t=>({name:"transformOrigin",options:t,fn(e){var b,v,m;const{placement:r,rects:n,middlewareData:s}=e,o=((b=s.arrow)==null?void 0:b.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[u,c]=g0(r),h={start:"0%",center:"50%",end:"100%"}[c],p=(((v=s.arrow)==null?void 0:v.x)??0)+a/2,f=(((m=s.arrow)==null?void 0:m.y)??0)+l/2;let _="",y="";return u==="bottom"?(_=o?h:`${p}px`,y=`${-l}px`):u==="top"?(_=o?h:`${p}px`,y=`${n.floating.height+l}px`):u==="right"?(_=`${-l}px`,y=o?h:`${f}px`):u==="left"&&(_=`${n.floating.width+l}px`,y=o?h:`${f}px`),{data:{x:_,y}}}});function g0(t){const[e,r="center"]=t.split("-");return[e,r]}var LO=c0,Xk=h0,Zk=f0,eC=m0,[ru,DO]=$o("Tooltip",[l0]),Kh=l0(),v0="TooltipProvider",tC=700,Kp="tooltip.open",[rC,y0]=ru(v0),w0=t=>{const{__scopeTooltip:e,delayDuration:r=tC,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=t,o=g.useRef(!0),a=g.useRef(!1),l=g.useRef(0);return g.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),d.jsx(rC,{scope:e,isOpenDelayedRef:o,delayDuration:r,onOpen:g.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>
vendor: 4,219 bytes, line 132
132o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:g.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};w0.displayName=v0;var _0="Tooltip",[$O,nu]=ru(_0),fd="TooltipTrigger",nC=g.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=nu(fd,r),i=y0(fd,r),o=Kh(r),a=g.useRef(null),l=Tt(e,a,s.onTriggerChange),u=g.useRef(!1),c=g.useRef(!1),h=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),d.jsx(Xk,{asChild:!0,...o,children:d.jsx(Ue.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:Pe(t.onPointerMove,p=>{p.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:Pe(t.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:Pe(t.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Pe(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:Pe(t.onBlur,s.onClose),onClick:Pe(t.onClick,s.onClose)})})});nC.displayName=fd;var sC="TooltipPortal",[MO,iC]=ru(sC,{forceMount:void 0}),ci="TooltipContent",b0=g.forwardRef((t,e)=>{const r=iC(ci,t.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=t,o=nu(ci,t.__scopeTooltip);return d.jsx(Jl,{present:n||o.open,children:o.disableHoverableContent?d.jsx(x0,{side:s,...i,ref:e}):d.jsx(oC,{side:s,...i,ref:e})})}),oC=g.forwardRef((t,e)=>{const r=nu(ci,t.__scopeTooltip),n=y0(ci,t.__scopeTooltip),s=g.useRef(null),i=Tt(e,s),[o,a]=g.useState(null),{trigger:l,onClose:u}=r,c=s.current,{onPointerInTransitChange:h}=n,p=g.useCallback(()=>{a(null),h(!1)},[h]),f=g.useCallback((_,y)=>{const b=_.currentTarget,v={x:_.clientX,y:_.clientY},m=dC(v,b.getBoundingClientRect()),w=hC(v,m),x=fC(y.getBoundingClientRect()),E=mC([...w,...x]);a(E),h(!0)},[h]);return g.useEffect(()=>()=>p(),[p]),g.useEffect(()=>{if(l&&c){const _=b=>f(b,c),y=b=>f(b,l);return l.addEventListener("pointerleave",_),c.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",_),c.removeEventListener("pointerleave",y)}}},[l,c,f,p]),g.useEffect(()=>{if(o){const _=y=>{const b=y.target,v={x:y.clientX,y:y.clientY},m=(l==null?void 0:l.contains(b))||(c==null?void 0:c.contains(b)),w=!pC(v,o);m?p():w&&(p(),u())};return document.addEventListener("pointermove",_),()=>document.removeEventListener("pointermove",_)}},[l,c,o,u,p]),d.jsx(x0,{...t,ref:i})}),[aC,lC]=ru(_0,{isInside:!1}),uC=wE("TooltipContent"),x0=g.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=nu(ci,r),u=Kh(r),{onClose:c}=l;return g.useEffect(()=>(document.addEventListener(Kp,c),()=>document.removeEventListener(Kp,c)),[c]),g.useEffect(()=>{if(l.trigger){const h=p=>{const f=p.target;f!=null&&f.contains(l.trigger)&&c()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,c]),d.jsx(Oh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:c,children:d.jsxs(Zk,{"data-state":l.stateAttribute,...u,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(uC,{children:n}),d.jsx(aC,{scope:r,isInside:!0,children:d.jsx(VE,{id:l.contentId,role:"tooltip",children:s||n})})]})})});b0.displayName=ci;var E0="TooltipArrow",cC=g.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Kh(r);return lC(E0,r).isInside?null:d.jsx(eC,{...s,...n,ref:e})});cC.displayName=E0;function dC(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function hC(t,e,r=5){const n=[];
132switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function fC(t){const{top:e,right:r,bottom:n,left:s}=t;return[{x:s,y:e},{x:r,y:e},{x:r,y:n},{x:s,y:n}]}function pC(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const a=e[i],l=e[o],u=a.x,c=a.y,h=l.x,p=l.y;c>n!=p>n&&r<(h-u)*(n-c)/(p-c)+u&&(s=!s)}return s}function mC(t){const e=t.slice();return e.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),gC(e)}function gC(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n<t.length;n++){const s=t[n];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const s=t[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var vC=w0,S0=b0;const yC=vC,wC=g.forwardRef(({className:t,sideOffset:e=4,...r},n)=>d.jsx(S0,{ref:n,sideOffset:e,className:tt("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",t),...r}));wC.displayName=S0.displayName;var su=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},iu=typeof window>"u"||"Deno"in globalThis;function qt(){}function _C(t,e){return typeof t=="function"?t(e):t}function bC(t){return typeof t=="number"&&t>=0&&t!==1/0}function xC(t,e){return Math.max(t+(e||0)-Date.now(),0)}function pd(t,e){return typeof t=="function"?t(e):t}function EC(t,e){return typeof t=="function"?t(e):t}function Gp(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(n){if(e.queryHash!==Gh(o,e.options))return!1}else if(!bo(e.queryKey,o))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function Qp(t,e){const{exact:r,status:n,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(r){if(_o(e.options.mutationKey)!==_o(i))return!1}else if(!bo(e.options.mutationKey,i))return!1}return!(n&&e.state.status!==n||s&&!s(e))}function Gh(t,e){return((e==null?void 0:e.queryKeyHashFn)||_o)(t)}function _o(t){return JSON.stringify(t,(e,r)=>md(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function bo(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>bo(t[r],e[r])):!1}function k0(t,e){if(t===e)return t;const r=Jp(t)&&Jp(e);if(r||md(t)&&md(e)){const n=r?t:Object.keys(t),s=n.length,i=r?e:Object.keys(e),o=i.length,a=r?[]:{},l=new Set(n);let u=0;for(let c=0;c<o;c++){const h=r?c:i[c];(!r&&l.has(h)||r)&&t[h]===void 0&&e[h]===void 0?(a[h]=void 0,u++):(a[h]=k0(t[h],e[h]),a[h]===t[h]&&t[h]!==void 0&&u++)}return s===o&&u===s?t:a}return e}function UO(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function Jp(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function md(t){if(!Yp(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!Yp(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Yp(t){return Object.prototype.toString.call(t)==="[object Object]"}function SC(t){return new Promise(e=>{setTimeout(e,t)})}function kC(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?k0(t,e):e}function CC(t,e,r=0){const n=[...t,e];return r&&n.length>r?n.slice(1):n}function TC(t,e,r=0){const n=[e,...t];return r&&n.length>r?n.slice(0,-1):n}var Qh=Symbol();function C0(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Qh?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function zO(t,e){return typeof t=="function"?t(...e):!!t}var Gn,sn,Gs,Lm,PC=(Lm=class extends su{constructor(){super();oe(this,Gn);oe(this,sn);oe(this,Gs);ee(this,Gs,e=>{if(!iu&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){A(this,sn)||this.setEventListener(A(this,Gs))}onUnsubscribe(){var e;this.hasListeners()||((e=A(this,sn))==null||e.call(this),ee(this,sn,void 0))}setEventListener(e){var r;ee(this,Gs,e),(r=A(this,sn))==null||r.call(this),ee(this,sn,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){A(this,Gn)!==e&&(ee(this,Gn,e),this.onFocus())}onFocus(){const e=this.isFocused();
vendor: 4,924 bytes, line 132
132this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof A(this,Gn)=="boolean"?A(this,Gn):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Gn=new WeakMap,sn=new WeakMap,Gs=new WeakMap,Lm),T0=new PC,Qs,on,Js,Dm,jC=(Dm=class extends su{constructor(){super();oe(this,Qs,!0);oe(this,on);oe(this,Js);ee(this,Js,e=>{if(!iu&&window.addEventListener){const r=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){A(this,on)||this.setEventListener(A(this,Js))}onUnsubscribe(){var e;this.hasListeners()||((e=A(this,on))==null||e.call(this),ee(this,on,void 0))}setEventListener(e){var r;ee(this,Js,e),(r=A(this,on))==null||r.call(this),ee(this,on,e(this.setOnline.bind(this)))}setOnline(e){A(this,Qs)!==e&&(ee(this,Qs,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return A(this,Qs)}},Qs=new WeakMap,on=new WeakMap,Js=new WeakMap,Dm),yl=new jC;function AC(){let t,e;const r=new Promise((s,i)=>{t=s,e=i});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),t(s)},r.reject=s=>{n({status:"rejected",reason:s}),e(s)},r}function RC(t){return Math.min(1e3*2**t,3e4)}function P0(t){return(t??"online")==="online"?yl.isOnline():!0}var j0=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Yu(t){return t instanceof j0}function A0(t){let e=!1,r=0,n=!1,s;const i=AC(),o=y=>{var b;n||(p(new j0(y)),(b=t.abort)==null||b.call(t))},a=()=>{e=!0},l=()=>{e=!1},u=()=>T0.isFocused()&&(t.networkMode==="always"||yl.isOnline())&&t.canRun(),c=()=>P0(t.networkMode)&&t.canRun(),h=y=>{var b;n||(n=!0,(b=t.onSuccess)==null||b.call(t,y),s==null||s(),i.resolve(y))},p=y=>{var b;n||(n=!0,(b=t.onError)==null||b.call(t,y),s==null||s(),i.reject(y))},f=()=>new Promise(y=>{var b;s=v=>{(n||u())&&y(v)},(b=t.onPause)==null||b.call(t)}).then(()=>{var y;s=void 0,n||(y=t.onContinue)==null||y.call(t)}),_=()=>{if(n)return;let y;const b=r===0?t.initialPromise:void 0;try{y=b??t.fn()}catch(v){y=Promise.reject(v)}Promise.resolve(y).then(h).catch(v=>{var S;if(n)return;const m=t.retry??(iu?0:3),w=t.retryDelay??RC,x=typeof w=="function"?w(r,v):w,E=m===!0||typeof m=="number"&&r<m||typeof m=="function"&&m(r,v);if(e||!E){p(v);return}r++,(S=t.onFail)==null||S.call(t,r,v),SC(x).then(()=>u()?void 0:f()).then(()=>{e?p(v):_()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?_():f().then(_),i)}}var OC=t=>setTimeout(t,0);function NC(){let t=[],e=0,r=a=>{a()},n=a=>{a()},s=OC;const i=a=>{e?t.push(a):s(()=>{r(a)})},o=()=>{const a=t;t=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var it=NC(),Qn,$m,R0=($m=class{constructor(){oe(this,Qn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bC(this.gcTime)&&ee(this,Qn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(iu?1/0:5*60*1e3))}clearGcTimeout(){A(this,Qn)&&(clearTimeout(A(this,Qn)),ee(this,Qn,void 0))}},Qn=new WeakMap,$m),Ys,Jn,At,Yn,Ye,Po,Xn,Gt,jr,Mm,IC=(Mm=class extends R0{constructor(e){super();oe(this,Gt);oe(this,Ys);oe(this,Jn);oe(this,At);oe(this,Yn);oe(this,Ye);oe(this,Po);oe(this,Xn);ee(this,Xn,!1),ee(this,Po,e.defaultOptions),this.setOptions(e.options),this.observers=[],ee(this,Yn,e.client),ee(this,At,A(this,Yn).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,ee(this,Ys,DC(this.options)),this.state=e.state??A(this,Ys),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=A(this,Ye))==null?void 0:e.promise}setOptions(e){this.options={...A(this,Po),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,At).remove(this)}setData(e,r){const n=kC(this.state.data,e,this.options);return Ge(this,Gt,jr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){Ge(this,Gt,jr).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var n,s;const r=(n=A(this,Ye))==null?void 0:n.promise;return(s=A(this,Ye))==null||s.cancel(e),r?r.then(qt).catch(qt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(A(this,Ys))}isActive(){return this.observers.some(e=>EC(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Qh||this.state.dataUpdateCount+this.state.errorUpdate
132Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>pd(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!xC(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=A(this,Ye))==null||r.continue()}onOnline(){var r;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=A(this,Ye))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),A(this,At).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(A(this,Ye)&&(A(this,Xn)?A(this,Ye).cancel({revert:!0}):A(this,Ye).cancelRetry()),this.scheduleGc()),A(this,At).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ge(this,Gt,jr).call(this,{type:"invalidate"})}fetch(e,r){var u,c,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(A(this,Ye))return A(this,Ye).continueRetry(),A(this,Ye).promise}if(e&&this.setOptions(e),!this.options.queryFn){const p=this.observers.find(f=>f.options.queryFn);p&&this.setOptions(p.options)}const n=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(ee(this,Xn,!0),n.signal)})},i=()=>{const p=C0(this.options,r),_=(()=>{const y={client:A(this,Yn),queryKey:this.queryKey,meta:this.meta};return s(y),y})();return ee(this,Xn,!1),this.options.persister?this.options.persister(p,_,this):p(_)},a=(()=>{const p={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:A(this,Yn),state:this.state,fetchFn:i};return s(p),p})();(u=this.options.behavior)==null||u.onFetch(a,this),ee(this,Jn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&Ge(this,Gt,jr).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const l=p=>{var f,_,y,b;Yu(p)&&p.silent||Ge(this,Gt,jr).call(this,{type:"error",error:p}),Yu(p)||((_=(f=A(this,At).config).onError)==null||_.call(f,p,this),(b=(y=A(this,At).config).onSettled)==null||b.call(y,this.state.data,p,this)),this.scheduleGc()};return ee(this,Ye,A0({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:p=>{var f,_,y,b;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(v){l(v);return}(_=(f=A(this,At).config).onSuccess)==null||_.call(f,p,this),(b=(y=A(this,At).config).onSettled)==null||b.call(y,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,f)=>{Ge(this,Gt,jr).call(this,{type:"failed",failureCount:p,error:f})},onPause:()=>{Ge(this,Gt,jr).call(this,{type:"pause"})},onContinue:()=>{Ge(this,Gt,jr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),A(this,Ye).start()}},Ys=new WeakMap,Jn=new WeakMap,At=new WeakMap,Yn=new WeakMap,Ye=new WeakMap,Po=new WeakMap,Xn=new WeakMap,Gt=new WeakSet,jr=function(e){const r=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...LC(n.data,this.options),fetchMeta:e.meta??null};case"success":return ee(this,Jn,void 0),{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return Yu(s)&&s.revert&&A(this,Jn)?{...A(this,Jn),fetchStatus:"idle"}
vendor: 5,105 bytes, line 132
132:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),it.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),A(this,At).notify({query:this,type:"updated",action:e})})},Mm);function LC(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:P0(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function DC(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var mr,Um,$C=(Um=class extends su{constructor(e={}){super();oe(this,mr);this.config=e,ee(this,mr,new Map)}build(e,r,n){const s=r.queryKey,i=r.queryHash??Gh(s,r);let o=this.get(i);return o||(o=new IC({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){A(this,mr).has(e.queryHash)||(A(this,mr).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=A(this,mr).get(e.queryHash);r&&(e.destroy(),r===e&&A(this,mr).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){it.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return A(this,mr).get(e)}getAll(){return[...A(this,mr).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(n=>Gp(r,n))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(n=>Gp(e,n)):r}notify(e){it.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){it.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){it.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},mr=new WeakMap,Um),gr,nt,Zn,vr,Yr,zm,MC=(zm=class extends R0{constructor(e){super();oe(this,vr);oe(this,gr);oe(this,nt);oe(this,Zn);this.mutationId=e.mutationId,ee(this,nt,e.mutationCache),ee(this,gr,[]),this.state=e.state||UC(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){A(this,gr).includes(e)||(A(this,gr).push(e),this.clearGcTimeout(),A(this,nt).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){ee(this,gr,A(this,gr).filter(r=>r!==e)),this.scheduleGc(),A(this,nt).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){A(this,gr).length||(this.state.status==="pending"?this.scheduleGc():A(this,nt).remove(this))}continue(){var e;return((e=A(this,Zn))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,o,a,l,u,c,h,p,f,_,y,b,v,m,w,x,E,S,k,C;const r=()=>{Ge(this,vr,Yr).call(this,{type:"continue"})};ee(this,Zn,A0({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(T,P)=>{Ge(this,vr,Yr).call(this,{type:"failed",failureCount:T,error:P})},onPause:()=>{Ge(this,vr,Yr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,nt).canRun(this)}));const n=this.state.status==="pending",s=!A(this,Zn).canStart();try{if(n)r();else{Ge(this,vr,Yr).call(this,{type:"pending",variables:e,isPaused:s}),await((o=(i=A(this,nt).config).onMutate)==null?void 0:o.call(i,e,this));const P=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));P!==this.state.context&&Ge(this,vr,Yr).call(this,{type:"pending",context:P,variables:e,isPaused:s})}const T=await A(this,Zn).start();return await((c=(u=A(this,nt).config).onSuccess)==null?void 0:c.call(u,T,e,this.state.context,this)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,T,e,this.state.context)),await((_=(f=A(this,nt).config).onSettled)==null?void 0:_.call(f,T,null,this.state.variables,this.state.context,this)),await((b=(y=this.options).onSettled)==null?void 0:b.call(y,T,null,e,this.state.context)),Ge(this,vr,Yr).call(this,{type:"success",data:T}),T}catch(T){try{throw await((m=(v=A(this,nt).config).onError)==null?void 0:m.call(v,T,e,this.state.context,this)),await((x=(w=this.options).onError)==null?void 0:x.call(w,T,e,this.state.context)),await((S=(E=A(this,nt).config).onSettled)==null?void 0:S.call(E,void 0,T,this.state.variables,this.state.context,this)),await((C=(k=this.options).onSettled)==null?void 0:C.call(k,void 0,T,e,this.state.context)),T}finally{Ge(this,vr,Yr).call(this,{type:"error",error:T})}}finally{A(this,nt).runNext(this)}}},gr=new WeakMap,nt=new WeakMap,Zn=new WeakMap,vr=new WeakSet,Yr=function(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};
132case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),it.batch(()=>{A(this,gr).forEach(n=>{n.onMutationUpdate(e)}),A(this,nt).notify({mutation:this,type:"updated",action:e})})},zm);function UC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Or,Qt,jo,Fm,zC=(Fm=class extends su{constructor(e={}){super();oe(this,Or);oe(this,Qt);oe(this,jo);this.config=e,ee(this,Or,new Set),ee(this,Qt,new Map),ee(this,jo,0)}build(e,r,n){const s=new MC({mutationCache:this,mutationId:++qo(this,jo)._,options:e.defaultMutationOptions(r),state:n});return this.add(s),s}add(e){A(this,Or).add(e);const r=pa(e);if(typeof r=="string"){const n=A(this,Qt).get(r);n?n.push(e):A(this,Qt).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(A(this,Or).delete(e)){const r=pa(e);if(typeof r=="string"){const n=A(this,Qt).get(r);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&A(this,Qt).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=pa(e);if(typeof r=="string"){const n=A(this,Qt).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var n;const r=pa(e);if(typeof r=="string"){const s=(n=A(this,Qt).get(r))==null?void 0:n.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){it.batch(()=>{A(this,Or).forEach(e=>{this.notify({type:"removed",mutation:e})}),A(this,Or).clear(),A(this,Qt).clear()})}getAll(){return Array.from(A(this,Or))}find(e){const r={exact:!0,...e};return this.getAll().find(n=>Qp(r,n))}findAll(e={}){return this.getAll().filter(r=>Qp(e,r))}notify(e){it.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>
132r.state.isPaused);return it.batch(()=>Promise.all(e.map(r=>r.continue().catch(qt))))}},Or=new WeakMap,Qt=new WeakMap,jo=new WeakMap,Fm);function pa(t){var e;return(e=t.options.scope)==null?void 0:e.id}function Xp(t){return{onFetch:(e,r)=>{var c,h,p,f,_;const n=e.options,s=(p=(h=(c=e.fetchOptions)==null?void 0:c.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,i=((f=e.state.data)==null?void 0:f.pages)||[],o=((_=e.state.data)==null?void 0:_.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let y=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(e.signal.aborted?y=!0:e.signal.addEventListener("abort",()=>{y=!0}),e.signal)})},v=C0(e.options,e.fetchOptions),m=async(w,x,E)=>{if(y)return Promise.reject();if(x==null&&w.pages.length)return Promise.resolve(w);const k=(()=>{const D={client:e.client,queryKey:e.queryKey,pageParam:x,direction:E?"backward":"forward",meta:e.options.meta};return b(D),D})(),C=await v(k),{maxPages:T}=e.options,P=E?TC:CC;return{pages:P(w.pages,C,T),pageParams:P(w.pageParams,x,T)}};if(s&&i.length){const w=s==="backward",x=w?FC:Zp,E={pages:i,pageParams:o},S=x(n,E);a=await m(E,S,w)}else{const w=t??i.length;do{const x=l===0?o[0]??n.initialPageParam:Zp(n,a);if(l>0&&x==null)break;a=await m(a,x),l++}while(l<w)}return a};e.options.persister?e.fetchFn=()=>{var y,b;return(b=(y=e.options).persister)==null?void 0:b.call(y,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=u}}}function Zp(t,{pages:e,pageParams:r}){const n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,r[n],r):void 0}function FC(t,{pages:e,pageParams:r}){var n;return e.length>0?(n=t.getPreviousPageParam)==null?void 0:n.call(t,e[0],e,r[0],r):void 0}var Se,an,ln,Xs,Zs,un,ei,ti,Bm,BC=(Bm=class{constructor(t={}){oe(this,Se);oe(this,an);oe(this,ln);oe(this,Xs);oe(this,Zs);oe(this,un);oe(this,ei);oe(this,ti);ee(this,Se,t.queryCache||new $C),ee(this,an,t.mutationCache||new zC),ee(this,ln,t.defaultOptions||{}),ee(this,Xs,new Map),ee(this,Zs,new Map),ee(this,un,0)}mount(){qo(this,un)._++,A(this,un)===1&&(ee(this,ei,T0.subscribe(async t=>{t&&(await this.resumePausedMutations(),A(this,Se).onFocus())})),ee(this,ti,yl.subscribe(async t=>{t&&(await this.resumePausedMutations(),A(this,Se).onOnline())})))}unmount(){var t,e;qo(this,un)._--,A(this,un)===0&&((t=A(this,ei))==null||t.call(this),ee(this,ei,void 0),(e=A(this,ti))==null||e.call(this),ee(this,ti,void 0))}isFetching(t){return A(this,Se).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return A(this,an).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=A(this,Se).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=A(this,Se).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(pd(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return A(this,Se).findAll(t).map(({queryKey:e,state:r})=>{const n=r.data;return[e,n]})}setQueryData(t,e,r){const n=this.defaultQueryOptions({queryKey:t}),s=A(this,Se).get(n.queryHash),i=s==null?void 0:s.state.data,o=_C(e,i);if(o!==void 0)return A(this,Se).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(t,e,r){return it.batch(()=>A(this,Se).findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=A(this,Se).get(e.queryHash))==null?void 0:r.state}removeQueries(t){const e=A(this,Se);it.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=A(this,Se);return it.batch(()=>(r.findAll(t).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},n=it.batch(()=>A(this,Se).findAll(t).map(s=>s.cancel(r)));return Promise.all(n).then(qt).catch(qt)}invalidateQueries(t,e={}){return it.batch(()=>(A(this,Se).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},n=it.batch(()=>A(this,Se).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(qt)),s.state.fetchStatus==="paused"?Promise.resolve():i}
132));return Promise.all(n).then(qt)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=A(this,Se).build(this,e);return r.isStaleByTime(pd(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(qt).catch(qt)}fetchInfiniteQuery(t){return t.behavior=Xp(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(qt).catch(qt)}ensureInfiniteQueryData(t){return t.behavior=Xp(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return yl.isOnline()?A(this,an).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,Se)}getMutationCache(){return A(this,an)}getDefaultOptions(){return A(this,ln)}setDefaultOptions(t){ee(this,ln,t)}setQueryDefaults(t,e){A(this,Xs).set(_o(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...A(this,Xs).values()],r={};return e.forEach(n=>{bo(t,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(t,e){A(this,Zs).set(_o(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...A(this,Zs).values()],r={};return e.forEach(n=>{bo(t,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...A(this,ln).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Gh(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Qh&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...A(this,ln).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){A(this,Se).clear(),A(this,an).clear()}},Se=new WeakMap,an=new WeakMap,ln=new WeakMap,Xs=new WeakMap,Zs=new WeakMap,un=new WeakMap,ei=new WeakMap,ti=new WeakMap,Bm),O0=g.createContext(void 0),FO=t=>{const e=g.useContext(O0);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},VC=({client:t,children:e})=>(g.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),d.jsx(O0.Provider,{value:t,children:e}));/** 133 * @remix-run/router v1.23.0 134 * 135 * Copyright (c) Remix Software Inc. 136 * 137 * This source code is licensed under the MIT license found in the 138 * LICENSE.md file in the root directory of this source tree. 139 * 140 * @license MIT 141 */function xo(){return xo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xo.apply(this,arguments)}var hn;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(hn||(hn={}));const em="popstate";function WC(t){t===void 0&&(t={});function e(n,s){let{pathname:i,search:o,hash:a}=n.location;return gd("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:wl(s)}return qC(e,r,null,t)}function xe(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function N0(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function HC(){return Math.random().toString(36).substr(2,8)}function tm(t,e){return{usr:t.state,key:t.key,idx:e}}function gd(t,e,r,n){return r===void 0&&(r=null),xo({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?bi(e):e,{state:r,key:e&&e.key||n||HC()})}function wl(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function bi(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function qC(t,e,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=hn.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(xo({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function h(){a=hn.Pop;let b=c(),v=b==null?null:b-u;u=b,l&&l({action:a,location:y.location,delta:v})}function p(b,v){a=hn.Push;let m=gd(y.location,b,v);u=c()+1;let w=tm(m,u),x=y.createHref(m);try{o.pushState(w,"",x)}
vendor: 3,324 bytes, line 141
141catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(x)}i&&l&&l({action:a,location:y.location,delta:1})}function f(b,v){a=hn.Replace;let m=gd(y.location,b,v);u=c();let w=tm(m,u),x=y.createHref(m);o.replaceState(w,"",x),i&&l&&l({action:a,location:y.location,delta:0})}function _(b){let v=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof b=="string"?b:wl(b);return m=m.replace(/ $/,"%20"),xe(v,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,v)}let y={get action(){return a},get location(){return t(s,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(em,h),l=b,()=>{s.removeEventListener(em,h),l=null}},createHref(b){return e(s,b)},createURL:_,encodeLocation(b){let v=_(b);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:p,replace:f,go(b){return o.go(b)}};return y}var rm;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(rm||(rm={}));function KC(t,e,r){return r===void 0&&(r="/"),GC(t,e,r,!1)}function GC(t,e,r,n){let s=typeof e=="string"?bi(e):e,i=di(s.pathname||"/",r);if(i==null)return null;let o=I0(t);QC(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=oT(i);a=sT(o[l],u,n)}return a}function I0(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");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("/")&&(xe(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=bn([n,l.relativePath]),c=r.concat(l);i.children&&i.children.length>0&&(xe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),I0(i.children,e,c,u)),!(i.path==null&&!i.index)&&e.push({path:u,score:rT(u,i.index),routesMeta:c})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of L0(i.path))s(i,o,l)}),e}function L0(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=L0(n.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function QC(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:nT(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const JC=/^:[\w-]+$/,YC=3,XC=2,ZC=1,eT=10,tT=-2,nm=t=>t==="*";function rT(t,e){let r=t.split("/"),n=r.length;return r.some(nm)&&(n+=tT),e&&(n+=XC),r.filter(s=>!nm(s)).reduce((s,i)=>s+(JC.test(i)?YC:i===""?ZC:eT),n)}function nT(t,e){return t.length===e.length&&t.slice(0,-1).every((n,s)=>n===e[s])?t[t.length-1]-e[e.length-1]:0}function sT(t,e,r){let{routesMeta:n}=t,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,c=i==="/"?e:e.slice(i.length)||"/",h=_l({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),p=l.route;if(!h&&u&&r&&!n[n.length-1].route.index&&(h=_l({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!h)return null;
vendor: 9,390 bytes, lines 141-150
141Object.assign(s,h.params),o.push({params:s,pathname:bn([i,h.pathname]),pathnameBase:cT(bn([i,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(i=bn([i,h.pathnameBase]))}return o}function _l(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=iT(t.path,t.caseSensitive,t.end),s=e.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((u,c,h)=>{let{paramName:p,isOptional:f}=c;if(p==="*"){let y=a[h]||"";o=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const _=a[h];return f&&!_?u[p]=void 0:u[p]=(_||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:t}}function iT(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),N0(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),n]}function oT(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return N0(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function di(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function aT(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:s=""}=typeof t=="string"?bi(t):t;return{pathname:r?r.startsWith("/")?r:lT(r,e):e,search:dT(n),hash:hT(s)}}function lT(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function Xu(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function uT(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function Jh(t,e){let r=uT(t);return e?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Yh(t,e,r,n){n===void 0&&(n=!1);let s;typeof t=="string"?s=bi(t):(s=xo({},t),xe(!s.pathname||!s.pathname.includes("?"),Xu("?","pathname","search",s)),xe(!s.pathname||!s.pathname.includes("#"),Xu("#","pathname","hash",s)),xe(!s.search||!s.search.includes("#"),Xu("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let h=e.length-1;if(!n&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),h-=1;s.pathname=p.join("/")}a=h>=0?e[h]:"/"}let l=aT(s,a),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const bn=t=>t.join("/").replace(/\/\/+/g,"/"),cT=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),dT=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,hT=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function fT(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const D0=["post","put","patch","delete"];new Set(D0);const pT=["get",...D0];new Set(pT);/** 142 * React Router v6.30.1 143 * 144 * Copyright (c) Remix Software Inc. 145 * 146 * This source code is licensed under the MIT license found in the 147 * LICENSE.md file in the root directory of this source tree. 148 * 149 * @license MIT 150 */function Eo(){return Eo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Eo.apply(this,arguments)}const ou=g.createContext(null),$0=g.createContext(null),Vr=g.createContext(null),au=g.createContext(null),kr=g.createContext({outlet:null,matches:[],isDataRoute:!1}),M0=g.createContext(null);function mT(t,e){let{relative:r}=e===void 0?{}:e;xi()||xe(!1);let{basename:n,navigator:s}=g.useContext(Vr),{hash:i,pathname:o,search:a}=lu(t,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:bn([n,o])),s.createHref({pathname:l,search:a,hash:i})}function xi(){return g.useContext(au)!=null}function Cr(){return xi()||xe(!1),g.useContext(au).location}function U0(t){g.useContext(Vr).static||g.useLayoutEffect(t)}function Ei(){let{isDataRoute:t}=g.useContext(kr);return t?AT():gT()}function gT(){xi()||xe(!1);let t=g.useContext(ou),{basename:e,future:r,navigator:n}=g.useContext(Vr),{matches:s}=g.useContext(kr),{pathname:i}=Cr(),o=JSON.stringify(Jh(s,r.v7_relativeSplatPath)),a=g.useRef(!1);return U0(()=>{a.current=!0}),g.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let h=Yh(u,JSON.parse(o),i,c.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:bn([e,h.pathname])),(c.replace?n.replace:n.push)(h,c.state,c)},[e,n,o,i,t])}const vT=g.createContext(null);function yT(t){let e=g.useContext(kr).outlet;return e&&g.createElement(vT.Provider,{value:t},e)}function z0(){let{matches:t}=g.useContext(kr),e=t[t.length-1];return e?e.params:{}}function lu(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=g.useContext(Vr),{matches:s}=g.useContext(kr),{pathname:i}=Cr(),o=JSON.stringify(Jh(s,n.v7_relativeSplatPath));return g.useMemo(()=>Yh(t,JSON.parse(o),i,r==="path"),[t,o,i,r])}function wT(t,e){return _T(t,e)}function _T(t,e,r,n){xi()||xe(!1);let{navigator:s}=g.useContext(Vr),{matches:i}=g.useContext(kr),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Cr(),c;if(e){var h;let b=typeof e=="string"?bi(e):e;l==="/"||(h=b.pathname)!=null&&h.startsWith(l)||xe(!1),c=b}else c=u;let p=c.pathname||"/",f=p;if(l!=="/"){let b=l.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let _=KC(t,{pathname:f}),y=kT(_&&_.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:bn([l,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:bn([l,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,r,n);return e&&y?g.createElement(au.Provider,{value:{location:Eo({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:hn.Pop}},y):y}function bT(){let t=jT(),e=fT(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},e),r?g.createElement("pre",{style:s},r):null,null)}const xT=g.createElement(bT,null);class ET extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?g.createElement(kr.Provider,{value:this.props.routeContext},g.createElement(M0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ST(t){let{routeContext:e,match:r,children:n}=t,s=g.useContext(ou);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),g.createElement(kr.Provider,{value:e},n)}function kT(t,e,r,n){var s;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var i;if(!r)return null;if(r.errors)t=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,a=(s=r)==null?void 0:s.errors;if(a!=null){let c=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);c>=0||xe(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c<o.length;c++){let h=o[c];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=c),h.route.id){let{loaderData:p,errors:f}=r,_=h.route.loader&&p[h.route.id]===void 0&&(!f||f[h.route.id]===void 0);if(h.route.lazy||_){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,h,p)=>{let f,_=!1,y=null,b=null;r&&(f=a&&h.route.id?a[h.route.id]:void 0,y=h.route.errorElement||xT,l&&(u<0&&p===0?(_=!0,b=null):u===p&&(_=!0,b=h.route.hydrateFallbackElement||null)));let v=e.concat(o.slice(0,p+1)),m=()=>{let w;return f?w=y:_?w=b:h.route.Component?w=g.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=c,g.createElement(ST,{match:h,routeC
150ontext:{outlet:c,matches:v,isDataRoute:r!=null},children:w})};return r&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?g.createElement(ET,{location:r.location,revalidation:r.revalidation,component:y,error:f,children:m(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):m()},null)}var F0=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(F0||{}),bl=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(bl||{});function CT(t){let e=g.useContext(ou);return e||xe(!1),e}function TT(t){let e=g.useContext($0);return e||xe(!1),e}function PT(t){let e=g.useContext(kr);return e||xe(!1),e}function B0(t){let e=PT(),r=e.matches[e.matches.length-1];return r.route.id||xe(!1),r.route.id}function jT(){var t;let e=g.useContext(M0),r=TT(bl.UseRouteError),n=B0(bl.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function AT(){let{router:t}=CT(F0.UseNavigateStable),e=B0(bl.UseNavigateStable),r=g.useRef(!1);return U0(()=>{r.current=!0}),g.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,Eo({fromRouteId:e},i)))},[t,e])}function RT(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function OT(t){let{to:e,replace:r,state:n,relative:s}=t;xi()||xe(!1);let{future:i,static:o}=g.useContext(Vr),{matches:a}=g.useContext(kr),{pathname:l}=Cr(),u=Ei(),c=Yh(e,Jh(a,i.v7_relativeSplatPath),l,s==="path"),h=JSON.stringify(c);return g.useEffect(()=>u(JSON.parse(h),{replace:r,state:n,relative:s}),[u,h,s,r,n]),null}function BO(t){return yT(t.context)}function N(t){xe(!1)}function NT(t){let{basename:e="/",children:r=null,location:n,navigationType:s=hn.Pop,navigator:i,static:o=!1,future:a}=t;xi()&&xe(!1);let l=e.replace(/^\/*/,"/"),u=g.useMemo(()=>({basename:l,navigator:i,static:o,future:Eo({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=bi(n));let{pathname:c="/",search:h="",hash:p="",state:f=null,key:_="default"}=n,y=g.useMemo(()=>{let b=di(c,l);return b==null?null:{location:{pathname:b,search:h,hash:p,state:f,key:_},navigationType:s}},[l,c,h,p,f,_,s]);return y==null?null:g.createElement(Vr.Provider,{value:u},g.createElement(au.Provider,{children:r,value:y}))}function IT(t){let{children:e,location:r}=t;return wT(vd(e),r)}new Promise(()=>{});function vd(t,e){e===void 0&&(e=[]);let r=[];return g.Children.forEach(t,(n,s)=>{if(!g.isValidElement(n))return;let i=[...e,s];if(n.type===g.Fragment){r.push.apply(r,vd(n.props.children,i));return}n.type!==N&&xe(!1),!n.props.index||!n.props.children||xe(!1);let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=vd(n.props.children,i)),r.push(o)}),r}/** 151 * React Router DOM v6.30.1 152 * 153 * Copyright (c) Remix Software Inc. 154 * 155 * This source code is licensed under the MIT license found in the 156 * LICENSE.md file in the root directory of this source tree. 157 * 158 * @license MIT 159 */function xl(){return xl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xl.apply(this,arguments)}function V0(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i<n.length;i++)s=n[i],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function LT(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function DT(t,e){return t.button===0&&(!e||e==="_self")&&!LT(t)}function yd(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,r)=>{let n=t[r];return e.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function $T(t,e){let r=yd(t);return e&&e.forEach((n,s)=>
159{r.has(s)||e.getAll(s).forEach(i=>{r.append(s,i)})}),r}const MT=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],UT=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],zT="6";try{window.__reactRouterVersion=zT}catch{}const FT=g.createContext({isTransitioning:!1}),BT="startTransition",sm=eg[BT];function VT(t){let{basename:e,children:r,future:n,window:s}=t,i=g.useRef();i.current==null&&(i.current=WC({window:s,v5Compat:!0}));let o=i.current,[a,l]=g.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=g.useCallback(h=>{u&&sm?sm(()=>l(h)):l(h)},[l,u]);return g.useLayoutEffect(()=>o.listen(c),[o,c]),g.useEffect(()=>RT(n),[n]),g.createElement(NT,{basename:e,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}const WT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",HT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ws=g.forwardRef(function(e,r){let{onClick:n,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:h}=e,p=V0(e,MT),{basename:f}=g.useContext(Vr),_,y=!1;if(typeof u=="string"&&HT.test(u)&&(_=u,WT))try{let w=new URL(window.location.href),x=u.startsWith("//")?new URL(w.protocol+u):new URL(u),E=di(x.pathname,f);x.origin===w.origin&&E!=null?u=E+x.search+x.hash:y=!0}catch{}let b=mT(u,{relative:s}),v=KT(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:s,viewTransition:h});function m(w){n&&n(w),w.defaultPrevented||v(w)}return g.createElement("a",xl({},p,{href:_||b,onClick:y||i?n:m,ref:r,target:l}))}),VO=g.forwardRef(function(e,r){let{"aria-current":n="page",caseSensitive:s=!1,className:i="",end:o=!1,style:a,to:l,viewTransition:u,children:c}=e,h=V0(e,UT),p=lu(l,{relative:h.relative}),f=Cr(),_=g.useContext($0),{navigator:y,basename:b}=g.useContext(Vr),v=_!=null&>(p)&&u===!0,m=y.encodeLocation?y.encodeLocation(p).pathname:p.pathname,w=f.pathname,x=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;s||(w=w.toLowerCase(),x=x?x.toLowerCase():null,m=m.toLowerCase()),x&&b&&(x=di(x,b)||x);const E=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let S=w===m||!o&&w.startsWith(m)&&w.charAt(E)==="/",k=x!=null&&(x===m||!o&&x.startsWith(m)&&x.charAt(m.length)==="/"),C={isActive:S,isPending:k,isTransitioning:v},T=S?n:void 0,P;typeof i=="function"?P=i(C):P=[i,S?"active":null,k?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let D=typeof a=="function"?a(C):a;return g.createElement(Ws,xl({},h,{"aria-current":T,className:P,ref:r,style:D,to:l,viewTransition:u}),typeof c=="function"?c(C):c)});var wd;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(wd||(wd={}));var im;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(im||(im={}));function qT(t){let e=g.useContext(ou);return e||xe(!1),e}function KT(t,e){let{target:r,replace:n,state:s,preventScrollReset:i,relative:o,viewTransition:a}=e===void 0?{}:e,l=Ei(),u=Cr(),c=lu(t,{relative:o});return g.useCallback(h=>{if(DT(h,r)){h.preventDefault();let p=n!==void 0?n:wl(u)===wl(c);l(t,{replace:p,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,l,c,n,s,r,t,i,o,a])}function W0(t){let e=g.useRef(yd(t)),r=g.useRef(!1),n=Cr(),s=g.useMemo(()=>$T(n.search,r.current?null:e.current),[n.search]),i=Ei(),o=g.useCallback((a,l)=>{const u=yd(typeof a=="function"?a(s):a);r.current=!0,i("?"+u,l)},[i,s]);return[s,o]}function GT(t,e){e===void 0&&(e={});let r=g.useContext(FT);r==null&&xe(!1);let{basename:n}=qT(wd.useViewTransitionState),s=lu(t,{relative:e.relative});if(!r.isTransitioning)return!1;let i=di(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=di(r.nextLocation.pathname,n)||r.nextLocation.pathname;return _l(s.pathname,o)!=null||_l(s.pathname,i)!=null}var Xh={},El={},_d=function(t,e){return _d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])},_d(t,e)};function H0(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");_d(t,e);function r(){this.constructor=t}
vendor: 7,589 bytes, line 159
159t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Sl=function(){return Sl=Object.assign||function(e){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Sl.apply(this,arguments)};function Si(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function q0(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i}function K0(t,e){return function(r,n){e(r,n,t)}}function G0(t,e,r,n,s,i){function o(v){if(v!==void 0&&typeof v!="function")throw new TypeError("Function expected");return v}for(var a=n.kind,l=a==="getter"?"get":a==="setter"?"set":"value",u=!e&&t?n.static?t:t.prototype:null,c=e||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),h,p=!1,f=r.length-1;f>=0;f--){var _={};for(var y in n)_[y]=y==="access"?{}:n[y];for(var y in n.access)_.access[y]=n.access[y];_.addInitializer=function(v){if(p)throw new TypeError("Cannot add initializers after decoration has completed");i.push(o(v||null))};var b=(0,r[f])(a==="accessor"?{get:c.get,set:c.set}:c[l],_);if(a==="accessor"){if(b===void 0)continue;if(b===null||typeof b!="object")throw new TypeError("Object expected");(h=o(b.get))&&(c.get=h),(h=o(b.set))&&(c.set=h),(h=o(b.init))&&s.unshift(h)}else(h=o(b))&&(a==="field"?s.unshift(h):c[l]=h)}u&&Object.defineProperty(u,n.name,c),p=!0}function Q0(t,e,r){for(var n=arguments.length>2,s=0;s<e.length;s++)r=n?e[s].call(t,r):e[s].call(t);return n?r:void 0}function J0(t){return typeof t=="symbol"?t:"".concat(t)}function Y0(t,e,r){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function X0(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function B(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(c){try{u(n.next(c))}catch(h){o(h)}}function l(c){try{u(n.throw(c))}catch(h){o(h)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((n=n.apply(t,e||[])).next())})}function Z0(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,s&&(i=u[0]&2?s.return:u[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,u[1])).done)return i;switch(s=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,s=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(c){u=[6,c],s=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var uu=Object.create?function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]};function ew(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&uu(e,t,r)}function kl(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Zh(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),s,i=[],o;try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i}function tw(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Zh(arguments[e]));return t}function rw(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),s=0,e=0;e<r;e++)for(var i=arguments[e],o=0,a=i.length;o<a;o++,s++)n[s]=i[o];return n}function nw(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,i;n<s;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}function hi(t){return this instanceof hi?(this.v=t,this):new hi(t)}function sw(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),s,i=[];return s=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),s[Symbol.asyncIterator]=function(){return this},s;function o(f){return function(_){return Promise.resolve(_).then(f,h)}}function a(f,_){n[f]&&(s[f]=function(y){return new Promise(function(b,v){i.push([f,y,b,v])>1||l(f,y)})},_&&(s[f]=_(s[f])))}function l(f,_){try{u(n[f](_))}catch(y){p(i[0][3],y)}}function u(f){f.value instanceof hi?Promise.resolve(f.value.v).then(c,h):p(i[0][2],f)}function c(f){l("next",f)}function h(f){l("throw",f)}function p(f,_){f(_),i.shift(),i.length&&l(i[0][0],i[0][1])}}function iw(t){var e,r;return e={},n("next"),n("throw",function(s){throw s}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(s,i){e[s]=t[s]?function(o){return(r=!r)?{value:hi(t[s](o)),done:!1}:i?i(o):o}:i}}function ow(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof kl=="function"?kl(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=t[i]&&function(o){return new Promise(function(a,l){o=t[i](o),s(a,l,o.done,o.value)})}}function s(i,o,a,l){Promise.resolve(l).then(function(u){i({value:u,done:a})},o)}}function aw(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var QT=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},bd=function(t){return bd=Object.getOwnPropertyNames||function(e){var r=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[r.length]=n);return r},bd(t)};function lw(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=bd(t),n=0;n<r.length;n++)r[n]!=="default"&&uu(e,t,r[n]);return QT(e,t),e}function uw(t){return t&&t.__esModule?t:{default:t}}function cw(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");
vendor: 2,411 bytes, line 159
159return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function dw(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r}function hw(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}function fw(t,e,r){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var n,s;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],r&&(s=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(i){return Promise.reject(i)}}),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}var JT=typeof SuppressedError=="function"?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function pw(t){function e(i){t.error=t.hasError?new JT(i,t.error,"An error was suppressed during disposal."):i,t.hasError=!0}var r,n=0;function s(){for(;r=t.stack.pop();)try{if(!r.async&&n===1)return n=0,t.stack.push(r),Promise.resolve().then(s);if(r.dispose){var i=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(i).then(s,function(o){return e(o),s()})}else n|=1}catch(o){e(o)}if(n===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return s()}function mw(t,e){return typeof t=="string"&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,s,i,o){return n?e?".jsx":".js":s&&(!i||!o)?r:s+i+"."+o.toLowerCase()+"js"}):t}const YT={__extends:H0,__assign:Sl,__rest:Si,__decorate:q0,__param:K0,__esDecorate:G0,__runInitializers:Q0,__propKey:J0,__setFunctionName:Y0,__metadata:X0,__awaiter:B,__generator:Z0,__createBinding:uu,__exportStar:ew,__values:kl,__read:Zh,__spread:tw,__spreadArrays:rw,__spreadArray:nw,__await:hi,__asyncGenerator:sw,__asyncDelegator:iw,__asyncValues:ow,__makeTemplateOb
159ject:aw,__importStar:lw,__importDefault:uw,__classPrivateFieldGet:cw,__classPrivateFieldSet:dw,__classPrivateFieldIn:hw,__addDisposableResource:fw,__disposeResources:pw,__rewriteRelativeImportExtension:mw},XT=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:fw,get __assign(){return Sl},__asyncDelegator:iw,__asyncGenerator:sw,__asyncValues:ow,__await:hi,__awaiter:B,__classPrivateFieldGet:cw,__classPrivateFieldIn:hw,__classPrivateFieldSet:dw,__createBinding:uu,__decorate:q0,__disposeResources:pw,__esDecorate:G0,__exportStar:ew,__extends:H0,__generator:Z0,__importDefault:uw,__importStar:lw,__makeTemplateObject:aw,__metadata:X0,__param:K0,__propKey:J0,__read:Zh,__rest:Si,__rewriteRelativeImportExtension:mw,__runInitializers:Q0,__setFunctionName:Y0,__spread:tw,__spreadArray:nw,__spreadArrays:rw,__values:kl,default:YT},Symbol.toStringTag,{value:"Module"})),ZT=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);let cu=class extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}},gw=class extends cu{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}},xd=class extends cu{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}},Ed=class extends cu{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}};var Cl;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Cl||(Cl={}));class eP{constructor(e,{headers:r={},customFetch:n,region:s=Cl.Any}={}){this.url=e,this.headers=r,this.region=s,this.fetch=ZT(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return B(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:u,signal:c,timeout:h}=n;let p={},{region:f}=n;f||(f=this.region);const _=new URL(`${this.url}/${r}`);f&&f!=="any"&&(p["x-region"]=f,_.searchParams.set("forceFunctionRegion",f));let y;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",y=u):typeof u=="string"?(p["Content-Type"]="text/plain",y=u):typeof FormData<"u"&&u instanceof FormData?y=u:(p["Content-Type"]="application/json",y=JSON.stringify(u)):y=u;let b=c;h&&(o=new AbortController,i=setTimeout(()=>o.abort(),h),c?(b=o.signal,c.addEventListener("abort",()=>o.abort())):b=o.signal);const v=yield this.fetch(_.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),a),body:y,signal:b}).catch(E=>{throw new gw(E)}),m=v.headers.get("x-relay-error");if(m&&m==="true")throw new xd(v);if(!v.ok)throw new Ed(v);let w=((s=v.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),x;return w==="application/json"?x=yield v.json():w==="application/octet-stream"||w==="application/pdf"?x=yield v.blob():w==="text/event-stream"?x=v:w==="multipart/form-data"?x=yield v.formData():x=yield v.text(),{data:x,error:null,response:v}}catch(a){return{data:null,error:a,response:a instanceof Ed||a instanceof xd?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const tP=Object.freeze(Object.defineProperty({__proto__:null,get FunctionRegion(){return Cl},FunctionsClient:eP,FunctionsError:cu,FunctionsFetchError:gw,FunctionsHttpError:Ed,FunctionsRelayError:xd},Symbol.toStringTag,{value:"Module"})),vw=Ao(tP);var Ze={};const ki=Ao(XT);var ma={},ga={},va={},ya={},wa={},_a={},om;function yw(){if(om)return _a;om=1,Object.defineProperty(_a,"__esModule",{value:!0});class t extends Error{constructor(r){super(r.message),this.name="PostgrestError",this.details=r.details,this.hint=r.hint,this.co
159de=r.code}}return _a.default=t,_a}var am;function ww(){if(am)return wa;am=1,Object.defineProperty(wa,"__esModule",{value:!0});const e=ki.__importDefault(yw());let r=class{constructor(s){var i,o;this.shouldThrowOnError=!1,this.method=s.method,this.url=s.url,this.headers=new Headers(s.headers),this.schema=s.schema,this.body=s.body,this.shouldThrowOnError=(i=s.shouldThrowOnError)!==null&&i!==void 0?i:!1,this.signal=s.signal,this.isMaybeSingle=(o=s.isMaybeSingle)!==null&&o!==void 0?o:!1,s.fetch?this.fetch=s.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(s,i){return this.headers=new Headers(this.headers),this.headers.set(s,i),this}then(s,i){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");const o=this.fetch;let a=o(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async l=>{var u,c,h,p;let f=null,_=null,y=null,b=l.status,v=l.statusText;if(l.ok){if(this.method!=="HEAD"){const E=await l.text();E===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((u=this.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?_=E:_=JSON.parse(E))}const w=(c=this.headers.get("Prefer"))===null||c===void 0?void 0:c.match(/count=(exact|planned|estimated)/),x=(h=l.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");w&&x&&x.length>1&&(y=parseInt(x[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(_)&&(_.length>1?(f={code:"PGRST116",details:`Results contain ${_.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},_=null,y=null,b=406,v="Not Acceptable"):_.length===1?_=_[0]:_=null)}else{const w=await l.text();try{f=JSON.parse(w),Array.isArray(f)&&l.status===404&&(_=[],f=null,b=200,v="OK")}catch{l.status===404&&w===""?(b=204,v="No Content"):f={message:w}}if(f&&this.isMaybeSingle&&(!((p=f==null?void 0:f.details)===null||p===void 0)&&p.includes("0 rows"))&&(f=null,b=200,v="OK"),f&&this.shouldThrowOnError)throw new e.default(f)}return{error:f,data:_,count:y,status:b,statusText:v}});return this.shouldThrowOnError||(a=a.catch(l=>{var u,c,h,p,f,_;let y="";const b=l==null?void 0:l.cause;if(b){const v=(u=b==null?void 0:b.message)!==null&&u!==void 0?u:"",m=(c=b==null?void 0:b.code)!==null&&c!==void 0?c:"";y=`${(h=l==null?void 0:l.name)!==null&&h!==void 0?h:"FetchError"}: ${l==null?void 0:l.message}`,y+=` 160 161Caused by: ${(p=b==null?void 0:b.name)!==null&&p!==void 0?p:"Error"}: ${v}`,m&&(y+=` (${m})`),b!=null&&b.stack&&(y+=` 162${b.stack}`)}else y=(f=l==null?void 0:l.stack)!==null&&f!==void 0?f:"";return{error:{message:`${(_=l==null?void 0:l.name)!==null&&_!==void 0?_:"FetchError"}: ${l==null?void 0:l.message}`,details:y,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),a.then(s,i)}returns(){return this}overrideTypes(){return this}};return wa.default=r,wa}var lm;function _w(){if(lm)return ya;lm=1,Object.defineProperty(ya,"__esModule",{value:!0});const e=ki.__importDefault(ww());let r=class extends e.default{select(s){let i=!1;const o=(s??"*").split("").map(a=>/\s/.test(a)&&!i?"":(a==='"'&&(i=!i),a)).join("");return this.url.searchParams.set("select",o),this.headers.append("Prefer","return=representation"),this}order(s,{ascending:i=!0,nullsFirst:o,foreignTable:a,referencedTable:l=a}={}){const u=l?`${l}.order`:"order",c=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${c?`${c},`:""}${s}.${i?"asc":"desc"}${o===void 0?"":o?".nullsfirst":".nullslast"}`),this}limit(s,{foreignTable:i,referencedTable:o=i}={}){const a=typeof o>"u"?"limit":`${o}.limit`;return this.url.searchParams.set(a,`${s}`),this}range(s,i,{foreignTable:o,referencedTable:a=o}={}){const l=typeof a>"u"?"offset":`${a}.offset`,u=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(l,`${s}`),this.url.searchParams.set(u,`${i-s+1}`),this}abortSignal(s){return this.signal=s,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
162explain({analyze:s=!1,verbose:i=!1,settings:o=!1,buffers:a=!1,wal:l=!1,format:u="text"}={}){var c;const h=[s?"analyze":null,i?"verbose":null,o?"settings":null,a?"buffers":null,l?"wal":null].filter(Boolean).join("|"),p=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${p}"; options=${h};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(s){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${s}`),this}};return ya.default=r,ya}var um;function ef(){if(um)return va;um=1,Object.defineProperty(va,"__esModule",{value:!0});const e=ki.__importDefault(_w()),r=new RegExp("[,()]");let n=class extends e.default{eq(i,o){return this.url.searchParams.append(i,`eq.${o}`),this}neq(i,o){return this.url.searchParams.append(i,`neq.${o}`),this}gt(i,o){return this.url.searchParams.append(i,`gt.${o}`),this}gte(i,o){return this.url.searchParams.append(i,`gte.${o}`),this}lt(i,o){return this.url.searchParams.append(i,`lt.${o}`),this}lte(i,o){return this.url.searchParams.append(i,`lte.${o}`),this}like(i,o){return this.url.searchParams.append(i,`like.${o}`),this}likeAllOf(i,o){return this.url.searchParams.append(i,`like(all).{${o.join(",")}}`),this}likeAnyOf(i,o){return this.url.searchParams.append(i,`like(any).{${o.join(",")}}`),this}ilike(i,o){return this.url.searchParams.append(i,`ilike.${o}`),this}ilikeAllOf(i,o){return this.url.searchParams.append(i,`ilike(all).{${o.join(",")}}`),this}ilikeAnyOf(i,o){return this.url.searchParams.append(i,`ilike(any).{${o.join(",")}}`),this}regexMatch(i,o){return this.url.searchParams.append(i,`match.${o}`),this}regexIMatch(i,o){return this.url.searchParams.append(i,`imatch.${o}`),this}is(i,o){return this.url.searchParams.append(i,`is.${o}`),this}isDistinct(i,o){return this.url.searchParams.append(i,`isdistinct.${o}`),this}in(i,o){const a=Array.from(new Set(o)).map(l=>typeof l=="string"&&r.test(l)?`"${l}"`:`${l}`).join(",");return this.url.searchParams.append(i,`in.(${a})`),this}contains(i,o){return typeof o=="string"?this.url.searchParams.append(i,`cs.${o}`):Array.isArray(o)?this.url.searchParams.append(i,`cs.{${o.join(",")}}`):this.url.searchParams.append(i,`cs.${JSON.stringify(o)}`),this}containedBy(i,o){return typeof o=="string"?this.url.searchParams.append(i,`cd.${o}`):Array.isArray(o)?this.url.searchParams.append(i,`cd.{${o.join(",")}}`):this.url.searchParams.append(i,`cd.${JSON.stringify(o)}`),this}rangeGt(i,o){return this.url.searchParams.append(i,`sr.${o}`),this}rangeGte(i,o){return this.url.searchParams.append(i,`nxl.${o}`),this}rangeLt(i,o){return this.url.searchParams.append(i,`sl.${o}`),this}rangeLte(i,o){return this.url.searchParams.append(i,`nxr.${o}`),this}rangeAdjacent(i,o){return this.url.searchParams.append(i,`adj.${o}`),this}overlaps(i,o){return typeof o=="string"?this.url.searchParams.append(i,`ov.${o}`):this.url.searchParams.append(i,`ov.{${o.join(",")}}`),this}textSearch(i,o,{config:a,type:l}={}){let u="";l==="plain"?u="pl":l==="phrase"?u="ph":l==="websearch"&&(u="w");const c=a===void 0?"":`(${a})`;return this.url.searchParams.append(i,`${u}fts${c}.${o}`),this}match(i){return Object.entries(i).forEach(([o,a])=>{this.url.searchParams.append(o,`eq.${a}`)}),this}not(i,o,a){return this.url.searchParams.append(i,`not.${o}.${a}`),this}or(i,{foreignTable:o,referencedTable:a=o}={}){const l=a?`${a}.or`:"or";return this.url.searchParams.append(l,`(${i})`),this}filter(i,o,a){return this.url.searchParams.append(i,`${o}.${a}`),this}};return va.default=n,va}var cm;function bw(){if(cm)return ga;cm=1,Object.defineProperty(ga,"__esModule",{value:!0});const e=ki.__importDefault(ef());let r=class{constructor(s,{headers:i={},schema:o,fetch:a}){this.url=s,this.headers=new Headers(i),this.schema=o,this.fetch=a}select(s,i){const{head:o=!1,count:a}=i??{},l=o?"HEAD":"GET";let u=!1;const c=(s??"*").split("").map(h=>/\s/.test(h)&&!u?"":(h==='"'&&(u=!u),h)).join("");return this.url.searchParams.set("select",c),a&&this.headers.append("Prefer",`count=${a}`),new e.default({method:l,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(s,{count:i,defaultToNull:o=!0}={}){var a;const l="POST";if(i&&this.headers.append("Prefer",`count=${i}`),o||this.headers.append("Prefer","missing=default"),Array.isArray(s)){const u=s.reduce((c,h)=>c.concat(Object.keys(h)),[]);if(u.length>0){const c=[...new Set(u)].map(h=>`"${h}"`);this.url.searchParams.set("columns",c.join(","))}}return new e.default({method:l,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch})}upsert(s,{onConflict:i,ignoreDuplicates:o=!1,count:a,defaultToNull:l=!0}={}){var u;const c="POST";if(this.headers.append("Prefer",`resolution=${o?"ignore":"merge"}-duplicates`),i!==void 0&&this.url.searchParams.set("on_conflict",i),a&&this.headers.append("Prefer",`count=${a}`),l||this.headers.append("Prefer","missing=default"),Array.isArray(s)){const h=s.reduce((p,f)=>p.concat(Object.keys(f)),[]);if(h.length>0){const p=[...new Set(h)].map(f=>`"${f}"`);this.url.searchParams.set("columns",p.join(","))}}return new e.default({method:c,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch})}update(s,{count:i}={}){var o;const a="PATCH";return i&&this.headers.append("Prefer",`count=${i}`),new e.default({method:a,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}delete({count:s}={}){var i;const o="DELETE";return s&&this.headers.append("Prefer",`count=${s}`),new e.default({method:o,url:this.url,headers:this.headers,schema:this.schema,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}};return ga.default=r,ga}var dm;function rP(){if(dm)return ma;dm=1,Object.defineProperty(ma,"__esModule",{value:!0});const t=ki,e=t.__importDefault(bw()),r=t.__importDefault(ef());let n=class xw{constructor(i,{headers:o={},schema:a,fetch:l}={}){this.url=i,this.headers=new Headers(o),this.schemaName=a,this.fetch=l}
162from(i){if(!i||typeof i!="string"||i.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");const o=new URL(`${this.url}/${i}`);return new e.default(o,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(i){return new xw(this.url,{headers:this.headers,schema:i,fetch:this.fetch})}rpc(i,o={},{head:a=!1,get:l=!1,count:u}={}){var c;let h;const p=new URL(`${this.url}/rpc/${i}`);let f;a||l?(h=a?"HEAD":"GET",Object.entries(o).filter(([y,b])=>b!==void 0).map(([y,b])=>[y,Array.isArray(b)?`{${b.join(",")}}`:`${b}`]).forEach(([y,b])=>{p.searchParams.append(y,b)})):(h="POST",f=o);const _=new Headers(this.headers);return u&&_.set("Prefer",`count=${u}`),new r.default({method:h,url:p,headers:_,schema:this.schemaName,body:f,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch})}};return ma.default=n,ma}Object.defineProperty(Ze,"__esModule",{value:!0});Ze.PostgrestError=Ze.PostgrestBuilder=Ze.PostgrestTransformBuilder=Ze.PostgrestFilterBuilder=Ze.PostgrestQueryBuilder=Ze.PostgrestClient=void 0;const Ci=ki,Ew=Ci.__importDefault(rP());Ze.PostgrestClient=Ew.default;const Sw=Ci.__importDefault(bw());Ze.PostgrestQueryBuilder=Sw.default;const kw=Ci.__importDefault(ef());Ze.PostgrestFilterBuilder=kw.default;const Cw=Ci.__importDefault(_w());Ze.PostgrestTransformBuilder=Cw.default;const Tw=Ci.__importDefault(ww());Ze.PostgrestBuilder=Tw.default;const Pw=Ci.__importDefault(yw());Ze.PostgrestError=Pw.default;Ze.default={PostgrestClient:Ew.default,PostgrestQueryBuilder:Sw.default,PostgrestFilterBuilder:kw.default,PostgrestTransformBuilder:Cw.default,PostgrestBuilder:Tw.default,PostgrestError:Pw.default};class jw{constructor(){}static detectEnvironment(){var e;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"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"){const r=process.versions;if(r&&r.node){const n=r.node,s=parseInt(n.replace(/^v/,"").split(".")[0]);return s>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${s} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${s} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 163import ws from "ws" 164new 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 e=this.detectEnvironment();if(e.constructor)return e.constructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=` 165 166Suggested solution: ${e.workaround}`),new Error(r)}static createWebSocket(e,r){const n=this.getWebSocketConstructor();return new n(e,r)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const nP="2.86.1",sP=`realtime-js/${nP}`,Aw="1.0.0",iP="2.0.0",hm=Aw,Sd=1e4,oP=1e3,aP=100;var Bn;(function(t){t[t.connecting=0]="connecting",t[t.open=1]="open",t[t.closing=2]="closing",t[t.closed=3]="closed"})(Bn||(Bn={}));var Ae;(function(t){t.closed="closed",t.errored="errored",t.joined="joined",t.joining="joining",t.leaving="leaving"})(Ae||(Ae={}));var Yt;(function(t){t.close="phx_close",t.error="phx_error",t.join="phx_join",t.reply="phx_reply",t.leave="phx_leave",t.access_token="access_token"})(Yt||(Yt={}));var kd;(function(t){t.websocket="websocket"})(kd||(kd={}));var Vn;(function(t){t.Connecting="connecting",t.Open="open",t.Closing="closing",t.Closed="closed"})(Vn||(Vn={}));class lP{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,r){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(e));let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(e){var r;return this._isArrayBuffer((r=e.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var r,n;const s=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(e){var r,n;const s=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(e,r,n){var s,i;const o=e.topic,a=(s=e.ref)!==null&&s!==void 0?s:"",l=(i=e.join_ref)!==null&&i!==void 0?i:"",u=e.payload.event,c=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},h=Object.keys(c).length===0?"":JSON.stringify(c);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const p=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+u.length+h.length,f=new ArrayBuffer(this.HEADER_LENGTH+p);let _=new DataView(f),y=0;_.setUint8(y++,this.KINDS.userBroadcastPush),_.setUint8(y++,l.length),_.setUint8(y++,a.length),_.setUint8(y++,o.length),_.setUint8(y++,u.length),_.setUint8(y++,h.length),_.setUint8(y++,r),Array.from(l,v=>_.setUint8(y++,v.charCodeAt(0))),Array.from(a,v=>_.setUint8(y++,v.charCodeAt(0))),Array.from(o,v=>_.setUint8(y++,v.charCodeAt(0))),Array.from(u,v=>_.setUint8(y++,v.charCodeAt(0))),Array.from(h,v=>_.setUint8(y++,v.charCodeAt(0)));var b=new Uint8Array(f.byteLength+n.byteLength);return b.set(new Uint8Array(f),0),b.set(new Uint8Array(n),f.byteLength),b.buffer}decode(e,r){if(this._isArrayBuffer(e)){let n=this._binaryDecode(e);return r(n)}if(typeof e=="string"){const n=JSON.parse(e),[s,i,o,a,l]=n;return r({join_ref:s,ref:i,topic:o,event:a,payload:l})}return r({})}_binaryDecode(e){const r=new DataView(e),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,r,s)}}_decodeUserBroadcast(e,r,n){const s=r.getUint8(1),i=r.getUint8(2),o=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const u=n.decode(e.slice(l,l+s));l=l+s;const c=n.decode(e.slice(l,l+i));l=l+i;
166const h=n.decode(e.slice(l,l+o));l=l+o;const p=e.slice(l,e.byteLength),f=a===this.JSON_ENCODING?JSON.parse(n.decode(p)):p,_={type:this.BROADCAST_EVENT,event:c,payload:f};return o>0&&(_.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:_}}_isArrayBuffer(e){var r;return e instanceof ArrayBuffer||((r=e==null?void 0:e.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(e,r){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([n])=>r.includes(n)))}}class Rw{constructor(e,r){this.callback=e,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var he;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(he||(he={}));const fm=(t,e,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return e?Object.keys(e).reduce((i,o)=>(i[o]=uP(o,t,e,s),i),{}):{}},uP=(t,e,r,n)=>{const s=e.find(a=>a.name===t),i=s==null?void 0:s.type,o=r[t];return i&&!n.includes(i)?Ow(i,o):Cd(o)},Ow=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return fP(e,r)}switch(t){case he.bool:return cP(e);case he.float4:case he.float8:case he.int2:case he.int4:case he.int8:case he.numeric:case he.oid:return dP(e);case he.json:case he.jsonb:return hP(e);case he.timestamp:return pP(e);case he.abstime:case he.date:case he.daterange:case he.int4range:case he.int8range:case he.money:case he.reltime:case he.text:case he.time:case he.timestamptz:case he.timetz:case he.tsrange:case he.tstzrange:return Cd(e);default:return Cd(e)}},Cd=t=>t,cP=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},dP=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},hP=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch(e){return console.log(`JSON parse error: ${e}`),t}return t},fP=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,n=t[r];if(t[0]==="{"&&n==="}"){let i;const o=t.slice(1,r);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>Ow(e,a))}return t},pP=t=>typeof t=="string"?t.replace(" ","T"):t,Nw=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};class Zu{constructor(e,r,n={},s=Sd){this.channel=e,this.event=r,this.payload=n,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,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()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,r){var n;return this._hasReceived(e)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:e,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}
166_matchReceive({status:e,response:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(r))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var Td;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Td||(Td={}));let Iw=class Ua{constructor(e,r){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Ua.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=Ua.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel._on(n.diff,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Ua.syncDiff(this.state,s,i,o),a())}),this.onJoin((s,i,o)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:i,newPresences:o})}),this.onLeave((s,i,o)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,r,n,s){const i=this.cloneDeep(e),o=this.transformState(r),a={},l={};return this.map(i,(u,c)=>{o[u]||(l[u]=c)}),this.map(o,(u,c)=>{const h=i[u];if(h){const p=c.map(b=>b.presence_ref),f=h.map(b=>b.presence_ref),_=c.filter(b=>f.indexOf(b.presence_ref)<0),y=h.filter(b=>p.indexOf(b.presence_ref)<0);_.length>0&&(a[u]=_),y.length>0&&(l[u]=y)}else a[u]=c}),this.syncDiff(i,{joins:a,leaves:l},n,s)}static syncDiff(e,r,n,s){const{joins:i,leaves:o}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),s||(s=()=>{}),this.map(i,(a,l)=>{var u;const c=(u=e[a])!==null&&u!==void 0?u:[];if(e[a]=this.cloneDeep(l),c.length>0){const h=e[a].map(f=>f.presence_ref),p=c.filter(f=>h.indexOf(f.presence_ref)<0);e[a].unshift(...p)}n(a,c,l)}),this.map(o,(a,l)=>{let u=e[a];if(!u)return;const c=l.map(h=>h.presence_ref);u=u.filter(h=>c.indexOf(h.presence_ref)<0),e[a]=u,s(a,u,l),u.length===0&&delete e[a]}),e}static map(e,r){return Object.getOwnPropertyNames(e).map(n=>r(n,e[n]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((r,n)=>{const s=e[n];return"metas"in s?r[n]=s.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):r[n]=s,r},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}};var Pd;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(Pd||(Pd={}));var Hs;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Hs||(Hs={}));var pr;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(pr||(pr={}));const mP=Ae;let Lw=class Dw{constructor(e,r={config:{}},n){var s,i;if(this.topic=e,this.params=r,this.socket=n,this.bindings={},this.state=Ae.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new Zu(this,Yt.join,this.params,this.timeout),this.rejoinTimer=new Rw(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Ae.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o=>o.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Ae.closed,this.socket._remove(this)}),this._onError(o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Ae.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Ae.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Ae.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Yt.reply,{},(o,a)=>{this._trigger(this._replyEventName(a),o)}),this.presence=new Iw(this),this.broadcastEndpointURL=Nw(this.socket.endPoint),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(e,r=this.timeout){var n,s,i;if(this.socket.isConnected()||this.socket.connect(),this.state==Ae.closed){const{config:{broadcast:o,presence:a,private:l}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(f=>f.filter))!==null&&s!==void 0?s:[],c=!!this.bindings[Hs.PRESENCE]&&this.bindings[Hs.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},p={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:c}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(f=>e==null?void 0:e(pr.CHANNEL_ERROR,f)),this._onClose(()=>e==null?void 0:e(pr.CLOSED)),this.updateJoinPayload(Object.assign({config:p},h)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:f})=>{var _;if(this.socket.setAuth(),f===void 0){e==null||e(pr.SUBSCRIBED);return}else{const y=this.bindings.postgres_changes,b=(_=y==null?void 0:y.length)!==null&&_!==void 0?_:0,v=[];for(let m=0;m<b;m++){const w=y[m],{filter:{event:x,schema:E,table:S,filter:k}}=w,C=f&&f[m];
166if(C&&C.event===x&&C.schema===E&&C.table===S&&C.filter===k)v.push(Object.assign(Object.assign({},w),{id:C.id}));else{this.unsubscribe(),this.state=Ae.errored,e==null||e(pr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=v,e&&e(pr.SUBSCRIBED);return}}).receive("error",f=>{this.state=Ae.errored,e==null||e(pr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(f).join(", ")||"error")))}).receive("timeout",()=>{e==null||e(pr.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,n){return this.state===Ae.joined&&e===Hs.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(e,r,n)}async httpSend(e,r,n={}){var s;const i=this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"";if(r==null)return Promise.reject("Payload is required for httpSend()");const o={method:"POST",headers:{Authorization:i,apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;try{const u=await a.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(e,r={}){var n,s;if(!this._canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
166in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=e,l={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const u=this._push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=Ae.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Yt.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(s=>{n=new Zu(this,Yt.leave,{},e),n.receive("ok",()=>{r(),s("ok")}).receive("timeout",()=>{r(),s("timed out")}).receive("error",()=>{s("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ae.closed,this.bindings={}}async _fetchWithTimeout(e,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),o=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),o}_push(e,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new Zu(this,e,r,n);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(e){if(e.startTimeout(),this.pushBuffer.push(e),this.pushBuffer.length>aP){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(e,r,n){return r}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,r,n){var s,i;const o=e.toLocaleLowerCase(),{close:a,error:l,leave:u,join:c}=Yt;if(n&&[a,l,u,c].indexOf(o)>=0&&n!==this._joinRef())return;let p=this._onMessage(o,r,n);if(r&&!p)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(f=>{var _,y,b;return((_=f.filter)===null||_===void 0?void 0:_.event)==="*"||((b=(y=f.filter)===null||y===void 0?void 0:y.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===o}).map(f=>f.callback(p,n)):(i=this.bindings[o])===null||i===void 0||i.filter(f=>{var _,y,b,v,m,w;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in f){const x=f.id,E=(_=f.filter)===null||_===void 0?void 0:_.event;return x&&((y=r.ids)===null||y===void 0?void 0:y.includes(x))&&(E==="*"||(E==null?void 0:E.toLocaleLowerCase())===((b=r.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))}else{const x=(m=(v=f==null?void 0:f.filter)===null||v===void 0?void 0:v.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return x==="*"||x===((w=r==null?void 0:r.event)===null||w===void 0?void 0:w.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===o}).map(f=>{if(typeof p=="object"&&"ids"in p){const _=p.data,{schema:y,table:b,commit_timestamp:v,type:m,errors:w}=_;p=Object.assign(Object.assign({},{schema:y,table:b,commit_timestamp:v,eventType:m,new:{},old:{},errors:w}),this._getPayloadRecords(_))}f.callback(p,n)})}_isClosed(){return this.state===Ae.closed}_isJoined(){return this.state===Ae.joined}_isJoining(){return this.state===Ae.joining}_isLeaving(){return this.state===Ae.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,r,n){const s=e.toLocaleLowerCase(),i={type:s,filter:r,callback:n};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this}_off(e,r){const n=e.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(s=>{var i;return!(((i=s.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===n&&Dw.isEqual(s.filter,r))})),this}static isEqual(e,r){if(Object.keys(e).length!==Object.keys(r).length)return!1;for(const n in e)if(e[n]!==r[n])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(Yt.close,{},e)}_onError(e){this._on(Yt.error,{},r=>e(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Ae.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=fm(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=fm(e.columns,e.old_record)),r}};const ec=()=>{},ba={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},gP=[1e3,2e3,5e3,1e4],vP=1e4,yP=` 167 addEventListener("message", (e) => { 168 if (e.data.event === "start") { 169 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 170 } 171 });`;let wP=class{constructor(e,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Sd,this.transport=null,this.heartbeatIntervalMs=ba.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=ec,this.ref=0,this.reconnectTimer=null,this.vsn=hm,this.logger=ec,this.conn=null,this.sendBuffer=[],this.serializer
171=new lP,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=s=>s?(...i)=>s(...i):(...i)=>fetch(...i),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${e}/${kd.websocket}`,this.httpEndpoint=Nw(e),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=jw.createWebSocket(this.endpointURL())}catch(e){this._setConnectionState("disconnected");const r=e.message;throw r.includes("Node.js")?new Error(`${r} 172 173To use Realtime in Node.js, you need to provide a WebSocket implementation: 174 175Option 1: Use Node.js 22+ which has native WebSocket support 176Option 2: Install and provide the "ws" package: 177 178 npm install ws 179 180 import ws from "ws" 181 const client = new RealtimeClient(url, { 182 ...options, 183 transport: ws 184 })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(e,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(e?this.conn.close(e,r??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const e=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),e}log(e,r,n){this.logger(e,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case Bn.connecting:return Vn.Connecting;case Bn.open:return Vn.Open;case Bn.closing:return Vn.Closing;default:return Vn.Closed}}isConnected(){return this.connectionState()===Vn.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(e,r={config:{}}){const n=`realtime:${e}`,s=this.getChannels().find(i=>i.topic===n);if(s)return s;{const i=new Lw(`realtime:${e}`,r,this);return this.channels.push(i),i}}push(e){const{topic:r,event:n,payload:s,ref:i}=e,o=()=>{this.encode(e,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${r} ${n} (${i})`,s),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}async sendHeartbeat(){var e;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(e=this.conn)===null||e===void 0||e.close(oP,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
184heduleTimeout()},ba.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let r=this.channels.find(n=>n.topic===e&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${e}"`),r.unsubscribe())}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.topic)}_onConnMessage(e){this.decode(e.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply")try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error")}catch(u){this.log("error","error in heartbeat callback",u)}r.ref&&r.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:n,event:s,payload:i,ref:o}=r,a=o?`(${o})`:"",l=i.status||"";this.log("receive",`${l} ${n} ${s} ${a}`.trim(),i),this.channels.filter(u=>u._isMember(n)).forEach(u=>u._trigger(s,i,o)),this._triggerStateCallbacks("message",r)})}_clearTimer(e){var r;e==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):e==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_teardownConnection(){if(this.conn){if(this.conn.readyState===Bn.open||this.conn.readyState===Bn.connecting)try{this.conn.close()}catch(e){this.log("error","Error closing connection",e)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this.channels.forEach(e=>e.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(r=>{this.log("error","error waiting for auth on connect",r),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this.workerRef.terminate()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(e){var r;this._setConnectionState("disconnected"),this.log("transport","close",e),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.sc
184heduleTimeout(),this._triggerStateCallbacks("close",e)}_onConnError(e){this._setConnectionState("disconnected"),this.log("transport",`${e}`),this._triggerChanError(),this._triggerStateCallbacks("error",e)}_triggerChanError(){this.channels.forEach(e=>e._trigger(Yt.error))}_appendParams(e,r){if(Object.keys(r).length===0)return e;const n=e.match(/\?/)?"&":"?",s=new URLSearchParams(r);return`${e}${n}${s}`}_workerObjectUrl(e){let r;if(e)r=e;else{const n=new Blob([yP],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(e,r=!1){this._connectionState=e,e==="connecting"?this._wasManualDisconnect=!1:e==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(e=null){let r;e?r=e:this.accessToken?r=await this.accessToken():r=this.accessTokenValue,this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(n=>{const s={access_token:r,version:sP};r&&n.updateJoinPayload(s),n.joinedOnce&&n._isJoined()&&n._push(Yt.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this.setAuth().catch(r=>{this.log("error",`error setting auth in ${e}`,r)})}_triggerStateCallbacks(e,r){try{this.stateChangeCallbacks[e].forEach(n=>{try{n(r)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new Rw(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},ba.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(e){var r,n,s,i,o,a,l,u,c,h,p,f;switch(this.transport=(r=e==null?void 0:e.transport)!==null&&r!==void 0?r:null,this.timeout=(n=e==null?void 0:e.timeout)!==null&&n!==void 0?n:Sd,this.heartbeatIntervalMs=(s=e==null?void 0:e.heartbeatIntervalMs)!==null&&s!==void 0?s:ba.HEARTBEAT_INTERVAL,this.worker=(i=e==null?void 0:e.worker)!==null&&i!==void 0?i:!1,this.accessToken=(o=e==null?void 0:e.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(a=e==null?void 0:e.heartbeatCallback)!==null&&a!==void 0?a:ec,this.vsn=(l=e==null?void 0:e.vsn)!==null&&l!==void 0?l:hm,e!=null&&e.params&&(this.params=e.params),e!=null&&e.logger&&(this.logger=e.logger),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=e==null?void 0:e.reconnectAfterMs)!==null&&u!==void 0?u:_=>gP[_-1]||vP,this.vsn){case Aw:this.encode=(c=e==null?void 0:e.encode)!==null&&c!==void 0?c:(_,y)=>y(JSON.stringify(_)),this.decode=(h=e==null?void 0:e.decode)!==null&&h!==void 0?h:(_,y)=>y(JSON.parse(_));break;case iP:this.encode=(p=e==null?void 0:e.encode)!==null&&p!==void 0?p:this.serializer.encode.bind(this.serializer),this.decode=(f=e==null?void 0:e.decode)!==null&&f!==void 0?f:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl}}};const _P=Object.freeze(Object.defineProperty({__proto__:null,REALTIME_CHANNEL_STATES:mP,get REALTIME_LISTEN_TYPES(){return Hs},get REALTIME_POSTGRES_CHANGES_LISTEN_EVENT(){return Pd},get REALTIME_PRESENCE_LISTEN_EVENTS(){return Td},get REALTIME_SUBSCRIBE_STATES(){return pr},RealtimeChannel:Lw,RealtimeClient:wP,RealtimePresence:Iw,WebSocketFactory:jw},Symbol.toStringTag,{value:"Module"})),$w=Ao(_P);class zo extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function ye(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}class Mw extends zo{constructor(e,r,n){super(e),this.name="StorageApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Tl extends zo{constructor(e,r){super(e),this.name="StorageUnknownError",this.originalError=r}}const tf=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),bP=()=>Response,jd=t=>{if(Array.isArray(t))return t.map(r=>jd(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));e[s]=jd(n)}),e},xP=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);
184return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},EP=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),tc=t=>{var e;return t.msg||t.message||t.error_description||(typeof t.error=="string"?t.error:(e=t.error)===null||e===void 0?void 0:e.message)||JSON.stringify(t)},SP=(t,e,r)=>B(void 0,void 0,void 0,function*(){const n=yield bP();t instanceof n&&!(r!=null&&r.noResolveJson)?t.json().then(s=>{const i=t.status||500,o=(s==null?void 0:s.statusCode)||i+"";e(new Mw(tc(s),i,o))}).catch(s=>{e(new Tl(tc(s),s))}):e(new Tl(tc(t),t))}),kP=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"||!n?s:(xP(n)?(s.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),s.body=JSON.stringify(n)):s.body=n,e!=null&&e.duplex&&(s.duplex=e.duplex),Object.assign(Object.assign({},s),r))};function Fo(t,e,r,n,s,i){return B(this,void 0,void 0,function*(){return new Promise((o,a)=>{t(r,kP(e,n,s,i)).then(l=>{if(!l.ok)throw l;return n!=null&&n.noResolveJson?l:l.json()}).then(l=>o(l)).catch(l=>SP(l,a,n))})})}function So(t,e,r,n){return B(this,void 0,void 0,function*(){return Fo(t,"GET",e,r,n)})}function Kt(t,e,r,n,s){return B(this,void 0,void 0,function*(){return Fo(t,"POST",e,n,s,r)})}function Ad(t,e,r,n,s){return B(this,void 0,void 0,function*(){return Fo(t,"PUT",e,n,s,r)})}function CP(t,e,r,n){return B(this,void 0,void 0,function*(){return Fo(t,"HEAD",e,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})}function rf(t,e,r,n,s){return B(this,void 0,void 0,function*(){return Fo(t,"DELETE",e,n,s,r)})}class TP{constructor(e,r){this.downloadFn=e,this.shouldThrowOnError=r}then(e,r){return this.execute().then(e,r)}execute(){return B(this,void 0,void 0,function*(){try{return{data:(yield this.downloadFn()).body,error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(ye(e))return{data:null,error:e};throw e}})}}var Uw;class PP{constructor(e,r){this.downloadFn=e,this.shouldThrowOnError=r,this[Uw]="BlobDownloadBuilder",this.promise=null}asStream(){return new TP(this.downloadFn,this.shouldThrowOnError)}then(e,r){return this.getPromise().then(e,r)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}execute(){return B(this,void 0,void 0,function*(){try{return{data:yield(yield this.downloadFn()).blob(),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(ye(e))return{data:null,error:e};throw e}})}}Uw=Symbol.toStringTag;const jP={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},pm={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class AP{constructor(e,r={},n,s){this.shouldThrowOnError=!1,this.url=e,this.headers=r,this.bucketId=n,this.fetch=tf(s)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(e,r,n,s){return B(this,void 0,void 0,function*(){try{let i;const o=Object.assign(Object.assign({},pm),s);let a=Object.assign(Object.assign({},this.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",this.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",this.encodeMetadata(l))):(i=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),s!=null&&s.headers&&(a=Object.assign(Object.assign({},a),s.headers));const u=this._removeEmptyFolders(r),c=this._getFinalPath(u),h=yield(e=="PUT"?Ad:Kt)(this.fetch,`${this.url}/object/${c}`,i,Object.assign({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:u,id:h.Id,fullPath:h.Key},error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(ye(i))return{data:null,error:i};throw i}})}upload(e,r,n){return B(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,r,n)})}uploadToSignedUrl(e,r,n,s){return B(this,void 0,void 0,function*(){const i=this._removeEmptyFolders(e),o=this._getFinalPath(i),a=new URL(this.url+`/object/upload/sign/${o}`);a.searchParams.set("token",r);try{let l;const u=Object.assign({upsert:pm.upsert},s),c=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",u.cacheControl)):(l=n,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType);const h=yield Ad(this.fetch,a.toString(),l,{headers:c});return{data:{path:i,fullPath:h.Key},error:null}}catch(l){if(this.shouldThrowOnError)throw l;if(ye(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(e,r){return B(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e);const s=Object.assign({},this.headers);r!=null&&r.upsert&&(s["x-upsert"]="true");const i=yield Kt(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:s}),o=new URL(this.url+i.url),a=o.searchParams.get("token");if(!a)throw new zo("No token returned by API");return{data:{signedUrl:o.toString(),path:e,token:a},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(ye(n))return{data:null,error:n};throw n}})}update(e,r,n){return B(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,r,n)})}move(e,r,n){return B(this,void 0,void 0,function*(){try{return{data:yield Kt(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers}),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(ye(s))return{data:null,error:s};throw s}})}copy(e,r,n){return B(this,void 0,void 0,function*(){try{return{data:{path:(yield Kt(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers})).Key},error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(ye(s))return{data:null,error:s};throw s}})}createSignedUrl(e,r,n){return B(this,void 0,void 0,function*(){try{let s=this._getFinalPath(e),i=yield Kt(this.fetch,`${this.url}/object/sign/${s}
184`,Object.assign({expiresIn:r},n!=null&&n.transform?{transform:n.transform}:{}),{headers:this.headers});const o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return i={signedUrl:encodeURI(`${this.url}${i.signedURL}${o}`)},{data:i,error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(ye(s))return{data:null,error:s};throw s}})}createSignedUrls(e,r,n){return B(this,void 0,void 0,function*(){try{const s=yield Kt(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:r,paths:e},{headers:this.headers}),i=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{data:s.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${i}`):null})),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(ye(s))return{data:null,error:s};throw s}})}download(e,r){const s=typeof(r==null?void 0:r.transform)<"u"?"render/image/authenticated":"object",i=this.transformOptsToQueryString((r==null?void 0:r.transform)||{}),o=i?`?${i}`:"",a=this._getFinalPath(e),l=()=>So(this.fetch,`${this.url}/${s}/${a}${o}`,{headers:this.headers,noResolveJson:!0});return new PP(l,this.shouldThrowOnError)}info(e){return B(this,void 0,void 0,function*(){const r=this._getFinalPath(e);try{const n=yield So(this.fetch,`${this.url}/object/info/${r}`,{headers:this.headers});return{data:jd(n),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(ye(n))return{data:null,error:n};throw n}})}exists(e){return B(this,void 0,void 0,function*(){const r=this._getFinalPath(e);try{return yield CP(this.fetch,`${this.url}/object/${r}`,{headers:this.headers}),{data:!0,error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(ye(n)&&n instanceof Tl){const s=n.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:n}}throw n}})}getPublicUrl(e,r){const n=this._getFinalPath(e),s=[],i=r!=null&&r.download?`download=${r.download===!0?"":r.download}`:"";i!==""&&s.push(i);const a=typeof(r==null?void 0:r.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((r==null?void 0:r.transform)||{});l!==""&&s.push(l);let u=s.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}${u}`)}}}remove(e){return B(this,void 0,void 0,function*(){try{return{data:yield rf(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ye(r))return{data:null,error:r};throw r}})}list(e,r,n){return B(this,void 0,void 0,function*(){try{const s=Object.assign(Object.assign(Object.assign({},jP),r),{prefix:e||""});return{data:yield Kt(this.fetch,`${this.url}/object/list/${this.bucketId}`,s,{headers:this.headers},n),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(ye(s))return{data:null,error:s};throw s}})}listV2(e,r){return B(this,void 0,void 0,function*(){try{const n=Object.assign({},e);return{data:yield Kt(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,n,{headers:this.headers},r),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(ye(n))return{data:null,error:n};throw n}})}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,"/")}transformOptsToQueryString(e){const r=[];return e.width&&r.push(`width=${e.width}`),e.height&&r.push(`height=${e.height}`),e.resize&&r.push(`resize=${e.resize}`),e.format&&r.push(`format=${e.format}`),e.quality&&r.push(`quality=${e.quality}`),r.join("&")}}const zw="2.86.1",Fw={"X-Client-Info":`storage-js/${zw}`};class RP{constructor(e,r={},n,s){this.shouldThrowOnError=!1;const i=new URL(e);s!=null&&s.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase.")),this.url=i.href.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},Fw),r),this.fetch=tf(n)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(e){return B(this,void 0,void 0,function*(){try{const r=this.listBucketOptionsToQueryString(e);return{data:yield So(this.fetch,`${this.url}/bucket${r}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ye(r))return{data:null,error:r};throw r}})}getBucket(e){return B(this,void 0,void 0,function*(){try{return{data:yield So(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ye(r))return{data:null,error:r};throw r}})}createBucket(e){return B(this,arguments,void 0,function*(r,n={public:!1}){try{return{data:yield Kt(this.fetch,`${this.url}/bucket`,{id:r,name:r,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(ye(s))return{data:null,error:s};throw s}})}updateBucket(e,r){return B(this,void 0,void 0,function*(){try{return{data:yield Ad(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(ye(n))return{data:null,error:n};throw n}})}emptyBucket(e){return B(this,void 0,void 0,function*(){try{return{data:yield Kt(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ye(r))return{data:null,error:r};throw r}})}deleteBucket(e){return B(this,void 0,void 0,function*(){try{return{data:yield rf(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ye(r))return{data:null,error:r};throw r}})}listBucketOptionsToQueryString(e){const r={};return e&&("limit"in e&&(r.limit=String(e.limit)),"offset"in e&&(r.offset=String(e.offset)),e.search&&(r.search=e.search),e.sortColumn&&(r.sortColumn=e.sortColumn),e.sortOrder&&(r.sortOrder=e.sortOrder)),Object.keys(r).length>0?"?"+new URLSearchParams(r).toString():""}}
184var ko=class extends Error{constructor(t,e){var r;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((r=e.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function OP(t,e,r){const n=new URL(e,t);if(r)for(const[s,i]of Object.entries(r))i!==void 0&&n.searchParams.set(s,i);return n.toString()}async function NP(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function IP(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:o}){const a=OP(t.baseUrl,n,s),l=await NP(t.auth),u=await e(a,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),c=await u.text(),h=(u.headers.get("content-type")||"").includes("application/json"),p=h&&c?JSON.parse(c):c;if(!u.ok){const f=h?p:void 0,_=f==null?void 0:f.error;throw new ko((_==null?void 0:_.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:_==null?void 0:_.type,icebergCode:_==null?void 0:_.code,details:f})}return{status:u.status,headers:u.headers,data:p}}}}function xa(t){return t.join("�")}var LP=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:xa(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(t,e){const r={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${xa(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${xa(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${xa(t.namespace)}`}),!0}catch(e){if(e instanceof ko&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(r){if(r instanceof ko&&r.status===409)return;throw r}}};function vs(t){return t.join("�")}var DP=class{constructor(t,e="",r){this.client=t,this.prefix=e,this.accessDelegation=r}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${vs(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${vs(t.namespace)}/tables`,body:e,headers:r})).data.metadata}async updateTable(t,e){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${vs(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${vs(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${vs(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${vs(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(r){if(r instanceof ko&&r.status===404)return!1;throw r}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(r){if(r instanceof ko&&r.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw r}}},$P=class{constructor(t){var n;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const r=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=IP({baseUrl:r,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(n=t.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new LP(this.client,e),this.tableOps=new DP(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
184async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};class Bw{constructor(e,r={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},Fw),r),this.fetch=tf(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(e){return B(this,void 0,void 0,function*(){try{return{data:yield Kt(this.fetch,`${this.url}/bucket`,{name:e},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ye(r))return{data:null,error:r};throw r}})}listBuckets(e){return B(this,void 0,void 0,function*(){try{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${this.url}/bucket?${n}`:`${this.url}/bucket`;return{data:yield So(this.fetch,s,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ye(r))return{data:null,error:r};throw r}})}deleteBucket(e){return B(this,void 0,void 0,function*(){try{return{data:yield rf(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ye(r))return{data:null,error:r};throw r}})}from(e){if(!EP(e))throw new zo("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");return new $P({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:()=>B(this,void 0,void 0,function*(){return this.headers})},fetch:this.fetch})}}const nf={"X-Client-Info":`storage-js/${zw}`,"Content-Type":"application/json"};class sf extends Error{constructor(e){super(e),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}}function pt(t){return typeof t=="object"&&t!==null&&"__isStorageVectorsError"in t}class za extends sf{constructor(e,r,n){super(e),this.name="StorageVectorsApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Vw extends sf{constructor(e,r){super(e),this.name="StorageVectorsUnknownError",this.originalError=r}}var Rd;(function(t){t.InternalError="InternalError",t.S3VectorConflictException="S3VectorConflictException",t.S3VectorNotFoundException="S3VectorNotFoundException",t.S3VectorBucketNotEmpty="S3VectorBucketNotEmpty",t.S3VectorMaxBucketsExceeded="S3VectorMaxBucketsExceeded",t.S3VectorMaxIndexesExceeded="S3VectorMaxIndexesExceeded"})(Rd||(Rd={}));const du=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),MP=()=>Response,Ww=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},UP=t=>Array.from(new Float32Array(t)),zP=(t,e)=>{if(e!==void 0&&t.float32.length!==e)throw new Error(`Vector dimension mismatch: expected ${e}, got ${t.float32.length}`)},mm=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),FP=(t,e,r)=>B(void 0,void 0,void 0,function*(){if(t&&typeof t=="object"&&"status"in t&&"ok"in t&&typeof t.status=="number"&&!(r!=null&&r.noResolveJson)){const s=t.status||500,i=t;if(typeof i.json=="function")i.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||s+"";e(new za(mm(o),s,a))}).catch(()=>{const o=s+"",a=i.statusText||`HTTP ${s} error`;e(new za(a,s,o))});else{const o=s+"",a=i.statusText||`HTTP ${s} error`;e(new za(a,s,o))}}else e(new Vw(mm(t),t))}),BP=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return n?(Ww(n)?(s.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),s.body=JSON.stringify(n)):s.body=n,Object.assign(Object.assign({},s),r)):s};function VP(t,e,r,n,s,i){return B(this,void 0,void 0,function*(){return new Promise((o,a)=>{t(r,BP(e,n,s,i)).then(l=>{if(!l.ok)throw l;if(n!=null&&n.noResolveJson)return l;const u=l.headers.get("content-type");return!u||!u.includes("application/json")?{}:l.json()}).then(l=>o(l)).catch(l=>FP(l,a,n))})})}function xt(t,e,r,n,s){return B(this,void 0,void 0,function*(){return VP(t,"POST",e,n,s,r)})}class Hw{constructor(e,r={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},nf),r),this.fetch=du(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createIndex(e){return B(this,void 0,void 0,function*(){try{return{data:(yield xt(this.fetch,`${this.url}/CreateIndex`,e,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}})}getIndex(e,r){return B(this,void 0,void 0,function*(){try{return{data:yield xt(this.fetch,`${this.url}/GetIndex`,{vectorBucketName:e,indexName:r},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(pt(n))return{data:null,error:n};throw n}})}listIndexes(e){return B(this,void 0,void 0,function*(){try{return{data:yield xt(this.fetch,`${this.url}/ListIndexes`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}})}deleteIndex(e,r){return B(this,void 0,void 0,function*(){try{return{data:(yield xt(this.fetch,`${this.url}/DeleteIndex`,{vectorBucketName:e,indexName:r},{headers:this.headers}))||{},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(pt(n))return{data:null,error:n};throw n}})}}class qw{constructor(e,r={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},nf),r),this.fetch=du(n)}throwOnError(){return this.shouldThrowOnError=!0,this}putVectors(e){return B(this,void 0,void 0,function*(){try{if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:(yield xt(this.fetch,`${this.url}/PutVectors`,e,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}})}getVectors(e){return B(this,void 0,void 0,function*(){try{return{data:yield xt(this.fetch,`${this.url}/GetVectors`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}})}listVectors(e){return B(this,void 0,void 0,function*(){try{if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
184if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return{data:yield xt(this.fetch,`${this.url}/ListVectors`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}})}queryVectors(e){return B(this,void 0,void 0,function*(){try{return{data:yield xt(this.fetch,`${this.url}/QueryVectors`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}})}deleteVectors(e){return B(this,void 0,void 0,function*(){try{if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:(yield xt(this.fetch,`${this.url}/DeleteVectors`,e,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}})}}class Kw{constructor(e,r={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},nf),r),this.fetch=du(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(e){return B(this,void 0,void 0,function*(){try{return{data:(yield xt(this.fetch,`${this.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}})}getBucket(e){return B(this,void 0,void 0,function*(){try{return{data:yield xt(this.fetch,`${this.url}/GetVectorBucket`,{vectorBucketName:e},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}})}listBuckets(){return B(this,arguments,void 0,function*(e={}){try{return{data:yield xt(this.fetch,`${this.url}/ListVectorBuckets`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}})}deleteBucket(e){return B(this,void 0,void 0,function*(){try{return{data:(yield xt(this.fetch,`${this.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}})}}class Gw extends Kw{constructor(e,r={}){super(e,r.headers||{},r.fetch)}from(e){return new Qw(this.url,this.headers,e,this.fetch)}createBucket(e){const r=Object.create(null,{createBucket:{get:()=>super.createBucket}});return B(this,void 0,void 0,function*(){return r.createBucket.call(this,e)})}getBucket(e){const r=Object.create(null,{getBucket:{get:()=>super.getBucket}});return B(this,void 0,void 0,function*(){return r.getBucket.call(this,e)})}listBuckets(){const e=Object.create(null,{listBuckets:{get:()=>super.listBuckets}});return B(this,arguments,void 0,function*(r={}){return e.listBuckets.call(this,r)})}deleteBucket(e){const r=Object.create(null,{deleteBucket:{get:()=>super.deleteBucket}});return B(this,void 0,void 0,function*(){return r.deleteBucket.call(this,e)})}}class Qw extends Hw{constructor(e,r,n,s){super(e,r,s),this.vectorBucketName=n}createIndex(e){const r=Object.create(null,{createIndex:{get:()=>super.createIndex}});return B(this,void 0,void 0,function*(){return r.createIndex.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName}))})}listIndexes(){const e=Object.create(null,{listIndexes:{get:()=>super.listIndexes}});return B(this,arguments,void 0,function*(r={}){return e.listIndexes.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName}))})}getIndex(e){const r=Object.create(null,{getIndex:{get:()=>super.getIndex}});return B(this,void 0,void 0,function*(){return r.getIndex.call(this,this.vectorBucketName,e)})}deleteIndex(e){const r=Object.create(null,{deleteIndex:{get:()=>super.deleteIndex}});return B(this,void 0,void 0,function*(){return r.deleteIndex.call(this,this.vectorBucketName,e)})}index(e){return new Jw(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}class Jw extends qw{constructor(e,r,n,s,i){super(e,r,i),this.vectorBucketName=n,this.indexName=s}putVectors(e){const r=Object.create(null,{putVectors:{get:()=>super.putVectors}});return B(this,void 0,void 0,function*(){return r.putVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}getVectors(e){const r=Object.create(null,{getVectors:{get:()=>super.getVectors}});return B(this,void 0,void 0,function*(){return r.getVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}listVectors(){const e=Object.create(null,{listVectors:{get:()=>super.listVectors}});return B(this,arguments,void 0,function*(r={}){return e.listVectors.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}queryVectors(e){const r=Object.create(null,{queryVectors:{get:()=>super.queryVectors}});return B(this,void 0,void 0,function*(){return r.queryVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}deleteVectors(e){const r=Object.create(null,{deleteVectors:{get:()=>super.deleteVectors}});return B(this,void 0,void 0,function*(){return r.deleteVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}}class WP extends RP{constructor(e,r={},n,s){super(e,r,n,s)}from(e){return new AP(this.url,this.headers,e,this.fetch)}get vectors(){return new Gw(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new Bw(this.url+"/iceberg",this.headers,this.fetch)}}const HP=Object.freeze(Object.defineProperty({__proto__:null,StorageAnalyticsClient:Bw,StorageApiError:Mw,StorageClient:WP,StorageError:zo,StorageUnknownError:Tl,StorageVectorsApiError:za,StorageVectorsClient:Gw,StorageVectorsError:sf,get StorageVectorsErrorCode(){return Rd},StorageVectorsUnknownError:Vw,VectorBucketApi:Kw,VectorBucketScope:Qw,VectorDataApi:qw,VectorIndexApi:Hw,VectorIndexScope:Jw,isPlainObject:Ww,isStorageError:ye,isStorageVectorsError:pt,normalizeToFloat32:UP,resolveFetch:du,resolveResponse:MP,validateVectorDimension:zP},Symbol.toStringTag,{value:"Module"})),qP=Ao(HP);var Yw={},hu={};
184Object.defineProperty(hu,"__esModule",{value:!0});hu.version=void 0;hu.version="2.86.1";(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_REALTIME_OPTIONS=t.DEFAULT_AUTH_OPTIONS=t.DEFAULT_DB_OPTIONS=t.DEFAULT_GLOBAL_OPTIONS=t.DEFAULT_HEADERS=void 0;const e=hu;let r="";typeof Deno<"u"?r="deno":typeof document<"u"?r="web":typeof navigator<"u"&&navigator.product==="ReactNative"?r="react-native":r="node",t.DEFAULT_HEADERS={"X-Client-Info":`supabase-js-${r}/${e.version}`},t.DEFAULT_GLOBAL_OPTIONS={headers:t.DEFAULT_HEADERS},t.DEFAULT_DB_OPTIONS={schema:"public"},t.DEFAULT_AUTH_OPTIONS={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},t.DEFAULT_REALTIME_OPTIONS={}})(Yw);var Xw={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.fetchWithAuth=t.resolveHeadersConstructor=t.resolveFetch=void 0;const e=s=>s?(...i)=>s(...i):(...i)=>fetch(...i);t.resolveFetch=e;const r=()=>Headers;t.resolveHeadersConstructor=r;const n=(s,i,o)=>{const a=(0,t.resolveFetch)(o),l=(0,t.resolveHeadersConstructor)();return async(u,c)=>{var h;const p=(h=await i())!==null&&h!==void 0?h:s;let f=new l(c==null?void 0:c.headers);return f.has("apikey")||f.set("apikey",s),f.has("Authorization")||f.set("Authorization",`Bearer ${p}`),a(u,Object.assign(Object.assign({},c),{headers:f}))}};t.fetchWithAuth=n})(Xw);var On={};Object.defineProperty(On,"__esModule",{value:!0});On.isBrowser=void 0;On.uuid=KP;On.ensureTrailingSlash=Zw;On.applySettingDefaults=QP;On.validateSupabaseUrl=JP;function KP(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=Math.random()*16|0,r=t=="x"?e:e&3|8;return r.toString(16)})}function Zw(t){return t.endsWith("/")?t:t+"/"}const GP=()=>typeof window<"u";On.isBrowser=GP;function QP(t,e){var r,n;const{db:s,auth:i,realtime:o,global:a}=t,{db:l,auth:u,realtime:c,global:h}=e,p={db:Object.assign(Object.assign({},l),s),auth:Object.assign(Object.assign({},u),i),realtime:Object.assign(Object.assign({},c),o),storage:{},global:Object.assign(Object.assign(Object.assign({},h),a),{headers:Object.assign(Object.assign({},(r=h==null?void 0:h.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return t.accessToken?p.accessToken=t.accessToken:delete p.accessToken,p}function JP(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(Zw(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var fu={};const e_="2.86.1",xs=30*1e3,Od=3,rc=Od*xs,YP="http://localhost:9999",XP="supabase.auth.token",ZP={"X-Client-Info":`gotrue-js/${e_}`},Nd="X-Supabase-Api-Version",t_={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},ej=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,tj=10*60*1e3;let fi=class extends Error{constructor(e,r,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}};function H(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}let r_=class extends fi{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}};function n_(t){return H(t)&&t.name==="AuthApiError"}let rn=class extends fi{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}},Wr=class extends fi{constructor(e,r,n,s){super(e,n,s),this.name=r,this.status=n}},dt=class extends Wr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}};function s_(t){return H(t)&&t.name==="AuthSessionMissingError"}let Mn=class extends Wr{constructor(){super("Auth session or user missing","AuthInvalidToken
184ResponseError",500,void 0)}},Bi=class extends Wr{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}},Vi=class extends Wr{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}};function i_(t){return H(t)&&t.name==="AuthImplicitGrantRedirectError"}let Id=class extends Wr{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}},Pl=class extends Wr{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}};function Fa(t){return H(t)&&t.name==="AuthRetryableFetchError"}let Ld=class extends Wr{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}};function rj(t){return H(t)&&t.name==="AuthWeakPasswordError"}let jl=class extends Wr{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}};const Al="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),gm=` 185\r=`.split(""),nj=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<gm.length;e+=1)t[gm[e].charCodeAt(0)]=-2;for(let e=0;e<Al.length;e+=1)t[Al[e].charCodeAt(0)]=e;return t})();function vm(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(Al[n]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(Al[n]),e.queuedBits-=6}}function o_(t,e,r){const n=nj[t];if(n>-1)for(e.queue=e.queue<<6|n,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function ym(t){const e=[],r=o=>{e.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{oj(o,n,r)};for(let o=0;o<t.length;o+=1)o_(t.charCodeAt(o),s,i);return e.join("")}function sj(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function ij(t,e){for(let r=0;r<t.length;r+=1){let n=t.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(t.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}sj(n,e)}}function oj(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let n=1;n<6;n+=1)if(!(t>>7-n&1)){e.utf8seq=n;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function qs(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};for(let s=0;s<t.length;s+=1)o_(t.charCodeAt(s),r,n);return new Uint8Array(e)}function aj(t){const e=[];return ij(t,r=>e.push(r)),new Uint8Array(e)}function Kn(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};return t.forEach(s=>vm(s,r,n)),vm(null,r,n),e.join("")}function lj(t){return Math.round(Date.now()/1e3)+t}function uj(){return Symbol("auth-callback")}const Fe=()=>typeof window<"u"&&typeof document<"u",In={tested:!1,writable:!1},a_=()=>{if(!Fe())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(In.tested)return In.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),In.tested=!0,In.writable=!0}catch{In.tested=!0,In.writable=!1}return In.writable};function cj(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,i)=>{e[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{e[s]=n}),e}const l_=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),dj=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Es=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},Ln=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return r}},ze=async(t,e)=>{await t.removeItem(e)};class pu{constructor(){this.promise=new pu.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}pu.promiseConstructor=Promise;function nc(t){const e=t.split(".");if(e.length!==3)throw new jl("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!ej.test(e[n]))throw new jl("JWT not in base64url format");return{header:JSON.parse(ym(e[0])),payload:JSON.parse(ym(e[1])),signature:qs(e[2]),raw:{header:e[0],payload:e[1]}}}async function hj(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function fj(t,e){return new Promise((n,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await t(i);if(!e(i,null,o)){n(o);return}}catch(o){if(!e(i,o)){s(o);return}}})()})}function pj(t){return("0"+t.toString(16)).substr(-2)}function mj(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let i=0;i<56;i++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(e),Array.from(e,pj).join("")}async function gj(t){const r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function vj(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code
185challenge method will default to use plain instead of sha256."),t;const r=await gj(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ys(t,e,r=!1){const n=mj();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await Es(t,`${e}-code-verifier`,s);const i=await vj(n);return[i,n===i?"plain":"s256"]}const yj=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function wj(t){const e=t.headers.get(Nd);if(!e||!e.match(yj))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function _j(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function bj(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const xj=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ws(t){if(!xj.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function sc(){const t={};return new Proxy(t,{get:(e,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Ej(t,e){return new Proxy(t,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!e.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(r,n,s)}})}function wm(t){return JSON.parse(JSON.stringify(t))}const Un=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),Sj=[502,503,504];async function _m(t){var e;if(!dj(t))throw new Pl(Un(t),0);if(Sj.includes(t.status))throw new Pl(Un(t),t.status);let r;try{r=await t.json()}catch(i){throw new rn(Un(i),i)}let n;const s=wj(t);if(s&&s.getTime()>=t_["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new Ld(Un(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new dt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new Ld(Un(r),t.status,r.weak_password.reasons);throw new r_(Un(r),t.status||500,n)}const kj=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function G(t,e,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[Nd]||(i[Nd]=t_["2024-01-01"].name),n!=null&&n.jwt&&(i.Authorization=`Bearer ${n.jwt}`);const o=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await Cj(t,e,r+a,{headers:i,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function Cj(t,e,r,n,s,i){const o=kj(e,n,s,i);let a;try{a=await t(r,Object.assign({},o))}catch(l){throw console.error(l),new Pl(Un(l),0)}if(a.ok||await _m(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await _m(l)}}function Wt(t){var e;let r=null;jj(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=lj(t.expires_in)));const n=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:r,user:n},error:null}}function bm(t){const e=Wt(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(e.data.weak_password=t.weak_password),e}function nn(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function Tj(t){return{data:t,error:null}}function Pj(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=t,o=Si(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function xm(t){return t}function jj(t){return t.access_token&&t.refresh_token&&t.expires_in}const Ba=["global","local","others"];let of=class{constructor({url:e="",headers:r={},fetch:n}){this.url=e,this.headers=r,this.fetch=l_(n),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)}}
185async signOut(e,r=Ba[0]){if(Ba.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Ba.join(", ")}`);try{return await G(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(H(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await G(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:nn})}catch(n){if(H(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=Si(e,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await G(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:Pj,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(H(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await G(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:nn})}catch(r){if(H(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await G(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:xm});if(c.error)throw c.error;const h=await c.json(),p=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(_=>{const y=parseInt(_.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(_.split(";")[1].split("=")[1]);u[`${b}Page`]=y}),u.total=parseInt(p)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(H(u))return{data:{users:[]},error:u};throw u}}async getUserById(e){ws(e);try{return await G(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:nn})}catch(r){if(H(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){ws(e);try{return await G(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:nn})}catch(n){if(H(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){ws(e);try{return await G(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:nn})}catch(n){if(H(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){ws(e.userId);try{const{data:r,error:n}=await G(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(H(r))return{data:null,error:r};throw r}}async _deleteFactor(e){ws(e.userId),ws(e.id);try{return{data:await G(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(H(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,n,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await G(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:xm});if(c.error)throw c.error;const h=await c.json(),p=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(_=>{const y=parseInt(_.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(_.split(";")[1].split("=")[1]);u[`${b}Page`]=y}),u.total=parseInt(p)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(H(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(e){try{return await G(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(H(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{return await G(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(H(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{return await G(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(H(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(e){try{return await G(this.fetch,"DELET
185E",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(H(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{return await G(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(H(r))return{data:null,error:r};throw r}}};function Em(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}const zn={debug:!!(globalThis&&a_()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class af extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}let u_=class extends af{};class Aj extends af{}async function c_(t,e,r){zn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const n=new globalThis.AbortController;return e>0&&setTimeout(()=>{n.abort(),zn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async s=>{if(s){zn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,s.name);try{return await r()}finally{zn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,s.name)}}else{if(e===0)throw zn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new u_(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(zn.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null," "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}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"),await r()}}))}const Sm={};async function Rj(t,e,r){var n;const s=(n=Sm[t])!==null&&n!==void 0?n:Promise.resolve(),i=Promise.race([s.catch(()=>null),e>=0?new Promise((o,a)=>{setTimeout(()=>{a(new Aj(`Acquring process lock with name "${t}" timed out`))},e)}):null].filter(o=>o)).catch(o=>{if(o&&o.isAcquireTimeout)throw o;return null}).then(async()=>await r());return Sm[t]=i.catch(async o=>{if(o&&o.isAcquireTimeout)return await s,null;throw o}),await i}function Oj(){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 d_(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function Nj(t){return parseInt(t,16)}function Ij(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}function Lj(t){var e;const{chainId:r,domain:n,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:u,scheme:c,uri:h,version:p}=t;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(p!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${p}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 186`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const f=d_(t.address),_=c?`${c}://${n}`:n,y=t.statement?`${t.statement} 187`:"",b=`${_} wants you to sign in with your Ethereum account: 188${f} 189 190${y}`;let v=`URI: ${h} 191Version: ${p} 192Chain ID: ${r}${o?` 193Nonce: ${o}`:""} 194Issued At: ${i.toISOString()}`;if(s&&(v+=` 195Expiration Time: ${s.toISOString()}`),a&&(v+=` 196Not Before: ${a.toISOString()}`),l&&(v+=` 197Request ID: ${l}`),u){let m=` 198Resources:`;
198for(const w of u){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);m+=` 199- ${w}`}v+=m}return`${b} 200${v}`}class Re extends Error{constructor({message:e,code:r,cause:n,name:s}){var i;super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=s??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}}class Rl extends Re{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function Dj({error:t,options:e}){var r,n,s;const{publicKey:i}=e;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Re({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Re({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Re({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Re({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new Re({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Re({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Re({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Re({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const o=window.location.hostname;if(h_(o)){if(i.rp.id!==o)return new Re({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Re({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Re({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new Re({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Re({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function $j({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Re({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Re({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const n=window.location.hostname;if(h_(n)){if(r.rpId!==n)return new Re({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Re({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Re({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ER
200ROR",cause:t})}return new Re({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class Mj{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const Uj=new Mj;function zj(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:r,excludeCredentials:n}=t,s=Si(t,["challenge","user","excludeCredentials"]),i=qs(e).buffer,o=Object.assign(Object.assign({},r),{id:qs(r.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const u=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:qs(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function Fj(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:r}=t,n=Si(t,["challenge","allowCredentials"]),s=qs(e).buffer,i=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const a=r[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:qs(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function Bj(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t;return{id:t.id,rawId:t.id,response:{attestationObject:Kn(new Uint8Array(t.response.attestationObject)),clientDataJSON:Kn(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Vj(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t,n=t.getClientExtensionResults(),s=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Kn(new Uint8Array(s.authenticatorData)),clientDataJSON:Kn(new Uint8Array(s.clientDataJSON)),signature:Kn(new Uint8Array(s.signature)),userHandle:s.userHandle?Kn(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function h_(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function km(){var t,e;return!!(Fe()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function Wj(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Rl("Browser returned unexpected credential type",e)}:{data:null,error:new Rl("Empty credential response",e)}}catch(e){return{data:null,error:Dj({error:e,options:t})}}}async function Hj(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Rl("Browser returned unexpected credential type",e)}:{data:null,error:new Rl("Empty credential response",e)}}catch(e){return{data:null,error:$j({error:e,options:t})}}}const qj={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},Kj={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Ol(...t){const e=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of t)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))n[i]=o;else if(r(o))n[i]=o;else if(e(o)){const a=n[i];e(a)?n[i]=Ol(a,o):n[i]=Ol(o)}else n[i]=o}return n}function Gj(t,e){return Ol(qj,t,e||{})}function Qj(t,e){return Ol(Kj,t,e||{})}class Jj{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:r,friendlyName:n,signal:s},i){try{const{data:o,error:a}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!o)return{data:null,error:a};const l=s??Uj.createNewAbortSignal();if(o.webauthn.type==="create"){const{user:u}=o.webauthn.credential_options.publicKey;u.name||(u.name=`${u.id}:${n}`),u.displayName||(u.displayName=u.name)}
200switch(o.webauthn.type){case"create":{const u=Gj(o.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:c,error:h}=await Wj({publicKey:u,signal:l});return c?{data:{factorId:e,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:c}},error:null}:{data:null,error:h}}case"request":{const u=Qj(o.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:c,error:h}=await Hj(Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:u,signal:l}));return c?{data:{factorId:e,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:c}},error:null}:{data:null,error:h}}}}catch(o){return H(o)?{data:null,error:o}:{data:null,error:new rn("Unexpected error in challenge",o)}}}async _verify({challengeId:e,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new fi("rpId is required for WebAuthn authentication")};try{if(!km())return{data:null,error:new rn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:e,challengeId:o.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(o){return H(o)?{data:null,error:o}:{data:null,error:new rn("Unexpected error in authenticate",o)}}}async _register({friendlyName:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new fi("rpId is required for WebAuthn registration")};try{if(!km())return{data:null,error:new rn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:e});if(!o)return await this.client.mfa.listFactors().then(c=>{var h;return(h=c.data)===null||h===void 0?void 0:h.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===e&&p.status!=="unverified")}).then(c=>c?this.client.mfa.unenroll({factorId:c==null?void 0:c.id}):void 0),{data:null,error:a};const{data:l,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(o){return H(o)?{data:null,error:o}:{data:null,error:new rn("Unexpected error in register",o)}}}}Oj();const Yj={url:YP,storageKey:XP,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:ZP,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1};async function Cm(t,e,r){return await r()}const _s={};let lf=class Dd{get jwks(){var e,r;return(r=(e=_s[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){_s[this.storageKey]=Object.assign(Object.assign({},_s[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=_s[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){_s[this.storageKey]=Object.assign(Object.assign({},_s[this.storageKey]),{cachedAt:e})}constructor(e){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=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({},Yj),e);if(this.storageKey=i.storageKey,this.instanceID=(r=Dd.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Dd.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&Fe()){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 of({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=l_(i.fetch),this.lock=i.lock||Cm,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,i.lock?this.lock=i.lock:Fe()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=c_:this.lock=Cm,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 Jj(this)}
200,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:a_()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Em(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=Em(this.memoryStorage)),Fe()&&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),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${e_}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let r={},n="none";if(Fe()&&(r=cj(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Fe()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:i}=await this._getSessionFromURL(r,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),i_(i)){const l=(e=i.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return await this._removeSession(),{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(r){return H(r)?this._returnResult({error:r}):this._returnResult({error:new rn("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,s;try{const i=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:Wt}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(H(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(e){var r,n,s;try{let i;if("email"in e){const{email:c,password:h,options:p}=e;let f=null,_=null;this.flowType==="pkce"&&([f,_]=await ys(this.storage,this.storageKey)),i=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:c,password:h,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:f,code_challenge_method:_},xform:Wt})}else if("phone"in e){const{phone:c,password:h,options:p}=e;i=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:h,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},channel:(s=p==null?void 0:p.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:Wt})}else throw new Bi("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await ze(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(await ze(this.storage,`${this.storageKey}-code-verifier`),H(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(e){try{let r;if("email"in e){const{email:i,password:o,options:a}=e;r=await G(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:bm})}else if("phone"in e){const{phone:i,password:o,options:a}=e;r=await G(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:bm})}else throw new Bi("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const i=new Mn;return this._returnResult({data:{user:null,session:null},error:i})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(H(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(e){var r,n,s,i;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:r}=e;switch(r){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(e){var r,n,s,i,o,a,l,u,c,h,p;let f,_;if("message"in e)f=e.message,_=e.signature;else{const{chain:y,wallet:b,statement:v,options:m}=e;let w;if(Fe())if(typeof b=="object")w=b;else{const T=window;if("ethereum"in T&&typeof T.ethereum=="object"&&"request"in T.ethereum&&typeof T.ethereum.request=="function")w=T.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof b!="object"||!(m!=null&&m.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=b}const x=new URL((r=m==null?void 0:m.url)!==null&&r!==void 0?r:window.location.href),E=await w.request({method:"eth_requestAccounts"}).then(T=>T).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!E||E.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const S=d_(E[0]);let k=(n=m==null?void 0:m.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!k){const T=await w.request({method:"eth_chainId"});k=Nj(T)}const C={domain:x.host,address:S,statement:v,uri:x.href,version:"1",chainId:k,nonce:(s=m==null?void 0:m.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=m==null?void 0:m.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=m==null?void 0:m.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=m==null?void 0:m.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=m==null?void 0:m.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(c=m==null?void 0:m.signInWithEthereum)===null||c===void 0?void 0:c.resources};f=Lj(C),_=await w.request({method:"personal_sign",params:[Ij(f),S]})}try{const{data:y,error:b}=await G(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:_}
200,!((h=e.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=e.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Wt});if(b)throw b;if(!y||!y.session||!y.user){const v=new Mn;return this._returnResult({data:{user:null,session:null},error:v})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:b})}catch(y){if(H(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async signInWithSolana(e){var r,n,s,i,o,a,l,u,c,h,p,f;let _,y;if("message"in e)_=e.message,y=e.signature;else{const{chain:b,wallet:v,statement:m,options:w}=e;let x;if(Fe())if(typeof v=="object")x=v;else{const S=window;if("solana"in S&&typeof S.solana=="object"&&("signIn"in S.solana&&typeof S.solana.signIn=="function"||"signMessage"in S.solana&&typeof S.solana.signMessage=="function"))x=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"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=v}const E=new URL((r=w==null?void 0:w.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in x&&x.signIn){const S=await x.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:E.host,uri:E.href}),m?{statement:m}:null));let k;if(Array.isArray(S)&&S[0]&&typeof S[0]=="object")k=S[0];else if(S&&typeof S=="object"&&"signedMessage"in S&&"signature"in S)k=S;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in k&&"signature"in k&&(typeof k.signedMessage=="string"||k.signedMessage instanceof Uint8Array)&&k.signature instanceof Uint8Array)_=typeof k.signedMessage=="string"?k.signedMessage:new TextDecoder().decode(k.signedMessage),y=k.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in x)||typeof x.signMessage!="function"||!("publicKey"in x)||typeof x!="object"||!x.publicKey||!("toBase58"in x.publicKey)||typeof x.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");_=[`${E.host} wants you to sign in with your Solana account:`,x.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1",`URI: ${E.href}`,`Issued At: ${(s=(n=w==null?void 0:w.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((u=w==null?void 0:w.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((h=(c=w==null?void 0:w.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||h===void 0)&&h.length?["Resources",...w.signInWithSolana.resources.map(k=>`- ${k}`)]:[]].join(` 201`);const S=await x.signMessage(new TextEncoder().encode(_),"utf8");if(!S||!(S instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");y=S}}try{const{data:b,error:v}=await G(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:_,signature:Kn(y)},!((p=e.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(f=e.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Wt});if(v)throw v;if(!b||!b.session||!b.user){const m=new Mn;return this._returnResult({data:{user:null,session:null},error:m})}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(H(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(e){const r=await Ln(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{const{data:i,error:o}=await G(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:Wt});if(await ze(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new Mn;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 ze(this.storage,`${this.storageKey}-code-verifier`),H(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(e){try{const{options:r,provider:n,token:s,access_token:i,nonce:o}=e,a=await G(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Wt}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const c=new Mn;return this._returnResult({data:{user:null,session:null},error:c})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(r){if(H(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,n,s,i,o;try{if("email"in e){const{email:a,options:l}=e;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await ys(this.storage,this.storageKey));const{error:h}=await G(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in e){const{phone:a,options:l}=e,{data:u,error:c}=await G(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c})}throw new Bi("You must provide either an email or phone number.")}catch(a){if(await ze(this.storage,`${this.storageKey}-code-verifier`),H(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(e){var r,n;try{let s,i;"options"in e&&(s=(r=e.options)===null||r===void 0?void 0:r.redirectTo,i=(n=e.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:a}=await G(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Wt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(H(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(e){var r,n,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await ys(this.storage,this.storageKey));const u=await G(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:Tj});return!((i=u.data)===null||i===void 0)&&i.url&&Fe()&&!(!((o=e.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await ze(this.storage,`${this.storageKey}-code-verifier`),H(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new dt;const{error:s}=await G(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(e){if(H(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:n,type:s,options:i}=e,{error:o}=await G(this.fetch,"POST",r,{headers:this.headers,body:{email:n,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 e){const{phone:n,type:s,options:i}=e,{data:o,error:a}=await G(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,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 Bi("You must provide either an email or phone number and a type")}catch(r){if(H(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async r=>r))}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}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 e=null;const r=await Ln(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not val
201id"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<rc:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const o=await Ln(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=sc()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};e.user=Ej(e.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:s,error:i}=await this._callRefreshToken(e.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(e){if(e)return await this._getUser(e);await this.initializePromise;const r=await this._acquireLock(-1,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(e){try{return e?await G(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:nn}):await this._useSession(async r=>{var n,s,i;const{data:o,error:a}=r;if(a)throw a;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new dt}:await G(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:nn})})}catch(r){if(H(r))return s_(r)&&(await this._removeSession(),await ze(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:s,error:i}=n;if(i)throw i;if(!s.session)throw new dt;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await ys(this.storage,this.storageKey));const{data:u,error:c}=await G(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:nn});if(c)throw c;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await ze(this.storage,`${this.storageKey}-code-verifier`),H(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new dt;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=nc(e.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(e.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(e.access_token);if(l)throw l;i={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if(H(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:o,error:a}=r;if(a)throw a;e=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new dt;const{data:s,error:i}=await this._callRefreshToken(e.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(r){if(H(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){try{if(!Fe())throw new Vi("No browser detected.");
201if(e.error||e.error_description||e.error_code)throw new Vi(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Id("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Vi("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Id("No code detected.");const{data:m,error:w}=await this._exchangeCodeForSession(e.code);if(w)throw w;const x=new URL(window.location.href);return x.searchParams.delete("code"),window.history.replaceState(window.history.state,"",x.toString()),{data:{session:m.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:u}=e;if(!i||!a||!o||!u)throw new Vi("No session defined in URL");const c=Math.round(Date.now()/1e3),h=parseInt(a);let p=c+h;l&&(p=parseInt(l));const f=p-c;f*1e3<=xs&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${h}s`);const _=p-h;c-_>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",_,p,c):c-_<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",_,p,c);const{data:y,error:b}=await this._getUser(i);if(b)throw b;const v={provider_token:n,provider_refresh_token:s,access_token:i,expires_in:h,expires_at:p,refresh_token:o,token_type:u,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:v,redirectType:e.type},error:null})}catch(n){if(H(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(e){return!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await Ln(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({error:i});const o=(n=s.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:a}=await this.admin.signOut(o,e);if(a&&!(n_(a)&&(a.status===404||a.status===401||a.status===403)))return this._returnResult({error:a})}return e!=="others"&&(await this._removeSession(),await ze(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=uj(),n={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async r=>{var n,s;try{const{data:{session:i},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),console.error(i)}})}async resetPasswordForEmail(e,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await ys(this.storage,this.storageKey,!0));try{return await G(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await ze(this.storage,`${this.storageKey}-code-verifier`),H(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var e;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(r){if(H(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var o,a,l,u,c;const{data:h,error:p}=i;if(p)throw p;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await G(this.fetch,"GET",f,{headers:this.headers,jwt:(c=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(s)throw s;return Fe()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:e.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(H(n))return this._returnResult({data:{provider:e.provider,url:null},error:n});throw n}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:o,provider:a,token:l,access_token:u,nonce:c}=e,h=await G(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:u,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Wt}),{data:p,error:f}=h;return f?this._returnResult({data:{user:null,session:null},error:f}):!p||!p.session||!p.user?this._returnResult({data:{user:null,session:null},error:new Mn}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:f}))}catch(s){if(await ze(this.storage,`${this.storageKey}-code-verifier`),H(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)throw o;
201return await G(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(H(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(e){const r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await fj(async s=>(s>0&&await hj(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await G(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Wt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Fa(i)&&Date.now()+o-n<xs})}catch(n){if(this._debug(r,"error",n),H(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),Fe()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await Ln(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Ln(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Es(this.userStorage,this.storageKey+"-user",o)),s.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:sc()}else if(s&&!s.user&&!s.user){const o=await Ln(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await ze(this.storage,this.storageKey+"-user"),await Es(this.storage,this.storageKey,s)):s.user=sc()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const i=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<rc;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${rc}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Fa(o)||(this._debug(n,"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(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new dt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new pu;const{data:i,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!i.session)throw new dt;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),H(i)){const o={data:null,error:i};return Fa(i)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(e,r,n=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,r)}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(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await ze(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},e),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Es(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=wm(s);await Es(this.storage,this.storageKey,i)}else{const s=wm(r);await Es(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await ze(this.storage,this.storageKey),await ze(this.storage,this.storageKey+"-code-verifier"),await ze(this.storage,this.storageKey+"-user"),this.userStorage&&await ze(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Fe()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
201catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),xs);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}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 e=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-e)/xs);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${xs}ms, refresh threshold is ${Od} ticks`),s<=Od&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof af)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Fe()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,o]=await ys(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);s.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?this._returnResult({data:null,error:i}):await G(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(H(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:l,error:u}=await G(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(e.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(r){if(H(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?Bj(e.webauthn.credential_response):Vj(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:l}=await G(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.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(r){if(H(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=await G(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.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:zj(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:Fj(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(H(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(e){const{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(e=r==null?void 0:r.factors)!==null&&e!==void 0?e:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(){var e,r;const{data:{session:n},error:s}
201=await this.getSession();if(s)return this._returnResult({data:null,error:s});if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:i}=nc(n.access_token);let o=null;i.aal&&(o=i.aal);let a=o;((r=(e=n.user.factors)===null||e===void 0?void 0:e.filter(c=>c.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(a="aal2");const u=i.amr||[];return{data:{currentLevel:o,nextLevel:a,currentAuthenticationMethods:u},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await G(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new dt})})}catch(r){if(H(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new dt});const o=await G(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Fe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(H(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new dt});const o=await G(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Fe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(H(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;return n?this._returnResult({data:null,error:n}):r?await G(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new dt})})}catch(e){if(H(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await G(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new dt})})}catch(r){if(H(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(a=>a.kid===e);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===e),n&&this.jwks_cached_at+tj>s)return n;const{data:i,error:o}=await G(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,n=i.keys.find(a=>a.kid===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:f,error:_}
201=await this.getSession();if(_||!f.session)return this._returnResult({data:null,error:_});n=f.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=nc(n);r!=null&&r.allowExpired||_j(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:f}=await this.getUser(n);if(f)throw f;return{data:{claims:i,header:s,signature:o},error:null}}const c=bj(s.alg),h=await crypto.subtle.importKey("jwk",u,c,!0,["verify"]);if(!await crypto.subtle.verify(c,h,o,aj(`${a}.${l}`)))throw new jl("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if(H(n))return this._returnResult({data:null,error:n});throw n}}};lf.nextInstanceID={};const Xj=of,Zj=lf,eA=Object.freeze(Object.defineProperty({__proto__:null,AuthAdminApi:Xj,AuthApiError:r_,AuthClient:Zj,AuthError:fi,AuthImplicitGrantRedirectError:Vi,AuthInvalidCredentialsError:Bi,AuthInvalidJwtError:jl,AuthInvalidToken
201ResponseError:Mn,AuthPKCEGrantCodeExchangeError:Id,AuthRetryableFetchError:Pl,AuthSessionMissingError:dt,AuthUnknownError:rn,AuthWeakPasswordError:Ld,CustomAuthError:Wr,GoTrueAdminApi:of,GoTrueClient:lf,NavigatorLockAcquireTimeoutError:u_,SIGN_OUT_SCOPES:Ba,isAuthApiError:n_,isAuthError:H,isAuthImplicitGrantRedirectError:i_,isAuthRetryableFetchError:Fa,isAuthSessionMissingError:s_,isAuthWeakPasswordError:rj,lockInternals:zn,navigatorLock:c_,processLock:Rj},Symbol.toStringTag,{value:"Module"})),f_=Ao(eA);Object.defineProperty(fu,"__esModule",{value:!0});fu.SupabaseAuthClient=void 0;const tA=f_;class rA extends tA.AuthClient{constructor(e){super(e)}}fu.SupabaseAuthClient=rA;Object.defineProperty(El,"__esModule",{value:!0});const nA=vw,sA=Ze,iA=$w,oA=qP,Ea=Yw,aA=Xw,Tm=On,lA=fu;let uA=class{constructor(e,r,n){var s,i,o;this.supabaseUrl=e,this.supabaseKey=r;const a=(0,Tm.validateSupabaseUrl)(e);if(!r)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const l=`sb-${a.hostname.split(".")[0]}-auth-token`,u={db:Ea.DEFAULT_DB_OPTIONS,realtime:Ea.DEFAULT_REALTIME_OPTIONS,auth:Object.assign(Object.assign({},Ea.DEFAULT_AUTH_OPTIONS),{storageKey:l}),global:Ea.DEFAULT_GLOBAL_OPTIONS},c=(0,Tm.applySettingDefaults)(n??{},u);this.storageKey=(s=c.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(i=c.global.headers)!==null&&i!==void 0?i:{},c.accessToken?(this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(h,p)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(p)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((o=c.auth)!==null&&o!==void 0?o:{},this.headers,c.global.fetch),this.fetch=(0,aA.fetchWithAuth)(r,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.accessToken&&this.accessToken().then(h=>this.realtime.setAuth(h)).catch(h=>console.warn("Failed to set initial Realtime auth token:",h)),this.rest=new sA.PostgrestClient(new URL("rest/v1",a).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this.storage=new oA.StorageClient(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new nA.FunctionsClient(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,r={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,r,n)}channel(e,r={config:{}}){return this.realtime.channel(e,r)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e,r;if(this.accessToken)return await this.accessToken();const{data:n}=await this.auth.getSession();return(r=(e=n.session)===null||e===void 0?void 0:e.access_token)!==null&&r!==void 0?r:this.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:s,userStorage:i,storageKey:o,flowType:a,lock:l,debug:u,throwOnError:c},h,p){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new lA.SupabaseAuthClient({url:this.authUrl.href,headers:Object.assign(Object.assign({},f),h),storageKey:o,autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:s,userStorage:i,flowType:a,lock:l,debug:u,throwOnError:c,fetch:p,hasCustomAuthorizationHeader:Object.keys(this.headers).some(_=>_.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new iA.RealtimeClient(this.realtimeUrl.href,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r,n)=>{this._handleTokenChanged(r,"CLIENT",n==null?void 0:n.access_token)})}_handleTokenChanged(e,r,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};El.default=uA;(function(t){var e=ms&&ms.__createBinding||(Object.create?function(c,h,p,f){f===void 0&&(f=p);var _=Object.getOwnPropertyDescriptor(h,p);(!_||("get"in _?!h.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return h[p]}}),Object.defineProperty(c,f,_)}:function(c,h,p,f){f===void 0&&(f=p),c[f]=h[p]}),r=ms&&ms.__exportStar||function(c,h){for(var p in c)p!=="default"&&!Object.prototype.hasOwnProperty.call(h,p)&&e(h,c,p)},n=ms&&ms.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};
201Object.defineProperty(t,"__esModule",{value:!0}),t.createClient=t.SupabaseClient=t.FunctionRegion=t.FunctionsError=t.FunctionsRelayError=t.FunctionsFetchError=t.FunctionsHttpError=t.PostgrestError=void 0;const s=n(El);r(f_,t);var i=Ze;Object.defineProperty(t,"PostgrestError",{enumerable:!0,get:function(){return i.PostgrestError}});var o=vw;Object.defineProperty(t,"FunctionsHttpError",{enumerable:!0,get:function(){return o.FunctionsHttpError}}),Object.defineProperty(t,"FunctionsFetchError",{enumerable:!0,get:function(){return o.FunctionsFetchError}}),Object.defineProperty(t,"FunctionsRelayError",{enumerable:!0,get:function(){return o.FunctionsRelayError}}),Object.defineProperty(t,"FunctionsError",{enumerable:!0,get:function(){return o.FunctionsError}}),Object.defineProperty(t,"FunctionRegion",{enumerable:!0,get:function(){return o.FunctionRegion}}),r($w,t);var a=El;Object.defineProperty(t,"SupabaseClient",{enumerable:!0,get:function(){return n(a).default}});const l=(c,h,p)=>new s.default(c,h,p);t.createClient=l;function u(){if(typeof window<"u"||typeof process>"u")return!1;const c=process.version;if(c==null)return!1;const h=c.match(/^v(\d+)\./);return h?parseInt(h[1],10)<=18:!1}u()&&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")})(Xh);const p_=$d(Xh),cA=Vm({__proto__:null,default:p_},[Xh]),{PostgrestError:pN,FunctionsHttpError:mN,FunctionsFetchError:gN,FunctionsRelayError:vN,FunctionsError:yN,FunctionRegion:wN,SupabaseClient:_N,createClient:dA,GoTrueAdminApi:bN,GoTrueClient:xN,AuthAdminApi:EN,AuthClient:SN,navigatorLock:kN,NavigatorLockAcquireTimeoutError:CN,lockInternals:TN,processLock:PN,SIGN_OUT_SCOPES:jN,AuthError:AN,AuthApiError:RN,AuthUnknownError:ON,CustomAuthError:NN,AuthSessionMissingError:IN,AuthInvalidToken
201ResponseError:LN,AuthInvalidCredentialsError:DN,AuthImplicitGrantRedirectError:$N,AuthPKCEGrantCodeExchangeError:MN,AuthRetryableFetchError:UN,AuthWeakPasswordError:zN,AuthInvalidJwtError:FN,isAuthError:BN,isAuthApiError:VN,isAuthSessionMissingError:WN,isAuthImplicitGrantRedirectError:HN,isAuthRetryableFetchError:qN,isAuthWeakPasswordError:KN,RealtimePresence:GN,RealtimeChannel:QN,RealtimeClient:JN,REALTIME_LISTEN_TYPES:YN,REALTIME_POSTGRES_CHANGES_LISTEN_EVENT:XN,REALTIME_PRESENCE_LISTEN_EVENTS:ZN,REALTIME_SUBSCRIBE_STATES:eI,REALTIME_CHANNEL_STATES:tI}=p_||cA;function hA(){var b,v;if(typeof window>"u")return;const t=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(m=>t===m||t.endsWith("."+m)),n="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=r?((b=t.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+n+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:b[1])??((v=t.match(new RegExp("^("+n+")(?=[.-])","i")))==null?void 0:v[1]):void 0,i=window.parent&&window.parent!==window;if(!s||!i)return localStorage;const o=t.endsWith(".lovableproject-dev.com")||t.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:""),u=l&&a.test(l)?[l]:o?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],c="lovable-preview-auth:result",h=2e3,p=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),f=(m,w,x)=>new Promise(E=>{const S=p();let k=!1,C;const T=I=>{k||(k=!0,clearTimeout(C),window.removeEventListener("message",P),E(I))},P=I=>{if(u.indexOf(I.origin)<0)return;const M=I.data;M&&M.type===c&&M.requestId===S&&T(M)};window.addEventListener("message",P);const D={type:m,requestId:S,projectId:s,key:w};x!==void 0&&(D.value=x);for(const I of u)window.parent.postMessage(D,I);C=setTimeout(()=>T(null),h)});let _=!0;const y=250;return{getItem:async m=>{let w=await f("lovable-preview-auth:get",m);return!w&&_&&(await new Promise(x=>setTimeout(x,y)),w=await f("lovable-preview-auth:get",m)),_=!1,w&&w.ok&&typeof w.value=="string"?w.value===""?(localStorage.removeItem(m),null):w.value:localStorage.getItem(m)},setItem:(m,w)=>(localStorage.setItem(m,w),f("lovable-preview-auth:set",m,w).then(x=>{x&&x.ok&&typeof x.value=="string"&&localStorage.getItem(m)===w&&(x.value===""?localStorage.removeItem(m):localStorage.setItem(m,x.value))})),removeItem:m=>(localStorage.removeItem(m),f("lovable-preview-auth:remove",m).then(()=>{}))}}const fA="https://raykutefprtxgahvjozq.supabase.co",pA="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJheWt1dGVmcHJ0eGdhaHZqb3pxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjQ4NTUwOTksImV4cCI6MjA4MDQzMTA5OX0.XVYpv5G8kg8aCbNZaMnBVC1Kcu0ni_DdpxQfy_wh91M",de=dA(fA,pA,{auth:{storage:hA(),persistSession:!0,autoRefreshToken:!0}}),m_=g.createContext(void 0);function mA({children:t}){const[e,r]=g.useState(null),[n,s]=g.useState(null),[i,o]=g.useState(!0);g.useEffect(()=>{const c=()=>{const p=localStorage.getItem("rememberMe"),f=localStorage.getItem("rememberMeExpiry");return p&&f&&Date.now()>parseInt(f)?(localStorage.removeItem("rememberMe"),localStorage.removeItem("rememberMeExpiry"),de.auth.signOut(),!0):!1};de.auth.getSession().then(({data:{session:p}})=>{p&&c()?(s(null),r(null)):(s(p),r((p==null?void 0:p.user)??null)),o(!1)});const{data:{subscription:h}}=de.auth.onAuthStateChange((p,f)=>{s(f),r((f==null?void 0:f.user)??null),o(!1)});return()=>h.unsubscribe()},[]);const a=async(c,h)=>{const{error:p}=await de.auth.signInWithPassword({email:c,password:h});return{error:p}},l=async(c,h)=>{const{error:p}=await de.auth.signUp({email:c,password:h});return{error:p}},u=async()=>{localStorage.removeItem("rememberMe"),localStorage.removeItem("rememberMeExpiry"),await de.auth.signOut()};return d.jsx(m_.Provider,{value:{user:e,session:n,loading:i,signIn:a,signUp:l,signOut:u},children:t})}function gA(){const t=g.useContext(m_);if(t===void 0)throw new Error("useAuth must be used within an AuthProvider");return t}const vA=()=>{const t=Cr(),e=t.pathname.startsWith("/admin");return g.useEffect(()=>{e||(function(r,n,s,i){var u;if(r.fbq)return;const o=r.fbq=function(){o.callMethod?o.callMethod.apply(o,arguments):o.queue.push(arguments)};r._fbq||(r._fbq=o),o.push=o,o.loaded=!0,o.version="2.0",o.queue=[];const a=n.createElement(s);a.async=!0,a.src=i;const l=n.getElementsByTagName(s)[0];(u=l==null?void 0:l.parentNode)==null||u.insertBefore(a,l)}(window,document,"script","https://connect.facebook.net/en_US/fbevents.js"),window.fbq("init","1493569328350947"),window.fbq("track","PageView"))},[e,t.pathname]),e?null:d.jsx("noscript",{children:d.jsx("img",{height:"1",width:"1",style:{display:"none"},src:"https://www.facebook.com/tr?id=1493569328350947&ev=PageView&noscript=1",alt:""})})},yA=()=>{const t=Cr(),e=t.pathname.startsWith("/admin"),r=t.pathname.startsWith("/campaign");return g.useEffect(()=>{if(e||r||document.getElementById("hs-script-loader"))return;const n=document.createElement("script");n.type="text/javascript",n.id="hs-script-loader",n.async=!0,n.defer=!0,n.src="//js-eu1.hs-scripts.com/145225814.js",document.body.appendChild(n)},[e,r]),null},uf="/assets/aniara-logo-B1CGAa3F.png",wA=()=>{let t=localStorage.getItem("visitor_id");return t||(t=crypto.randomUUID(),localStorage.setItem("visitor_id",t)),t},Pm=t=>{de.from("home_contact_clicks").insert({visitor_id:wA(),source:t}),typeof window.fbq=="function"&&window.fbq("track","Contact",{content_name:t})},_A=()=>{const[t,e]=g.useState(!1),r=Cr(),n=Ei(),s=[{label:"Our Services",href:"#services",isAnchor:!0},{label:"For Authors",href:"#authors",isAnchor:!0},{label:"For Agents",href:"#agents",isAnchor:!0},{label:"For Publishers",href:"#publishers",isAnchor:!0},{label:"About us",href:"#about",isAnchor:!0},{label:"Get in Touch",href:"/get-in-touch",isAnchor:!1}],i=(o,a)=>{a.isAnchor&&r.pathname!=="/"&&(o.preventDefault(),n("/"+a.href))};return d.jsx("header",{className:"fixed top-0 left-0 right-0 z-50 bg-background/95 backdrop-blur-sm",children:d.jsxs("nav",{className:"container mx-auto px-6 py-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("div",{className:"flex items-center",children:d.jsx(Ws,{to:"/",children:d.jsx("img",{src:uf,alt:"ANIARA",className:"h-8 cursor-pointer"})})}),d.jsx("div",{className:"hidden md:flex items-center space-x-10",children:s.map(o=>o.isAnchor?d.jsx("a",{href:o.href,onClick:a=>i(a,o),className:"text-sm font-sans text-foreground hover:text-foreground
201/70 transition-colors",children:o.label},o.label):d.jsx(Ws,{to:o.href,onClick:()=>{o.href==="/get-in-touch"&&Pm("header_nav")},className:"text-sm font-sans text-foreground hover:text-foreground/70 transition-colors",children:o.label},o.label))}),d.jsx("button",{className:"md:hidden",onClick:()=>e(!t),"aria-label":"Toggle menu",children:t?d.jsx($y,{size:24}):d.jsx(y1,{size:24})})]}),t&&d.jsx("div",{className:"md:hidden mt-4 pb-4 space-y-3",children:s.map(o=>o.isAnchor?d.jsx("a",{href:o.href,onClick:a=>{i(a,o),e(!1)},className:"block text-sm font-medium text-foreground hover:text-accent transition-colors",children:o.label},o.label):d.jsx(Ws,{to:o.href,className:"block text-sm font-medium text-foreground hover:text-accent transition-colors",onClick:()=>{o.href==="/get-in-touch"&&Pm("header_nav_mobile"),e(!1)},children:o.label},o.label))})]})})},bA=()=>d.jsx("footer",{className:"bg-background text-foreground py-8 border-t",children:d.jsx("div",{className:"container mx-auto px-6",children:d.jsxs("div",{className:"max-w-6xl mx-auto flex items-center justify-between",children:[d.jsx("img",{src:uf,alt:"ANIARA",className:"h-8"}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx("a",{href:"https://www.instagram.com/aniara.one/",target:"_blank",rel:"noopener noreferrer",className:"hover:opacity-70 transition-opacity","aria-label":"Instagram",children:d.jsx(p1,{className:"h-5 w-5"})}),d.jsx("a",{href:"https://www.linkedin.com/company/aniara-press",target:"_blank",rel:"noopener noreferrer",className:"hover:opacity-70 transition-opacity","aria-label":"LinkedIn",children:d.jsx(m1,{className:"h-5 w-5"})})]})]})})}),xA=()=>{let t=localStorage.getItem("visitor_id");return t||(t=crypto.randomUUID(),localStorage.setItem("visitor_id",t)),t},EA=()=>{const t=navigator.userAgent;return/tablet|ipad|playbook|silk/i.test(t)?"tablet":/mobile|iphone|ipod|android|blackberry|opera mini|iemobile/i.test(t)?"mobile":"desktop"},SA=()=>{const t=g.useRef(Date.now()),e=g.useRef(0),r=g.useRef(null);return g.useEffect(()=>{(async()=>{try{const o=xA(),a=EA(),l=document.referrer||null,u=navigator.userAgent,{data:c}=await de.from("get_in_touch_page_views").insert({visitor_id:o,referrer:l,user_agent:u,device_type:a}).select("id").single();c&&(r.current=c.id)}catch(o){console.error("Failed to track page view:",o)}})();const s=()=>{const o=document.documentElement.scrollHeight-window.innerHeight,a=window.scrollY,l=o>0?Math.round(a/o*100):100;e.current=Math.max(e.current,l)};window.addEventListener("scroll",s);const i=async()=>{if(r.current){const o=Math.round((Date.now()-t.current)/1e3);await de.from("get_in_touch_page_views").update({time_on_page:o,max_scroll_depth:e.current}).eq("id",r.current)}};return window.addEventListener("beforeunload",i),()=>{window.removeEventListener("scroll",s),window.removeEventListener("beforeunload",i),i()}},[]),g.useEffect(()=>{const n=document.createElement("script");return n.src="//js-eu1.hsforms.net/forms/embed/v2.js",n.charset="utf-8",n.type="text/javascript",n.async=!0,n.onload=()=>{window.hbspt&&window.hbspt.forms.create({portalId:"145225814",formId:"038ded89-4566-4f41-9ce8-6e8783c0694a",region:"eu1",target:"#hubspot-form-container",onFormSubmitted:()=>{typeof window.fbq=="function"&&window.fbq("track","Lead",{content_name:"Get In Touch Form"})}})},document.body.appendChild(n),()=>{document.body.contains(n)&&document.body.removeChild(n)}},[]),d.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[d.jsx(_A,{}),d.jsx("main",{className:"flex-1 pt-32 pb-20",children:d.jsxs("div",{className:"container mx-auto px-6 max-w-4xl",children:[d.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-center mb-8",children:"Let's Get in touch"}),d.jsx("p",{className:"text-lg text-center mb-12 max-w-2xl mx-auto",children:"Many authors and IP-owners (agents and publishers too) wants to join Aniara right now and the ship is almost at full capacity. Sign up here to join the list and we will contact you as soon as humanly possible with a personal invite."}),d.jsx("div",{id:"hubspot-form-container",className:"max-w-2xl mx-auto"})]})}),d.jsx(bA,{})]})},kA={"december-25":{id:"december-25",name:"December 2025 Campaign",landingPages:{"fiction-bundle":{id:"fiction-bundle",headline:"Start reading or listening now",books:[{title:"The Unrest of My Heart",coverImage:"/campaign-covers/unrest-of-my-heart.jpg?v=2",readLinks:[{label:"Amazon",url:"https://amazon.com"}],listenLinks:[{label:"Spotify",url:"https://spotify.com"}]},{title:"What We Talk About on Sundays",coverImage:"/campaign-covers/what-we-talk-about-on-sundays.jpg?v=2",readLinks:[{label:"Amazon",url:"https://amazon.com"}],listenLinks:[{label:"Spotify",url:"https://spotify.com"}]},{title:"Ten Good Deeds",coverImage:"/campaign-covers/ten-good-deeds.jpg?v=2",readLinks:[{label:"Amazon",url:"https://amazon.com"}],listenLinks:[{label:"Spotify",url:"https://spotify.com"}]}]},"unrest-of-my-heart":{id:"unrest-of-my-heart",headline:"Start reading or listening now",books:[{title:"The Unrest of My Heart",coverImage:"/campaign-covers/unrest-of-my-heart.jpg?v=2",readLinks:[{label:"Amazon",url:"https://amazon.com"}],listenLinks:[{label:"Spotify",url:"https://spotify.com"}]}]},"ten-good-deeds":{id:"ten-good-deeds",headline:"Start reading or listening now",books:[{title:"Ten Good Deeds",coverImage:"/campaign-covers/ten-good-deeds.jpg?v=2",readLinks:[{label:"Amazon",url:"https://amazon.com"}],listenLinks:[{label:"Spotify",url:"https://spotify.com"}]}]}}}},jm=()=>{let t=localStorage.getItem("visitor_id");return t||(t=crypto.randomUUID(),localStorage.setItem("visitor_id",t)),t},CA=()=>{const t=navigator.userAgent;return/tablet|ipad|playbook|silk/i.test(t)?"tablet":/mobile|iphone|ipod|android|blackberry|opera mini|iemobile/i.test(t)?"mobile":"desktop"};function TA(){const t=g.useCallback(async r=>{try{const n=jm(),s=CA(),i=document.referrer||null,o=navigator.userAgent;await de.from("page_views").insert({landing_page_id:r,visitor_id:n,referrer:i,user_agent:o,device_type:s})}catch(n){console.error("Failed to track page view:",n)}},[]),e=g.useCallback(async(r,n,s,i)=>{try{const o=jm();await de.from("link_clicks").insert({book_link_id:r,landing_page_id:n,visitor_id:o}),typeof window.fbq=="function"&&window.fbq("trackCustom","BookLinkClick",{link_id:r,landing_page_id:n,link_label:s,link_type:i})}catch(o){console.error("Failed to track link click:",o)}},[]);return{trackPageView:t,trackLinkClick:e}}const rs="data:image/png;
201base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAABuCAYAAACgLRjpAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA44SURBVHgB7Z1vbttGFsAfKSlI6yygAG3+AAVKnyDaE4TeA2zSPcBauUDi7JcFkrRWiibAftk4e4BG2QOsnT1ATZ8g7gVqfQjgxm7hfGi7WcvS9D2RimX6zXBmSP2j5gcoVsghORo+vjfvzZshgCM3e3trdXBY4YMjN5cuLTXAYYUTwJwcHbXqvR44AbTECWBO3r/vNnzfvwEOK5wA5qRS8W7jnxAcVjgBzM9NABEcHj4MwWGME8AcvHnTor7foP/X7zstaIMTwBzUat214XfP8+65cIw5TgAt2d9vBSh0qyOb6h9/vLQGDiOcAFri+91WepvTguY4AbSAHI6U9htSx6D0Oji08cBhBJneSqW7jU0XyMp4nlj59NMnETgycRrQkGr15JlK+AghvE0SVHBk4gTQgMPDL58JAbc1itZJSzohzMaZYE1i4ROGXq7o9Hq1levXWx1wsDgBzGBvr1VfWjrZBOvhNtHBzxdXrjzdBcc5nAlWQN7u0lL3NeQa6/UCbObXh4ePnHfM4DQgA/XdyNnQ7O8ZIDq+D61PPnnyEhwDnACOQBoPx3SbkhhfgThBHLLQAkiazvf/38CwSej73q2s8ErReB68Q4GPKhWx1e+L7xexn7hQAjgMi1Srvc99XzQogwVvfAM1XgDT5R1+dvv9/vee50f9fhUF8X9w/fo/OlByqrBAVCrH9UTLdPCzg5/ntH1//+84ulEJ0Vm4BzCx9HrUfv2XqH23rl8/P2qS5Bd2oOQslADizSan4pyZSzRNmz4HBw/IJK+Nqx+IscQO/mldvSrv/9E8k263F8ACsDACGN/Uk5tZ5RIN2Xzz5sFGreZtFmieUeOJx9euPdnIKkjzTHA8eSEmOi1MHPD4+CQEA/P62WdPd1FLLaPGegz5iXq97h91hI+oVKCBTlHmw1IGFigQLcj81k3nbqAQtjAe+AXEjoIx2M97fuXKNytmDsXAI28sQm7hwggghjwGGqXXE8bB5atXv9lCUVoBQyEk7Xnt2lOj8ePEUw/p+0cfLTWh5CyEAKJj0RzG+HzfX7XRLHHfUF8ISfhIe4Ih6KmHw+9xbLLcLIgG9AuZu0FCSI5EVjnUtls2wpccPTpmHJZ9umfpBTDWfmeTCfLM3Ugcieey/RRmOTnp3gcLfv750b30aAyGhEqdxLAAGpC9gbnmbtRq1RbITXHLZgSD+n7YP+U0c/jjjw9LO9uu1AIYp0B5AbePgs225u3y5RYKX5/
201RcqKtCjCrUKX6Y19wvazZ1aUVQDJnGD5pqcrg/he2Nxb7g+1kVOMDvd6JVcyQHpSM1C9K8d8sY1imlAJIw2n9vlr4Yrwgz41FZ2O0LxjZmN6ffvpqNetBSa7WWFr6wzMoGaUTQBI+z/O38aZqChXd2KVtGyGs1WptSPqCqA3bYAgJHwaq2/pHiObBwZcvoESUSgDphpoJ35CBEL42NcdxXzBObvjtt19fmRxLZtdM+IaQED58XZY+YSnyAWni0KVLvXXzWWtpzDOVURjWaOiMhtt0ysd1PXmRP92/HJOd5l4DDicO5Rc+wgv6fa+NQqXtnBwf1yJKJNUpSzFJFL69YuaaeAFNdjKp6ywytxqQBC8J0oYwNkS716s9Vs3rjdeI7t5ErSk1wW/fPrqNDgslu4YwFgbeeJRV11lkrgQwjtsN0pTWzPt5uYh8X7Rl8zZIA43e+NjMdhuU+FCp+KvTqGu3W9uZB2GcSQEkj/TixTretC6GSURAY7moQRoTvpEsNJGI0ugx6rfT612IaBul+vd6Xn1YV5iZNaNJM/rRsK6zKJBzowGH8zbQy71V/HzdTD7M33j//tfd5eUNZUYMhYJgkPw6DWEUHWyflzTbTqeu02Yu+4BDYaQ+4JhntGG/SjzmJg3pQnX1/WoTv67Oel2nwdyHYcizHIMgFn4zyVk5Pu7SZKeis1siGpee13BMKeKAiZZpFTGTDR2N+7pzN2xI6rpdwAOjPclplinVxPS3bx+2bDUMJRZ43uQCu3nr2u+frJRh4nrpVkbY33/QxNCH0XjptG6ojRBiXXdx2G9l1p0LXUq5NIeJEE5bm5gIYdmEjyjt2jCURez7Xlb60juarzttU3Zw8Ij6cfdUZcpkdkcp9eJEh4ePNlUxQ7ypTdsM5qJBIaSFMBuy/figLJdxsaJSp+RXq9U7IJ27YZ8+Pw5QwKST32mKZ1lXyiq1AMrmbpA5s02fHxckYFivc7PtqK72Uzxnn9LPiqO5GzAI1p7h5SxqlAsXatQXTGvBFpSYBZmYLs6kSmFnvg0zCGnsUS2YaL9SL+O7EAI4OneD+n6z3J9KtOAAdKCeQ8lZCAFMNMtAC3oezLRGSeaZRPRdiJMtKDkLtDqWiOjvPLxEEB+WHfx3dxHWiF4YAazVLpA2iWAOoFw+YJYSLiMLI4CJGd6BOeDixdouCqHWRKd5Z6Fe1eX786EB6WHx/bjLUHYWSgB/+aU2N2at17tQmoQDh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+EoJ0arYwlBryGQrvq+5XmecRo5njPEPwGzK8LzdcD8fPQqB25FLLZ+tEIWFHftZHV8Ftv2UZ1Txbvks2tzXUV96E8Acjmwajvdi9M7cmW0wALFObfBAnpIJOcLJeU5mmAB1VnIWQMLqF1FfuhVZs9ErEBygeegzx3Ftb4zOZ/2pKSk8qpFwG9CsYSikPe/TQahtg7ELZgepEGpLX/AeuZdpZ+s5l3Ffrpv2i8UMpkVF2btFxItk4P1Ip7aCZH18pxxtI8pJDykUb8FC8Sp+W1kXENbcZgIoM6TU/QbjOhJmpcXNN/TKFN0+9jStLQuJFw6cnAXNKnqFBJyRyHNKvVZiuz0QmKK8ZwbMKOYtA8YaAcF1L5ZK2fdgFhTBcw+EqSvsN5ti3ul09WqU5vguSMoAsE7ChF+jpjtzQLOneZI1xSLKTghkt+wKfj2CQ3PzTkhe5rH0meFyjPn6AsDLSjkzgede5vZ/gw00DXBXAeaLsAtdZb7bUUMM2uKRdzh5n4zaSiufYp+VZcU1ED0h6IJf4LzK6/SThPHkcr/mdke4edrZvuq0HBGMgUw0QbpE3Xwx9F6e9z6dUZekAGz6hVz/bpOYn4m2T4siRB28MO9UPsGaCBOnY/0b6Ud9JDtwnkBp9/YhAx0NCD3dEf0T9LIXB8ir6BEwC9Pti5mzyueRvuYQoLCrbZl8iCEzLbOyG9Ma3uZxjyDUgCFPLY1ejGuM6zjEWZxh9k2U6ZY0T7PJd+H5I0JCigGXQEcOC3M9n/DaX04DUvaXhWyydSA3JPaSXk3baZMXeSMeeE1SANyr1KYJVPcYrZ1kroPiZgyDTHZmCAJ0OfM9g5kkJjfEM5707SjPTh5bOYj4PuZytBTlgByT+oZVZuM+0VMudxaEM/dgtk2xVwnvjX6n+RhjZhyk44JcveyA9mQELHdjNSYLwkkp+2VMUGpAAp5bKvNbJOp3yI62zNpihPnLGB27WhuWxUTcEYSDUaed5DehZ//ahzLeflD5yMNt01pDVUasMlsk2U6tJltWl5QFok5u8/smrYp5jSKrH02mG2Z7ZMIgBVJ3C6EOAwjC/1sQTYyTX3moRrxtqNUOeXoCSuAQp540ObKJ9H0iNlVyAB8MgoSMbumYoqTa3I3ps2VH0P7XE6Cv7IPBapJekn4Qsk5vtZImyLh+Suz/ZXkWJlWNbOGZF4ET6A45rbkmDDjWtwowjZTjkY4jrLKigmMhCjap644Zk1yTKA4pqh0rDT/gQySay8zx9IIyi3FMZcl12xxx8hMMKcyX2U8MRHwMa9COtvJtWfFK+baJ2tctQ18+zRhsmxgPf+iUU5mOoeDEOcPiM2wVNsLpktxTgBFHLcJmBMoO/1J47NDc6KgzvYsmGIhd86Ub2BK2oe7cdqZIzmJ8LOC9bhvcMxNyXlUkJT9i9lOchWmN3IaUBb7Y6U+BdeprYNdSrkM7h3Ak/SKm8y2jmbmR5vZljtmqsEm1m9FNzsl0VRkuYL0LjgNPquIQGIN01qQE0AbqR+gGHoqbAB+mqY40eSs9wsaSNpHNsqgYs9jgPh+cpr4tqGQy5yPzAdtxAzLElXOWMMzAijksS2leUnBBSMLHYBXmWLQy8uzhbQC9ztM3mrJtWWjoPYh9UIPp7WQC3niAaGj/Yb14CymOvQk1JNq8tKSXFPLC2aOk3nFe5Lrh5LzcDQn3D5sbp6Qe8E/KNpFdgxdI9MhFNmTjvKyLUbMsD96QyF73kceVqFAFKY4gDEw5vbRyhwxgDQypwX/KbI1rU2XwIQQRqzIqAluwnghjRVCgShM8ThowXgJi2ifpA92BHy3YBkUqWBCnnhQNB/qMCqAhWooCYXEBFNwXvE4MMketoEkp8ipmySAHWb7XYUWlCUeFM2HRJXBpCQhj23tgv3NDeD8OVdFwZOWyBTjOckUa81BsCHpOwXMrnG0z+O87UNaEM9DWpBS5dNTMC9DbGL/NrpRnCYecA/BYIUFsIMLw52dtCTkE4MCsETIh6vWUuWsnBDmettCTSg5jqOZKrMpKWfluYq4o3+fOd+ZYS5h4YSkruNJ2oWu02DqdCerTha/UzY0tzksFEgKbEEO6OYIvbHbogRQ5hUPCSXHcTRT5+WwDnyL0xvD1fe7VLk8AjicFSdU10nKyoRV61oZ9eDOS7+9Tn3AUHJcrpEFxdBTKDLStC2v1wHeK85LKNluEhs9w0iwljNrhcVMRzKVI8l1Qvoi1AsOcceawuYJ4qdJAshlLusOvWXRlmwfhzMyLq9YNiAfQT7ornPTGY2Wtsh5nW9Hvq9LjtUNPqsga8r1a2/9DlLMXFneBIEfAAAAAElFTkSuQmCC";function PA({isbn:t,backgroundColor:e="#f7f9fd",buyButtonBg:r="#287d00",buyButtonText:n="#ffffff",onInteraction:s}){const i=g.useRef(null),o=g.useRef(!1),a=g.useCallback(()=>{o.current||(o.current=!0,s==null||s(t),typeof window.fbq=="function"&&(window.fbq("track","AddToCart",{content_ids:[t],content_type:"product"}),window.fbq("trackCustom","PublitEmbedInteraction",{isbn:t})))},[t,s]);return g.useEffect(()=>{if(!i.current)return;i.current.innerHTML="";const l=document.createElement("script");return l.async=!0,l.setAttribute("loading","lazy"),l.src="https://webshop.publit.com/publit-webshop-1.0.js",l.textContent=JSON.stringify({id:"5473",type:"button",isbn:t,theme:{backgroundColor:e,buyButton:{backgroundColor:r,textColor:n}},details:["all"]}),i.current.appendChild(l),()=>{i.current&&(i.current.innerHTML="")}},[t,e,r,n]),g.useEffect(()=>{o.current=!1},[t]),d.jsx("div",{ref:i,className:"w-full cursor-pointer",onClick:a})}const jA={bg_color_from:"240 6% 6%",bg_color_to:"0 0% 0%",text_primary:"0 0% 100%",text_secondary:"0 0% 60%",text_muted:"0 0% 40%",text_accent:"142 71% 45%",btn_read_bg:"38 100% 50%",btn_read_text:"0 0% 0%",btn_read_hover:"38 100% 55%",btn_listen_bg:"142 71% 45%",btn_listen_text:"0 0% 100%",btn_listen_hover:"142 71% 50%",label_buy:"Buy it at",label_stream:"Stream it at",label_tagline:"Discover your next favorite",label_footer:"Available worldwide ⢠Instant access",
201show_logo:!0,show_tagline:!0,show_footer:!0,card_style:"none",logo_opacity:85,logo_url:null,logo_link_url:null},ic=t=>{if(!t)return"#";try{const e=t.trim();return/^https?:\/\//i.test(e)||/^mailto:/i.test(e)?e:"#"}catch{return"#"}};function AA(){var k;const{campaignId:t,pageId:e}=z0(),[r,n]=g.useState(null),[s,i]=g.useState(jA),[o,a]=g.useState(!0),[l,u]=g.useState(!1),[c,h]=g.useState(!1),[p,f]=g.useState(null),{trackPageView:_,trackLinkClick:y}=TA(),b=g.useRef(!1);if(g.useEffect(()=>{const C=document.createElement("meta");return C.name="robots",C.content="noindex, nofollow",document.head.appendChild(C),()=>{document.head.removeChild(C)}},[]),g.useEffect(()=>{async function C(){if(!t||!e){console.error("CampaignLanding: Missing campaignId or pageId",{campaignId:t,pageId:e}),u(!0),a(!1);return}try{const{data:T,error:P}=await de.from("campaigns").select("id, archived").eq("slug",t).maybeSingle();if(P&&(console.error("CampaignLanding: Error fetching campaign",P),f(`Failed to load campaign: ${P.message}`)),T){if(T.archived){h(!0),a(!1);return}const{data:I,error:M}=await de.from("landing_pages").select(` 202 id, 203 headline, 204 template, 205 description, 206 archived, 207 books ( 208 id, 209 title, 210 cover_image_url, 211 sort_order, 212 isbn, 213 book_links ( 214 id, 215 link_type, 216 label, 217 url, 218 sort_order 219 ) 220 ) 221 `).eq("campaign_id",T.id).eq("slug",e).maybeSingle();if(M&&(console.error("CampaignLanding: Error fetching landing page",M),f(`Failed to load page: ${M.message}`)),I){if(I.archived){h(!0),a(!1);return}const R=(I.books||[]).sort((W,Q)=>W.sort_order-Q.sort_order).map(W=>({...W,book_links:(W.book_links||[]).sort((Q,j)=>Q.sort_order-j.sort_order)}));n({id:I.id,headline:I.headline,template:I.template||"classic",description:I.description||null,books:R}),b.current||(b.current=!0,_(I.id),typeof window.fbq=="function"&&window.fbq("track","ViewContent",{content_name:I.headline,content_category:t,content_ids:R.map(W=>W.isbn||W.id),content_type:"product"}));const{data:V}=await de.from("custom_templates").select("*").eq("slug",I.template||"classic").maybeSingle();V&&i(V),a(!1);return}}const D=kA[t];if(D&&D.landingPages[e]){const I=D.landingPages[e];n({id:I.id,headline:I.headline,template:"classic",description:null,books:I.books.map((M,R)=>({id:`static-${R}`,title:M.title,cover_image_url:M.coverImage,book_links:[...M.readLinks.map((V,W)=>({id:`read-${R}-${W}`,link_type:"read",label:V.label,url:V.url})),...M.listenLinks.map((V,W)=>({id:`listen-${R}-${W}`,link_type:"listen",label:V.label,url:V.url}))]}))}),a(!1);return}console.error("CampaignLanding: Campaign/page not found",{campaignId:t,pageId:e}),u(!0),a(!1)}catch(T){console.error("CampaignLanding: Unexpected error",T),f(`Unexpected error: ${T instanceof Error?T.message:"Unknown"}`),a(!1)}}C()},[t,e]),o)return d.jsx("div",{className:"min-h-screen flex items-center justify-center",style:{background:`linear-gradient(to bottom, hsl(${s.bg_color_from}), hsl(${s.bg_color_to}))`},children:d.jsx("div",{style:{color:`hsl(${s.text_muted})`},children:"Loading..."})});if(p)return d.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-gray-900 to-black flex flex-col items-center justify-center px-6 text-center",children:[d.jsx("img",{src:rs,alt:"Aniara",className:"h-12 mb-8 opacity-60"}),d.jsx("h1",{className:"text-2xl font-serif text-white mb-4",children:"Something went wrong"}),d.jsx("p",{className:"text-gray-400 mb-8 max-w-md",children:"We couldn't load this page. Please try refreshing or check back later."}),d.jsx("button",{onClick:()=>window.location.reload(),className:"px-6 py-3 bg-white text-gray-900 rounded-full font-medium hover:bg-gray-100 transition-colors",children:"Try again"})]});if(l||!r)return d.jsx(OT,{to:"/",replace:!0});if(c)return d.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-gray-900 to-black flex flex-col items-center justify-center px-6 text-center",children:[d.jsx("img",{src:rs,alt:"Aniara",className:"h-12 mb-8 opacity-60"}),d.jsx("h1",{className:"text-3xl font-serif text-white mb-4",children:"This campaign has ended"}),d.jsx("p",{className:"text-gray-400 mb-8 max-w-md",children:"Sorry! This campaign is no longer available. But don't worry â there are more stories waiting for you!"}),d.jsx("a",{href:"https://aniara.one",className:"px-6 py-3 bg-white text-gray-900 rounded-full font-medium hover:bg-gray-100 transition-colors",children:"Discover more stories"})]});const v=C=>`hsl(${C})`,m=C=>C.book_links.filter(T=>T.link_type==="read"),w=C=>C.book_links.filter(T=>T.link_type==="listen"),S=parseInt(((k=s.text_primary.split(" ")[2])==null?void 0:k.replace("%",""))||"100")>50?rs:uf;return d.jsxs("div",{className:"min-h-screen",style:{background:`linear-gradient(to bottom, ${v(s.bg_color_from)}, ${v(s.bg_color_to)})`,color:v(s.text_primary)},children:[d.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-96 h-96 rounded-full blur-3xl pointer-events-none opacity-10",style:{backgroundColor:v(s.btn_listen_bg)}}),d.jsx("div",{className:"relative px-4 py-6 md:py-16",children:d.jsxs("div",{className:`mx-auto ${r.books.some(C=>
221C.isbn)?"max-w-lg":"max-w-md"}`,children:[s.show_logo&&d.jsx("div",{className:"flex justify-center mb-3 md:mb-6 animate-fade-in",children:s.logo_link_url?d.jsx("a",{href:ic(s.logo_link_url),target:"_blank",rel:"noopener noreferrer",children:d.jsx("img",{src:s.logo_url||S,alt:"Logo",className:"h-5 md:h-6 hover:opacity-80 transition-opacity cursor-pointer",style:{opacity:(s.logo_opacity??60)/100}})}):d.jsx("img",{src:s.logo_url||S,alt:"Logo",className:"h-5 md:h-6",style:{opacity:(s.logo_opacity??60)/100}})}),d.jsxs("div",{className:"text-center mb-6 md:mb-14 animate-fade-in",children:[s.show_tagline&&d.jsx("p",{className:"text-[10px] md:text-xs uppercase tracking-[0.3em] mb-2 md:mb-4",style:{color:v(s.text_muted)},children:s.label_tagline}),d.jsx("h1",{className:"font-serif text-3xl md:text-5xl leading-[1.1] tracking-tight",children:r.headline.split(/\*([^*]+)\*/).map((C,T)=>T%2===0?C:d.jsx("em",{style:{color:`hsl(${s.text_accent||s.btn_listen_bg})`},children:C},T))})]}),r.description&&d.jsx("div",{className:"mb-8 md:mb-12 animate-fade-in",style:{animationDelay:"300ms",animationFillMode:"both"},children:d.jsx("div",{className:"text-sm md:text-base leading-relaxed space-y-4",style:{color:v(s.text_secondary)},children:r.description.split(` 222 223`).map((C,T)=>{const P=C.startsWith('"')||C.startsWith("â");return d.jsx("p",{className:P?"italic text-xs md:text-sm mt-6 border-l-2 pl-4":"",style:P?{borderColor:v(s.text_accent||s.btn_listen_bg),color:v(s.text_muted)}:void 0,children:C},T)})})}),d.jsx("div",{className:"space-y-6 md:space-y-10",children:r.books.map((C,T)=>d.jsxs("div",{className:`animate-fade-in ${C.isbn?"":"flex gap-3 md:gap-5 items-center"} ${s.card_style==="glass"?"bg-white/10 backdrop-blur-md rounded-2xl p-4 border border-white/20":s.card_style==="solid"?"bg-white rounded-2xl p-4 shadow-sm border border-gray-100":""}`,style:{animationDelay:`${(T+1)*150}ms`,animationFillMode:"both",color:s.card_style==="solid"?v(s.text_primary):void 0},children:[!C.isbn&&d.jsx("div",{className:"flex-shrink-0 w-24 md:w-32 group",children:d.jsx("div",{className:"relative",children:d.jsx("img",{src:C.cover_image_url,alt:C.title,className:"w-full h-auto shadow-2xl transition-transform duration-300 group-hover:scale-105"})})}),d.jsx("div",{className:C.isbn?"w-full":"flex-1 self-center space-y-1.5 md:space-y-2",children:C.isbn?d.jsx(PA,{isbn:C.isbn,onInteraction:P=>console.log("Publit embed interaction:",P)}):d.jsxs(d.Fragment,{children:[m(C).length>0&&d.jsxs("div",{children:[d.jsx("p",{className:"text-[10px] md:text-[11px] uppercase tracking-[0.2em] mb-1 md:mb-1.5",style:{color:v(s.text_secondary)},children:s.label_buy}),d.jsx("div",{className:"space-y-1.5 md:space-y-2",children:m(C).map(P=>d.jsx("a",{href:ic(P.url),target:"_blank",rel:"noopener noreferrer",onClick:()=>y(P.id,r.id,P.label,"read"),className:`block w-full py-2.5 md:py-3 px-4 md:px-6 text-center text-xs md:text-sm font-semibold 224 rounded-full transition-all duration-200 hover:-translate-y-0.5`,style:{backgroundColor:v(s.btn_read_bg),color:v(s.btn_read_text)},onMouseEnter:D=>{D.currentTarget.style.backgroundColor=v(s.btn_read_hover),D.currentTarget.style.boxShadow=`0 10px 25px -5px ${v(s.btn_read_bg)}40`},onMouseLeave:D=>{D.currentTarget.style.backgroundColor=v(s.btn_read_bg),D.currentTarget.style.boxShadow="none"},children:P.label},P.id))})]}),w(C).length>0&&d.jsxs("div",{children:[d.jsx("p",{className:"text-[10px] md:text-[11px] uppercase tracking-[0.2em] mb-1 md:mb-1.5",style:{color:v(s.text_secondary)},children:s.label_stream}),d.jsx("div",{className:"space-y-1.5 md:space-y-2",children:w(C).map(P=>d.jsx("a",{href:ic(P.url),target:"_blank",rel:"noopener noreferrer",onClick:()=>y(P.id,r.id,P.label,"listen"),className:`block w-full py-2.5 md:py-3 px-4 md:px-6 text-center text-xs md:text-sm font-semibold 225 rounded-full transition-all duration-200 hover:-translate-y-0.5`,style:{backgroundColor:v(s.btn_listen_bg),color:v(s.btn_listen_text)},onMouseEnter:D=>{D.currentTarget.style.backgroundColor=v(s.btn_listen_hover),D.currentTarget.style.boxShadow=`0 10px 25px -5px ${v(s.btn_listen_bg)}40`},onMouseLeave:D=>{D.currentTarget.style.backgroundColor=v(s.btn_listen_bg),D.currentTarget.style.boxShadow="none"},children:P.label},P.id))})]})]})})]},C.id))}),s.show_footer&&d.jsx("div",{className:"mt-8 md:mt-16 pt-6 md:pt-8 border-t text-center animate-fade-in",style:{borderColor:`${v(s.text_muted)}30`,animationDelay:"600ms",animationFillMode:"both"},children:d.jsx("p",{className:"text-[10px] md:text-[11px] uppercase tracking-[0.2em]",style:{color:v(s.text_muted)},children:s.label_footer})})]})})]})}const RA=Dh("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"}}),pi=g.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,...s},i)=>{const o=n?vE:"button";return d.jsx(o,{className:tt(RA({variant:e,size:r,className:t})),ref:i,...s})});pi.displayName="Button";const Co=g.forwardRef(({className:t,type:e,...r},n)=>d.jsx("input",{type:e,className:tt("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:n,...r}));Co.displayName="Input";function OA(t){const e=g.useRef({value:t,previous:t});return g.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var mu="Checkbox",[NA,rI]=$o(mu),[IA,cf]=NA(mu);function LA(t){const{__scopeCheckbox:e,checked:r,children:n,defaultChecked:s,disabled:i,form:o,name:a,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:h}=t,[p,f]=hy({prop:r,defaultProp:s??!1,onChange:l,caller:mu}),[_,y]=g.useState(null),[b,v]=g.useState(null),m=g.useRef(!1),w=_?!!o||!!_.closest("form"):!0,x={checked:p,disabled:i,setChecked:f,control:_,setControl:y,name:a,form:o,value:c,hasConsumerStoppedPropagationRef:m,required:u,defaultChecked:xn(s)?!1:s,isFormControl:w,bubbleInput:b,setBubbleInput:v};return d.jsx(IA,{scope:e,...x,children:DA(h)?h(x):n})}var g_="CheckboxTrigger",v_=g.forwardRef(({__scopeCheckbox:t,onKeyDown:e,onClick:r,...n},s)=>{const{control:i,value:o,disabled:a,checked:l,required:u,setControl:c,setChecked:h,hasConsumerStoppedPropagationRef:p,isFormControl:f,bubbleInput:_}=cf(g_,t),y=Tt(s,c),b=g.useRef(l);return g.useEffect(()=>{const v=i==null?void 0:i.form;if(v){const m=()=>h(b.current);return v.addEventListener("reset",m),()=>v.removeEventListener("reset",m)}},[i,h]),d.jsx(Ue.button,{type:"button",role:"checkbox","aria-checked":xn(l)?"mixed":l,"aria-required":u,"data-state":x_(l),"data-disabled":a?"":void 0,disabled:a,value:o,...n,ref:y,onKeyDown:Pe(e,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:Pe(r,v=>{h(m=>xn(m)?!0:!m),_&&f&&(p.current=v.isPropagationStopped(),p.current||v.stopPropagation())})})});v_.displayName=g_;var df=g.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l,onCheckedChange:u,form:c,...h}=t;return d.jsx(LA,{__scopeCheckbox:r,checked:s,defaultChecked:i,disabled:a,required:o,onCheckedChange:u,name:n,form:c,value:l,internal_do_not_use_render:({isFormControl:p})=>d.jsxs(d.Fragment,{children:[d.jsx(v_,{...h,ref:e,__scopeCheckbox:r}),p&&d.jsx(b_,{__scopeCheckbox:r})]})})});df.displayName=mu;var y_="CheckboxIndicator",w_=g.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,i=cf(y_,r);return d.jsx(Jl,{present:n||xn(i.checked)||i.checked===!0,children:d.jsx(Ue.span,{"data-state":x_(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});
225w_.displayName=y_;var __="CheckboxBubbleInput",b_=g.forwardRef(({__scopeCheckbox:t,...e},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:i,defaultChecked:o,required:a,disabled:l,name:u,value:c,form:h,bubbleInput:p,setBubbleInput:f}=cf(__,t),_=Tt(r,f),y=OA(i),b=o0(n);g.useEffect(()=>{const m=p;if(!m)return;const w=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(w,"checked").set,S=!s.current;if(y!==i&&E){const k=new Event("click",{bubbles:S});m.indeterminate=xn(i),E.call(m,xn(i)?!1:i),m.dispatchEvent(k)}},[p,y,i,s]);const v=g.useRef(xn(i)?!1:i);return d.jsx(Ue.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??v.current,required:a,disabled:l,name:u,value:c,form:h,...e,tabIndex:-1,ref:_,style:{...e.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});b_.displayName=__;function DA(t){return typeof t=="function"}function xn(t){return t==="indeterminate"}function x_(t){return xn(t)?"indeterminate":t?"checked":"unchecked"}const E_=g.forwardRef(({className:t,...e},r)=>d.jsx(df,{ref:r,className:tt("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:d.jsx(w_,{className:tt("flex items-center justify-center text-current"),children:d.jsx(Dy,{className:"h-4 w-4"})})}));E_.displayName=df.displayName;var $A="Label",S_=g.forwardRef((t,e)=>d.jsx(Ue.label,{...t,ref:e,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));S_.displayName=$A;var k_=S_;const MA=Dh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ks=g.forwardRef(({className:t,...e},r)=>d.jsx(k_,{ref:r,className:tt(MA(),t),...e}));Ks.displayName=k_.displayName;var UA=Object.defineProperty,zA=Object.defineProperties,FA=Object.getOwnPropertyDescriptors,Nl=Object.getOwnPropertySymbols,C_=Object.prototype.hasOwnProperty,T_=Object.prototype.propertyIsEnumerable,Am=(t,e,r)=>e in t?UA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,BA=(t,e)=>{for(var r in e||(e={}))C_.call(e,r)&&Am(t,r,e[r]);if(Nl)for(var r of Nl(e))T_.call(e,r)&&Am(t,r,e[r]);return t},VA=(t,e)=>zA(t,FA(e)),WA=(t,e)=>{var r={};for(var n in t)C_.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Nl)for(var n of Nl(t))e.indexOf(n)<0&&T_.call(t,n)&&(r[n]=t[n]);return r};function HA(t){let e=setTimeout(t,0),r=setTimeout(t,10),n=setTimeout(t,50);return[e,r,n]}function qA(t){let e=g.useRef();return g.useEffect(()=>{e.current=t}),e.current}var KA=18,P_=40,GA=`${P_}px`,QA=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function JA({containerRef:t,inputRef:e,pushPasswordManagerStrategy:r,isFocused:n}){let[s,i]=g.useState(!1),[o,a]=g.useState(!1),[l,u]=g.useState(!1),c=g.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&s&&o,[s,o,r]),h=g.useCallback(()=>{let p=t.current,f=e.current;if(!p||!f||l||r==="none")return;let _=p,y=_.getBoundingClientRect().left+_.offsetWidth,b=_.getBoundingClientRect().top+_.offsetHeight/2,v=y-KA,m=b;document.querySelectorAll(QA).length===0&&document.elementFromPoint(v,m)===p||(i(!0),u(!0))},[t,e,l,r]);return g.useEffect(()=>{let p=t.current;if(!p||r==="none")return;function f(){let y=window.innerWidth-p.getBoundingClientRect().right;a(y>=P_)}f();let _=setInterval(f,1e3);return()=>{clearInterval(_)}},[t,r]),g.useEffect(()=>{let p=n||document.activeElement===e.current;if(r==="none"||!p)return;let f=setTimeout(h,0),_=setTimeout(h,2e3),y=setTimeout(h,5e3),b=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(f),clearTimeout(_),clearTimeout(y),clearTimeout(b)}},[e,n,r,h]),{hasPWMBadge:s,willPushPWMBadge:c,PWM_BADGE_SPACE_WIDTH:GA}}var j_=g.createContext({}),A_=g.forwardRef((t,e)=>{var r=t,{value:n,onChange:s,maxLength:i,textAlign:o="left",pattern:a,placeholder:l,inputMode:u="numeric",onComplete:c,pushPasswordManagerStrategy:h="increase-width",pasteTransformer:p,containerClassName:f,noScriptCSSFallback:_=YA,render:y,children:b}=r,v=WA(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),m,w,x,E,S;let[k,C]=g.useState(typeof v.defaultValue=="string"?v.defaultValue:""),T=n??k,P=qA(T),D=g.useCallback(J=>{s==null||s(J),C(J)},[s]),I=g.useMemo(()=>
vendor: 1,058 bytes, line 225
225a?typeof a=="string"?new RegExp(a):a:null,[a]),M=g.useRef(null),R=g.useRef(null),V=g.useRef({value:T,onChange:D,isIOS:typeof window<"u"&&((w=(m=window==null?void 0:window.CSS)==null?void 0:m.supports)==null?void 0:w.call(m,"-webkit-touch-callout","none"))}),W=g.useRef({prev:[(x=M.current)==null?void 0:x.selectionStart,(E=M.current)==null?void 0:E.selectionEnd,(S=M.current)==null?void 0:S.selectionDirection]});g.useImperativeHandle(e,()=>M.current,[]),g.useEffect(()=>{let J=M.current,X=R.current;if(!J||!X)return;V.current.value!==J.value&&V.current.onChange(J.value),W.current.prev=[J.selectionStart,J.selectionEnd,J.selectionDirection];function je(){if(document.activeElement!==J){q(null),te(null);return}let ae=J.selectionStart,Ke=J.selectionEnd,ur=J.selectionDirection,ut=J.maxLength,rt=J.value,$t=W.current.prev,cr=-1,Ce=-1,ct;if(rt.length!==0&&ae!==null&&Ke!==null){let gu=ae===Ke,Wo=ae===rt.length&&rt.length<ut;if(gu&&!Wo){let Mt=ae;if(Mt===0)cr=0,Ce=1,ct="forward";else if(Mt===ut)cr=Mt-1,Ce=Mt,ct="backward";else if(ut>1&&rt.length>1){let dr=0;
225if($t[0]!==null&&$t[1]!==null){ct=Mt<$t[1]?"backward":"forward";let Ho=$t[0]===$t[1]&&$t[0]<ut;ct==="backward"&&!Ho&&(dr=-1)}cr=dr+Mt,Ce=dr+Mt+1}}cr!==-1&&Ce!==-1&&cr!==Ce&&M.current.setSelectionRange(cr,Ce,ct)}let Bo=cr!==-1?cr:ae,Vo=Ce!==-1?Ce:Ke,fs=ct??ur;q(Bo),te(Vo),W.current.prev=[Bo,Vo,fs]}if(document.addEventListener("selectionchange",je,{capture:!0}),je(),document.activeElement===J&&z(!0),!document.getElementById("input-otp-style")){let ae=document.createElement("style");if(ae.id="input-otp-style",document.head.appendChild(ae),ae.sheet){let Ke="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";$i(ae.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),$i(ae.sheet,`[data-input-otp]:autofill { ${Ke} }`),$i(ae.sheet,`[data-input-otp]:-webkit-autofill { ${Ke} }`),$i(ae.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),$i(ae.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let qe=()=>{X&&X.style.setProperty("--root-height",`${J.clientHeight}px`)};qe();let De=new ResizeObserver(qe);return De.observe(J),()=>{document.removeEventListener("selectionchange",je,{capture:!0}),De.disconnect()}},[]);let[Q,j]=g.useState(!1),[O,z]=g.useState(!1),[K,q]=g.useState(null),[Y,te]=g.useState(null);g.useEffect(()=>{HA(()=>{var J,X,je,qe;(J=M.current)==null||J.dispatchEvent(new Event("input"));let De=(X=M.current)==null?void 0:X.selectionStart,ae=(je=M.current)==null?void 0:je.selectionEnd,Ke=(qe=M.current)==null?void 0:qe.selectionDirection;De!==null&&ae!==null&&(q(De),te(ae),W.current.prev=[De,ae,Ke])})},[T,O]),g.useEffect(()=>{P!==void 0&&T!==P&&P.length<i&&T.length===i&&(c==null||c(T))},[i,c,P,T]);let ce=JA({containerRef:R,inputRef:M,pushPasswordManagerStrategy:h,isFocused:O}),Ne=g.useCallback(J=>{let X=J.currentTarget.value.slice(0,i);if(X.length>0&&I&&!I.test(X)){J.preventDefault();return}typeof P=="string"&&X.length<P.length&&document.dispatchEvent(new Event("selectionchange")),D(X)},[i,D,P,I]),se=g.useCallback(()=>{var J;if(M.current){let X=Math.min(M.current.value.length,i-1),je=M.current.value.length;(J=M.current)==null||J.setSelectionRange(X,je),q(X),te(je)}z(!0)},[i]),Tr=g.useCallback(J=>{var X,je;let qe=M.current;if(!p&&(!V.current.isIOS||!J.clipboardData||!qe))return;let De=J.clipboardData.getData("text/plain"),ae=p?p(De):De;J.preventDefault();let Ke=(X=M.current)==null?void 0:X.selectionStart,ur=(je=M.current)==null?void 0:je.selectionEnd,ut=(Ke!==ur?T.slice(0,Ke)+ae+T.slice(ur):T.slice(0,Ke)+ae+T.slice(Ke)).slice(0,i);if(ut.length>0&&I&&!I.test(ut))return;qe.value=ut,D(ut);let rt=Math.min(ut.length,i-1),$t=ut.length;qe.setSelectionRange(rt,$t),q(rt),te($t)},[i,D,I,T]),sr=g.useMemo(()=>({position:"relative",cursor:v.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[v.disabled]),ir=g.useMemo(()=>({position:"absolute",inset:0,width:ce.willPushPWMBadge?`calc(100% + ${ce.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:ce.willPushPWMBadge?`inset(0 ${ce.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:o,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[ce.PWM_BADGE_SPACE_WIDTH,ce.willPushPWMBadge,o]),or=g.useMemo(()=>g.createElement("input",VA(BA({autoComplete:v.autoComplete||"one-time-code"},v),{"data-input-otp":!0,"data-input-otp-placeholder-shown":T.length===0||void 0,"data-input-otp-mss":K,"data-input-otp-mse":Y,inputMode:u,pattern:I==null?void 0:I.source,"aria-placeholder":l,style:ir,maxLength:i,value:T,ref:M,onPaste:J=>{var X;Tr(J),(X=v.onPaste)==null||X.call(v,J)},onChange:Ne,onMouseOver:J=>{var X;j(!0),(X=v.onMouseOver)==null||X.call(v,J)},onMouseLeave:J=>{var X;j(!1),(X=v.onMouseLeave)==null||X.call(v,J)},onFocus:J=>{var X;se(),(X=v.onFocus)==null||X.call(v,J)},onBlur:J=>{var X;z(!1),(X=v.onBlur)==null||X.call(v,J)}})),[Ne,se,Tr,u,ir,i,Y,K,v,I==null?void 0:I.source,T]),ar=g.useMemo(()=>({slots:Array.from({length:i}).map((J,X)=>{var je;let qe=O&&K!==null&&Y!==null&&(K===Y&&X===K||X>=K&&X<Y),De=T[X]!==void 0?T[X]:null,ae=T[0]!==void 0?null:(je=l==null?void 0:l[X])!=null?je:null;return{char:De,placeholderChar:ae,isActive:qe,hasFakeCaret:qe&&De===null}}
225),isFocused:O,isHovering:!v.disabled&&Q}),[O,Q,i,Y,K,v.disabled,T]),lr=g.useMemo(()=>y?y(ar):g.createElement(j_.Provider,{value:ar},b),[b,ar,y]);return g.createElement(g.Fragment,null,_!==null&&g.createElement("noscript",null,g.createElement("style",null,_)),g.createElement("div",{ref:R,"data-input-otp-container":!0,style:sr,className:f},lr,g.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},or)))});A_.displayName="Input";function $i(t,e){try{t.insertRule(e)}catch{console.error("input-otp could not insert CSS rule:",e)}}var YA=` 226[data-input-otp] { 227 --nojs-bg: white !important; 228 --nojs-fg: black !important; 229 230 background-color: var(--nojs-bg) !important; 231 color: var(--nojs-fg) !important; 232 caret-color: var(--nojs-fg) !important; 233 letter-spacing: .25em !important; 234 text-align: center !important; 235 border: 1px solid var(--nojs-fg) !important; 236 border-radius: 4px !important; 237 width: 100% !important; 238} 239@media (prefers-color-scheme: dark) { 240 [data-input-otp] { 241 --nojs-bg: black !important; 242 --nojs-fg: white !important; 243 } 244}`;const R_=g.forwardRef(({className:t,containerClassName:e,...r},n)=>d.jsx(A_,{ref:n,containerClassName:tt("flex items-center gap-2 has-[:disabled]:opacity-50",e),className:tt("disabled:cursor-not-allowed",t),...r}));R_.displayName="InputOTP";const O_=g.forwardRef(({className:t,...e},r)=>d.jsx("div",{ref:r,className:tt("flex items-center",t),...e}));O_.displayName="InputOTPGroup";const Fn=g.forwardRef(({index:t,className:e,...r},n)=>{const s=g.useContext(j_),{char:i,hasFakeCaret:o,isActive:a}=s.slots[t];return d.jsxs("div",{ref:n,className:tt("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",a&&"z-10 ring-2 ring-ring ring-offset-background",e),...r,children:[i,o&&d.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:d.jsx("div",{className:"animate-caret-blink h-4 w-px bg-foreground duration-1000"})})]})});Fn.displayName="InputOTPSlot";const XA=g.forwardRef(({...t},e)=>d.jsx("div",{ref:e,role:"separator",...t,children:d.jsx(f1,{})}));XA.displayName="InputOTPSeparator";const To=()=>{const t=g.useRef(null);return g.useEffect(()=>{const e=t.current;if(!e)return;const r=e.getContext("2d");if(!r)return;let n,s=[],i=[];const o=400,a=.5;let l=0,u=!1;const c=["rgba(138, 43, 226, 0.08)","rgba(65, 105, 225, 0.06)","rgba(219, 112, 147, 0.07)","rgba(0, 191, 255, 0.05)","rgba(255, 140, 0, 0.04)"],h=()=>{const{width:m,height:w}=e.getBoundingClientRect();u=Number.isFinite(m)&&Number.isFinite(w)&&m>=1&&w>=1,e.width=u?Math.max(1,Math.round(m)):1,e.height=u?Math.max(1,Math.round(w)):1},p=()=>{i=[];const m=5;for(let w=0;w<m;w++)i.push({x:Math.random()*e.width,y:Math.random()*e.height,radius:Math.random()*300+150,color:c[w%c.length],drift:{x:(Math.random()-.5)*.2,y:(Math.random()-.5)*.2}})},f=[{r:255,g:255,b:250},{r:255,g:250,b:240},{r:255,g:244,b:220},{r:255,g:235,b:190},{r:255,g:220,b:160},{r:255,g:200,b:130},{r:255,g:180,b:100}],_=()=>{s=[];for(let m=0;m<o;m++){const w=f[Math.floor(Math.random()*f.length)];s.push({x:Math.random()*e.width-e.width/2,y:Math.random()*e.height-e.height/2,z:Math.random()*e.width,size:Math.random()*2+.3,color:w,twinkleSpeed:Math.random()*.02+.01,twinkleOffset:Math.random()*Math.PI*2})}},y=()=>{i.forEach(m=>{m.x+=m.drift.x,m.y+=m.drift.y,m.x<-m.radius&&(m.x=e.width+m.radius),m.x>e.width+m.radius&&(m.x=-m.radius),m.y<-m.radius&&(m.y=e.height+m.radius),m.y>e.height+m.radius&&(m.y=-m.radius);const w=r.createRadialGradient(m.x,m.y,0,m.x,m.y,m.radius);w.addColorStop(0,m.color),w.addColorStop(.5,m.color.replace(/[\d.]+\)$/,"0.03)")),w.addColorStop(1,"transparent"),r.fillStyle=w,r.fillRect(m.x-m.radius,m.y-m.radius,m.radius*2,m.radius*2)})},b=()=>{if(!u){n=requestAnimationFrame(b);return}r.fillStyle="hsl(240, 10%, 6%)",r.fillRect(0,0,e.width,e.height),y();const m=e.width/2,w=e.height/2;s.forEach(x=>{x.z-=a,x.z<=0&&(x.x=Math.random()*e.width-m,x.y=Math.random()*e.height-w,x.z=e.width);const E=x.x/x.z*e.width+m,S=x.y/x.z*e.height+w,k=(1-x.z/e.width)*x.size*3,C=1-x.z/e.width;if(![E,S,k,C].every(Number.isFinite))return;const T=.7+.3*Math.sin(l*x.twinkleSpeed+x.twinkleOffset),P=C*T,D=Math.max(k,.5);if(D>1.5&&C>.5){const M=r.createRadialGradient(E,S,0,E,S,D*3);M.addColorStop(0,`rgba(${x.color.r}, ${x.color.g}, ${x.color.b}, ${P*.3})`),M.addColorStop(1,"transparent"),r.fillStyle=M,r.fillRect(E-D*3,S-D*3,D*6,D*6)}const I=r.createRadialGradient(E,S,0,E,S,D*1.5);I.addColorStop(0,`rgba(${x.color.r}, ${x.color.g}, ${x.color.b}, ${P})`),I.addColorStop(.4,`rgba(${x.color.r}, ${x.color.g}, ${x.color.b}, ${P*.6})`),I.addColorStop(1,"transparent"),r.beginPath(),r.arc(E,S,D*1.5,0,Math.PI*2),r.fillStyle=I,r.fill()}),l++,n=requestAnimationFrame(b)},v=()=>{h(),u&&(p(),_())};return v(),b(),window.addEventListener("resize",v),()=>{cancelAnimationFrame(n),window.removeEventListener("resize",v)}},[]),d.jsx("canvas",{ref:t,className:"absolute inset-0 w-full h-full",style:{background:"hsl(240, 10%, 8%)"}})};function ZA(){const[t,e]=g.useState(""),[r,n]=g.useState(""),[s,i]=g.useState(""),[o,a]=g.useState("email"),[l,u]=g.useState(!1),[c,h]=g.useState(!1),[p,f]=g.useState(!1),[_,y]=g.useState(!1),[b,v]=g.useState(!1),{signIn:m,signUp:w}=gA(),x=Ei(),[E]=W0(),S=E.get("next"),k=S&&/^\/[^\/].*/.test(S)?S:null,C=async()=>
244{if(!t){Ve.error("Enter your email address");return}u(!0);try{const{error:R}=await de.auth.resetPasswordForEmail(t,{redirectTo:`${window.location.origin}/reset-password`});if(R)throw R;y(!0),Ve.success("Password reset link sent â check your inbox")}catch(R){Ve.error(R.message||"Could not send reset link")}finally{u(!1)}},T=async()=>{if(!t.toLowerCase().endsWith("@aniara.one")){Ve.error("Only @aniara.one email addresses are allowed");return}u(!0);try{const{data:R,error:V}=await de.functions.invoke("send-verification-code",{body:{email:t,action:"send"}});if(V)throw V;if(R!=null&&R.error)throw new Error(R.error);Ve.success("Verification code sent to your email"),a("code")}catch(R){Ve.error(R.message||"Failed to send code")}finally{u(!1)}},P=async()=>{if(s.length!==6){Ve.error("Please enter the 6-digit code");return}u(!0);try{const{data:R,error:V}=await de.functions.invoke("send-verification-code",{body:{email:t,action:"verify",code:s}});if(V)throw V;if(R!=null&&R.error)throw new Error(R.error);Ve.success("Email verified!"),a("password")}catch(R){Ve.error(R.message||"Invalid code")}finally{u(!1)}},D=async R=>{if(R.preventDefault(),p){await C();return}if(c&&o==="email"){await T();return}if(c&&o==="code"){await P();return}u(!0);try{if(c){const{error:V}=await w(t,r);if(V)throw V;Ve.success("Account created! You can now log in."),h(!1),a("email"),i("")}else{const{error:V}=await de.auth.signInWithPassword({email:t,password:r});if(V)throw V;b?(localStorage.setItem("rememberMe","true"),localStorage.setItem("rememberMeExpiry",String(Date.now()+7*24*60*60*1e3))):(localStorage.removeItem("rememberMe"),localStorage.removeItem("rememberMeExpiry")),Ve.success("Logged in successfully"),k?window.location.href=k:x("/admin/home")}}catch(V){Ve.error(V.message||"Authentication failed")}finally{u(!1)}},I=()=>{o==="code"?(a("email"),i("")):o==="password"&&a("code")},M=()=>{h(!1),a("email"),i("")};return d.jsxs("div",{className:"min-h-screen relative flex items-center justify-center p-4",children:[d.jsx(To,{}),d.jsxs("div",{className:"w-full max-w-md relative z-10",children:[d.jsxs("div",{className:"bg-black/60 backdrop-blur-md border border-white/10 rounded-2xl shadow-xl shadow-black/20 p-8 space-y-8",children:[d.jsxs("div",{className:"text-center space-y-2",children:[d.jsx("img",{src:rs,alt:"Aniara",className:"h-10 mb-4 mx-auto"}),d.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-white font-sans",children:p?"Reset Password":c?o==="email"?"Create Account":o==="code"?"Verify Email":"Set Password":"Welcome Back"}),d.jsx("p",{className:"text-white/70 text-sm",children:p?_?"Check your inbox for the reset link":"Enter your email and we'll send you a reset link":c?o==="email"?"Enter your @aniara.one email":o==="code"?"Enter the 6-digit code sent to your email":"Choose a secure password":"Sign in to your admin dashboard"})]}),d.jsxs("form",{onSubmit:D,className:"space-y-5",children:[(!c||o==="email")&&d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ks,{htmlFor:"email",className:"text-sm font-medium text-white/90",children:"Email"}),d.jsxs("div",{className:"relative",children:[d.jsx(g1,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/50"}),d.jsx(Co,{id:"email",type:"email",value:t,onChange:R=>e(R.target.value),placeholder:c?"[email protected]":"[email protected]",required:!0,className:"pl-10 h-11 bg-white/10 border-white/20 text-white placeholder:text-white/40 focus:border-white/40 transition-colors"})]}),c&&d.jsx("p",{className:"text-xs text-white/50",children:"Only @aniara.one addresses allowed"})]}),c&&o==="code"&&d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("button",{type:"button",onClick:I,className:"text-sm text-white/60 hover:text-white flex items-center gap-1 transition-colors",children:[d.jsx(od,{className:"w-3 h-3"}),"Back"]}),d.jsx("span",{className:"text-sm text-white/60",children:t})]}),d.jsx("div",{className:"flex justify-center",children:d.jsx(R_,{maxLength:6,value:s,onChange:i,children:d.jsxs(O_,{children:[d.jsx(Fn,{index:0}),d.jsx(Fn,{index:1}),d.jsx(Fn,{index:2}),d.jsx(Fn,{index:3}),d.jsx(Fn,{index:4}),d.jsx(Fn,{index:5})]})})}),d.jsx("button",{type:"button",onClick:T,disabled:l,className:"text-sm text-primary hover:text-primary/80 font-medium transition-colors w-full text-center",children:"Resend code"})]}),!p&&(!c||o==="password")&&d.jsxs("div",{className:"space-y-2",children:[c&&o==="password"&&d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsxs("button",{type:"button",onClick:I,className:"text-sm text-white/60 hover:text-white flex items-center gap-1 transition-colors",children:[d.jsx(od,{className:"w-3 h-3"}),"Back"]}),d.jsx("span",{className:"text-sm text-white/60",children:t})]}),d.jsx(Ks,{htmlFor:"password",className:"text-sm font-medium text-white/90",children:"Password"}
244),d.jsxs("div",{className:"relative",children:[d.jsx(ad,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/50"}),d.jsx(Co,{id:"password",type:"password",value:r,onChange:R=>n(R.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!0,minLength:6,className:"pl-10 h-11 bg-white/10 border-white/20 text-white placeholder:text-white/40 focus:border-white/40 transition-colors"})]}),!c&&d.jsxs("div",{className:"flex items-center justify-between gap-2 pt-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(E_,{id:"remember",checked:b,onCheckedChange:R=>v(R===!0),className:"border-white/30 data-[state=checked]:bg-primary data-[state=checked]:border-primary"}),d.jsx(Ks,{htmlFor:"remember",className:"text-sm text-white/70 cursor-pointer font-normal",children:"Remember me for 7 days"})]}),d.jsx("button",{type:"button",onClick:()=>{f(!0),y(!1)},className:"text-sm text-primary hover:text-primary/80 font-medium transition-colors",children:"Forgot password?"})]})]}),d.jsx(pi,{type:"submit",className:"w-full h-11 font-medium group transition-all duration-200",disabled:l,children:l?d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"w-4 h-4 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin"}),"Please wait..."]}):d.jsxs("span",{className:"flex items-center gap-2",children:[p?_?"Resend reset link":"Send reset link":c?o==="email"?"Send Code":o==="code"?"Verify Code":"Create Account":"Sign In",d.jsx(Ly,{className:"w-4 h-4 group-hover:translate-x-0.5 transition-transform"})]})})]}),d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"absolute inset-0 flex items-center",children:d.jsx("div",{className:"w-full border-t border-white/20"})}),d.jsx("div",{className:"relative flex justify-center text-xs",children:d.jsx("span",{className:"bg-black/60 px-3 text-white/60",children:p?"Remembered it?":c?"Already registered?":"New here?"})})]}),d.jsx("div",{className:"text-center",children:d.jsx("button",{type:"button",onClick:()=>{p?(f(!1),y(!1)):c?M():(h(!0),a("email"))},className:"text-sm text-primary hover:text-primary/80 font-medium transition-colors",children:p?"Back to sign in":c?"Sign in to your account":"Create a new account"})})]}),d.jsx("p",{className:"text-center text-xs text-white/40 mt-6",children:"Web Admin Dashboard"})]})]})}function eR(){const[t,e]=g.useState(""),[r,n]=g.useState(""),[s,i]=g.useState(!1),[o,a]=g.useState(!1),l=Ei();g.useEffect(()=>{const{data:{subscription:c}}=de.auth.onAuthStateChange((h,p)=>{(h==="PASSWORD_RECOVERY"||p)&&a(!0)});return de.auth.getSession().then(({data:{session:h}})=>{h&&a(!0)}),()=>c.unsubscribe()},[]);const u=async c=>{if(c.preventDefault(),t.length<6){Ve.error("Password must be at least 6 characters");return}if(t!==r){Ve.error("Passwords do not match");return}i(!0);try{const{error:h}=await de.auth.updateUser({password:t});if(h)throw h;Ve.success("Password updated"),l("/admin/home")}catch(h){Ve.error(h.message||"Could not update password")}finally{i(!1)}};return d.jsxs("div",{className:"min-h-screen relative flex items-center justify-center p-4",children:[d.jsx(To,{}),d.jsx("div",{className:"w-full max-w-md relative z-10",children:d.jsxs("div",{className:"bg-black/60 backdrop-blur-md border border-white/10 rounded-2xl shadow-xl shadow-black/20 p-8 space-y-8",children:[d.jsxs("div",{className:"text-center space-y-2",children:[d.jsx("img",{src:rs,alt:"Aniara",className:"h-10 mb-4 mx-auto"}),d.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-white font-sans",children:"Set a new password"}),d.jsx("p",{className:"text-white/70 text-sm",children:o?"Choose a new password for your admin account":"Open this page from the link in your reset email"})]}),d.jsxs("form",{onSubmit:u,className:"space-y-5",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ks,{htmlFor:"password",className:"text-sm font-medium text-white/90",children:"New password"}),d.jsxs("div",{className:"relative",children:[d.jsx(ad,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/50"}),d.jsx(Co,{id:"password",type:"password",value:t,onChange:c=>e(c.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!0,minLength:6,className:"pl-10 h-11 bg-white/10 border-white/20 text-white placeholder:text-white/40 focus:border-white/40 transition-colors"})]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ks,{htmlFor:"confirm",className:"text-sm font-medium text-white/90",children:"Confirm password"}
244),d.jsxs("div",{className:"relative",children:[d.jsx(ad,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/50"}),d.jsx(Co,{id:"confirm",type:"password",value:r,onChange:c=>n(c.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!0,minLength:6,className:"pl-10 h-11 bg-white/10 border-white/20 text-white placeholder:text-white/40 focus:border-white/40 transition-colors"})]})]}),d.jsx(pi,{type:"submit",className:"w-full h-11 font-medium group transition-all duration-200",disabled:s||!o,children:s?d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"w-4 h-4 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin"}),"Please wait..."]}):d.jsxs("span",{className:"flex items-center gap-2",children:["Update password",d.jsx(Ly,{className:"w-4 h-4 group-hover:translate-x-0.5 transition-transform"})]})})]}),d.jsx("div",{className:"text-center",children:d.jsx("button",{type:"button",onClick:()=>l("/admin/login"),className:"text-sm text-primary hover:text-primary/80 font-medium transition-colors",children:"Back to sign in"})})]})})]})}const tR=()=>{var v,m,w,x;const{slug:t}=z0(),[e,r]=g.useState(null),[n,s]=g.useState(!0),[i,o]=g.useState(!1),a=g.useRef(null),l=g.useRef(Date.now()),u=g.useRef(0);g.useEffect(()=>{t&&c()},[t]),g.useEffect(()=>{const E=()=>{const S=document.documentElement.scrollHeight-window.innerHeight,k=S>0?Math.round(window.scrollY/S*100):0;u.current=Math.max(u.current,k)};return window.addEventListener("scroll",E),()=>window.removeEventListener("scroll",E)},[]),g.useEffect(()=>{const E=async()=>{if(a.current){const C=Math.round((Date.now()-l.current)/1e3);await de.from("career_page_views").update({time_on_page:C,max_scroll_depth:u.current}).eq("id",a.current)}},S=()=>{document.visibilityState==="hidden"&&E()},k=()=>{E()};return document.addEventListener("visibilitychange",S),window.addEventListener("beforeunload",k),()=>{document.removeEventListener("visibilitychange",S),window.removeEventListener("beforeunload",k),E()}},[]);const c=async()=>{const{data:E}=await de.from("career_pages").select("*").eq("slug",t).eq("published",!0).eq("archived",!1).maybeSingle();if(E){const S={...E,responsibilities:E.responsibilities||[],requirements_essential:E.requirements_essential||[],requirements_desirable:E.requirements_desirable||[],not_a_fit:E.not_a_fit||[],benefits:E.benefits||[]};r(S),h(E.id)}s(!1)},h=async E=>{const S=p(),k=/Mobile|Android|iPhone/i.test(navigator.userAgent)?"mobile":"desktop",{data:C}=await de.from("career_page_views").insert({career_page_id:E,visitor_id:S,referrer:document.referrer||null,user_agent:navigator.userAgent,device_type:k}
244).select().single();C&&(a.current=C.id)},p=()=>{let E=localStorage.getItem("aniara_visitor_id");return E||(E=crypto.randomUUID(),localStorage.setItem("aniara_visitor_id",E)),E},f=async()=>{if(e){const E=p();await de.from("career_apply_clicks").insert({career_page_id:e.id,visitor_id:E})}},_=async()=>{const E={title:`${e==null?void 0:e.job_title} at Aniara`,text:"Check out this exciting opportunity at Aniara - an AI-first publishing company!",url:window.location.href};if(navigator.share)try{await navigator.share(E)}catch(S){S.name!=="AbortError"&&y()}else y()},y=()=>{navigator.clipboard.writeText(window.location.href),o(!0),Ve.success("Link copied to clipboard!"),setTimeout(()=>o(!1),2e3)},b=({title:E,items:S})=>!S||S.length===0?null:d.jsxs("section",{children:[d.jsx("h2",{className:"text-2xl font-serif font-normal mb-4 text-background",children:E}),d.jsx("ul",{className:"space-y-3",children:S.map((k,C)=>d.jsxs("li",{className:"flex gap-3",children:[d.jsx("span",{className:"text-accent",children:"â¢"}),d.jsxs("span",{children:[k.title&&d.jsxs("strong",{className:"text-background",children:[k.title,":"]})," ",k.description]})]},C))})]});return n?d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-foreground",children:d.jsx("div",{className:"text-background",children:"Loading..."})}):e?d.jsxs("div",{className:"min-h-screen relative bg-foreground text-background overflow-hidden",children:[d.jsx(To,{}),d.jsxs("div",{className:"relative z-10",children:[d.jsxs("header",{className:"container mx-auto px-6 py-8 flex justify-between items-center",children:[d.jsxs(Ws,{to:"/",className:"inline-flex items-center gap-2 text-background/70 hover:text-background transition-colors font-sans text-sm",children:[d.jsx(od,{className:"w-4 h-4"}),"Back to Aniara"]}),d.jsxs(pi,{variant:"ghost",size:"sm",onClick:_,className:"text-background/70 hover:text-background hover:bg-background/10 font-sans text-sm gap-2",children:[i?d.jsx(Dy,{className:"w-4 h-4"}):d.jsx(w1,{className:"w-4 h-4"}),"Share with a friend"]})]}),d.jsx("main",{className:"container mx-auto px-6 pb-20",children:d.jsxs("div",{className:"max-w-2xl mx-auto",children:[d.jsx("h1",{className:"text-4xl md:text-5xl font-serif font-normal mb-6 text-center",children:e.job_title}),d.jsxs("div",{className:"flex flex-wrap justify-center gap-4 md:gap-6 mb-12 text-background/70 font-sans text-sm",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(v1,{className:"w-4 h-4"}),e.location]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(d1,{className:"w-4 h-4"}),e.employment_type]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(h1,{className:"w-4 h-4"}),"Start: ",e.start_date]})]}),d.jsxs("div",{className:"space-y-10 text-base text-background/90 leading-relaxed font-sans",children:[e.about_company&&d.jsxs("section",{children:[d.jsx("h2",{className:"text-2xl font-serif font-normal mb-4 text-background",children:"About Aniara"}),e.about_company.split(` 245 246`).map((E,S)=>d.jsx("p",{className:S>0?"mt-4":"",children:E},S))]}),e.role_description&&d.jsxs("section",{children:[d.jsx("h2",{className:"text-2xl font-serif font-normal mb-4 text-background",children:"The role"}),e.role_description.split(` 247 248`).map((E,S)=>d.jsx("p",{className:S>0?"mt-4":"",children:E},S))]}),d.jsx(b,{title:"What you'll do",items:e.responsibilities}),(((v=e.requirements_essential)==null?void 0:v.length)>0||((m=e.requirements_desirable)==null?void 0:m.length)>0)&&d.jsxs("section",{children:[d.jsx("h2",{className:"text-2xl font-serif font-normal mb-4 text-background",children:"Who you are"}),((w=e.requirements_essential)==null?void 0:w.length)>0&&d.jsxs(d.Fragment,{children:[d.jsx("h3",{className:"text-lg font-sans font-medium mb-3 text-background",children:"Essential"}),d.jsx("ul",{className:"space-y-3 mb-6",children:e.requirements_essential.map((E,S)=>d.jsxs("li",{className:"flex gap-3",children:[d.jsx("span",{className:"text-accent",children:"â¢"}),d.jsxs("span",{children:[E.title&&d.jsxs("strong",{className:"text-background",children:[E.title,":"]})," ",E.description]})]},S))})]}),((x=e.requirements_desirable)==null?void 0:x.length)>0&&d.jsxs(d.Fragment,{children:[d.jsx("h3",{className:"text-lg font-sans font-medium mb-3 text-background",children:"Desirable"}),d.jsx("ul",{className:"space-y-3",children:e.requirements_desirable.map((E,S)=>d.jsxs("li",{className:"flex gap-3",children:[d.jsx("span",{className:"text-accent",children:"â¢"}),d.jsxs("span",{children:[E.title&&d.jsxs("strong",{className:"text-background",children:[E.title,":"]}
248)," ",E.description]})]},S))})]})]}),d.jsx(b,{title:"Who you're not",items:e.not_a_fit}),d.jsx(b,{title:"What we offer",items:e.benefits}),d.jsxs("section",{className:"bg-background/10 rounded-lg p-6 md:p-8",children:[d.jsx("h2",{className:"text-2xl font-serif font-normal mb-4 text-background",children:"How to apply"}),d.jsxs("p",{className:"mb-4",children:[e.apply_instructions," ",d.jsx("a",{href:`mailto:${e.apply_email}`,className:"text-accent hover:underline font-medium",onClick:f,children:e.apply_email})]}),e.apply_note&&d.jsx("p",{className:"text-background/70",children:e.apply_note})]})]}),d.jsx("div",{className:"flex justify-center mt-16",children:d.jsx("img",{src:rs,alt:"ANIARA",className:"w-[120px] h-[82px] opacity-80"})}),d.jsx("div",{className:"text-center mt-6",children:d.jsx("p",{className:"font-serif text-background/70 italic",children:"Breaking language barriers, one book at a time."})})]})})]})]}):d.jsxs("div",{className:"min-h-screen relative bg-foreground text-background overflow-hidden",children:[d.jsx(To,{}),d.jsxs("div",{className:"relative z-10 flex flex-col items-center justify-center min-h-screen p-8 text-center",children:[d.jsx("h1",{className:"text-3xl font-serif mb-4",children:"Position Not Available"}),d.jsx("p",{className:"text-background/70 mb-6",children:"This position has been filled or is no longer available."}),d.jsx(Ws,{to:"/",className:"text-accent hover:underline",children:"Visit Aniara Homepage"})]})]})},bs=de.auth.oauth;function rR(){var p,f;const[t]=W0(),e=t.get("authorization_id")??"",[r,n]=g.useState(null),[s,i]=g.useState(null),[o,a]=g.useState(!1),[l,u]=g.useState(null);g.useEffect(()=>{let _=!0;return(async()=>{if(!e){i("Missing authorization_id");return}const{data:y}=await de.auth.getSession();if(!y.session){const w=window.location.pathname+window.location.search;window.location.href="/admin/login?next="+encodeURIComponent(w);return}if(u(y.session.user.email??null),!(bs!=null&&bs.getAuthorizationDetails)){i("OAuth client not available in this Supabase SDK.");return}const{data:b,error:v}=await bs.getAuthorizationDetails(e);if(!_)return;if(v){i(v.message??"Failed to load authorization request");return}const m=(b==null?void 0:b.redirect_url)??(b==null?void 0:b.redirect_to);if(m&&!(b!=null&&b.client)){window.location.href=m;return}n(b)})(),()=>{_=!1}},[e]);async function c(_){a(!0),i(null);const{data:y,error:b}=_?await bs.approveAuthorization(e):await bs.denyAuthorization(e);if(b){a(!1),i(b.message??"Authorization failed");return}const v=(y==null?void 0:y.redirect_url)??(y==null?void 0:y.redirect_to);if(!v){a(!1),i("No redirect returned by the authorization server.");return}window.location.href=v}const h=((p=r==null?void 0:r.client)==null?void 0:p.client_name)??((f=r==null?void 0:r.client)==null?void 0:f.name)??"an app";return d.jsxs("div",{className:"min-h-screen relative flex items-center justify-center p-4",children:[d.jsx(To,{}),d.jsx("div",{className:"w-full max-w-md relative z-10",children:d.jsxs("div",{className:"bg-black/60 backdrop-blur-md border border-white/10 rounded-2xl shadow-xl p-8 space-y-6 text-white",children:[d.jsxs("div",{className:"text-center space-y-2",children:[d.jsx("img",{src:rs,alt:"Aniara",className:"h-10 mb-2 mx-auto"}),d.jsxs("h1",{className:"text-2xl font-semibold tracking-tight",children:["Connect ",h," to Aniara"]}),l&&d.jsxs("p",{className:"text-white/70 text-sm",children:["Signed in as ",l]})]}),s&&d.jsx("div",{className:"text-sm text-red-300 bg-red-500/10 border border-red-500/20 rounded p-3",children:s}),!r&&!s&&d.jsx("p",{className:"text-center text-white/70",children:"Loadingâ¦"}),r&&d.jsxs(d.Fragment,{children:[d.jsxs("p",{className:"text-white/90 text-sm",children:["This lets ",d.jsx("strong",{children:h})," use this app as you. It will be able to call Aniaraâs enabled MCP tools while you are signed in. This does not bypass Aniaraâs permissions or backend policies."]}),r.scope&&d.jsxs("p",{className:"text-xs text-white/60",children:["Requested scope: ",d.jsx("code",{children:r.scope})]}),d.jsxs("div",{className:"flex gap-3",children:[d.jsx(pi,{onClick:()=>c(!0),disabled:o,className:"flex-1",children:"Approve"}),d.jsx(pi,{onClick:()=>c(!1),disabled:o,variant:"outline",className:"flex-1 bg-transparent border-white/20 text-white hover:bg-white/10",children:"Cancel"})]})]})]})})]})}const nR=g.lazy(()=>U(()=>import("./Admin-3QfNKAi3.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),sR=g.lazy(()=>U(()=>import("./TemplateEditor-C8olcwv7.js"),__vite__mapDeps([22,23,24,15,25,19,21,26,17,27,16]))),oc=g.lazy(()=>U(()=>import("./Analytics-B1ZAszyO.js"),__vite__mapDeps([28,5,3,4,29,11,25,30,31,32,19,33,34,9,35]))),iR=g.lazy(()=>U(()=>import("./AdminSettings-DRBg3CzV.js"),__vite__mapDeps([36,37,4,5,3,24,11,38,39,40,41,19]))),oR=g.lazy(()=>U(()=>import("./AdminCommercialModels-CAQkHD50.js"),__vite__mapDeps([42,43,10]))),aR=g.lazy(()=>U(()=>import("./AdminLayout-D1Urz6yd.js"),__vite__mapDeps([44,1,2,3,5,33,29,10,26,43,45,7,17,30,18,9]))),lR=g.lazy(()=>U(()=>import("./AdminCareer-SPETuwQL.js"),__vite__mapDeps([46,47,23,1,2,3,4,5,12,9,13,8,14,15,10,21]))),uR=g.lazy(()=>U(()=>import("./AdminHome-B4Opd_GA.js"),__vite__mapDeps([48,47,37,2,3,24,10,39,21,19,15]))),cR=g.lazy(()=>U(()=>import("./WebsitePreview-gs5AABcL.js").then(t=>t.W),[])),dR=g.lazy(()=>U(()=>import("./Catalogue-CNxuQguM.js"),__vite__mapDeps([49,50,18])).then(t=>({default:t.CatalogueIndex}))),hR=g.lazy(()=>U(()=>import("./Catalogue-CNxuQguM.js"),__vite__mapDeps([49,50,18])).then(t=>({default:t.AuthorPage}))),fR=g.lazy(()=>U(()=>import("./AudiencePages-tX2-zcW6.js"),__vite__mapDeps([51,49,50,18])).then(t=>({default:t.PublishersPage}
248))),pR=g.lazy(()=>U(()=>import("./AudiencePages-tX2-zcW6.js"),__vite__mapDeps([51,49,50,18])).then(t=>({default:t.AuthorsPage}))),mR=g.lazy(()=>U(()=>import("./AudiencePages-tX2-zcW6.js"),__vite__mapDeps([51,49,50,18])).then(t=>({default:t.InvestorsPage}))),gR=g.lazy(()=>U(()=>import("./AudiencePages-tX2-zcW6.js"),__vite__mapDeps([51,49,50,18])).then(t=>({default:t.AboutPage}))),vR=g.lazy(()=>U(()=>import("./Catalogue-CNxuQguM.js"),__vite__mapDeps([49,50,18])).then(t=>({default:()=>d.jsx(t.NotFound,{})}))),yR=g.lazy(()=>U(()=>import("./Catalogue-CNxuQguM.js"),__vite__mapDeps([49,50,18])).then(t=>({default:t.WorkPage}))),ds=()=>U(()=>import("./PreviewC-BBCt_Vd1.js"),[]),wR=g.lazy(()=>ds().then(t=>({default:t.HomeC}))),_R=g.lazy(()=>ds().then(t=>({default:t.PublishersC}))),bR=g.lazy(()=>ds().then(t=>({default:t.AuthorsC}))),xR=g.lazy(()=>ds().then(t=>({default:t.AboutC}))),ER=g.lazy(()=>ds().then(t=>({default:t.InvestorsC}))),SR=g.lazy(()=>ds().then(t=>({default:t.ReadersC}))),kR=g.lazy(()=>ds().then(t=>({default:t.NotFoundC}))),hs=()=>U(()=>import("./LiveSite-Do-lKSDi.js"),__vite__mapDeps([52,53])),CR=g.lazy(()=>hs().then(t=>({default:t.HomeLive}))),TR=g.lazy(()=>hs().then(t=>({default:t.PublishersLive}))),PR=g.lazy(()=>hs().then(t=>({default:t.AuthorsLive}))),jR=g.lazy(()=>hs().then(t=>({default:t.AboutLive}))),AR=g.lazy(()=>hs().then(t=>({default:t.InvestorsLive}))),RR=g.lazy(()=>hs().then(t=>({default:t.ReadersLive}))),OR=g.lazy(()=>hs().then(t=>({default:t.NotFoundLive}))),NR=g.lazy(()=>U(()=>import("./PlusLayout-CgVeajeX.js"),__vite__mapDeps([54,55,56,57,7,9,58,17,26,6,45]))),IR=g.lazy(()=>U(()=>import("./PlusToday-C9G_aYru.js"),__vite__mapDeps([59,60,61,55,26,62,63,64,65,66,67,31,68,69,34,70]))),LR=g.lazy(()=>U(()=>import("./PlusPlans-DiZRXM9j.js"),__vite__mapDeps([71,60,26]))),DR=g.lazy(()=>U(()=>import("./PlusInventory-BaRy1hav.js"),__vite__mapDeps([72,60,73,55,15,74,12]))),Rm=g.lazy(()=>U(()=>import("./TitleNew-Cu1qAHp9.js"),__vite__mapDeps([75,60,76,77,73,78,55,79,80,39,81,82]))),Om=g.lazy(()=>U(()=>import("./TitleMetadata-DJROXXSL.js"),__vite__mapDeps([83,60,73,78,55,79,82,19,13,12,15]))),$R=g.lazy(()=>U(()=>import("./PlusWork-By42vJKQ.js"),__vite__mapDeps([84,60,61,55,26,62,85,64,65,66,31,86,38,67]))),MR=g.lazy(()=>U(()=>import("./PlusSales-CyMnv0s_.js"),__vite__mapDeps([87,60,61,55,26,62,31,32,86]))),Nm=g.lazy(()=>U(()=>import("./PlusPlaceholder-BYqzP-6M.js"),__vite__mapDeps([88,60]))),UR=g.lazy(()=>U(()=>import("./PlusMarketing-B3kBzOnp.js"),__vite__mapDeps([89,60,61,55,26,62,90,67]))),zR=g.lazy(()=>U(()=>import("./PlusCampaign-DJJ2rnlg.js"),__vite__mapDeps([91,60,61,55,26,62,90,67,92]))),FR=g.lazy(()=>U(()=>import("./PlusAnalytics-BAQAZqqW.js"),__vite__mapDeps([93,60,61,55,26,62,94,31,86,32,69,58,67]))),BR=g.lazy(()=>U(()=>import("./PlusAdvance-BdYmmV1E.js"),__vite__mapDeps([95,60,61,55,26,62,94,67,31,68,69,40,58,39,34]))),VR=g.lazy(()=>U(()=>import("./PlusStudio-Du6FhLEd.js"),__vite__mapDeps([96,60,97,55,67,92]))),WR=g.lazy(()=>U(()=>import("./StudioWrite-BcC4WNKG.js").then(t=>t.S),__vite__mapDeps([98,60,61,55,26,62,97,77,29,11,41,12,74,35,80,27,70,99,14]))),HR=g.lazy(()=>U(()=>import("./StudioCovers-DBer-I0k.js"),__vite__mapDeps([100,60,97,99,101]))),qR=g.lazy(()=>U(()=>import("./StudioAudio-I7vYqjH4.js"),__vite__mapDeps([102,60,97,55,103,101]))),KR=g.lazy(()=>U(()=>import("./PlusMima-DorTr4Vf.js"),__vite__mapDeps([104,61,55,26,62,92,7,67,105]))),GR=g.lazy(()=>U(()=>import("./PlusSettings-Bcg07VWF.js"),__vite__mapDeps([106,60,67,107,30,108]))),QR=g.lazy(()=>U(()=>import("./PlusConnections-BUOuS-M-.js"),__vite__mapDeps([109,60,40,10,103,110,15]))),JR=g.lazy(()=>U(()=>import("./PubLayout-OzpNDos2.js"),__vite__mapDeps([111,112,79,113,64,65,114,66,26,13,115,62,14,56,57,116,9,7,92,30]))),YR=g.lazy(()=>U(()=>import("./PubSetup-BElBdzCN.js"),__vite__mapDeps([117,79,112,113,64,65,66]))),XR=g.lazy(()=>U(()=>import("./PubToday-I6j6bIrb.js"),__vite__mapDeps([118,112,79,113,64,65,119,66,63]))),ZR=g.lazy(()=>U(()=>import("./PubCatalogue-DIHfARVa.js"),__vite__mapDeps([120,79,112,113,64,65,73,119,66,15,12,74]))),eO=g.lazy(()=>U(()=>import("./PubTitle-62rduueJ.js"),__vite__mapDeps([121,79,112,113,64,65,119,66,85]))),tO=g.lazy(()=>U(()=>import("./PubOpportunities-DlCooLSY.js"),__vite__mapDeps([122,79,112,113,64,65,66]))),rO=g.lazy(()=>U(()=>import("./PubOpportunity-CtbXyr7s.js"),__vite__mapDeps([123,79,112,113,64,65,119,66]))),nO=g.lazy(()=>U(()=>import("./PubSales-sbj-nKtt.js"),__vite__mapDeps([124,79,112,113,64,65,119,66]))),Im=g.lazy(()=>U(()=>import("./PubMarketing-B10RvgG4.js"),__vite__mapDeps([125,79,112,113,64,65,66]))),sO=g.lazy(()=>U(()=>import("./PubStudio-DQ_QQ1oW.js"),__vite__mapDeps([126,79,112,113,64,65,66]))),iO=g.lazy(()=>U(()=>import("./PubRights-BcpAImrd.js"),__vite__mapDeps([127,79,112,113,64,65,119,66]))),oO=g.lazy(()=>U(()=>import("./PubKnowledge-CQcN8MkH.js"),__vite__mapDeps([128,79,112,113,64,65,119,66]))),aO=g.lazy(()=>U(()=>import("./PubData-BaTOchW-.js"),__vite__mapDeps([129,79,112,113,64,65,119,66,80,82]))),lO=g.lazy(()=>U(()=>import("./PubTeam-CP9HDv8p.js"),__vite__mapDeps([130,79,112,113,64,65,66]))),uO=g.lazy(()=>U(()=>import("./PubMimaWorkspace-CLJJyqac.js"),__vite__mapDeps([131,66,114,112,79,113,64,65,26,13,115,62,39,40,107,81,19,101,110,74,105,15,20,103]))),cO=g.lazy(()=>U(()=>import("./AgentLayout-C0J5QC7h.js"),__vite__mapDeps([132,133,65,113,134,115,26,14,56,30,108,116,92,18,45]))),dO=g.lazy(()=>U(()=>import("./AgToday-DBq22OS0.js"),__vite__mapDeps([135,136,66,65,133,113,63,64]))),hO=g.lazy(()=>U(()=>import("./AgClients-L2if060N.js"),__vite__mapDeps([137,136,66,65,133,113]))),fO=g.lazy(()=>U(()=>import("./AgClient-BZQJ39Ay.js"),__vite__mapDeps([138,136,66,65,133,113]))),pO=g.lazy(()=>U(()=>import("./AgTitle-73IggaJT.js"),__vite__mapDeps([139,136,66,65,133,113,85,64]))),mO=g.lazy(()=>U(()=>import("./AgBuyers-Pl5dFuU9.js"),__vite__mapDeps([140,136,66,65,133,113]))),gO=g.lazy(()=>U(()=>import("./AgBuyer-9Yvyl67h.js"),__vite__mapDeps([141,136,66,65,133,113]))),vO=g.lazy(()=>U(()=>import("./AgSubmissions-CXeeEFtF.js"),__vite__mapDeps([142,136,66,65,133,113,11]))),yO=g.lazy(()=>U(()=>import("./AgSubmission-vlNzQsUB.js"),__vite__mapDeps([143,136,66,65,133,113]))),wO=g.lazy(()=>U(()=>import("./AgOpportunities-ByTLx6yi.js"),__vite__mapDeps([144,136,66,65,133,113]))),_O=g.lazy(()=>U(()=>import("./AgOpportunity-wC6o4ZyB.js"),__vite__mapDeps([145,136,66,65,133,113]))),bO=g.lazy(()=>U(()=>import("./AgDeals-CzcCatpF.js"),__vite__mapDeps([146,136,66,65,133,113]))),xO=g.lazy(()=>U(()=>import("./AgFinance-CrdXUMCE.js"),__vite__mapDeps([147,136,66,65,133,113]))),EO=g.lazy(()=>U(()=>import("./AgStudio-Dg3lLj7K.js"),__vite__mapDeps([148,136,66,65,133,113]))),SO=g.lazy(()=>U(()=>import("./AgMimaWorkspace-CUTqMAmZ.js"),__vite__mapDeps([149,136,66,65,133,113,134,115,26])
248)),kO=g.lazy(()=>U(()=>import("./AgTeam-BLttnTHd.js"),__vite__mapDeps([150,136,66,65,133,113]))),ac=g.lazy(()=>U(()=>import("./ProductionList-BYS4Ocpr.js"),__vite__mapDeps([151,66,64,65,152,112,79,113,133,153]))),lc=g.lazy(()=>U(()=>import("./ProductionDetail-YmFILBM7.js"),__vite__mapDeps([154,66,64,65,152,112,79,113,133,153]))),uc=g.lazy(()=>U(()=>import("./ProductionWizard-B1WLv4b6.js"),__vite__mapDeps([155,66,64,65,152,112,79,113,133,55,73,76,77,153]))),CO=g.lazy(()=>U(()=>import("./ProductionRoot-CxALKC0-.js"),__vite__mapDeps([152,64,65,112,79,113,133])).then(t=>({default:t.AuthorProductionRoot}))),TO=g.lazy(()=>U(()=>import("./ProductionRoot-CxALKC0-.js"),__vite__mapDeps([152,64,65,112,79,113,133])).then(t=>({default:t.PublisherProductionRoot}))),PO=g.lazy(()=>U(()=>import("./ProductionRoot-CxALKC0-.js"),__vite__mapDeps([152,64,65,112,79,113,133])).then(t=>({default:t.AgentProductionRoot}))),jO=new BC,AO=()=>d.jsx("div",{className:"flex min-h-screen w-full items-center justify-center bg-background",children:d.jsx("p",{className:"text-sm text-muted-foreground",children:"Loadingâ¦"})}),RO=()=>d.jsx(VC,{client:jO,children:d.jsxs(yC,{children:[d.jsx(tS,{}),d.jsx(NS,{}),d.jsx(VT,{children:d.jsxs(mA,{children:[d.jsx(vA,{}),d.jsx(yA,{}),d.jsx(g.Suspense,{fallback:d.jsx(AO,{}),children:d.jsxs(IT,{children:[d.jsx(N,{path:"/",element:d.jsx(CR,{})}),d.jsx(N,{path:"/publishers-agents",element:d.jsx(TR,{})}),d.jsx(N,{path:"/for-authors",element:d.jsx(PR,{})}),d.jsx(N,{path:"/about",element:d.jsx(jR,{})}),d.jsx(N,{path:"/investors",element:d.jsx(AR,{})}),d.jsx(N,{path:"/for-readers",element:d.jsx(RR,{})}),d.jsx(N,{path:"/get-in-touch",element:d.jsx(SA,{})}),d.jsx(N,{path:"/career/:slug",element:d.jsx(tR,{})}),d.jsx(N,{path:"/campaign/:campaignId/:pageId",element:d.jsx(AA,{})}),d.jsx(N,{path:"/admin/login",element:d.jsx(ZA,{})}),d.jsx(N,{path:"/reset-password",element:d.jsx(eR,{})}),d.jsx(N,{path:"/.lovable/oauth/consent",element:d.jsx(rR,{})}),d.jsxs(N,{element:d.jsx(aR,{}),children:[d.jsx(N,{path:"/admin",element:d.jsx(nR,{})}),d.jsx(N,{path:"/admin/templates",element:d.jsx(sR,{})}),d.jsx(N,{path:"/admin/settings",element:d.jsx(iR,{})}),d.jsx(N,{path:"/admin/career",element:d.jsx(lR,{})}),d.jsx(N,{path:"/admin/commercial-models",element:d.jsx(oR,{})}),d.jsx(N,{path:"/admin/home",element:d.jsx(uR,{})}),d.jsx(N,{path:"/admin/analytics",element:d.jsx(oc,{})}),d.jsx(N,{path:"/admin/analytics/:campaignSlug",element:d.jsx(oc,{})}),d.jsx(N,{path:"/admin/analytics/:campaignSlug/:pageSlug",element:d.jsx(oc,{})}),d.jsx(N,{path:"/admin/plus",element:d.jsx(LR,{})}),d.jsx(N,{path:"/admin/website-preview",element:d.jsx(cR,{})}),d.jsx(N,{path:"/admin/website-preview/publishers-agents",element:d.jsx(fR,{})}),d.jsx(N,{path:"/admin/website-preview/for-authors",element:d.jsx(pR,{})}),d.jsx(N,{path:"/admin/website-preview/investors",element:d.jsx(mR,{})}),d.jsx(N,{path:"/admin/website-preview/about",element:d.jsx(gR,{})}),d.jsx(N,{path:"/admin/website-preview/books",element:d.jsx(dR,{})}),d.jsx(N,{path:"/admin/website-preview/authors/:authorId",element:d.jsx(hR,{})}),d.jsx(N,{path:"/admin/website-preview/works/:workId",element:d.jsx(yR,{})}),d.jsx(N,{path:"/admin/website-preview/*",element:d.jsx(vR,{})}),d.jsx(N,{path:"/admin/website-preview-c",element:d.jsx(wR,{})}),d.jsx(N,{path:"/admin/website-preview-c/publishers-agents",element:d.jsx(_R,{})}),d.jsx(N,{path:"/admin/website-preview-c/for-authors",element:d.jsx(bR,{})}),d.jsx(N,{path:"/admin/website-preview-c/about",element:d.jsx(xR,{})}),d.jsx(N,{path:"/admin/website-preview-c/investors",element:d.jsx(ER,{})}),d.jsx(N,{path:"/admin/website-preview-c/for-readers",element:d.jsx(SR,{})}),d.jsx(N,{path:"/admin/website-preview-c/*",element:d.jsx(kR,{})})]}),d.jsxs(N,{path:"/admin/plus/publishers",element:d.jsx(JR,{}),children:[d.jsx(N,{index:!0,element:d.jsx(XR,{})}),d.jsx(N,{path:"setup",element:d.jsx(YR,{})}),d.jsx(N,{path:"catalogue",element:d.jsx(ZR,{})}),d.jsx(N,{path:"catalogue/new",element:d.jsx(Rm,{portal:"publisher"})}),d.jsx(N,{path:"catalogue/:titleId/metadata",element:d.jsx(Om,{portal:"publisher"})}
248),d.jsx(N,{path:"catalogue/:workId",element:d.jsx(eO,{})}),d.jsx(N,{path:"opportunities",element:d.jsx(tO,{})}),d.jsx(N,{path:"opportunities/:opId",element:d.jsx(rO,{})}),d.jsx(N,{path:"sales",element:d.jsx(nO,{})}),d.jsx(N,{path:"marketing",element:d.jsx(Im,{})}),d.jsx(N,{path:"marketing/:campaignId",element:d.jsx(Im,{})}),d.jsx(N,{path:"studio",element:d.jsx(sO,{})}),d.jsx(N,{path:"rights",element:d.jsx(iO,{})}),d.jsx(N,{path:"knowledge",element:d.jsx(oO,{})}),d.jsx(N,{path:"data",element:d.jsx(aO,{})}),d.jsx(N,{path:"team",element:d.jsx(lO,{})}),d.jsx(N,{path:"mima",element:d.jsx(uO,{})}),d.jsxs(N,{path:"production",element:d.jsx(TO,{}),children:[d.jsx(N,{index:!0,element:d.jsx(ac,{})}),d.jsx(N,{path:"new",element:d.jsx(uc,{})}),d.jsx(N,{path:":productionId",element:d.jsx(lc,{})})]})]}),d.jsxs(N,{path:"/admin/plus/agents",element:d.jsx(cO,{}),children:[d.jsx(N,{index:!0,element:d.jsx(dO,{})}),d.jsx(N,{path:"clients",element:d.jsx(hO,{})}),d.jsx(N,{path:"clients/:clientId",element:d.jsx(fO,{})}),d.jsx(N,{path:"titles/:workId",element:d.jsx(pO,{})}),d.jsx(N,{path:"buyers",element:d.jsx(mO,{})}),d.jsx(N,{path:"buyers/:buyerId",element:d.jsx(gO,{})}),d.jsx(N,{path:"submissions",element:d.jsx(vO,{})}),d.jsx(N,{path:"submissions/:submissionId",element:d.jsx(yO,{})}),d.jsx(N,{path:"opportunities",element:d.jsx(wO,{})}),d.jsx(N,{path:"opportunities/:opportunityId",element:d.jsx(_O,{})}),d.jsx(N,{path:"deals",element:d.jsx(bO,{})}),d.jsx(N,{path:"finance",element:d.jsx(xO,{})}),d.jsx(N,{path:"studio",element:d.jsx(EO,{})}),d.jsx(N,{path:"mima",element:d.jsx(SO,{})}),d.jsx(N,{path:"team",element:d.jsx(kO,{})}),d.jsxs(N,{path:"production",element:d.jsx(PO,{}),children:[d.jsx(N,{index:!0,element:d.jsx(ac,{})}),d.jsx(N,{path:"new",element:d.jsx(uc,{})}),d.jsx(N,{path:":productionId",element:d.jsx(lc,{})})]})]}),d.jsxs(N,{path:"/admin/plus",element:d.jsx(NR,{}),children:[d.jsx(N,{path:"today",element:d.jsx(IR,{})}),d.jsx(N,{path:"inventory",element:d.jsx(DR,{})}),d.jsx(N,{path:"inventory/new",element:d.jsx(Rm,{portal:"author"})}),d.jsx(N,{path:"inventory/:titleId/metadata",element:d.jsx(Om,{portal:"author"})}),d.jsx(N,{path:"work/:workId",element:d.jsx($R,{})}),d.jsxs(N,{path:"production",element:d.jsx(CO,{}),children:[d.jsx(N,{index:!0,element:d.jsx(ac,{})}),d.jsx(N,{path:"new",element:d.jsx(uc,{})}),d.jsx(N,{path:":productionId",element:d.jsx(lc,{})})]}),d.jsx(N,{path:"sales",element:d.jsx(MR,{})}),d.jsx(N,{path:"revenue-share",element:d.jsx(Nm,{eyebrow:"Revenue share",title:"Who is owed what, and when.",intro:"Planned section. Contracts, royalty splits and payout schedules, expressed in plain language rather than clauses. Nothing is settled or paid automatically today.",points:["Per-work royalty terms with the contract text kept alongside the numbers.","Co-author and translator splits calculated from reported net sales, for review rather than automatic payment.","A payout calendar showing what is settled, pending and disputed."]})}),d.jsx(N,{path:"resources",element:d.jsx(Nm,{eyebrow:"Resources",title:"The material around the books.",intro:"Planned section. Cover files, press kits, author photos, sample chapters and reading-group guides, in one place. No files are stored or managed here yet â title metadata and material links live on each title.",points:["Versioned cover and interior files per edition.","Press and rights kits ready to send to a foreign publisher.","Reusable author assets: photo, short bio, long bio, quotes."]})}),d.jsx(N,{path:"settings",element:d.jsx(GR,{})}),d.jsx(N,{path:"settings/connections",element:d.jsx(QR,{})}),d.jsx(N,{path:"marketing",element:d.jsx(UR,{})}),d.jsx(N,{path:"marketing/:campaignId",element:d.jsx(zR,{})}),d.jsx(N,{path:"analytics",element:d.jsx(FR,{})}),d.jsx(N,{path:"advance",element:d.jsx(BR,{})}),d.jsx(N,{path:"studio",element:d.jsx(VR,{})}),d.jsx(N,{path:"studio/write",element:d.jsx(WR,{})}),d.jsx(N,{path:"studio/covers",element:d.jsx(HR,{})}),d.jsx(N,{path:"studio/audio",element:d.jsx(qR,{})}),d.jsx(N,{path:"mima",element:d.jsx(KR,{})})]}),d.jsx(N,{path:"*",element:d.jsx(OR,{})})]})})]})})]})});sy(document.getElementById("root")).render(d.jsx(RO,{}));export{UO as $,Xk as A,pi as B,Zk as C,Oh as D,kn as E,iy as F,ay as G,Dy as H,Co as I,ad as J,Cr as K,Ks as L,uf as M,y1 as N,BO as O,Ue as P,d1 as Q,LO as R,wE as S,Si as T,nw as U,NO as V,su as W,$y as X,AC as Y,EC as Z,Sl as _,Ei as a,pd as a0,qt as a1,iu as a2,bC as a3,xC as a4,T0 as a5,LC as a6,kC as a7,it as a8,_o as a9,UC as aa,zO as ab,FO as ac,$ as ad,Cn as ae,eg as af,Ly as ag,W0 as ah,od as ai,VO as aj,Ny as ak,ms as al,$d as am,
248U as an,OT as ao,w1 as ap,Ws as b,wt as c,Ve as d,EE as e,$o as f,hy as g,Pe as h,Tt as i,d as j,o0 as k,OA as l,tt as m,rs as n,l0 as o,Jl as p,eC as q,g as r,de as s,dy as t,gA as u,fl as v,RA as w,z0 as x,h1 as y,Dh 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.