1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/About-ZtDSy_g3.js","assets/heart-BF4WfgTX.js","assets/building-2-D3-zkHoT.js","assets/Visit-I_sdM8cb.js","assets/circle-alert-DeynbmTE.js","assets/phone-Cz8r9JTR.js","assets/mail-DIzBIgeW.js","assets/Support-_fYxCRlZ.js","assets/gift-CfaeSTQ9.js","assets/Accessibility-CPhyf-2M.js","assets/Auth--AygLpOO.js","assets/tabs-BFGREGV3.js","assets/MyTickets-_l5g3OFa.js","assets/pdfGenerator-BmHPwie2.js","assets/browser-BzysHykQ.js","assets/download-CcVfMAvh.js","assets/MyAccount-B3W76FNC.js","assets/form-BYqU0yUy.js","assets/checkbox-BuBNczcV.js","assets/alert-dialog-BuNtcri6.js","assets/index-DxKCTtkd.js","assets/index-DRYfENKC.js","assets/useMutation-CcV6fHLj.js","assets/select-BkXyGY_9.js","assets/index-BdQq_4o_.js","assets/chevron-down-0kA1qCjF.js","assets/chevron-up-D18T203o.js","assets/sparkles-B5OgSXSk.js","assets/grip-vertical-D7fa8QJG.js","assets/plus-BOxbBXe6.js","assets/save-t8jLgaQj.js","assets/trophy-C7ithT-G.js","assets/key-round-CCgZk6JQ.js","assets/eye-off-4uZXy-DR.js","assets/eye-xwXaduU-.js","assets/types-DrUic4zr.js","assets/VenueHire-DiMI5Y_R.js","assets/BoxOffice-Bal8LqYp.js","assets/Facilities-DIoILW3d.js","assets/ConditionsOfHire-DIC4--ex.js","assets/file-text-CYTKc2yI.js","assets/ArtsDirectory-BT6081Ue.js","assets/search-DRhsjgYy.js","assets/list-WBYbipnp.js","assets/star-CfeZ8yGj.js","assets/SuggestListing-B4Qc-qa8.js","assets/textarea-zkxjn3Pk.js","assets/imageUtils-RoQh2GsP.js","assets/circle-check-mazYLBU_.js","assets/image-C8tXgUOP.js","assets/upload-DP2pymot.js","assets/Company-FN0N8vA8.js","assets/quote-DgGJCVmp.js","assets/StaffArea-1LOtU9SW.js","assets/BecomeVolunteer-PMbXPbT5.js","assets/radio-group-DO0CEx8l.js","assets/alert-BwV6f7kW.js","assets/megaphone-B9W7KI_L.js","assets/info-DyWOcR4x.js","assets/Members-CN4U9BH5.js","assets/MemberSignup-DYzyBw_K.js","assets/SeatSelection-DOce3ysI.js","assets/zoom-out-D5a-atx4.js","assets/GeneralSeating-C_yg-YgZ.js","assets/discountUtils-DbxBI5_L.js","assets/minus-B45-gXHA.js","assets/Basket-D_1A007f.js","assets/PoliciesProcedures-ThQQQ65V.js","assets/TechnicalInformation-D9F3mEo4.js","assets/Safeguarding-uBArKInZ.js","assets/shield-check-CSwpMBzX.js","assets/send-S7RClQ90.js","assets/Marketing-DDXxfSI6.js","assets/share-2-CNXicnSL.js","assets/circle-check-big-DB1_Tds_.js","assets/PaymentSuccess-BUrE6Fl5.js","assets/PaymentCancelled-DNmqkHoL.js","assets/circle-x-Biyh4d0H.js","assets/TicketLottery-DzURht6D.js","assets/scroll-area-BeYQPfbm.js","assets/collapsible-B0DFXM9f.js","assets/News-BUC3vLMx.js","assets/NewsCard-2mZjeeUB.js","assets/NewsArticle-DSrc0hZJ.js","assets/NewsTag-bjyhDhfN.js","assets/Unsubscribe-CpN_wVIh.js","assets/Admin-BOJ9IV6r.js","assets/usePageViews-B7U4TuAq.js","assets/arrow-up-down-DvgMIiVg.js","assets/chart-column-dcCPsaOS.js","assets/pencil-C_L5e1Pl.js","assets/rotate-ccw-DrOXMoav.js","assets/AdminProductionForm-CN0AHcg9.js","assets/RichTextEditor-CAuSqiXf.js","assets/with-selector-DuwCZk0N.js","assets/popover-DtuDutnd.js","assets/CropEditor-B46xQaNm.js","assets/storageUpload-D7YIHYjP.js","assets/copy-_brrhfoM.js","assets/calendar-DLPb_Pgl.js","assets/isSameMonth-Bz5De9AU.js","assets/subDays-BSNKuTGW.js","assets/square-pen-B5fbrOt9.js","assets/AdminSeatingPlans-Ff4QKysg.js","assets/AdminHeroCarousel-CukoygG9.js","assets/AdminBackfillImageCrops-DzOYE7it.js","assets/AdminTicketSales-CGo4GFjd.js","assets/table-DNwFNVSx.js","assets/AdminConfig-C7b_YqNA.js","assets/knownPaths-BTLtWSiT.js","assets/refresh-cw-cPZ2haEo.js","assets/AdminDiscountCodes-aDMmbKgM.js","assets/AdminPages-CEEX4Do3.js","assets/AdminPageForm-Cg5EnNy8.js","assets/AdminShowAdmins-HL8BfTmv.js","assets/user-plus-ZyGMFZtn.js","assets/AdminUsers-Bs91y9pc.js","assets/AdminCommunicationPreferences-DLC0vsgU.js","assets/arrow-up-D9qnRETv.js","assets/AdminMemberships-B-K0mQvR.js","assets/AdminTeam-3H-c0ye0.js","assets/AdminTeamGroupForm-CT5Uw_q2.js","assets/AdminTeamMemberForm-CegGqSew.js","assets/AdminGallery-8m1W98Lj.js","assets/AdminPolicies-BnLCFmd0.js","assets/AdminMeetingMinutes-DldoQ8ro.js","assets/AdminJobDescriptions-Dxt6z6yH.js","assets/AdminVolunteers-D4uzsI-b.js","assets/AdminCompanies-DqnWyPdT.js","assets/inbox-Bu995U3C.js","assets/AdminCompanyForm-B0l3CUVi.js","assets/AdminCompanyReviews-C5CmjSW7.js","assets/AdminDirectoryCategories-ZeFsKqON.js","assets/AdminContainers-BKTvhr9r.js","assets/AdminMarketingPreferences-AO_Mz4kL.js","assets/AdminImportMembers-BRMjMUFS.js","assets/AdminImportVolunteers-DMzkwAxs.js","assets/AdminTicketLottery-DTR_TBYs.js","assets/AdminNews-DDE5Okzo.js","assets/AdminNewsForm-DMCM1n8O.js","assets/AdminNewsTags-DlzJ8s88.js","assets/AdminAnalytics-B03RR_7i.js","assets/chart-CyIpUEbj.js","assets/AdminLlmWork-CDhYbLCe.js","assets/AdminFunctions-Bk9JG0wI.js","assets/AdminFinancialReports-1uBtzks-.js","assets/AdminProductionMarketing-UtJwVc-D.js","assets/AdminCompanyFinance-Cf-j50bT.js","assets/AdminCompanyFinanceDetail-A3OjVC0t.js","assets/AdminSocials-UoZJAdk5.js","assets/AdminMarketingPlan-DMehfCgj.js","assets/progress-CWqnBYGX.js","assets/subMonths-u80Y0wHU.js","assets/AdminQRCodes-zJKFL1KA.js","assets/AdminInternalEvents-DQWnLprd.js","assets/AdminEmailCampaigns-CNngING5.js","assets/AdminImportMailingList-CXI0dm--.js","assets/AdminDailyUpdates-CpkuKWp5.js","assets/AdminVolunteerShiftTypes-DZa9Q2lI.js","assets/AdminVolunteerSkills-Jmqu3Kpk.js","assets/AdminVolunteerShows-BW0r8FiV.js","assets/AdminVolunteerShifts-DV7emJdM.js","assets/VolunteerRota-BOkigiB1.js","assets/Quiz-Cntg-RTz.js","assets/quiz-Dynsnjun.js","assets/QuizClaim-ClHwaAue.js","assets/QuizResult-DyV2fjSp.js","assets/AdminQuizzes-DSTBuB2H.js","assets/AdminQuizForm-D7PpaaYS.js","assets/AdminSignage-C47CInYz.js"])))=>i.map(i=>d[i]); 2function I1(e,t){for(var n=0;n<t.length;n++){const r=t[n];
vendor: 4,612 bytes, line 2
2if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(r,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();var dB=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ah={exports:{}},Wa={},jh={exports:{}},Ve={};var nw;function D1(){if(nw)return Ve;nw=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function b(N){return N===null||typeof N!="object"?null:(N=g&&N[g]||N["@@iterator"],typeof N=="function"?N:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,x={};function S(N,z,Y){this.props=N,this.context=z,this.refs=x,this.updater=Y||w}S.prototype.isReactComponent={},S.prototype.setState=function(N,z){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,z,"setState")},S.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function T(){}T.prototype=S.prototype;function k(N,z,Y){this.props=N,this.context=z,this.refs=x,this.updater=Y||w}var C=k.prototype=new T;C.constructor=k,E(C,S.prototype),C.isPureReactComponent=!0;var j=Array.isArray,O=Object.prototype.hasOwnProperty,M={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function q(N,z,Y){var X,me={},Se=null,ce=null;if(z!=null)for(X in z.ref!==void 0&&(ce=z.ref),z.key!==void 0&&(Se=""+z.key),z)O.call(z,X)&&!D.hasOwnProperty(X)&&(me[X]=z[X]);var ke=arguments.length-2;if(ke===1)me.children=Y;else if(1<ke){for(var $e=Array(ke),Ge=0;Ge<ke;Ge++)$e[Ge]=arguments[Ge+2];me.children=$e}if(N&&N.defaultProps)for(X in ke=N.defaultProps,ke)me[X]===void 0&&(me[X]=ke[X]);return{$$typeof:e,type:N,key:Se,ref:ce,props:me,_owner:M.current}}function J(N,z){return{$$typeof:e,type:N.type,key:z,ref:N.ref,props:N.props,_owner:N._owner}}function ne(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function ie(N){var z={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(Y){return z[Y]})}var re=/\/+/g;function pe(N,z){return typeof N=="object"&&N!==null&&N.key!=null?ie(""+N.key):z.toString(36)}function L(N,z,Y,X,me){var Se=typeof N;(Se==="undefined"||Se==="boolean")&&(N=null);var ce=!1;if(N===null)ce=!0;else switch(Se){case"string":case"number":ce=!0;break;case"object":switch(N.$$typeof){case e:case t:ce=!0}}if(ce)return ce=N,me=me(ce),N=X===""?"."+pe(ce,0):X,j(me)?(Y="",N!=null&&(Y=N.replace(re,"$&/")+"/"),L(me,z,Y,"",function(Ge){return Ge})):me!=null&&(ne(me)&&(me=J(me,Y+(!me.key||ce&&ce.key===me.key?"":(""+me.key).replace(re,"$&/")+"/")+N)),z.push(me)),1;if(ce=0,X=X===""?".":X+":",j(N))for(var ke=0;ke<N.length;ke++){Se=N[ke];var $e=X+pe(Se,ke);ce+=L(Se,z,Y,$e,me)}else if($e=b(N),typeof $e=="function")for(N=$e.call(N),ke=0;!(Se=N.next()).done;)Se=Se.value,$e=X+pe(Se,ke++),ce+=L(Se,z,Y,$e,me);else if(Se==="object")throw z=String(N),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.");return ce}function G(N,z,Y){if(N==null)return N;var X=[],me=0;return L(N,X,"","",function(Se){return z.call(Y,Se,me++)}),X}
vendor: 4,089 bytes, line 2
2function Q(N){if(N._status===-1){var z=N._result;z=z(),z.then(function(Y){(N._status===0||N._status===-1)&&(N._status=1,N._result=Y)},function(Y){(N._status===0||N._status===-1)&&(N._status=2,N._result=Y)}),N._status===-1&&(N._status=0,N._result=z)}if(N._status===1)return N._result.default;throw N._result}var te={current:null},B={transition:null},F={ReactCurrentDispatcher:te,ReactCurrentBatchConfig:B,ReactCurrentOwner:M};function W(){throw Error("act(...) is not supported in production builds of React.")}return Ve.Children={map:G,forEach:function(N,z,Y){G(N,function(){z.apply(this,arguments)},Y)},count:function(N){var z=0;return G(N,function(){z++}),z},toArray:function(N){return G(N,function(z){return z})||[]},only:function(N){if(!ne(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},Ve.Component=S,Ve.Fragment=n,Ve.Profiler=o,Ve.PureComponent=k,Ve.StrictMode=r,Ve.Suspense=f,Ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F,Ve.act=W,Ve.cloneElement=function(N,z,Y){if(N==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+N+".");var X=E({},N.props),me=N.key,Se=N.ref,ce=N._owner;if(z!=null){if(z.ref!==void 0&&(Se=z.ref,ce=M.current),z.key!==void 0&&(me=""+z.key),N.type&&N.type.defaultProps)var ke=N.type.defaultProps;for($e in z)O.call(z,$e)&&!D.hasOwnProperty($e)&&(X[$e]=z[$e]===void 0&&ke!==void 0?ke[$e]:z[$e])}var $e=arguments.length-2;if($e===1)X.children=Y;else if(1<$e){ke=Array($e);for(var Ge=0;Ge<$e;Ge++)ke[Ge]=arguments[Ge+2];X.children=ke}return{$$typeof:e,type:N.type,key:me,ref:Se,props:X,_owner:ce}},Ve.createContext=function(N){return N={$$typeof:l,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},N.Provider={$$typeof:a,_context:N},N.Consumer=N},Ve.createElement=q,Ve.createFactory=function(N){var z=q.bind(null,N);return z.type=N,z},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(N){return{$$typeof:u,render:N}},Ve.isValidElement=ne,Ve.lazy=function(N){return{$$typeof:m,_payload:{_status:-1,_result:N},_init:Q}},Ve.memo=function(N,z){return{$$typeof:h,type:N,compare:z===void 0?null:z}},Ve.startTransition=function(N){var z=B.transition;B.transition={};try{N()}finally{B.transition=z}},Ve.unstable_act=W,Ve.useCallback=function(N,z){return te.current.useCallback(N,z)},Ve.useContext=function(N){return te.current.useContext(N)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(N){return te.current.useDeferredValue(N)},Ve.useEffect=function(N,z){return te.current.useEffect(N,z)},Ve.useId=function(){return te.current.useId()},Ve.useImperativeHandle=function(N,z,Y){return te.current.useImperativeHandle(N,z,Y)},Ve.useInsertionEffect=function(N,z){return te.current.useInsertionEffect(N,z)},Ve.useLayoutEffect=function(N,z){return te.current.useLayoutEffect(N,z)},Ve.useMemo=function(N,z){return te.current.useMemo(N,z)},Ve.useReducer=function(N,z,Y){return te.current.useReducer(N,z,Y)},Ve.useRef=function(N){return te.current.useRef(N)},Ve.useState=function(N){return te.current.useState(N)},Ve.useSyncExternalStore=function(N,z,Y){return te.current.useSyncExternalStore(N,z,Y)},Ve.useTransition=function(){return te.current.useTransition()},Ve.version="18.3.1",Ve}var rw;function Tm(){return rw||(rw=1,jh.exports=D1()),jh.exports}var sw;function L1(){if(sw)return Wa;sw=1;var e=Tm(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(u,f,h){var m,g={},b=null,w=null;h!==void 0&&(b=""+h),f.key!==void 0&&(b=""+f.key),f.ref!==void 0&&(w=f.ref);for(m in f)r.call(f,m)&&!a.hasOwnProperty(m)&&(g[m]=f[m]);if(u&&u.defaultProps)for(m in f=u.defaultProps,f)g[m]===void 0&&(g[m]=f[m]);return{$$typeof:t,type:u,key:b,ref:w,props:g,_owner:o.current}}return Wa.Fragment=n,Wa.jsx=l,Wa.jsxs=l,Wa}var ow;function M1(){return ow||(ow=1,Ah.exports=L1()),Ah.exports}var d=M1(),iu={},Ph={exports:{}},Pn={}
vendor: 29,899 bytes, lines 2-6
2,Nh={exports:{}},Oh={};var iw;function $1(){return iw||(iw=1,(function(e){function t(B,F){var W=B.length;B.push(F);e:for(;0<W;){var N=W-1>>>1,z=B[N];if(0<o(z,F))B[N]=F,B[W]=z,W=N;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var F=B[0],W=B.pop();if(W!==F){B[0]=W;e:for(var N=0,z=B.length,Y=z>>>1;N<Y;){var X=2*(N+1)-1,me=B[X],Se=X+1,ce=B[Se];if(0>o(me,W))Se<z&&0>o(ce,me)?(B[N]=ce,B[Se]=W,N=Se):(B[N]=me,B[X]=W,N=X);else if(Se<z&&0>o(ce,W))B[N]=ce,B[Se]=W,N=Se;else break e}}return F}function o(B,F){var W=B.sortIndex-F.sortIndex;return W!==0?W:B.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var f=[],h=[],m=1,g=null,b=3,w=!1,E=!1,x=!1,S=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(B){for(var F=n(h);F!==null;){if(F.callback===null)r(h);else if(F.startTime<=B)r(h),F.sortIndex=F.expirationTime,t(f,F);else break;F=n(h)}}function j(B){if(x=!1,C(B),!E)if(n(f)!==null)E=!0,Q(O);else{var F=n(h);F!==null&&te(j,F.startTime-B)}}function O(B,F){E=!1,x&&(x=!1,T(q),q=-1),w=!0;var W=b;try{for(C(F),g=n(f);g!==null&&(!(g.expirationTime>F)||B&&!ie());){var N=g.callback;if(typeof N=="function"){g.callback=null,b=g.priorityLevel;var z=N(g.expirationTime<=F);F=e.unstable_now(),typeof z=="function"?g.callback=z:g===n(f)&&r(f),C(F)}else r(f);g=n(f)}if(g!==null)var Y=!0;else{var X=n(h);X!==null&&te(j,X.startTime-F),Y=!1}return Y}finally{g=null,b=W,w=!1}}var M=!1,D=null,q=-1,J=5,ne=-1;function ie(){return!(e.unstable_now()-ne<J)}function re(){if(D!==null){var B=e.unstable_now();ne=B;var F=!0;try{F=D(!0,B)}finally{F?pe():(M=!1,D=null)}}else M=!1}var pe;if(typeof k=="function")pe=function(){k(re)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,G=L.port2;L.port1.onmessage=re,pe=function(){G.postMessage(null)}}else pe=function(){S(re,0)};function Q(B){D=B,M||(M=!0,pe())}function te(B,F){q=S(function(){B(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_continueExecution=function(){E||w||(E=!0,Q(O))},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(B){switch(b){case 1:case 2:case 3:var F=3;break;default:F=b}var W=b;b=F;try{return B()}finally{b=W}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(B,F){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var W=b;b=B;try{return F()}finally{b=W}},e.unstable_scheduleCallback=function(B,F,W){var N=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?N+W:N):W=N,B){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=W+z,B={id:m++,callback:F,priorityLevel:B,startTime:W,expirationTime:z,sortIndex:-1},W>N?(B.sortIndex=W,t(h,B),n(f)===null&&B===n(h)&&(x?(T(q),q=-1):x=!0,te(j,W-N))):(B.sortIndex=z,t(f,B),E||w||(E=!0,Q(O))),B},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(B){var F=b;return function(){var W=b;b=F;try{return B.apply(this,arguments)}finally{b=W}}}})(Oh)),Oh}var aw;function F1(){return aw||(aw=1,Nh.exports=$1()),Nh.exports}var lw;function U1(){if(lw)return Pn;lw=1;var e=Tm(),t=F1();function n(s){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+s,c=1;c<arguments.length;c++)i+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+s+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(s,i){l(s,i),l(s+"Capture",i)}function l(s,i){for(o[s]=i,s=0;s<i.length;s++)r.add(i[s])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[: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]*$/,m={},g={};function b(s){return f.call(g,s)?!0:f.call(m,s)?!1:h.test(s)?g[s]=!0:(m[s]=!0,!1)}function w(s,i,c,p){if(c!==null&&c.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return p?!1:c!==null?!c.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function E(s,i,c,p){if(i===null||typeof i>"u"||w(s,i,c,p))return!0;if(p)return!1;if(c!==null)switch(c.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function x(s,i,c,p,v,_,R){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=p,this.attributeNamespace=v,this.mustUseProperty=c,this.propertyName=s,this.type=i,this.sanitizeURL=_,this.removeEmptyString=R}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){S[s]=new x(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var i=s[0];S[i]=new x(i,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){S[s]=new x(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){S[s]=new x(s,2,!1,s,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(s){S[s]=new x(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){S[s]=new x(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){S[s]=new x(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){S[s]=new x(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){S[s]=new x(s,5,!1,s.toLowerCase(),null,!1,!1)});var T=/[\-:]([a-z])/g;function k(s){return s[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(s){var i=s.replace(T,k);S[i]=new x(i,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var i=s.replace(T,k);S[i]=new x(i,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var i=s.replace(T,k);S[i]=new x(i,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){S[s]=new x(s,1,!1,s.toLowerCase(),null,!1,!1)}),S.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){S[s]=new x(s,1,!1,s.toLowerCase(),null,!0,!0)});function C(s,i,c,p){var v=S.hasOwnProperty(i)?S[i]:null;(v!==null?v.type!==0:p||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(E(i,c,v,p)&&(c=null),p||v===null?b(i)&&(c===null?s.removeAttribute(i):s.setAttribute(i,""+c)):v.mustUseProperty?s[v.propertyName]=c===null?v.type===3?!1:"":c:(i=v.attributeName,p=v.attributeNamespace,c===null?s.removeAttribute(i):(v=v.type,c=v===3||v===4&&c===!0?"":""+c,p?s.setAttributeNS(p,i,c):s.setAttribute(i,c))))}var j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,O=Symbol.for("react.element"),M=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),ne=Symbol.for("react.provider"),ie=Symbol.for("react.context"),re=Symbol.for("react.forward_ref"),pe=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),te=Symbol.for("react.offscreen"),B=Symbol.iterator;function F(s){return s===null||typeof s!="object"?null:(s=B&&s[B]||s["@@iterator"],typeof s=="function"?s:null)}var W=Object.assign,N;function z(s){if(N===void 0)try{throw Error()}catch(c){var i=c.stack.trim().match(/\n( *(at )?)/);N=i&&i[1]||""}return` 3`+N+s}var Y=!1;function X(s,i){if(!s||Y)return"";Y=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(K){var p=K}Reflect.construct(s,[],i)}else{try{i.call()}catch(K){p=K}s.call(i.prototype)}else{try{throw Error()}catch(K){p=K}s()}}catch(K){if(K&&p&&typeof K.stack=="string"){for(var v=K.stack.split(` 4`),_=p.stack.split(` 5`),R=v.length-1,P=_.length-1;1<=R&&0<=P&&v[R]!==_[P];)P--;for(;1<=R&&0<=P;R--,P--)if(v[R]!==_[P]){if(R!==1||P!==1)do if(R--,P--,0>P||v[R]!==_[P]){var I=` 6`+v[R].replace(" at new "," at ");return s.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",s.displayName)),I}while(1<=R&&0<=P);break}}}finally{Y=!1,Error.prepareStackTrace=c}return(s=s?s.displayName||s.name:"")?z(s):""}function me(s){switch(s.tag){case 5:return z(s.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return s=X(s.type,!1),s;case 11:return s=X(s.type.render,!1),s;case 1:return s=X(s.type,!0),s;default:return""}}function Se(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case D:return"Fragment";case M:return"Portal";case J:return"Profiler";case q:return"StrictMode";case pe:return"Suspense";case L:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case ie:return(s.displayName||"Context")+".Consumer";case ne:return(s._context.displayName||"Context")+".Provider";case re:var i=s.render;return s=s.displayName,s||(s=i.displayName||i.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case G:return i=s.displayName||null,i!==null?i:Se(s.type)||"Memo";case Q:i=s._payload,s=s._init;try{return Se(s(i))}catch{}}return null}function ce(s){var i=s.type;switch(s.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=i.render,s=s.displayName||s.name||"",i.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Se(i);case 8:return i===q?"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 i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function ke(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function $e(s){var i=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Ge(s){var i=$e(s)?"checked":"value",c=Object.getOwnPropertyDescriptor(s.constructor.prototype,i),p=""+s[i];if(!s.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var v=c.get,_=c.set;return Object.defineProperty(s,i,{configurable:!0,get:function(){return v.call(this)},set:function(R){p=""+R,_.call(this,R)}}),Object.defineProperty(s,i,{enumerable:c.enumerable}),{getValue:function(){return p},setValue:function(R){p=""+R},stopTracking:function(){s._valueTracker=null,delete s[i]}}}}function He(s){s._valueTracker||(s._valueTracker=Ge(s))}function ve(s){if(!s)return!1;var i=s._valueTracker;if(!i)return!0;var c=i.getValue(),p="";return s&&(p=$e(s)?s.checked?"true":"false":s.value),s=p,s!==c?(i.setValue(s),!0):!1}function Ue(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function De(s,i){var c=i.checked;return W({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??s._wrapperState.initialChecked})}function ht(s,i){var c=i.defaultValue==null?"":i.defaultValue,p=i.checked!=null?i.checked:i.defaultChecked;c=ke(i.value!=null?i.value:c),s._wrapperState={initialChecked:p,initialValue:c,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function ze(s,i){i=i.checked,i!=null&&C(s,"checked",i,!1)}function $t(s,i){ze(s,i);var c=ke(i.value),p=i.type;if(c!=null)p==="number"?(c===0&&s.value===""||s.value!=c)&&(s.value=""+c):s.value!==""+c&&(s.value=""+c);else if(p==="submit"||p==="reset"){s.removeAttribute("value");return}i.hasOwnProperty("value")?jt(s,i.type,c):i.hasOwnProperty("defaultValue")&&jt(s,i.type,ke(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(s.defaultChecked=!!i.defaultChecked)}function at(s,i,c){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var p=i.type;if(!(p!=="submit"&&p!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+s._wrapperState.initialValue,c||i===s.value||(s.value=i),s.defaultValue=i}c=s.name,c!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,c!==""&&(s.name=c)}function jt(s,i,c){(i!=="number"||Ue(s.ownerDocument)!==s)&&(c==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+c&&(s.defaultValue=""+c))}var Ft=Array.isArray;function nt(s,i,c,p){if(s=s.options,i){i={};for(var v=0;v<c.length;v++)i["$"+c[v]]=!0;for(c=0;c<s.length;c++)v=i.hasOwnProperty("$"+s[c].value),s[c].selected!==v&&(s[c].selected=v),v&&p&&(s[c].defaultSelected=!0)}else{for(c=""+ke(c),i=null,v=0;v<s.length;v++){if(s[v].value===c){s[v].selected=!0,p&&(s[v].defaultSelected=!0);return}i!==null||s[v].disabled||(i=s[v])}i!==null&&(i.selected=!0)}}function Mn(s,i){if(i.dangerouslySetInnerHTML!=null)throw Error(n(91));return W({},i,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function Wt(s,i){var c=i.value;if(c==null){if(c=i.children,i=i.defaultValue,c!=null){if(i!=null)throw Error(n(92));if(Ft(c)){if(1<c.length)throw Error(n(93));c=c[0]}i=c}i==null&&(i=""),c=i}s._wrapperState={initialValue:ke(c)}}function Lr(s,i){var c=ke(i.value),p=ke(i.defaultValue);c!=null&&(c=""+c,c!==s.value&&(s.value=c),i.defaultValue==null&&s.defaultValue!==c&&(s.defaultValue=c)),p!=null&&(s.defaultValue=""+p)}function Mr(s){var i=s.textContent;i===s._wrapperState.initialValue&&i!==""&&i!==null&&(s.value=i)}function st(s){switch(s){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 Ct(s,i){return s==null||s==="http://www.w3.org/1999/xhtml"?st(i):s==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var ln,Jn=(function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,c,p,v){MSApp.execUnsafeLocalFunction(function(){return s(i,c,p,v)})}:s})(function(s,i){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=i;else{for(ln=ln||document.createElement("div"),ln.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=ln.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;i.firstChild;)s.appendChild(i.firstChild)}});function _t(s,i){if(i){var c=s.firstChild;if(c&&c===s.lastChild&&c.nodeType===3){c.nodeValue=i;return}}s.textContent=i}var cn={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},Xn=["Webkit","ms","Moz","O"];Object.keys(cn).forEach(function(s){Xn.forEach(function(i){i=i+s.charAt(0).toUpperCase()+s.substring(1),cn[i]=cn[s]})});function qt(s,i,c){return i==null||typeof i=="boolean"||i===""?"":c||typeof i!="number"||i===0||cn.hasOwnProperty(s)&&cn[s]?(""+i).trim():i+"px"}function un(s,i){s=s.style;for(var c in i)if(i.hasOwnProperty(c)){var p=c.indexOf("--")===0,v=qt(c,i[c],p);c==="float"&&(c="cssFloat"),p?s.setProperty(c,v):s[c]=v}}var mr=W({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 wn(s,i){if(i){if(mr[s]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function $r(s,i){if(s.indexOf("-")===-1)return typeof i.is=="string";switch(s){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 Fr=null;function $n(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Zn=null,Gt=null,Pt=null;function tn(s){if(s=ja(s)){if(typeof Zn!="function")throw Error(n(280));var i=s.stateNode;i&&(i=xc(i),Zn(s.stateNode,s.type,i))}}function ts(s){Gt?Pt?Pt.push(s):Pt=[s]:Gt=s}function Ne(){if(Gt){var s=Gt,i=Pt;if(Pt=Gt=null,tn(s),i)for(s=0;s<i.length;s++)tn(i[s])}}function qe(s,i){return s(i)}function Je(){}var Nt=!1;function Ut(s,i,c){if(Nt)return s(i,c);Nt=!0;try{return qe(s,i,c)}finally{Nt=!1,(Gt!==null||Pt!==null)&&(Je(),Ne())}}function lt(s,i){var c=s.stateNode;if(c===null)return null;var p=xc(c);if(p===null)return null;c=p[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(s=s.type,p=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!p;break e;default:s=!1}if(s)return null;if(c&&typeof c!="function")throw Error(n(231,i,typeof c));return c}var Kt=!1;if(u)try{var Rt={};Object.defineProperty(Rt,"passive",{get:function(){Kt=!0}}),window.addEventListener("test",Rt,Rt),window.removeEventListener("test",Rt,Rt)}catch{Kt=!1}function kn(s,i,c,p,v,_,R,P,I){var K=Array.prototype.slice.call(arguments,3);try{i.apply(c,K)}catch(le){this.onError(le)}}var ro=!1,so=null,ks=!1,qo=null,ca={onError:function(s){ro=!0,so=s}};function Qd(s,i,c,p,v,_,R,P,I){ro=!1,so=null,kn.apply(ca,arguments)}function oo(s,i,c,p,v,_,R,P,I){if(Qd.apply(this,arguments),ro){if(ro){var K=so;ro=!1,so=null}else throw Error(n(198));ks||(ks=!0,qo=K)}}function ns(s){var i=s,c=s;if(s.alternate)for(;i.return;)i=i.return;else{s=i;do i=s,(i.flags&4098)!==0&&(c=i.return),s=i.return;while(s)}return i.tag===3?c:null}function Xl(s){if(s.tag===13){var i=s.memoizedState;if(i===null&&(s=s.alternate,s!==null&&(i=s.memoizedState)),i!==null)return i.dehydrated}return null}function pt(s){if(ns(s)!==s)throw Error(n(188))}function Ts(s){var i=s.alternate;if(!i){if(i=ns(s),i===null)throw Error(n(188));return i!==s?null:s}for(var c=s,p=i;;){var v=c.return;if(v===null)break;var _=v.alternate;if(_===null){if(p=v.return,p!==null){c=p;continue}break}if(v.child===_.child){for(_=v.child;_;){if(_===c)return pt(v),s;if(_===p)return pt(v),i;_=_.sibling}throw Error(n(188))}if(c.return!==p.return)c=v,p=_;else{for(var R=!1,P=v.child;P;){if(P===c){R=!0,c=v,p=_;break}if(P===p){R=!0,p=v,c=_;break}P=P.sibling}if(!R){for(P=_.child;P;){if(P===c){R=!0,c=_,p=v;break}if(P===p){R=!0,p=_,c=v;break}P=P.sibling}if(!R)throw Error(n(189))}}if(c.alternate!==p)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?s:i}function Zl(s){return s=Ts(s),s!==null?ua(s):null}function ua(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var i=ua(s);if(i!==null)return i;s=s.sibling}return null}var Go=t.unstable_scheduleCallback,da=t.unstable_cancelCallback,ec=t.unstable_shouldYield,Jd=t.unstable_requestPaint,yt=t.unstable_now,Xd=t.unstable_getCurrentPriorityLevel,fa=t.unstable_ImmediatePriority,gr=t.unstable_UserBlockingPriority,io=t.unstable_NormalPriority,Ko=t.unstable_LowPriority,Ur=t.unstable_IdlePriority,Yo=null,bn=null;function tc(s){if(bn&&typeof bn.onCommitFiberRoot=="function")try{bn.onCommitFiberRoot(Yo,s,void 0,(s.current.flags&128)===128)}catch{}}var Fn=Math.clz32?Math.clz32:Qo,nc=Math.log,rc=Math.LN2;function Qo(s){return s>>>=0,s===0?32:31-(nc(s)/rc|0)|0}var Cs=64,rs=4194304;function er(s){switch(s&-s){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 s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function zr(s,i){var c=s.pendingLanes;if(c===0)return 0;var p=0,v=s.suspendedLanes,_=s.pingedLanes,R=c&268435455;if(R!==0){var P=R&~v;P!==0?p=er(P):(_&=R,_!==0&&(p=er(_)))}else R=c&~v,R!==0?p=er(R):_!==0&&(p=er(_));if(p===0)return 0;if(i!==0&&i!==p&&(i&v)===0&&(v=p&-p,_=i&-i,v>=_||v===16&&(_&4194240)!==0))return i;if((p&4)!==0&&(p|=c&16),i=s.entangledLanes,i!==0)for(s=s.entanglements,i&=p;0<i;)c=31-Fn(i),v=1<<c,p|=s[c],i&=~v;return p}function tr(s,i){switch(s){case 1:case 2:case 4:return i+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 i+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 Zd(s,i){for(var c=s.suspendedLanes,p=s.pingedLanes,v=s.expirationTimes,_=s.pendingLanes;0<_;){var R=31-Fn(_),P=1<<R,I=v[R];I===-1?((P&c)===0||(P&p)!==0)&&(v[R]=tr(P,i)):I<=i&&(s.expiredLanes|=P),_&=~P}}function Rs(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function sc(){var s=Cs;return Cs<<=1,(Cs&4194240)===0&&(Cs=64),s}function Jo(s){for(var i=[],c=0;31>c;c++)i.push(s);return i}function As(s,i,c){s.pendingLanes|=i,i!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,i=31-Fn(i),s[i]=c}function oc(s,i){var c=s.pendingLanes&~i;s.pendingLanes=i,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=i,s.mutableReadLanes&=i,s.entangledLanes&=i,i=s.entanglements;var p=s.eventTimes;for(s=s.expirationTimes;0<c;){var v=31-Fn(c),_=1<<v;i[v]=0,p[v]=-1,s[v]=-1,c&=~_}}function Xo(s,i){var c=s.entangledLanes|=i;for(s=s.entanglements;c;){var p=31-Fn(c),v=1<<p;v&i|s[p]&i&&(s[p]|=i),c&=~v}}var et=0;function ha(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var ic,pa,ma,ao,Zo,de=!1,A=[],U=null,ee=null,he=null,be=new Map,je=new Map,Ke=[],ct="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 nn(s,i){switch(s){case"focusin":case"focusout":U=null;break;case"dragenter":case"dragleave":ee=null;break;case"mouseover":case"mouseout":he=null;break;case"pointerover":case"pointerout":be.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":je.delete(i.pointerId)}}function Ot(s,i,c,p,v,_){return s===null||s.nativeEvent!==_?(s={blockedOn:i,domEventName:c,eventSystemFlags:p,nativeEvent:_,targetContainers:[v]},i!==null&&(i=ja(i),i!==null&&pa(i)),s):(s.eventSystemFlags|=p,i=s.targetContainers,v!==null&&i.indexOf(v)===-1&&i.push(v),s)}function ga(s,i,c,p,v){switch(i){case"focusin":return U=Ot(U,s,i,c,p,v),!0;case"dragenter":return ee=Ot(ee,s,i,c,p,v),!0;case"mouseover":return he=Ot(he,s,i,c,p,v),!0;case"pointerover":var _=v.pointerId;return be.set(_,Ot(be.get(_)||null,s,i,c,p,v)),!0;case"gotpointercapture":return _=v.pointerId,je.set(_,Ot(je.get(_)||null,s,i,c,p,v)),!0}return!1}function Yt(s){var i=lo(s.target);if(i!==null){var c=ns(i);if(c!==null){if(i=c.tag,i===13){if(i=Xl(c),i!==null){s.blockedOn=i,Zo(s.priority,function(){ma(c)});return}}else if(i===3&&c.stateNode.current.memoizedState.isDehydrated){s.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}s.blockedOn=null}function ac(s){if(s.blockedOn!==null)return!1;for(var i=s.targetContainers;0<i.length;){var c=tf(s.domEventName,s.eventSystemFlags,i[0],s.nativeEvent);if(c===null){c=s.nativeEvent;var p=new c.constructor(c.type,c);Fr=p,c.target.dispatchEvent(p),Fr=null}else return i=ja(c),i!==null&&pa(i),s.blockedOn=c,!1;i.shift()}return!0}function zg(s,i,c){ac(s)&&c.delete(i)}function sT(){de=!1,U!==null&&ac(U)&&(U=null),ee!==null&&ac(ee)&&(ee=null),he!==null&&ac(he)&&(he=null),be.forEach(zg),je.forEach(zg)}function ya(s,i){s.blockedOn===i&&(s.blockedOn=null,de||(de=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,sT)))}function va(s){function i(v){return ya(v,s)}if(0<A.length){ya(A[0],s);for(var c=1;c<A.length;c++){var p=A[c];p.blockedOn===s&&(p.blockedOn=null)}}for(U!==null&&ya(U,s),ee!==null&&ya(ee,s),he!==null&&ya(he,s),be.forEach(i),je.forEach(i),c=0;c<Ke.length;c++)p=Ke[c],p.blockedOn===s&&(p.blockedOn=null);for(;0<Ke.length&&(c=Ke[0],c.blockedOn===null);)Yt(c),c.blockedOn===null&&Ke.shift()}var ei=j.ReactCurrentBatchConfig,lc=!0;function oT(s,i,c,p){var v=et,_=ei.transition;ei.transition=null;try{et=1,ef(s,i,c,p)}finally{et=v,ei.transition=_}}function iT(s,i,c,p){var v=et,_=ei.transition;ei.transition=null;try{et=4,ef(s,i,c,p)}finally{et=v,ei.transition=_}}function ef(s,i,c,p){if(lc){var v=tf(s,i,c,p);if(v===null)wf(s,i,p,cc,c),nn(s,p);else if(ga(v,s,i,c,p))p.stopPropagation();else if(nn(s,p),i&4&&-1<ct.indexOf(s)){for(;v!==null;){var _=ja(v);if(_!==null&&ic(_),_=tf(s,i,c,p),_===null&&wf(s,i,p,cc,c),_===v)break;v=_}v!==null&&p.stopPropagation()}else wf(s,i,p,null,c)}}var cc=null;function tf(s,i,c,p){if(cc=null,s=$n(p),s=lo(s),s!==null)if(i=ns(s),i===null)s=null;else if(c=i.tag,c===13){if(s=Xl(i),s!==null)return s;s=null}else if(c===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;s=null}else i!==s&&(s=null);return cc=s,null}function Bg(s){switch(s){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(Xd()){case fa:return 1;case gr:return 4;case io:case Ko:return 16;case Ur:return 536870912;default:return 16}default:return 16}}
6var js=null,nf=null,uc=null;function Hg(){if(uc)return uc;var s,i=nf,c=i.length,p,v="value"in js?js.value:js.textContent,_=v.length;for(s=0;s<c&&i[s]===v[s];s++);var R=c-s;for(p=1;p<=R&&i[c-p]===v[_-p];p++);return uc=v.slice(s,1<p?1-p:void 0)}function dc(s){var i=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&i===13&&(s=13)):s=i,s===10&&(s=13),32<=s||s===13?s:0}function fc(){return!0}function Vg(){return!1}function Un(s){function i(c,p,v,_,R){this._reactName=c,this._targetInst=v,this.type=p,this.nativeEvent=_,this.target=R,this.currentTarget=null;for(var P in s)s.hasOwnProperty(P)&&(c=s[P],this[P]=c?c(_):_[P]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?fc:Vg,this.isPropagationStopped=Vg,this}return W(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=fc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=fc)},persist:function(){},isPersistent:fc}),i}var ti={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rf=Un(ti),wa=W({},ti,{view:0,detail:0}),aT=Un(wa),sf,of,ba,hc=W({},wa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lf,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==ba&&(ba&&s.type==="mousemove"?(sf=s.screenX-ba.screenX,of=s.screenY-ba.screenY):of=sf=0,ba=s),sf)},movementY:function(s){return"movementY"in s?s.movementY:of}}),Wg=Un(hc),lT=W({},hc,{dataTransfer:0}),cT=Un(lT),uT=W({},wa,{relatedTarget:0}),af=Un(uT),dT=W({},ti,{animationName:0,elapsedTime:0,pseudoElement:0}),fT=Un(dT),hT=W({},ti,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),pT=Un(hT),mT=W({},ti,{data:0}),qg=Un(mT),gT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yT={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"},vT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wT(s){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(s):(s=vT[s])?!!i[s]:!1}function lf(){return wT}var bT=W({},wa,{key:function(s){if(s.key){var i=gT[s.key]||s.key;if(i!=="Unidentified")return i}return s.type==="keypress"?(s=dc(s),s===13?"Enter":String.fromCharCode(s)):s.type==="
6keydown"||s.type==="keyup"?yT[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lf,charCode:function(s){return s.type==="keypress"?dc(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?dc(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),xT=Un(bT),_T=W({},hc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gg=Un(_T),ST=W({},wa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lf}),ET=Un(ST),kT=W({},ti,{propertyName:0,elapsedTime:0,pseudoElement:0}),TT=Un(kT),CT=W({},hc,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),RT=Un(CT),AT=[9,13,27,32],cf=u&&"CompositionEvent"in window,xa=null;u&&"documentMode"in document&&(xa=document.documentMode);var jT=u&&"TextEvent"in window&&!xa,Kg=u&&(!cf||xa&&8<xa&&11>=xa),Yg=" ",Qg=!1;function Jg(s,i){switch(s){case"keyup":return AT.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xg(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var ni=!1;function PT(s,i){switch(s){case"compositionend":return Xg(i);case"keypress":return i.which!==32?null:(Qg=!0,Yg);case"textInput":return s=i.data,s===Yg&&Qg?null:s;default:return null}}function NT(s,i){if(ni)return s==="compositionend"||!cf&&Jg(s,i)?(s=Hg(),uc=nf=js=null,ni=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Kg&&i.locale!=="ko"?null:i.data;default:return null}}var OT={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 Zg(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i==="input"?!!OT[s.type]:i==="textarea"}function ey(s,i,c,p){ts(p),i=vc(i,"onChange"),0<i.length&&(c=new rf("onChange","change",null,c,p),s.push({event:c,listeners:i}))}var _a=null,Sa=null;function IT(s){vy(s,0)}function pc(s){var i=ai(s);if(ve(i))return s}function DT(s,i){if(s==="change")return i}var ty=!1;if(u){var uf;if(u){var df="oninput"in document;if(!df){var ny=document.createElement("div");ny.setAttribute("oninput","return;"),df=typeof ny.oninput=="function"}uf=df}else uf=!1;ty=uf&&(!document.documentMode||9<document.documentMode)}function ry(){_a&&(_a.detachEvent("onpropertychange",sy),Sa=_a=null)}function sy(s){if(s.propertyName==="value"&&pc(Sa)){var i=[];ey(i,Sa,s,$n(s)),Ut(IT,i)}}function LT(s,i,c){s==="focusin"?(ry(),_a=i,Sa=c,_a.attachEvent("onpropertychange",sy)):s==="focusout"&&ry()}function MT(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return pc(Sa)}function $T(s,i){if(s==="click")return pc(i)}function FT(s,i){if(s==="input"||s==="change")return pc(i)}function UT(s,i){return s===i&&(s!==0||1/s===1/i)||s!==s&&i!==i}var yr=typeof Object.is=="function"?Object.is:UT;function Ea(s,i){if(yr(s,i))return!0;if(typeof s!="object"||s===null||typeof i!="object"||i===null)return!1;var c=Object.keys(s),p=Object.keys(i);if(c.length!==p.length)return!1;for(p=0;p<c.length;p++){var v=c[p];if(!f.call(i,v)||!yr(s[v],i[v]))return!1}return!0}function oy(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function iy(s,i){var c=oy(s);s=0;for(var p;c;){if(c.nodeType===3){if(p=s+c.textContent.length,s<=i&&p>=i)return{node:c,offset:i-s};s=p}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=oy(c)}}function ay(s,i){return s&&i?s===i?!0:s&&s.nodeType===3?!1:i&&i.nodeType===3?ay(s,i.parentNode):"contains"in s?s.contains(i):s.compareDocumentPosition?!!(s.compareDocumentPosition(i)&16):!1:!1}function ly(){for(var s=window,i=Ue();i instanceof s.HTMLIFrameElement;){try{var c=typeof i.contentWindow.location.href=="string"}catch{c=!1}if(c)s=i.contentWindow;else break;i=Ue(s.document)}return i}function ff(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i&&(i==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||i==="textarea"||s.contentEditable==="true")}function zT(s){var i=ly(),c=s.focusedElem,p=s.selectionRange;if(i!==c&&c&&c.ownerDocument&&ay(c.ownerDocument.documentElement,c)){if(p!==null&&ff(c)){if(i=p.start,s=p.end,s===void 0&&(s=i),"selectionStart"in c)c.selectionStart=i,c.selectionEnd=Math.min(s,c.value.length);else if(s=(i=c.ownerDocument||document)&&i.defaultView||window,s.getSelection){s=s.getSelection();var v=c.textContent.length,_=Math.min(p.start,v);p=p.end===void 0?_:Math.min(p.end,v),!s.extend&&_>p&&(v=p,p=_,_=v),v=iy(c,_);var R=iy(c,p);v&&R&&(s.rangeCount!==1||s.anchorNode!==v.node||s.anchorOffset!==v.offset||s.focusNode!==R.node||s.focusOffset!==R.offset)&&(i=i.createRange(),i.setStart(v.node,v.offset),s.removeAllRanges(),_>p?(s.addRange(i),s.extend(R.node,R.offset)):(i.setEnd(R.node,R.offset),s.addRange(i)))}}for(i=[],s=c;s=s.parentNode;)s.nodeType===1&&i.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<i.length;c++)s=i[c],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var BT=u&&"documentMode"in document&&11>=document.documentMode,ri=null,hf=null,ka=null,pf=!1;
vendor: 12,220 bytes, lines 6-7
6function cy(s,i,c){var p=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;pf||ri==null||ri!==Ue(p)||(p=ri,"selectionStart"in p&&ff(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),ka&&Ea(ka,p)||(ka=p,p=vc(hf,"onSelect"),0<p.length&&(i=new rf("onSelect","select",null,i,c),s.push({event:i,listeners:p}),i.target=ri)))}function mc(s,i){var c={};return c[s.toLowerCase()]=i.toLowerCase(),c["Webkit"+s]="webkit"+i,c["Moz"+s]="moz"+i,c}var si={animationend:mc("Animation","AnimationEnd"),animationiteration:mc("Animation","AnimationIteration"),animationstart:mc("Animation","AnimationStart"),transitionend:mc("Transition","TransitionEnd")},mf={},uy={};u&&(uy=document.createElement("div").style,"AnimationEvent"in window||(delete si.animationend.animation,delete si.animationiteration.animation,delete si.animationstart.animation),"TransitionEvent"in window||delete si.transitionend.transition);function gc(s){if(mf[s])return mf[s];if(!si[s])return s;var i=si[s],c;for(c in i)if(i.hasOwnProperty(c)&&c in uy)return mf[s]=i[c];return s}var dy=gc("animationend"),fy=gc("animationiteration"),hy=gc("animationstart"),py=gc("transitionend"),my=new Map,gy="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 Ps(s,i){my.set(s,i),a(i,[s])}for(var gf=0;gf<gy.length;gf++){var yf=gy[gf],HT=yf.toLowerCase(),VT=yf[0].toUpperCase()+yf.slice(1);Ps(HT,"on"+VT)}Ps(dy,"onAnimationEnd"),Ps(fy,"onAnimationIteration"),Ps(hy,"onAnimationStart"),Ps("dblclick","onDoubleClick"),Ps("focusin","onFocus"),Ps("focusout","onBlur"),Ps(py,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ta="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(" "),WT=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ta));function yy(s,i,c){var p=s.type||"unknown-event";s.currentTarget=c,oo(p,i,void 0,s),s.currentTarget=null}function vy(s,i){i=(i&4)!==0;for(var c=0;c<s.length;c++){var p=s[c],v=p.event;p=p.listeners;e:{var _=void 0;if(i)for(var R=p.length-1;0<=R;R--){var P=p[R],I=P.instance,K=P.currentTarget;if(P=P.listener,I!==_&&v.isPropagationStopped())break e;yy(v,P,K),_=I}else for(R=0;R<p.length;R++){if(P=p[R],I=P.instance,K=P.currentTarget,P=P.listener,I!==_&&v.isPropagationStopped())break e;yy(v,P,K),_=I}}}if(ks)throw s=qo,ks=!1,qo=null,s}function ut(s,i){var c=i[kf];c===void 0&&(c=i[kf]=new Set);var p=s+"__bubble";c.has(p)||(wy(i,s,2,!1),c.add(p))}function vf(s,i,c){var p=0;i&&(p|=4),wy(c,s,p,i)}var yc="_reactListening"+Math.random().toString(36).slice(2);function Ca(s){if(!s[yc]){s[yc]=!0,r.forEach(function(c){c!=="selectionchange"&&(WT.has(c)||vf(c,!1,s),vf(c,!0,s))});var i=s.nodeType===9?s:s.ownerDocument;i===null||i[yc]||(i[yc]=!0,vf("selectionchange",!1,i))}}function wy(s,i,c,p){switch(Bg(i)){case 1:var v=oT;break;case 4:v=iT;break;default:v=ef}c=v.bind(null,i,c,s),v=void 0,!Kt||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(v=!0),p?v!==void 0?s.addEventListener(i,c,{capture:!0,passive:v}):s.addEventListener(i,c,!0):v!==void 0?s.addEventListener(i,c,{passive:v}):s.addEventListener(i,c,!1)}function wf(s,i,c,p,v){var _=p;if((i&1)===0&&(i&2)===0&&p!==null)e:for(;;){if(p===null)return;var R=p.tag;if(R===3||R===4){var P=p.stateNode.containerInfo;if(P===v||P.nodeType===8&&P.parentNode===v)break;if(R===4)for(R=p.return;R!==null;){var I=R.tag;if((I===3||I===4)&&(I=R.stateNode.containerInfo,I===v||I.nodeType===8&&I.parentNode===v))return;R=R.return}for(;P!==null;){if(R=lo(P),R===null)return;if(I=R.tag,I===5||I===6){p=_=R;continue e}P=P.parentNode}}p=p.return}Ut(function(){var K=_,le=$n(c),ue=[];e:{var ae=my.get(s);if(ae!==void 0){var ye=rf,xe=s;switch(s){case"keypress":if(dc(c)===0)break e;case"keydown":case"keyup":ye=xT;break;case"focusin":xe="focus",ye=af;break;case"focusout":xe="blur",ye=af;break;case"beforeblur":case"afterblur":ye=af;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ye=Wg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=cT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=ET;break;case dy:case fy:case hy:ye=fT;break;case py:ye=TT;break;case"scroll":ye=aT;break;case"wheel":ye=RT;break;case"copy":case"cut":case"paste":ye=pT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=Gg}var Ee=(i&4)!==0,At=!Ee&&s==="scroll",H=Ee?ae!==null?ae+"Capture":null:ae;Ee=[];for(var $=K,V;$!==null;){V=$;var fe=V.stateNode;if(V.tag===5&&fe!==null&&(V=fe,H!==null&&(fe=lt($,H),fe!=null&&Ee.push(Ra($,fe,V)))),At)break;$=$.return}0<Ee.length&&(ae=new ye(ae,xe,null,c,le),ue.push({event:ae,listeners:Ee}))}}if((i&7)===0){e:{if(ae=s==="mouseover"||s==="pointerover",ye=s==="mouseout"||s==="pointerout",ae&&c!==Fr&&(xe=c.relatedTarget||c.fromElement)&&(lo(xe)||xe[ss]))break e;if((ye||ae)&&(ae=le.window===le?le:(ae=le.ownerDocument)?ae.defaultView||ae.parentWindow:window,ye?(xe=c.relatedTarget||c.toElement,ye=K,xe=xe?lo(xe):null,xe!==null&&(At=ns(xe),xe!==At||xe.tag!==5&&xe.tag!==6)&&(xe=null)):(ye=null,xe=K),ye!==xe)){if(Ee=Wg,fe="onMouseLeave",H="onMouseEnter",$="mouse",(s==="pointerout"||s==="pointerover")&&(Ee=Gg,fe="onPointerLeave",H="onPointerEnter",$="pointer"),At=ye==null?ae:ai(ye),V=xe==null?ae:ai(xe),ae=new Ee(fe,$+"leave",ye,c,le),ae.target=At,ae.relatedTarget=V,fe=null,lo(le)===K&&(Ee=new Ee(H,$+"enter",xe,c,le),Ee.target=V,Ee.relatedTarget=At,fe=Ee),At=fe,ye&&xe)t:{for(Ee=ye,H=xe,$=0,V=Ee;V;V=oi(V))$++;for(V=0,fe=H;fe;fe=oi(fe))V++;for(;0<$-V;)Ee=oi(Ee),$--;for(;0<V-$;)H=oi(H),V--;for(;$--;){if(Ee===H||H!==null&&Ee===H.alternate)break t;Ee=oi(Ee),H=oi(H)}Ee=null}else Ee=null;ye!==null&&by(ue,ae,ye,Ee,!1),xe!==null&&At!==null&&by(ue,At,xe,Ee,!0)}}e:{if(ae=K?ai(K):window,ye=ae.nodeName&&ae.nodeName.toLowerCase(),ye==="select"||ye==="input"&&ae.type==="file")var Te=DT;else if(Zg(ae))if(ty)Te=FT;else{Te=MT;var Oe=LT}else(ye=ae.nodeName)&&ye.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(Te=$T);if(Te&&(Te=Te(s,K))){ey(ue,Te,c,le);break e}Oe&&Oe(s,ae,K),s==="focusout"&&(Oe=ae._wrapperState)&&Oe.controlled&&ae.type==="number"&&jt(ae,"number",ae.value)}switch(Oe=K?ai(K):window,s){case"focusin":(Zg(Oe)||Oe.contentEditable==="true")&&(ri=Oe,hf=K,ka=null);break;case"focusout":ka=hf=ri=null;break;case"mousedown":pf=!0;break;case"contextmenu":case"mouseup":case"dragend":pf=!1,cy(ue,c,le);break;case"selectionchange":if(BT)break;case"keydown":case"keyup":cy(ue,c,le)}var Ie;if(cf)e:{switch(s){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else ni?Jg(s,c)&&(Fe="onCompositionEnd"):s==="keydown"&&c.keyCode===229&&(Fe="onCompositionStart");Fe&&(Kg&&c.locale!=="ko"&&(ni||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&ni&&(Ie=Hg()):(js=le,nf="value"in js?js.value:js.textContent,ni=!0)),Oe=vc(K,Fe),0<Oe.length&&(Fe=new qg(Fe,s,null,c,le),ue.push({event:Fe,listeners:Oe}),Ie?Fe.data=Ie:(Ie=Xg(c),Ie!==null&&(Fe.data=Ie)))),(Ie=jT?PT(s,c):NT(s,c))&&(K=vc(K,"onBeforeInput"),0<K.length&&(le=new qg("onBeforeInput","beforeinput",null,c,le),ue.push({event:le,listeners:K}),le.data=Ie))}vy(ue,i)})}function Ra(s,i,c){return{instance:s,listener:i,currentTarget:c}}function vc(s,i){for(var c=i+"Capture",p=[];s!==null;){var v=s,_=v.stateNode;v.tag===5&&_!==null&&(v=_,_=lt(s,c),_!=null&&p.unshift(Ra(s,_,v)),_=lt(s,i),_!=null&&p.push(Ra(s,_,v))),s=s.return}return p}function oi(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function by(s,i,c,p,v){for(var _=i._reactName,R=[];c!==null&&c!==p;){var P=c,I=P.alternate,K=P.stateNode;if(I!==null&&I===p)break;P.tag===5&&K!==null&&(P=K,v?(I=lt(c,_),I!=null&&R.unshift(Ra(c,I,P))):v||(I=lt(c,_),I!=null&&R.push(Ra(c,I,P)))),c=c.return}R.length!==0&&s.push({event:i,listeners:R})}var qT=/\r\n?/g,GT=/\u0000|\uFFFD/g;function xy(s){return(typeof s=="string"?s:""+s).replace(qT,` 7`).replace(GT,"")}function wc(s,i,c){if(i=xy(i),xy(s)!==i&&c)throw Error(n(425))}function bc(){}var bf=null,xf=null;function _f(s,i){return s==="textarea"||s==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Sf=typeof setTimeout=="function"?setTimeout:void 0,KT=typeof clearTimeout=="function"?clearTimeout:void 0,_y=typeof Promise=="function"?Promise:void 0,YT=typeof queueMicrotask=="function"?queueMicrotask:typeof _y<"u"?function(s){return _y.resolve(null).then(s).catch(QT)}:Sf;function QT(s){setTimeout(function(){throw s})}function Ef(s,i){var c=i,p=0;do{var v=c.nextSibling;if(s.removeChild(c),v&&v.nodeType===8)if(c=v.data,c==="/$"){if(p===0){s.removeChild(v),va(i);return}p--}else c!=="$"&&c!=="$?"&&c!=="$!"||p++;c=v}while(c);va(i)}function Ns(s){for(;s!=null;s=s.nextSibling){var i=s.nodeType;if(i===1||i===3)break;if(i===8){if(i=s.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return s}function Sy(s){s=s.previousSibling;for(var i=0;s;){if(s.nodeType===8){var c=s.data;if(c==="$"||c==="$!"||c==="$?"){if(i===0)return s;i--}else c==="/$"&&i++}s=s.previousSibling}return null}var ii=Math.random().toString(36).slice(2),Br="__reactFiber$"+ii,Aa="__reactProps$"+ii,ss="__reactContainer$"+ii,kf="__reactEvents$"+ii,JT="__reactListeners$"+ii,XT="__reactHandles$"+ii;function lo(s){var i=s[Br];if(i)return i;for(var c=s.parentNode;c;){if(i=c[ss]||c[Br]){if(c=i.alternate,i.child!==null||c!==null&&c.child!==null)for(s=Sy(s);s!==null;){if(c=s[Br])return c;s=Sy(s)}return i}s=c,c=s.parentNode}return null}function ja(s){return s=s[Br]||s[ss],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function ai(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function xc(s){return s[Aa]||null}var Tf=[],li=-1;function Os(s){return{current:s}}function dt(s){0>li||(s.current=Tf[li],Tf[li]=null,li--)}function ot(s,i){li++,Tf[li]=s.current,s.current=i}var Is={},dn=Os(Is),Tn=Os(!1),co=Is;function ci(s,i){var c=s.type.contextTypes;if(!c)return Is;var p=s.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===i)return p.__reactInternalMemoizedMaskedChildContext;var v={},_;for(_ in c)v[_]=i[_];return p&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=i,s.__reactInternalMemoizedMaskedChildContext=v),v}function Cn(s){return s=s.childContextTypes,s!=null}function _c(){dt(Tn),dt(dn)}
vendor: 4,447 bytes, line 7
7function Ey(s,i,c){if(dn.current!==Is)throw Error(n(168));ot(dn,i),ot(Tn,c)}function ky(s,i,c){var p=s.stateNode;if(i=i.childContextTypes,typeof p.getChildContext!="function")return c;p=p.getChildContext();for(var v in p)if(!(v in i))throw Error(n(108,ce(s)||"Unknown",v));return W({},c,p)}function Sc(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Is,co=dn.current,ot(dn,s),ot(Tn,Tn.current),!0}function Ty(s,i,c){var p=s.stateNode;if(!p)throw Error(n(169));c?(s=ky(s,i,co),p.__reactInternalMemoizedMergedChildContext=s,dt(Tn),dt(dn),ot(dn,s)):dt(Tn),ot(Tn,c)}var os=null,Ec=!1,Cf=!1;function Cy(s){os===null?os=[s]:os.push(s)}function ZT(s){Ec=!0,Cy(s)}function Ds(){if(!Cf&&os!==null){Cf=!0;var s=0,i=et;try{var c=os;for(et=1;s<c.length;s++){var p=c[s];do p=p(!0);while(p!==null)}os=null,Ec=!1}catch(v){throw os!==null&&(os=os.slice(s+1)),Go(fa,Ds),v}finally{et=i,Cf=!1}}return null}var ui=[],di=0,kc=null,Tc=0,nr=[],rr=0,uo=null,is=1,as="";function fo(s,i){ui[di++]=Tc,ui[di++]=kc,kc=s,Tc=i}function Ry(s,i,c){nr[rr++]=is,nr[rr++]=as,nr[rr++]=uo,uo=s;var p=is;s=as;var v=32-Fn(p)-1;p&=~(1<<v),c+=1;var _=32-Fn(i)+v;if(30<_){var R=v-v%5;_=(p&(1<<R)-1).toString(32),p>>=R,v-=R,is=1<<32-Fn(i)+v|c<<v|p,as=_+s}else is=1<<_|c<<v|p,as=s}function Rf(s){s.return!==null&&(fo(s,1),Ry(s,1,0))}function Af(s){for(;s===kc;)kc=ui[--di],ui[di]=null,Tc=ui[--di],ui[di]=null;for(;s===uo;)uo=nr[--rr],nr[rr]=null,as=nr[--rr],nr[rr]=null,is=nr[--rr],nr[rr]=null}var zn=null,Bn=null,mt=!1,vr=null;function Ay(s,i){var c=ar(5,null,null,0);c.elementType="DELETED",c.stateNode=i,c.return=s,i=s.deletions,i===null?(s.deletions=[c],s.flags|=16):i.push(c)}function jy(s,i){switch(s.tag){case 5:var c=s.type;return i=i.nodeType!==1||c.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(s.stateNode=i,zn=s,Bn=Ns(i.firstChild),!0):!1;case 6:return i=s.pendingProps===""||i.nodeType!==3?null:i,i!==null?(s.stateNode=i,zn=s,Bn=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(c=uo!==null?{id:is,overflow:as}:null,s.memoizedState={dehydrated:i,treeContext:c,retryLane:1073741824},c=ar(18,null,null,0),c.stateNode=i,c.return=s,s.child=c,zn=s,Bn=null,!0):!1;default:return!1}}function jf(s){return(s.mode&1)!==0&&(s.flags&128)===0}function Pf(s){if(mt){var i=Bn;if(i){var c=i;if(!jy(s,i)){if(jf(s))throw Error(n(418));i=Ns(c.nextSibling);var p=zn;i&&jy(s,i)?Ay(p,c):(s.flags=s.flags&-4097|2,mt=!1,zn=s)}}else{if(jf(s))throw Error(n(418));s.flags=s.flags&-4097|2,mt=!1,zn=s}}}function Py(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;zn=s}function Cc(s){if(s!==zn)return!1;if(!mt)return Py(s),mt=!0,!1;var i;if((i=s.tag!==3)&&!(i=s.tag!==5)&&(i=s.type,i=i!=="head"&&i!=="body"&&!_f(s.type,s.memoizedProps)),i&&(i=Bn)){if(jf(s))throw Ny(),Error(n(418));for(;i;)Ay(s,i),i=Ns(i.nextSibling)}if(Py(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,i=0;s;){if(s.nodeType===8){var c=s.data;if(c==="/$"){if(i===0){Bn=Ns(s.nextSibling);break e}i--}else c!=="$"&&c!=="$!"&&c!=="$?"||i++}s=s.nextSibling}Bn=null}}else Bn=zn?Ns(s.stateNode.nextSibling):null;return!0}function Ny(){for(var s=Bn;s;)s=Ns(s.nextSibling)}function fi(){Bn=zn=null,mt=!1}function Nf(s){vr===null?vr=[s]:vr.push(s)}var e1=j.ReactCurrentBatchConfig;function Pa(s,i,c){if(s=c.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var p=c.stateNode}if(!p)throw Error(n(147,s));var v=p,_=""+s;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===_?i.ref:(i=function(R){var P=v.refs;R===null?delete P[_]:P[_]=R},i._stringRef=_,i)}if(typeof s!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,s))}return s}function Rc(s,i){throw s=Object.prototype.toString.call(i),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":s))}function Oy(s){var i=s._init;return i(s._payload)}function Iy(s){function i(H,$){if(s){var V=H.deletions;V===null?(H.deletions=[$],H.flags|=16):V.push($)}}function c(H,$){if(!s)return null;for(;$!==null;)i(H,$),$=$.sibling;return null}function p(H,$){for(H=new Map;$!==null;)$.key!==null?H.set($.key,$):H.set($.index,$),$=$.sibling;return H}function v(H,$){return H=Hs(H,$),H.index=0,H.sibling=null,H}function _(H,$,V){return H.index=V,s?(V=H.alternate,V!==null?(V=V.index,V<$?(H.flags|=2,$):V):(H.flags|=2,$)):(H.flags|=1048576,$)}
vendor: 22,798 bytes, lines 7-9
7function R(H){return s&&H.alternate===null&&(H.flags|=2),H}function P(H,$,V,fe){return $===null||$.tag!==6?($=Sh(V,H.mode,fe),$.return=H,$):($=v($,V),$.return=H,$)}function I(H,$,V,fe){var Te=V.type;return Te===D?le(H,$,V.props.children,fe,V.key):$!==null&&($.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===Q&&Oy(Te)===$.type)?(fe=v($,V.props),fe.ref=Pa(H,$,V),fe.return=H,fe):(fe=Xc(V.type,V.key,V.props,null,H.mode,fe),fe.ref=Pa(H,$,V),fe.return=H,fe)}function K(H,$,V,fe){return $===null||$.tag!==4||$.stateNode.containerInfo!==V.containerInfo||$.stateNode.implementation!==V.implementation?($=Eh(V,H.mode,fe),$.return=H,$):($=v($,V.children||[]),$.return=H,$)}function le(H,$,V,fe,Te){return $===null||$.tag!==7?($=bo(V,H.mode,fe,Te),$.return=H,$):($=v($,V),$.return=H,$)}function ue(H,$,V){if(typeof $=="string"&&$!==""||typeof $=="number")return $=Sh(""+$,H.mode,V),$.return=H,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case O:return V=Xc($.type,$.key,$.props,null,H.mode,V),V.ref=Pa(H,null,$),V.return=H,V;case M:return $=Eh($,H.mode,V),$.return=H,$;case Q:var fe=$._init;return ue(H,fe($._payload),V)}if(Ft($)||F($))return $=bo($,H.mode,V,null),$.return=H,$;Rc(H,$)}return null}function ae(H,$,V,fe){var Te=$!==null?$.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return Te!==null?null:P(H,$,""+V,fe);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case O:return V.key===Te?I(H,$,V,fe):null;case M:return V.key===Te?K(H,$,V,fe):null;case Q:return Te=V._init,ae(H,$,Te(V._payload),fe)}if(Ft(V)||F(V))return Te!==null?null:le(H,$,V,fe,null);Rc(H,V)}return null}function ye(H,$,V,fe,Te){if(typeof fe=="string"&&fe!==""||typeof fe=="number")return H=H.get(V)||null,P($,H,""+fe,Te);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case O:return H=H.get(fe.key===null?V:fe.key)||null,I($,H,fe,Te);case M:return H=H.get(fe.key===null?V:fe.key)||null,K($,H,fe,Te);case Q:var Oe=fe._init;return ye(H,$,V,Oe(fe._payload),Te)}if(Ft(fe)||F(fe))return H=H.get(V)||null,le($,H,fe,Te,null);Rc($,fe)}return null}function xe(H,$,V,fe){for(var Te=null,Oe=null,Ie=$,Fe=$=0,Xt=null;Ie!==null&&Fe<V.length;Fe++){Ie.index>Fe?(Xt=Ie,Ie=null):Xt=Ie.sibling;var Xe=ae(H,Ie,V[Fe],fe);if(Xe===null){Ie===null&&(Ie=Xt);break}s&&Ie&&Xe.alternate===null&&i(H,Ie),$=_(Xe,$,Fe),Oe===null?Te=Xe:Oe.sibling=Xe,Oe=Xe,Ie=Xt}if(Fe===V.length)return c(H,Ie),mt&&fo(H,Fe),Te;if(Ie===null){for(;Fe<V.length;Fe++)Ie=ue(H,V[Fe],fe),Ie!==null&&($=_(Ie,$,Fe),Oe===null?Te=Ie:Oe.sibling=Ie,Oe=Ie);return mt&&fo(H,Fe),Te}for(Ie=p(H,Ie);Fe<V.length;Fe++)Xt=ye(Ie,H,Fe,V[Fe],fe),Xt!==null&&(s&&Xt.alternate!==null&&Ie.delete(Xt.key===null?Fe:Xt.key),$=_(Xt,$,Fe),Oe===null?Te=Xt:Oe.sibling=Xt,Oe=Xt);return s&&Ie.forEach(function(Vs){return i(H,Vs)}),mt&&fo(H,Fe),Te}function Ee(H,$,V,fe){var Te=F(V);if(typeof Te!="function")throw Error(n(150));if(V=Te.call(V),V==null)throw Error(n(151));for(var Oe=Te=null,Ie=$,Fe=$=0,Xt=null,Xe=V.next();Ie!==null&&!Xe.done;Fe++,Xe=V.next()){Ie.index>Fe?(Xt=Ie,Ie=null):Xt=Ie.sibling;var Vs=ae(H,Ie,Xe.value,fe);if(Vs===null){Ie===null&&(Ie=Xt);break}s&&Ie&&Vs.alternate===null&&i(H,Ie),$=_(Vs,$,Fe),Oe===null?Te=Vs:Oe.sibling=Vs,Oe=Vs,Ie=Xt}if(Xe.done)return c(H,Ie),mt&&fo(H,Fe),Te;if(Ie===null){for(;!Xe.done;Fe++,Xe=V.next())Xe=ue(H,Xe.value,fe),Xe!==null&&($=_(Xe,$,Fe),Oe===null?Te=Xe:Oe.sibling=Xe,Oe=Xe);return mt&&fo(H,Fe),Te}for(Ie=p(H,Ie);!Xe.done;Fe++,Xe=V.next())Xe=ye(Ie,H,Fe,Xe.value,fe),Xe!==null&&(s&&Xe.alternate!==null&&Ie.delete(Xe.key===null?Fe:Xe.key),$=_(Xe,$,Fe),Oe===null?Te=Xe:Oe.sibling=Xe,Oe=Xe);return s&&Ie.forEach(function(O1){return i(H,O1)}),mt&&fo(H,Fe),Te}function At(H,$,V,fe){if(typeof V=="object"&&V!==null&&V.type===D&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case O:e:{for(var Te=V.key,Oe=$;Oe!==null;){if(Oe.key===Te){if(Te=V.type,Te===D){if(Oe.tag===7){c(H,Oe.sibling),$=v(Oe,V.props.children),$.return=H,H=$;break e}}else if(Oe.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===Q&&Oy(Te)===Oe.type){c(H,Oe.sibling),$=v(Oe,V.props),$.ref=Pa(H,Oe,V),$.return=H,H=$;break e}c(H,Oe);break}else i(H,Oe);Oe=Oe.sibling}V.type===D?($=bo(V.props.children,H.mode,fe,V.key),$.return=H,H=$):(fe=Xc(V.type,V.key,V.props,null,H.mode,fe),fe.ref=Pa(H,$,V),fe.return=H,H=fe)}return R(H);case M:e:{for(Oe=V.key;$!==null;){if($.key===Oe)if($.tag===4&&$.stateNode.containerInfo===V.containerInfo&&$.stateNode.implementation===V.implementation){c(H,$.sibling),$=v($,V.children||[]),$.return=H,H=$;break e}else{c(H,$);break}else i(H,$);$=$.sibling}$=Eh(V,H.mode,fe),$.return=H,H=$}return R(H);case Q:return Oe=V._init,At(H,$,Oe(V._payload),fe)}if(Ft(V))return xe(H,$,V,fe);if(F(V))return Ee(H,$,V,fe);Rc(H,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,$!==null&&$.tag===6?(c(H,$.sibling),$=v($,V),$.return=H,H=$):(c(H,$),$=Sh(V,H.mode,fe),$.return=H,H=$),R(H)):c(H,$)}return At}var hi=Iy(!0),Dy=Iy(!1),Ac=Os(null),jc=null,pi=null,Of=null;function If(){Of=pi=jc=null}function Df(s){var i=Ac.current;dt(Ac),s._currentValue=i}function Lf(s,i,c){for(;s!==null;){var p=s.alternate;if((s.childLanes&i)!==i?(s.childLanes|=i,p!==null&&(p.childLanes|=i)):p!==null&&(p.childLanes&i)!==i&&(p.childLanes|=i),s===c)break;s=s.return}}function mi(s,i){jc=s,Of=pi=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&i)!==0&&(Rn=!0),s.firstContext=null)}function sr(s){var i=s._currentValue;if(Of!==s)if(s={context:s,memoizedValue:i,next:null},pi===null){if(jc===null)throw Error(n(308));pi=s,jc.dependencies={lanes:0,firstContext:s}}else pi=pi.next=s;return i}var ho=null;function Mf(s){ho===null?ho=[s]:ho.push(s)}function Ly(s,i,c,p){var v=i.interleaved;return v===null?(c.next=c,Mf(i)):(c.next=v.next,v.next=c),i.interleaved=c,ls(s,p)}function ls(s,i){s.lanes|=i;var c=s.alternate;for(c!==null&&(c.lanes|=i),c=s,s=s.return;s!==null;)s.childLanes|=i,c=s.alternate,c!==null&&(c.childLanes|=i),c=s,s=s.return;return c.tag===3?c.stateNode:null}var Ls=!1;function $f(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function My(s,i){s=s.updateQueue,i.updateQueue===s&&(i.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function cs(s,i){return{eventTime:s,lane:i,tag:0,payload:null,callback:null,next:null}}function Ms(s,i,c){var p=s.updateQueue;if(p===null)return null;if(p=p.shared,(Ye&2)!==0){var v=p.pending;return v===null?i.next=i:(i.next=v.next,v.next=i),p.pending=i,ls(s,c)}return v=p.interleaved,v===null?(i.next=i,Mf(p)):(i.next=v.next,v.next=i),p.interleaved=i,ls(s,c)}function Pc(s,i,c){if(i=i.updateQueue,i!==null&&(i=i.shared,(c&4194240)!==0)){var p=i.lanes;p&=s.pendingLanes,c|=p,i.lanes=c,Xo(s,c)}}function $y(s,i){var c=s.updateQueue,p=s.alternate;if(p!==null&&(p=p.updateQueue,c===p)){var v=null,_=null;if(c=c.firstBaseUpdate,c!==null){do{var R={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};_===null?v=_=R:_=_.next=R,c=c.next}while(c!==null);_===null?v=_=i:_=_.next=i}else v=_=i;c={baseState:p.baseState,firstBaseUpdate:v,lastBaseUpdate:_,shared:p.shared,effects:p.effects},s.updateQueue=c;return}s=c.lastBaseUpdate,s===null?c.firstBaseUpdate=i:s.next=i,c.lastBaseUpdate=i}function Nc(s,i,c,p){var v=s.updateQueue;Ls=!1;var _=v.firstBaseUpdate,R=v.lastBaseUpdate,P=v.shared.pending;if(P!==null){v.shared.pending=null;var I=P,K=I.next;I.next=null,R===null?_=K:R.next=K,R=I;var le=s.alternate;le!==null&&(le=le.updateQueue,P=le.lastBaseUpdate,P!==R&&(P===null?le.firstBaseUpdate=K:P.next=K,le.lastBaseUpdate=I))}if(_!==null){var ue=v.baseState;R=0,le=K=I=null,P=_;do{var ae=P.lane,ye=P.eventTime;if((p&ae)===ae){le!==null&&(le=le.next={eventTime:ye,lane:0,tag:P.tag,payload:P.payload,callback:P.callback,next:null});e:{var xe=s,Ee=P;switch(ae=i,ye=c,Ee.tag){case 1:if(xe=Ee.payload,typeof xe=="function"){ue=xe.call(ye,ue,ae);break e}ue=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Ee.payload,ae=typeof xe=="function"?xe.call(ye,ue,ae):xe,ae==null)break e;ue=W({},ue,ae);break e;case 2:Ls=!0}}P.callback!==null&&P.lane!==0&&(s.flags|=64,ae=v.effects,ae===null?v.effects=[P]:ae.push(P))}else ye={eventTime:ye,lane:ae,tag:P.tag,payload:P.payload,callback:P.callback,next:null},le===null?(K=le=ye,I=ue):le=le.next=ye,R|=ae;if(P=P.next,P===null){if(P=v.shared.pending,P===null)break;ae=P,P=ae.next,ae.next=null,v.lastBaseUpdate=ae,v.shared.pending=null}}while(!0);if(le===null&&(I=ue),v.baseState=I,v.firstBaseUpdate=K,v.lastBaseUpdate=le,i=v.shared.interleaved,i!==null){v=i;do R|=v.lane,v=v.next;while(v!==i)}else _===null&&(v.shared.lanes=0);go|=R,s.lanes=R,s.memoizedState=ue}}function Fy(s,i,c){if(s=i.effects,i.effects=null,s!==null)for(i=0;i<s.length;i++){var p=s[i],v=p.callback;if(v!==null){if(p.callback=null,p=c,typeof v!="function")throw Error(n(191,v));v.call(p)}}}var Na={},Hr=Os(Na),Oa=Os(Na),Ia=Os(Na);function po(s){if(s===Na)throw Error(n(174));return s}function Ff(s,i){switch(ot(Ia,i),ot(Oa,s),ot(Hr,Na),s=i.nodeType,s){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:Ct(null,"");break;default:s=s===8?i.parentNode:i,i=s.namespaceURI||null,s=s.tagName,i=Ct(i,s)}dt(Hr),ot(Hr,i)}function gi(){dt(Hr),dt(Oa),dt(Ia)}function Uy(s){po(Ia.current);var i=po(Hr.current),c=Ct(i,s.type);i!==c&&(ot(Oa,s),ot(Hr,c))}function Uf(s){Oa.current===s&&(dt(Hr),dt(Oa))}var vt=Os(0);function Oc(s){for(var i=s;i!==null;){if(i.tag===13){var c=i.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var zf=[];function Bf(){for(var s=0;s<zf.length;s++)zf[s]._workInProgressVersionPrimary=null;zf.length=0}var Ic=j.ReactCurrentDispatcher,Hf=j.ReactCurrentBatchConfig,mo=0,wt=null,zt=null,Qt=null,Dc=!1,Da=!1,La=0,t1=0;function fn(){throw Error(n(321))}function Vf(s,i){if(i===null)return!1;for(var c=0;c<i.length&&c<s.length;c++)if(!yr(s[c],i[c]))return!1;return!0}function Wf(s,i,c,p,v,_){if(mo=_,wt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,Ic.current=s===null||s.memoizedState===null?o1:i1,s=c(p,v),Da){_=0;do{if(Da=!1,La=0,25<=_)throw Error(n(301));_+=1,Qt=zt=null,i.updateQueue=null,Ic.current=a1,s=c(p,v)}while(Da)}if(Ic.current=$c,i=zt!==null&&zt.next!==null,mo=0,Qt=zt=wt=null,Dc=!1,i)throw Error(n(300));return s}function qf(){var s=La!==0;return La=0,s}function Vr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?wt.memoizedState=Qt=s:Qt=Qt.next=s,Qt}function or(){if(zt===null){var s=wt.alternate;s=s!==null?s.memoizedState:null}else s=zt.next;var i=Qt===null?wt.memoizedState:Qt.next;if(i!==null)Qt=i,zt=s;else{if(s===null)throw Error(n(310));zt=s,s={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},Qt===null?wt.memoizedState=Qt=s:Qt=Qt.next=s}return Qt}function Ma(s,i){return typeof i=="function"?i(s):i}function Gf(s){var i=or(),c=i.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=s;var p=zt,v=p.baseQueue,_=c.pending;if(_!==null){if(v!==null){var R=v.next;v.next=_.next,_.next=R}p.baseQueue=v=_,c.pending=null}if(v!==null){_=v.next,p=p.baseState;var P=R=null,I=null,K=_;do{var le=K.lane;if((mo&le)===le)I!==null&&(I=I.next={lane:0,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),p=K.hasEagerState?K.eagerState:s(p,K.action);else{var ue={lane:le,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null};I===null?(P=I=ue,R=p):I=I.next=ue,wt.lanes|=le,go|=le}K=K.next}while(K!==null&&K!==_);I===null?R=p:I.next=P,yr(p,i.memoizedState)||(Rn=!0),i.memoizedState=p,i.baseState=R,i.baseQueue=I,c.lastRenderedState=p}if(s=c.interleaved,s!==null){v=s;do _=v.lane,wt.lanes|=_,go|=_,v=v.next;while(v!==s)}else v===null&&(c.lanes=0);return[i.memoizedState,c.dispatch]}function Kf(s){var i=or(),c=i.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=s;var p=c.dispatch,v=c.pending,_=i.memoizedState;if(v!==null){c.pending=null;var R=v=v.next;do _=s(_,R.action),R=R.next;while(R!==v);yr(_,i.memoizedState)||(Rn=!0),i.memoizedState=_,i.baseQueue===null&&(i.baseState=_),c.lastRenderedState=_}return[_,p]}function zy(){}function By(s,i){var c=wt,p=or(),v=i(),_=!yr(p.memoizedState,v);if(_&&(p.memoizedState=v,Rn=!0),p=p.queue,Yf(Wy.bind(null,c,p,s),[s]),p.getSnapshot!==i||_||Qt!==null&&Qt.memoizedState.tag&1){if(c.flags|=2048,$a(9,Vy.bind(null,c,p,v,i),void 0,null),Jt===null)throw Error(n(349));(mo&30)!==0||Hy(c,i,v)}return v}function Hy(s,i,c){s.flags|=16384,s={getSnapshot:i,value:c},i=wt.updateQueue,i===null?(i={lastEffect:null,stores:null},wt.updateQueue=i,i.stores=[s]):(c=i.stores,c===null?i.stores=[s]:c.push(s))}function Vy(s,i,c,p){i.value=c,i.getSnapshot=p,qy(i)&&Gy(s)}function Wy(s,i,c){return c(function(){qy(i)&&Gy(s)})}function qy(s){var i=s.getSnapshot;s=s.value;try{var c=i();return!yr(s,c)}catch{return!0}}function Gy(s){var i=ls(s,1);i!==null&&_r(i,s,1,-1)}function Ky(s){var i=Vr();return typeof s=="function"&&(s=s()),i.memoizedState=i.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:s},i.queue=s,s=s.dispatch=s1.bind(null,wt,s),[i.memoizedState,s]}function $a(s,i,c,p){return s={tag:s,create:i,destroy:c,deps:p,next:null},i=wt.updateQueue,i===null?(i={lastEffect:null,stores:null},wt.updateQueue=i,i.lastEffect=s.next=s):(c=i.lastEffect,c===null?i.lastEffect=s.next=s:(p=c.next,c.next=s,s.next=p,i.lastEffect=s)),s}function Yy(){return or().memoizedState}function Lc(s,i,c,p){var v=Vr();wt.flags|=s,v.memoizedState=$a(1|i,c,void 0,p===void 0?null:p)}function Mc(s,i,c,p){var v=or();p=p===void 0?null:p;var _=void 0;if(zt!==null){var R=zt.memoizedState;if(_=R.destroy,p!==null&&Vf(p,R.deps)){v.memoizedState=$a(i,c,_,p);return}}wt.flags|=s,v.memoizedState=$a(1|i,c,_,p)}function Qy(s,i){return Lc(8390656,8,s,i)}function Yf(s,i){return Mc(2048,8,s,i)}function Jy(s,i){return Mc(4,2,s,i)}function Xy(s,i){return Mc(4,4,s,i)}function Zy(s,i){if(typeof i=="function")return s=s(),i(s),function(){i(null)};if(i!=null)return s=s(),i.current=s,function(){i.current=null}}function ev(s,i,c){return c=c!=null?c.concat([s]):null,Mc(4,4,Zy.bind(null,i,s),c)}function Qf(){}function tv(s,i){var c=or();i=i===void 0?null:i;var p=c.memoizedState;return p!==null&&i!==null&&Vf(i,p[1])?p[0]:(c.memoizedState=[s,i],s)}function nv(s,i){var c=or();i=i===void 0?null:i;var p=c.memoizedState;return p!==null&&i!==null&&Vf(i,p[1])?p[0]:(s=s(),c.memoizedState=[s,i],s)}function rv(s,i,c){return(mo&21)===0?(s.baseState&&(s.baseState=!1,Rn=!0),s.memoizedState=c):(yr(c,i)||(c=sc(),wt.lanes|=c,go|=c,s.baseState=!0),i)}function n1(s,i){var c=et;et=c!==0&&4>c?c:4,s(!0);var p=Hf.transition;Hf.transition={};try{s(!1),i()}finally{et=c,Hf.transition=p}}function sv(){return or().memoizedState}function r1(s,i,c){var p=zs(s);if(c={lane:p,action:c,hasEagerState:!1,eagerState:null,next:null},ov(s))iv(i,c);else if(c=Ly(s,i,c,p),c!==null){var v=_n();_r(c,s,p,v),av(c,i,p)}}function s1(s,i,c){var p=zs(s),v={lane:p,action:c,hasEagerState:!1,eagerState:null,next:null};if(ov(s))iv(i,v);else{var _=s.alternate;if(s.lanes===0&&(_===null||_.lanes===0)&&(_=i.lastRenderedReducer,_!==null))try{var R=i.lastRenderedState,P=_(R,c);if(v.hasEagerState=!0,v.eagerState=P,yr(P,R)){var I=i.interleaved;I===null?(v.next=v,Mf(i)):(v.next=I.next,I.next=v),i.interleaved=v;return}}catch{}c=Ly(s,i,v,p),c!==null&&(v=_n(),_r(c,s,p,v),av(c,i,p))}}function ov(s){var i=s.alternate;return s===wt||i!==null&&i===wt}function iv(s,i){Da=Dc=!0;var c=s.pending;c===null?i.next=i:(i.next=c.next,c.next=i),s.pending=i}function av(s,i,c){if((c&4194240)!==0){var p=i.lanes;p&=s.pendingLanes,c|=p,i.lanes=c,Xo(s,c)}}var $c={readContext:sr,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useInsertionEffect:fn,useLayoutEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useMutableSource:fn,useSyncExternalStore:fn,useId:fn,unstable_isNewReconciler:!1},o1={readContext:sr,useCallback:function(s,i){return Vr().memoizedState=[s,i===void 0?null:i],s},useContext:sr,useEffect:Qy,useImperativeHandle:function(s,i,c){return c=c!=null?c.concat([s]):null,Lc(4194308,4,Zy.bind(null,i,s),c)},useLayoutEffect:function(s,i){return Lc(4194308,4,s,i)},useInsertionEffect:function(s,i){return Lc(4,2,s,i)},useMemo:function(s,i){var c=Vr();return i=i===void 0?null:i,s=s(),c.memoizedState=[s,i],s},useReducer:function(s,i,c){var p=Vr();return i=c!==void 0?c(i):i,p.memoizedState=p.baseState=i,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:i},p.queue=s,s=s.dispatch=r1.bind(null,wt,s),[p.memoizedState,s]},useRef:function(s){var i=Vr();return s={current:s},i.memoizedState=s},useState:Ky,useDebugValue:Qf,useDeferredValue:function(s){return Vr().memoizedState=s},useTransition:function(){var s=Ky(!1),i=s[0];return s=n1.bind(null,s[1]),Vr().memoizedState=s,[i,s]},useMutableSource:function(){},useSyncExternalStore:function(s,i,c){var p=wt,v=Vr();if(mt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=i(),Jt===null)throw Error(n(349));(mo&30)!==0||Hy(p,i,c)}v.memoizedState=c;var _={value:c,getSnapshot:i};return v.queue=_,Qy(Wy.bind(null,p,_,s),[s]),p.flags|=2048,$a(9,Vy.bind(null,p,_,c,i),void 0,null),c},useId:function(){var s=Vr(),i=Jt.identifierPrefix;if(mt){var c=as,p=is;c=(p&~(1<<32-Fn(p)-1)).toString(32)+c,i=":"+i+"R"+c,c=La++,0<c&&(i+="H"+c.toString(32)),i+=":"}else c=t1++,i=":"+i+"r"+c.toString(32)+":";return s.memoizedState=i},unstable_isNewReconciler:!1},i1={readContext:sr,useCallback:tv,useContext:sr,useEffect:Yf,useImperativeHandle:ev,useInsertionEffect:Jy,useLayoutEffect:Xy,useMemo:nv,useReducer:Gf,useRef:Yy,useState:function(){return Gf(Ma)},useDebugValue:Qf,useDeferredValue:function(s){var i=or();return rv(i,zt.memoizedState,s)},useTransition:function(){var s=Gf(Ma)[0],i=or().memoizedState;return[s,i]},useMutableSource:zy,useSyncExternalStore:By,useId:sv,unstable_isNewReconciler:!1},a1={readContext:sr,useCallback:tv,useContext:sr,useEffect:Yf,useImperativeHandle:ev,useInsertionEffect:Jy,useLayoutEffect:Xy,useMemo:nv,useReducer:Kf,useRef:Yy,useState:function(){return Kf(Ma)},useDebugValue:Qf,useDeferredValue:function(s){var i=or();return zt===null?i.memoizedState=s:rv(i,zt.memoizedState,s)},useTransition:function(){var s=Kf(Ma)[0],i=or().memoizedState;return[s,i]},useMutableSource:zy,useSyncExternalStore:By,useId:sv,unstable_isNewReconciler:!1};function wr(s,i){if(s&&s.defaultProps){i=W({},i),s=s.defaultProps;for(var c in s)i[c]===void 0&&(i[c]=s[c]);return i}return i}function Jf(s,i,c,p){i=s.memoizedState,c=c(p,i),c=c==null?i:W({},i,c),s.memoizedState=c,s.lanes===0&&(s.updateQueue.baseState=c)}var Fc={isMounted:function(s){return(s=s._reactInternals)?ns(s)===s:!1},enqueueSetState:function(s,i,c){s=s._reactInternals;var p=_n(),v=zs(s),_=cs(p,v);_.payload=i,c!=null&&(_.callback=c),i=Ms(s,_,v),i!==null&&(_r(i,s,v,p),Pc(i,s,v))},enqueueReplaceState:function(s,i,c){s=s._reactInternals;var p=_n(),v=zs(s),_=cs(p,v);_.tag=1,_.payload=i,c!=null&&(_.callback=c),i=Ms(s,_,v),i!==null&&(_r(i,s,v,p),Pc(i,s,v))},enqueueForceUpdate:function(s,i){s=s._reactInternals;var c=_n(),p=zs(s),v=cs(c,p);v.tag=2,i!=null&&(v.callback=i),i=Ms(s,v,p),i!==null&&(_r(i,s,p,c),Pc(i,s,p))}};function lv(s,i,c,p,v,_,R){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(p,_,R):i.prototype&&i.prototype.isPureReactComponent?!Ea(c,p)||!Ea(v,_):!0}function cv(s,i,c){var p=!1,v=Is,_=i.contextType;return typeof _=="object"&&_!==null?_=sr(_):(v=Cn(i)?co:dn.current,p=i.contextTypes,_=(p=p!=null)?ci(s,v):Is),i=new i(c,_),s.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Fc,s.stateNode=i,i._reactInternals=s,p&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=v,s.__reactInternalMemoizedMaskedChildContext=_),i}function uv(s,i,c,p){s=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(c,p),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(c,p),i.state!==s&&Fc.enqueueReplaceState(i,i.state,null)}function Xf(s,i,c,p){var v=s.stateNode;v.props=c,v.state=s.memoizedState,v.refs={},$f(s);var _=i.contextType;typeof _=="object"&&_!==null?v.context=sr(_):(_=Cn(i)?co:dn.current,v.context=ci(s,_)),v.state=s.memoizedState,_=i.getDerivedStateFromProps,typeof _=="function"&&(Jf(s,i,_,c),v.state=s.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(i=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),i!==v.state&&Fc.enqueueReplaceState(v,v.state,null),Nc(s,c,v,p),v.state=s.memoizedState),typeof v.componentDidMount=="function"&&(s.flags|=4194308)}function yi(s,i){try{var c="",p=i;do c+=me(p),p=p.return;while(p);var v=c}catch(_){v=` 8Error generating stack: `+_.message+` 9`+_.stack}return{value:s,source:i,stack:v,digest:null}}function Zf(s,i,c){return{value:s,source:null,stack:c??null,digest:i??null}}function eh(s,i){try{console.error(i.value)}catch(c){setTimeout(function(){throw c})}}var l1=typeof WeakMap=="function"?WeakMap:Map;function dv(s,i,c){c=cs(-1,c),c.tag=3,c.payload={element:null};var p=i.value;return c.callback=function(){qc||(qc=!0,mh=p),eh(s,i)},c}function fv(s,i,c){c=cs(-1,c),c.tag=3;var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var v=i.value;c.payload=function(){return p(v)},c.callback=function(){eh(s,i)}}var _=s.stateNode;return _!==null&&typeof _.componentDidCatch=="function"&&(c.callback=function(){eh(s,i),typeof p!="function"&&(Fs===null?Fs=new Set([this]):Fs.add(this));var R=i.stack;this.componentDidCatch(i.value,{componentStack:R!==null?R:""})}),c}function hv(s,i,c){var p=s.pingCache;if(p===null){p=s.pingCache=new l1;var v=new Set;p.set(i,v)}else v=p.get(i),v===void 0&&(v=new Set,p.set(i,v));v.has(c)||(v.add(c),s=_1.bind(null,s,i,c),i.then(s,s))}function pv(s){do{var i;if((i=s.tag===13)&&(i=s.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return s;s=s.return}while(s!==null);return null}function mv(s,i,c,p,v){return(s.mode&1)===0?(s===i?s.flags|=65536:(s.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(i=cs(-1,1),i.tag=2,Ms(c,i,1
vendor: 6,189 bytes, line 9
9))),c.lanes|=1),s):(s.flags|=65536,s.lanes=v,s)}var c1=j.ReactCurrentOwner,Rn=!1;function xn(s,i,c,p){i.child=s===null?Dy(i,null,c,p):hi(i,s.child,c,p)}function gv(s,i,c,p,v){c=c.render;var _=i.ref;return mi(i,v),p=Wf(s,i,c,p,_,v),c=qf(),s!==null&&!Rn?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~v,us(s,i,v)):(mt&&c&&Rf(i),i.flags|=1,xn(s,i,p,v),i.child)}function yv(s,i,c,p,v){if(s===null){var _=c.type;return typeof _=="function"&&!_h(_)&&_.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(i.tag=15,i.type=_,vv(s,i,_,p,v)):(s=Xc(c.type,null,p,i,i.mode,v),s.ref=i.ref,s.return=i,i.child=s)}if(_=s.child,(s.lanes&v)===0){var R=_.memoizedProps;if(c=c.compare,c=c!==null?c:Ea,c(R,p)&&s.ref===i.ref)return us(s,i,v)}return i.flags|=1,s=Hs(_,p),s.ref=i.ref,s.return=i,i.child=s}function vv(s,i,c,p,v){if(s!==null){var _=s.memoizedProps;if(Ea(_,p)&&s.ref===i.ref)if(Rn=!1,i.pendingProps=p=_,(s.lanes&v)!==0)(s.flags&131072)!==0&&(Rn=!0);else return i.lanes=s.lanes,us(s,i,v)}return th(s,i,c,p,v)}function wv(s,i,c){var p=i.pendingProps,v=p.children,_=s!==null?s.memoizedState:null;if(p.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},ot(wi,Hn),Hn|=c;else{if((c&1073741824)===0)return s=_!==null?_.baseLanes|c:c,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:s,cachePool:null,transitions:null},i.updateQueue=null,ot(wi,Hn),Hn|=s,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=_!==null?_.baseLanes:c,ot(wi,Hn),Hn|=p}else _!==null?(p=_.baseLanes|c,i.memoizedState=null):p=c,ot(wi,Hn),Hn|=p;return xn(s,i,v,c),i.child}function bv(s,i){var c=i.ref;(s===null&&c!==null||s!==null&&s.ref!==c)&&(i.flags|=512,i.flags|=2097152)}function th(s,i,c,p,v){var _=Cn(c)?co:dn.current;return _=ci(i,_),mi(i,v),c=Wf(s,i,c,p,_,v),p=qf(),s!==null&&!Rn?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~v,us(s,i,v)):(mt&&p&&Rf(i),i.flags|=1,xn(s,i,c,v),i.child)}function xv(s,i,c,p,v){if(Cn(c)){var _=!0;Sc(i)}else _=!1;if(mi(i,v),i.stateNode===null)zc(s,i),cv(i,c,p),Xf(i,c,p,v),p=!0;else if(s===null){var R=i.stateNode,P=i.memoizedProps;R.props=P;var I=R.context,K=c.contextType;typeof K=="object"&&K!==null?K=sr(K):(K=Cn(c)?co:dn.current,K=ci(i,K));var le=c.getDerivedStateFromProps,ue=typeof le=="function"||typeof R.getSnapshotBeforeUpdate=="function";ue||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(P!==p||I!==K)&&uv(i,R,p,K),Ls=!1;var ae=i.memoizedState;R.state=ae,Nc(i,p,R,v),I=i.memoizedState,P!==p||ae!==I||Tn.current||Ls?(typeof le=="function"&&(Jf(i,c,le,p),I=i.memoizedState),(P=Ls||lv(i,c,P,p,ae,I,K))?(ue||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(i.flags|=4194308)):(typeof R.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=p,i.memoizedState=I),R.props=p,R.state=I,R.context=K,p=P):(typeof R.componentDidMount=="function"&&(i.flags|=4194308),p=!1)}else{R=i.stateNode,My(s,i),P=i.memoizedProps,K=i.type===i.elementType?P:wr(i.type,P),R.props=K,ue=i.pendingProps,ae=R.context,I=c.contextType,typeof I=="object"&&I!==null?I=sr(I):(I=Cn(c)?co:dn.current,I=ci(i,I));var ye=c.getDerivedStateFromProps;(le=typeof ye=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(P!==ue||ae!==I)&&uv(i,R,p,I),Ls=!1,ae=i.memoizedState,R.state=ae,Nc(i,p,R,v);var xe=i.memoizedState;P!==ue||ae!==xe||Tn.current||Ls?(typeof ye=="function"&&(Jf(i,c,ye,p),xe=i.memoizedState),(K=Ls||lv(i,c,K,p,ae,xe,I)||!1)?(le||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(p,xe,I),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(p,xe,I)),typeof R.componentDidUpdate=="function"&&(i.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof R.componentDidUpdate!="function"||P===s.memoizedProps&&ae===s.memoizedState||(i.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||P===s.memoizedProps&&ae===s.memoizedState||(i.flags|=1024),i.memoizedProps=p,i.memoizedState=xe),R.props=p,R.state=xe,R.context=I,p=K):(typeof R.componentDidUpdate!="function"||P===s.memoizedProps&&ae===s.memoizedState||(i.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||P===s.memoizedProps&&ae===s.memoizedState||(i.flags|=1024),p=!1)}return nh(s,i,c,p,_,v)}function nh(s,i,c,p,v,_){bv(s,i);var R=(i.flags&128)!==0;if(!p&&!R)return v&&Ty(i,c,!1),us(s,i,_);p=i.stateNode,c1.current=i;var P=R&&typeof c.getDerivedStateFromError!="function"?null:p.render();return i.flags|=1,s!==null&&R?(i.child=hi(i,s.child,null,_),i.child=hi(i,null,P,_)):xn(s,i,P,_),i.memoizedState=p.state,v&&Ty(i,c,!0),i.child}function _v(s){var i=s.stateNode;i.pendingContext?Ey(s,i.pendingContext,i.pendingContext!==i.context):i.context&&Ey(s,i.context,!1),Ff(s,i.containerInfo)}function Sv(s,i,c,p,v){return fi(),Nf(v),i.flags|=256,xn(s,i,c,p),i.child}var rh={dehydrated:null,treeContext:null,retryLane:0};function sh(s){return{baseLanes:s,cachePool:null,transitions:null}}function Ev(s,i,c){var p=i.pendingProps,v=vt.current,_=!1,R=(i.flags&128)!==0,P;if((P=R)||(P=s!==null&&s.memoizedState===null?!1:(v&2)!==0),P?(_=!0,i.flags&=-129):(s===null||s.memoizedState!==null)&&(v|=1),ot(vt,v&1),s===null)return Pf(i),s=i.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((i.mode&1)===0?i.lanes=1:s.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(R=p.children,s=p.fallback,_?(p=i.mode,_=i.child,R={mode:"hidden",children:R},(p&1)===0&&_!==null?(_.childLanes=0,_.pendingProps=R):_=Zc(R,p,0,null),s=bo(s,p,c,null),_.return=i,s.return=i,_.sibling=s,i.child=_,i.child.memoizedState=sh(c),i.memoizedState=rh,s):oh(i,R));if(v=s.memoizedState,v!==null&&(P=v.dehydrated,P!==null))return u1(s,i,R,p,P,v,c);if(_){_=p.fallback,R=i.mode,v=s.child,P=v.sibling;var I={mode:"hidden",children:p.children};
vendor: 6,525 bytes, line 9
9return(R&1)===0&&i.child!==v?(p=i.child,p.childLanes=0,p.pendingProps=I,i.deletions=null):(p=Hs(v,I),p.subtreeFlags=v.subtreeFlags&14680064),P!==null?_=Hs(P,_):(_=bo(_,R,c,null),_.flags|=2),_.return=i,p.return=i,p.sibling=_,i.child=p,p=_,_=i.child,R=s.child.memoizedState,R=R===null?sh(c):{baseLanes:R.baseLanes|c,cachePool:null,transitions:R.transitions},_.memoizedState=R,_.childLanes=s.childLanes&~c,i.memoizedState=rh,p}return _=s.child,s=_.sibling,p=Hs(_,{mode:"visible",children:p.children}),(i.mode&1)===0&&(p.lanes=c),p.return=i,p.sibling=null,s!==null&&(c=i.deletions,c===null?(i.deletions=[s],i.flags|=16):c.push(s)),i.child=p,i.memoizedState=null,p}function oh(s,i){return i=Zc({mode:"visible",children:i},s.mode,0,null),i.return=s,s.child=i}function Uc(s,i,c,p){return p!==null&&Nf(p),hi(i,s.child,null,c),s=oh(i,i.pendingProps.children),s.flags|=2,i.memoizedState=null,s}function u1(s,i,c,p,v,_,R){if(c)return i.flags&256?(i.flags&=-257,p=Zf(Error(n(422))),Uc(s,i,R,p)):i.memoizedState!==null?(i.child=s.child,i.flags|=128,null):(_=p.fallback,v=i.mode,p=Zc({mode:"visible",children:p.children},v,0,null),_=bo(_,v,R,null),_.flags|=2,p.return=i,_.return=i,p.sibling=_,i.child=p,(i.mode&1)!==0&&hi(i,s.child,null,R),i.child.memoizedState=sh(R),i.memoizedState=rh,_);if((i.mode&1)===0)return Uc(s,i,R,null);if(v.data==="$!"){if(p=v.nextSibling&&v.nextSibling.dataset,p)var P=p.dgst;return p=P,_=Error(n(419)),p=Zf(_,p,void 0),Uc(s,i,R,p)}if(P=(R&s.childLanes)!==0,Rn||P){if(p=Jt,p!==null){switch(R&-R){case 4:v=2;break;case 16:v=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:v=32;break;case 536870912:v=268435456;break;default:v=0}v=(v&(p.suspendedLanes|R))!==0?0:v,v!==0&&v!==_.retryLane&&(_.retryLane=v,ls(s,v),_r(p,s,v,-1))}return xh(),p=Zf(Error(n(421))),Uc(s,i,R,p)}return v.data==="$?"?(i.flags|=128,i.child=s.child,i=S1.bind(null,s),v._reactRetry=i,null):(s=_.treeContext,Bn=Ns(v.nextSibling),zn=i,mt=!0,vr=null,s!==null&&(nr[rr++]=is,nr[rr++]=as,nr[rr++]=uo,is=s.id,as=s.overflow,uo=i),i=oh(i,p.children),i.flags|=4096,i)}function kv(s,i,c){s.lanes|=i;var p=s.alternate;p!==null&&(p.lanes|=i),Lf(s.return,i,c)}function ih(s,i,c,p,v){var _=s.memoizedState;_===null?s.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:p,tail:c,tailMode:v}:(_.isBackwards=i,_.rendering=null,_.renderingStartTime=0,_.last=p,_.tail=c,_.tailMode=v)}function Tv(s,i,c){var p=i.pendingProps,v=p.revealOrder,_=p.tail;if(xn(s,i,p.children,c),p=vt.current,(p&2)!==0)p=p&1|2,i.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=i.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&kv(s,c,i);else if(s.tag===19)kv(s,c,i);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}p&=1}if(ot(vt,p),(i.mode&1)===0)i.memoizedState=null;else switch(v){case"forwards":for(c=i.child,v=null;c!==null;)s=c.alternate,s!==null&&Oc(s)===null&&(v=c),c=c.sibling;c=v,c===null?(v=i.child,i.child=null):(v=c.sibling,c.sibling=null),ih(i,!1,v,c,_);break;case"backwards":for(c=null,v=i.child,i.child=null;v!==null;){if(s=v.alternate,s!==null&&Oc(s)===null){i.child=v;break}s=v.sibling,v.sibling=c,c=v,v=s}ih(i,!0,c,null,_);break;case"together":ih(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function zc(s,i){(i.mode&1)===0&&s!==null&&(s.alternate=null,i.alternate=null,i.flags|=2)}function us(s,i,c){if(s!==null&&(i.dependencies=s.dependencies),go|=i.lanes,(c&i.childLanes)===0)return null;if(s!==null&&i.child!==s.child)throw Error(n(153));if(i.child!==null){for(s=i.child,c=Hs(s,s.pendingProps),i.child=c,c.return=i;s.sibling!==null;)s=s.sibling,c=c.sibling=Hs(s,s.pendingProps),c.return=i;c.sibling=null}return i.child}function d1(s,i,c){switch(i.tag){case 3:_v(i),fi();break;case 5:Uy(i);break;case 1:Cn(i.type)&&Sc(i);break;case 4:Ff(i,i.stateNode.containerInfo);break;case 10:var p=i.type._context,v=i.memoizedProps.value;ot(Ac,p._currentValue),p._currentValue=v;break;case 13:if(p=i.memoizedState,p!==null)return p.dehydrated!==null?(ot(vt,vt.current&1),i.flags|=128,null):(c&i.child.childLanes)!==0?Ev(s,i,c):(ot(vt,vt.current&1),s=us(s,i,c),s!==null?s.sibling:null);ot(vt,vt.current&1);break;case 19:if(p=(c&i.childLanes)!==0,(s.flags&128)!==0){if(p)return Tv(s,i,c);i.flags|=128}if(v=i.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),ot(vt,vt.current),p)break;return null;case 22:case 23:return i.lanes=0,wv(s,i,c)}return us(s,i,c)}var Cv,ah,Rv,Av;Cv=function(s,i){for(var c=i.child;c!==null;){if(c.tag===5||c.tag===6)s.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===i)break;for(;c.sibling===null;){if(c.return===null||c.return===i)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},ah=function(){},Rv=function(s,i,c,p){var v=s.memoizedProps;if(v!==p){s=i.stateNode,po(Hr.current);var _=null;switch(c){case"input":v=De(s,v),p=De(s,p),_=[];break;case"select":v=W({},v,{value:void 0}),p=W({},p,{value:void 0}),_=[];break;case"textarea":v=Mn(s,v),p=Mn(s,p),_=[];break;default:typeof v.onClick!="function"&&typeof p.onClick=="function"&&(s.onclick=bc)}wn(c,p);var R;c=null;for(K in v)if(!p.hasOwnProperty(K)&&v.hasOwnProperty(K)&&v[K]!=null)if(K==="style"){var P=v[K];for(R in P)P.hasOwnProperty(R)&&(c||(c={}),c[R]="")}else K!=="dangerouslySetInnerHTML"&&K!=="children"&&K!=="suppressContentEditableWarning"&&K!=="suppressHydrationWarning"&&K!=="autoFocus"&&(o.hasOwnProperty(K)?_||(_=[]):(_=_||[]).push(K,null));for(K in p){var I=p[K];if(P=v?.[K],p.hasOwnProperty(K)&&I!==P&&(I!=null||P!=null))if(K==="style")if(P){for(R in P)!P.hasOwnProperty(R)||I&&I.hasOwnProperty(R)||(c||(c={}),c[R]="");for(R in I)I.hasOwnProperty(R)&&P[R]!==I[R]&&(c||(c={}),c[R]=I[R])}else c||(_||(_=[]),_.push(K,c)),c=I;else K==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,P=P?P.__html:void 0,I!=null&&P!==I&&(_=_||[]).push(K,I)):K==="children"?typeof I!="string"&&typeof I!="number"||(_=_||[]).push(K,""+I):K!=="suppressContentEditableWarning"&&K!=="suppressHydrationWarning"&&(o.hasOwnProperty(K)?(I!=null&&K==="onScroll"&&ut("scroll",s),_||P===I||(_=[])):(_=_||[]).push(K,I))}c&&(_=_||[]).push("style",c);var K=_;(i.updateQueue=K)&&(i.flags|=4)}},Av=function(s,i,c,p){c!==p&&(i.flags|=4)};
vendor: 9,108 bytes, line 9
9function Fa(s,i){if(!mt)switch(s.tailMode){case"hidden":i=s.tail;for(var c=null;i!==null;)i.alternate!==null&&(c=i),i=i.sibling;c===null?s.tail=null:c.sibling=null;break;case"collapsed":c=s.tail;for(var p=null;c!==null;)c.alternate!==null&&(p=c),c=c.sibling;p===null?i||s.tail===null?s.tail=null:s.tail.sibling=null:p.sibling=null}}function hn(s){var i=s.alternate!==null&&s.alternate.child===s.child,c=0,p=0;if(i)for(var v=s.child;v!==null;)c|=v.lanes|v.childLanes,p|=v.subtreeFlags&14680064,p|=v.flags&14680064,v.return=s,v=v.sibling;else for(v=s.child;v!==null;)c|=v.lanes|v.childLanes,p|=v.subtreeFlags,p|=v.flags,v.return=s,v=v.sibling;return s.subtreeFlags|=p,s.childLanes=c,i}function f1(s,i,c){var p=i.pendingProps;switch(Af(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(i),null;case 1:return Cn(i.type)&&_c(),hn(i),null;case 3:return p=i.stateNode,gi(),dt(Tn),dt(dn),Bf(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(s===null||s.child===null)&&(Cc(i)?i.flags|=4:s===null||s.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,vr!==null&&(vh(vr),vr=null))),ah(s,i),hn(i),null;case 5:Uf(i);var v=po(Ia.current);if(c=i.type,s!==null&&i.stateNode!=null)Rv(s,i,c,p,v),s.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!p){if(i.stateNode===null)throw Error(n(166));return hn(i),null}if(s=po(Hr.current),Cc(i)){p=i.stateNode,c=i.type;var _=i.memoizedProps;switch(p[Br]=i,p[Aa]=_,s=(i.mode&1)!==0,c){case"dialog":ut("cancel",p),ut("close",p);break;case"iframe":case"object":case"embed":ut("load",p);break;case"video":case"audio":for(v=0;v<Ta.length;v++)ut(Ta[v],p);break;case"source":ut("error",p);break;case"img":case"image":case"link":ut("error",p),ut("load",p);break;case"details":ut("toggle",p);break;case"input":ht(p,_),ut("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!_.multiple},ut("invalid",p);break;case"textarea":Wt(p,_),ut("invalid",p)}wn(c,_),v=null;for(var R in _)if(_.hasOwnProperty(R)){var P=_[R];R==="children"?typeof P=="string"?p.textContent!==P&&(_.suppressHydrationWarning!==!0&&wc(p.textContent,P,s),v=["children",P]):typeof P=="number"&&p.textContent!==""+P&&(_.suppressHydrationWarning!==!0&&wc(p.textContent,P,s),v=["children",""+P]):o.hasOwnProperty(R)&&P!=null&&R==="onScroll"&&ut("scroll",p)}switch(c){case"input":He(p),at(p,_,!0);break;case"textarea":He(p),Mr(p);break;case"select":case"option":break;default:typeof _.onClick=="function"&&(p.onclick=bc)}p=v,i.updateQueue=p,p!==null&&(i.flags|=4)}else{R=v.nodeType===9?v:v.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=st(c)),s==="http://www.w3.org/1999/xhtml"?c==="script"?(s=R.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof p.is=="string"?s=R.createElement(c,{is:p.is}):(s=R.createElement(c),c==="select"&&(R=s,p.multiple?R.multiple=!0:p.size&&(R.size=p.size))):s=R.createElementNS(s,c),s[Br]=i,s[Aa]=p,Cv(s,i,!1,!1),i.stateNode=s;e:{switch(R=$r(c,p),c){case"dialog":ut("cancel",s),ut("close",s),v=p;break;case"iframe":case"object":case"embed":ut("load",s),v=p;break;case"video":case"audio":for(v=0;v<Ta.length;v++)ut(Ta[v],s);v=p;break;case"source":ut("error",s),v=p;break;case"img":case"image":case"link":ut("error",s),ut("load",s),v=p;break;case"details":ut("toggle",s),v=p;break;case"input":ht(s,p),v=De(s,p),ut("invalid",s);break;case"option":v=p;break;case"select":s._wrapperState={wasMultiple:!!p.multiple},v=W({},p,{value:void 0}),ut("invalid",s);break;case"textarea":Wt(s,p),v=Mn(s,p),ut("invalid",s);break;default:v=p}wn(c,v),P=v;for(_ in P)if(P.hasOwnProperty(_)){var I=P[_];_==="style"?un(s,I):_==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,I!=null&&Jn(s,I)):_==="children"?typeof I=="string"?(c!=="textarea"||I!=="")&&_t(s,I):typeof I=="number"&&_t(s,""+I):_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&_!=="autoFocus"&&(o.hasOwnProperty(_)?I!=null&&_==="onScroll"&&ut("scroll",s):I!=null&&C(s,_,I,R))}switch(c){case"input":He(s),at(s,p,!1);break;case"textarea":He(s),Mr(s);break;case"option":p.value!=null&&s.setAttribute("value",""+ke(p.value));break;case"select":s.multiple=!!p.multiple,_=p.value,_!=null?nt(s,!!p.multiple,_,!1):p.defaultValue!=null&&nt(s,!!p.multiple,p.defaultValue,!0);break;default:typeof v.onClick=="function"&&(s.onclick=bc)}switch(c){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}}p&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return hn(i),null;case 6:if(s&&i.stateNode!=null)Av(s,i,s.memoizedProps,p);else{if(typeof p!="string"&&i.stateNode===null)throw Error(n(166));if(c=po(Ia.current),po(Hr.current),Cc(i)){if(p=i.stateNode,c=i.memoizedProps,p[Br]=i,(_=p.nodeValue!==c)&&(s=zn,s!==null))switch(s.tag){case 3:wc(p.nodeValue,c,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&wc(p.nodeValue,c,(s.mode&1)!==0)}_&&(i.flags|=4)}else p=(c.nodeType===9?c:c.ownerDocument).createTextNode(p),p[Br]=i,i.stateNode=p}return hn(i),null;case 13:if(dt(vt),p=i.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(mt&&Bn!==null&&(i.mode&1)!==0&&(i.flags&128)===0)Ny(),fi(),i.flags|=98560,_=!1;else if(_=Cc(i),p!==null&&p.dehydrated!==null){if(s===null){if(!_)throw Error(n(318));if(_=i.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(n(317));_[Br]=i}else fi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;hn(i),_=!1}else vr!==null&&(vh(vr),vr=null),_=!0;if(!_)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=c,i):(p=p!==null,p!==(s!==null&&s.memoizedState!==null)&&p&&(i.child.flags|=8192,(i.mode&1)!==0&&(s===null||(vt.current&1)!==0?Bt===0&&(Bt=3):xh())),i.updateQueue!==null&&(i.flags|=4),hn(i),null);case 4:return gi(),ah(s,i),s===null&&Ca(i.stateNode.containerInfo),hn(i),null;case 10:return Df(i.type._context),hn(i),null;case 17:return Cn(i.type)&&_c(),hn(i),null;case 19:if(dt(vt),_=i.memoizedState,_===null)return hn(i),null;if(p=(i.flags&128)!==0,R=_.rendering,R===null)if(p)Fa(_,!1);else{if(Bt!==0||s!==null&&(s.flags&128)!==0)for(s=i.child;s!==null;){if(R=Oc(s),R!==null){for(i.flags|=128,Fa(_,!1),p=R.updateQueue,p!==null&&(i.updateQueue=p,i.flags|=4),i.subtreeFlags=0,p=c,c=i.child;c!==null;)_=c,s=p,_.flags&=14680066,R=_.alternate,R===null?(_.childLanes=0,_.lanes=s,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null):(_.childLanes=R.childLanes,_.lanes=R.lanes,_.child=R.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=R.memoizedProps,_.memoizedState=R.memoizedState,_.updateQueue=R.updateQueue,_.type=R.type,s=R.dependencies,_.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),c=c.sibling;return ot(vt,vt.current&1|2),i.child}s=s.sibling}_.tail!==null&&yt()>bi&&(i.flags|=128,p=!0,Fa(_,!1),i.lanes=4194304)}else{if(!p)if(s=Oc(R),s!==null){if(i.flags|=128,p=!0,c=s.updateQueue,c!==null&&(i.updateQueue=c,i.flags|=4),Fa(_,!0),_.tail===null&&_.tailMode==="hidden"&&!R.alternate&&!mt)return hn(i),null}else 2*yt()-_.renderingStartTime>bi&&c!==1073741824&&(i.flags|=128,p=!0,Fa(_,!1),i.lanes=4194304);_.isBackwards?(R.sibling=i.child,i.child=R):(c=_.last,c!==null?c.sibling=R:i.child=R,_.last=R)}return _.tail!==null?(i=_.tail,_.rendering=i,_.tail=i.sibling,_.renderingStartTime=yt(),i.sibling=null,c=vt.current,ot(vt,p?c&1|2:c&1),i):(hn(i),null);case 22:case 23:return bh(),p=i.memoizedState!==null,s!==null&&s.memoizedState!==null!==p&&(i.flags|=8192),p&&(i.mode&1)!==0?(Hn&1073741824)!==0&&(hn(i),i.subtreeFlags&6&&(i.flags|=8192)):hn(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function h1(s,i){switch(Af(i),i.tag){case 1:return Cn(i.type)&&_c(),s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 3:return gi(),dt(Tn),dt(dn),Bf(),s=i.flags,(s&65536)!==0&&(s&128)===0?(i.flags=s&-65537|128,i):null;case 5:return Uf(i),null;case 13:if(dt(vt),s=i.memoizedState,s!==null&&s.dehydrated!==null){if(i.alternate===null)throw Error(n(340));fi()}return s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 19:return dt(vt),null;case 4:return gi(),null;case 10:return Df(i.type._context),null;case 22:case 23:return bh(),null;case 24:return null;default:return null}}var Bc=!1,pn=!1,p1=typeof WeakSet=="function"?WeakSet:Set,we=null;function vi(s,i){var c=s.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(p){St(s,i,p)}else c.current=null}function lh(s,i,c){try{c()}catch(p){St(s,i,p)}}var jv=!1;function m1(s,i){if(bf=lc,s=ly(),ff(s)){if("selectionStart"in s)var c={start:s.selectionStart,end:s.selectionEnd};else e:{c=(c=s.ownerDocument)&&c.defaultView||window;var p=c.getSelection&&c.getSelection();if(p&&p.rangeCount!==0){c=p.anchorNode;var v=p.anchorOffset,_=p.focusNode;p=p.focusOffset;try{c.nodeType,_.nodeType}catch{c=null;break e}var R=0,P=-1,I=-1,K=0,le=0,ue=s,ae=null;t:for(;;){for(var ye;ue!==c||v!==0&&ue.nodeType!==3||(P=R+v),ue!==_||p!==0&&ue.nodeType!==3||(I=R+p),ue.nodeType===3&&(R+=ue.nodeValue.length),(ye=ue.firstChild)!==null;)ae=ue,ue=ye;for(;;){if(ue===s)break t;
vendor: 2,417 bytes, line 9
9if(ae===c&&++K===v&&(P=R),ae===_&&++le===p&&(I=R),(ye=ue.nextSibling)!==null)break;ue=ae,ae=ue.parentNode}ue=ye}c=P===-1||I===-1?null:{start:P,end:I}}else c=null}c=c||{start:0,end:0}}else c=null;for(xf={focusedElem:s,selectionRange:c},lc=!1,we=i;we!==null;)if(i=we,s=i.child,(i.subtreeFlags&1028)!==0&&s!==null)s.return=i,we=s;else for(;we!==null;){i=we;try{var xe=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var Ee=xe.memoizedProps,At=xe.memoizedState,H=i.stateNode,$=H.getSnapshotBeforeUpdate(i.elementType===i.type?Ee:wr(i.type,Ee),At);H.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var V=i.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(fe){St(i,i.return,fe)}if(s=i.sibling,s!==null){s.return=i.return,we=s;break}we=i.return}return xe=jv,jv=!1,xe}function Ua(s,i,c){var p=i.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var v=p=p.next;do{if((v.tag&s)===s){var _=v.destroy;v.destroy=void 0,_!==void 0&&lh(i,c,_)}v=v.next}while(v!==p)}}function Hc(s,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var c=i=i.next;do{if((c.tag&s)===s){var p=c.create;c.destroy=p()}c=c.next}while(c!==i)}}function ch(s){var i=s.ref;if(i!==null){var c=s.stateNode;s.tag,s=c,typeof i=="function"?i(s):i.current=s}}function Pv(s){var i=s.alternate;i!==null&&(s.alternate=null,Pv(i)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(i=s.stateNode,i!==null&&(delete i[Br],delete i[Aa],delete i[kf],delete i[JT],delete i[XT])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function Nv(s){return s.tag===5||s.tag===3||s.tag===4}function Ov(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Nv(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function uh(s,i,c){var p=s.tag;if(p===5||p===6)s=s.stateNode,i?c.nodeType===8?c.parentNode.insertBefore(s,i):c.insertBefore(s,i):(c.nodeType===8?(i=c.parentNode,i.insertBefore(s,c)):(i=c,i.appendChild(s)),c=c._reactRootContainer,c!=null||i.onclick!==null||(i.onclick=bc));
vendor: 15,295 bytes, line 9
9else if(p!==4&&(s=s.child,s!==null))for(uh(s,i,c),s=s.sibling;s!==null;)uh(s,i,c),s=s.sibling}function dh(s,i,c){var p=s.tag;if(p===5||p===6)s=s.stateNode,i?c.insertBefore(s,i):c.appendChild(s);else if(p!==4&&(s=s.child,s!==null))for(dh(s,i,c),s=s.sibling;s!==null;)dh(s,i,c),s=s.sibling}var rn=null,br=!1;function $s(s,i,c){for(c=c.child;c!==null;)Iv(s,i,c),c=c.sibling}function Iv(s,i,c){if(bn&&typeof bn.onCommitFiberUnmount=="function")try{bn.onCommitFiberUnmount(Yo,c)}catch{}switch(c.tag){case 5:pn||vi(c,i);case 6:var p=rn,v=br;rn=null,$s(s,i,c),rn=p,br=v,rn!==null&&(br?(s=rn,c=c.stateNode,s.nodeType===8?s.parentNode.removeChild(c):s.removeChild(c)):rn.removeChild(c.stateNode));break;case 18:rn!==null&&(br?(s=rn,c=c.stateNode,s.nodeType===8?Ef(s.parentNode,c):s.nodeType===1&&Ef(s,c),va(s)):Ef(rn,c.stateNode));break;case 4:p=rn,v=br,rn=c.stateNode.containerInfo,br=!0,$s(s,i,c),rn=p,br=v;break;case 0:case 11:case 14:case 15:if(!pn&&(p=c.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){v=p=p.next;do{var _=v,R=_.destroy;_=_.tag,R!==void 0&&((_&2)!==0||(_&4)!==0)&&lh(c,i,R),v=v.next}while(v!==p)}$s(s,i,c);break;case 1:if(!pn&&(vi(c,i),p=c.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=c.memoizedProps,p.state=c.memoizedState,p.componentWillUnmount()}catch(P){St(c,i,P)}$s(s,i,c);break;case 21:$s(s,i,c);break;case 22:c.mode&1?(pn=(p=pn)||c.memoizedState!==null,$s(s,i,c),pn=p):$s(s,i,c);break;default:$s(s,i,c)}}function Dv(s){var i=s.updateQueue;if(i!==null){s.updateQueue=null;var c=s.stateNode;c===null&&(c=s.stateNode=new p1),i.forEach(function(p){var v=E1.bind(null,s,p);c.has(p)||(c.add(p),p.then(v,v))})}}function xr(s,i){var c=i.deletions;if(c!==null)for(var p=0;p<c.length;p++){var v=c[p];try{var _=s,R=i,P=R;e:for(;P!==null;){switch(P.tag){case 5:rn=P.stateNode,br=!1;break e;case 3:rn=P.stateNode.containerInfo,br=!0;break e;case 4:rn=P.stateNode.containerInfo,br=!0;break e}P=P.return}if(rn===null)throw Error(n(160));Iv(_,R,v),rn=null,br=!1;var I=v.alternate;I!==null&&(I.return=null),v.return=null}catch(K){St(v,i,K)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)Lv(i,s),i=i.sibling}function Lv(s,i){var c=s.alternate,p=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(xr(i,s),Wr(s),p&4){try{Ua(3,s,s.return),Hc(3,s)}catch(Ee){St(s,s.return,Ee)}try{Ua(5,s,s.return)}catch(Ee){St(s,s.return,Ee)}}break;case 1:xr(i,s),Wr(s),p&512&&c!==null&&vi(c,c.return);break;case 5:if(xr(i,s),Wr(s),p&512&&c!==null&&vi(c,c.return),s.flags&32){var v=s.stateNode;try{_t(v,"")}catch(Ee){St(s,s.return,Ee)}}if(p&4&&(v=s.stateNode,v!=null)){var _=s.memoizedProps,R=c!==null?c.memoizedProps:_,P=s.type,I=s.updateQueue;if(s.updateQueue=null,I!==null)try{P==="input"&&_.type==="radio"&&_.name!=null&&ze(v,_),$r(P,R);var K=$r(P,_);for(R=0;R<I.length;R+=2){var le=I[R],ue=I[R+1];le==="style"?un(v,ue):le==="dangerouslySetInnerHTML"?Jn(v,ue):le==="children"?_t(v,ue):C(v,le,ue,K)}switch(P){case"input":$t(v,_);break;case"textarea":Lr(v,_);break;case"select":var ae=v._wrapperState.wasMultiple;v._wrapperState.wasMultiple=!!_.multiple;var ye=_.value;ye!=null?nt(v,!!_.multiple,ye,!1):ae!==!!_.multiple&&(_.defaultValue!=null?nt(v,!!_.multiple,_.defaultValue,!0):nt(v,!!_.multiple,_.multiple?[]:"",!1))}v[Aa]=_}catch(Ee){St(s,s.return,Ee)}}break;case 6:if(xr(i,s),Wr(s),p&4){if(s.stateNode===null)throw Error(n(162));v=s.stateNode,_=s.memoizedProps;try{v.nodeValue=_}catch(Ee){St(s,s.return,Ee)}}break;case 3:if(xr(i,s),Wr(s),p&4&&c!==null&&c.memoizedState.isDehydrated)try{va(i.containerInfo)}catch(Ee){St(s,s.return,Ee)}break;case 4:xr(i,s),Wr(s);break;case 13:xr(i,s),Wr(s),v=s.child,v.flags&8192&&(_=v.memoizedState!==null,v.stateNode.isHidden=_,!_||v.alternate!==null&&v.alternate.memoizedState!==null||(ph=yt())),p&4&&Dv(s);break;case 22:if(le=c!==null&&c.memoizedState!==null,s.mode&1?(pn=(K=pn)||le,xr(i,s),pn=K):xr(i,s),Wr(s),p&8192){if(K=s.memoizedState!==null,(s.stateNode.isHidden=K)&&!le&&(s.mode&1)!==0)for(we=s,le=s.child;le!==null;){for(ue=we=le;we!==null;){switch(ae=we,ye=ae.child,ae.tag){case 0:case 11:case 14:case 15:Ua(4,ae,ae.return);break;case 1:vi(ae,ae.return);var xe=ae.stateNode;if(typeof xe.componentWillUnmount=="function"){p=ae,c=ae.return;try{i=p,xe.props=i.memoizedProps,xe.state=i.memoizedState,xe.componentWillUnmount()}catch(Ee){St(p,c,Ee)}}break;case 5:vi(ae,ae.return);break;case 22:if(ae.memoizedState!==null){Fv(ue);continue}}ye!==null?(ye.return=ae,we=ye):Fv(ue)}le=le.sibling}e:for(le=null,ue=s;;){if(ue.tag===5){if(le===null){le=ue;try{v=ue.stateNode,K?(_=v.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none"):(P=ue.stateNode,I=ue.memoizedProps.style,R=I!=null&&I.hasOwnProperty("display")?I.display:null,P.style.display=qt("display",R))}catch(Ee){St(s,s.return,Ee)}}}else if(ue.tag===6){if(le===null)try{ue.stateNode.nodeValue=K?"":ue.memoizedProps}catch(Ee){St(s,s.return,Ee)}}else if((ue.tag!==22&&ue.tag!==23||ue.memoizedState===null||ue===s)&&ue.child!==null){ue.child.return=ue,ue=ue.child;continue}if(ue===s)break e;for(;ue.sibling===null;){if(ue.return===null||ue.return===s)break e;le===ue&&(le=null),ue=ue.return}le===ue&&(le=null),ue.sibling.return=ue.return,ue=ue.sibling}}break;case 19:xr(i,s),Wr(s),p&4&&Dv(s);break;case 21:break;default:xr(i,s),Wr(s)}}function Wr(s){var i=s.flags;if(i&2){try{e:{for(var c=s.return;c!==null;){if(Nv(c)){var p=c;break e}c=c.return}throw Error(n(160))}switch(p.tag){case 5:var v=p.stateNode;p.flags&32&&(_t(v,""),p.flags&=-33);var _=Ov(s);dh(s,_,v);break;case 3:case 4:var R=p.stateNode.containerInfo,P=Ov(s);uh(s,P,R);break;default:throw Error(n(161))}}catch(I){St(s,s.return,I)}s.flags&=-3}i&4096&&(s.flags&=-4097)}function g1(s,i,c){we=s,Mv(s)}function Mv(s,i,c){for(var p=(s.mode&1)!==0;we!==null;){var v=we,_=v.child;if(v.tag===22&&p){var R=v.memoizedState!==null||Bc;if(!R){var P=v.alternate,I=P!==null&&P.memoizedState!==null||pn;P=Bc;var K=pn;if(Bc=R,(pn=I)&&!K)for(we=v;we!==null;)R=we,I=R.child,R.tag===22&&R.memoizedState!==null?Uv(v):I!==null?(I.return=R,we=I):Uv(v);for(;_!==null;)we=_,Mv(_),_=_.sibling;we=v,Bc=P,pn=K}$v(s)}else(v.subtreeFlags&8772)!==0&&_!==null?(_.return=v,we=_):$v(s)}}function $v(s){for(;we!==null;){var i=we;if((i.flags&8772)!==0){var c=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:pn||Hc(5,i);break;case 1:var p=i.stateNode;if(i.flags&4&&!pn)if(c===null)p.componentDidMount();else{var v=i.elementType===i.type?c.memoizedProps:wr(i.type,c.memoizedProps);p.componentDidUpdate(v,c.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var _=i.updateQueue;_!==null&&Fy(i,_,p);break;case 3:var R=i.updateQueue;if(R!==null){if(c=null,i.child!==null)switch(i.child.tag){case 5:c=i.child.stateNode;break;case 1:c=i.child.stateNode}Fy(i,R,c)}break;case 5:var P=i.stateNode;if(c===null&&i.flags&4){c=P;var I=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":I.autoFocus&&c.focus();break;case"img":I.src&&(c.src=I.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var K=i.alternate;if(K!==null){var le=K.memoizedState;if(le!==null){var ue=le.dehydrated;ue!==null&&va(ue)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}pn||i.flags&512&&ch(i)}catch(ae){St(i,i.return,ae)}}if(i===s){we=null;break}if(c=i.sibling,c!==null){c.return=i.return,we=c;break}we=i.return}}function Fv(s){for(;we!==null;){var i=we;if(i===s){we=null;break}var c=i.sibling;if(c!==null){c.return=i.return,we=c;break}we=i.return}}function Uv(s){for(;we!==null;){var i=we;try{switch(i.tag){case 0:case 11:case 15:var c=i.return;try{Hc(4,i)}catch(I){St(i,c,I)}break;case 1:var p=i.stateNode;if(typeof p.componentDidMount=="function"){var v=i.return;try{p.componentDidMount()}catch(I){St(i,v,I)}}var _=i.return;try{ch(i)}catch(I){St(i,_,I)}break;case 5:var R=i.return;try{ch(i)}catch(I){St(i,R,I)}}}catch(I){St(i,i.return,I)}if(i===s){we=null;break}var P=i.sibling;if(P!==null){P.return=i.return,we=P;break}we=i.return}}var y1=Math.ceil,Vc=j.ReactCurrentDispatcher,fh=j.ReactCurrentOwner,ir=j.ReactCurrentBatchConfig,Ye=0,Jt=null,It=null,sn=0,Hn=0,wi=Os(0),Bt=0,za=null,go=0,Wc=0,hh=0,Ba=null,An=null,ph=0,bi=1/0,ds=null,qc=!1,mh=null,Fs=null,Gc=!1,Us=null,Kc=0,Ha=0,gh=null,Yc=-1,Qc=0;function _n(){return(Ye&6)!==0?yt():Yc!==-1?Yc:Yc=yt()}function zs(s){return(s.mode&1)===0?1:(Ye&2)!==0&&sn!==0?sn&-sn:e1.transition!==null?(Qc===0&&(Qc=sc()),Qc):(s=et,s!==0||(s=window.event,s=s===void 0?16:Bg(s.type)),s)}function _r(s,i,c,p){if(50<Ha)throw Ha=0,gh=null,Error(n(185));As(s,c,p),((Ye&2)===0||s!==Jt)&&(s===Jt&&((Ye&2)===0&&(Wc|=c),Bt===4&&Bs(s,sn)),jn(s,p),c===1&&Ye===0&&(i.mode&1)===0&&(bi=yt()+500,Ec&&Ds()))}function jn(s,i){var c=s.callbackNode;Zd(s,i);var p=zr(s,s===Jt?sn:0);if(p===0)c!==null&&da(c),s.callbackNode=null,s.callbackPriority=0;else if(i=p&-p,s.callbackPriority!==i){if(c!=null&&da(c),i===1)s.tag===0?ZT(Bv.bind(null,s)):Cy(Bv.bind(null,s)),YT(function(){(Ye&6)===0&&Ds()}),c=null;else{switch(ha(p)){case 1:c=fa;break;case 4:c=gr;break;case 16:c=io;break;case 536870912:c=Ur;break;default:c=io}c=Qv(c,zv.bind(null,s))}s.callbackPriority=i,s.callbackNode=c}}function zv(s,i){if(Yc=-1,Qc=0,(Ye&6)!==0)throw Error(n(327));var c=s.callbackNode;if(xi()&&s.callbackNode!==c)return null;var p=zr(s,s===Jt?sn:0);if(p===0)return null;if((p&30)!==0||(p&s.expiredLanes)!==0||i)i=Jc(s,p);else{i=p;var v=Ye;Ye|=2;var _=Vv();(Jt!==s||sn!==i)&&(ds=null,bi=yt()+500,vo(s,i));do try{b1();break}catch(P){Hv(s,P)}while(!0);If(),Vc.current=_,Ye=v,It!==null?i=0:(Jt=null,sn=0,i=Bt)}if(i!==0){if(i===2&&(v=Rs(s),v!==0&&(p=v,i=yh(s,v))),i===1)throw c=za,vo(s,0),Bs(s,p),jn(s,yt()),c;if(i===6)Bs(s,p);else{if(v=s.current.alternate,(p&30)===0&&!v1(v)&&(i=Jc(s,p),i===2&&(_=Rs(s),_!==0&&(p=_,i=yh(s,_))),i===1))throw c=za,vo(s,0),Bs(s,p),jn(s,yt()),c;switch(s.finishedWork=v,s.finishedLanes=p,i){case 0:case 1:throw Error(n(345));case 2:wo(s,An,ds);break;case 3:if(Bs(s,p),(p&130023424)===p&&(i=ph+500-yt(),10<i)){if(zr(s,0)!==0)break;if(v=s.suspendedLanes,(v&p)!==p){_n(),s.pingedLanes|=s.suspendedLanes&v;break}s.timeoutHandle=Sf(wo.bind(null,s,An,ds),i);break}wo(s,An,ds);break;case 4:if(Bs(s,p),(p&4194240)===p)break;for(i=s.eventTimes,v=-1;0<p;){var R=31-Fn(p);_=1<<R,R=i[R],R>v&&(v=R),p&=~_}if(p=v,p=yt()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*y1(p/1960))-p,10<p){s.timeoutHandle=Sf(wo.bind(null,s,An,ds),p);break}wo(s,An,ds);break;case 5:wo(s,An,ds);break;default:throw Error(n(329))}}}return jn(s,yt()),s.callbackNode===c?zv.bind(null,s):null}function yh(s,i){var c=Ba;return s.current.memoizedState.isDehydrated&&(vo(s,i).flags|=256),s=Jc(s,i),s!==2&&(i=An,An=c,i!==null&&vh(i)),s}function vh(s){An===null?An=s:An.push.apply(An,s)}function v1(s){for(var i=s;;){if(i.flags&16384){var c=i.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var p=0;p<c.length;p++){var v=c[p],_=v.getSnapshot;v=v.value;try{if(!yr(_(),v))return!1}catch{return!1}}}if(c=i.child,i.subtreeFlags&16384&&c!==null)c.return=i,i=c;else{if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Bs(s,i){for(i&=~hh,i&=~Wc,s.suspendedLanes|=i,s.pingedLanes&=~i,s=s.expirationTimes;0<i;){var c=31-Fn(i),p=1<<c;s[c]=-1,i&=~p}}function Bv(s){if((Ye&6)!==0)throw Error(n(327));xi();var i=zr(s,0);if((i&1)===0)return jn(s,yt()),null;var c=Jc(s,i);if(s.tag!==0&&c===2){var p=Rs(s);p!==0&&(i=p,c=yh(s,p))}if(c===1)throw c=za,vo(s,0),Bs(s,i),jn(s,yt()),c;if(c===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=i,wo(s,An,ds),jn(s,yt()),null}function wh(s,i){var c=Ye;Ye|=1;try{return s(i)}finally{Ye=c,Ye===0&&(bi=yt()+500,Ec&&Ds())}}function yo(s){Us!==null&&Us.tag===0&&(Ye&6)===0&&xi();var i=Ye;Ye|=1;var c=ir.transition,p=et;try{if(ir.transition=null,et=1,s)return s()}finally{et=p,ir.transition=c,Ye=i,(Ye&6)===0&&Ds()}}function bh(){Hn=wi.current,dt(wi)}function vo(s,i){s.finishedWork=null,s.finishedLanes=0;var c=s.timeoutHandle;if(c!==-1&&(s.timeoutHandle=-1,KT(c)),It!==null)for(c=It.return;c!==null;){var p=c;switch(Af(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&_c();break;case 3:gi(),dt(Tn),dt(dn),Bf();break;case 5:Uf(p);break;case 4:gi();break;case 13:dt(vt);break;case 19:dt(vt);break;case 10:Df(p.type._context);break;case 22:case 23:bh()}c=c.return}if(Jt=s,It=s=Hs(s.current,null),sn=Hn=i,Bt=0,za=null,hh=Wc=go=0,An=Ba=null,ho!==null){for(i=0;i<ho.length;i++)if(c=ho[i],p=c.interleaved,p!==null){c.interleaved=null;var v=p.next,_=c.pending;if(_!==null){var R=_.next;_.next=v,p.next=R}c.pending=p}ho=null}return s}function Hv(s,i){do{var c=It;try{if(If(),Ic.current=$c,Dc){for(var p=wt.memoizedState;p!==null;){var v=p.queue;v!==null&&(v.pending=null),p=p.next}Dc=!1}if(mo=0,Qt=zt=wt=null,Da=!1,La=0,fh.current=null,c===null||c.return===null){Bt=1,za=i,It=null;break}e:{var _=s,R=c.return,P=c,I=i;if(i=sn,P.flags|=32768,I!==null&&typeof I=="object"&&typeof I.then=="function"){var K=I,le=P,ue=le.tag;if((le.mode&1)===0&&(ue===0||ue===11||ue===15)){var ae=le.alternate;ae?(le.updateQueue=ae.updateQueue,le.memoizedState=ae.memoizedState,le.lanes=ae.lanes):(le.updateQueue=null,le.memoizedState=null)}var ye=pv(R);if(ye!==null){ye.flags&=-257,mv(ye,R,P,_,i),ye.mode&1&&hv(_,K,i),i=ye,I=K;var xe=i.updateQueue;if(xe===null){var Ee=new Set;Ee.add(I),i.updateQueue=Ee}else xe.add(I);break e}else{if((i&1)===0){hv(_,K,i),xh();break e}I=Error(n(426))}}else if(mt&&P.mode&1){var At=pv(R);if(At!==null){(At.flags&65536)===0&&(At.flags|=256),mv(At,R,P,_,i),Nf(yi(I,P));break e}}_=I=yi(I,P),Bt!==4&&(Bt=2),Ba===null?Ba=[_]:Ba.push(_),_=R;do{switch(_.tag){case 3:_.flags|=65536,i&=-i,_.lanes|=i;var H=dv(_,I,i);$y(_,H);break e;case 1:P=I;var $=_.type,V=_.stateNode;if((_.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(Fs===null||!Fs.has(V)))){_.flags|=65536,i&=-i,_.lanes|=i;var fe=fv(_,P,i);$y(_,fe);break e}}_=_.return}while(_!==null)}qv(c)}catch(Te){i=Te,It===c&&c!==null&&(It=c=c.return);continue}break}while(!0)}function Vv(){var s=Vc.current;return Vc.current=$c,s===null?$c:s}function xh(){(Bt===0||Bt===3||Bt===2)&&(Bt=4),Jt===null||(go&268435455)===0&&(Wc&268435455)===0||Bs(Jt,sn)}function Jc(s,i){var c=Ye;Ye|=2;var p=Vv();(Jt!==s||sn!==i)&&(ds=null,vo(s,i));do try{w1();break}catch(v){Hv(s,v)}while(!0);if(If(),Ye=c,Vc.current=p,It!==null)throw Error(n(261));return Jt=null,sn=0,Bt}function w1(){for(;It!==null;)Wv(It)}function b1(){for(;It!==null&&!ec();)Wv(It)}function Wv(s){var i=Yv(s.alternate,s,Hn);s.memoizedProps=s.pendingProps,i===null?qv(s):It=i,fh.current=null}function qv(s){var i=s;do{var c=i.alternate;if(s=i.return,(i.flags&32768)===0){if(c=f1(c,i,Hn),c!==null){It=c;return}}else{if(c=h1(c,i),c!==null){c.flags&=32767,It=c;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{Bt=6,It=null;return}}if(i=i.sibling,i!==null){It=i;return}It=i=s}while(i!==null);Bt===0&&(Bt=5)}function wo(s,i,c){var p=et,v=ir.transition;try{ir.transition=null,et=1,x1(s,i,c,p)}finally{ir.transition=v,et=p}return null}function x1(s,i,c,p){do xi();while(Us!==null);if((Ye&6)!==0)throw Error(n(327));c=s.finishedWork;var v=s.finishedLanes;if(c===null)return null;
vendor: 4,098 bytes, line 9
9if(s.finishedWork=null,s.finishedLanes=0,c===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var _=c.lanes|c.childLanes;if(oc(s,_),s===Jt&&(It=Jt=null,sn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Gc||(Gc=!0,Qv(io,function(){return xi(),null})),_=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||_){_=ir.transition,ir.transition=null;var R=et;et=1;var P=Ye;Ye|=4,fh.current=null,m1(s,c),Lv(c,s),zT(xf),lc=!!bf,xf=bf=null,s.current=c,g1(c),Jd(),Ye=P,et=R,ir.transition=_}else s.current=c;if(Gc&&(Gc=!1,Us=s,Kc=v),_=s.pendingLanes,_===0&&(Fs=null),tc(c.stateNode),jn(s,yt()),i!==null)for(p=s.onRecoverableError,c=0;c<i.length;c++)v=i[c],p(v.value,{componentStack:v.stack,digest:v.digest});if(qc)throw qc=!1,s=mh,mh=null,s;return(Kc&1)!==0&&s.tag!==0&&xi(),_=s.pendingLanes,(_&1)!==0?s===gh?Ha++:(Ha=0,gh=s):Ha=0,Ds(),null}function xi(){if(Us!==null){var s=ha(Kc),i=ir.transition,c=et;try{if(ir.transition=null,et=16>s?16:s,Us===null)var p=!1;else{if(s=Us,Us=null,Kc=0,(Ye&6)!==0)throw Error(n(331));var v=Ye;for(Ye|=4,we=s.current;we!==null;){var _=we,R=_.child;if((we.flags&16)!==0){var P=_.deletions;if(P!==null){for(var I=0;I<P.length;I++){var K=P[I];for(we=K;we!==null;){var le=we;switch(le.tag){case 0:case 11:case 15:Ua(8,le,_)}var ue=le.child;if(ue!==null)ue.return=le,we=ue;else for(;we!==null;){le=we;var ae=le.sibling,ye=le.return;if(Pv(le),le===K){we=null;break}if(ae!==null){ae.return=ye,we=ae;break}we=ye}}}var xe=_.alternate;if(xe!==null){var Ee=xe.child;if(Ee!==null){xe.child=null;do{var At=Ee.sibling;Ee.sibling=null,Ee=At}while(Ee!==null)}}we=_}}if((_.subtreeFlags&2064)!==0&&R!==null)R.return=_,we=R;else e:for(;we!==null;){if(_=we,(_.flags&2048)!==0)switch(_.tag){case 0:case 11:case 15:Ua(9,_,_.return)}var H=_.sibling;if(H!==null){H.return=_.return,we=H;break e}we=_.return}}var $=s.current;for(we=$;we!==null;){R=we;var V=R.child;if((R.subtreeFlags&2064)!==0&&V!==null)V.return=R,we=V;else e:for(R=$;we!==null;){if(P=we,(P.flags&2048)!==0)try{switch(P.tag){case 0:case 11:case 15:Hc(9,P)}}catch(Te){St(P,P.return,Te)}if(P===R){we=null;break e}var fe=P.sibling;if(fe!==null){fe.return=P.return,we=fe;break e}we=P.return}}if(Ye=v,Ds(),bn&&typeof bn.onPostCommitFiberRoot=="function")try{bn.onPostCommitFiberRoot(Yo,s)}catch{}p=!0}return p}finally{et=c,ir.transition=i}}return!1}function Gv(s,i,c){i=yi(c,i),i=dv(s,i,1),s=Ms(s,i,1),i=_n(),s!==null&&(As(s,1,i),jn(s,i))}function St(s,i,c){if(s.tag===3)Gv(s,s,c);else for(;i!==null;){if(i.tag===3){Gv(i,s,c);break}else if(i.tag===1){var p=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Fs===null||!Fs.has(p))){s=yi(c,s),s=fv(i,s,1),i=Ms(i,s,1),s=_n(),i!==null&&(As(i,1,s),jn(i,s));break}}i=i.return}}function _1(s,i,c){var p=s.pingCache;p!==null&&p.delete(i),i=_n(),s.pingedLanes|=s.suspendedLanes&c,Jt===s&&(sn&c)===c&&(Bt===4||Bt===3&&(sn&130023424)===sn&&500>yt()-ph?vo(s,0):hh|=c),jn(s,i)}function Kv(s,i){i===0&&((s.mode&1)===0?i=1:(i=rs,rs<<=1,(rs&130023424)===0&&(rs=4194304)));var c=_n();s=ls(s,i),s!==null&&(As(s,i,c),jn(s,c))}function S1(s){var i=s.memoizedState,c=0;i!==null&&(c=i.retryLane),Kv(s,c)}function E1(s,i){var c=0;switch(s.tag){case 13:var p=s.stateNode,v=s.memoizedState;v!==null&&(c=v.retryLane);break;case 19:p=s.stateNode;break;default:throw Error(n(314))}p!==null&&p.delete(i),Kv(s,c)}var Yv;Yv=function(s,i,c){if(s!==null)if(s.memoizedProps!==i.pendingProps||Tn.current)Rn=!0;else{if((s.lanes&c)===0&&(i.flags&128)===0)return Rn=!1,d1(s,i,c);Rn=(s.flags&131072)!==0}else Rn=!1,mt&&(i.flags&1048576)!==0&&Ry(i,Tc,i.index);switch(i.lanes=0,i.tag){case 2:var p=i.type;zc(s,i),s=i.pendingProps;var v=ci(i,dn.current);mi(i,c),v=Wf(null,i,p,s,v,c);var _=qf();return i.flags|=1,typeof v=="object"&&v!==null&&typeof v.render=="function"&&v.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Cn(p)?(_=!0,Sc(i)):_=!1,i.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,$f(i),v.updater=Fc,i.stateNode=v,v._reactInternals=i,Xf(i,p,s,c),i=nh(null,i,p,!0,_,c)):(i.tag=0,mt&&_&&Rf(i),xn(null,i,v,c),i=i.
vendor: 4,072 bytes, line 9
9child),i;case 16:p=i.elementType;e:{switch(zc(s,i),s=i.pendingProps,v=p._init,p=v(p._payload),i.type=p,v=i.tag=T1(p),s=wr(p,s),v){case 0:i=th(null,i,p,s,c);break e;case 1:i=xv(null,i,p,s,c);break e;case 11:i=gv(null,i,p,s,c);break e;case 14:i=yv(null,i,p,wr(p.type,s),c);break e}throw Error(n(306,p,""))}return i;case 0:return p=i.type,v=i.pendingProps,v=i.elementType===p?v:wr(p,v),th(s,i,p,v,c);case 1:return p=i.type,v=i.pendingProps,v=i.elementType===p?v:wr(p,v),xv(s,i,p,v,c);case 3:e:{if(_v(i),s===null)throw Error(n(387));p=i.pendingProps,_=i.memoizedState,v=_.element,My(s,i),Nc(i,p,null,c);var R=i.memoizedState;if(p=R.element,_.isDehydrated)if(_={element:p,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},i.updateQueue.baseState=_,i.memoizedState=_,i.flags&256){v=yi(Error(n(423)),i),i=Sv(s,i,p,c,v);break e}else if(p!==v){v=yi(Error(n(424)),i),i=Sv(s,i,p,c,v);break e}else for(Bn=Ns(i.stateNode.containerInfo.firstChild),zn=i,mt=!0,vr=null,c=Dy(i,null,p,c),i.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(fi(),p===v){i=us(s,i,c);break e}xn(s,i,p,c)}i=i.child}return i;case 5:return Uy(i),s===null&&Pf(i),p=i.type,v=i.pendingProps,_=s!==null?s.memoizedProps:null,R=v.children,_f(p,v)?R=null:_!==null&&_f(p,_)&&(i.flags|=32),bv(s,i),xn(s,i,R,c),i.child;case 6:return s===null&&Pf(i),null;case 13:return Ev(s,i,c);case 4:return Ff(i,i.stateNode.containerInfo),p=i.pendingProps,s===null?i.child=hi(i,null,p,c):xn(s,i,p,c),i.child;case 11:return p=i.type,v=i.pendingProps,v=i.elementType===p?v:wr(p,v),gv(s,i,p,v,c);case 7:return xn(s,i,i.pendingProps,c),i.child;case 8:return xn(s,i,i.pendingProps.children,c),i.child;case 12:return xn(s,i,i.pendingProps.children,c),i.child;case 10:e:{if(p=i.type._context,v=i.pendingProps,_=i.memoizedProps,R=v.value,ot(Ac,p._currentValue),p._currentValue=R,_!==null)if(yr(_.value,R)){if(_.children===v.children&&!Tn.current){i=us(s,i,c);break e}}else for(_=i.child,_!==null&&(_.return=i);_!==null;){var P=_.dependencies;if(P!==null){R=_.child;for(var I=P.firstContext;I!==null;){if(I.context===p){if(_.tag===1){I=cs(-1,c&-c),I.tag=2;var K=_.updateQueue;if(K!==null){K=K.shared;var le=K.pending;le===null?I.next=I:(I.next=le.next,le.next=I),K.pending=I}}_.lanes|=c,I=_.alternate,I!==null&&(I.lanes|=c),Lf(_.return,c,i),P.lanes|=c;break}I=I.next}}else if(_.tag===10)R=_.type===i.type?null:_.child;else if(_.tag===18){if(R=_.return,R===null)throw Error(n(341));R.lanes|=c,P=R.alternate,P!==null&&(P.lanes|=c),Lf(R,c,i),R=_.sibling}else R=_.child;if(R!==null)R.return=_;else for(R=_;R!==null;){if(R===i){R=null;break}if(_=R.sibling,_!==null){_.return=R.return,R=_;break}R=R.return}_=R}xn(s,i,v.children,c),i=i.child}return i;case 9:return v=i.type,p=i.pendingProps.children,mi(i,c),v=sr(v),p=p(v),i.flags|=1,xn(s,i,p,c),i.child;case 14:return p=i.type,v=wr(p,i.pendingProps),v=wr(p.type,v),yv(s,i,p,v,c);case 15:return vv(s,i,i.type,i.pendingProps,c);case 17:return p=i.type,v=i.pendingProps,v=i.elementType===p?v:wr(p,v),zc(s,i),i.tag=1,Cn(p)?(s=!0,Sc(i)):s=!1,mi(i,c),cv(i,p,v),Xf(i,p,v,c),nh(null,i,p,!0,s,c);case 19:return Tv(s,i,c);case 22:return wv(s,i,c)}throw Error(n(156,i.tag))};function Qv(s,i){return Go(s,i)}function k1(s,i,c,p){this.tag=s,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ar(s,i,c,p){return new k1(s,i,c,p)}function _h(s){return s=s.prototype,!(!s||!s.isReactComponent)}function T1(s){if(typeof s=="function")return _h(s)?1:0;if(s!=null){if(s=s.$$typeof,s===re)return 11;if(s===G)return 14}return 2}function Hs(s,i){var c=s.alternate;return c===null?(c=ar(s.tag,i,s.key,s.mode),c.elementType=s.elementType,c.type=s.type,c.stateNode=s.stateNode,c.alternate=s,s.alternate=c):(c.pendingProps=i,c.type=s.type,c.flags=0,c.subtreeFlags=0,c.deleti
vendor: 5,485 bytes, line 9
9ons=null),c.flags=s.flags&14680064,c.childLanes=s.childLanes,c.lanes=s.lanes,c.child=s.child,c.memoizedProps=s.memoizedProps,c.memoizedState=s.memoizedState,c.updateQueue=s.updateQueue,i=s.dependencies,c.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},c.sibling=s.sibling,c.index=s.index,c.ref=s.ref,c}function Xc(s,i,c,p,v,_){var R=2;if(p=s,typeof s=="function")_h(s)&&(R=1);else if(typeof s=="string")R=5;else e:switch(s){case D:return bo(c.children,v,_,i);case q:R=8,v|=8;break;case J:return s=ar(12,c,i,v|2),s.elementType=J,s.lanes=_,s;case pe:return s=ar(13,c,i,v),s.elementType=pe,s.lanes=_,s;case L:return s=ar(19,c,i,v),s.elementType=L,s.lanes=_,s;case te:return Zc(c,v,_,i);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case ne:R=10;break e;case ie:R=9;break e;case re:R=11;break e;case G:R=14;break e;case Q:R=16,p=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return i=ar(R,c,i,v),i.elementType=s,i.type=p,i.lanes=_,i}function bo(s,i,c,p){return s=ar(7,s,p,i),s.lanes=c,s}function Zc(s,i,c,p){return s=ar(22,s,p,i),s.elementType=te,s.lanes=c,s.stateNode={isHidden:!1},s}function Sh(s,i,c){return s=ar(6,s,null,i),s.lanes=c,s}function Eh(s,i,c){return i=ar(4,s.children!==null?s.children:[],s.key,i),i.lanes=c,i.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},i}function C1(s,i,c,p,v){this.tag=i,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Jo(0),this.expirationTimes=Jo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jo(0),this.identifierPrefix=p,this.onRecoverableError=v,this.mutableSourceEagerHydrationData=null}function kh(s,i,c,p,v,_,R,P,I){return s=new C1(s,i,c,P,I),i===1?(i=1,_===!0&&(i|=8)):i=0,_=ar(3,null,null,i),s.current=_,_.stateNode=s,_.memoizedState={element:p,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},$f(_),s}function R1(s,i,c){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:M,key:p==null?null:""+p,children:s,containerInfo:i,implementation:c}}function Jv(s){if(!s)return Is;s=s._reactInternals;e:{if(ns(s)!==s||s.tag!==1)throw Error(n(170));var i=s;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(Cn(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(n(171))}if(s.tag===1){var c=s.type;if(Cn(c))return ky(s,c,i)}return i}function Xv(s,i,c,p,v,_,R,P,I){return s=kh(c,p,!0,s,v,_,R,P,I),s.context=Jv(null),c=s.current,p=_n(),v=zs(c),_=cs(p,v),_.callback=i??null,Ms(c,_,v),s.current.lanes=v,As(s,v,p),jn(s,p),s}function eu(s,i,c,p){var v=i.current,_=_n(),R=zs(v);return c=Jv(c),i.context===null?i.context=c:i.pendingContext=c,i=cs(_,R),i.payload={element:s},p=p===void 0?null:p,p!==null&&(i.callback=p),s=Ms(v,i,R),s!==null&&(_r(s,v,R,_),Pc(s,v,R)),R}function tu(s){return s=s.current,s.child?(s.child.tag===5,s.child.stateNode):null}function Zv(s,i){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var c=s.retryLane;s.retryLane=c!==0&&c<i?c:i}}function Th(s,i){Zv(s,i),(s=s.alternate)&&Zv(s,i)}function A1(){return null}var ew=typeof reportError=="function"?reportError:function(s){console.error(s)};function Ch(s){this._internalRoot=s}nu.prototype.render=Ch.prototype.render=function(s){var i=this._internalRoot;if(i===null)throw Error(n(409));eu(s,i,null,null)},nu.prototype.unmount=Ch.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var i=s.containerInfo;yo(function(){eu(null,s,null,null)}),i[ss]=null}};function nu(s){this._internalRoot=s}nu.prototype.unstable_scheduleHydration=function(s){if(s){var i=ao();s={blockedOn:null,target:s,priority:i};for(var c=0;c<Ke.length&&i!==0&&i<Ke[c].priority;c++);Ke.splice(c,0,s),c===0&&Yt(s)}};function Rh(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function ru(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function tw(){}function j1(s,i,c,p,v){if(v){if(typeof p=="function"){var _=p;p=function(){var K=tu(R);_.call(K)}}var R=Xv(i,p,s,0,null,!1,!1,"",tw);return s._reactRootContainer=R,s[ss]=R.current,Ca(s.nodeType===8?s.parentNode:s),yo(),R}for(;v=s.lastChild;)s.removeChild(v);if(typeof p=="function"){var P=p;p=function(){var K=tu(I);P.call(K)}}var I=kh(s,0,!1,null,null,!1,!1,"",tw);return s._reactRootContainer=I,s[ss]=I.current,Ca(s.nodeType===8?s.parentNode:s),yo(function(){eu(i,I,c,p)}),I}function su(s,i,c,p,v){var _=c._reactRootContainer;if(_){var R=_;if(typeof v=="function"){var P=v;v=function(){var I=tu(R);P.call(I)}}eu(i,R,s,v)}else R=j1(c,i,s,v,p);return tu(R)}ic=function(s){switch(s.tag){case 3:var i=s.stateNode;if(i.current.memoizedState.isDehydrated){var c=er(i.pendingLanes);c!==0&&(Xo(i,c|1),jn(i,yt()),(Ye&6)===0&&(bi=yt()+500,Ds()))}break;case 13:yo(function(){var p=ls(s,1);if(p!==null){var v=_n();_r(p,s,1,v)}}),Th(s,1)}},pa=function(s){if(s.tag===13){var i=ls(s,134217728);if(i!==null){var c=_n();_r(i,s,134217728,c)}Th(s,134217728)}},ma=function(s){if(s.tag===13){var i=zs(s),c=ls(s,i);if(c!==null){var p=_n();_r(c,s,i,p)}Th(s,i)}},ao=function(){return et},Zo=function(s,i){var c=et;try{return et=s,i()}finally{et=c}}
9,Zn=function(s,i,c){switch(i){case"input":if($t(s,c),i=c.name,c.type==="radio"&&i!=null){for(c=s;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<c.length;i++){var p=c[i];if(p!==s&&p.form===s.form){var v=xc(p);if(!v)throw Error(n(90));ve(p),$t(p,v)}}}break;case"textarea":Lr(s,c);break;case"select":i=c.value,i!=null&&nt(s,!!c.multiple,i,!1)}},qe=wh,Je=yo;var P1={usingClientEntryPoint:!1,Events:[ja,ai,xc,ts,Ne,wh]},Va={findFiberByHostInstance:lo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},N1={bundleType:Va.bundleType,version:Va.version,rendererPackageName:Va.rendererPackageName,rendererConfig:Va.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Zl(s),s===null?null:s.stateNode},findFiberByHostInstance:Va.findFiberByHostInstance||A1,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 ou=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ou.isDisabled&&ou.supportsFiber)try{Yo=ou.inject(N1),bn=ou}catch{}}return Pn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P1,Pn.createPortal=function(s,i){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Rh(i))throw Error(n(200));return R1(s,i,null,c)},Pn.createRoot=function(s,i){if(!Rh(s))throw Error(n(299));var c=!1,p="",v=ew;return i!=null&&(i.unstable_strictMode===!0&&(c=!0),i.identifierPrefix!==void 0&&(p=i.identifierPrefix),i.onRecoverableError!==void 0&&(v=i.onRecoverableError)),i=kh(s,1,!1,null,null,c,!1,p,v),s[ss]=i.current,Ca(s.nodeType===8?s.parentNode:s),new Ch(i)},Pn.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var i=s._reactInternals;if(i===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=Zl(i),s=s===null?null:s.stateNode,s},Pn.flushSync=function(s){return yo(s)},Pn.hydrate=function(s,i,c){if(!ru(i))throw Error(n(200));return su(null,s,i,!0,c)},Pn.hydrateRoot=function(s,i,c){if(!Rh(s))throw Error(n(405));var p=c!=null&&c.hydratedSources||null,v=!1,_="",R=ew;if(c!=null&&(c.unstable_strictMode===!0&&(v=!0),c.identifierPrefix!==void 0&&(_=c.identifierPrefix),c.onRecoverableError!==void 0&&(R=c.onRecoverableError)),i=Xv(i,null,s,1,c??null,v,!1,_,R),s[ss]=i.current,Ca(s),p)for(s=0;s<p.length;s++)c=p[s],v=c._getVersion,v=v(c._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[c,v]:i.mutableSourceEagerHydrationData.push(c,v);return new nu(i)},Pn.render=function(s,i,c){if(!ru(i))throw Error(n(200));return su(null,s,i,!1,c)},Pn.unmountComponentAtNode=function(s){if(!ru(s))throw Error(n(40));return s._reactRootContainer?(yo(function(){su(null,null,s,!1,function(){s._reactRootContainer=null,s[ss]=null})}),!0):!1},Pn.unstable_batchedUpdates=wh,Pn.unstable_renderSubtreeIntoContainer=function(s,i,c,p){if(!ru(c))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return su(s,i,c,!1,p)},Pn.version="18.3.1-next-f1338f8080-20240426",Pn}var cw;function ex(){if(cw)return Ph.exports;cw=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ph.exports=U1(),Ph.exports}var uw;function z1(){if(uw)return iu;uw=1;var e=ex();return iu.createRoot=e.createRoot,iu.hydrateRoot=e.hydrateRoot,iu}var B1=z1(),y=Tm();const se=Fl(y),tx=I1({__proto__:null,default:se},[y]);var Ih,dw;function H1(){if(dw)return Ih;dw=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(a,l){if(a===l)return!0;if(a&&l&&typeof a=="object"&&typeof l=="object"){if(a.constructor!==l.constructor)return!1;var u,f,h;if(Array.isArray(a)){if(u=a.length,u!=l.length)return!1;for(f=u;f--!==0;)if(!o(a[f],l[f]))return!1;return!0}var m;if(t&&a instanceof Map&&l instanceof Map){if(a.size!==l.size)return!1;
9for(m=a.entries();!(f=m.next()).done;)if(!l.has(f.value[0]))return!1;for(m=a.entries();!(f=m.next()).done;)if(!o(f.value[1],l.get(f.value[0])))return!1;return!0}if(n&&a instanceof Set&&l instanceof Set){if(a.size!==l.size)return!1;for(m=a.entries();!(f=m.next()).done;)if(!l.has(f.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(l)){if(u=a.length,u!=l.length)return!1;for(f=u;f--!==0;)if(a[f]!==l[f])return!1;return!0}if(a.constructor===RegExp)return a.source===l.source&&a.flags===l.flags;if(a.valueOf!==Object.prototype.valueOf&&typeof a.valueOf=="function"&&typeof l.valueOf=="function")return a.valueOf()===l.valueOf();if(a.toString!==Object.prototype.toString&&typeof a.toString=="function"&&typeof l.toString=="function")return a.toString()===l.toString();if(h=Object.keys(a),u=h.length,u!==Object.keys(l).length)return!1;for(f=u;f--!==0;)if(!Object.prototype.hasOwnProperty.call(l,h[f]))return!1;if(e&&a instanceof Element)return!1;for(f=u;f--!==0;)if(!((h[f]==="_owner"||h[f]==="__v"||h[f]==="__o")&&a.$$typeof)&&!o(a[h[f]],l[h[f]]))return!1;return!0}return a!==a&&l!==l}return Ih=function(l,u){try{return o(l,u)}catch(f){if((f.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw f}},Ih}var V1=H1();const W1=Fl(V1);var Dh,fw;function q1(){if(fw)return Dh;fw=1;var e=function(t,n,r,o,a,l,u,f){if(!t){var h;if(n===void 0)h=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var m=[r,o,a,l,u,f],g=0;h=new Error(n.replace(/%s/g,function(){return m[g++]})),h.name="Invariant Violation"}throw h.framesToPop=1,h}};return Dh=e,Dh}var G1=q1();const hw=Fl(G1);var Lh,pw;function K1(){return pw||(pw=1,Lh=function(t,n,r,o){var a=r?r.call(o,t,n):void 0;if(a!==void 0)return!!a;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var l=Object.keys(t),u=Object.keys(n);if(l.length!==u.length)return!1;for(var f=Object.prototype.hasOwnProperty.bind(n),h=0;h<l.length;h++){var m=l[h];if(!f(m))return!1;var g=t[m],b=n[m];if(a=r?r.call(o,g,b,m):void 0,a===!1||a===void 0&&g!==b)return!1}return!0}),Lh}var Y1=K1();const Q1=Fl(Y1);var nx=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(nx||{}),Mh={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},mw=Object.values(nx),hd={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},rx=Object.entries(hd).reduce((e,[t,n])=>(e[n]=t,e),{}),Ar="data-rh",$i={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Fi=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},J1=e=>{let t=Fi(e,"title");const n=Fi(e,$i.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=Fi(e,$i.DEFAULT_TITLE);return t||r||void 0},X1=e=>Fi(e,$i.ON_CHANGE_CLIENT_STATE)||(()=>{}),$h=(e,t)=>t.filter(n=>typeof n[e]<"u").map(n=>n[e]).reduce((n,r)=>({...n,...r}),{}),Z1=(e,t)=>t.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const o=Object.keys(r);for(let a=0;a<o.length;a+=1){const u=o[a].toLowerCase();if(e.indexOf(u)!==-1&&r[u])return n.concat(r)}}return n},[]),eC=e=>console&&typeof console.warn=="function"&&console.warn(e),qa=(e,t,n)=>{const r={};return n.filter(o=>Array.isArray(o[e])?!0:(typeof o[e]<"u"&&eC(`Helmet: ${e} should be of type "Array". Instead found type "${typeof o[e]}"`),!1)).map(o=>o[e]).reverse().reduce((o,a)=>{const l={};a.filter(f=>{let h;const m=Object.keys(f);for(let b=0;b<m.length;b+=1){const w=m[b],E=w.toLowerCase();
9t.indexOf(E)!==-1&&!(h==="rel"&&f[h].toLowerCase()==="canonical")&&!(E==="rel"&&f[E].toLowerCase()==="stylesheet")&&(h=E),t.indexOf(w)!==-1&&(w==="innerHTML"||w==="cssText"||w==="itemprop")&&(h=w)}if(!h||!f[h])return!1;const g=f[h].toLowerCase();return r[h]||(r[h]={}),l[h]||(l[h]={}),r[h][g]?!1:(l[h][g]=!0,!0)}).reverse().forEach(f=>o.push(f));const u=Object.keys(l);for(let f=0;f<u.length;f+=1){const h=u[f],m={...r[h],...l[h]};r[h]=m}return o},[]).reverse()},tC=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},nC=e=>({baseTag:Z1(["href"],e),bodyAttributes:$h("bodyAttributes",e),defer:Fi(e,$i.DEFER),encode:Fi(e,$i.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:$h("htmlAttributes",e),linkTags:qa("link",["rel","href"],e),metaTags:qa("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:qa("noscript",["innerHTML"],e),onChangeClientState:X1(e),scriptTags:qa("script",["src","innerHTML"],e),styleTags:qa("style",["cssText"],e),title:J1(e),titleAttributes:$h("titleAttributes",e),prioritizeSeoTags:tC(e,$i.PRIORITIZE_SEO_TAGS)}),sx=e=>Array.isArray(e)?e.join(""):e,rC=(e,t)=>{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},Fh=(e,t)=>Array.isArray(e)?e.reduce((n,r)=>(rC(r,t)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:e,priority:[]},gw=(e,t)=>({...e,[t]:void 0}),sC=["noscript","script","style"],Rp=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),ox=e=>Object.keys(e).reduce((t,n)=>{const r=typeof e[n]<"u"?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r},""),oC=(e,t,n,r)=>{const o=ox(n),a=sx(t);return o?`<${e} ${Ar}="true" ${o}>${Rp(a,r)}</${e}>`:`<${e} ${Ar}="true">${Rp(a,r)}</${e}>`},iC=(e,t,n=!0)=>t.reduce((r,o)=>{const a=o,l=Object.keys(a).filter(h=>!(h==="innerHTML"||h==="cssText")).reduce((h,m)=>{const g=typeof a[m]>"u"?m:`${m}="${Rp(a[m],n)}"`;return h?`${h} ${g}`:g},""),u=a.innerHTML||a.cssText||"",f=sC.indexOf(e)===-1;return`${r}<${e} ${Ar}="true" ${l}${f?"/>":`>${u}</${e}>`}`},""),ix=(e,t={})=>Object.keys(e).reduce((n,r)=>{const o=hd[r];return n[o||r]=e[r],n},t),aC=(e,t,n)=>{const r={key:t,[Ar]:!0},o=ix(n,r);return[se.createElement("title",o,t)]},Pu=(e,t)=>t.map((n,r)=>{const o={key:r,[Ar]:!0};return Object.keys(n).forEach(a=>{const u=hd[a]||a;if(u==="innerHTML"||u==="cssText"){const f=n.innerHTML||n.cssText;o.dangerouslySetInnerHTML={__html:f}}else o[u]=n[a]}),se.createElement(e,o)}),cr=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>aC(e,t.title,t.titleAttributes),toString:()=>oC(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>ix(t),toString:()=>ox(t)};default:return{toComponent:()=>Pu(e,t),toString:()=>iC(e,t,n)}}},lC=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const o=Fh(e,Mh.meta),a=Fh(t,Mh.link),l=Fh(n,Mh.script);return{priorityMethods:{toComponent:()=>[...Pu("meta",o.priority),...Pu("link",a.priority),...Pu("script",l.priority)],toString:()=>`${cr("meta",o.priority,r)} ${cr("link",a.priority,r)} ${cr("script",l.priority,r)}`},metaTags:o.default,linkTags:a.default,scriptTags:l.default}},cC=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:o,noscriptTags:a,styleTags:l,title:u="",titleAttributes:f,prioritizeSeoTags:h}=e;let{linkTags:m,metaTags:g,scriptTags:b}=e,w={toComponent:()=>[],toString:()=>""};return h&&({priorityMethods:w,linkTags:m,metaTags:g,scriptTags:b}=lC(e)),{priority:w,base:cr("base",t,r),bodyAttributes:cr("bodyAttributes",n,r),htmlAttributes:cr("htmlAttributes",o,r),link:cr("link",m,r),meta:cr("meta",g,r),noscript:cr("noscript",a,r),script:cr("script",b,r),style:cr("style",l,r),title:cr("title",{title:u,titleAttributes:f},r)}},Ap=cC,au=[],Cm=!!(typeof window<"u"&&window.document&&window.document.createElement),jp=class{instances=[];canUseDOM=Cm;context;value={setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?au:this.instances,add:e=>{(this.canUseDOM?au:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?au:this.instances).indexOf(e);(this.canUseDOM?au:this.instances).splice(t,1)}}};constructor(e,t){this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Ap({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},uC=parseInt(se.version.split(".")[0],10),Pp=uC>=19,dC={},ax=se.createContext(dC),lx=class cx extends y.Component{static canUseDOM=Cm;helmetData;constructor(t){super(t),Pp?this.helmetData=null:this.helmetData=new jp(this.props.context||{},cx.canUseDOM)}render(){return Pp?se.createElement(se.Fragment,null,this.props.children):se.createElement(ax.Provider,{value:this.helmetData.value},this.props.children)}},_i=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${Ar}]`),o=[].slice.call(r),a=[];let l;return t&&t.length&&t.forEach(u=>{const f=document.createElement(e);for(const h in u)if(Object.prototype.hasOwnProperty.call(u,h))if(h==="innerHTML")f.innerHTML=u.innerHTML;else if(h==="cssText"){const m=u.cssText;f.appendChild(document.createTextNode(m))}else{const m=h,g=typeof u[m]>"u"?"":u[m];f.setAttribute(h,g)}f.setAttribute(Ar,"true"),o.some((h,m)=>(l=m,f.isEqualNode(h)))?o.splice(l,1):a.push(f)}),o.forEach(u=>u.parentNode?.removeChild(u)),a.forEach(u=>n.appendChild(u)),{oldTags:o,newTags:a}},Np=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(Ar),o=r?r.split(","):[],a=[...o],l=Object.keys(t);for(const u of l){const f=t[u]||"";n.getAttribute(u)!==f&&n.setAttribute(u,f),o.indexOf(u)===-1&&o.push(u);const h=a.indexOf(u);h!==-1&&a.splice(h,1)}for(let u=a.length-1;u>=0;u-=1)n.removeAttribute(a[u]);o.length===a.length?n.removeAttribute(Ar):n.getAttribute(Ar)!==l.join(",")&&n.setAttribute(Ar,l.join(","))},fC=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=sx(e)),Np("title",t)},yw=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:o,linkTags:a,metaTags:l,noscriptTags:u,onChangeClientState:f,scriptTags:h,styleTags:m,title:g,titleAttributes:b}=e;Np("body",r),Np("html",o),fC(g,b);
9const w={baseTag:_i("base",n),linkTags:_i("link",a),metaTags:_i("meta",l),noscriptTags:_i("noscript",u),scriptTags:_i("script",h),styleTags:_i("style",m)},E={},x={};Object.keys(w).forEach(S=>{const{newTags:T,oldTags:k}=w[S];T.length&&(E[S]=T),k.length&&(x[S]=w[S].oldTags)}),t&&t(),f(e,E,x)},Ga=null,hC=e=>{Ga&&cancelAnimationFrame(Ga),e.defer?Ga=requestAnimationFrame(()=>{yw(e,()=>{Ga=null})}):(yw(e),Ga=null)},pC=hC,vw=class extends y.Component{rendered=!1;shouldComponentUpdate(e){return!Q1(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){const{helmetInstances:e,setHelmet:t}=this.props.context;let n=null;const r=nC(e.get().map(o=>{const{context:a,...l}=o.props;return l}));lx.canUseDOM?pC(r):Ap&&(n=Ap(r)),t(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},Nu=[],ww=e=>{const t={};for(const n of Object.keys(e))t[rx[n]||n]=e[n];return t},xo=e=>{const t={};for(const n of Object.keys(e)){const r=hd[n];t[r||n]=e[n]}return t},bw=(e,t)=>{if(!Cm)return;const n=document.getElementsByTagName(e)[0];if(!n)return;const r="data-rh-managed",o=n.getAttribute(r),a=o?o.split(","):[],l=Object.keys(t);for(const u of a)l.includes(u)||n.removeAttribute(u);for(const u of l){const f=t[u];f==null||f===!1?n.removeAttribute(u):f===!0?n.setAttribute(u,""):n.setAttribute(u,String(f))}l.length>0?n.setAttribute(r,l.join(",")):n.removeAttribute(r)},Uh=()=>{const e={},t={};for(const n of Nu){const{htmlAttributes:r,bodyAttributes:o}=n.props;r&&Object.assign(e,ww(r)),o&&Object.assign(t,ww(o))}bw("html",e),bw("body",t)},mC=class extends y.Component{componentDidMount(){Nu.push(this),Uh()}componentDidUpdate(){Uh()}componentWillUnmount(){const e=Nu.indexOf(this);e!==-1&&Nu.splice(e,1),Uh()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:n}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||n||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return se.createElement("title",xo(t),e)}renderBase(){const{base:e}=this.props;return e?se.createElement("base",xo(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>se.createElement("meta",{key:n,...xo(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>se.createElement("link",{key:n,...xo(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...o}=t,a=xo(o);return r&&(a.dangerouslySetInnerHTML={__html:r}),se.createElement("script",{key:n,...a})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{cssText:r,...o}=t,a=xo(o);return r&&(a.dangerouslySetInnerHTML={__html:r}),se.createElement("style",{key:n,...a})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...o}=t,a=xo(o);return r&&(a.dangerouslySetInnerHTML={__html:r}),se.createElement("noscript",{key:n,...a})})}render(){return se.createElement(se.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},gC=class extends y.Component{static defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1};shouldComponentUpdate(e){return!W1(gw(this.props,"helmetData"),gw(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(r=>{n={...n,[r]:e[r]}}),n}
9warnOnInvalidChildren(e,t){return hw(mw.some(n=>e.type===n),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${mw.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),hw(!t||typeof t=="string"||Array.isArray(t)&&!t.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return se.Children.forEach(e,r=>{if(!r||!r.props)return;const{children:o,...a}=r.props,l=Object.keys(a).reduce((f,h)=>(f[rx[h]||h]=a[h],f),{});let{type:u}=r;switch(typeof u=="symbol"?u=u.toString():this.warnOnInvalidChildren(r,o),u){case"Symbol(react.fragment)":t=this.mapChildrenToProps(o,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,l,o);break;default:t=this.mapObjectTypeChildren(r,t,l,o);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof jp)){const o=r;r=new jp(o.context,!0),delete n.helmetData}return Pp?se.createElement(mC,{...n}):r?se.createElement(vw,{...n,context:r.value}):se.createElement(ax.Consumer,null,o=>se.createElement(vw,{...n,context:o}))}};const yC="modulepreload",vC=function(e){return"/"+e},xw={},oe=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let f=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),u=l?.nonce||l?.getAttribute("nonce");o=f(n.map(h=>{if(h=vC(h),h in xw)return;xw[h]=!0;const m=h.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":yC,m||(b.as="script"),b.crossOrigin="",b.href=h,u&&b.setAttribute("nonce",u),document.head.appendChild(b),m)return new Promise((w,E)=>{b.addEventListener("load",w),b.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${h}`)))})}))}function a(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return o.then(l=>{for(const u of l||[])u.status==="rejected"&&a(u.reason);return t().catch(a)})},wC=1,bC=1e6;let zh=0;function xC(){return zh=(zh+1)%Number.MAX_SAFE_INTEGER,zh.toString()}const Bh=new Map,_w=e=>{if(Bh.has(e))return;const t=setTimeout(()=>{Bh.delete(e),hl({type:"REMOVE_TOAST",toastId:e})},bC);Bh.set(e,t)},_C=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,wC)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?_w(n):e.toasts.forEach(r=>{_w(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Ou=[];let Iu={toasts:[]};function hl(e){Iu=_C(Iu,e),Ou.forEach(t=>{t(Iu)})}function SC({...e}){const t=xC(),n=o=>hl({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>hl({type:"DISMISS_TOAST",toastId:t});return hl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function EC(){const[e,t]=y.useState(Iu);return y.useEffect(()=>(Ou.push(t),()=>{const n=Ou.indexOf(t);n>-1&&Ou.splice(n,1)}),[e]),{...e,toast:SC,dismiss:n=>hl({type:"DISMISS_TOAST",toastId:n})}}var pd=ex();const ux=Fl(pd);function Re(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Sw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function md(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Sw(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Sw(e[o],null)}}}}function xt(...e){return y.useCallback(md(...e),e)}function kC(e,t){const n=y.createContext(t),r=a=>{const{children:l,...u}=a,f=y.useMemo(()=>u,Object.values(u));return d.jsx(n.Provider,{value:f,children:l})};r.displayName=e+"Provider";function o(a){const l=y.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Es(e,t=[]){let n=[];function r(a,l){const u=y.createContext(l),f=n.length;n=[...n,l];const h=g=>{const{scope:b,children:w,...E}=g,x=b?.[e]?.[f]||u,S=y.useMemo(()=>E,Object.values(E));return d.jsx(x.Provider,{value:S,children:w})};h.displayName=a+"Provider";function m(g,b){const w=b?.[e]?.[f]||u,E=y.useContext(w);if(E)return E;if(l!==void 0)return l;throw new Error(`\`${g}\` must be used within \`${a}\``)}return[h,m]}const o=()=>{const a=n.map(l=>y.createContext(l));return function(u){const f=u?.[e]||a;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return o.scopeName=e,[r,TC(o,...t)]}function TC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const l=r.reduce((u,{useScope:f,scopeName:h})=>{const g=f(a)[`__scope${h}`];return{...u,...g}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function qi(e){const t=RC(e),n=y.forwardRef((r,o)=>{const{children:a,...l}=r,u=y.Children.toArray(a),f=u.find(jC);if(f){const h=f.props.children,m=u.map(g=>g===f?y.Children.count(h)>1?y.Children.only(null):y.isValidElement(h)?h.props.children:null:g);return d.jsx(t,{...l,ref:o,children:y.isValidElement(h)?y.cloneElement(h,void 0,m):null})}return d.jsx(t,{...l,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var CC=qi("Slot");function RC(e){const t=y.forwardRef((n,r)=>{const{children:o,...a}=n;if(y.isValidElement(o)){const l=NC(o),u=PC(a,o.props);return o.type!==y.Fragment&&(u.ref=r?md(r,l):l),y.cloneElement(o,u)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dx=Symbol("radix.slottable");function AC(e){const t=({children:n})=>d.jsx(d.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=dx,t}function jC(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===d
vendor: 9,068 bytes, line 9
9x}function PC(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const f=a(...u);return o(...u),f}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function NC(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Rm(e){const t=e+"CollectionProvider",[n,r]=Es(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=x=>{const{scope:S,children:T}=x,k=se.useRef(null),C=se.useRef(new Map).current;return d.jsx(o,{scope:S,itemMap:C,collectionRef:k,children:T})};l.displayName=t;const u=e+"CollectionSlot",f=qi(u),h=se.forwardRef((x,S)=>{const{scope:T,children:k}=x,C=a(u,T),j=xt(S,C.collectionRef);return d.jsx(f,{ref:j,children:k})});h.displayName=u;const m=e+"CollectionItemSlot",g="data-radix-collection-item",b=qi(m),w=se.forwardRef((x,S)=>{const{scope:T,children:k,...C}=x,j=se.useRef(null),O=xt(S,j),M=a(m,T);return se.useEffect(()=>(M.itemMap.set(j,{ref:j,...C}),()=>{M.itemMap.delete(j)})),d.jsx(b,{[g]:"",ref:O,children:k})});w.displayName=m;function E(x){const S=a(e+"CollectionConsumer",x);return se.useCallback(()=>{const k=S.collectionRef.current;if(!k)return[];const C=Array.from(k.querySelectorAll(`[${g}]`));return Array.from(S.itemMap.values()).sort((M,D)=>C.indexOf(M.ref.current)-C.indexOf(D.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:l,Slot:h,ItemSlot:w},E,r]}var OC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ze=OC.reduce((e,t)=>{const n=qi(`Primitive.${t}`),r=y.forwardRef((o,a)=>{const{asChild:l,...u}=o,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(f,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Am(e,t){e&&pd.flushSync(()=>e.dispatchEvent(t))}function Yn(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function IC(e,t=globalThis?.document){const n=Yn(e);y.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var DC="DismissableLayer",Op="dismissableLayer.update",LC="dismissableLayer.pointerDownOutside",MC="dismissableLayer.focusOutside",Ew,fx=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ul=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:l,onDismiss:u,...f}=e,h=y.useContext(fx),[m,g]=y.useState(null),b=m?.ownerDocument??globalThis?.document,[,w]=y.useState({}),E=xt(t,D=>g(D)),x=Array.from(h.layers),[S]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),T=x.indexOf(S),k=m?x.indexOf(m):-1,C=h.layersWithOutsidePointerEventsDisabled.size>0,j=k>=T,O=FC(D=>{const q=D.target,J=[...h.branches].some(ne=>ne.contains(q));!j||J||(o?.(D),l?.(D),D.defaultPrevented||u?.())},b),M=UC(D=>{const q=D.target;[...h.branches].some(ne=>ne.contains(q))||(a?.(D),l?.(D),D.defaultPrevented||u?.())},b);return IC(D=>{k===h.layers.size-1&&(r?.(D),!D.defaultPrevented&&u&&(D.preventDefault(),u()))},b),y.useEffect(()=>{if(m)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(Ew=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),kw(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Ew)}},[m,b,n,h]),y.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),kw())},[m,h]),y.useEffect(()=>{const D=()=>w({});return document.addEventListener(Op,D),()=>document.removeEventListener(Op,D)},[]),d.jsx(Ze.div,{...f,ref:E,style:{pointerEvents:C?j?"auto":"none":void 0,...e.style},onFocusCapture:Re(e.onFocusCapture,M.onFocusCapture),onBlurCapture:Re(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:Re(e.onPointerDownCapture,O.onPointerDownCapture)})});Ul.displayName=DC;var $C="DismissableLayerBranch",hx=y.forwardRef((e,t)=>{const n=y.useContext(fx),r=y.useRef(null),o=xt(t,r);return y.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(Ze.div,{...e,ref:o})});hx.displayName=$C;function FC(e,t=globalThis?.document){const n=Yn(e),r=y.useRef(!1),o=y.useRef(()=>{});return y.useEffect(()=>{const a=u=>{if(u.target&&!r.current){let f=function(){px(LC,n,h,{discrete:!0})};const h={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function UC(e,t=globalThis?.document){const n=Yn(e),r=y.useRef(!1);return y.useEffect(()=>{const o=a=>{a.target&&!r.current&&px(MC,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function kw(){const e=new CustomEvent(Op);document.dispatchEvent(e)}function px(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Am(o,a):o.dispatchEvent(a)}var zC=Ul,BC=hx,bs=globalThis?.document?y.useLayoutEffect:()=>{},HC="Portal",gd=y.forwardRef((e,t)=>{const{container:n,...r}=e,[o,a]=y.useState(!1);bs(()=>a(!0),[]);const l=n||o&&globalThis?.document?.body;return l?ux.createPortal(d.jsx(Ze.div,{...r,ref:t}),l):null});gd.displayName=HC;function VC(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Xr=e=>{const{present:t,children:n}=e,r=WC(t),o=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),a=xt(r.ref,qC(o));return typeof n=="function"||r.isPresent?y.cloneElement(o,{ref:a}):null};Xr.displayName="Presence";function WC(e){const[t,n]=y.useState(),r=y.useRef(null),o=y.useRef(e),a=y.useRef("none"),l=e?"mounted":"unmounted",[u,f]=VC(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=lu(r.current);a.current=u==="mounted"?h:"none"},[u]),bs(()=>{const h=r.current,m=o.current;if(m!==e){const b=a.current,w=lu(h);e?f("MOUNT"):w==="none"||h?.display==="none"?f("UNMOUNT"):f(m&&b!==w?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),bs(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,g=w=>{const x=lu(r.current).includes(w.animationName);if(w.target===t&&x&&(f("ANIMATION_END"),!o.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},b=w=>{w.target===t&&(a.current=lu(r.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function lu(e){return e?.animationName||"none"}function qC(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var GC=tx[" useInsertionEffect ".trim().toString()]||bs;function Xi({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,l]=KC({defaultProp:t,onChange:n}),u=e!==void 0,f=u?e:o;{const m=y.useRef(e!==void 0);y.useEffect(()=>{const g=m.current;g!==u&&console.warn(`${r} is changing from ${g?"controlled":"uncontrolled"} to ${u?"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.`),m.current=u},[u,r])}const h=y.useCallback(m=>{if(u){const g=YC(m)?m(e):m;g!==e&&l.current?.(g)}else a(m)},[u,e,a,l]);return[f,h]}function KC({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),o=y.useRef(n),a=y.useRef(t);return GC(()=>{a.current=t},[t]),y.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}function YC(e){return typeof e=="function"}var QC=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"}),JC="VisuallyHidden",yd=y.forwardRef((e,t)=>
9d.jsx(Ze.span,{...e,ref:t,style:{...QC,...e.style}}));yd.displayName=JC;var XC=yd,jm="ToastProvider",[Pm,ZC,eR]=Rm("Toast"),[mx]=Es("Toast",[eR]),[tR,vd]=mx(jm),gx=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:l}=e,[u,f]=y.useState(null),[h,m]=y.useState(0),g=y.useRef(!1),b=y.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${jm}\`. Expected non-empty \`string\`.`),d.jsx(Pm.Provider,{scope:t,children:d.jsx(tR,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:a,toastCount:h,viewport:u,onViewportChange:f,onToastAdd:y.useCallback(()=>m(w=>w+1),[]),onToastRemove:y.useCallback(()=>m(w=>w-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:b,children:l})})};gx.displayName=jm;var yx="ToastViewport",nR=["F8"],Ip="toast.viewportPause",Dp="toast.viewportResume",vx=y.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=nR,label:o="Notifications ({hotkey})",...a}=e,l=vd(yx,n),u=ZC(n),f=y.useRef(null),h=y.useRef(null),m=y.useRef(null),g=y.useRef(null),b=xt(t,g,l.onViewportChange),w=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=l.toastCount>0;y.useEffect(()=>{const S=T=>{r.length!==0&&r.every(C=>T[C]||T.code===C)&&g.current?.focus()};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[r]),y.useEffect(()=>{const S=f.current,T=g.current;if(E&&S&&T){const k=()=>{if(!l.isClosePausedRef.current){const M=new CustomEvent(Ip);T.dispatchEvent(M),l.isClosePausedRef.current=!0}},C=()=>{if(l.isClosePausedRef.current){const M=new CustomEvent(Dp);T.dispatchEvent(M),l.isClosePausedRef.current=!1}},j=M=>{!S.contains(M.relatedTarget)&&C()},O=()=>{S.contains(document.activeElement)||C()};return S.addEventListener("focusin",k),S.addEventListener("focusout",j),S.addEventListener("pointermove",k),S.addEventListener("pointerleave",O),window.addEventListener("blur",k),window.addEventListener("focus",C),()=>{S.removeEventListener("focusin",k),S.removeEventListener("focusout",j),S.removeEventListener("pointermove",k),S.removeEventListener("pointerleave",O),window.removeEventListener("blur",k),window.removeEventListener("focus",C)}}},[E,l.isClosePausedRef]);const x=y.useCallback(({tabbingDirection:S})=>{const k=u().map(C=>{const j=C.ref.current,O=[j,...mR(j)];return S==="forwards"?O:O.reverse()});return(S==="forwards"?k.reverse():k).flat()},[u]);return y.useEffect(()=>{const S=g.current;if(S){const T=k=>{const C=k.altKey||k.ctrlKey||k.metaKey;if(k.key==="Tab"&&!C){const O=document.activeElement,M=k.shiftKey;if(k.target===S&&M){h.current?.focus();return}const J=x({tabbingDirection:M?"backwards":"forwards"}),ne=J.findIndex(ie=>ie===O);Hh(J.slice(ne+1))?k.preventDefault():M?h.current?.focus():m.current?.focus()}};return S.addEventListener("keydown",T),()=>S.removeEventListener("keydown",T)}},[u,x]),d.jsxs(BC,{ref:f,role:"region","aria-label":o.replace("{hotkey}",w),tabIndex:-1,style:{pointerEvents:E?void 0:"none"},children:[E&&d.jsx(Lp,{ref:h,onFocusFromOutsideViewport:()=>{const S=x({tabbingDirection:"forwards"});Hh(S)}}),d.jsx(Pm.Slot,{scope:n,children:d.jsx(Ze.ol,{tabIndex:-1,...a,ref:b})}),E&&d.jsx(Lp,{ref:m,onFocusFromOutsideViewport:()=>{const S=x({tabbingDirection:"backwards"});Hh(S)}})]})});vx.displayName=yx;var wx="ToastFocusProxy",Lp=y.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,a=vd(wx,n);return d.jsx(yd,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:l=>{const u=l.relatedTarget;!a.viewport?.contains(u)&&r()}})});Lp.displayName=wx;var zl="Toast",rR="toast.swipeStart",sR="toast.swipeMove",oR="toast.swipeCancel",iR="toast.swipeEnd",bx=y.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:a,...l}=e,[u,f]=Xi({prop:r,defaultProp:o??!0,onChange:a,caller:zl});return d.jsx(Xr,{present:n||u,children:d.jsx(cR,{open:u,...l,ref:t,onClose:()=>f(!1),onPause:Yn(e.onPause),onResume:Yn(e.onResume),onSwipeStart:Re(e.onSwipeStart,h=>{h.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Re(e.onSwipeMove,h=>{const{x:m,y:g}=h.detail.delta;
9h.currentTarget.setAttribute("data-swipe","move"),h.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:Re(e.onSwipeCancel,h=>{h.currentTarget.setAttribute("data-swipe","cancel"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Re(e.onSwipeEnd,h=>{const{x:m,y:g}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","end"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),f(!1)})})})});bx.displayName=zl;var[aR,lR]=mx(zl,{onClose(){}}),cR=y.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:a,onClose:l,onEscapeKeyDown:u,onPause:f,onResume:h,onSwipeStart:m,onSwipeMove:g,onSwipeCancel:b,onSwipeEnd:w,...E}=e,x=vd(zl,n),[S,T]=y.useState(null),k=xt(t,L=>T(L)),C=y.useRef(null),j=y.useRef(null),O=o||x.duration,M=y.useRef(0),D=y.useRef(O),q=y.useRef(0),{onToastAdd:J,onToastRemove:ne}=x,ie=Yn(()=>{S?.contains(document.activeElement)&&x.viewport?.focus(),l()}),re=y.useCallback(L=>{!L||L===1/0||(window.clearTimeout(q.current),M.current=new Date().getTime(),q.current=window.setTimeout(ie,L))},[ie]);y.useEffect(()=>{const L=x.viewport;if(L){const G=()=>{re(D.current),h?.()},Q=()=>{const te=new Date().getTime()-M.current;D.current=D.current-te,window.clearTimeout(q.current),f?.()};return L.addEventListener(Ip,Q),L.addEventListener(Dp,G),()=>{L.removeEventListener(Ip,Q),L.removeEventListener(Dp,G)}}},[x.viewport,O,f,h,re]),y.useEffect(()=>{a&&!x.isClosePausedRef.current&&re(O)},[a,O,x.isClosePausedRef,re]),y.useEffect(()=>(J(),()=>ne()),[J,ne]);const pe=y.useMemo(()=>S?Cx(S):null,[S]);return x.viewport?d.jsxs(d.Fragment,{children:[pe&&d.jsx(uR,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:pe}),d.jsx(aR,{scope:n,onClose:ie,children:pd.createPortal(d.jsx(Pm.ItemSlot,{scope:n,children:d.jsx(zC,{asChild:!0,onEscapeKeyDown:Re(u,()=>{x.isFocusedToastEscapeKeyDownRef.current||ie(),x.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(Ze.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":x.swipeDirection,...E,ref:k,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Re(e.onKeyDown,L=>{L.key==="Escape"&&(u?.(L.nativeEvent),L.nativeEvent.defaultPrevented||(x.isFocusedToastEscapeKeyDownRef.current=!0,ie()))}),onPointerDown:Re(e.onPointerDown,L=>{L.button===0&&(C.current={x:L.clientX,y:L.clientY})}),onPointerMove:Re(e.onPointerMove,L=>{if(!C.current)return;const G=L.clientX-C.current.x,Q=L.clientY-C.current.y,te=!!j.current,B=["left","right"].includes(x.swipeDirection),F=["left","up"].includes(x.swipeDirection)?Math.min:Math.max,W=B?F(0,G):0,N=B?0:F(0,Q),z=L.pointerType==="touch"?10:2,Y={x:W,y:N},X={originalEvent:L,delta:Y};te?(j.current=Y,cu(sR,g,X,{discrete:!1})):Tw(Y,x.swipeDirection,z)?(j.current=Y,cu(rR,m,X,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(G)>z||Math.abs(Q)>z)&&(C.current=null)}),onPointerUp:Re(e.onPointerUp,L=>{const G=j.current,Q=L.target;if(Q.hasPointerCapture(L.pointerId)&&Q.releasePointerCapture(L.pointerId),j.current=null,C.current=null,G){const te=L.currentTarget,B={originalEvent:L,delta:G};Tw(G,x.swipeDirection,x.swipeThreshold)?cu(iR,w,B,{discrete:!0}):cu(oR,b,B,{discrete:!0}),te.addEventListener("click",F=>F.preventDefault(),{once:!0})}})})})}),x.viewport)})]}):null}),uR=e=>{const{__scopeToast:t,children:n,...r}=e,o=vd(zl,t),[a,l]=y.useState(!1),[u,f]=y.useState(!1);return hR(()=>l(!0)),y.useEffect(()=>{const h=window.setTimeout(()=>f(!0),1e3);return()=>window.clearTimeout(h)},[]),u?null:d.jsx(gd,{asChild:!0,children:d.jsx(yd,{...r,children:a&&d.jsxs(d.Fragment,{children:[o.label," ",n]})})})},dR="ToastTitle",xx=y.forwardRef((e,t)=>
9{const{__scopeToast:n,...r}=e;return d.jsx(Ze.div,{...r,ref:t})});xx.displayName=dR;var fR="ToastDescription",_x=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return d.jsx(Ze.div,{...r,ref:t})});_x.displayName=fR;var Sx="ToastAction",Ex=y.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?d.jsx(Tx,{altText:n,asChild:!0,children:d.jsx(Nm,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Sx}\`. Expected non-empty \`string\`.`),null)});Ex.displayName=Sx;var kx="ToastClose",Nm=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=lR(kx,n);return d.jsx(Tx,{asChild:!0,children:d.jsx(Ze.button,{type:"button",...r,ref:t,onClick:Re(e.onClick,o.onClose)})})});Nm.displayName=kx;var Tx=y.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return d.jsx(Ze.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Cx(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),pR(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!o)if(a){const l=r.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...Cx(r))}}),t}function cu(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Am(o,a):o.dispatchEvent(a)}var Tw=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),a=r>o;return t==="left"||t==="right"?a&&r>n:!a&&o>n};function hR(e=()=>{}){const t=Yn(e);bs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function pR(e){return e.nodeType===e.ELEMENT_NODE}function mR(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Hh(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var gR=gx,Rx=vx,Ax=bx,jx=xx,Px=_x,Nx=Ex,Ox=Nm;function Ix(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ix(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Dx(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ix(e))&&(r&&(r+=" "),r+=t);return r}const Cw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Rw=Dx,Bl=(e,t)=>n=>{var r;if(t?.variants==null)return Rw(e,n?.class,n?.className);const{variants:o,defaultVariants:a}=t,l=Object.keys(o).map(h=>{const m=n?.[h],g=a?.[h];if(m===null)return null;const b=Cw(m)||Cw(g);return o[h][b]}),u=n&&Object.entries(n).reduce((h,m)=>{let[g,b]=m;return b===void 0||(h[g]=b),h},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,m)=>{let{class:g,className:b,...w}=m;return Object.entries(w).every(E=>{let[x,S]=E;return Array.isArray(S)?S.includes({...a,...u}[x]):{...a,...u}[x]===S})?[...h,g,b]:h},[]);return Rw(e,l,f,n?.class,n?.className)};const yR=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Lx=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var vR={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const wR=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:l,...u},f)=>y.createElement("svg",{ref:f,...vR,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Lx("lucide",o),...u},[...l.map(([h,m])=>y.createElement(h,m)),...Array.isArray(a)?a:[a]]));const We=(e,t)=>{const n=y.forwardRef(({className:r,...o},a)=>y.createElement(wR,{ref:a,iconNode:t,className:Lx(`lucide-${yR(e)}`,r),...o}));return n.displayName=`${e}`,n};const bR=We("Accessibility",[["circle",{cx:"16",cy:"4",r:"1",key:"1grugj"}],["path",{d:"m18 19 1-7-6 1",key:"r0i19z"}],["path",{d:"m5 8 3-3 5.5 3-2.36 3.5",key:"9ptxx2"}],["path",{d:"M4.24 14.5a5 5 0 0 0 6.88 6",key:"10kmtu"}],["path",{d:"M13.76 17.5a5 5 0 0 0-6.88-6",key:"2qq6rc"}]]);const xR=We("Armchair",[["path",{d:"M19 9V6a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v3",key:"irtipd"}],["path",{d:"M3 16a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0z",key:"1qyhux"}],["path",{d:"M5 18v2",key:"ppbyun"}],["path",{d:"M19 18v2",key:"gy7782"}]]);const _R=We("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const Om=We("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const Mx=We("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"}]]);const SR=We("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);const ER=We("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const $x=We("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Im=We("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const kR=We("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const yl=We("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const TR=We("Cookie",[["path",{d:"M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5",key:"laymnq"}],["path",{d:"M8.5 8.5v.01",key:"ue8clq"}],["path",{d:"M16 15.5v.01",key:"14dtrp"}],["path",{d:"M12 12v.01",key:"u5ubse"}],["path",{d:"M11 17v.01",key:"1hyl5a"}],["path",{d:"M7 14v.01",key:"uct60s"}]]);const CR=We("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const Fx=We("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);const RR=We("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);const AR=We("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);const jR=We("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);const PR=We("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"}]]);
9const NR=We("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);const Zs=We("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const OR=We("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"}]]);const Ux=We("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);const zx=We("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"}]]);const Bx=We("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"}]]);const IR=We("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);const Wu=We("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);const Hx=We("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const DR=We("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);const Aw=We("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);const LR=We("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);const Mp=We("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);const MR=We("TramFront",[["rect",{width:"16",height:"16",x:"4",y:"3",rx:"2",key:"1wxw4b"}],["path",{d:"M4 11h16",key:"mpoxn0"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"m8 19-2 3",key:"13i0xs"}],["path",{d:"m18 22-2-3",key:"1p0ohu"}],["path",{d:"M8 15h.01",key:"a7atzg"}],["path",{d:"M16 15h.01",key:"rnfrdf"}]]);const $R=We("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const FR=We("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const jw=We("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);const Vh=We("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);const Zi=We("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,060 bytes, line 9
9],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const UR=We("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]),Dm="-",zR=e=>{const t=HR(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(Dm);return u[0]===""&&u.length!==1&&u.shift(),Vx(u,t)||BR(l)},getConflictingClassGroupIds:(l,u)=>{const f=n[l]||[];return u&&r[l]?[...f,...r[l]]:f}}},Vx=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Vx(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Dm);return t.validators.find(({validator:l})=>l(a))?.classGroupId},Pw=/^\[(.+)\]$/,BR=e=>{if(Pw.test(e)){const t=Pw.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},HR=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return WR(Object.entries(e.classGroups),n).forEach(([a,l])=>{$p(l,r,a,t)}),r},$p=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Nw(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(VR(o)){$p(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,l])=>{$p(l,Nw(t,a),n,r)})})},Nw=(e,t)=>{let n=e;return t.split(Dm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},VR=e=>e.isThemeGetter,WR=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([l,u])=>[t+l,u])):a);return[n,o]}):e,qR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,l)=>{n.set(a,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let l=n.get(a);if(l!==void 0)return l;if((l=r.get(a))!==void 0)return o(a,l),l},set(a,l){n.has(a)?n.set(a,l):o(a,l)}}},Wx="!",GR=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,l=u=>{const f=[];let h=0,m=0,g;for(let S=0;S<u.length;S++){let T=u[S];if(h===0){if(T===o&&(r||u.slice(S,S+a)===t)){f.push(u.slice(m,S)),m=S+a;continue}if(T==="/"){g=S;continue}}T==="["?h++:T==="]"&&h--}const b=f.length===0?u:u.substring(m),w=b.startsWith(Wx),E=w?b.substring(1):b,x=g&&g>m?g-m:void 0;return{modifiers:f,hasImportantModifier:w,baseClassName:E,maybePostfixModifierPosition:x}};return n?u=>n({className:u,parseClassName:l}):l},KR=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},YR=e=>({cache:qR(e.cacheSize),parseClassName:GR(e),...zR(e)}),QR=/\s+/,JR=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],l=e.trim().split(QR);let u="";for(let f=l.length-1;f>=0;f-=1){const h=l[f],{modifiers:m,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:w}=n(h);let E=!!w,x=r(E?b.substring(0,w):b);if(!x){if(!E){u=h+(u.length>0?" "+u:u);continue}if(x=r(b),!x){u=h+(u.length>0?" "+u:u);continue}E=!1}const S=KR(m).join(":"),T=g?S+Wx:S,k=T+x;if(a.includes(k))continue;a.push(k);const C=o(x,E);for(let j=0;j<C.length;++j){const O=C[j];a.push(T+O)}u=h+(u.length>0?" "+u:u)}return u};function XR(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=qx(t))&&(r&&(r+=" "),r+=n);return r}const qx=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=qx(e[r]))&&(n&&(n+=" "),n+=t);return n};function ZR(e,...t){let n,r,o,a=l;function l(f){const h=t.reduce((m,g)=>g(m),e());return n=YR(h),r=n.cache.get,o=n.cache.set,a=u,u(f)}function u(f){const h=r(f);if(h)return h;const m=JR(f,n);return o(f,m),m}return function(){return a(XR.apply(null,arguments))}}const ft=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Gx=/^\[(?:([a-z-]+):)?(.+)\]$/i,eA=/^\d+\/\d+$/,tA=new Set(["px","full","screen"]),nA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rA=/\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$/,sA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,oA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fs=e=>Ui(e)||tA.has(e)||eA.test(e),Ws=e=>ea(e,"length",pA),Ui=e=>!!e&&!Number.isNaN(Number(e)),Wh=e=>ea(e,"number",Ui),Ka=e=>!!e&&Number.isInteger(Number(e)),aA=e=>e.endsWith("%")&&Ui(e.slice(0,-1)),Be=e=>Gx.test(e),qs=e=>nA.test(e),lA=new Set(["length","size","percentage"]),cA=e=>ea(e,lA,Kx),uA=e=>ea(e,"position",Kx),dA=new Set(["image","url"]),fA=e=>ea(e,dA,gA),hA=e=>ea(e,"",mA),Ya=()=>!0,ea=(e,t,n)=>{const r=Gx.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},pA=e=>rA.test(e)&&!sA.test(e),Kx=()=>!1,mA=e=>oA.test(e),gA=e=>iA.test(e),yA=()=>{const e=ft("colors"),t=ft("spacing"),n=ft("blur"),r=ft("brightness"),o=ft("borderColor"),a=ft("borderRadius"),l=ft("borderSpacing"),u=ft("borderWidth"),f=ft("
9contrast"),h=ft("grayscale"),m=ft("hueRotate"),g=ft("invert"),b=ft("gap"),w=ft("gradientColorStops"),E=ft("gradientColorStopPositions"),x=ft("inset"),S=ft("margin"),T=ft("opacity"),k=ft("padding"),C=ft("saturate"),j=ft("scale"),O=ft("sepia"),M=ft("skew"),D=ft("space"),q=ft("translate"),J=()=>["auto","contain","none"],ne=()=>["auto","hidden","clip","visible","scroll"],ie=()=>["auto",Be,t],re=()=>[Be,t],pe=()=>["",fs,Ws],L=()=>["auto",Ui,Be],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Q=()=>["solid","dashed","dotted","double","none"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],F=()=>["","0",Be],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>[Ui,Be];return{cacheSize:500,separator:":",theme:{colors:[Ya],spacing:[fs,Ws],blur:["none","",qs,Be],brightness:N(),borderColor:[e],borderRadius:["none","","full",qs,Be],borderSpacing:re(),borderWidth:pe(),contrast:N(),grayscale:F(),hueRotate:N(),invert:F(),gap:re(),gradientColorStops:[e],gradientColorStopPositions:[aA,Ws],inset:ie(),margin:ie(),opacity:N(),padding:re(),saturate:N(),scale:N(),sepia:F(),skew:N(),space:re(),translate:re()},classGroups:{aspect:[{aspect:["auto","square","video",Be]}],container:["container"],columns:[{columns:[qs]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),Be]}],overflow:[{overflow:ne()}],"overflow-x":[{"overflow-x":ne()}],"overflow-y":[{"overflow-y":ne()}],overscroll:[{overscroll:J()}],"overscroll-x":[{"overscroll-x":J()}],"overscroll-y":[{"overscroll-y":J()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ka,Be]}],basis:[{basis:ie()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Be]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:["first","last","none",Ka,Be]}],"grid-cols":[{"grid-cols":[Ya]}],"col-start-end":[{col:["auto",{span:["full",Ka,Be]},Be]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[Ya]}],"row-start-end":[{row:["auto",{span:[Ka,Be]},Be]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Be]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Be,t]}],"min-w":[{"min-w":[Be,t,"min","max","fit"]}],"max-w":[{"max-w":[Be,t,"none","full","min","max","fit","prose",{screen:[qs]},qs]}],h:[{h:[Be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",qs,Ws]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Wh]}],"font-family":[{font:[Ya]}],"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",Be]}],"line-clamp":[{"line-clamp":["none",Ui,Wh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fs,Be]}],"list-image":[{"list-image":["none",Be]}],"list-style-type":[{list:["none","disc","decimal",Be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[T]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[T]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fs,Ws]}],"underline-offset":[{"underline-offset":["auto",fs,Be]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:re()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Be]}],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",Be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[T]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),uA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",cA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},fA]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[E]}
vendor: 5,201 bytes, line 9
9],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[T]}],"border-style":[{border:[...Q(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[T]}],"divide-style":[{divide:Q()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...Q()]}],"outline-offset":[{"outline-offset":[fs,Be]}],"outline-w":[{outline:[fs,Ws]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[T]}],"ring-offset-w":[{"ring-offset":[fs,Ws]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",qs,hA]}],"shadow-color":[{shadow:[Ya]}],opacity:[{opacity:[T]}],"mix-blend":[{"mix-blend":[...te(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":te()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",qs,Be]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[g]}],saturate:[{saturate:[C]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[T]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Be]}],duration:[{duration:N()}],ease:[{ease:["linear","in","out","in-out",Be]}],delay:[{delay:N()}],animate:[{animate:["none","spin","ping","pulse","bounce",Be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[Ka,Be]}],"translate-x":[{"translate-x":[q]}],"translate-y":[{"translate-y":[q]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Be]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":re()}],"scroll-mx":[{"scroll-mx":re()}],"scroll-my":[{"scroll-my":re()}],"scroll-ms":[{"scroll-ms":re()}],"scroll-me":[{"scroll-me":re()}],"scroll-mt":[{"scroll-mt":re()}],"scroll-mr":[{"scroll-mr":re()}],"scroll-mb":[{"scroll-mb":re()}],"scroll-ml":[{"scroll-ml":re()}],"scroll-p":[{"scroll-p":re()}],"scroll-px":[{"scroll-px":re()}],"scroll-py":[{"scroll-py":re()}],"scroll-ps":[{"scroll-ps":re()}],"scroll-pe":[{"scroll-pe":re()}],"scroll-pt":[{"scroll-pt":re()}],"scroll-pr":[{"scroll-pr":re()}],"scroll-pb":[{"scroll-pb":re()}],"scroll-pl":[{"scroll-pl":re()}],"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"]}
9],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",Be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[fs,Ws,Wh]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},vA=ZR(yA);function Le(...e){return vA(Dx(e))}const wA=gR,Yx=y.forwardRef(({className:e,...t},n)=>d.jsx(Rx,{ref:n,className:Le("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Yx.displayName=Rx.displayName;const bA=Bl("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"}}),Qx=y.forwardRef(({className:e,variant:t,...n},r)=>d.jsx(Ax,{ref:r,className:Le(bA({variant:t}),e),...n}));Qx.displayName=Ax.displayName;const xA=y.forwardRef(({className:e,...t},n)=>d.jsx(Nx,{ref:n,className:Le("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));xA.displayName=Nx.displayName;const Jx=y.forwardRef(({className:e,...t},n)=>d.jsx(Ox,{ref:n,className:Le("absolute right-2 top-2 rounded-md p-1 text-foreground
9/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:d.jsx(Zi,{className:"h-4 w-4"})}));Jx.displayName=Ox.displayName;const Xx=y.forwardRef(({className:e,...t},n)=>d.jsx(jx,{ref:n,className:Le("text-sm font-semibold",e),...t}));Xx.displayName=jx.displayName;const Zx=y.forwardRef(({className:e,...t},n)=>d.jsx(Px,{ref:n,className:Le("text-sm opacity-90",e),...t}));Zx.displayName=Px.displayName;function _A(){const{toasts:e}=EC();return d.jsxs(wA,{children:[e.map(function({id:t,title:n,description:r,action:o,...a}){return d.jsxs(Qx,{...a,children:[d.jsxs("div",{className:"grid gap-1",children:[n&&d.jsx(Xx,{children:n}),r&&d.jsx(Zx,{children:r})]}),o,d.jsx(Jx,{})]},t)}),d.jsx(Yx,{})]})}var Ow=["light","dark"],SA="(prefers-color-scheme: dark)",EA=y.createContext(void 0),kA={setTheme:e=>{},themes:[]},TA=()=>{var e;return(e=y.useContext(EA))!=null?e:kA};y.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:a,value:l,attrs:u,nonce:f})=>{let h=a==="system",m=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${u.map(E=>`'${E}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,g=o?Ow.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",b=(E,x=!1,S=!0)=>{let T=l?l[E]:E,k=x?E+"|| ''":`'${T}'`,C="";return o&&S&&!x&&Ow.includes(E)&&(C+=`d.style.colorScheme = '${E}';`),n==="class"?x||T?C+=`c.add(${k})`:C+="null":T&&(C+=`d[s](n,${k})`),C},w=e?`!function(){${m}${b(e)}}()`:r?`!function(){try{${m}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${h})){var t='${SA}',m=window.matchMedia(t);if(m.media!==t||m.matches){${b("dark")}}else{${b("light")}}}else if(e){${l?`var x=${JSON.stringify(l)};`:""}${b(l?"x[e]":"e",!0)}}${h?"":"else{"+b(a,!1,!1)+"}"}${g}}catch(e){}}()`:`!function(){try{${m}var e=localStorage.getItem('${t}');if(e){${l?`var x=${JSON.stringify(l)};`:""}${b(l?"x[e]":"e",!0)}}else{${b(a,!1,!1)};}${g}}catch(t){}}();`;return y.createElement("script",{nonce:f,dangerouslySetInnerHTML:{__html:w}})});var CA=e=>{switch(e){case"success":return jA;case"info":return NA;case"warning":return PA;case"error":return OA;default:return null}},RA=Array(12).fill(0),AA=({visible:e,className:t})=>se.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},se.createElement("div",{className:"sonner-spinner"},RA.map((n,r)=>se.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),jA=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},se.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"})),PA=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},se.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"})),NA=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},se.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"})),OA=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},se.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"})),IA=se.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"},se.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),se.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),DA=()=>{let[e,t]=se.useState(document.hidden);return se.useEffect(()=>{let n=()=>{t(document.hidden)};
9return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Fp=1,LA=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Fp++,a=this.toasts.find(u=>u.id===o),l=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(u=>u.id===o?(this.publish({...u,...e,id:o,title:n}),{...u,...e,id:o,dismissible:l,title:n}):u):this.addToast({title:n,...r,dismissible:l,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
9this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,a,l=r.then(async f=>{if(a=["resolve",f],se.isValidElement(f))o=!1,this.create({id:n,type:"default",message:f});else if($A(f)&&!f.ok){o=!1;let h=typeof t.error=="function"?await t.error(`HTTP error! status: ${f.status}`):t.error,m=typeof t.description=="function"?await t.description(`HTTP error! status: ${f.status}`):t.description;this.create({id:n,type:"error",message:h,description:m})}else if(t.success!==void 0){o=!1;let h=typeof t.success=="function"?await t.success(f):t.success,m=typeof t.description=="function"?await t.description(f):t.description;this.create({id:n,type:"success",message:h,description:m})}}).catch(async f=>{if(a=["reject",f],t.error!==void 0){o=!1;let h=typeof t.error=="function"?await t.error(f):t.error,m=typeof t.description=="function"?await t.description(f):t.description;this.create({id:n,type:"error",message:h,description:m})}}).finally(()=>{var f;o&&(this.dismiss(n),n=void 0),(f=t.finally)==null||f.call(t)}),u=()=>new Promise((f,h)=>l.then(()=>a[0]==="reject"?h(a[1]):f(a[1])).catch(h));return typeof n!="string"&&typeof n!="number"?{unwrap:u}:Object.assign(n,{unwrap:u})},this.custom=(e,t)=>{let n=t?.id||Fp++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},In=new LA,MA=(e,t)=>{let n=t?.id||Fp++;return In.addToast({title:e,...t,id:n}),n},$A=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",FA=MA,UA=()=>In.toasts,zA=()=>In.getActiveToasts(),gn=Object.assign(FA,{success:In.success,info:In.info,warning:In.warning,error:In.error,custom:In.custom,message:In.message,promise:In.promise,dismiss:In.dismiss,loading:In.loading},{getHistory:UA,getToasts:zA});function BA(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}BA(`: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;
9left: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}
9: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%);
9--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%)} 10`);function uu(e){return e.label!==void 0}var HA=3,VA="32px",WA="16px",Iw=4e3,qA=356,GA=14,KA=20,YA=200;function Sr(...e){return e.filter(Boolean).join(" ")}function QA(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var JA=e=>{var t,n,r,o,a,l,u,f,h,m,g;let{invert:b,toast:w,unstyled:E,interacting:x,setHeights:S,visibleToasts:T,heights:k,index:C,toasts:j,expanded:O,removeToast:M,defaultRichColors:D,closeButton:q,style:J,cancelButtonStyle:ne,actionButtonStyle:ie,className:re="",descriptionClassName:pe="",duration:L,position:G,gap:Q,loadingIcon:te,expandByDefault:B,classNames:F,icons:W,closeButtonAriaLabel:N="Close toast",pauseWhenPageIsHidden:z}=e,[Y,X]=se.useState(null),[me,Se]=se.useState(null),[ce,ke]=se.useState(!1),[$e,Ge]=se.useState(!1),[He,ve]=se.useState(!1),[Ue,De]=se.useState(!1),[ht,ze]=se.useState(!1),[$t,at]=se.useState(0),[jt,Ft]=se.useState(0),nt=se.useRef(w.duration||L||Iw),Mn=se.useRef(null),Wt=se.useRef(null),Lr=C===0,Mr=C+1<=T,st=w.type,Ct=w.dismissible!==!1,ln=w.className||"",Jn=w.descriptionClassName||"",_t=se.useMemo(()=>k.findIndex(Ne=>Ne.toastId===w.id)||0,[k,w.id]),cn=se.useMemo(()=>{var Ne;return(Ne=w.closeButton)!=null?Ne:q},[w.closeButton,q]),Xn=se.useMemo(()=>w.duration||L||Iw,[w.duration,L]),qt=se.useRef(0),un=se.useRef(0),mr=se.useRef(0),wn=se.useRef(null),[$r,Fr]=G.split("-"),$n=se.useMemo(()=>k.reduce((Ne,qe,Je)=>Je>=_t?Ne:Ne+qe.height,0),[k,_t]),Zn=DA(),Gt=w.invert||b,Pt=st==="loading";un.current=se.useMemo(()=>
10_t*Q+$n,[_t,$n]),se.useEffect(()=>{nt.current=Xn},[Xn]),se.useEffect(()=>{ke(!0)},[]),se.useEffect(()=>{let Ne=Wt.current;if(Ne){let qe=Ne.getBoundingClientRect().height;return Ft(qe),S(Je=>[{toastId:w.id,height:qe,position:w.position},...Je]),()=>S(Je=>Je.filter(Nt=>Nt.toastId!==w.id))}},[S,w.id]),se.useLayoutEffect(()=>{if(!ce)return;let Ne=Wt.current,qe=Ne.style.height;Ne.style.height="auto";let Je=Ne.getBoundingClientRect().height;Ne.style.height=qe,Ft(Je),S(Nt=>Nt.find(Ut=>Ut.toastId===w.id)?Nt.map(Ut=>Ut.toastId===w.id?{...Ut,height:Je}:Ut):[{toastId:w.id,height:Je,position:w.position},...Nt])},[ce,w.title,w.description,S,w.id]);let tn=se.useCallback(()=>{Ge(!0),at(un.current),S(Ne=>Ne.filter(qe=>qe.toastId!==w.id)),setTimeout(()=>{M(w)},YA)},[w,M,S,un]);se.useEffect(()=>{if(w.promise&&st==="loading"||w.duration===1/0||w.type==="loading")return;let Ne;return O||x||z&&Zn?(()=>{if(mr.current<qt.current){let qe=new Date().getTime()-qt.current;nt.current=nt.current-qe}mr.current=new Date().getTime()})():nt.current!==1/0&&(qt.current=new Date().getTime(),Ne=setTimeout(()=>{var qe;(qe=w.onAutoClose)==null||qe.call(w,w),tn()},nt.current)),()=>clearTimeout(Ne)},[O,x,w,st,z,Zn,tn]),se.useEffect(()=>{w.delete&&tn()},[tn,w.delete]);function ts(){var Ne,qe,Je;return W!=null&&W.loading?se.createElement("div",{className:Sr(F?.loader,(Ne=w?.classNames)==null?void 0:Ne.loader,"sonner-loader"),"data-visible":st==="loading"},W.loading):te?se.createElement("div",{className:Sr(F?.loader,(qe=w?.classNames)==null?void 0:qe.loader,"sonner-loader"),"data-visible":st==="loading"},te):se.createElement(AA,{className:Sr(F?.loader,(Je=w?.classNames)==null?void 0:Je.loader),visible:st==="loading"})}return se.createElement("li",{tabIndex:0,ref:Wt,className:Sr(re,ln,F?.toast,(t=w?.classNames)==null?void 0:t.toast,F?.default,F?.[st],(n=w?.classNames)==null?void 0:n[st]),"data-sonner-toast":"","data-rich-colors":(r=w.richColors)!=null?r:D,"data-styled":!(w.jsx||w.unstyled||E),"data-mounted":ce,"data-promise":!!w.promise,"data-swiped":ht,"data-removed":$e,"data-visible":Mr,"data-y-position":$r,"data-x-position":Fr,"data-index":C,"data-front":Lr,"data-swiping":He,"data-dismissible":Ct,"data-type":st,"data-invert":Gt,"data-swipe-out":Ue,"data-swipe-direction":me,"data-expanded":!!(O||B&&ce),style:{"--index":C,"--toasts-before":C,"--z-index":j.length-C,"--offset":`${$e?$t:un.current}px`,"--initial-height":B?"auto":`${jt}px`,...J,...w.style},onDragEnd:()=>{ve(!1),X(null),wn.current=null},onPointerDown:Ne=>{Pt||!Ct||(Mn.current=new Date,at(un.current),Ne.target.setPointerCapture(Ne.pointerId),Ne.target.tagName!=="BUTTON"&&(ve(!0),wn.current={x:Ne.clientX,y:Ne.clientY}))},onPointerUp:()=>{var Ne,qe,Je,Nt;if(Ue||!Ct)return;wn.current=null;let Ut=Number(((Ne=Wt.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),lt=Number(((qe=Wt.current)==null?void 0:qe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Kt=new Date().getTime()-((Je=Mn.current)==null?void 0:Je.getTime()),Rt=Y==="x"?Ut:lt,kn=Math.abs(Rt)/Kt;if(Math.abs(Rt)>=KA||kn>.11){at(un.current),(Nt=w.onDismiss)==null||Nt.call(w,w),Se(Y==="x"?Ut>0?"right":"left":lt>0?"down":"up"),tn(),De(!0),ze(!1);return}ve(!1),X(null)},onPointerMove:Ne=>{var qe,Je,Nt,Ut;if(!wn.current||!Ct||((qe=window.getSelection())==null?void 0:qe.toString().length)>0)return;let lt=Ne.clientY-wn.current.y,Kt=Ne.clientX-wn.current.x,Rt=(Je=e.swipeDirections)!=null?Je:QA(G);!Y&&(Math.abs(Kt)>1||Math.abs(lt)>1)&&X(Math.abs(Kt)>Math.abs(lt)?"x":"y");let kn={x:0,y:0};Y==="y"?(Rt.includes("top")||Rt.includes("bottom"))&&(Rt.includes("top")&<<0||Rt.includes("bottom")&<>0)&&(kn.y=lt):Y==="x"&&(Rt.includes("left")||Rt.includes("right"))&&(Rt.includes("left")&&Kt<0||Rt.includes("right")&&Kt>0)&&(kn.x=Kt),(Math.abs(kn.x)>0||Math.abs(kn.y)>0)&&ze(!0),(Nt=Wt.current)==null||Nt.style.setProperty("--swipe-amount-x",`${kn.x}px`),(Ut=Wt.current)==null||Ut.style.setProperty("--swipe-amount-y",`${kn.y}px`)}},cn&&!w.jsx?se.createElement("button",{"aria-label":N,"data-disabled":Pt,"data-close-button":!0,onClick:Pt||!Ct?()=>{}:()=>{var Ne;tn(),(Ne=w.onDismiss)==null||Ne.call(w,w)},className:Sr(F?.closeButton,(o=w?.classNames)==null?void 0:o.closeButton)},(a=W?.close)!=null?a:IA):null,w.jsx||y.isValidElement(w.title)?w.jsx?w.jsx:typeof w.title=="function"?w.title():w.title:se.createElement(se.Fragment,null,st||w.icon||w.promise?se.createElement("div",{"data-icon":"",className:Sr(F?.icon,(l=w?.classNames)==null?void 0:l.icon)},w.promise||w.type==="loading"&&!w.icon?w.icon||ts():null,w.type!=="loading"?w.icon||W?.[st]||CA(st):null):null,se.createElement("div",{"data-content":"",className:Sr(F?.content,(u=w?.classNames)==null?void 0:u.content)},se.createElement("div",{"data-title":"",className:Sr(F?.title,(f=w?.classNames)==null?void 0:f.title)},typeof w.title=="function"?w.title():w.title),w.description?se.createElement("div",{"data-description":"",className:Sr(pe,Jn,F?.description,(h=w?.classNames)==null?void 0:h.description)},typeof w.description=="function"?w.description():w.description):null),y.isValidElement(w.cancel)?w.cancel:w.cancel&&uu(w.cancel)?se.createElement("button",{"data-button":!0,"data-cancel":!0,style:w.cancelButtonStyle||ne,onClick:Ne=>{var qe,Je;uu(w.cancel)&&Ct&&((Je=(qe=w.cancel).onClick)==null||Je.call(qe,Ne),tn())},className:Sr(F?.cancelButton,(m=w?.classNames)==null?void 0:m.cancelButton)},w.cancel.label):null,y.isValidElement(w.action)?w.action:w.action&&uu(w.action)?se.createElement("button",{"data-button":!0,"data-action":!0,style:w.actionButtonStyle||ie,onClick:Ne=>{var qe,Je;uu(w.action)&&((Je=(qe=w.action).onClick)==null||Je.call(qe,Ne),!Ne.defaultPrevented&&tn())},className:Sr(F?.actionButton,(g=w?.classNames)==null?void 0:g.actionButton)},w.action.label):null))};function Dw(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function XA(e,t){let n={};return[e,t].forEach((r,o)=>{let a=o===1,l=a?"--mobile-offset":"--offset",u=a?WA:VA;function f(h){["top","right","bottom","left"].forEach(m=>{n[`${l}-${m}`]=typeof h=="number"?`${h}px`:h})}typeof r=="number"||typeof r=="string"?f(r):typeof r=="object"?["top","right","bottom","left"].forEach(h=>{r[h]===void 0?n[`${l}-${h}`]=u:n[`${l}-${h}`]=typeof r[h]=="number"?`${r[h]}px`:r[h]}):f(u)}),n}var ZA=y.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:l,className:u,offset:f,mobileOffset:h,theme:m="light",richColors:g,duration:b,style:w,visibleToasts:E=HA,toastOptions:x,dir:S=Dw(),gap:T=GA,loadingIcon:k,icons:C,containerAriaLabel:j="Notifications",pauseWhenPageIsHidden:O}=e,[M,D]=se.useState([]),q=se.useMemo(()=>Array.from(new Set([r].concat(M.filter(z=>z.position).map(z=>z.position)))),[M,r]),[J,ne]=se.useState([]),[ie,re]=se.useState(!1),[pe,L]=se.useState(!1),[G,Q]=se.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
10k":"light"),te=se.useRef(null),B=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=se.useRef(null),W=se.useRef(!1),N=se.useCallback(z=>{D(Y=>{var X;return(X=Y.find(me=>me.id===z.id))!=null&&X.delete||In.dismiss(z.id),Y.filter(({id:me})=>me!==z.id)})},[]);return se.useEffect(()=>In.subscribe(z=>{if(z.dismiss){D(Y=>Y.map(X=>X.id===z.id?{...X,delete:!0}:X));return}setTimeout(()=>{ux.flushSync(()=>{D(Y=>{let X=Y.findIndex(me=>me.id===z.id);return X!==-1?[...Y.slice(0,X),{...Y[X],...z},...Y.slice(X+1)]:[z,...Y]})})})}),[]),se.useEffect(()=>{if(m!=="system"){Q(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Q("dark"):Q("light")),typeof window>"u")return;let z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:Y})=>{Q(Y?"dark":"light")})}catch{z.addListener(({matches:X})=>{try{Q(X?"dark":"light")}catch(me){console.error(me)}})}},[m]),se.useEffect(()=>{M.length<=1&&re(!1)},[M]),se.useEffect(()=>{let z=Y=>{var X,me;o.every(Se=>Y[Se]||Y.code===Se)&&(re(!0),(X=te.current)==null||X.focus()),Y.code==="Escape"&&(document.activeElement===te.current||(me=te.current)!=null&&me.contains(document.activeElement))&&re(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[o]),se.useEffect(()=>{if(te.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,W.current=!1)}},[te.current]),se.createElement("section",{ref:t,"aria-label":`${j} ${B}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},q.map((z,Y)=>{var X;let[me,Se]=z.split("-");return M.length?se.createElement("ol",{key:z,dir:S==="auto"?Dw():S,tabIndex:-1,ref:te,className:u,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":me,"data-lifted":ie&&M.length>1&&!a,"data-x-position":Se,style:{"--front-toast-height":`${((X=J[0])==null?void 0:X.height)||0}px`,"--width":`${qA}px`,"--gap":`${T}px`,...w,...XA(f,h)},onBlur:ce=>{W.current&&!ce.currentTarget.contains(ce.relatedTarget)&&(W.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||W.current||(W.current=!0,F.current=ce.relatedTarget)},onMouseEnter:()=>re(!0),onMouseMove:()=>re(!0),onMouseLeave:()=>{pe||re(!1)},onDragEnd:()=>re(!1),onPointerDown:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},M.filter(ce=>!ce.position&&Y===0||ce.position===z).map((ce,ke)=>{var $e,Ge;return se.createElement(JA,{key:ce.id,icons:C,index:ke,toast:ce,defaultRichColors:g,duration:($e=x?.duration)!=null?$e:b,className:x?.className,descriptionClassName:x?.descriptionClassName,invert:n,visibleToasts:E,closeButton:(Ge=x?.closeButton)!=null?Ge:l,interacting:pe,position:z,style:x?.style,unstyled:x?.unstyled,classNames:x?.classNames,cancelButtonStyle:x?.cancelButtonStyle,actionButtonStyle:x?.actionButtonStyle,removeToast:N,toasts:M.filter(He=>He.position==ce.position),heights:J.filter(He=>He.position==ce.position),setHeights:ne,expandByDefault:a,gap:T,loadingIcon:k,expanded:ie,pauseWhenPageIsHidden:O,swipeDirections:e.swipeDirections})})):null}))});const ej=({...e})=>{const{theme:t="system"}=TA();return d.jsx(ZA,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var tj=tx[" useId ".trim().toString()]||(()=>{}),nj=0;function No(e){const[t,n]=y.useState(tj());return bs(()=>{n(r=>r??String(nj++))},[e]),t?`radix-${t}`:""}const rj=["top","right","bottom","left"],eo=Math.min,qn=Math.max,qu=Math.round,du=Math.floor,Qr=e=>({x:e,y:e}),sj={left:"right",right:"left",bottom:"top",top:"bottom"},oj={start:"end",end:"start"};
vendor: 10,311 bytes, line 10
10function Up(e,t,n){return qn(e,eo(t,n))}function xs(e,t){return typeof e=="function"?e(t):e}function _s(e){return e.split("-")[0]}function ta(e){return e.split("-")[1]}function Lm(e){return e==="x"?"y":"x"}function Mm(e){return e==="y"?"height":"width"}const ij=new Set(["top","bottom"]);function Yr(e){return ij.has(_s(e))?"y":"x"}function $m(e){return Lm(Yr(e))}function aj(e,t,n){n===void 0&&(n=!1);const r=ta(e),o=$m(e),a=Mm(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Gu(l)),[l,Gu(l)]}function lj(e){const t=Gu(e);return[zp(e),t,zp(t)]}function zp(e){return e.replace(/start|end/g,t=>oj[t])}const Lw=["left","right"],Mw=["right","left"],cj=["top","bottom"],uj=["bottom","top"];function dj(e,t,n){switch(e){case"top":case"bottom":return n?t?Mw:Lw:t?Lw:Mw;case"left":case"right":return t?cj:uj;default:return[]}}function fj(e,t,n,r){const o=ta(e);let a=dj(_s(e),n==="start",r);return o&&(a=a.map(l=>l+"-"+o),t&&(a=a.concat(a.map(zp)))),a}function Gu(e){return e.replace(/left|right|bottom|top/g,t=>sj[t])}function hj(e){return{top:0,right:0,bottom:0,left:0,...e}}function e_(e){return typeof e!="number"?hj(e):{top:e,right:e,bottom:e,left:e}}function Ku(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function $w(e,t,n){let{reference:r,floating:o}=e;const a=Yr(t),l=$m(t),u=Mm(l),f=_s(t),h=a==="y",m=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,b=r[u]/2-o[u]/2;let w;switch(f){case"top":w={x:m,y:r.y-o.height};break;case"bottom":w={x:m,y:r.y+r.height};break;case"right":w={x:r.x+r.width,y:g};break;case"left":w={x:r.x-o.width,y:g};break;default:w={x:r.x,y:r.y}}switch(ta(t)){case"start":w[l]-=b*(n&&h?-1:1);break;case"end":w[l]+=b*(n&&h?-1:1);break}return w}const pj=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:l}=n,u=a.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:g}=$w(h,r,f),b=r,w={},E=0;for(let x=0;x<u.length;x++){const{name:S,fn:T}=u[x],{x:k,y:C,data:j,reset:O}=await T({x:m,y:g,initialPlacement:r,placement:b,strategy:o,middlewareData:w,rects:h,platform:l,elements:{reference:e,floating:t}});m=k??m,g=C??g,w={...w,[S]:{...w[S],...j}},O&&E<=50&&(E++,typeof O=="object"&&(O.placement&&(b=O.placement),O.rects&&(h=O.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):O.rects),{x:m,y:g}=$w(h,b,f)),x=-1)}return{x:m,y:g,placement:b,strategy:o,middlewareData:w}};async function vl(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:l,elements:u,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:b=!1,padding:w=0}=xs(t,e),E=e_(w),S=u[b?g==="floating"?"reference":"floating":g],T=Ku(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(S)))==null||n?S:S.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:h,rootBoundary:m,strategy:f})),k=g==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),j=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},O=Ku(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:k,offsetParent:C,strategy:f}):k);return{top:(T.top-O.top+E.top)/j.y,bottom:(O.bottom-T.bottom+E.bottom)/j.y,left:(T.left-O.left+E.left)/j.x,right:(O.right-T.right+E.right)/j.x}}const mj=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:l,elements:u,middlewareData:f}=t,{element:h,padding:m=0}=xs(e,t)||{};if(h==null)return{};const g=e_(m),b={x:n,y:r},w=$m(o),E=Mm(w),x=await l.getDimensions(h),S=w==="y",T=S?"top":"left",k=S?"bottom":"right",C=S?"clientHeight":"clientWidth",j=a.reference[E]+a.reference[w]-b[w]-a.floating[E],O=b[w]-a.reference[w],M=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h));let D=M?M[C]:0;(!D||!await(l.isElement==null?void 0:l.isElement(M)))&&(D=u.floating[C]||a.floating[E]);const q=j/2-O/2,J=D/2-x[E]/2-1,ne=eo(g[T],J),ie=eo(g[k],J),re=ne,pe=D-x[E]-ie,L=D/2-x[E]/2+q,G=Up(re,L,pe),Q=!f.arrow&&ta(o)!=null&&L!==G&&a.reference[E]/2-(L<re?ne:ie)-x[E]/2<0,te=Q?L<re?L-re:L-pe:0;return{[w]:b[w]+te,data:{[w]:G,centerOffset:L-G-te,...Q&&{alignmentOffset:te}},reset:Q}}}),gj=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:l,initialPlacement:u,platform:f,elements:h}=t,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:x=!0,...S}=xs(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const T=_s(o),k=Yr(u),C=_s(u)===u,j=await(f.isRTL==null?void 0:f.isRTL(h.floating)),O=b||(C||!x?[Gu(u)]:lj(u)),M=E!=="none";!b&&M&&O.push(...fj(u,x,E,j));const D=[u,...O],q=await vl(t,S),J=[];let ne=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&J.push(q[T]),g){const L=aj(o,l,j);J.push(q[L[0]],q[L[1]])}if(ne=[...ne,{placement:o,overflows:J}],!J.every(L=>L<=0)){var ie,re;const L=(((ie=a.flip)==null?void 0:ie.index)||0)+1,G=D[L];if(G&&(!(g==="alignment"?k!==Yr(G):!1)||ne.every(B=>B.overflows[0]>0&&Yr(B.placement)===k)))return{data:{index:L,overflows:ne},reset:{placement:G}};let Q=(re=ne.filter(te=>te.overflows[0]<=0).sort((te,B)=>te.overflows[1]-B.overflows[1])[0])==null?void 0:re.placement;if(!Q)switch(w){case"bestFit":{var pe;const te=(pe=ne.filter(B=>{if(M){const F=Yr(B.placement);return F===k||F==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(F=>F>0).reduce((F,W)=>F+W,0)]).sort((B,F)=>B[1]-F[1])[0])==null?void 0:pe[0];te&&(Q=te);break}case"initialPlacement":Q=u;break}if(o!==Q)return{reset:{placement:Q}}}return{}}}};function Fw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Uw(e){return rj.some(t=>e[t]>=0)}const yj=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=xs(e,t);switch(r){case"referenceHidden":{const a=await vl(t,{...o,elementContext:"reference"}),l=Fw(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Uw(l)}}}case"escaped":{const a=await vl(t,{...o,altBoundary:!0}),l=Fw(a,n.floating);return{data:{escapedOffsets:l,escaped:Uw(l)}}}default:return{}}}}},t_=new Set(["left","top"]);async function vj(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=_s(n),u=ta(n),f=Yr(n)==="y",h=t_.has(l)?-1:1,m=a&&f?-1:1,g=xs(t,e);let{mainAxis:b,crossAxis:w,alignmentAxis:E}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return u&&typeof E=="number"&&(w=u==="end"?E*-1:E),f?{x:w*m,y:b*h}:{x:b*h,y:w*m}}const wj=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:l,middlewareData:u}=t,f=await vj(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:o+f.x,y:a+f.y,data:{...f,placement:l}}}}},bj=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:u={fn:S=>{let{x:T,y:k}=S;return{x:T,y:k}}},...f}=xs(e,t),h={x:n,y:r},m=await vl(t,f),g=Yr(_s(o)),b=Lm(g);let w=h[b],E=h[g];if(a){const S=b==="y"?"top":"left",T=b==="y"?"bottom":"right",k=w+m[S],C=w-m[T];w=Up(k,w,C)}if(l){const S=g==="y"?"top":"left",T=g==="y"?"bottom":"right",k=E+m[S],C=E-m[T];E=Up(k,E,C)}const x=u.fn({...t,[b]:w,[g]:E});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[b]:a,[g]:l}}}}}},xj=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:l}=t,{offset:u=0,mainAxis:f=!0,crossAxis:h=!0}=xs(e,t),m={x:n,y:r},g=Yr(o),b=Lm(g);let w=m[b],E=m[g];const x=xs(u,t),S=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(f){const C=b==="y"?"height":"width",j=a.reference[b]-a.floating[C]+S.mainAxis,O=a.reference[b]+a.reference[C]-S.mainAxis;w<j?w=j:w>O&&(w=O)}if(h){var T,k;const C=b==="y"?"width":"height",j=t_.has(_s(o)),O=a.reference[g]-a.floating[C]+(j&&((T=l.offset)==null?void 0:T[g])||0)+(j?0:S.crossAxis),M=a.reference[g]+a.reference[C]+(j?0:((k=l.offset)==null?void 0:k[g])||0)-(j?S.crossAxis:0);E<O?E=O:E>M&&(E=M)}return{[b]:w,[g]:E}}}},_j=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:l,elements:u}=t,{apply:f=()=>{},...h}=xs(e,t),m=await vl(t,h),g=_s(o),b=ta(o),w=Yr(o)==="y",{width:E,height:x}=a.floating;let S,T;g==="top"||g==="bottom"?(S=g,T=b===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(T=g,S=b==="end"?"top":"bottom");const k=x-m.top-m.bottom,C=E-m.left-m.right,j=eo(x-m[S],k),O=eo(E-m[T],C),M=!t.middlewareData.shift;let D=j,q=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(q=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(D=k),M&&!b){const ne=qn(m.left,0),ie=qn(m.right,0),re=qn(m.top,0),pe=qn(m.bottom,0);w?q=E-2*(ne!==0||ie!==0?ne+ie:qn(m.left,m.right)):D=x-2*(re!==0||pe!==0?re+pe:qn(m.top,m.bottom))}await f({...t,availableWidth:q,availableHeight:D});const J=await l.getDimensions(u.floating);return E!==J.width||x!==J.height?{reset:{rects:!0}}:{}}}};function wd(){return typeof window<"u"}function na(e){return n_(e)?(e.nodeName||"").toLowerCase():"#document"}function Kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zr(e){var t;return(t=(n_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function n_(e){return wd()?e instanceof Node||e instanceof Kn(e).Node:!1}function Nr(e){return wd()?e instanceof Element||e instanceof Kn(e).Element:!1}function Jr(e){return wd()?e instanceof HTMLElement||e instanceof Kn(e).HTMLElement:!1}function zw(e){return!wd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Kn(e).ShadowRoot}const Sj=new Set(["inline","contents"]);function Hl(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Or(e);
vendor: 4,121 bytes, line 10
10return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Sj.has(o)}const Ej=new Set(["table","td","th"]);function kj(e){return Ej.has(na(e))}const Tj=[":popover-open",":modal"];function bd(e){return Tj.some(t=>{try{return e.matches(t)}catch{return!1}})}const Cj=["transform","translate","scale","rotate","perspective"],Rj=["transform","translate","scale","rotate","perspective","filter"],Aj=["paint","layout","strict","content"];function Fm(e){const t=Um(),n=Nr(e)?Or(e):e;return Cj.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Rj.some(r=>(n.willChange||"").includes(r))||Aj.some(r=>(n.contain||"").includes(r))}function jj(e){let t=to(e);for(;Jr(t)&&!Gi(t);){if(Fm(t))return t;if(bd(t))return null;t=to(t)}return null}function Um(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Pj=new Set(["html","body","#document"]);function Gi(e){return Pj.has(na(e))}function Or(e){return Kn(e).getComputedStyle(e)}function xd(e){return Nr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function to(e){if(na(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zw(e)&&e.host||Zr(e);return zw(t)?t.host:t}function r_(e){const t=to(e);return Gi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jr(t)&&Hl(t)?t:r_(t)}function wl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=r_(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),l=Kn(o);if(a){const u=Bp(l);return t.concat(l,l.visualViewport||[],Hl(o)?o:[],u&&n?wl(u):[])}return t.concat(o,wl(o,[],n))}function Bp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function s_(e){const t=Or(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Jr(e),a=o?e.offsetWidth:n,l=o?e.offsetHeight:r,u=qu(n)!==a||qu(r)!==l;return u&&(n=a,r=l),{width:n,height:r,$:u}}function zm(e){return Nr(e)?e:e.contextElement}function zi(e){const t=zm(e);if(!Jr(t))return Qr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=s_(t);let l=(a?qu(n.width):n.width)/r,u=(a?qu(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const Nj=Qr(0);function o_(e){const t=Kn(e);return!Um()||!t.visualViewport?Nj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Oj(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Kn(e)?!1:t}function $o(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=zm(e);let l=Qr(1);t&&(r?Nr(r)&&(l=zi(r)):l=zi(e));const u=Oj(a,n,r)?o_(a):Qr(0);let f=(o.left+u.x)/l.x,h=(o.top+u.y)/l.y,m=o.width/l.x,g=o.height/l.y;if(a){const b=Kn(a),w=r&&Nr(r)?Kn(r):r;let E=b,x=Bp(E);for(;x&&r&&w!==E;){const S=zi(x),T=x.getBoundingClientRect(),k=Or(x),C=T.left+(x.clientLeft+parseFloat(k.paddingLeft))*S.x,j=T.top+(x.clientTop+parseFloat(k.paddingTop))*S.y;f*=S.x,h*=S.y,m*=S.x,g*=S.y,f+=C,h+=j,E=Kn(x),x=Bp(E)}}return Ku({width:m,height:g,x:f,y:h})}function Bm(e,t){const n=xd(e).scrollLeft;return t?t.left+n:$o(Zr(e)).left+n}function i_(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Bm(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function Ij(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",l=Zr(r),u=t?bd(t.floating):!1;if(r===l||u&&a)return n;let f={scrollLeft:0,scrollTop:0},h=Qr(1);const m=Qr(0),g=Jr(r);if((g||!g&&!a)&&((na(r)!=="body"||Hl(l))&&(f=xd(r)),Jr(r))){const w=$o(r);h=zi(r),m.x=w.x+r.clientLeft,m.y=w.y+r.clientTop}const b=l&&!g&&!a?i_(l,f,!0):Qr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+m.x+b.x,y:n.y*h.y-f.scrollTop*h.y+m.y+b.y}}function Dj(e){return Array.from(e.getClientRects())}function Lj(e){const t=Zr(e),n=xd(e),r=e.ownerDocument.body,o=qn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=qn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Bm(e);const u=-n.scrollTop;return Or(r).direction==="rtl"&&(l+=qn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:l,y:u}}
vendor: 1,721 bytes, line 10
10function Mj(e,t){const n=Kn(e),r=Zr(e),o=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,u=0,f=0;if(o){a=o.width,l=o.height;const h=Um();(!h||h&&t==="fixed")&&(u=o.offsetLeft,f=o.offsetTop)}return{width:a,height:l,x:u,y:f}}const $j=new Set(["absolute","fixed"]);function Fj(e,t){const n=$o(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Jr(e)?zi(e):Qr(1),l=e.clientWidth*a.x,u=e.clientHeight*a.y,f=o*a.x,h=r*a.y;return{width:l,height:u,x:f,y:h}}function Bw(e,t,n){let r;if(t==="viewport")r=Mj(e,n);else if(t==="document")r=Lj(Zr(e));else if(Nr(t))r=Fj(t,n);else{const o=o_(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ku(r)}function a_(e,t){const n=to(e);return n===t||!Nr(n)||Gi(n)?!1:Or(n).position==="fixed"||a_(n,t)}function Uj(e,t){const n=t.get(e);if(n)return n;let r=wl(e,[],!1).filter(u=>Nr(u)&&na(u)!=="body"),o=null;const a=Or(e).position==="fixed";let l=a?to(e):e;for(;Nr(l)&&!Gi(l);){const u=Or(l),f=Fm(l);!f&&u.position==="fixed"&&(o=null),(a?!f&&!o:!f&&u.position==="static"&&!!o&&$j.has(o.position)||Hl(l)&&!f&&a_(e,l))?r=r.filter(m=>m!==l):o=u,l=to(l)}return t.set(e,r),r}function zj(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?bd(t)?[]:Uj(t,this._c):[].concat(n),r],u=l[0],f=l.reduce((h,m)=>{const g=Bw(t,m,o);return h.top=qn(g.top,h.top),h.right=eo(g.right,h.right),h.bottom=eo(g.bottom,h.bottom),h.left=qn(g.left,h.left),h},Bw(t,u,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Bj(e){const{width:t,height:n}=s_(e);return{width:t,height:n}}function Hj(e,t,n){const r=Jr(t),o=Zr(t),a=n==="fixed",l=$o(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const f=Qr(0);function h(){f.x=Bm(o)}
vendor: 4,432 bytes, line 10
10if(r||!r&&!a)if((na(t)!=="body"||Hl(o))&&(u=xd(t)),r){const w=$o(t,!0,a,t);f.x=w.x+t.clientLeft,f.y=w.y+t.clientTop}else o&&h();a&&!r&&o&&h();const m=o&&!r&&!a?i_(o,u):Qr(0),g=l.left+u.scrollLeft-f.x-m.x,b=l.top+u.scrollTop-f.y-m.y;return{x:g,y:b,width:l.width,height:l.height}}function qh(e){return Or(e).position==="static"}function Hw(e,t){if(!Jr(e)||Or(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Zr(e)===n&&(n=n.ownerDocument.body),n}function l_(e,t){const n=Kn(e);if(bd(e))return n;if(!Jr(e)){let o=to(e);for(;o&&!Gi(o);){if(Nr(o)&&!qh(o))return o;o=to(o)}return n}let r=Hw(e,t);for(;r&&kj(r)&&qh(r);)r=Hw(r,t);return r&&Gi(r)&&qh(r)&&!Fm(r)?n:r||jj(e)||n}const Vj=async function(e){const t=this.getOffsetParent||l_,n=this.getDimensions,r=await n(e.floating);return{reference:Hj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Wj(e){return Or(e).direction==="rtl"}const qj={convertOffsetParentRelativeRectToViewportRelativeRect:Ij,getDocumentElement:Zr,getClippingRect:zj,getOffsetParent:l_,getElementRects:Vj,getClientRects:Dj,getDimensions:Bj,getScale:zi,isElement:Nr,isRTL:Wj};function c_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Gj(e,t){let n=null,r;const o=Zr(e);function a(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),a();const h=e.getBoundingClientRect(),{left:m,top:g,width:b,height:w}=h;if(u||t(),!b||!w)return;const E=du(g),x=du(o.clientWidth-(m+b)),S=du(o.clientHeight-(g+w)),T=du(m),C={rootMargin:-E+"px "+-x+"px "+-S+"px "+-T+"px",threshold:qn(0,eo(1,f))||1};let j=!0;function O(M){const D=M[0].intersectionRatio;if(D!==f){if(!j)return l();D?l(!1,D):r=setTimeout(()=>{l(!1,1e-7)},1e3)}D===1&&!c_(h,e.getBoundingClientRect())&&l(),j=!1}try{n=new IntersectionObserver(O,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(O,C)}n.observe(e)}return l(!0),a}function Kj(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,h=zm(e),m=o||a?[...h?wl(h):[],...wl(t)]:[];m.forEach(T=>{o&&T.addEventListener("scroll",n,{passive:!0}),a&&T.addEventListener("resize",n)});const g=h&&u?Gj(h,n):null;let b=-1,w=null;l&&(w=new ResizeObserver(T=>{let[k]=T;k&&k.target===h&&w&&(w.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var C;(C=w)==null||C.observe(t)})),n()}),h&&!f&&w.observe(h),w.observe(t));let E,x=f?$o(e):null;f&&S();function S(){const T=$o(e);x&&!c_(x,T)&&n(),x=T,E=requestAnimationFrame(S)}return n(),()=>{var T;m.forEach(k=>{o&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),g?.(),(T=w)==null||T.disconnect(),w=null,f&&cancelAnimationFrame(E)}}const Yj=wj,Qj=bj,Jj=gj,Xj=_j,Zj=yj,Vw=mj,eP=xj,tP=(e,t,n)=>{const r=new Map,o={platform:qj,...n},a={...o.platform,_c:r};return pj(e,t,{...o,platform:a})};var nP=typeof document<"u",rP=function(){},Du=nP?y.useLayoutEffect:rP;function Yu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Yu(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Yu(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function u_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ww(e,t){const n=u_(e);return Math.round(t*n)/n}function Gh(e){const t=y.useRef(e);return Du(()=>{t.current=e}),t}function sP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:l}={},transform:u=!0,whileElementsMounted:f,open:h}=e,[m,g]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,w]=y.useState(r);Yu(b,r)||w(r);const[E,x]=y.useState(null),[S,T]=y.useState(null),k=y.useCallback(B=>{B!==M.current&&(M.current=B,x(B))},[]),C=y.useCallback(B=>{B!==D.current&&(D.current=B,T(B))},[]),j=a||E,O=l||S,M=y.useRef(null),D=y.useRef(null),q=y.useRef(m),J=f!=null,ne=Gh(f),ie=Gh(o),re=Gh(h),pe=y.useCallback(()=>
vendor: 1,394 bytes, line 10
10{if(!M.current||!D.current)return;const B={placement:t,strategy:n,middleware:b};ie.current&&(B.platform=ie.current),tP(M.current,D.current,B).then(F=>{const W={...F,isPositioned:re.current!==!1};L.current&&!Yu(q.current,W)&&(q.current=W,pd.flushSync(()=>{g(W)}))})},[b,t,n,ie,re]);Du(()=>{h===!1&&q.current.isPositioned&&(q.current.isPositioned=!1,g(B=>({...B,isPositioned:!1})))},[h]);const L=y.useRef(!1);Du(()=>(L.current=!0,()=>{L.current=!1}),[]),Du(()=>{if(j&&(M.current=j),O&&(D.current=O),j&&O){if(ne.current)return ne.current(j,O,pe);pe()}},[j,O,pe,ne,J]);const G=y.useMemo(()=>({reference:M,floating:D,setReference:k,setFloating:C}),[k,C]),Q=y.useMemo(()=>({reference:j,floating:O}),[j,O]),te=y.useMemo(()=>{const B={position:n,left:0,top:0};if(!Q.floating)return B;const F=Ww(Q.floating,m.x),W=Ww(Q.floating,m.y);return u?{...B,transform:"translate("+F+"px, "+W+"px)",...u_(Q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:W}},[n,u,Q.floating,m.x,m.y]);return y.useMemo(()=>({...m,update:pe,refs:G,elements:Q,floatingStyles:te}),[m,pe,G,Q,te])}const oP=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Vw({element:r.current,padding:o}).fn(n):{}:r?Vw({element:r,padding:o}).fn(n):{}}}},iP=(e,t)=>({...Yj(e),options:[e,t]}),aP=(e,t)=>
vendor: 6,891 bytes, line 10
10({...Qj(e),options:[e,t]}),lP=(e,t)=>({...eP(e),options:[e,t]}),cP=(e,t)=>({...Jj(e),options:[e,t]}),uP=(e,t)=>({...Xj(e),options:[e,t]}),dP=(e,t)=>({...Zj(e),options:[e,t]}),fP=(e,t)=>({...oP(e),options:[e,t]});var hP="Arrow",d_=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return d.jsx(Ze.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});d_.displayName=hP;var pP=d_;function f_(e){const[t,n]=y.useState(void 0);return bs(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,u;if("borderBoxSize"in a){const f=a.borderBoxSize,h=Array.isArray(f)?f[0]:f;l=h.inlineSize,u=h.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Hm="Popper",[h_,_d]=Es(Hm),[mP,p_]=h_(Hm),m_=e=>{const{__scopePopper:t,children:n}=e,[r,o]=y.useState(null);return d.jsx(mP,{scope:t,anchor:r,onAnchorChange:o,children:n})};m_.displayName=Hm;var g_="PopperAnchor",y_=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=p_(g_,n),l=y.useRef(null),u=xt(t,l);return y.useEffect(()=>{a.onAnchorChange(r?.current||l.current)}),r?null:d.jsx(Ze.div,{...o,ref:u})});y_.displayName=g_;var Vm="PopperContent",[gP,yP]=h_(Vm),v_=y.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:b=!1,updatePositionStrategy:w="optimized",onPlaced:E,...x}=e,S=p_(Vm,n),[T,k]=y.useState(null),C=xt(t,ce=>k(ce)),[j,O]=y.useState(null),M=f_(j),D=M?.width??0,q=M?.height??0,J=r+(a!=="center"?"-"+a:""),ne=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},ie=Array.isArray(h)?h:[h],re=ie.length>0,pe={padding:ne,boundary:ie.filter(wP),altBoundary:re},{refs:L,floatingStyles:G,placement:Q,isPositioned:te,middlewareData:B}=sP({strategy:"fixed",placement:J,whileElementsMounted:(...ce)=>Kj(...ce,{animationFrame:w==="always"}),elements:{reference:S.anchor},middleware:[iP({mainAxis:o+q,alignmentAxis:l}),f&&aP({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?lP():void 0,...pe}),f&&cP({...pe}),uP({...pe,apply:({elements:ce,rects:ke,availableWidth:$e,availableHeight:Ge})=>{const{width:He,height:ve}=ke.reference,Ue=ce.floating.style;Ue.setProperty("--radix-popper-available-width",`${$e}px`),Ue.setProperty("--radix-popper-available-height",`${Ge}px`),Ue.setProperty("--radix-popper-anchor-width",`${He}px`),Ue.setProperty("--radix-popper-anchor-height",`${ve}px`)}}),j&&fP({element:j,padding:u}),bP({arrowWidth:D,arrowHeight:q}),b&&dP({strategy:"referenceHidden",...pe})]}),[F,W]=x_(Q),N=Yn(E);bs(()=>{te&&N?.()},[te,N]);const z=B.arrow?.x,Y=B.arrow?.y,X=B.arrow?.centerOffset!==0,[me,Se]=y.useState();return bs(()=>{T&&Se(window.getComputedStyle(T).zIndex)},[T]),d.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:te?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(gP,{scope:n,placedSide:F,onArrowChange:O,arrowX:z,arrowY:Y,shouldHideArrow:X,children:d.jsx(Ze.div,{"data-side":F,"data-align":W,...x,ref:C,style:{...x.style,animation:te?void 0:"none"}})})})});v_.displayName=Vm;var w_="PopperArrow",vP={top:"bottom",right:"left",bottom:"top",left:"right"},b_=y.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=yP(w_,r),l=vP[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(pP,{...o,ref:n,style:{...o.style,display:"block"}})})});b_.displayName=w_;function wP(e){return e!==null}var bP=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,l=o.arrow?.centerOffset!==0,u=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[h,m]=x_(n),g={start:"0%",center:"50%",end:"100%"}[m],b=(o.arrow?.x??0)+u/2,w=(o.arrow?.y??0)+f/2;let E="",x="";return h==="bottom"?(E=l?g:`${b}px`,x=`${-f}px`):h==="top"?(E=l?g:`${b}px`,x=`${r.floating.height+f}px`):h==="right"?(E=`${-f}px`,x=l?g:`${w}px`):h==="left"&&(E=`${r.floating.width+f}px`,x=l?g:`${w}px`),{data:{x:E,y:x}}}});function x_(e){const[t,n="center"]=e.split("-");return[t,n]}var __=m_,S_=y_,E_=v_,k_=b_,[Sd]=Es("Tooltip",[_d]),Ed=_d(),T_="TooltipProvider",xP=700,Hp="tooltip.open",[_P,Wm]=Sd(T_),C_=e=>{const{__scopeTooltip:t,delayDuration:n=xP,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,l=y.useRef(!0),u=y.useRef(!1),f=y.useRef(0);return y.useEffect(()=>{const h=f.current;return()=>window.clearTimeout(h)},[]),d.jsx(_P,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(f.current),l.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:y.useCallback(h=>{u.current=h},[]),disableHoverableContent:o,children:a})};C_.displayName=T_;var bl="Tooltip",[SP,kd]=Sd(bl),R_=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:l,delayDuration:u}=e,f=Wm(bl,e.__scopeTooltip),h=Ed(t),[m,g]=y.useState(null),b=No(),w=y.useRef(0),E=l??f.disableHoverableContent,x=u??f.delayDuration,S=y.useRef(!1),[T,k]=Xi({prop:r,defaultProp:o??!1,onChange:D=>{D?(f.onOpen(),document.dispatchEvent(new CustomEvent(Hp))):f.onClose(),a?.(D)},caller:bl}),C=y.useMemo(()=>T?S.current?"delayed-open":"instant-open":"closed",[T]),j=y.useCallback(()=>{window.clearTimeout(w.current),w.current=0,S.current=!1,k(!0)},[k]),O=y.useCallback(()=>{window.clearTimeout(w.current),w.current=0,k(!1)},[k]),M=y.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>{S.current=!0,k(!0),w.current=0},x)},[x,k]);return y.useEffect(()=>()=>{w.current&&(window.clearTimeout(w.current),w.current=0)},[]),d.jsx(__,{...h,children:d.jsx(SP,{scope:t,contentId:b,open:T,stateAttribute:C,trigger:m,onTriggerChange:g,onTriggerEnter:y.useCallback(()=>{f.isOpenDelayedRef.current?M():j()},[f.isOpenDelayedRef,M,j]),onTriggerLeave:y.useCallback(()=>{E?O():(window.clearTimeout(w.current),w.current=0)},[O,E]),onOpen:j,onClose:O,disableHoverableContent:E,children:n})})};R_.displayName=bl;var Vp="TooltipTrigger",A_=y.forwardRef((e,t)=>
vendor: 5,200 bytes, line 10
10{const{__scopeTooltip:n,...r}=e,o=kd(Vp,n),a=Wm(Vp,n),l=Ed(n),u=y.useRef(null),f=xt(t,u,o.onTriggerChange),h=y.useRef(!1),m=y.useRef(!1),g=y.useCallback(()=>h.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),d.jsx(S_,{asChild:!0,...l,children:d.jsx(Ze.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:f,onPointerMove:Re(e.onPointerMove,b=>{b.pointerType!=="touch"&&!m.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),m.current=!0)}),onPointerLeave:Re(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:Re(e.onPointerDown,()=>{o.open&&o.onClose(),h.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:Re(e.onFocus,()=>{h.current||o.onOpen()}),onBlur:Re(e.onBlur,o.onClose),onClick:Re(e.onClick,o.onClose)})})});A_.displayName=Vp;var EP="TooltipPortal",[fB,kP]=Sd(EP,{forceMount:void 0}),Ki="TooltipContent",j_=y.forwardRef((e,t)=>{const n=kP(Ki,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,l=kd(Ki,e.__scopeTooltip);return d.jsx(Xr,{present:r||l.open,children:l.disableHoverableContent?d.jsx(P_,{side:o,...a,ref:t}):d.jsx(TP,{side:o,...a,ref:t})})}),TP=y.forwardRef((e,t)=>{const n=kd(Ki,e.__scopeTooltip),r=Wm(Ki,e.__scopeTooltip),o=y.useRef(null),a=xt(t,o),[l,u]=y.useState(null),{trigger:f,onClose:h}=n,m=o.current,{onPointerInTransitChange:g}=r,b=y.useCallback(()=>{u(null),g(!1)},[g]),w=y.useCallback((E,x)=>{const S=E.currentTarget,T={x:E.clientX,y:E.clientY},k=PP(T,S.getBoundingClientRect()),C=NP(T,k),j=OP(x.getBoundingClientRect()),O=DP([...C,...j]);u(O),g(!0)},[g]);return y.useEffect(()=>()=>b(),[b]),y.useEffect(()=>{if(f&&m){const E=S=>w(S,m),x=S=>w(S,f);return f.addEventListener("pointerleave",E),m.addEventListener("pointerleave",x),()=>{f.removeEventListener("pointerleave",E),m.removeEventListener("pointerleave",x)}}},[f,m,w,b]),y.useEffect(()=>{if(l){const E=x=>{const S=x.target,T={x:x.clientX,y:x.clientY},k=f?.contains(S)||m?.contains(S),C=!IP(T,l);k?b():C&&(b(),h())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[f,m,l,h,b]),d.jsx(P_,{...e,ref:a})}),[CP,RP]=Sd(bl,{isInside:!1}),AP=AC("TooltipContent"),P_=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:l,...u}=e,f=kd(Ki,n),h=Ed(n),{onClose:m}=f;return y.useEffect(()=>(document.addEventListener(Hp,m),()=>document.removeEventListener(Hp,m)),[m]),y.useEffect(()=>{if(f.trigger){const g=b=>{b.target?.contains(f.trigger)&&m()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[f.trigger,m]),d.jsx(Ul,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:g=>g.preventDefault(),onDismiss:m,children:d.jsxs(E_,{"data-state":f.stateAttribute,...h,...u,ref:t,style:{...u.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(AP,{children:r}),d.jsx(CP,{scope:n,isInside:!0,children:d.jsx(XC,{id:f.contentId,role:"tooltip",children:o||r})})]})})});j_.displayName=Ki;var N_="TooltipArrow",jP=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ed(n);return RP(N_,n).isInside?null:d.jsx(k_,{...o,...r,ref:t})});jP.displayName=N_;function PP(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function NP(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function OP(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function IP(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,l=t.length-1;a<t.length;l=a++){const u=t[a],f=t[l],h=u.x,m=u.y,g=f.x,b=f.y;m>r!=b>r&&n<(g-h)*(r-m)/(b-m)+h&&(o=!o)}return o}function DP(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),LP(t)}function LP(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],l=t[t.length-2];if((a.x-l.x)*(o.y-l.y)>=(a.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],l=n[n.length-2];if((a.x-l.x)*(o.y-l.y)>=(a.y-l.y)*(o.x-l.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var MP=C_,$P=R_,FP=A_,O_=j_;const UP=MP,hB=$P,pB=FP,zP=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>
vendor: 5,669 bytes, line 10
10d.jsx(O_,{ref:r,sideOffset:t,className:Le("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));zP.displayName=O_.displayName;var Vl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Fo=typeof window>"u"||"Deno"in globalThis;function Dn(){}function BP(e,t){return typeof e=="function"?e(t):e}function Wp(e){return typeof e=="number"&&e>=0&&e!==1/0}function I_(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Xs(e,t){return typeof e=="function"?e(t):e}function ur(e,t){return typeof e=="function"?e(t):e}function qw(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:a,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==qm(l,t.options))return!1}else if(!_l(t.queryKey,l))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||o&&o!==t.state.fetchStatus||a&&!a(t))}function Gw(e,t){const{exact:n,status:r,predicate:o,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(xl(t.options.mutationKey)!==xl(a))return!1}else if(!_l(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function qm(e,t){return(t?.queryKeyHashFn||xl)(e)}function xl(e){return JSON.stringify(e,(t,n)=>Gp(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function _l(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>_l(e[n],t[n])):!1}function D_(e,t){if(e===t)return e;const n=Kw(e)&&Kw(t);if(n||Gp(e)&&Gp(t)){const r=n?e:Object.keys(e),o=r.length,a=n?t:Object.keys(t),l=a.length,u=n?[]:{},f=new Set(r);let h=0;for(let m=0;m<l;m++){const g=n?m:a[m];(!n&&f.has(g)||n)&&e[g]===void 0&&t[g]===void 0?(u[g]=void 0,h++):(u[g]=D_(e[g],t[g]),u[g]===e[g]&&e[g]!==void 0&&h++)}return o===l&&h===o?e:u}return t}function qp(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Kw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Gp(e){if(!Yw(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Yw(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Yw(e){return Object.prototype.toString.call(e)==="[object Object]"}function HP(e){return new Promise(t=>{setTimeout(t,e)})}function Kp(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?D_(e,t):t}function VP(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function WP(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Gm=Symbol();function L_(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Gm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function qP(e,t){return typeof e=="function"?e(...t):!!e}var GP=class extends Vl{#t;#e;#n;constructor(){super(),this.#n=e=>{if(!Fo&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Km=new GP,KP=class extends Vl{#t=!0;#e;#n;constructor(){super(),this.#n=e=>{if(!Fo&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#t}},Qu=new KP;function Yp(){let e,t;const n=new Promise((o,a)=>{e=o,t=a});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function YP(e){return Math.min(1e3*2**e,3e4)}function M_(e){return(e??"online")==="online"?Qu.isOnline():!0}var $_=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Kh(e){return e instanceof $_}function F_(e){let t=!1,n=0,r=!1,o;const a=Yp(),l=x=>{r||(b(new $_(x)),e.abort?.())},u=()=>{t=!0},f=()=>{t=!1},h=()=>Km.isFocused()&&(e.networkMode==="always"||Qu.isOnline())&&e.canRun(),m=()=>M_(e.networkMode)&&e.canRun(),g=x=>{r||(r=!0,e.onSuccess?.(x),o?.(),a.resolve(x))},b=x=>{r||(r=!0,e.onError?.(x),o?.(),a.reject(x))},w=()=>new Promise(x=>{o=S=>{(r||h())&&x(S)},e.onPause?.()}).then(()=>{o=void 0,r||e.onContinue?.()}),E=()=>
10{if(r)return;let x;const S=n===0?e.initialPromise:void 0;try{x=S??e.fn()}catch(T){x=Promise.reject(T)}Promise.resolve(x).then(g).catch(T=>{if(r)return;const k=e.retry??(Fo?0:3),C=e.retryDelay??YP,j=typeof C=="function"?C(n,T):C,O=k===!0||typeof k=="number"&&n<k||typeof k=="function"&&k(n,T);if(t||!O){b(T);return}n++,e.onFail?.(n,T),HP(j).then(()=>h()?void 0:w()).then(()=>{t?b(T):E()})})};return{promise:a,cancel:l,continue:()=>(o?.(),a),cancelRetry:u,continueRetry:f,canStart:m,start:()=>(m()?E():w().then(E),a)}}var QP=e=>setTimeout(e,0);function JP(){let e=[],t=0,n=u=>{u()},r=u=>{u()},o=QP;const a=u=>{t?e.push(u):o(()=>{n(u)})},l=()=>{const u=e;e=[],u.length&&o(()=>{r(()=>{u.forEach(f=>{n(f)})})})};return{batch:u=>{let f;t++;try{f=u()}finally{t--,t||l()}return f},batchCalls:u=>(...f)=>{a(()=>{u(...f)})},schedule:a,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{o=u}}}var an=JP(),U_=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Wp(this.gcTime)&&(this.#t=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Fo?1/0:300*1e3))}clearGcTimeout(){this.#t&&(clearTimeout(this.#t),this.#t=void 0)}},XP=class extends U_{#t;#e;#n;#r;#s;#a;#i;constructor(e){super(),this.#i=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=ZP(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(e){this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=Kp(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(Dn).catch(Dn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(e=>ur(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Xs(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:!I_(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#s&&(this.#i?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,r=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},o=()=>{const f=L_(this.options,t),m=(()=>{const g={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(g),g})();return this.#i=!1,this.options.persister?this.options.persister(f,m,this):f(m)},l=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:o};return r(f),f})();this.options.behavior?.onFetch(l,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#o({type:"fetch",meta:l.fetchOptions?.meta});const u=f=>{Kh(f)&&f.silent||this.#o({type:"error",error:f}),Kh(f)||(this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this)),this.scheduleGc()};return this.#s=F_({initialPromise:t?.initialPromise,fn:l.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{if(f===void 0){u(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(h){u(h);return}this.#n.config.onSuccess?.(f,this),this.#n.config.onSettled?.(f,this.state.error,this),this.scheduleGc()},onError:u,onFail:(f,h)=>{this.#o({type:"failed",failureCount:f,error:h})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}),this.#s.start()}#o(e){const t=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,...z_(n.data,this.options),fetchMeta:e.meta??null};case"success":return this.#e=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 r=e.error;return Kh(r)&&r.revert&&this.#e?{...this.#e,fetchStatus:"idle"}
vendor: 4,362 bytes, line 10
10:{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),an.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function z_(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:M_(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ZP(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var eN=class extends Vl{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,n){const r=t.queryKey,o=t.queryHash??qm(r,t);let a=this.get(o);return a||(a=new XP({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){an.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>qw(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>qw(e,n)):t}notify(e){an.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){an.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){an.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},tN=class extends U_{#t;#e;#n;constructor(e){super(),this.mutationId=e.mutationId,this.#e=e.mutationCache,this.#t=[],this.state=e.state||nN(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#e.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#e.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#e.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})};this.#n=F_({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(o,a)=>{this.#r({type:"failed",failureCount:o,error:a})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#e.canRun(this)});const n=this.state.status==="pending",r=!this.#n.canStart();try{if(n)t();else{this.#r({type:"pending",variables:e,isPaused:r}),await this.#e.config.onMutate?.(e,this);const a=await this.options.onMutate?.(e);a!==this.state.context&&this.#r({type:"pending",context:a,variables:e,isPaused:r})}const o=await this.#n.start();return await this.#e.config.onSuccess?.(o,e,this.state.context,this),await this.options.onSuccess?.(o,e,this.state.context),await this.#e.config.onSettled?.(o,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(o,null,e,this.state.context),this.#r({type:"success",data:o}),o}catch(o){try{throw await this.#e.config.onError?.(o,e,this.state.context,this),await this.options.onError?.(o,e,this.state.context),await this.#e.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,o,e,this.state.context),o}finally{this.#r({type:"error",error:o})}}finally{this.#e.runNext(this)}}#r(e){const t=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};
vendor: 12,996 bytes, line 10
10case"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=t(this.state),an.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#e.notify({mutation:this,type:"updated",action:e})})}};function nN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var rN=class extends Vl{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(e,t,n){const r=new tN({mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#t.add(e);const t=fu(e);if(typeof t=="string"){const n=this.#e.get(t);n?n.push(e):this.#e.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const t=fu(e);if(typeof t=="string"){const n=this.#e.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#e.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=fu(e);if(typeof t=="string"){const r=this.#e.get(t)?.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=fu(e);return typeof t=="string"?this.#e.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){an.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Gw(t,n))}findAll(e={}){return this.getAll().filter(t=>Gw(e,t))}notify(e){an.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return an.batch(()=>Promise.all(e.map(t=>t.continue().catch(Dn))))}};function fu(e){return e.options.scope?.id}function Qw(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},f=0;const h=async()=>{let m=!1;const g=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},b=L_(t.options,t.fetchOptions),w=async(E,x,S)=>{if(m)return Promise.reject();if(x==null&&E.pages.length)return Promise.resolve(E);const k=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:x,direction:S?"backward":"forward",meta:t.options.meta};return g(M),M})(),C=await b(k),{maxPages:j}=t.options,O=S?WP:VP;return{pages:O(E.pages,C,j),pageParams:O(E.pageParams,x,j)}};if(o&&a.length){const E=o==="backward",x=E?sN:Jw,S={pages:a,pageParams:l},T=x(r,S);u=await w(S,T,E)}else{const E=e??a.length;do{const x=f===0?l[0]??r.initialPageParam:Jw(r,u);if(f>0&&x==null)break;u=await w(u,x),f++}while(f<E)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function Jw(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function sN(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var oN=class{#t;#e;#n;#r;#s;#a;#i;#o;constructor(e={}){this.#t=e.queryCache||new eN,this.#e=e.mutationCache||new rN,this.#n=e.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=Km.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#o=Qu.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#t.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Xs(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=this.#t.get(r.queryHash)?.state.data,l=BP(t,a);if(l!==void 0)return this.#t.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return an.batch(()=>this.#t.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state}removeQueries(e){const t=this.#t;an.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#t;return an.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=an.batch(()=>this.#t.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Dn).catch(Dn)}invalidateQueries(e,t={}){return an.batch(()=>(this.#t.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=an.batch(()=>this.#t.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let a=o.fetch(void 0,n);return n.throwOnError||(a=a.catch(Dn)),o.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(Dn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#t.build(this,t);return n.isStaleByTime(Xs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Dn).catch(Dn)}fetchInfiniteQuery(e){return e.behavior=Qw(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Dn).catch(Dn)}ensureInfiniteQueryData(e){return e.behavior=Qw(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Qu.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(xl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{_l(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#s.set(xl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{_l(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=qm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Gm&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},iN=class extends Vl{constructor(e,t){super(),this.options=t,this.#t=e,this.#o=null,this.#i=Yp(),this.options.experimental_prefetchInRender||this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#n=void 0;#r=void 0;#s;#a;#i;#o;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),Xw(this.#e,this.options)?this.#d():this.updateResult(),this.#w())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qp(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qp(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,n=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ur(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#e.setOptions(this.options),t._defaulted&&!qp(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const r=this.hasListeners();r&&Zw(this.#e,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#e!==n||ur(this.options.enabled,this.#e)!==ur(t.enabled,this.#e)||Xs(this.options.staleTime,this.#e)!==Xs(t.staleTime,this.#e))&&this.#g();const o=this.#y();r&&(this.#e!==n||ur(this.options.enabled,this.#e)!==ur(t.enabled,this.#e)||o!==this.#l)&&this.#v(o)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),n=this.createResult(t,e);return lN(this,n)&&(this.#r=n,this.#a=this.options,this.#s=this.#e.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#t.defaultQueryOptions(e),n=this.#t.getQueryCache().build(this.#t,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#d(e){this.#_();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Dn)),t}#g(){this.#b();const e=Xs(this.options.staleTime,this.#e);if(Fo||this.#r.isStale||!Wp(e))return;const n=I_(this.#r.dataUpdatedAt,e)+1;this.#c=setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#l=e,!(Fo||ur(this.options.enabled,this.#e)===!1||!Wp(this.#l)||this.#l===0)&&(this.#u=setInterval(()=>{(this.options.refetchIntervalInBackground||Km.isFocused())&&this.#d()},this.#l))}#w(){this.#g(),this.#v(this.#y())}#b(){this.#c&&(clearTimeout(this.#c),this.#c=void 0)}#x(){this.#u&&(clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#e,r=this.options,o=this.#r,a=this.#s,l=this.#a,f=e!==n?e.state:this.#n,{state:h}=e;let m={...h},g=!1,b;if(t._optimisticResults){const q=this.hasListeners(),J=!q&&Xw(e,t),ne=q&&Zw(e,n,t,r);(J||ne)&&(m={...m,...z_(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:w,errorUpdatedAt:E,status:x}=m;b=m.data;let S=!1;if(t.placeholderData!==void 0&&b===void 0&&x==="pending"){let q;o?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(q=o.data,S=!0):q=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,q!==void 0&&(x="success",b=Kp(o?.data,q,t),g=!0)}if(t.select&&b!==void 0&&!S)if(o&&b===a?.data&&t.select===this.#m)b=this.#f;else try{this.#m=t.select,b=t.select(b),b=Kp(o?.data,b,t),this.#f=b,this.#o=null}catch(q){this.#o=q}this.#o&&(w=this.#o,b=this.#f,E=Date.now(),x="error");const T=m.fetchStatus==="fetching",k=x==="pending",C=x==="error",j=k&&T,O=b!==void 0,D={status:x,fetchStatus:m.fetchStatus,isPending:k,isSuccess:x==="success",isError:C,isInitialLoading:j,isLoading:j,data:b,dataUpdatedAt:m.dataUpdatedAt,error:w,errorUpdatedAt:E,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>f.dataUpdateCount||m.errorUpdateCount>f.errorUpdateCount,isFetching:T,isRefetching:T&&!k,isLoadingError:C&&!O,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:C&&O,isStale:Ym(e,t),refetch:this.refetch,promise:this.#i,isEnabled:ur(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const q=ie=>{D.status==="error"?ie.reject(D.error):D.data!==void 0&&ie.resolve(D.data)},J=()=>{const ie=this.#i=D.promise=Yp();q(ie)},ne=this.#i;switch(ne.status){case"pending":e.queryHash===n.queryHash&&q(ne);break;case"fulfilled":(D.status==="error"||D.data!==ne.value)&&J();break;case"rejected":(D.status!=="error"||D.error!==ne.reason)&&J();break}}return D}updateResult(){const e=this.#r,t=this.createResult(this.#e,this.options);if(this.#s=this.#e.state,this.#a=this.options,this.#s.data!==void 0&&(this.#h=this.#e),qp(t,e))return;this.#r=t;const n=()=>
10{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#p.size)return!0;const a=new Set(o??this.#p);return this.options.throwOnError&&a.add("error"),Object.keys(this.#r).some(l=>{const u=l;return this.#r[u]!==e[u]&&a.has(u)})};this.#S({listeners:n()})}#_(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#w()}#S(e){an.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function aN(e,t){return ur(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Xw(e,t){return aN(e,t)||e.state.data!==void 0&&Qp(e,t,t.refetchOnMount)}function Qp(e,t,n){if(ur(t.enabled,e)!==!1&&Xs(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ym(e,t)}return!1}function Zw(e,t,n,r){return(e!==t||ur(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ym(e,n)}function Ym(e,t){return ur(t.enabled,e)!==!1&&e.isStaleByTime(Xs(t.staleTime,e))}function lN(e,t){return!qp(e.getCurrentResult(),t)}var B_=y.createContext(void 0),cN=e=>{const t=y.useContext(B_);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},uN=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(B_.Provider,{value:e,children:t})),H_=y.createContext(!1),dN=()=>y.useContext(H_);H_.Provider;function fN(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var hN=y.createContext(fN()),pN=()=>y.useContext(hN),mN=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},gN=e=>{y.useEffect(()=>{e.clearReset()},[e])},yN=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||qP(n,[e.error,r])),vN=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},wN=(e,t)=>e.isLoading&&e.isFetching&&!t,bN=(e,t)=>e?.suspense&&t.isPending,e0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function xN(e,t,n){const r=dN(),o=pN(),a=cN(),l=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(l),l._optimisticResults=r?"isRestoring":"optimistic",vN(l),mN(l,o),gN(o);const u=!a.getQueryCache().get(l.queryHash),[f]=y.useState(()=>new t(a,l)),h=f.getOptimisticResult(l),m=!r&&e.subscribed!==!1;if(y.useSyncExternalStore(y.useCallback(g=>{const b=m?f.subscribe(an.batchCalls(g)):Dn;return f.updateResult(),b},[f,m]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),y.useEffect(()=>{f.setOptions(l)},[l,f]),bN(l,h))throw e0(l,f,o);if(yN({result:h,errorResetBoundary:o,throwOnError:l.throwOnError,query:a.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw h.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(l,h),l.experimental_prefetchInRender&&!Fo&&wN(h,r)&&(u?e0(l,f,o):a.getQueryCache().get(l.queryHash)?.promise)?.catch(Dn).finally(()=>{f.updateResult()}),l.notifyOnChangeProps?h:f.trackResult(h)}function Sn(e,t){return xN(e,iN)}var Qm=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,V_=/^[\\/]{2}/;function _N(e,t){return t+e.replace(/\\/g,"/")}var t0="popstate";function n0(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function SN(e={}){function t(r,o){let a=o.state?.masked,{pathname:l,search:u,hash:f}=a||r.location;return Jp("",{pathname:l,search:u,hash:f},o.state&&o.state.usr||null,o.state&&o.state.key||"default",a?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,o){return typeof o=="string"?o:Uo(o)}return kN(t,n,null,e)}function gt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function hr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function EN(){return Math.random().toString(36).substring(2,10)}function r0(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Jp(e,t,n=null,r,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ra(t):t,state:n,key:t&&t.key||r||EN(),mask:o}}function Uo({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function ra(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function kN(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:a=!1}=r,l=o.history,u="POP",f=null,h=m();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function m(){return(l.state||{idx:null}).idx}function g(){u="POP";let S=m(),T=S==null?null:S-h;h=S,f&&f({action:u,location:x.location,delta:T})}function b(S,T){u="PUSH";let k=n0(S)?S:Jp(x.location,S,T);h=m()+1;let C=r0(k,h),j=x.createHref(k.mask||k);try{l.pushState(C,"",j)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;o.location.assign(j)}a&&f&&f({action:u,location:x.location,delta:1})}function w(S,T){u="REPLACE";let k=n0(S)?S:Jp(x.location,S,T);h=m();let C=r0(k,h),j=x.createHref(k.mask||k);l.replaceState(C,"",j),a&&f&&f({action:u,location:x.location,delta:0})}function E(S){return TN(o,S)}let x={get action(){return u},get location(){return e(o,l)},listen(S){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(t0,g),f=S,()=>{o.removeEventListener(t0,g),f=null}},createHref(S){return t(o,S)},createURL:E,encodeLocation(S){let T=E(S);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:b,replace:w,go(S){return l.go(S)}};return x}function TN(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),gt(r,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:Uo(t);return o=o.replace(/ $/,"%20"),!n&&V_.test(o)&&(o=r+o),new URL(o,r)}function W_(e,t,n="/"){return CN(e,t,n,!1)}function CN(e,t,n,r,o){let a=typeof t=="string"?ra(t):t,l=Ss(a.pathname||"/",n);if(l==null)return null;let u=RN(e),f=null,h=FN(l);for(let m=0;f==null&&m<u.length;++m)f=$N(u[m],h,r);return f}function RN(e){let t=q_(e);return AN(t),t}function q_(e,t=[],n=[],r="",o=!1){let a=(l,u,f=o,h)=>{let m={relativePath:h===void 0?l.path||"":h,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&f)return;gt(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}
10" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let g=jr([r,m.relativePath]),b=n.concat(m);l.children&&l.children.length>0&&(gt(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),q_(l.children,t,b,g,f)),!(l.path==null&&!l.index)&&t.push({path:g,score:LN(g,l.index),routesMeta:b.map((w,E)=>{let[x,S]=Y_(w.relativePath,w.caseSensitive,E===b.length-1);return{...w,matcher:x,compiledParams:S}})})};return e.forEach((l,u)=>{if(l.path===""||!l.path?.includes("?"))a(l,u);else for(let f of G_(l.path))a(l,u,!0,f)}),t}function G_(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return o?[a,""]:[a];let l=G_(r.join("/")),u=[];return u.push(...l.map(f=>f===""?a:[a,f].join("/"))),o&&u.push(...l),u.map(f=>e.startsWith("/")&&f===""?"/":f)}function AN(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:MN(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var jN=/^:[\w-]+$/,PN=3,NN=2,ON=1,IN=10,DN=-2,s0=e=>e==="*";function LN(e,t){let n=e.split("/"),r=n.length;return n.some(s0)&&(r+=DN),t&&(r+=NN),n.filter(o=>!s0(o)).reduce((o,a)=>o+(jN.test(a)?PN:a===""?ON:IN),r)}function MN(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function $N(e,t,n=!1){let{routesMeta:r}=e,o={},a="/",l=[];for(let u=0;u<r.length;++u){let f=r[u],h=u===r.length-1,m=a==="/"?t:t.slice(a.length)||"/",g={path:f.relativePath,caseSensitive:f.caseSensitive,end:h},b=f.matcher&&f.compiledParams?K_(g,m,f.matcher,f.compiledParams):Ju(g,m),w=f.route;if(!b&&h&&n&&!r[r.length-1].route.index&&(b=Ju({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},m)),!b)return null;
10Object.assign(o,b.params),l.push({params:o,pathname:jr([a,b.pathname]),pathnameBase:BN(jr([a,b.pathnameBase])),route:w}),b.pathnameBase!=="/"&&(a=jr([a,b.pathnameBase]))}return l}function Ju(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Y_(e.path,e.caseSensitive,e.end);return K_(e,t,n,r)}function K_(e,t,n,r){let o=t.match(n);if(!o)return null;let a=o[0],l=Yi(a,1),u=o.slice(1);return{params:r.reduce((h,{paramName:m,isOptional:g},b)=>{if(m==="*"){let E=u[b]||"";l=Yi(a.slice(0,a.length-E.length),1)}const w=u[b];return g&&!w?h[m]=void 0:h[m]=(w||"").replace(/%2F/g,"/"),h},{}),pathname:a,pathnameBase:l,pattern:e}}function Y_(e,t=!1,n=!0){hr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,f,h,m)=>{if(r.push({paramName:u,isOptional:f!=null}),f){let g=m.charAt(h+l.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function FN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return hr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ss(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function UN(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?ra(e):e,a;return n?(n=Q_(n),n.startsWith("/")||n.startsWith("\\")?a=o0(n.substring(1),"/"):a=o0(n,t)):a=t,{pathname:a,search:HN(r),hash:VN(o)}}function o0(e,t){let n=Yi(t).split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Yh(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function zN(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Jm(e){let t=zN(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Td(e,t,n,r=!1){let o;typeof e=="string"?o=ra(e):(o={...e},gt(!o.pathname||!o.pathname.includes("?"),Yh("?","pathname","search",o)),gt(!o.pathname||!o.pathname.includes("#"),Yh("#","pathname","hash",o)),gt(!o.search||!o.search.includes("#"),Yh("#","search","hash",o)));let a=e===""||o.pathname==="",l=a?"/":o.pathname,u;if(l==null)u=n;else{let g=t.length-1;if(!r&&l.startsWith("..")){let b=l.split("/");for(;b[0]==="..";)b.shift(),g-=1;o.pathname=b.join("/")}u=g>=0?t[g]:"/"}let f=UN(o,u),h=l&&l!=="/"&&l.endsWith("/"),m=(a||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||m)&&(f.pathname+="/"),f}var Q_=e=>e.replace(/[\\/]{2,}/g,"/"),jr=e=>Q_(e.join("/"));function Yi(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var BN=e=>Yi(e).replace(/^\/*/,"/"),HN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,VN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,WN=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function qN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function GN(e){let t=e.map(n=>n.route.path).filter(Boolean);return jr(t)||"/"}var J_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function X_(e,t){let n=e;
10if(typeof n!="string"||!Qm.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(J_)try{let a=new URL(window.location.href),l=V_.test(n)?new URL(_N(n,a.protocol)):new URL(n),u=Ss(l.pathname,t);l.origin===a.origin&&u!=null?n=u+l.search+l.hash:o=!0}catch{hr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var i0=new URL("http://localhost");function Xm(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),i0)}catch{return i0}}function Qh(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function KN(e,t){if(e.startsWith("//"))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===""||e.slice(n.length).startsWith("//"):!1}function Zm(e,t,n,r){let o=null;try{o=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),l=o!=null&&!Qh(o,n),u=!Qh(a,n);if(r==="reject"){if(l||u)throw new Error("External navigation is not allowed")}else if(u&&(o==null||!KN(e,o)||!Qh(o,a)))throw new Error("External navigation is not allowed")}var Z_=["POST","PUT","PATCH","DELETE"];new Set(Z_);var YN=["GET",...Z_];new Set(YN);var QN=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function JN(e){try{return QN.includes(new URL(e).protocol)}catch{return!1}}var sa=y.createContext(null);sa.displayName="DataRouter";var Cd=y.createContext(null);Cd.displayName="DataRouterState";var eS=y.createContext(!1);function XN(){return y.useContext(eS)}var tS=y.createContext({isTransitioning:!1});tS.displayName="ViewTransition";var ZN=y.createContext(new Map);ZN.displayName="Fetchers";var eO=y.createContext(null);eO.displayName="Await";var Qn=y.createContext(null);Qn.displayName="Navigation";var Wl=y.createContext(null);Wl.displayName="Location";var pr=y.createContext({outlet:null,matches:[],isDataRoute:!1});pr.displayName="Route";var eg=y.createContext(null);eg.displayName="RouteError";var nS="REACT_ROUTER_ERROR",tO="REDIRECT",nO="ROUTE_ERROR_RESPONSE";function rO(e){if(e.startsWith(`${nS}:${tO}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function sO(e){if(e.startsWith(`${nS}:${nO}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new WN(t.status,t.statusText,t.data)}catch{}}function oO(e,{relative:t}={}){gt(oa(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=y.useContext(Qn),{hash:o,pathname:a,search:l}=ql(e,{relative:t}),u=a;return n!=="/"&&(u=a==="/"?n:jr([n,a])),r.createHref({pathname:u,search:l,hash:o})}function oa(){return y.useContext(Wl)!=null}function Vt(){return gt(oa(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Wl).location}var rS="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function sS(e){y.useContext(Qn).static||y.useLayoutEffect(e)}function no(){let{isDataRoute:e}=y.useContext(pr);return e?xO():iO()}function iO(){gt(oa(),"useNavigate() may be used only in the context of a <Router> component.");let e=y.useContext(sa),{basename:t,navigator:n}=y.useContext(Qn),{matches:r}=y.useContext(pr),{pathname:o}=Vt(),a=JSON.stringify(Jm(r)),l=y.useRef(!1);return sS(()=>{l.current=!0}),y.useCallback((f,h={})=>{if(hr(l.current,rS),!l.current)return;if(typeof f=="number"){n.go(f);return}let m=Td(f,JSON.parse(a),o,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:jr([t,m.pathname])),Zm(typeof f=="string"?f:Uo(f),n.createHref(m),Xm(n),"reject"),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,a,o,e])}var aO=y.createContext(null);function lO(e){let t=y.useContext(pr).outlet;return y.useMemo(()=>t&&y.createElement(aO.Provider,{value:e},t),[t,e])}function cO(){let{matches:e}=y.useContext(pr);return e[e.length-1]?.params??{}}function ql(e,{relative:t}={}){let{matches:n}=y.useContext(pr),{pathname:r}=Vt(),o=JSON.stringify(Jm(n));return y.useMemo(()=>Td(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function uO(e,t){return oS(e,t)}function oS(e,t,n){gt(oa(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=y.useContext(Qn),{matches:o}=y.useContext(pr),a=o[o.length-1],l=a?a.params:{},u=a?a.pathname:"/",f=a?a.pathnameBase:"/",h=a&&a.route;{let S=h&&h.path||"";aS(u,!h||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${S}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 11 12Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let m=Vt(),g;if(t){let S=typeof t=="string"?ra(t):t;gt(f==="/"||S.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${S.pathname}" was given in the \`location\` prop.`),g=S}else g=m;let b=g.pathname||"/",w=b;if(f!=="/"){let S=f.replace(/^\//,"").split("/");w="/"+b.replace(/^\//,"").split("/").slice(S.length).join("/")}let E=n&&n.state.matches.length?n.state.matches.map(S=>Object.assign(S,{route:n.manifest[S.route.id]||S.route})):W_(e,{pathname:w});hr(h||E!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),hr(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let x=mO(E&&E.map(S=>Object.assign({},S,{params:Object.assign({},l,S.params),pathname:jr([f,r.encodeLocation?r.encodeLocation(S.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?f:jr([f,r.encodeLocation?r.encodeLocation(S.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),o,n);return t&&x?y.createElement(Wl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...g},navigationType:"POP"}},x):x}function dO(){let e=bO(),t=qN(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=y.createElement(y.Fragment,null,y.createElement("p",null,"ð¿ Hey developer ð"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:a},"ErrorBoundary")," or"," ",y.createElement("code",{style:a},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application
12Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:o},n):null,l)}var fO=y.createElement(dO,null),iS=class extends y.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,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=sO(e.digest);n&&(e=n)}let t=e!==void 0?y.createElement(pr.Provider,{value:this.props.routeContext},y.createElement(eg.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?y.createElement(hO,{error:e},t):t}};iS.contextType=eS;var Jh=new WeakMap;function hO({children:e,error:t}){let{basename:n,navigator:r}=y.useContext(Qn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=rO(t.digest);if(o){let a=Jh.get(t);if(a)throw a;let l=X_(o.location,n),u=l.absoluteURL||l.to;if(Zm(o.location,u,Xm(r),"allow-explicit"),JN(u))throw new Error("Invalid redirect location");if(J_&&!Jh.get(t))if(l.isExternal||o.reloadDocument)window.location.href=u;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:o.replace}));throw Jh.set(t,f),f}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u}`})}}return e}function pO({routeContext:e,match:t,children:n}){let r=y.useContext(sa);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(pr.Provider,{value:e},n)}function mO(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,a=r?.errors;if(a!=null){let m=o.findIndex(g=>g.route.id&&a?.[g.route.id]!==void 0);gt(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),o=o.slice(0,Math.min(o.length,m+1))}let l=!1,u=-1;if(n&&r){l=r.renderFallback;for(let m=0;m<o.length;m++){let g=o[m];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(u=m),g.route.id){let{loaderData:b,errors:w}=r,E=g.route.loader&&!b.hasOwnProperty(g.route.id)&&(!w||w[g.route.id]===void 0);if(g.route.lazy||E){n.isStatic&&(l=!0),u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}}let f=n?.onError,h=r&&f?(m,g)=>{f(m,{location:r.location,params:r.matches?.[0]?.params??{},pattern:GN(r.matches),errorInfo:g})}:void 0;return o.reduceRight((m,g,b)=>{let w,E=!1,x=null,S=null;r&&(w=a&&g.route.id?a[g.route.id]:void 0,x=g.route.errorElement||fO,l&&(u<0&&b===0?(aS("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,S=null):u===b&&(E=!0,S=g.route.hydrateFallbackElement||null)));let T=t.concat(o.slice(0,b+1)),k=()=>{let C;return w?C=x:E?C=S:g.route.Component?C=y.createElement(g.route.Component,null):g.route.element?C=g.route.element:C=m,y.createElement(pO,{match:g,routeContext:{outlet:m,matches:T,isDataRoute:r!=null},children:C})};return r&&(g.route.ErrorBoundary||g.route.errorElement||b===0)?y.createElement(iS,{location:r.location,revalidation:r.revalidation,component:x,error:w,children:k(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:h}):k()},null)}function tg(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gO(e){let t=y.useContext(sa);return gt(t,tg(e)),t}function yO(e){let t=y.useContext(Cd);return gt(t,tg(e)),t}function vO(e){let t=y.useContext(pr);return gt(t,tg(e)),t}function ng(e){let t=vO(e),n=t.matches[t.matches.length-1];return gt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function wO(){return ng("useRouteId")}function bO(){let e=y.useContext(eg),t=yO("useRouteError"),n=ng("useRouteError");return e!==void 0?e:t.errors?.[n]}function xO(){let{router:e}=gO("useNavigate"),t=ng("useNavigate"),n=y.useRef(!1);return sS(()=>{n.current=!0}),y.useCallback(async(o,a={})=>{hr(n.current,rS),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...a}))},[e,t])}var a0={};function aS(e,t,n){!t&&!a0[e]&&(a0[e]=!0,hr(!1,n))}y.memo(_O);function _O({routes:e,manifest:t,future:n,state:r,isStatic:o,onError:a}){return oS(e,void 0,{manifest:t,state:r,isStatic:o,onError:a})}function Xp({to:e,replace:t,state:n,relative:r}
12){gt(oa(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o,navigator:a}=y.useContext(Qn);hr(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:l}=y.useContext(pr),{pathname:u}=Vt(),f=no(),h=Td(e,Jm(l),u,r==="path");Zm(typeof e=="string"?e:Uo(e),a.createHref(h),Xm(a),"reject");let m=JSON.stringify(h);return y.useEffect(()=>{f(JSON.parse(m),{replace:t,state:n,relative:r})},[f,m,r,t,n]),null}function SO(e){return lO(e.context)}function Z(e){gt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function EO({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:a=!1,useTransitions:l}){gt(!oa(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),f=y.useMemo(()=>({basename:u,navigator:o,static:a,useTransitions:l,future:{}}),[u,o,a,l]);typeof n=="string"&&(n=ra(n));let{pathname:h="/",search:m="",hash:g="",state:b=null,key:w="default",mask:E}=n,x=y.useMemo(()=>{let S=Ss(h,u);return S==null?null:{location:{pathname:S,search:m,hash:g,state:b,key:w,mask:E},navigationType:r}},[u,h,m,g,b,w,r,E]);return hr(x!=null,`<Router basename="${u}"> is not able to match the URL "${h}${m}${g}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:y.createElement(Qn.Provider,{value:f},y.createElement(Wl.Provider,{children:t,value:x}))}function kO({children:e,location:t}){return uO(Zp(e),t)}function Zp(e,t=[]){let n=[];return y.Children.forEach(e,(r,o)=>{if(!y.isValidElement(r))return;let a=[...t,o];if(r.type===y.Fragment){n.push.apply(n,Zp(r.props.children,a));return}gt(r.type===Z,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),gt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=Zp(r.props.children,a)),n.push(l)}),n}var Lu="get",Mu="application/x-www-form-urlencoded";function Rd(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function TO(e){return Rd(e)&&e.tagName.toLowerCase()==="button"}function CO(e){return Rd(e)&&e.tagName.toLowerCase()==="form"}function RO(e){return Rd(e)&&e.tagName.toLowerCase()==="input"}function AO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function jO(e,t){return e.button===0&&(!t||t==="_self")&&!AO(e)}function em(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function PO(e,t){let n=em(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(a=>{n.append(o,a)})}),n}var hu=null;function NO(){if(hu===null)try{new FormData(document.createElement("form"),0),hu=!1}catch{hu=!0}return hu}var OO=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Xh(e){return e!=null&&!OO.has(e)?(hr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Mu}"`),null):e}function IO(e,t){let n,r,o,a,l;if(CO(e)){let u=e.getAttribute("action");r=u?Ss(u,t):null,n=e.getAttribute("method")||Lu,o=Xh(e.getAttribute("enctype"))||Mu,a=new FormData(e)}else if(TO(e)||RO(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||u.getAttribute("action");if(r=f?Ss(f,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||Lu,o=Xh(e.getAttribute("formenctype"))||Xh(u.getAttribute("enctype"))||Mu,a=new FormData(u,e),!NO()){let{name:h,type:m,value:g}=e;if(m==="image"){let b=h?`${h}.`:"";a.append(`${b}x`,"0"),a.append(`${b}y`,"0")}
12else h&&a.append(h,g)}}else{if(Rd(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Lu,r=null,o=Mu,l=e}return a&&o==="text/plain"&&(l=a,a=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:a,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function rg(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function lS(e,t,n,r){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:t&&Ss(o.pathname,t)==="/"?o.pathname=`${Yi(t)}/_root.${r}`:o.pathname=`${Yi(o.pathname)}.${r}`,o}async function DO(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function LO(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function MO(e,t,n){let r=await Promise.all(e.map(async o=>{let a=t.routes[o.route.id];if(a){let l=await DO(a,n);return l.links?l.links():[]}return[]}));return zO(r.flat(1).filter(LO).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function l0(e,t,n,r,o,a){let l=(f,h)=>n[h]?f.route.id!==n[h].route.id:!0,u=(f,h)=>n[h].pathname!==f.pathname||n[h].route.path?.endsWith("*")&&n[h].params["*"]!==f.params["*"];return a==="assets"?t.filter((f,h)=>l(f,h)||u(f,h)):a==="data"?t.filter((f,h)=>{let m=r.routes[f.route.id];if(!m||!m.hasLoader)return!1;if(l(f,h)||u(f,h))return!0;if(f.route.shouldRevalidate){let g=f.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function $O(e,t,{includeHydrateFallback:n}={}){return FO(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let a=[o.module];return o.clientActionModule&&(a=a.concat(o.clientActionModule)),o.clientLoaderModule&&(a=a.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(a=a.concat(o.hydrateFallbackModule)),o.imports&&(a=a.concat(o.imports)),a}).flat(1))}function FO(e){return[...new Set(e)]}function UO(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function zO(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let a=JSON.stringify(UO(o));return n.has(a)||(n.add(a),r.push({key:a,link:o})),r},[])}function sg(){let e=y.useContext(sa);return rg(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function BO(){let e=y.useContext(Cd);return rg(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var og=y.createContext(void 0);og.displayName="FrameworkContext";function Ad(){let e=y.useContext(og);return rg(e,"You must render this element inside a <HydratedRouter> element"),e}function HO(e,t){let n=y.useContext(og),[r,o]=y.useState(!1),[a,l]=y.useState(!1),{onFocus:u,onBlur:f,onMouseEnter:h,onMouseLeave:m,onTouchStart:g}=t,b=y.useRef(null);y.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let x=T=>{T.forEach(k=>{l(k.isIntersecting)})},S=new IntersectionObserver(x,{threshold:.5});return b.current&&S.observe(b.current),()=>{S.disconnect()}}},[e]),y.useEffect(()=>{if(r){let x=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(x)}}},[r]);let w=()=>{o(!0)},E=()=>{o(!1),l(!1)};return n?e!=="intent"?[a,b,{}]:[a,b,{onFocus:Qa(u,w),onBlur:Qa(f,E),onMouseEnter:Qa(h,w),onMouseLeave:Qa(m,E),onTouchStart:Qa(g,w)}]:[!1,b,{}]}function Qa(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function VO({page:e,...t}){let n=XN(),{nonce:r}=Ad(),{router:o}=sg(),a=y.useMemo(()=>W_(o.routes,e,o.basename),[o.routes,e,o.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?y.createElement(qO,{page:e,matches:a,...t}):y.createElement(GO,{page:e,matches:a,...t})):null}function WO(e){let{manifest:t,routeModules:n}=Ad(),[r,o]=y.useState([]);return y.useEffect(()=>{let a=!1;return MO(e,t,n).then(l=>{a||o(l)}),()=>{a=!0}},[e,t,n]),r}function qO({page:e,matches:t,...n}){let r=Vt(),{future:o}=Ad(),{basename:a}=sg(),l=y.useMemo(()=>
12{if(e===r.pathname+r.search+r.hash)return[];let u=lS(e,a,o.v8_trailingSlashAwareDataRequests,"rsc"),f=!1,h=[];for(let m of t)typeof m.route.shouldRevalidate=="function"?f=!0:h.push(m.route.id);return f&&h.length>0&&u.searchParams.set("_routes",h.join(",")),[u.pathname+u.search]},[a,o.v8_trailingSlashAwareDataRequests,e,r,t]);return y.createElement(y.Fragment,null,l.map(u=>y.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...n})))}function GO({page:e,matches:t,...n}){let r=Vt(),{future:o,manifest:a,routeModules:l}=Ad(),{basename:u}=sg(),{loaderData:f,matches:h}=BO(),m=y.useMemo(()=>l0(e,t,h,a,r,"data"),[e,t,h,a,r]),g=y.useMemo(()=>l0(e,t,h,a,r,"assets"),[e,t,h,a,r]),b=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let x=new Set,S=!1;if(t.forEach(k=>{let C=a.routes[k.route.id];!C||!C.hasLoader||(!m.some(j=>j.route.id===k.route.id)&&k.route.id in f&&l[k.route.id]?.shouldRevalidate||C.hasClientLoader?S=!0:x.add(k.route.id))}),x.size===0)return[];let T=lS(e,u,o.v8_trailingSlashAwareDataRequests,"data");return S&&x.size>0&&T.searchParams.set("_routes",t.filter(k=>x.has(k.route.id)).map(k=>k.route.id).join(",")),[T.pathname+T.search]},[u,o.v8_trailingSlashAwareDataRequests,f,r,a,m,t,e,l]),w=y.useMemo(()=>$O(g,a),[g,a]),E=WO(g);return y.createElement(y.Fragment,null,b.map(x=>y.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...n})),w.map(x=>y.createElement("link",{key:x,rel:"modulepreload",href:x,...n})),E.map(({key:x,link:S})=>y.createElement("link",{key:x,nonce:n.nonce,...S,crossOrigin:S.crossOrigin??n.crossOrigin})))}function KO(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var YO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{YO&&(window.__reactRouterVersion="7.18.3")}catch{}function QO({basename:e,children:t,useTransitions:n,window:r}){let o=y.useRef();o.current==null&&(o.current=SN({window:r,v5Compat:!0}));let a=o.current,[l,u]=y.useState({action:a.action,location:a.location}),f=y.useCallback(h=>{n===!1?u(h):y.startTransition(()=>u(h))},[n]);return y.useLayoutEffect(()=>a.listen(f),[a,f]),y.createElement(EO,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:a,useTransitions:n})}var Ae=y.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:a,replace:l,mask:u,state:f,target:h,to:m,preventScrollReset:g,viewTransition:b,defaultShouldRevalidate:w,...E},x){let{basename:S,navigator:T,useTransitions:k}=y.useContext(Qn),C=typeof m=="string"&&Qm.test(m),j=X_(m,S);m=j.to;let O=oO(m,{relative:o}),M=Vt(),D=null;if(u){let G=Td(u,[],M.mask?M.mask.pathname:"/",!0);S!=="/"&&(G.pathname=G.pathname==="/"?S:jr([S,G.pathname])),D=T.createHref(G)}let[q,J,ne]=HO(r,E),ie=eI(m,{replace:l,mask:u,state:f,target:h,preventScrollReset:g,relative:o,viewTransition:b,defaultShouldRevalidate:w,useTransitions:k});function re(G){t&&t(G),G.defaultPrevented||ie(G)}let pe=!(j.isExternal||a),L=y.createElement("a",{...E,...ne,href:(pe?D:void 0)||j.absoluteURL||O,onClick:pe?re:t,ref:KO(x,J),target:h,"data-discover":!C&&n==="render"?"true":void 0});return q&&!C?y.createElement(y.Fragment,null,L,y.createElement(VO,{page:O})):L});Ae.displayName="Link";var JO=y.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:a,to:l,viewTransition:u,children:f,...h},m){let g=ql(l,{relative:h.relative}),b=Vt(),w=y.useContext(Cd),{navigator:E,basename:x}=y.useContext(Qn),S=w!=null&&iI(g)&&u===!0,T=E.encodeLocation?E.encodeLocation(g).pathname:g.pathname,k=b.pathname,C=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;n||(k=k.toLowerCase(),C=C?C.toLowerCase():null,T=T.toLowerCase()),C&&x&&(C=Ss(C,x)||C);const j=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let O=k===T||!o&&k.startsWith(T)&&k.charAt(j)==="/",M=C!=null&&(C===T||!o&&C.startsWith(T)&&C.charAt(T.length)==="/"),D={isActive:O,isPending:M,isTransitioning:S},q=O?t:void 0,J;typeof r=="function"?J=r(D):J=[r,O?"active":null,M?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let ne=typeof a=="function"?a(D):a;return y.createElement(Ae,{...h,"aria-current":q,className:J,ref:m,style:ne,to:l,viewTransition:u},typeof f=="function"?f(D):f)});JO.displayName="NavLink";var XO=y.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:a,method:l=Lu,action:u,onSubmit:f,relative:h,preventScrollReset:m,viewTransition:g,defaultShouldRevalidate:b,...w},E)=>{let{useTransitions:x}=y.useContext(Qn),S=sI(),T=oI(u,{relative:h}),k=l.toLowerCase()==="get"?"get":"post",C=typeof u=="string"&&Qm.test(u),j=O=>
12{if(f&&f(O),O.defaultPrevented)return;O.preventDefault();let M=O.nativeEvent.submitter,D=M?.getAttribute("formmethod")||l,q=()=>S(M||O.currentTarget,{fetcherKey:t,method:D,navigate:n,replace:o,state:a,relative:h,preventScrollReset:m,viewTransition:g,defaultShouldRevalidate:b});x&&n!==!1?y.startTransition(()=>q()):q()};return y.createElement("form",{ref:E,method:k,action:T,onSubmit:r?f:j,...w,"data-discover":!C&&e==="render"?"true":void 0})});XO.displayName="Form";function ZO(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function cS(e){let t=y.useContext(sa);return gt(t,ZO(e)),t}function eI(e,{target:t,replace:n,mask:r,state:o,preventScrollReset:a,relative:l,viewTransition:u,defaultShouldRevalidate:f,useTransitions:h}={}){let m=no(),g=Vt(),b=ql(e,{relative:l});return y.useCallback(w=>{if(jO(w,t)){w.preventDefault();let E=n!==void 0?n:Uo(g)===Uo(b),x=()=>m(e,{replace:E,mask:r,state:o,preventScrollReset:a,relative:l,viewTransition:u,defaultShouldRevalidate:f});h?y.startTransition(()=>x()):x()}},[g,m,b,n,r,o,t,e,a,l,u,f,h])}function tI(e){hr(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=y.useRef(em(e)),n=y.useRef(!1),r=Vt(),o=y.useMemo(()=>PO(r.search,n.current?null:t.current),[r.search]),a=no(),l=y.useCallback((u,f)=>{const h=em(typeof u=="function"?u(new URLSearchParams(o)):u);n.current=!0,a("?"+h,f)},[a,o]);return[o,l]}var nI=0,rI=()=>`__${String(++nI)}__`;function sI(){let{router:e}=cS("useSubmit"),{basename:t}=y.useContext(Qn),n=wO(),r=e.fetch,o=e.navigate;return y.useCallback(async(a,l={})=>{let{action:u,method:f,encType:h,formData:m,body:g}=IO(a,t);if(l.navigate===!1){let b=l.fetcherKey||rI();await r(b,n,l.action||u,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:g,formMethod:l.method||f,formEncType:l.encType||h,flushSync:l.flushSync})}else await o(l.action||u,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:g,formMethod:l.method||f,formEncType:l.encType||h,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,o,t,n])}function oI(e,{relative:t}={}){let{basename:n}=y.useContext(Qn),r=y.useContext(pr);gt(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...ql(e||".",{relative:t})},l=Vt();if(e==null){a.search=l.search;let u=new URLSearchParams(a.search),f=u.getAll("index");if(f.some(m=>m==="")){u.delete("index"),f.filter(g=>g).forEach(g=>u.append("index",g));let m=u.toString();a.search=m?`?${m}`:""}}return(!e||e===".")&&o.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:jr([n,a.pathname])),Uo(a)}function iI(e,{relative:t}={}){let n=y.useContext(tS);gt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=cS("useViewTransitionState"),o=ql(e,{relative:t});if(!n.isTransitioning)return!1;let a=Ss(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Ss(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ju(o.pathname,l)!=null||Ju(o.pathname,a)!=null}const il="G-L8YWXYNF5W",Zh="1109705574461085",aI=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","fbclid","gclid"];let tm=!1;const lI=()=>{console.log("[GA4] Attempting init with ID:",il),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)};const e=document.createElement("script");e.async=!0,e.src=`https://www.googletagmanager.com/gtag/js?id=${il}`,e.onload=()=>{console.log("[GA4] Script loaded, configuring..."),window.gtag("js",new Date),window.gtag("config",il,{send_page_view:!1,page_location:window.location.href,page_path:window.location.pathname+window.location.search,page_title:document.title}),window.gtag("event","page_view",{page_location:window.location.href,page_path:window.location.pathname+window.location.search,page_title:document.title}),console.log("[GA4] Initialized successfully:",il)},e.onerror=t=>{console.error("[GA4] Failed to load script:",t)},document.head.appendChild(e)},cI=()=>
12{if(console.log("[Meta Pixel] Attempting init with ID:",Zh),typeof window.fbq!="function"){console.error("[Meta Pixel] fbq not found - check index.html script");return}window.fbq("init",Zh),window.fbq("track","PageView"),tm=!0,console.log("[Meta Pixel] Initialized:",Zh)},uI=()=>{const e=new URLSearchParams(window.location.search),t={};if(aI.forEach(n=>{const r=e.get(n);r&&(t[n]=r)}),Object.keys(t).length>0){const n=ig();(Object.keys(n).length===0||e.has("utm_source"))&&(sessionStorage.setItem("utm_params",JSON.stringify({...t,landing_page:window.location.pathname,captured_at:new Date().toISOString()})),console.log("[Analytics] UTM params captured:",t))}},ig=()=>{try{const e=sessionStorage.getItem("utm_params");return e?JSON.parse(e):{}}catch{return{}}},dI=(e,t)=>{window.gtag&&window.gtag("event","page_view",{page_path:e,page_title:t||document.title,page_location:window.location.href}),window.fbq&&(tm?tm=!1:window.fbq("track","PageView"))},Ja=(e,t)=>{window.gtag&&window.gtag("event",e,{page_location:window.location.href,page_path:window.location.pathname+window.location.search,page_title:document.title,...t}),console.log("[Analytics] Event tracked:",e,t)},fI=e=>{window.gtag&&window.gtag("event","view_item",{currency:"GBP",value:e.price||0,items:[{item_id:e.id,item_name:e.name,item_category:e.category||"Theatre",price:e.price||0}]}),window.fbq&&window.fbq("track","ViewContent",{content_ids:[e.id],content_name:e.name,content_category:e.category||"Theatre",content_type:"product",value:e.price||0,currency:"GBP"})},mB=(e,t)=>{window.gtag&&window.gtag("event","add_to_cart",{currency:"GBP",value:t,items:e.map(n=>({item_id:n.id,item_name:n.name,item_category:n.category||"Theatre Ticket",price:n.price,quantity:n.quantity}))}),window.fbq&&window.fbq("track","AddToCart",{content_ids:e.map(n=>n.id),content_name:e.map(n=>n.name).join(", "),content_type:"product",value:t,currency:"GBP",num_items:e.reduce((n,r)=>n+r.quantity,0)})},gB=(e,t)=>{const n=ig();window.gtag&&window.gtag("event","begin_checkout",{currency:"GBP",value:t,items:e.map(r=>({item_id:r.id,item_name:r.name,item_category:r.category||"Theatre Ticket",price:r.price,quantity:r.quantity})),...n}),window.fbq&&window.fbq("track","InitiateCheckout",{content_ids:e.map(r=>r.id),content_name:e.map(r=>r.name).join(", "),content_type:"product",value:t,currency:"GBP",num_items:e.reduce((r,o)=>r+o.quantity,0)})},ag=e=>e.map((t,n)=>({item_id:t.id,item_name:t.name,item_category:t.category||"Theatre",item_variant:t.variant,price:t.price??0,quantity:t.quantity??1,index:t.index??n})),hI=(e,t,n)=>{!n.length||!il||!window.gtag||window.gtag("event","view_item_list",{item_list_id:e,item_list_name:t,items:ag(n)})},pI=(e,t,n)=>{window.gtag&&window.gtag("event","select_item",{item_list_id:e,item_list_name:t,items:ag([n])})},yB=(e,t)=>{window.gtag&&window.gtag("event","view_cart",{currency:"GBP",value:t,items:ag(e)})},uS="reported_purchases",dS=()=>{try{const e=localStorage.getItem(uS),t=e?JSON.parse(e):[];return Array.isArray(t)?t:[]}catch{return[]}},mI=e=>dS().includes(e),gI=e=>{try{const t=[...dS(),e].slice(-50);localStorage.setItem(uS,JSON.stringify(t))}catch{}},vB=e=>{if(!e.orderId||mI(e.orderId))return;gI(e.orderId);const t=ig();window.gtag&&window.gtag("event","purchase",{transaction_id:e.orderId,value:e.totalValue,currency:e.currency||"GBP",items:e.items.map(n=>({item_id:n.id,item_name:n.name,item_category:n.category||"Theatre Ticket",item_variant:n.variant,price:n.price,quantity:n.quantity})),...t}),window.fbq&&window.fbq("track","Purchase",{content_ids:e.items.map(n=>n.id),content_name:e.items.map(n=>n.name).join(", "),content_type:"product",value:e.totalValue,currency:e.currency||"GBP",num_items:e.items.reduce((n,r)=>n+r.quantity,0),order_id:e.orderId}),console.log("[Analytics] Purchase tracked:",e.orderId,e.totalValue),sessionStorage.removeItem("utm_params")},c0=e=>{let t;const n=new Set,r=(h,m)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const b=t;t=m??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(w=>w(t,b))}},o=()=>t,u={setState:r,getState:o,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h))},f=t=e(r,o,u);return u}
12,yI=(e=>e?c0(e):c0),vI=e=>e;function wI(e,t=vI){const n=se.useSyncExternalStore(e.subscribe,se.useCallback(()=>t(e.getState()),[e,t]),se.useCallback(()=>t(e.getInitialState()),[e,t]));return se.useDebugValue(n),n}const u0=e=>{const t=yI(e),n=r=>wI(t,r);return Object.assign(n,t),n},fS=(e=>e?u0(e):u0),lg="cookie_consent",bI=()=>{try{const e=localStorage.getItem(lg);if(e){const t=JSON.parse(e);return{consent:{essential:!0,analytics:t.analytics??!1,marketing:t.marketing??!1,timestamp:t.timestamp??null},hasInteracted:!0}}}catch{}return{consent:{essential:!0,analytics:!1,marketing:!1,timestamp:null},hasInteracted:!1}},ep=e=>{try{localStorage.setItem(lg,JSON.stringify(e))}catch{}},cg=fS(e=>{const t=bI();return{consent:t.consent,hasInteracted:t.hasInteracted,setConsent:n=>e(r=>{const o={...r.consent,...n,essential:!0,timestamp:new Date().toISOString()};return ep(o),{consent:o,hasInteracted:!0}}),acceptAll:()=>e(()=>{const n={essential:!0,analytics:!0,marketing:!0,timestamp:new Date().toISOString()};return ep(n),{consent:n,hasInteracted:!0}}),rejectAll:()=>e(()=>{const n={essential:!0,analytics:!1,marketing:!1,timestamp:new Date().toISOString()};return ep(n),{consent:n,hasInteracted:!0}}),resetConsent:()=>e(()=>(localStorage.removeItem(lg),{consent:{essential:!0,analytics:!1,marketing:!1,timestamp:null},hasInteracted:!1}))}}),xI=Bl("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"}}),Ce=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const l=r?CC:"button";return d.jsx(l,{className:Le(xI({variant:t,size:n,className:e})),ref:a,...o})});Ce.displayName="Button";function _I(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var jd="Switch",[SI]=Es(jd),[EI,kI]=SI(jd),hS=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:l,disabled:u,value:f="on",onCheckedChange:h,form:m,...g}=e,[b,w]=y.useState(null),E=xt(t,C=>w(C)),x=y.useRef(!1),S=b?m||!!b.closest("form"):!0,[T,k]=Xi({prop:o,defaultProp:a??!1,onChange:h,caller:jd});return d.jsxs(EI,{scope:n,checked:T,disabled:u,children:[d.jsx(Ze.button,{type:"button",role:"switch","aria-checked":T,"aria-required":l,"data-state":yS(T),"data-disabled":u?"":void 0,disabled:u,value:f,...g,ref:E,onClick:Re(e.onClick,C=>{k(j=>!j),S&&(x.current=C.isPropagationStopped(),x.current||C.stopPropagation())})}),S&&d.jsx(gS,{control:b,bubbles:!x.current,name:r,value:f,checked:T,required:l,disabled:u,form:m,style:{transform:"translateX(-100%)"}})]})});hS.displayName=jd;var pS="SwitchThumb",mS=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=kI(pS,n);return d.jsx(Ze.span,{"data-state":yS(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});mS.displayName=pS;var TI="SwitchBubbleInput",gS=y.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const l=y.useRef(null),u=xt(l,a),f=_I(n),h=f_(t);return y.useEffect(()=>{const m=l.current;if(!m)return;const g=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(g,"checked").set;if(f!==n&&w){const E=new Event("click",{bubbles:r});w.call(m,n),m.dispatchEvent(E)}},[f,n,r]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:u,style:{...o.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});gS.displayName=TI;function yS(e){return e?"checked":"unchecked"}var vS=hS,CI=mS;const Oo=y.forwardRef(({className:e,...t},n)=>d.jsx(vS,{className:Le("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:n,children:d.jsx(CI,{className:Le("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}
vendor: 4,155 bytes, line 12
12));Oo.displayName=vS.displayName;var RI="Label",wS=y.forwardRef((e,t)=>d.jsx(Ze.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));wS.displayName=RI;var bS=wS;const AI=Bl("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Io=y.forwardRef(({className:e,...t},n)=>d.jsx(bS,{ref:n,className:Le(AI(),e),...t}));Io.displayName=bS.displayName;var tp="focusScope.autoFocusOnMount",np="focusScope.autoFocusOnUnmount",d0={bubbles:!1,cancelable:!0},jI="FocusScope",ug=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...l}=e,[u,f]=y.useState(null),h=Yn(o),m=Yn(a),g=y.useRef(null),b=xt(t,x=>f(x)),w=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let x=function(C){if(w.paused||!u)return;const j=C.target;u.contains(j)?g.current=j:Ys(g.current,{select:!0})},S=function(C){if(w.paused||!u)return;const j=C.relatedTarget;j!==null&&(u.contains(j)||Ys(g.current,{select:!0}))},T=function(C){if(document.activeElement===document.body)for(const O of C)O.removedNodes.length>0&&Ys(u)};document.addEventListener("focusin",x),document.addEventListener("focusout",S);const k=new MutationObserver(T);return u&&k.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",S),k.disconnect()}}},[r,u,w.paused]),y.useEffect(()=>{if(u){h0.add(w);const x=document.activeElement;if(!u.contains(x)){const T=new CustomEvent(tp,d0);u.addEventListener(tp,h),u.dispatchEvent(T),T.defaultPrevented||(PI(LI(xS(u)),{select:!0}),document.activeElement===x&&Ys(u))}return()=>{u.removeEventListener(tp,h),setTimeout(()=>{const T=new CustomEvent(np,d0);u.addEventListener(np,m),u.dispatchEvent(T),T.defaultPrevented||Ys(x??document.body,{select:!0}),u.removeEventListener(np,m),h0.remove(w)},0)}}},[u,h,m,w]);const E=y.useCallback(x=>{if(!n&&!r||w.paused)return;const S=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,T=document.activeElement;if(S&&T){const k=x.currentTarget,[C,j]=NI(k);C&&j?!x.shiftKey&&T===j?(x.preventDefault(),n&&Ys(C,{select:!0})):x.shiftKey&&T===C&&(x.preventDefault(),n&&Ys(j,{select:!0})):T===k&&x.preventDefault()}},[n,r,w.paused]);return d.jsx(Ze.div,{tabIndex:-1,...l,ref:b,onKeyDown:E})});ug.displayName=jI;function PI(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ys(r,{select:t}),document.activeElement!==n)return}function NI(e){const t=xS(e),n=f0(t,e),r=f0(t.reverse(),e);return[n,r]}function xS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function f0(e,t){for(const n of e)if(!OI(n,{upTo:t}))return n}function OI(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function II(e){return e instanceof HTMLInputElement&&"select"in e}function Ys(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&II(e)&&t&&e.select()}}var h0=DI();function DI(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=p0(e,t),e.unshift(t)},remove(t){e=p0(e,t),e[0]?.resume()}}}function p0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function LI(e){return e.filter(t=>t.tagName!=="A")}var rp=0;function _S(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??m0()),document.body.insertAdjacentElement("beforeend",e[1]??m0()),rp++,()=>{rp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),rp--}},[])}function m0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 5,955 bytes, lines 12-27
12style.position="fixed",e.style.pointerEvents="none",e}var Kr=function(){return Kr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Kr.apply(this,arguments)};function ia(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function MI(e,t,n,r){function o(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function u(m){try{h(r.next(m))}catch(g){l(g)}}function f(m){try{h(r.throw(m))}catch(g){l(g)}}function h(m){m.done?a(m.value):o(m.value).then(u,f)}h((r=r.apply(e,t||[])).next())})}function $I(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var $u="right-scroll-bar-position",Fu="width-before-scroll-bar",FI="with-scroll-bars-hidden",UI="--removed-body-scroll-bar-size";function sp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function zI(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var BI=typeof window<"u"?y.useLayoutEffect:y.useEffect,g0=new WeakMap;function HI(e,t){var n=zI(null,function(r){return e.forEach(function(o){return sp(o,r)})});return BI(function(){var r=g0.get(n);if(r){var o=new Set(r),a=new Set(e),l=n.current;o.forEach(function(u){a.has(u)||sp(u,null)}),a.forEach(function(u){o.has(u)||sp(u,l)})}g0.set(n,e)},[e]),n}function VI(e){return e}function WI(e,t){t===void 0&&(t=VI);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var l=t(a,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(a){for(r=!0;n.length;){var l=n;n=[],l.forEach(a)}n={push:function(u){return a(u)},filter:function(){return n}}},assignMedium:function(a){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(a),l=n}var f=function(){var m=l;l=[],m.forEach(a)},h=function(){return Promise.resolve().then(f)};h(),n={push:function(m){l.push(m),h()},filter:function(m){return l=l.filter(m),n}}}};return o}function qI(e){e===void 0&&(e={});var t=WI(null);return t.options=Kr({async:!0,ssr:!1},e),t}var SS=function(e){var t=e.sideCar,n=ia(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,Kr({},n))};SS.isSideCarExport=!0;function GI(e,t){return e.useMedium(t),SS}var ES=qI(),op=function(){},Pd=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:op,onWheelCapture:op,onTouchMoveCapture:op}),o=r[0],a=r[1],l=e.forwardProps,u=e.children,f=e.className,h=e.removeScrollBar,m=e.enabled,g=e.shards,b=e.sideCar,w=e.noRelative,E=e.noIsolation,x=e.inert,S=e.allowPinchZoom,T=e.as,k=T===void 0?"div":T,C=e.gapMode,j=ia(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=b,M=HI([n,t]),D=Kr(Kr({},j),o);return y.createElement(y.Fragment,null,m&&y.createElement(O,{sideCar:ES,removeScrollBar:h,shards:g,noRelative:w,noIsolation:E,inert:x,setCallbacks:a,allowPinchZoom:!!S,lockRef:n,gapMode:C}),l?y.cloneElement(y.Children.only(u),Kr(Kr({},D),{ref:M})):y.createElement(k,Kr({},D,{className:f,ref:M}),u))});Pd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Pd.classNames={fullWidth:Fu,zeroRight:$u};var KI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function YI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=KI();return t&&e.setAttribute("nonce",t),e}function QI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function JI(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var XI=function(){var e=0,t=null;return{add:function(n){e==0&&(t=YI())&&(QI(t,n),JI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ZI=function(){var e=XI();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},kS=function(){var e=ZI(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},eD={left:0,top:0,right:0,gap:0},ip=function(e){return parseInt(e||"",10)||0},tD=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ip(n),ip(r),ip(o)]},nD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return eD;var t=tD(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},rD=kS(),Bi="data-scroll-locked",sD=function(e,t,n,r){var o=e.left,a=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),` 13 .`.concat(FI,` { 14 overflow: hidden `).concat(r,`; 15 padding-right: `).concat(u,"px ").concat(r,`; 16 } 17 body[`).concat(Bi,`] { 18 overflow: hidden `).concat(r,`; 19 overscroll-behavior: contain; 20 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 21 padding-left: `.concat(o,`px; 22 padding-top: `).concat(a,`px; 23 padding-right: `).concat(l,`px; 24 margin-left:0; 25 margin-top:0; 26 margin-right: `).concat(u,"px ").concat(r,`; 27 `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";
27")].filter(Boolean).join(""),` 28 } 29 30 .`).concat($u,` { 31 right: `).concat(u,"px ").concat(r,`; 32 } 33 34 .`).concat(Fu,` { 35 margin-right: `).concat(u,"px ").concat(r,`; 36 } 37 38 .`).concat($u," .").concat($u,` { 39 right: 0 `).concat(r,`; 40 } 41 42 .`).concat(Fu," .").concat(Fu,` { 43 margin-right: 0 `).concat(r,`; 44 } 45 46 body[`).concat(Bi,`] { 47 `).concat(UI,": ").concat(u,`px; 48 } 49`)},y0=function(){var e=parseInt(document.body.getAttribute(Bi)||"0",10);return isFinite(e)?e:0},oD=function(){y.useEffect(function(){return document.body.setAttribute(Bi,(y0()+1).toString()),function(){var e=y0()-1;e<=0?document.body.removeAttribute(Bi):document.body.setAttribute(Bi,e.toString())}},[])},iD=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;oD();var a=y.useMemo(function(){return nD(o)},[o]);return y.createElement(rD,{styles:sD(a,!t,o,n?"":"!important")})},nm=!1;if(typeof window<"u")try{var pu=Object.defineProperty({},"passive",{get:function(){return nm=!0,!0}});window.addEventListener("test",pu,pu),window.removeEventListener("test",pu,pu)}catch{nm=!1}var Si=nm?{passive:!1}:!1,aD=function(e){return e.tagName==="TEXTAREA"},TS=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!aD(e)&&n[t]==="visible")},lD=function(e){return TS(e,"overflowY")},cD=function(e){return TS(e,"overflowX")},v0=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=CS(e,r);if(o){var a=RS(e,r),l=a[1],u=a[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},uD=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},dD=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},CS=function(e,t){return e==="v"?lD(t):cD(t)},RS=function(e,t){return e==="v"?uD(t):dD(t)},fD=function(e,t){return e==="h"&&t==="rtl"?-1:1},hD=function(e,t,n,r,o){var a=fD(e,window.getComputedStyle(t).direction),l=a*r,u=n.target,f=t.contains(u),h=!1,m=l>0,g=0,b=0;do{if(!u)break;var w=RS(e,u),E=w[0],x=w[1],S=w[2],T=x-S-a*E;(E||T)&&CS(e,u)&&(g+=T,b+=E);var k=u.parentNode;u=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(m&&Math.abs(g)<1||!m&&Math.abs(b)<1)&&(h=!0),h},mu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},w0=function(e){return[e.deltaX,e.deltaY]},b0=function(e){return e&&"current"in e?e.current:e},pD=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mD=function(e){return` 50 .block-interactivity-`.concat(e,` {pointer-events: none;} 51 .allow-interactivity-`).concat(e,` {pointer-events: all;} 52`)},gD=0,Ei=[];function yD(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),o=y.useState(gD++)[0],a=y.useState(kS)[0],l=y.useRef(e);y.useEffect(function(){l.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var x=$I([e.lockRef.current],(e.shards||[]).map(b0),!0).filter(Boolean);return x.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),x.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=y.useCallback(function(x,S){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!l.current.allowPinchZoom;var T=mu(x),k=n.current,C="deltaX"in x?x.deltaX:k[0]-T[0],j="deltaY"in x?x.deltaY:k[1]-T[1],O,M=x.target,D=Math.abs(C)>Math.abs(j)?"h":"v";if("touches"in x&&D==="h"&&M.type==="range")return!1;var q=v0(D,M);if(!q)return!0;if(q?O=D:(O=D==="v"?"h":"v",q=v0(D,M)),!q)return!1;if(!r.current&&"changedTouches"in x&&(C||j)&&(r.current=O),!O)return!0;var J=r.current||O;return hD(J,S,x,J==="h"?C:j)},[]),f=y.useCallback(function(x){var S=x;if(!(!Ei.length||Ei[Ei.length-1]!==a)){var T="deltaY"in S?w0(S):mu(S),k=t.current.filter(function(O){return O.name===S.type&&(O.target===S.target||S.target===O.shadowParent)&&pD(O.delta,T)})[0];if(k&&k.should){S.cancelable&&S.preventDefault();return}
vendor: 4,333 bytes, line 52
52if(!k){var C=(l.current.shards||[]).map(b0).filter(Boolean).filter(function(O){return O.contains(S.target)}),j=C.length>0?u(S,C[0]):!l.current.noIsolation;j&&S.cancelable&&S.preventDefault()}}},[]),h=y.useCallback(function(x,S,T,k){var C={name:x,delta:S,target:T,should:k,shadowParent:vD(T)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(j){return j!==C})},1)},[]),m=y.useCallback(function(x){n.current=mu(x),r.current=void 0},[]),g=y.useCallback(function(x){h(x.type,w0(x),x.target,u(x,e.lockRef.current))},[]),b=y.useCallback(function(x){h(x.type,mu(x),x.target,u(x,e.lockRef.current))},[]);y.useEffect(function(){return Ei.push(a),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:b}),document.addEventListener("wheel",f,Si),document.addEventListener("touchmove",f,Si),document.addEventListener("touchstart",m,Si),function(){Ei=Ei.filter(function(x){return x!==a}),document.removeEventListener("wheel",f,Si),document.removeEventListener("touchmove",f,Si),document.removeEventListener("touchstart",m,Si)}},[]);var w=e.removeScrollBar,E=e.inert;return y.createElement(y.Fragment,null,E?y.createElement(a,{styles:mD(o)}):null,w?y.createElement(iD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function vD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wD=GI(ES,yD);var dg=y.forwardRef(function(e,t){return y.createElement(Pd,Kr({},e,{ref:t,sideCar:wD}))});dg.classNames=Pd.classNames;var bD=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ki=new WeakMap,gu=new WeakMap,yu={},ap=0,AS=function(e){return e&&(e.host||AS(e.parentNode))},xD=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=AS(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},_D=function(e,t,n,r){var o=xD(t,Array.isArray(e)?e:[e]);yu[n]||(yu[n]=new WeakMap);var a=yu[n],l=[],u=new Set,f=new Set(o),h=function(g){!g||u.has(g)||(u.add(g),h(g.parentNode))};o.forEach(h);var m=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(b){if(u.has(b))m(b);else try{var w=b.getAttribute(r),E=w!==null&&w!=="false",x=(ki.get(b)||0)+1,S=(a.get(b)||0)+1;ki.set(b,x),a.set(b,S),l.push(b),x===1&&E&&gu.set(b,!0),S===1&&b.setAttribute(n,"true"),E||b.setAttribute(r,"true")}catch(T){console.error("aria-hidden: cannot operate on ",b,T)}})};return m(t),u.clear(),ap++,function(){l.forEach(function(g){var b=ki.get(g)-1,w=a.get(g)-1;ki.set(g,b),a.set(g,w),b||(gu.has(g)||g.removeAttribute(r),gu.delete(g)),w||g.removeAttribute(n)}),ap--,ap||(ki=new WeakMap,ki=new WeakMap,gu=new WeakMap,yu={})}},jS=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=bD(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),_D(r,o,n,"aria-hidden")):function(){return null}},Nd="Dialog",[PS,wB]=Es(Nd),[SD,Ir]=PS(Nd),NS=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:l=!0}=e,u=y.useRef(null),f=y.useRef(null),[h,m]=Xi({prop:r,defaultProp:o??!1,onChange:a,caller:Nd});return d.jsx(SD,{scope:t,triggerRef:u,contentRef:f,contentId:No(),titleId:No(),descriptionId:No(),open:h,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(g=>!g),[m]),modal:l,children:n})};NS.displayName=Nd;var OS="DialogTrigger",IS=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ir(OS,n),a=xt(t,o.triggerRef);return d.jsx(Ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":pg(o.open),...r,ref:a,onClick:Re(e.onClick,o.onOpenToggle)})});IS.displayName=OS;var fg="DialogPortal",[ED,DS]=PS(fg,{forceMount:void 0}),LS=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Ir(fg,t);return d.jsx(ED,{scope:t,forceMount:n,children:y.Children.map(r,l=>d.jsx(Xr,{present:n||a.open,children:d.jsx(gd,{asChild:!0,container:o,children:l})}))})};LS.displayName=fg;var Xu="DialogOverlay",MS=y.forwardRef((e,t)=>{const n=DS(Xu,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ir(Xu,e.__scopeDialog);return a.modal?d.jsx(Xr,{present:r||a.open,children:d.jsx(TD,{...o,ref:t})}):null});MS.displayName=Xu;var kD=qi("DialogOverlay.RemoveScroll"),TD=y.forwardRef((e,t)=>
vendor: 4,514 bytes, lines 52-56
52{const{__scopeDialog:n,...r}=e,o=Ir(Xu,n);return d.jsx(dg,{as:kD,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(Ze.div,{"data-state":pg(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),zo="DialogContent",$S=y.forwardRef((e,t)=>{const n=DS(zo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ir(zo,e.__scopeDialog);return d.jsx(Xr,{present:r||a.open,children:a.modal?d.jsx(CD,{...o,ref:t}):d.jsx(RD,{...o,ref:t})})});$S.displayName=zo;var CD=y.forwardRef((e,t)=>{const n=Ir(zo,e.__scopeDialog),r=y.useRef(null),o=xt(t,n.contentRef,r);return y.useEffect(()=>{const a=r.current;if(a)return jS(a)},[]),d.jsx(FS,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Re(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Re(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&a.preventDefault()}),onFocusOutside:Re(e.onFocusOutside,a=>a.preventDefault())})}),RD=y.forwardRef((e,t)=>{const n=Ir(zo,e.__scopeDialog),r=y.useRef(!1),o=y.useRef(!1);return d.jsx(FS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=a.target;n.triggerRef.current?.contains(l)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),FS=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...l}=e,u=Ir(zo,n),f=y.useRef(null),h=xt(t,f);return _S(),d.jsxs(d.Fragment,{children:[d.jsx(ug,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(Ul,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":pg(u.open),...l,ref:h,onDismiss:()=>u.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(AD,{titleId:u.titleId}),d.jsx(PD,{contentRef:f,descriptionId:u.descriptionId})]})]})}),hg="DialogTitle",US=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ir(hg,n);return d.jsx(Ze.h2,{id:o.titleId,...r,ref:t})});US.displayName=hg;var zS="DialogDescription",BS=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ir(zS,n);return d.jsx(Ze.p,{id:o.descriptionId,...r,ref:t})});BS.displayName=zS;var HS="DialogClose",VS=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ir(HS,n);return d.jsx(Ze.button,{type:"button",...r,ref:t,onClick:Re(e.onClick,()=>o.onOpenChange(!1))})});VS.displayName=HS;function pg(e){return e?"open":"closed"}var WS="DialogTitleWarning",[bB,qS]=kC(WS,{contentName:zo,titleName:hg,docsSlug:"dialog"}),AD=({titleId:e})=>{const t=qS(WS),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 53 54If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 55 56For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},jD="DialogDescriptionWarning",PD=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qS(jD).contentName}}.`;return y.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},GS=NS,KS=IS,YS=LS,Od=MS,Id=$S,Dd=US,Ld=BS,QS=VS;const mg=GS,xB=KS,ND=YS,JS=y.forwardRef(({className:e,...t},n)=>d.jsx(Od,{ref:n,className:Le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));JS.displayName=Od.displayName;const Md=y.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(ND,{children:[d.jsx(JS,{}),d.jsxs(Id,{ref:r,className:Le("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
56nded-lg",e),...n,children:[t,d.jsxs(QS,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[d.jsx(Zi,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Md.displayName=Id.displayName;const gg=({className:e,...t})=>d.jsx("div",{className:Le("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});gg.displayName="DialogHeader";const yg=({className:e,...t})=>d.jsx("div",{className:Le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});yg.displayName="DialogFooter";const $d=y.forwardRef(({className:e,...t},n)=>d.jsx(Dd,{ref:n,className:Le("text-lg font-semibold leading-none tracking-tight",e),...t}));$d.displayName=Dd.displayName;const Fd=y.forwardRef(({className:e,...t},n)=>d.jsx(Ld,{ref:n,className:Le("text-sm text-muted-foreground",e),...t}));Fd.displayName=Ld.displayName;function OD(){const{consent:e,hasInteracted:t,setConsent:n,acceptAll:r,rejectAll:o}=cg(),[a,l]=y.useState(!1),[u,f]=y.useState(e.analytics),[h,m]=y.useState(e.marketing);if(t)return null;const g=()=>{n({analytics:u,marketing:h}),l(!1)},b=()=>{f(e.analytics),m(e.marketing),l(!0)};return d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-50 p-4 bg-background border-t border-border shadow-lg",children:d.jsx("div",{className:"container mx-auto max-w-4xl",children:d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(TR,{className:"h-6 w-6 text-primary flex-shrink-0 mt-0.5"}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("h3",{className:"font-semibold text-foreground",children:"We use cookies"}),d.jsxs("p",{className:"text-sm text-muted-foreground",children:["We use cookies to improve your experience on our site and to show you relevant content. Some cookies are essential for the site to work, while others help us understand how you use our site or enable marketing features."," ",d.jsx(Ae,{to:"/cookie-policy",className:"text-primary hover:underline",children:"Read our Cookie Policy"})]})]})]}),d.jsxs("div",{className:"flex flex-wrap gap-2 justify-end",children:[d.jsxs(Ce,{variant:"outline",size:"sm",onClick:b,className:"gap-2",children:[d.jsx(Hx,{className:"h-4 w-4"}),"Manage Preferences"]}),d.jsx(Ce,{variant:"outline",size:"sm",onClick:o,children:"Reject All"}),d.jsx(Ce,{size:"sm",onClick:r,children:"Accept All"})]})]})})}),d.jsx(mg,{open:a,onOpenChange:l,children:d.jsxs(Md,{className:"sm:max-w-md",children:[d.jsxs(gg,{children:[d.jsx($d,{children:"Cookie Preferences"}),d.jsx(Fd,{children:"Choose which cookies you want to accept. Essential cookies are always enabled as they are necessary for the site to function."})]}),d.jsxs("div",{className:"space-y-6 py-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"space-y-0.5",children:[d.jsx(Io,{className:"font-medium",children:"Essential Cookies"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Required for the website to function. Cannot be disabled."})]}),d.jsx(Oo,{checked:!0,disabled:!0})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"space-y-0.5",children:[d.jsx(Io,{htmlFor:"analytics",className:"font-medium",children:"Analytics Cookies"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Help us understand how visitors use our website (Google Analytics)."})]}),d.jsx(Oo,{id:"analytics",checked:u,onCheckedChange:f})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"space-y-0.5",children:[d.jsx(Io,{htmlFor:"marketing",className:"font-medium",children:"Marketing Cookies"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Used to show you relevant advertisements (Meta Pixel)."})]}),d.jsx(Oo,{id:"marketing",checked:h,onCheckedChange:m})]})]}),d.jsxs(yg,{className:"gap-2 sm:gap-0",children:[d.jsx(Ce,{variant:"outline",onClick:()=>l(!1),children:"Cancel"}),d.jsx(Ce,{onClick:g,children:"Save Preferences"})]})]})})]})}function ID(){const{consent:e,setConsent:t,resetConsent:n}=cg(),[r,o]=y.useState(!1),[a,l]=y.useState(e.analytics),[u,f]=y.useState(e.marketing),h=()=>{l(e.analytics),f(e.marketing),o(!0)},m=()=>{t({analytics:a,marketing:u}),o(!1),window.location.reload()};return d.jsxs(d.Fragment,{children:[d.jsx("button",{onClick:h,className:"text-muted-foreground hover:text-primary transition-colors text-sm",children:"Cookie Settings"}),d.jsx(mg,{open:r,onOpenChange:o,children:d.jsxs(Md,{className:"sm:max-w-md",children:[d.jsxs(gg,{children:[d.jsx($d,{children:"Cookie Preferences"}),d.jsx(Fd,{children:"Update your cookie preferences. Changes will take effect immediately."})]}),d.jsxs("div",{className:"space-y-6 py-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"space-y-0.5",children:[d.jsx(Io,{className:"font-medium",children:"Essential Cookies"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Required for the website to function. Cannot be disabled."})]}),d.jsx(Oo,{checked:!0,disabled:!0})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"space-y-0.5",children:[d.jsx(Io,{htmlFor:"analytics-settings",className:"font-medium",children:"Analytics Co
56okies"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Help us understand how visitors use our website (Google Analytics)."})]}),d.jsx(Oo,{id:"analytics-settings",checked:a,onCheckedChange:l})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"space-y-0.5",children:[d.jsx(Io,{htmlFor:"marketing-settings",className:"font-medium",children:"Marketing Cookies"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Used to show you relevant advertisements (Meta Pixel)."})]}),d.jsx(Oo,{id:"marketing-settings",checked:u,onCheckedChange:f})]})]}),d.jsxs(yg,{className:"gap-2 sm:gap-0",children:[d.jsx(Ce,{variant:"outline",onClick:()=>o(!1),children:"Cancel"}),d.jsx(Ce,{onClick:m,children:"Save Preferences"})]})]})})]})}const DD="The Abbey Theatre",LD=({children:e})=>{const t=Vt(),{consent:n}=cg(),r=y.useRef(!1),o=y.useRef(!1);y.useEffect(()=>{n.analytics&&!r.current&&(lI(),r.current=!0),n.marketing&&!o.current&&(cI(),o.current=!0),uI()},[n.analytics,n.marketing]),y.useEffect(()=>{if(!(n.analytics&&r.current)&&!(n.marketing&&o.current))return;const l=t.pathname+t.search,u=document.title;let f=!1,h=null;const m=w=>{f||(f=!0,h&&h.disconnect(),dI(l,w||document.title))},g=window.setTimeout(()=>m(),600),b=document.querySelector("title");return b&&(h=new MutationObserver(()=>{const w=document.title;!w||w===u||w===DD||(window.clearTimeout(g),m(w))}),h.observe(b,{childList:!0})),()=>{window.clearTimeout(g),h&&h.disconnect()}},[t.pathname,t.search,n.analytics,n.marketing]);const a=t.pathname.startsWith("/screen/");return d.jsxs(d.Fragment,{children:[e,!a&&d.jsx(OD,{})]})},MD=()=>{const{pathname:e}=Vt();return y.useEffect(()=>{window.scrollTo(0,0)},[e]),null},vu="inAppBrowserBannerDismissed";function $D(){try{const e="__storage_test__";return localStorage.setItem(e,"1"),localStorage.removeItem(e),!1}catch{return!0}}function FD(){if(typeof navigator>"u")return!1;const e=navigator.userAgent||"";return/(FBAN|FBAV|FB_IAB|FBIOS|Messenger|Instagram|TikTok|musical_ly|Bytedance|LinkedInApp|Twitter|Snapchat|MicroMessenger|Line\/)/i.test(e)}function UD(){const[e,t]=y.useState(!1),[n,r]=y.useState(!1);y.useEffect(()=>{const a=$D(),l=FD();if(!a&&!l)return;let u=!1;if(a)u=document.cookie.includes(`${vu}=1`);else try{u=localStorage.getItem(vu)==="1"}catch{}r(a),t(!u)},[]);function o(){t(!1);try{localStorage.setItem(vu,"1")}catch{document.cookie=`${vu}=1; path=/; max-age=86400; SameSite=Lax`}}return e?d.jsxs("div",{role:"alert",className:"w-full bg-destructive text-destructive-foreground px-4 py-2 text-sm flex items-start gap-3",children:[d.jsx(FR,{className:"h-4 w-4 flex-shrink-0 mt-0.5","aria-hidden":"true"}),d.jsxs("div",{className:"flex-1",children:[d.jsx("strong",{className:"font-semibold",children:"Limited browser detected."})," ",n?"Some features (booking, quizzes, sign-in) may not work here.":"You appear to be using an in-app browser (Facebook, Messenger, Instagram, etc.)."," ","For the best experience, please open this site in your normal browser (Safari, Chrome, etc.) â usually via the menu (â¯) â"," ",d.jsx("em",{children:"Open in browser"}),"."]}),d.jsx("button",{type:"button",onClick:o,"aria-label":"Dismiss warning",className:"flex-shrink-0 p-1 hover:bg-destructive-foreground/10 rounded",children:d.jsx(Zi,{className:"h-4 w-4"})})]}):null}const zD=["lovable.app","lovable.dev","localhost","dev.theabbeytheatre.com","dev.abbeytheatre.co.uk","theabbeytheatre.com"],BD=["abbeytheatre.co.uk","www.abbeytheatre.co.uk","new.abbeytheatre.co.uk","mango-hill-0692ca103.6.azurestaticapps.net"];function aa(){if(typeof window>"u")return"development";const e=window.location.hostname;return zD.some(t=>e.includes(t))?"development":BD.some(t=>e.includes(t))?"production":"development"}function HD(){return aa()==="production"?{url:"https://api.theabbeytheatre.com",anonKey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzQ0ODI4MjAwLCJleHAiOjE5MDI1OTQ2MDB9.NX9ga1ZMUaCCDxZuabZLZTEzY8V019GoX7A4p-JF-PY"}:{url:"https://yfbtyrteodefbwqqedmo.supabase.co",anonKey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InlmYnR5cnRlb2RlZmJ3cXFlZG1vIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjExNTIzMTksImV4cCI6MjA3NjcyODMxOX0.pako7AFdVIu3ocCLnmGO55Q3XwP0MVIbBXG9BLqbyDQ"}}function Zu(){return aa()==="production"}function XS(){return aa()==="development"}function _B(){return aa()==="production"?"https://www.abbeytheatre.co.uk":typeof window<"u"?window.location.origin:"https://www.abbeytheatre.co.uk"}const x0="abbey-dev-notice-dismissed",VD="https://www.abbeytheatre.co.uk",WD=()=>{const e=Vt(),[t,n]=y.useState(!1);y.useEffect(()=>{if(!Zu()&&!(typeof window>"u")){try{if(window.sessionStorage.getItem(x0)==="1")return}catch{}n(!0)}},[]);const r=()=>{try{window.sessionStorage.setItem(x0,"1")}catch{}n(!1)},o=()=>{const a=`${e.pathname}${e.search}`,l=`${VD}${a==="/"?"":a}`;if(typeof window<"u"&&window.self!==window.top){window.open(l,"_blank","noopener,noreferrer"),r();return}window.location.href=l};return Zu()?null:t&&d.jsx("aside",{role:"dialog","aria-modal":"false","aria-labelledby":"dev-site-notice-title","aria-describedby":"dev-site-notice-description",className:"fixed inset-x-4 top-4 z-[100] mx-auto max-w-xl border border-border bg-background p-5 shadow-2xl sm:top-6",children:d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("h2",{id:"dev-site-notice-title",className:"text-lg font-semibold text-foreground",children:"You're on the test site"}),d.jsxs("p",{id:"dev-site-notice-description",className:"text-sm text-muted-foreground",children:['This is a development version of The Abbey Theatre website. Shows, prices and bookings here are for testing only and any tickets you "buy" will not be valid.',d.jsx("br",{}),d.jsx("br",{}),"To book real tickets, please visit our live site at"," ",d.jsx("strong",{className:"text-foreground",children:"www.abbeytheatre.co.uk"}),"."]})]}),d.jsxs("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[d.jsx(Ce,{variant:"outline",onClick:r,children:"Stay on the test site"}),d.jsx(Ce,{onClick:o,children:"Go to the live site"})]})]})})},qD=Symbol.for("@supabase/supabase-js.traceContextExtractor");function GD(){return globalThis[qD]}const KD=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);
56class vg extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class YD extends vg{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class _0 extends vg{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class S0 extends vg{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var rm;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(rm||(rm={}));class QD{constructor(t,{headers:n={},customFetch:r,region:o=rm.Any}={}){this.url=t,this.headers=n,this.region=o,this.fetch=KD(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return MI(this,arguments,void 0,function*(n,r={}){var o,a;let l,u,f;try{const{headers:h,method:m,body:g,signal:b,timeout:w}=r;let E={},{region:x}=r;x||(x=this.region);const S=new URL(`${this.url}/${n}`);x&&x!=="any"&&(E["x-region"]=x,S.searchParams.set("forceFunctionRegion",x));let T;const k=!!h&&Object.keys(h).some(q=>q.toLowerCase()==="content-type");g&&!k?typeof Blob<"u"&&g instanceof Blob||g instanceof ArrayBuffer?(E["Content-Type"]="application/octet-stream",T=g):typeof g=="string"?(E["Content-Type"]="text/plain",T=g):typeof FormData<"u"&&g instanceof FormData?T=g:(E["Content-Type"]="application/json",T=JSON.stringify(g)):g&&typeof g!="string"&&!(typeof Blob<"u"&&g instanceof Blob)&&!(g instanceof ArrayBuffer)&&!(typeof FormData<"u"&&g instanceof FormData)?T=JSON.stringify(g):T=g;let C=b;w&&(u=new AbortController,l=setTimeout(()=>u.abort(),w),b?(C=u.signal,f=()=>u.abort(),b.addEventListener("abort",f)):C=u.signal);const j=yield this.fetch(S.toString(),{method:m||"POST",headers:Object.assign(Object.assign(Object.assign({},E),this.headers),h),body:T,signal:C}).catch(q=>{throw new YD(q)}),O=j.headers.get("x-relay-error");if(O&&O==="true")throw new _0(j);if(!j.ok)throw new S0(j);let M=((o=j.headers.get("Content-Type"))!==null&&o!==void 0?o:"text/plain").split(";")[0].trim().toLowerCase(),D;return M==="application/json"?D=yield j.json():M==="application/octet-stream"||M==="application/pdf"?D=yield j.blob():M==="text/event-stream"?D=j:M==="multipart/form-data"?D=yield j.formData():D=yield j.text(),{data:D,error:null,response:j}}catch(h){return{data:null,error:h,response:h instanceof S0||h instanceof _0?h.context:void 0}}finally{l&&clearTimeout(l),f&&((a=r.signal)===null||a===void 0||a.removeEventListener("abort",f))}})}}const ZS=3,E0=e=>Math.min(1e3*2**e,3e4),JD=[520,503],eE=["GET","HEAD","OPTIONS"];var lp=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
56de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Sl(e){"@babel/helpers - typeof";return Sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sl(e)}function XD(e,t){if(Sl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ZD(e){var t=XD(e,"string");return Sl(t)=="symbol"?t:t+""}function e2(e,t,n){return(t=ZD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Di(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k0(Object(n),!0).forEach(function(r){e2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function T0(e,t){return new Promise(n=>{if(t?.aborted){n();return}const r=setTimeout(()=>{t?.removeEventListener("abort",o),n()},e);function o(){clearTimeout(r),n()}t?.addEventListener("abort",o)})}function t2(e,t,n,r){return!(!r||n>=ZS||!eE.includes(e)||!JD.includes(t))}var n2=class{constructor(e){var t,n,r,o,a;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=e.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(o=e.urlLengthLimit)!==null&&o!==void 0?o:8e3,this.retryEnabled=(a=e.retry)!==null&&a!==void 0?a:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const l=this.headers.get("Accept");l==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!l||l==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let a=(async()=>{let l=0;for(;;){const h={};n.headers.forEach((g,b)=>{h[b]=g}),l>0&&(h["X-Retry-Count"]=String(l));let m;try{m=await r(n.url.toString(),{method:n.method,headers:h,body:JSON.stringify(n.body,(g,b)=>typeof b=="bigint"?b.toString():b),signal:n.signal})}catch(g){if(g?.name==="AbortError"||g?.code==="ABORT_ERR"||!eE.includes(n.method))throw g;if(n.retryEnabled&&l<ZS){const b=E0(l);l++,await T0(b,n.signal);continue}throw g}if(t2(n.method,m.status,l,n.retryEnabled)){var u,f;const g=(u=(f=m.headers)===null||f===void 0?void 0:f.get("Retry-After"))!==null&&u!==void 0?u:null,b=g!==null?Math.max(0,parseInt(g,10)||0)*1e3:E0(l);await m.text(),l++,await T0(b,n.signal);continue}return await n.processResponse(m)}})();return this.shouldThrowOnError||(a=a.catch(l=>{var u;let f="",h="",m="";const g=l?.cause;if(g){var b,w,E,x;const k=(b=g?.message)!==null&&b!==void 0?b:"",C=(w=g?.code)!==null&&w!==void 0?w:"";f=`${(E=l?.name)!==null&&E!==void 0?E:"FetchError"}: ${l?.message}`,f+=` 57 58Caused by: ${(x=g?.name)!==null&&x!==void 0?x:"Error"}: ${k}`,C&&(f+=` (${C})`),g?.stack&&(f+=` 59${g.stack}`)}else{var S;f=(S=l?.stack)!==null&&S!==void 0?S:""}const T=this.url.toString().length;return l?.name==="AbortError"||l?.code==="ABORT_ERR"?(m="",h="Request was aborted (timeout or manual cancellation)",T>this.urlLengthLimit&&(h+=`. Note: Your request URL is ${T} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(g?.name==="HeadersOverflowError"||g?.code==="UND_ERR_HEADERS_OVERFLOW")&&(m="",h="HTTP headers exceeded server limits (typically 16KB)",T>this.urlLengthLimit&&(h+=`. Your request URL is ${T} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(u=l?.name)!==null&&u!==void 0?u:"FetchError"}: ${l?.message}`,details:f,hint:h,code:m},data:null,count:null,status:0,statusText:""}}
59)),a.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,o=null,a=e.status,l=e.statusText;if(e.ok){var u,f;if(t.method!=="HEAD"){var h;const w=await e.text();if(w!=="")if(t.headers.get("Accept")==="text/csv")r=w;else if(t.headers.get("Accept")&&(!((h=t.headers.get("Accept"))===null||h===void 0)&&h.includes("application/vnd.pgrst.plan+text")))r=w;else try{r=JSON.parse(w)}catch{if(n={message:w},r=null,t.shouldThrowOnError)throw new lp({message:w,details:"",hint:"",code:""})}}const g=(u=t.headers.get("Prefer"))===null||u===void 0?void 0:u.match(/count=(exact|planned|estimated)/),b=(f=e.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");if(g&&b&&b.length>1&&(o=parseInt(b[1])),t.isMaybeSingle&&Array.isArray(r))if(r.length>1){if(n={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,o=null,a=406,l="Not Acceptable",t.shouldThrowOnError){var m;throw new lp(Di(Di({},n),{},{hint:(m=n.hint)!==null&&m!==void 0?m:""}))}}else r.length===1?r=r[0]:r=null}else{const g=await e.text();try{n=JSON.parse(g),Array.isArray(n)&&e.status===404&&(r=[],n=null,a=200,l="OK")}catch{e.status===404&&g===""?(a=204,l="No Content"):n={message:g}}if(n&&t.shouldThrowOnError)throw new lp(n)}return{success:n===null,error:n,data:r,count:o,status:a,statusText:l}}returns(){return this}overrideTypes(){return this}},r2=class extends n2{throwOnError(){return super.throwOnError()}select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:o=r}={}){const a=o?`${o}.order`:"order",l=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${l?`${l},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const o=typeof r>"u"?"offset":`${r}.offset`,a=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(o,`${e}`),this.url.searchParams.set(a,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:o=!1,format:a="text"}={}){var l;const u=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,o?"wal":null].filter(Boolean).join("|"),f=(l=this.headers.get("Accept"))!==null&&l!==void 0?l:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${a}; for="${f}"; options=${u};`),a==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const C0=new RegExp("[,()]");var Pi=class extends r2{throwOnError(){return super.throwOnError()}eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&C0.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&C0.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let o="";r==="plain"?o="pl":r==="phrase"?o="ph":r==="websearch"&&(o="w");const a=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${o}fts${a}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>
59n!==void 0).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},s2=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:o=8e3,retry:a}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=o,this.retry=a}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},o=n?"HEAD":"GET";let a=!1;const l=(e??"*").split("").map(h=>/\s/.test(h)&&!a?"":(h==='"'&&(a=!a),h)).join(""),{url:u,headers:f}=this.cloneRequestState();return u.searchParams.set("select",l),r&&f.append("Prefer",`count=${r}`),new Pi({method:o,url:u,headers:f,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(t&&l.append("Prefer",`count=${t}`),n||l.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((f,h)=>f.concat(Object.keys(h)),[]);if(u.length>0){const f=[...new Set(u)].map(h=>`"${h}"`);a.searchParams.set("columns",f.join(","))}}return new Pi({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:o=!0}={}){var a;const l="POST",{url:u,headers:f}=this.cloneRequestState();if(f.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&u.searchParams.set("on_conflict",t),r&&f.append("Prefer",`count=${r}`),o||f.append("Prefer","missing=default"),Array.isArray(e)){const h=e.reduce((m,g)=>m.concat(Object.keys(g)),[]);if(h.length>0){const m=[...new Set(h)].map(g=>`"${g}"`);u.searchParams.set("columns",m.join(","))}}return new Pi({method:l,url:u,headers:f,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var n;const r="PATCH",{url:o,headers:a}=this.cloneRequestState();return t&&a.append("Prefer",`count=${t}`),new Pi({method:r,url:o,headers:a,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:o}=this.cloneRequestState();return e&&o.append("Prefer",`count=${e}`),new Pi({method:n,url:r,headers:o,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}},o2=class tE{constructor(t,{headers:n={},schema:r,fetch:o,timeout:a,urlLengthLimit:l=8e3,retry:u}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=l;const f=o??globalThis.fetch;a!==void 0&&a>0?this.fetch=(h,m)=>{const g=new AbortController,b=setTimeout(()=>g.abort(),a),w=m?.signal;if(w){if(w.aborted)return clearTimeout(b),f(h,m);const E=()=>{clearTimeout(b),g.abort()};return w.addEventListener("abort",E,{once:!0}),f(h,Di(Di({},m),{},{signal:g.signal})).finally(()=>{clearTimeout(b),w.removeEventListener("abort",E)})}return f(h,Di(Di({},m),{},{signal:g.signal})).finally(()=>clearTimeout(b))}:this.fetch=f,this.retry=u}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new s2(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new tE(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,n={},{head:r=!1,get:o=!1,count:a}={}){var l;let u;const f=new URL(`${this.url}/rpc/${t}`);let h;const m=w=>w!==null&&typeof w=="object"&&(!Array.isArray(w)||w.some(m)),g=r&&Object.values(n).some(m);g?(u="POST",h=n):r||o?(u=r?"HEAD":"GET",Object.entries(n).filter(([w,E])=>E!==void 0).map(([w,E])=>[w,Array.isArray(E)?`{${E.join(",")}}`:`${E}
59`]).forEach(([w,E])=>{f.searchParams.append(w,E)})):(u="POST",h=n);const b=new Headers(this.headers);return g?b.set("Prefer",a?`count=${a},return=minimal`:"return=minimal"):a&&b.set("Prefer",`count=${a}`),new Pi({method:u,url:f,headers:b,schema:this.schemaName,body:h,fetch:(l=this.fetch)!==null&&l!==void 0?l:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class i2{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const r=typeof global<"u"?global:void 0;if(r&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};if(typeof globalThis<"u"&&typeof n.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&n.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const o=globalThis.process;if(o){const a=o.versions;if(a&&a.node)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=` 60 61Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const a2="2.112.4",l2=`realtime-js/${a2}`,c2="1.0.0",nE="2.0.0",u2=nE,d2=1e4,f2=100,Qs={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},rE={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},sm={connecting:"connecting",closing:"closing",closed:"closed"};class h2{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const o=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,o)}_encodeJsonUserBroadcastPush(t){var n,r;const o=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},l=new TextEncoder().encode(JSON.stringify(o)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,l)}_encodeUserBroadcastPush(t,n,r){var o,a;const l=new TextEncoder,u=l.encode(t.topic),f=l.encode((o=t.ref)!==null&&o!==void 0?o:""),h=l.encode((a=t.join_ref)!==null&&a!==void 0?a:""),m=l.encode(t.payload.event),g=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},b=l.encode(Object.keys(g).length===0?"":JSON.stringify(g));if(h.length>255)throw new Error(`joinRef length ${h.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`ref length ${f.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`topic length ${u.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`userEvent length ${m.length} exceeds maximum of 255`);if(b.length>255)throw new Error(`metadata length ${b.length} exceeds maximum of 255`);const w=this.USER_BROADCAST_PUSH_META_LENGTH+h.length+f.length+u.length+m.length+b.length,E=new ArrayBuffer(this.HEADER_LENGTH+w),x=new DataView(E),S=new Uint8Array(E);let T=0;x.setUint8(T++,this.KINDS.userBroadcastPush),x.setUint8(T++,h.length),x.setUint8(T++,f.length),x.setUint8(T++,u.length),x.setUint8(T++,m.length),x.setUint8(T++,b.length),x.setUint8(T++,n),S.set(h,T),T+=h.length,S.set(f,T),T+=f.length,S.set(u,T),T+=u.length,S.set(m,T),T+=m.length,S.set(b,T),T+=b.length;var k=new Uint8Array(E.byteLength+r.byteLength);return k.set(new Uint8Array(E),0),k.set(new Uint8Array(r),E.byteLength),k.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[o,a,l,u,f]=r;
61return n({join_ref:o,ref:a,topic:l,event:u,payload:f})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),o=new TextDecoder;if(r===this.KINDS.userBroadcast)return this._decodeUserBroadcast(t,n,o)}_decodeUserBroadcast(t,n,r){const o=n.getUint8(1),a=n.getUint8(2),l=n.getUint8(3),u=n.getUint8(4);let f=this.HEADER_LENGTH+4;const h=r.decode(t.slice(f,f+o));f=f+o;const m=r.decode(t.slice(f,f+a));f=f+a;const g=r.decode(t.slice(f,f+l));f=f+l;const b=t.slice(f,t.byteLength),w=u===this.JSON_ENCODING?JSON.parse(r.decode(b)):b,E={type:this.BROADCAST_EVENT,event:m,payload:w};return l>0&&(E.meta=JSON.parse(g)),{join_ref:null,ref:null,topic:h,event:this.BROADCAST_EVENT,payload:E}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t?.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}var it;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(it||(it={}));const R0=(e,t,n={})=>{var r;const o=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((a,l)=>(a[l]=p2(l,e,t,o),a),{}):{}},p2=(e,t,n,r)=>{const o=t.find(u=>u.name===e),a=o?.type,l=n[e];return a&&!r.includes(a)?sE(a,l):om(l)},sE=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return v2(t,n)}switch(e){case it.bool:return m2(t);case it.float4:case it.float8:case it.int2:case it.int4:case it.int8:case it.numeric:case it.oid:return g2(t);case it.json:case it.jsonb:return y2(t);case it.timestamp:return w2(t);case it.abstime:case it.date:case it.daterange:case it.int4range:case it.int8range:case it.money:case it.reltime:case it.text:case it.time:case it.timestamptz:case it.timetz:case it.tsrange:case it.tstzrange:return om(t);default:return om(t)}},om=e=>e,m2=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},g2=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},y2=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},v2=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let a;const l=e.slice(1,n);try{a=JSON.parse("["+l+"]")}catch{a=l?l.split(","):[]}return a.map(u=>sE(t,u))}return e},w2=e=>typeof e=="string"?e.replace(" ","T"):e,oE=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var Hi=e=>typeof e=="function"?e:function(){return e},b2=typeof self<"u"?self:null,Ni=typeof window<"u"?window:null,qr=b2||Ni||globalThis,x2="2.0.0",_2=1e4,S2=1e3,E2=100,Gr={connecting:0,open:1,closing:2,closed:3},Nn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},ms={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},im={longpoll:"longpoll",websocket:"websocket"},k2={complete:4},am="base64url.bearer.phx.",wu=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}
vendor: 4,576 bytes, line 61
61matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},iE=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},T2=class{constructor(e,t,n){this.state=Nn.closed,this.topic=e,this.params=Hi(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new wu(this,ms.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new iE(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Nn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=Nn.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Nn.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=Nn.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new wu(this,ms.leave,Hi({}),this.timeout).send(),this.state=Nn.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(ms.reply,(r,o)=>{this.trigger(this.replyEventName(o),r)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Nn.closed,this.bindings=[]}onClose(e){this.on(ms.close,e)}onError(e){return this.on(ms.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new wu(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Nn.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(ms.close,"leave")},n=new wu(this,ms.leave,Hi({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic!==e?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Nn.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let o=this.onMessage(e,t,n,r);if(t&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let a=this.bindings.filter(l=>
61l.event===e&&this.filterBindings(l,t,n));for(let l=0;l<a.length;l++)a[l].callback(o,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Nn.closed}isErrored(){return this.state===Nn.errored}isJoined(){return this.state===Nn.joined}isJoining(){return this.state===Nn.joining}isLeaving(){return this.state===Nn.leaving}},ed=class{static request(e,t,n,r,o,a,l){if(qr.XDomainRequest){let u=new qr.XDomainRequest;return this.xdomainRequest(u,e,t,r,o,a,l)}else if(qr.XMLHttpRequest){let u=new qr.XMLHttpRequest;return this.xhrRequest(u,e,t,n,r,o,a,l)}else{if(qr.fetch&&qr.AbortController)return this.fetchRequest(e,t,n,r,o,a,l);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,r,o,a,l){let u={method:e,headers:n,body:r},f=null;return o&&(f=new AbortController,setTimeout(()=>f.abort(),o),u.signal=f.signal),qr.fetch(t,u).then(h=>h.text()).then(h=>this.parseJSON(h)).then(h=>l&&l(h)).catch(h=>{h.name==="AbortError"&&a?a():l&&l(null)}),f}static xdomainRequest(e,t,n,r,o,a,l){return e.timeout=o,e.open(t,n),e.onload=()=>{let u=this.parseJSON(e.responseText);l&&l(u)},a&&(e.ontimeout=a),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,o,a,l,u){e.open(t,n,!0),e.timeout=a;for(let[f,h]of Object.entries(r))e.setRequestHeader(f,h);return e.onerror=()=>u&&u(null),e.onreadystatechange=()=>{if(e.readyState===k2.complete&&u){let f=this.parseJSON(e.responseText);u(f)}},l&&(e.ontimeout=l),e.send(o),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let o=t?`${t}[${r}]`:r,a=e[r];typeof a=="object"?n.push(this.serialize(a,o)):n.push(encodeURIComponent(o)+"="+encodeURIComponent(a))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},C2=e=>{let t="",n=new Uint8Array(e),r=n.byteLength;for(let o=0;o<r;o++)t+=String.fromCharCode(n[o]);return btoa(t)},Ti=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(am)&&(this.authToken=atob(t[1].slice(am.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=Gr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+im.websocket),"$1/"+im.longpoll)}endpointURL(){return ed.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=Gr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Gr.open||this.readyState===Gr.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:n,token:r,messages:o}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:o.forEach(a=>{setTimeout(()=>this.onmessage({data:a}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Gr.open,this.onopen({}),this.poll();break;
vendor: 13,730 bytes, lines 61-62
61case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(e){typeof e!="string"&&(e=C2(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e,t=0){this.awaitingBatchAck=!0;const n=t+E2,r=e.slice(t,n);this.ajax("POST",{"Content-Type":"application/x-ndjson"},r.join(` 62`),()=>this.onerror("timeout"),o=>{!o||o.status!==200?(this.awaitingBatchAck=!1,this.onerror(o&&o.status),this.closeAndRetry(1011,"internal server error",!1)):n<e.length?this.batchSend(e,n):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(e,t,n){for(let o of this.reqs)o.abort();this.readyState=Gr.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r,o){let a,l=()=>{this.reqs.delete(a),r()};a=ed.request(e,this.endpointURL(),t,n,this.timeout,l,u=>{this.reqs.delete(a),this.isActive()&&o(u)}),this.reqs.add(a)}},R2=class al{constructor(t,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state=Object.create(null),this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,o=>{let{onJoin:a,onLeave:l,onSync:u}=this.caller;this.joinRef=this.channel.joinRef(),this.state=al.syncState(this.state,o,a,l),this.pendingDiffs.forEach(f=>{this.state=al.syncDiff(this.state,f,a,l)}),this.pendingDiffs=[],u()}),this.channel.on(r.diff,o=>{let{onJoin:a,onLeave:l,onSync:u}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=al.syncDiff(this.state,o,a,l),u())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return al.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,r,o){let a=this.toNullProtoObj(this.clone(t));n=this.toNullProtoObj(n);let l=Object.create(null),u=Object.create(null);return this.map(a,(f,h)=>{n[f]||(u[f]=h)}),this.map(n,(f,h)=>{let m=a[f];if(m){let g=h.metas.map(x=>x.phx_ref),b=m.metas.map(x=>x.phx_ref),w=h.metas.filter(x=>b.indexOf(x.phx_ref)<0),E=m.metas.filter(x=>g.indexOf(x.phx_ref)<0);w.length>0&&(l[f]=h,l[f].metas=w),E.length>0&&(u[f]=this.clone(m),u[f].metas=E)}else l[f]=h}),this.syncDiff(a,{joins:l,leaves:u},r,o)}static syncDiff(t,n,r,o){t=this.toNullProtoObj(t);let{joins:a,leaves:l}=this.clone(n);return r||(r=function(){}),o||(o=function(){}),this.map(a,(u,f)=>{let h=t[u];if(t[u]=this.clone(f),h){let m=t[u].metas.map(b=>b.phx_ref),g=h.metas.filter(b=>m.indexOf(b.phx_ref)<0);t[u].metas.unshift(...g)}r(u,h,f)}),this.map(l,(u,f)=>{let h=t[u];if(!h)return;let m=f.metas.map(g=>g.phx_ref);h.metas=h.metas.filter(g=>m.indexOf(g.phx_ref)<0),o(u,h,f),h.metas.length===0&&delete t[u]}),t}static list(t,n){return n||(n=function(r,o){return o}),this.map(t,(r,o)=>n(r,o))}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static toNullProtoObj(t){if(Object.getPrototypeOf(t)===null)return t;let n=Object.create(null);return Object.getOwnPropertyNames(t).forEach(r=>{n[r]=t[r]}),n}static clone(t){return JSON.parse(JSON.stringify(t))}},bu={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,o,a,l]=JSON.parse(e);return t({join_ref:n,ref:r,topic:o,event:a,payload:l})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:o,payload:a}=e,l=new TextEncoder,u=l.encode(t),f=l.encode(n),h=l.encode(o),m=l.encode(r);this.assertFieldSize(u.byteLength,"join_ref"),this.assertFieldSize(f.byteLength,"ref"),this.assertFieldSize(h.byteLength,"topic"),this.assertFieldSize(m.byteLength,"event");let g=this.META_LENGTH+u.byteLength+f.byteLength+h.byteLength+m.byteLength,b=new ArrayBuffer(this.HEADER_LENGTH+g),w=new Uint8Array(b),E=new DataView(b),x=0;E.setUint8(x++,this.KINDS.push),E.setUint8(x++,u.byteLength),E.setUint8(x++,f.byteLength),E.setUint8(x++,h.byteLength),E.setUint8(x++,m.byteLength),w.set(u,x),x+=u.byteLength,w.set(f,x),x+=f.byteLength,w.set(h,x),x+=h.byteLength,w.set(m,x),x+=m.byteLength;var S=new Uint8Array(b.byteLength+a.byteLength);return S.set(w,0),S.set(new Uint8Array(a),b.byteLength),S.buffer},assertFieldSize(e,t){if(e>255)throw new Error(`unable to convert ${t} to binary: must be less than or equal to 255 bytes, but is ${e} bytes`)},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}},decodePush(e,t,n){let r=t.getUint8(1),o=t.getUint8(2),a=t.getUint8(3),l=this.HEADER_LENGTH+this.META_LENGTH-1,u=n.decode(e.slice(l,l+r));l=l+r;let f=n.decode(e.slice(l,l+o));l=l+o;let h=n.decode(e.slice(l,l+a));l=l+a;let m=e.slice(l,e.byteLength);return{join_ref:u,ref:null,topic:f,event:h,payload:m}},decodeReply(e,t,n){let r=t.getUint8(1),o=t.getUint8(2),a=t.getUint8(3),l=t.getUint8(4),u=this.HEADER_LENGTH+this.META_LENGTH,f=n.decode(e.slice(u,u+r));u=u+r;let h=n.decode(e.slice(u,u+o));u=u+o;let m=n.decode(e.slice(u,u+a));u=u+a;let g=n.decode(e.slice(u,u+l));u=u+l;let b=e.slice(u,e.byteLength),w={status:g,response:b};return{join_ref:f,ref:h,topic:m,event:ms.reply,payload:w}},decodeBroadcast(e,t,n){let r=t.getUint8(1),o=t.getUint8(2),a=this.HEADER_LENGTH+2,l=n.decode(e.slice(a,a+r));a=a+r;let u=n.decode(e.slice(a,a+o));a=a+o;let f=e.slice(a,e.byteLength);return{join_ref:null,ref:null,topic:l,event:u,payload:f}}},A2=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||_2,this.transport=t.transport||qr.WebSocket||Ti,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=qr&&qr.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=bu.encode.bind(bu),this.defaultDecoder=bu.decode.bind(bu),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Ti?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;Ni&&Ni.addEventListener&&(Ni.addEventListener("pagehide",o=>{this.conn&&(this.disconnect(),r=this.connectClock)}),Ni.addEventListener("pageshow",o=>{r===this.connectClock&&(r=null,this.connect())}),Ni.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=o=>t.rejoinAfterMs?t.rejoinAfterMs(o):[1e3,2e3,5e3][o-1]||1e4,this.reconnectAfterMs=o=>t.reconnectAfterMs?t.reconnectAfterMs(o):[10,50,100,150,200,250,500,1e3,2e3][o-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(o,a,l)=>{console.log(`${o}: ${a}`,l)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Hi(t.params||{}),this.endPoint=`${e}/${im.websocket}`,this.vsn=t.vsn||x2,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new iE(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken&&Hi(t.authToken)}getLongPollTransport(){return Ti}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=ed.appendParams(ed.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Hi(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ti?this.connectWithFallback(Ti,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage(o=>{o.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){return e===Ti?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${am}${btoa(this.authToken()).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,o,a,l=this.transportName(e),u=f=>{this.log("transport",`falling back to ${l}...`,f),this.off([o,a]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${l}`))return u("memorized");this.fallbackTimer=setTimeout(u,t),a=this.onError(f=>{this.log("transport","error",f),r&&!n&&(clearTimeout(this.fallbackTimer),u(f))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let f=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${f}`,"true"),this.log("transport",`established ${f} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(u,t),this.ping(f=>{this.log("transport","connected to primary after",f),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),S2,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===Gr.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError(e)}
62triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(ms.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Gr.connecting:return"connecting";case Gr.open:return"open";case Gr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new T2(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:o,join_ref:a}=e;this.log("push",`${t} ${n} (${a}, ${o})`,r)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:n,event:r,payload:o,ref:a,join_ref:l}=t;if(a&&a===this.pendingHeartbeatRef){const u=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(o.status==="ok"?"ok":"error",u)}catch(f){this.log("error","error in heartbeat callback",f)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${o.status||""} ${n} ${r} ${a&&"("+a+")"||""}`.trim(),o);for(let u=0;u<this.channels.length;u++){const f=this.channels[u];f.isMember(n,r,o,l)&&f.trigger(r,o,a,l)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(o){this.log("error",`error in ${e} callback`,o)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class pl{constructor(t,n){const r=P2(n);this.presence=new R2(t.getChannel(),r),this.presence.onJoin((o,a,l)=>{const u=pl.onJoinPayload(o,a,l);t.getChannel().trigger("presence",u)}),this.presence.onLeave((o,a,l)=>{const u=pl.onLeavePayload(o,a,l);t.getChannel().trigger("presence",u)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return pl.transformState(this.presence.state)}static transformState(t){return t=j2(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const o=t[r];return n[r]=Uu(o),n},{})}static onJoinPayload(t,n,r){const o=A0(n),a=Uu(r);return{event:"join",key:t,currentPresences:o,newPresences:a}}static onLeavePayload(t,n,r){const o=A0(n),a=Uu(r);return{event:"leave",key:t,currentPresences:o,leftPresences:a}}}function Uu(e){return e.metas.map(t=>{const n=Object.getOwnPropertyDescriptors(t),r=Object.defineProperties({},n);return r.presence_ref=r.phx_ref,delete r.phx_ref,delete r.phx_ref_prev,r})}function j2(e){return JSON.parse(JSON.stringify(e))}function P2(e){return e?.events&&{events:e.events}}function A0(e){return e?.metas?Uu(e):[]}var j0;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(j0||(j0={}));class N2{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new pl(this.channel.channelAdapter,n)}}function O2(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
62if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const n=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${n}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class I2{constructor(t,n,r){const o=D2(r);this.channel=t.getSocket().channel(n,o),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,n,r){let o;try{o=this.channel.push(t,n,r)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>f2){const a=this.channel.pushBuffer.shift();a.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${a.event}`,a.payload())}return o}updateJoinPayload(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===Qs.joined}isJoined(){return this.state===Qs.joined}isJoining(){return this.state===Qs.joining}isClosed(){return this.state===Qs.closed}isLeaving(){return this.state===Qs.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function D2(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}const L2=/[,()"\\]/,M2=e=>L2.test(e)||e!==e.trim(),$2=e=>`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,P0=e=>{const t=e===null?"null":String(e);return M2(t)?$2(t):t},F2=e=>e===null?"null":String(e),U2=(e,t)=>{if(e==="in"){const n=Array.isArray(t)?t:[t];if(n.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(n)).map(o=>P0(o)).join(",")})`}return e==="is"?`is.${F2(t)}`:`${e}.${P0(t)}`};class z2{constructor(){this.filters=[]}add(t,n,r,o=!1){const a=o?"not.":"";return this.filters.push(`${t}=${a}${U2(n,r)}`),this}eq(t,n){return this.add(t,"eq",n)}neq(t,n){return this.add(t,"neq",n)}gt(t,n){return this.add(t,"gt",n)}gte(t,n){return this.add(t,"gte",n)}lt(t,n){return this.add(t,"lt",n)}lte(t,n){return this.add(t,"lte",n)}in(t,n){return this.add(t,"in",n)}like(t,n){return this.add(t,"like",n)}ilike(t,n){return this.add(t,"ilike",n)}match(t,n){return this.add(t,"match",n)}imatch(t,n){return this.add(t,"imatch",n)}is(t,n){return this.add(t,"is",n)}isDistinct(t,n){return this.add(t,"isdistinct",n)}not(t,n,r){return this.add(t,n,r,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var N0;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(N0||(N0={}));var Ro;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Ro||(Ro={}));var gs;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(gs||(gs={}));class ys{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,n={config:{}},r){var o,a;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new I2(this.socket.socketAdapter,t,this.params),this.presence=new N2(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=oE(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((a=(o=this.params.config)===null||o===void 0?void 0:o.broadcast)===null||a===void 0)&&a.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,n=this.timeout){var r,o,a;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:l,presence:u,private:f}}=this.params,h=(o=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(w=>w.filter))!==null&&o!==void 0?o:[],m=!!this.bindings[Ro.PRESENCE]&&this.bindings[Ro.PRESENCE].length>0||((a=this.params.config.presence)===null||a===void 0?void 0:a.enabled)===!0,g={},b={broadcast:l,presence:Object.assign(Object.assign({},u),{enabled:m}),postgres_changes:h,private:f};this.socket.accessTokenValue&&(g.access_token=this.socket.accessTokenValue),this._onError(w=>{t?.(gs.CHANNEL_ERROR,O2(w))}),this._onClose(()=>t?.(gs.CLOSED)),this.updateJoinPayload(Object.assign({config:b},g)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:w})=>{if(this.socket._isManualToken()||this.socket.setAuth(),w===void 0){t?.(gs.SUBSCRIBED);return}this._updatePostgresBindings(w,t)}).receive("error",w=>{this.state=Qs.errored;const E=Object.values(w).join(", ")||"error";t?.(gs.CHANNEL_ERROR,new Error(E,{cause:w}))}).receive("timeout",()=>{t?.(gs.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var r;const o=this.bindings.postgres_changes,a=(r=o?.length)!==null&&r!==void 0?r:0,l=[];for(let u=0;u<a;u++){const f=o[u],{filter:{event:h,schema:m,table:g,filter:b}}=f,w=t&&t[u];if(w&&w.event===h&&ys.isFilterValueEqual(w.schema,m)&&ys.isFilterValueEqual(w.table,g)&&ys.isFilterValueEqual(w.filter,b))l.push(Object.assign(Object.assign({},f),{id:w.id}));else{this.unsubscribe(),this.state=Qs.errored,n?.(gs.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=l,this.state!=Qs.errored&&n&&n(gs.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){const o=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),a=t===Ro.PRESENCE||t===Ro.POSTGRES_CHANGES;if(o&&a)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,n,r)}async httpSend(t,n,r={}){var o;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const a=n instanceof ArrayBuffer||ArrayBuffer.isView(n),l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":a?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const u=new URL(this.broadcastEndpointURL);u.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&u.searchParams.set("private","true");const f={method:"POST",headers:l,body:a?n:JSON.stringify(n)},h=await this._fetchWithTimeout(u.toString(),f,(o=r.timeout)!==null&&o!==void 0?o:this.timeout);if(h.status===202)return{success:!0};if(h.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realt
62ime-js/migrations/httpsend-server-version.md"));let m=h.statusText;try{const g=await h.json();m=g.error||g.message||m}catch{}return Promise.reject(new Error(m))}async send(t,n={}){var r,o;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){const a="Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.";this.socket.hasLogger()?this.socket.log("channel",a):console.warn(a);const{event:l,payload:u}=t,f={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(f.Authorization=`Bearer ${this.socket.accessTokenValue}`);const h={method:"POST",headers:f,body:JSON.stringify({messages:[{topic:this.subTopic,event:l,payload:u,private:this.private}]})};try{const m=await this._fetchWithTimeout(this.broadcastEndpointURL,h,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((o=m.body)===null||o===void 0?void 0:o.cancel()),m.ok?"ok":"error"}catch(m){return m instanceof Error&&m.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var l,u,f;const h=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((f=(u=(l=this.params)===null||l===void 0?void 0:l.config)===null||u===void 0?void 0:u.broadcast)===null||f===void 0)&&f.ack)&&a("ok"),h.receive("ok",()=>a("ok")),h.receive("error",()=>a("error")),h.receive("timeout",()=>a("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,r){const o=new AbortController,a=setTimeout(()=>o.abort(),r),l=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:o.signal}));return clearTimeout(a),l}_on(t,n,r){var o;const a=t.toLocaleLowerCase(),l=n?.filter;if((l instanceof z2||typeof l=="object"&&l!==null&&typeof l.build=="function")&&(n=Object.assign(Object.assign({},n),{filter:l.build()})),a===Ro.POSTGRES_CHANGES&&((o=this.bindings[a])===null||o===void 0?void 0:o.find(m=>ys.isSamePostgresFilter(m.filter,n))))return this.socket.log("error",`duplicate \`postgres_changes\` binding for ${this.topic} ignored`,n),this;const u=this.channelAdapter.on(t,r),f={type:a,filter:n,callback:r,ref:u};return this.bindings[a]?this.bindings[a].push(f):this.bindings[a]=[f],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,r)=>{var o,a,l,u,f,h,m;const g=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(g,r))return!1;const b=(o=this.bindings[g])===null||o===void 0?void 0:o.find(w=>w.ref===t.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(g))if("id"in b){const w=b.id,E=(a=b.filter)===null||a===void 0?void 0:a.event;return w&&((l=n.ids)===null||l===void 0?void 0:l.includes(w))&&(E==="*"||E?.toLocaleLowerCase()===((u=n.data)===null||u===void 0?void 0:u.type.toLocaleLowerCase()))}else{const w=(h=(f=b?.filter)===null||f===void 0?void 0:f.event)===null||h===void 0?void 0:h.toLocaleLowerCase();return w==="*"||w===((m=n?.event)===null||m===void 0?void 0:m.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===g})}_notThisChannelEvent(t,n){const{close:r,error:o,leave:a,join:l}=rE;return n&&[r,o,a,l].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,r)=>{if(typeof n=="object"&&"ids"in n){const o=n.data,{schema:a,table:l,commit_timestamp:u,type:f,errors:h}=o;return Object.assign(Object.assign({},{schema:a,table:l,commit_timestamp:u,eventType:f,new:{},old:{},errors:h}),this._getPayloadRecords(o))}return n})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const r of t.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}static isSamePostgresFilter(t,n){var r,o,a,l;const u=(o=(r=t?.select)===null||r===void 0?void 0:r.join())!==null&&o!==void 0?o:void 0,f=(l=(a=n?.select)===null||a===void 0?void 0:a.join())!==null&&l!==void 0?l:void 0;return t?.event===n?.event&&ys.isFilterValueEqual(t?.schema,n?.schema)&&ys.isFilterValueEqual(t?.table,n?.table)&&ys.isFilterValueEqual(t?.filter,n?.filter)&&u===f}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=R0(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=R0(t.columns,t.old_record)),n}}
62class B2{constructor(t,n){this.socket=new A2(t,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,n,r,o=1e4){return new Promise(a=>{setTimeout(()=>a("timeout"),o),this.socket.disconnect(()=>{t(),a("ok")},n,r)})}push(t){this.socket.push(t)}log(t,n,r){this.socket.log(t,n,r)}hasLogger(){return this.socket.hasLogger()}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==sm.connecting}isDisconnecting(){return this.socket.connectionState()==sm.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const O0={HEARTBEAT_INTERVAL:25e3},H2=[1e3,2e3,5e3,1e4],V2=1e4;function W2(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var n;return(n=Array.from(e.keys())[t])!==null&&n!==void 0?n:null},removeItem(t){e.delete(t)},setItem(t,n){e.set(t,String(n))}}}function q2(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return W2()}const G2=` 63 addEventListener("message", (e) => { 64 if (e.data.event === "start") { 65 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 66 } 67 });`;class K2{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={},this.ref=0,this.serializer=new h2,this._manuallySetToken=!1,this._authPromise=null,this._authGeneration=0,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=a=>a?(...l)=>a(...l):(...l)=>fetch(...l),!(!((r=n?.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const o=this._initializeOptions(n);this.socketAdapter=new B2(t,o),this.httpEndpoint=oE(t),this.fetch=this._resolveFetch(n?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const n=t.message;throw new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),n}async removeAllChannels(){const t=this.channels.map(async r=>{const o=await r.unsubscribe();return r.teardown(),o}),n=await Promise.all(t);return await this.disconnect(),n}log(t,n,r){this.socketAdapter.log(t,n,r)}hasLogger(){return this.socketAdapter.hasLogger()}connectionState(){return this.socketAdapter.connectionState()||sm.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const r=`realtime:${t}`,o=this.getChannels().find(a=>a.topic===r);if(o)return o;{const a=new ys(`realtime:${t}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(a),a}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){const n=++this._authGeneration,r=this._performAuth(t,n);n===this._authGeneration&&(this._authPromise=r);try{await r}finally{this._authPromise===r&&(this._authPromise=null)}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
67this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t,n){let r,o=!1;if(t)r=t,o=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(a){this.log("error","Error fetching access token from callback",a),r=this.accessTokenValue}else r=this.accessTokenValue;n===this._authGeneration&&(this.accessToken?this._manuallySetToken=!1:o&&(this._manuallySetToken=!0),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(a=>{const l={access_token:r,version:l2};a.updateJoinPayload(l),a.joinedOnce&&a.channelAdapter.isJoined()&&a.channelAdapter.push(rE.access_token,{access_token:r})})))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(n,r)=>{n!=="disconnected"&&(n=="sent"&&this._setAuthSafely(),t&&t(n,r))}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([G2],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(t){var n,r,o,a,l,u,f,h,m,g,b,w;this.worker=(n=t?.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=t?.accessToken)!==null&&r!==void 0?r:null;const E={};E.timeout=(o=t?.timeout)!==null&&o!==void 0?o:d2,E.heartbeatIntervalMs=(a=t?.heartbeatIntervalMs)!==null&&a!==void 0?a:O0.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(l=t?.disconnectOnEmptyChannelsAfterMs)!==null&&l!==void 0?l:2*((u=t?.heartbeatIntervalMs)!==null&&u!==void 0?u:O0.HEARTBEAT_INTERVAL),E.transport=(f=t?.transport)!==null&&f!==void 0?f:i2.getWebSocketConstructor(),E.params=t?.params,E.logger=t?.logger,E.heartbeatCallback=this._wrapHeartbeatCallback(t?.heartbeatCallback),E.sessionStorage=(h=t?.sessionStorage)!==null&&h!==void 0?h:q2(),E.reconnectAfterMs=(m=t?.reconnectAfterMs)!==null&&m!==void 0?m:(k=>H2[k-1]||V2);let x,S;const T=(g=t?.vsn)!==null&&g!==void 0?g:u2;switch(T){case c2:x=(k,C)=>C(JSON.stringify(k)),S=(k,C)=>C(JSON.parse(k));break;case nE:x=this.serializer.encode.bind(this.serializer),S=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${E.vsn}`)}if(E.vsn=T,E.encode=(b=t?.encode)!==null&&b!==void 0?b:x,E.decode=(w=t?.decode)!==null&&w!==void 0?w:S,E.beforeReconnect=this._reconnectAuth.bind(this),(t?.logLevel||t?.log_level)&&(this.logLevel=t.logLevel||t.log_level,E.params=Object.assign(Object.assign({},E.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t?.workerUrl,E.autoSendHeartbeat=!this.worker}return E}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
67var El=class extends Error{constructor(e,t){super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&t.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function Y2(e,t,n){const r=new URL(t,e);if(n)for(const[o,a]of Object.entries(n))a!==void 0&&r.searchParams.set(o,a);return r.toString()}async function Q2(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function J2(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:o,body:a,headers:l}){const u=Y2(e.baseUrl,r,o),f=await Q2(e.auth),h=await t(u,{method:n,headers:{...a?{"Content-Type":"application/json"}:{},...f,...l},body:a?JSON.stringify(a):void 0}),m=await h.text(),g=(h.headers.get("content-type")||"").includes("application/json"),b=g&&m?JSON.parse(m):m;if(!h.ok){const w=g?b:void 0,E=w?.error;throw new El(E?.message??`Request failed with status ${h.status}`,{status:h.status,icebergType:E?.type,icebergCode:E?.code,details:w})}return{status:h.status,headers:h.headers,data:b}}}}function xu(e){return e.join("�")}var X2=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:xu(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${xu(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${xu(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${xu(e.namespace)}`}),!0}catch(t){if(t instanceof El&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof El&&n.status===409)return;throw n}}};function Ci(e){return e.join("�")}var Z2=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ci(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ci(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ci(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ci(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ci(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ci(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof El&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof El&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},eL=class{constructor(e){let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=J2({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(","),this.namespaceOps=new X2(this.client,t),this.tableOps=new Z2(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
67async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function kl(e){"@babel/helpers - typeof";return kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kl(e)}function tL(e,t){if(kl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nL(e){var t=tL(e,"string");return kl(t)=="symbol"?t:t+""}function rL(e,t,n){return(t=nL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I0(Object(n),!0).forEach(function(r){rL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Ud=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function zd(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var lm=class extends Ud{constructor(e,t,n,r="storage",o){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n,this.code=o}toJSON(){return Pe(Pe({},super.toJSON()),{},{code:this.code})}},aE=class extends Ud{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function td(e,t,n){const r=Pe({},e),o=t.toLowerCase();for(const a of Object.keys(r))a.toLowerCase()===o&&delete r[a];return r[o]=n,r}function sL(e){const t={};for(const[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}const oL=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),iL=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},cm=e=>{if(Array.isArray(e))return e.map(n=>cm(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const o=n.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));t[o]=cm(r)}),t},aL=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),lE=e=>e.split("/").map(encodeURIComponent).join("/"),D0=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const n=t.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(e)},lL=async(e,t,n,r)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const o=e;let a=parseInt(String(o.status),10);Number.isFinite(a)||(a=500),o.json().then(l=>{const u=l?.statusCode||l?.code||a+"";t(new lm(D0(l),a,u,r,l?.code))}).catch(()=>{const l=a+"";t(new lm(o.statusText||`HTTP ${a} error`,a,l,r))})}else t(new aE(D0(e),e,r))},cL=(e,t,n,r)=>{const o={method:e,headers:t?.headers||{}};if(e==="GET"||e==="HEAD"||!r)return Pe(Pe({},o),n);if(iL(r)){var a;const l=t?.headers||{};let u;for(const[f,h]of Object.entries(l))f.toLowerCase()==="content-type"&&(u=h);o.headers=td(l,"Content-Type",(a=u)!==null&&a!==void 0?a:"application/json"),o.body=JSON.stringify(r)}else o.body=r;return t?.duplex&&(o.duplex=t.duplex),Pe(Pe({},o),n)};async function Xa(e,t,n,r,o,a,l){return new Promise((u,f)=>{e(n,cL(t,r,o,a)).then(h=>{if(!h.ok)throw h;if(r?.noResolveJson)return h;if(l==="vectors"){const m=h.headers.get("content-type");if(h.headers.get("content-length")==="0"||h.status===204)return{};if(!m||!m.includes("application/json"))return{}}return h.json()}).then(h=>u(h)).catch(h=>lL(h,f,r,l))})}function cE(e="storage"){return{get:async(t,n,r,o)=>
67Xa(t,"GET",n,r,o,void 0,e),post:async(t,n,r,o,a)=>Xa(t,"POST",n,o,a,r,e),put:async(t,n,r,o,a)=>Xa(t,"PUT",n,o,a,r,e),head:async(t,n,r,o)=>Xa(t,"HEAD",n,Pe(Pe({},r),{},{noResolveJson:!0}),o,void 0,e),remove:async(t,n,r,o,a)=>Xa(t,"DELETE",n,o,a,r,e)}}const uL=cE("storage"),{get:Tl,post:Cr,put:um,head:dL,remove:Cl}=uL,Gn=cE("vectors");var la=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=sL(t),this.fetch=oL(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=td(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(zd(n))return{data:null,error:n};throw n}}};let uE;uE=Symbol.toStringTag;var fL=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[uE]="StreamDownloadBuilder",this.promise=null}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(zd(t))return{data:null,error:t};throw t}}};let dE;dE=Symbol.toStringTag;var hL=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[dE]="BlobDownloadBuilder",this.promise=null}asStream(){return new fL(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(zd(t))return{data:null,error:t};throw t}}};const cp={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},L0={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var pL=class extends la{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var o=this;return o.handleOperation(async()=>{let a;const l=Pe(Pe({},L0),r);let u=Pe(Pe({},o.headers),e==="POST"&&{"x-upsert":String(l.upsert)});const f=l.metadata;if(typeof Blob<"u"&&n instanceof Blob?(a=new FormData,a.append("cacheControl",l.cacheControl),f&&a.append("metadata",o.encodeMetadata(f)),a.append("",n)):typeof FormData<"u"&&n instanceof FormData?(a=n,a.has("cacheControl")||a.append("cacheControl",l.cacheControl),f&&!a.has("metadata")&&a.append("metadata",o.encodeMetadata(f))):(a=n,u["cache-control"]=`max-age=${l.cacheControl}`,u["content-type"]=l.contentType,f&&(u["x-metadata"]=o.toBase64(o.encodeMetadata(f))),(typeof ReadableStream<"u"&&a instanceof ReadableStream||a&&typeof a=="object"&&"pipe"in a&&typeof a.pipe=="function")&&!l.duplex&&(l.duplex="half")),r?.headers)for(const[b,w]of Object.entries(r.headers))u=td(u,b,w);const h=o._removeEmptyFolders(t),m=o._getFinalPath(h),g=await(e=="PUT"?um:Cr)(o.fetch,`${o.url}/object/${m}`,a,Pe({headers:u},l?.duplex?{duplex:l.duplex}:{}));return{path:h,id:g.Id,fullPath:g.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var o=this;const a=o._removeEmptyFolders(e),l=o._getFinalPath(a),u=new URL(o.url+`/object/upload/sign/${l}`);return u.searchParams.set("token",t),o.handleOperation(async()=>{let f;const h=Pe(Pe({},L0),r);let m=Pe(Pe({},o.headers),{"x-upsert":String(h.upsert)});const g=h.metadata;if(typeof Blob<"u"&&n instanceof Blob?(f=new FormData,f.append("cacheControl",h.cacheControl),g&&f.append("metadata",o.encodeMetadata(g)),f.append("",n)):typeof FormData<"u"&&n instanceof FormData?(f=n,f.has("cacheControl")||f.append("cacheControl",h.cacheControl),g&&!f.has("metadata")&&f.append("metadata",o.encodeMetadata(g))):(f=n,m["cache-control"]=`max-age=${h.cacheControl}`,m["content-type"]=h.contentType,g&&(m["x-metadata"]=o.toBase64(o.encodeMetadata(g))),(typeof ReadableStream<"u"&&f instanceof ReadableStream||f&&typeof f=="object"&&"pipe"in f&&typeof f.pipe=="function")&&!h.duplex&&(h.duplex="half")),r?.headers)for(const[b,w]of Object.entries(r.headers))m=td(m,b,w);return{path:a,fullPath:(await um(o.fetch,u.toString(),f,Pe({headers:m},h?.duplex?{duplex:h.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const o=Pe({},n.headers);t?.upsert&&(o["x-upsert"]="true");const a=await Cr(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:o}),l=new URL(n.url+a.url),u=l.searchParams.get("token");if(!u)throw new Ud("No token returned by API");return{signedUrl:l.toString(),path:e,token:u}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await Cr(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
67stinationBucket:n?.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await Cr(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n?.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let o=r._getFinalPath(e);const a=typeof n?.transform=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let l=await Cr(r.fetch,`${r.url}/object/sign/${o}`,Pe({expiresIn:t},a?{transform:n.transform}:{}),{headers:r.headers});const u=new URLSearchParams;n?.download&&u.set("download",n.download===!0?"":n.download),n?.cacheNonce!=null&&u.set("cacheNonce",String(n.cacheNonce));const f=u.toString();return{signedUrl:encodeURI(`${r.url}${l.signedURL}${f?`&${f}`:""}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const o=await Cr(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),a=new URLSearchParams;n?.download&&a.set("download",n.download===!0?"":n.download),n?.cacheNonce!=null&&a.set("cacheNonce",String(n.cacheNonce));const l=a.toString();return o.map(u=>Pe(Pe({},u),{},{signedUrl:u.signedURL?encodeURI(`${r.url}${u.signedURL}${l?`&${l}`:""}`):null}))})}download(e,t,n){const r=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",o=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(o,t.transform),t?.cacheNonce!=null&&o.set("cacheNonce",String(t.cacheNonce));const a=o.toString(),l=this._getFinalPath(e),u=()=>Tl(this.fetch,`${this.url}/${r}/${l}${a?`?${a}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new hL(u,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>cm(await Tl(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await dL(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(o){if(t.shouldThrowOnError)throw o;if(zd(o)){var r;const a=o instanceof lm?o.status:o instanceof aE?(r=o.originalError)===null||r===void 0?void 0:r.status:void 0;if(a!==void 0&&[400,404].includes(a))return{data:!1,error:o}}throw o}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=new URLSearchParams;t?.download&&r.set("download",t.download===!0?"":t.download),t?.transform&&this.applyTransformOptsToQuery(r,t.transform),t?.cacheNonce!=null&&r.set("cacheNonce",String(t.cacheNonce));const o=r.toString(),a=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}`)+(o?`?${o}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await Cl(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async purgeCache(e,t,n){var r=this;return r.handleOperation(async()=>{const o=lE(r._getFinalPath(e)),a=new URLSearchParams;t?.transformations&&a.set("transformations","true");const l=a.toString();return await Cl(r.fetch,`${r.url}/cdn/${o}${l?`?${l}`:""}`,{},{headers:r.headers},n)})}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const o=t?.sortBy?Pe(Pe({},cp.sortBy),t.sortBy):cp.sortBy,a=Pe(Pe(Pe({},cp),t),{},{sortBy:o,prefix:e||""});return await Cr(r.fetch,`${r.url}/object/list/${r.bucketId}`,a,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=Pe({},e);return await Cr(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("qual
67ity",t.quality.toString()),e}};const mL="2.112.4",Gl={"X-Client-Info":`storage-js/${mL}`};var gL=class extends la{constructor(e,t={},n,r){const o=new URL(e);r?.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase."));const a=o.href.replace(/\/$/,""),l=Pe(Pe({},Gl),t);super(a,l,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await Tl(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Tl(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await Cr(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await um(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Cr(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Cl(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async purgeBucketCache(e,t,n){var r=this;return r.handleOperation(async()=>{const o=new URLSearchParams;t?.transformations&&o.set("transformations","true");const a=o.toString();return await Cl(r.fetch,`${r.url}/cdn/${lE(e)}${a?`?${a}`:""}`,{},{headers:r.headers},n)})}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},yL=class extends la{constructor(e,t={},n){const r=e.replace(/\/$/,""),o=Pe(Pe({},Gl),t);super(r,o,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Cr(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;e?.limit!==void 0&&n.set("limit",e.limit.toString()),e?.offset!==void 0&&n.set("offset",e.offset.toString()),e?.sortColumn&&n.set("sortColumn",e.sortColumn),e?.sortOrder&&n.set("sortOrder",e.sortOrder),e?.search&&n.set("search",e.search);const r=n.toString(),o=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await Tl(t.fetch,o,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Cl(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!aL(e))throw new Ud("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new eL({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(o,a){const l=o[a];return typeof l!="function"?l:async(...u)=>{try{return{data:await l.apply(o,u),error:null}}catch(f){if(r)throw f;return{data:null,error:f}}}}})}},vL=class extends la{constructor(e,t={},n){const r=e.replace(/\/$/,""),o=Pe(Pe({},Gl),{},{"Content-Type":"application/json"},t);super(r,o,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Gn.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Gn.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Gn.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Gn.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},wL=class extends la{constructor(e,t={},n){const r=e.replace(/\/$/,""),o=Pe(Pe({},Gl),{},{"Content-Type":"application/json"},t);super(r,o,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Gn.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Gn.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
67if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Gn.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Gn.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Gn.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},bL=class extends la{constructor(e,t={},n){const r=e.replace(/\/$/,""),o=Pe(Pe({},Gl),{},{"Content-Type":"application/json"},t);super(r,o,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Gn.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Gn.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Gn.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Gn.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},xL=class extends bL{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new _L(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},_L=class extends vL{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,Pe(Pe({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,Pe(Pe({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new SL(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},SL=class extends wL{constructor(e,t,n,r,o){super(e,t,o),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,Pe(Pe({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,Pe(Pe({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,Pe(Pe({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,Pe(Pe({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,Pe(Pe({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},EL=class extends gL{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new pL(this.url,this.headers,e,this.fetch)}get vectors(){return new xL(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new yL(this.url+"/iceberg",this.headers,this.fetch)}};const fE="2.112.4",vs=30*1e3,ll=3,up=ll*vs,kL=2*vs,TL="http://localhost:9999",CL="supabase.auth.token",RL={"X-Client-Info":`gotrue-js/${fE}`},dm="X-Supabase-Api-Version",hE={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},AL=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,jo="sb_flow_id",jL=5,PL=600*1e3;class Rl extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function ge(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class NL extends Rl{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function M0(e){return ge(e)&&e.name==="AuthApiError"}class Rr extends Rl{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class es extends Rl{constructor(t,n,r,o){super(t,r,o),this.name=n,this.status=r}}class Zt extends es{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function _u(e){return ge(e)&&e.name==="AuthSessionMissingError"}class Ri extends es{constructor(){super("Auth session or user missing","AuthInvalidToken
67ResponseError",500,void 0)}}class Su extends es{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Eu extends es{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function OL(e){return ge(e)&&e.name==="AuthImplicitGrantRedirectError"}class $0 extends es{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class IL extends es{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class zu extends es{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function ku(e){return ge(e)&&e.name==="AuthRetryableFetchError"}class F0 extends es{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function DL(e){return ge(e)&&e.name==="AuthRefreshDiscardedError"}class U0 extends es{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class nd extends es{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const rd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),z0=` 68\r=`.split(""),LL=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<z0.length;t+=1)e[z0[t].charCodeAt(0)]=-2;for(let t=0;t<rd.length;t+=1)e[rd[t].charCodeAt(0)]=t;return e})();function B0(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(rd[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(rd[r]),t.queuedBits-=6}}function pE(e,t,n){const r=LL[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function H0(e){const t=[],n=l=>{t.push(String.fromCodePoint(l))},r={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},a=l=>{FL(l,r,n)};for(let l=0;l<e.length;l+=1)pE(e.charCodeAt(l),o,a);return t.join("")}function ML(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function $L(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const o=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|o)+65536,n+=1}ML(r,t)}}function FL(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if((e>>7-r&1)===0){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function Vi(e){const t=[],n={queue:0,queuedBits:0},r=o=>{t.push(o)};for(let o=0;o<e.length;o+=1)pE(e.charCodeAt(o),n,r);return new Uint8Array(t)}function UL(e){const t=[];return $L(e,n=>t.push(n)),new Uint8Array(t)}function Po(e){const t=[],n={queue:0,queuedBits:0},r=o=>{t.push(o)};return e.forEach(o=>B0(o,n,r)),B0(null,n,r),t.join("")}function zL(e){return Math.round(Date.now()/1e3)+e}function BL(){return Symbol("auth-callback")}const on=()=>typeof window<"u"&&typeof document<"u",_o={tested:!1,writable:!1},mE=()=>
68{if(!on())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(_o.tested)return _o.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),_o.tested=!0,_o.writable=!0}catch{_o.tested=!0,_o.writable=!1}return _o.writable};function V0(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((o,a)=>{t[a]=o})}catch{}return n.searchParams.forEach((r,o)=>{t[o]=r}),t}const gE=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),HL=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ws=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},yn=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Ln=async(e,t)=>{await e.removeItem(t)};class Bd{constructor(){this.promise=new Bd.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Bd.promiseConstructor=Promise;function Tu(e){const t=e.split(".");if(t.length!==3)throw new nd("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!AL.test(t[r]))throw new nd("JWT not in base64url format");return{header:JSON.parse(H0(t[0])),payload:JSON.parse(H0(t[1])),signature:Vi(t[2]),raw:{header:t[0],payload:t[1]}}}async function VL(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function WL(e,t){return new Promise((r,o)=>{(async()=>{for(let a=0;a<1/0;a++)try{const l=await e(a);if(!t(a,null,l)){r(l);return}}catch(l){if(!t(a,l)){o(l);return}}})()})}function yE(e){return("0"+e.toString(16)).substr(-2)}function qL(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let o="";for(let a=0;a<56;a++)o+=n.charAt(Math.floor(Math.random()*r));return o}return crypto.getRandomValues(t),Array.from(t,yE).join("")}async function GL(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),o=new Uint8Array(r);return Array.from(o).map(a=>String.fromCharCode(a)).join("")}async function KL(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await GL(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const YL=/^[a-zA-Z0-9_-]{8,64}$/;function Bu(e){return typeof e=="string"&&YL.test(e)?e:null}function QL(){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){const t=new Uint8Array(16);return crypto.getRandomValues(t),Array.from(t,yE).join("")}let e="";for(let t=0;t<32;t++)e+=Math.floor(Math.random()*16).toString(16);return e}const Qi=(e,t)=>`${e}-flow-${t}-code-verifier`,Al=e=>`${e}-flows-code-verifier`;async function wg(e,t){const n=await yn(e,Al(t));return Array.isArray(n)?n.filter(r=>Bu(r)!==null):[]}async function JL(e,t,n,r,o){await ws(e,Qi(t,n),r);const a=(await wg(e,t)).filter(l=>l!==n);for(a.push(n);a.length>jL;){const l=a.shift();await Ln(e,Qi(t,l)),o?.(l)}await ws(e,Al(t),a),await ws(e,`${t}-code-verifier`,r)}async function XL(e,t,n){if(n){const o=await yn(e,Qi(t,n));return{verifier:typeof o=="string"?o:null,flowId:n}}const r=await yn(e,`${t}-code-verifier`);return{verifier:typeof r=="string"?r:null,flowId:null}}async function Er(e,t,n){const r=`${t}-code-verifier`;if(!n){await Ln(e,r);return}const o=Qi(t,n),a=await yn(e,o);await Ln(e,o);const l=await wg(e,t),u=l.filter(f=>f!==n);u.length!==l.length&&(u.length>0?await ws(e,Al(t),u):await Ln(e,Al(t))),a!=null&&a===await yn(e,r)&&await Ln(e,r)}async function ZL(e,t){const n=await wg(e,t);for(const r of n)await Ln(e,Qi(t,r));await Ln(e,Al(t)),await Ln(e,`${t}-code-verifier`)}function eM(e,t){const n=e.indexOf("#");let r=n===-1?e:e.slice(0,n);const o=n===-1?"":e.slice(n),a=r.indexOf("?");if(a!==-1){const u=r.slice(0,a),f=r.slice(a+1).split("&").filter(h=>h!==""&&h!==jo&&!h.startsWith(`${jo}=`));r=f.length>0?`${u}?${f.join("&")}`:u}const l=r.includes("?")?"&":"?";return`${r}${l}${jo}=${encodeURIComponent(t)}${o}`}async function tM(e,t,n=!1,r){const o=qL();let a=o;n&&(a+="/recovery");const l=QL();await JL(e,t,l,a,r);const u=await KL(o);return[u,o===u?"plain":"s256",l]}const nM=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function rM(e){const t=e.headers.get(dm);if(!t||!t.match(nM))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function sM(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function oM(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const iM=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function hs(e){if(!iM.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Tr(e){if(!e.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function dp(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;
68if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function aM(e,t){return new Proxy(e,{get:(n,r,o)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const a=r.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)"||a==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,o)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,o)}})}function W0(e){return JSON.parse(JSON.stringify(e))}const Eo=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},q0=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function G0(e){var t;if(!HL(e))throw new zu(Eo(e),0);let n;try{n=await e.json()}catch(a){throw q0.includes(e.status)?new zu(e.statusText||`HTTP ${e.status}`,e.status):new Rr(Eo(a),a)}if(q0.includes(e.status))throw new zu(Eo(n),e.status);let r;const o=rM(e);if(o&&o.getTime()>=hE["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new U0(Eo(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new Zt}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((a,l)=>a&&typeof l=="string",!0))throw new U0(Eo(n),e.status,n.weak_password.reasons);throw new NL(Eo(n),e.status||500,r)}const lM=(e,t,n,r)=>{const o={method:e,headers:t?.headers||{}};return e==="GET"?o:(o.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t?.headers),o.body=JSON.stringify(r),Object.assign(Object.assign({},o),n))};async function _e(e,t,n,r){var o;const a=Object.assign({},r?.headers);a[dm]||(a[dm]=hE["2024-01-01"].name),r?.jwt&&(a.Authorization=`Bearer ${r.jwt}`);const l=(o=r?.query)!==null&&o!==void 0?o:{};r?.redirectTo&&(l.redirect_to=r.redirectTo);const u=Object.keys(l).length?"?"+new URLSearchParams(l).toString():"",f=await cM(e,t,n+u,{headers:a,noResolveJson:r?.noResolveJson},{},r?.body);return r?.xform?r?.xform(f):{data:Object.assign({},f),error:null}}async function cM(e,t,n,r,o,a){const l=lM(t,r,o,a);let u;try{u=await e(n,Object.assign({},l))}catch(f){throw new zu(Eo(f),0)}if(u.ok||await G0(u),r?.noResolveJson)return u;try{return await u.json()}catch(f){await G0(f)}}function lr(e){var t;let n=null;fM(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=zL(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:typeof e?.id=="string"?e:null;return{data:{session:n,user:r},error:null}}function K0(e){const t=lr(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Js(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function uM(e){return{data:e,error:null}}function dM(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:o,verification_type:a}=e,l=ia(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),u={action_link:t,email_otp:n,hashed_token:r,redirect_to:o,verification_type:a},f=Object.assign({},l);return{data:{properties:u,user:f},error:null}}function Y0(e){return e}function fM(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const fp=["global","local","others"];class hM{constructor({url:t="",headers:n={},fetch:r,experimental:o}){this.url=t,this.headers=n,this.fetch=gE(r),this.experimental=o??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(t,n=fp[0]){if(fp.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${fp.join(", ")}`);try{return await _e(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ge(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await _e(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Js})}catch(r){if(ge(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=ia(t,["options"]),o=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(o.new_email=r?.newEmail,delete o.newEmail),await _e(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:dM,redirectTo:n?.redirectTo})}catch(n){if(ge(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await _e(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Js})}catch(n){if(ge(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,o,a,l,u,f;try{const h={nextPage:null,lastPage:0,total:0},m=await _e(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t?.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(a=(o=t?.perPage)===null||o===void 0?void 0:o.toString())!==null&&a!==void 0?a:""},xform:Y0});if(m.error)throw m.error;const g=await m.json(),b=(l=m.headers.get("x-total-count"))!==null&&l!==void 0?l:0,w=(f=(u=m.headers.get("link"))===null||u===void 0?void 0:u.split(","))!==null&&f!==void 0?f:[];return w.length>0&&(w.forEach(E=>{const x=parseInt(E.split(";")[0].split("=")[1].substring(0,1)),S=JSON.parse(E.split(";")[1].split("=")[1]);h[`${S}Page`]=x}),h.total=parseInt(b)),{data:Object.assign(Object.assign({},g),h),error:null}}catch(h){if(ge(h))return{data:{users:[]},error:h};throw h}}async getUserById(t){hs(t);try{return await _e(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Js})}catch(n){if(ge(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){hs(t);try{return await _e(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Js})}catch(r){if(ge(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){hs(t);
68try{return await _e(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Js})}catch(r){if(ge(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){hs(t.userId);try{const{data:n,error:r}=await _e(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:n,error:r}}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _deleteFactor(t){hs(t.userId),hs(t.id);try{return{data:await _e(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,o,a,l,u,f;try{const h={nextPage:null,lastPage:0,total:0},m=await _e(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t?.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(a=(o=t?.perPage)===null||o===void 0?void 0:o.toString())!==null&&a!==void 0?a:""},xform:Y0});if(m.error)throw m.error;const g=await m.json(),b=(l=m.headers.get("x-total-count"))!==null&&l!==void 0?l:0,w=(f=(u=m.headers.get("link"))===null||u===void 0?void 0:u.split(","))!==null&&f!==void 0?f:[];return w.length>0&&(w.forEach(E=>{const x=parseInt(E.split(";")[0].split("=")[1].substring(0,1)),S=JSON.parse(E.split(";")[1].split("=")[1]);h[`${S}Page`]=x}),h.total=parseInt(b)),{data:Object.assign(Object.assign({},g),h),error:null}}catch(h){if(ge(h))return{data:{clients:[]},error:h};throw h}}async _createOAuthClient(t){try{return await _e(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await _e(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await _e(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ge(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await _e(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await _e(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t?.type&&(n.type=t.type),await _e(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var o;return{data:{providers:(o=r?.providers)!==null&&o!==void 0?o:[]},error:null}}})}catch(n){if(ge(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await _e(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await _e(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await _e(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ge(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(t){try{return await _e(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _adminListPasskeys(t){Tr(this.experimental),hs(t.userId);try{return await _e(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(t){Tr(this.experimental),hs(t.userId),hs(t.passkeyId);
68try{return await _e(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ge(n))return{data:null,error:n};throw n}}}function Q0(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}globalThis&&mE()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class pM extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function mM(){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 vE(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function gM(e){return parseInt(e,16)}function yM(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function vM(e){var t;const{chainId:n,domain:r,expirationTime:o,issuedAt:a=new Date,nonce:l,notBefore:u,requestId:f,resources:h,scheme:m,uri:g,version:b}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(l&&l.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${l}`);if(!g)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(b!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${b}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 69`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const w=vE(e.address),E=m?`${m}://${r}`:r,x=e.statement?`${e.statement} 70`:"",S=`${E} wants you to sign in with your Ethereum account: 71${w} 72 73${x}`;let T=`URI: ${g} 74Version: ${b} 75Chain ID: ${n}${l?` 76Nonce: ${l}`:""} 77Issued At: ${a.toISOString()}`;if(o&&(T+=` 78Expiration Time: ${o.toISOString()}`),u&&(T+=` 79Not Before: ${u.toISOString()}`),f&&(T+=` 80Request ID: ${f}`),h){let k=` 81Resources:`;for(const C of h){if(!C||typeof C!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${C}`);k+=` 82- ${C}`}T+=k}return`${S} 83${T}`}class Dt extends Error{constructor({message:t,code:n,cause:r,name:o}){var a;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(a=o??(r instanceof Error?r.name:void 0))!==null&&a!==void 0?a:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class sd extends Dt{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function wM({error:e,options:t}){var n,r,o;const{publicKey:a}=t;if(!a)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Dt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=a.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Dt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=a.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Dt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((o=a.authenticatorSelection)===null||o===void 0?void 0:o.userVerification)==="required")return new Dt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Dt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Dt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return a.pubKeyCredParams.filter(u=>u.type==="public-key").length===0?new Dt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Dt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const l=window.location.hostname;if(wE(l)){if(a.rp.id!==l)return new Dt({message:`The RP ID "${a.rp.id}
83" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Dt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(a.user.id.byteLength<1||a.user.id.byteLength>64)return new Dt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Dt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Dt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function bM({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Dt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Dt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(wE(r)){if(n.rpId!==r)return new Dt({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Dt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Dt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Dt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class xM{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const fm=new xM;function J0(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,o=ia(e,["challenge","user","excludeCredentials"]),a=Vi(t).buffer,l=Object.assign(Object.assign({},n),{id:Vi(n.id).buffer}),u=Object.assign(Object.assign({},o),{challenge:a,user:l});if(r&&r.length>0){u.excludeCredentials=new Array(r.length);for(let f=0;f<r.length;f++){const h=r[f];u.excludeCredentials[f]=Object.assign(Object.assign({},h),{id:Vi(h.id).buffer,type:h.type||"public-key",transports:h.transports})}}return u}function X0(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=ia(e,["challenge","allowCredentials"]),o=Vi(t).buffer,a=Object.assign(Object.assign({},r),{challenge:o});if(n&&n.length>0){a.allowCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const u=n[l];a.allowCredentials[l]=Object.assign(Object.assign({},u),{id:Vi(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function Z0(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:Po(new Uint8Array(e.response.attestationObject)),clientDataJSON:Po(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function eb(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),o=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Po(new Uint8Array(o.authenticatorData)),clientDataJSON:Po(new Uint8Array(o.clientDataJSON)),signature:Po(new Uint8Array(o.signature)),userHandle:o.userHandle?Po(new Uint8Array(o.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function wE(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function od(){var e,t;return!!(on()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.get)=="function")}async function bE(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new sd("Browser returned unexpected credential type",t)}:{data:null,error:new sd("Empty credential response",t)}}
83catch(t){return{data:null,error:wM({error:t,options:e})}}}async function xE(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new sd("Browser returned unexpected credential type",t)}:{data:null,error:new sd("Empty credential response",t)}}catch(t){return{data:null,error:bM({error:t,options:e})}}}const _M={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},SM={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function id(...e){const t=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),n=o=>o instanceof ArrayBuffer||ArrayBuffer.isView(o),r={};for(const o of e)if(o)for(const a in o){const l=o[a];if(l!==void 0)if(Array.isArray(l))r[a]=l;else if(n(l))r[a]=l;else if(t(l)){const u=r[a];t(u)?r[a]=id(u,l):r[a]=id(l)}else r[a]=l}return r}function EM(e,t){return id(_M,e,t||{})}function kM(e,t){return id(SM,e,t||{})}class TM{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:o},a){var l;try{const{data:u,error:f}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!u)return{data:null,error:f};const h=o??fm.createNewAbortSignal();if(u.webauthn.type==="create"){const{user:m}=u.webauthn.credential_options.publicKey;if(!m.name){const g=r;if(g)m.name=`${m.id}:${g}`;else{const w=(await this.client.getUser()).data.user,E=((l=w?.user_metadata)===null||l===void 0?void 0:l.name)||w?.email||w?.id||"User";m.name=`${m.id}:${E}`}}m.displayName||(m.displayName=m.name)}switch(u.webauthn.type){case"create":{const m=EM(u.webauthn.credential_options.publicKey,a?.create),{data:g,error:b}=await bE({publicKey:m,signal:h});return g?{data:{factorId:t,challengeId:u.id,webauthn:{type:u.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}case"request":{const m=kM(u.webauthn.credential_options.publicKey,a?.request),{data:g,error:b}=await xE(Object.assign(Object.assign({},u.webauthn.credential_options),{publicKey:m,signal:h}));return g?{data:{factorId:t,challengeId:u.id,webauthn:{type:u.webauthn.type,credential_response:g}},error:null}:{data:null,error:b}}}}catch(u){return ge(u)?{data:null,error:u}:{data:null,error:new Rr("Unexpected error in challenge",u)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},a){if(!n)return{data:null,error:new Rl("rpId is required for WebAuthn authentication")};try{if(!od())return{data:null,error:new Rr("Browser does not support WebAuthn",null)};const{data:l,error:u}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:o},{request:a});if(!l)return{data:null,error:u};const{webauthn:f}=l;return this._verify({factorId:t,challengeId:l.challengeId,webauthn:{type:f.type,rpId:n,rpOrigins:r,credential_response:f.credential_response}})}catch(l){return ge(l)?{data:null,error:l}:{data:null,error:new Rr("Unexpected error in authenticate",l)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},a){if(!n)return{data:null,error:new Rl("rpId is required for WebAuthn registration")};try{if(!od())return{data:null,error:new Rr("Browser does not support WebAuthn",null)};const{data:l,error:u}=await this._enroll({friendlyName:t});if(!l)return await this.client.mfa.listFactors().then(m=>{var g;return(g=m.data)===null||g===void 0?void 0:g.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===t&&b.status!=="unverified")}).then(m=>m?this.client.mfa.unenroll({factorId:m?.id}):void 0),{data:null,error:u};const{data:f,error:h}=await this._challenge({factorId:l.id,friendlyName:l.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:o},{create:a});return f?this._verify({factorId:l.id,challengeId:f.challengeId,webauthn:{rpId:n,rpOrigins:r,type:f.webauthn.type,credential_response:f.webauthn.credential_response}}):{data:null,error:h}}catch(l){return ge(l)?{data:null,error:l}:{data:null,error:new Rr("Unexpected error in register",l)}}}}mM();const CM={url:TL,storageKey:CL,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:RL,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Ai={};let tb=!1;class jl{get jwks(){var t,n;return(n=(t=Ai[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Ai[this.storageKey]=Object.assign(Object.assign({},Ai[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Ai[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Ai[this.storageKey]=Object.assign(Object.assign({},Ai[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,o;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const a=Object.assign(Object.assign({},CM),t);if(this.storageKey=a.storageKey,this.instanceID=(n=jl.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,jl.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!a.debug,typeof a.debug=="function"&&(this.logger=a.debug),this.instanceID>0&&on()){const l=`${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(l),this.logDebugMessages&&console.trace(l)}if(this.persistSession=a.persistSession,this.autoRefreshToken=a.autoRefreshToken,this.experimental=(r=a.experimental)!==null&&r!==void 0?r:{},this.admin=new hM({url:a.url,headers:a.headers,fetch:a.fetch,experimental:this.experimental}),this.url=a.url,this.headers=a.headers,this.fetch=gE(a.fetch),this.detectSessionInUrl=a.detectSessionInUrl,this.flowType=a.flowType,this.hasCustomAuthorizationHeader=a.hasCustomAuthorizationHeader,this.throwOnError=a.throwOnError,this.lockAcquireTimeout=a.lockAcquireTimeout,a.lock!=null&&(this.lock=a.lock,tb||(tb=!0,console.warn(`${this._logPrefix()} The "lock" option is deprecated and will be removed in v3. The client now coordinates session refreshes without a lock, so most apps can drop the option. See https://github.com/supabase/supabase-js/blob/master/packages/core/auth-js/migrations/lockless-coordination.md`))),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 TM(this)}
83,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(a.storage?this.storage=a.storage:mE()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Q0(this.memoryStorage)),a.userStorage&&(this.userStorage=a.userStorage)):(this.memoryStorage={},this.storage=Q0(this.memoryStorage)),on()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(l){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",l)}(o=this.broadcastChannel)===null||o===void 0||o.addEventListener("message",async l=>{this._debug("received broadcast notification from other tab or client",l),(l.data.event==="TOKEN_REFRESHED"||l.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(l.data.event,l.data.session,!1)}catch(u){this._debug("#broadcastChannel","error",u)}})}a.skipAutoInitialize||this.initialize().catch(l=>{this._debug("#initialize()","error",l)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${fE}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){var t;if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())();const n=await this.initializePromise,r=(t=this._pendingInitNotifications)!==null&&t!==void 0?t:[];this._pendingInitNotifications=null;for(const o of r)await this._notifyAllSubscribers(o.event,o.session,o.broadcast);return n}async _initialize(){var t;try{let n={},r="none";if(on()&&(n=V0(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),on()&&this.detectSessionInUrl&&r!=="none"){const{data:o,error:a}=await this._getSessionFromURL(n,r);if(a){if(this._debug("#_initialize()","error detecting session from URL",a),OL(a)){const f=(t=a.details)===null||t===void 0?void 0:t.code;if(f==="identity_already_exists"||f==="identity_not_found"||f==="single_identity_not_deletable")return{error:a}}return{error:a}}const{session:l,redirectType:u}=o;return this._debug("#_initialize()","detected session in URL",l,"redirect type",u),await this._saveSession(l),setTimeout(async()=>{u==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",l):await this._notifyAllSubscribers("SIGNED_IN",l)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return ge(n)?this._returnResult({error:n}):this._returnResult({error:new Rr("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,o;try{const a=await _e(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t?.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(o=t?.options)===null||o===void 0?void 0:o.captchaToken}},xform:lr}),{data:l,error:u}=a;if(u||!l)return this._returnResult({data:{user:null,session:null},error:u});const f=l.session,h=l.user;return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",f)),this._returnResult({data:{user:h,session:f},error:null})}catch(a){if(ge(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signUp(t){var n,r,o;let a=null;try{let l;if("email"in t){const{email:g,password:b,options:w}=t;let E=null,x=null;this.flowType==="pkce"&&([E,x,a]=await this._getCodeChallengeAndMethod()),l=await _e(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(w?.emailRedirectTo,a),body:{email:g,password:b,data:(n=w?.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:w?.captchaToken},code_challenge:E,code_challenge_method:x},xform:lr})}else if("phone"in t){const{phone:g,password:b,options:w}=t;l=await _e(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:g,password:b,data:(r=w?.data)!==null&&r!==void 0?r:{},channel:(o=w?.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:w?.captchaToken}},xform:lr})}else throw new Su("You must provide either an email or phone number and a password");const{data:u,error:f}=l;if(f||!u)return await Er(this.storage,this.storageKey,a),this._returnResult({data:{user:null,session:null},error:f});const h=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",h)),this._returnResult({data:{user:m,session:h},error:null})}catch(l){if(await Er(this.storage,this.storageKey,a),ge(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signInWithPassword(t){try{let n;if("email"in t){const{email:a,password:l,options:u}=t;n=await _e(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:l,gotrue_meta_security:{captcha_token:u?.captchaToken}},xform:K0})}else if("phone"in t){const{phone:a,password:l,options:u}=t;n=await _e(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:l,gotrue_meta_security:{captcha_token:u?.captchaToken}},xform:K0})}else throw new Su("You must provide either an email or phone number and a password");const{data:r,error:o}=n;
83if(o)return this._returnResult({data:{user:null,session:null},error:o});if(!r||!r.session||!r.user){const a=new Ri;return this._returnResult({data:{user:null,session:null},error:a})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:o})}catch(n){if(ge(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,o,a;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(o=t.options)===null||o===void 0?void 0:o.queryParams,skipBrowserRedirect:(a=t.options)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(t,n){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t,n)):this._exchangeCodeForSession(t,n)}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,o,a,l,u,f,h,m,g,b;let w,E;if("message"in t)w=t.message,E=t.signature;else{const{chain:x,wallet:S,statement:T,options:k}=t;let C;if(on())if(typeof S=="object")C=S;else{const J=window;if("ethereum"in J&&typeof J.ethereum=="object"&&"request"in J.ethereum&&typeof J.ethereum.request=="function")C=J.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 S!="object"||!k?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");C=S}const j=new URL((n=k?.url)!==null&&n!==void 0?n:window.location.href),O=await C.request({method:"eth_requestAccounts"}).then(J=>J).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!O||O.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const M=vE(O[0]);let D=(r=k?.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!D){const J=await C.request({method:"eth_chainId"});D=gM(J)}const q={domain:j.host,address:M,statement:T,uri:j.href,version:"1",chainId:D,nonce:(o=k?.signInWithEthereum)===null||o===void 0?void 0:o.nonce,issuedAt:(l=(a=k?.signInWithEthereum)===null||a===void 0?void 0:a.issuedAt)!==null&&l!==void 0?l:new Date,expirationTime:(u=k?.signInWithEthereum)===null||u===void 0?void 0:u.expirationTime,notBefore:(f=k?.signInWithEthereum)===null||f===void 0?void 0:f.notBefore,requestId:(h=k?.signInWithEthereum)===null||h===void 0?void 0:h.requestId,resources:(m=k?.signInWithEthereum)===null||m===void 0?void 0:m.resources};w=vM(q),E=await C.request({method:"personal_sign",params:[yM(w),M]})}try{const{data:x,error:S}=await _e(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:w,signature:E},!((g=t.options)===null||g===void 0)&&g.captchaToken?{gotrue_meta_security:{captcha_token:(b=t.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:lr});if(S)throw S;if(!x||!x.session||!x.user){const T=new Ri;return this._returnResult({data:{user:null,session:null},error:T})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:S})}catch(x){if(ge(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async signInWithSolana(t){var n,r,o,a,l,u,f,h,m,g,b,w;let E,x;if("message"in t)E=t.message,x=t.signature;else{const{chain:S,wallet:T,statement:k,options:C}=t;let j;if(on())if(typeof T=="object")j=T;else{const M=window;if("solana"in M&&typeof M.solana=="object"&&("signIn"in M.solana&&typeof M.solana.signIn=="function"||"signMessage"in M.solana&&typeof M.solana.signMessage=="function"))j=M.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof T!="object"||!C?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=T}
83const O=new URL((n=C?.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in j&&j.signIn){const M=await j.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},C?.signInWithSolana),{version:"1",domain:O.host,uri:O.href}),k?{statement:k}:null));let D;if(Array.isArray(M)&&M[0]&&typeof M[0]=="object")D=M[0];else if(M&&typeof M=="object"&&"signedMessage"in M&&"signature"in M)D=M;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in D&&"signature"in D&&(typeof D.signedMessage=="string"||D.signedMessage instanceof Uint8Array)&&D.signature instanceof Uint8Array)E=typeof D.signedMessage=="string"?D.signedMessage:new TextDecoder().decode(D.signedMessage),x=D.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in j)||typeof j.signMessage!="function"||!("publicKey"in j)||typeof j!="object"||!j.publicKey||!("toBase58"in j.publicKey)||typeof j.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");E=[`${O.host} wants you to sign in with your Solana account:`,j.publicKey.toBase58(),...k?["",k,""]:[""],"Version: 1",`URI: ${O.href}`,`Issued At: ${(o=(r=C?.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((a=C?.signInWithSolana)===null||a===void 0)&&a.notBefore?[`Not Before: ${C.signInWithSolana.notBefore}`]:[],...!((l=C?.signInWithSolana)===null||l===void 0)&&l.expirationTime?[`Expiration Time: ${C.signInWithSolana.expirationTime}`]:[],...!((u=C?.signInWithSolana)===null||u===void 0)&&u.chainId?[`Chain ID: ${C.signInWithSolana.chainId}`]:[],...!((f=C?.signInWithSolana)===null||f===void 0)&&f.nonce?[`Nonce: ${C.signInWithSolana.nonce}`]:[],...!((h=C?.signInWithSolana)===null||h===void 0)&&h.requestId?[`Request ID: ${C.signInWithSolana.requestId}`]:[],...!((g=(m=C?.signInWithSolana)===null||m===void 0?void 0:m.resources)===null||g===void 0)&&g.length?["Resources",...C.signInWithSolana.resources.map(D=>`- ${D}`)]:[]].join(` 84`);const M=await j.signMessage(new TextEncoder().encode(E),"utf8");if(!M||!(M instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");x=M}}try{const{data:S,error:T}=await _e(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:E,signature:Po(x)},!((b=t.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(w=t.options)===null||w===void 0?void 0:w.captchaToken}}:null),xform:lr});if(T)throw T;if(!S||!S.session||!S.user){const k=new Ri;return this._returnResult({data:{user:null,session:null},error:k})}return S.session&&(await this._saveSession(S.session),await this._notifyAllSubscribers("SIGNED_IN",S.session)),this._returnResult({data:Object.assign({},S),error:T})}catch(S){if(ge(S))return this._returnResult({data:{user:null,session:null},error:S});throw S}}async _exchangeCodeForSession(t,n){const r=n?.flowId!=null,o=r?Bu(n?.flowId):on()?Bu(V0(window.location.href)[jo]):null;r&&!o&&this._debug("#_exchangeCodeForSession()","provided flowId is not a valid flow id",n?.flowId);const{verifier:a,flowId:l}=r&&!o?{verifier:null,flowId:null}:await XL(this.storage,this.storageKey,o),[u,f]=(a??"").split("/");try{if(!u&&this.flowType==="pkce")throw new IL;const{data:h,error:m}=await _e(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:u},xform:lr});if(await Er(this.storage,this.storageKey,l),m)throw m;if(!h||!h.session||!h.user){const g=new Ri;return this._returnResult({data:{user:null,session:null,redirectType:null},error:g})}return h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers(f==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",h.session)),this._returnResult({data:Object.assign(Object.assign({},h),{redirectType:f??null}),error:m})}catch(h){if(await Er(this.storage,this.storageKey,l),ge(h))return this._returnResult({data:{user:null,session:null,redirectType:null},error:h});throw h}}async signInWithIdToken(t){try{const{options:n,provider:r,token:o,access_token:a,nonce:l}=t,u=await _e(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:o,access_token:a,nonce:l,gotrue_meta_security:{captcha_token:n?.captchaToken}},xform:lr}),{data:f,error:h}=u;if(h)return this._returnResult({data:{user:null,session:null},error:h});if(!f||!f.session||!f.user){const m=new Ri;return this._returnResult({data:{user:null,session:null},error:m})}return f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("SIGNED_IN",f.session)),this._returnResult({data:f,error:h})}catch(n){if(ge(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,o,a,l;let u=null;try{if("email"in t){const{email:f,options:h}=t;let m=null,g=null;this.flowType==="pkce"&&([m,g,u]=await this._getCodeChallengeAndMethod());const{error:b}=await _e(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:f,data:(n=h?.data)!==null&&n!==void 0?n:{},create_user:(r=h?.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:h?.captchaToken},code_challenge:m,code_challenge_method:g},redirectTo:this._maybeAppendFlowIdToRedirect(h?.emailRedirectTo,u)});return this._returnResult({data:{user:null,session:null},error:b})}if("phone"in t){const{phone:f,options:h}=t,{data:m,error:g}=await _e(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:f,data:(o=h?.data)!==null&&o!==void 0?o:{},create_user:(a=h?.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:h?.captchaToken},channel:(l=h?.channel)!==null&&l!==void 0?l:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:m?.message_id},error:g})}throw new Su("You must provide either an email or phone number.")}catch(f){if(await Er(this.storage,this.storageKey,u),ge(f))return this._returnResult({data:{user:null,session:null},error:f});throw f}}async verifyOtp(t){var n,r;try{let o,a;"options"in t&&(o=(n=t.options)===null||n===void 0?void 0:n.redirectTo,a=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:l,error:u}=await _e(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:a}}),redirectTo:o,xform:lr});if(u)throw u;if(!l)throw new Error("An error occurred on token verification.");const f=l.session,h=l.user;return f?.access_token&&(await this._saveSession(f),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",f)),this._returnResult({data:{user:h,session:f},error:null})}catch(o){if(ge(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithSSO(t){var n,r,o,a;let l=null;try{let u=null,f=null;this.flowType==="pkce"&&([u,f,l]=await this._getCodeChallengeAndMethod());const h=await _e(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:this._maybeAppendFlowIdToRedirect((n=t.options)===null||n===void 0?void 0:n.redirectTo,l)}),!((r=t?.options)===null||r===void 0)&&r.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:u,code_challenge_method:f}),headers:this.headers,xform:uM});return!((o=h.data)===null||o===void 0)&&o.url&&on()&&!(!((a=t.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(h.data.url),this._returnResult(h)}catch(u){if(await Er(this.storage,this.storageKey,l),ge(u))return this._returnResult({data:null,error:u});throw u}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new Zt;const{error:o}=await _e(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:o})})}catch(t){if(ge(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){let n=null;try{const r=`${this.url}/resend`;if("email"in t){const{email:o,type:a,options:l}=t;let u=null,f=null;this.flowType==="pkce"&&([u,f,n]=await this._getCodeChallengeAndMethod());const{error:h}=await _e(this.fetch,"POST",r,{headers:this.headers,body:{email:o,type:a,gotrue_meta_security:{captcha_token:l?.captchaToken},code_challenge:u,code_challenge_method:f},redirectTo:this._maybeAppendFlowIdToRedirect(l?.emailRedirectTo,n)});return h&&await Er(this.storage,this.storageKey,n),this._returnResult({data:{user:null,session:null},error:h})}else if("phone"in t){const{phone:o,type:a,options:l}=t,{data:u,error:f}=await _e(this.fetch,"POST",r,{headers:this.headers,body:{phone:o,type:a,gotrue_meta_security:{captcha_token:l?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:u?.message_id},error:f})}throw new Su("You must provide either an email or phone number and a type")}catch(r){if(await Er(this.storage,this.storageKey,n),ge(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),o=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await o}catch{}})()),o}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const o=[...this.pendingInLock];await Promise.all(o),this.pendingInLock.splice(0,o.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await yn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
84id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<up:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const l=await yn(this.userStorage,this.storageKey+"-user");l?.user?t.user=l.user:t.user=dp()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const l={value:this.suppressGetSessionWarning};t.user=aM(t.user,l),l.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:o,error:a}=await this._callRefreshToken(t.refresh_token);if(a){if(!!(t.expires_at&&t.expires_at*1e3>Date.now())){const u=await yn(this.storage,this.storageKey);if(u&&u.refresh_token===t.refresh_token)return this._returnResult({data:{session:t},error:null})}return this._returnResult({data:{session:null},error:a})}return this._returnResult({data:{session:o},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;let n;return this.lock!=null?n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):n=await this._getUser(),n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await _e(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Js}):await this._useSession(async n=>{var r,o,a;const{data:l,error:u}=n;if(u)throw u;return!(!((r=l.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Zt}:await _e(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(o=l.session)===null||o===void 0?void 0:o.access_token)!==null&&a!==void 0?a:void 0,xform:Js})})}catch(n){if(ge(n))return _u(n)&&await this._removeSession(),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n)):await this._updateUser(t,n)}async _updateUser(t,n={}){let r=null;try{return await this._useSession(async o=>{const{data:a,error:l}=o;if(l)throw l;if(!a.session)throw new Zt;const u=a.session;let f=null,h=null;this.flowType==="pkce"&&t.email!=null&&([f,h,r]=await this._getCodeChallengeAndMethod());const{data:m,error:g}=await _e(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(n?.emailRedirectTo,r),body:Object.assign(Object.assign({},t),{code_challenge:f,code_challenge_method:h}),jwt:u.access_token,xform:Js});if(g)throw g;return u.user=m.user,await this._saveSession(u),await this._notifyAllSubscribers("USER_UPDATED",u),this._returnResult({data:{user:u.user},error:null})})}catch(o){if(await Er(this.storage,this.storageKey,r),ge(o))return this._returnResult({data:{user:null},error:o});throw o}}async setSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t)):await this._setSession(t)}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Zt;const n=Date.now()/1e3;let r=n,o=!0,a=null;const{payload:l}=Tu(t.access_token);if(l.exp&&(r=l.exp,o=r<=n),o){const{data:u,error:f}=await this._callRefreshToken(t.refresh_token);if(f)return this._returnResult({data:{user:null,session:null},error:f});if(!u)return{data:{user:null,session:null},error:null};a=u}else{const{data:u,error:f}=await this._getUser(t.access_token);if(f)return this._returnResult({data:{user:null,session:null},error:f});a={access_token:t.access_token,refresh_token:t.refresh_token,user:u.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return this._returnResult({data:{user:a.user,session:a},error:null})}catch(n){if(ge(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:l,error:u}=n;if(u)throw u;t=(r=l.session)!==null&&r!==void 0?r:void 0}if(!t?.refresh_token)throw new Zt;const{data:o,error:a}=await this._callRefreshToken(t.refresh_token);return a?this._returnResult({data:{user:null,session:null},error:a}):o?this._returnResult({data:{user:o.user,session:o},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(ge(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){var r;try{if(!on())throw new Eu("No browser detected.");
84if(t.error||t.error_description||t.error_code)throw new Eu(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new $0("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Eu("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new $0("No code detected.");const{data:C,error:j}=await this._exchangeCodeForSession(t.code,{flowId:t[jo]});if(j)throw j;const O=new URL(window.location.href);return O.searchParams.delete("code"),O.searchParams.delete(jo),window.history.replaceState(window.history.state,"",O.toString()),{data:{session:C.session,redirectType:(r=C.redirectType)!==null&&r!==void 0?r:null},error:null}}const{provider_token:o,provider_refresh_token:a,access_token:l,refresh_token:u,expires_in:f,expires_at:h,token_type:m}=t;if(!l||!f||!u||!m)throw new Eu("No session defined in URL");const g=Math.round(Date.now()/1e3),b=parseInt(f);let w=g+b;h&&(w=parseInt(h));const E=w-g;E*1e3<=vs&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${E}s, should have been closer to ${b}s`);const x=w-b;g-x>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",x,w,g):g-x<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",x,w,g);const{data:S,error:T}=await this._getUser(l);if(T)throw T;const k={provider_token:o,provider_refresh_token:a,access_token:l,expires_in:b,expires_at:w,refresh_token:u,token_type:m,user:S.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:k,redirectType:t.type},error:null})}catch(o){if(ge(o))return this._returnResult({data:{session:null,redirectType:null},error:o});throw o}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error||t.error_description||t.error_code)}async _isPKCECallback(t){if(!t.code)return!1;const n=Bu(t[jo]);return n&&await yn(this.storage,Qi(this.storageKey,n))?!0:!!await yn(this.storage,`${this.storageKey}-code-verifier`)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const o=async()=>{await this._removeSession()},{data:a,error:l}=n;if(l&&!_u(l))return this._returnResult({error:l});const u=(r=a.session)===null||r===void 0?void 0:r.access_token;if(u){const{error:f}=await this.admin.signOut(u,t);if(f&&!(M0(f)&&(f.status===404||f.status===401||f.status===403)||_u(f)))return t!=="others"&&await o(),this._returnResult({error:f})}return t!=="others"&&await o(),this._returnResult({error:null})})}onAuthStateChange(t){const n=BL(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)}):await this._emitInitialSession(n)))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,o;try{const{data:{session:a},error:l}=n;if(l)throw l;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",a)),this._debug("INITIAL_SESSION","callback id",t,"session",a)}catch(a){await((o=this.stateChangeEmitters.get(t))===null||o===void 0?void 0:o.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",a),_u(a)||ku(a)||M0(a)&&(a.code==="refresh_token_not_found"||a.code==="refresh_token_already_used"||a.code==="session_expired")?console.warn(a):console.error(a)}})}async resetPasswordForEmail(t,n={}){let r=null,o=null,a=null;this.flowType==="pkce"&&([r,o,a]=await this._getCodeChallengeAndMethod(!0));try{return await _e(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:o,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(n.redirectTo,a)})}catch(l){if(await Er(this.storage,this.storageKey,a),ge(l))return this._returnResult({data:null,error:l});throw l}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;let r=null;try{const{data:o,error:a}=await this._useSession(async l=>{var u,f,h,m,g;const{data:b,error:w}=l;if(w)throw w;const{url:E,flowId:x}=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(u=t.options)===null||u===void 0?void 0:u.redirectTo,scopes:(f=t.options)===null||f===void 0?void 0:f.scopes,queryParams:(h=t.options)===null||h===void 0?void 0:h.queryParams,skipBrowserRedirect:!0});return r=x,await _e(this.fetch,"GET",E,{headers:this.headers,jwt:(g=(m=b.session)===null||m===void 0?void 0:m.access_token)!==null&&g!==void 0?g:void 0})});if(a)throw a;return on()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(o?.url),this._returnResult({data:{provider:t.provider,url:o?.url,flowId:r},error:null})}catch(o){if(ge(o))return this._returnResult({data:{provider:t.provider,url:null,flowId:r},error:o});throw o}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:o,data:{session:a}}=n;if(o)throw o;const{options:l,provider:u,token:f,access_token:h,nonce:m}
84=t,g=await _e(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=a?.access_token)!==null&&r!==void 0?r:void 0,body:{provider:u,id_token:f,access_token:h,nonce:m,link_identity:!0,gotrue_meta_security:{captcha_token:l?.captchaToken}},xform:lr}),{data:b,error:w}=g;return w?this._returnResult({data:{user:null,session:null},error:w}):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new Ri}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:w}))}catch(o){if(await Er(this.storage,this.storageKey,null),ge(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,o;const{data:a,error:l}=n;if(l)throw l;return await _e(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(o=(r=a.session)===null||r===void 0?void 0:r.access_token)!==null&&o!==void 0?o:void 0})})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n="#_refreshAccessToken()";this._debug(n,"begin");try{const r=Date.now();return await WL(async o=>(o>0&&await VL(200*Math.pow(2,o-1)),this._debug(n,"refreshing attempt",o),await _e(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:lr})),(o,a)=>{const l=200*Math.pow(2,o);return a&&ku(a)&&Date.now()+l-r<vs})}catch(r){if(this._debug(n,"error",r),ge(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const{url:r,flowId:o}=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),on()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r,flowId:o},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const o=await yn(this.storage,this.storageKey);if(o&&this.userStorage){let l=await yn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!l&&(l={user:o.user},await ws(this.userStorage,this.storageKey+"-user",l)),o.user=(t=l?.user)!==null&&t!==void 0?t:dp()}else if(o&&!o.user&&!o.user){const l=await yn(this.storage,this.storageKey+"-user");l&&l?.user?(o.user=l.user,await Ln(this.storage,this.storageKey+"-user"),await ws(this.storage,this.storageKey,o)):o.user=dp()}if(this._debug(r,"session from storage",o),!this._isValidSession(o)){this._debug(r,"session is not valid"),o!==null&&await this._removeSession();return}const a=((n=o.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<up;if(this._debug(r,`session has${a?"":" not"} expired with margin of ${up}s`),a){if(this.autoRefreshToken&&o.refresh_token){const{error:l}=await this._callRefreshToken(o.refresh_token);l&&(DL(l)?this._debug(r,"refresh discarded by commit guard",l):this._debug(r,"refresh failed",l))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:l,error:u}=await this._getUser(o.access_token);!u&&l?.user?(o.user=l.user,await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(l){console.error("Error getting user data:",l),this._debug(r,"error getting user data, skipping SIGNED_IN notification",l)}else await this._notifyAllSubscribers("SIGNED_IN",o)}catch(o){this._debug(r,"error",o),ku(o)?console.warn(o):console.error(o);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new Zt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===t&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning c
84ached failure (cooldown active)"),this.lastRefreshFailure.result;const o="#_callRefreshToken()";this._debug(o,"begin");try{this.refreshingDeferred=new Bd,this.refreshingDeferred.promise.then(void 0,()=>{});const a=await yn(this.storage,this.storageKey),{data:l,error:u}=await this._refreshAccessToken(t);if(u)throw u;if(!l.session)throw new Zt;const f=await yn(this.storage,this.storageKey);if(a!==null&&(f===null||f.refresh_token!==a.refresh_token)){this._debug(o,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:f?"replaced":"cleared"});const b={data:null,error:new F0};return this.refreshingDeferred.resolve(b),b}const m=this._sessionRemovalEpoch;if(await this._saveSession(l.session),this._sessionRemovalEpoch!==m){this._debug(o,"commit guard (post-save): _removeSession ran during _saveSession, undoing write"),await Ln(this.storage,this.storageKey),this.userStorage&&await Ln(this.userStorage,this.storageKey+"-user");const b={data:null,error:new F0};return this.refreshingDeferred.resolve(b),b}await this._notifyAllSubscribers("TOKEN_REFRESHED",l.session);const g={data:l.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(g),g}catch(a){if(this._debug(o,"error",a),ge(a)){const l={data:null,error:a};if(!ku(a)){const u=await yn(this.storage,this.storageKey);!!(u?.expires_at&&u.expires_at*1e3>Date.now())?this._debug(o,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:t,result:l,expiresAt:Date.now()+kL},(n=this.refreshingDeferred)===null||n===void 0||n.resolve(l),l}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(a),a}finally{this.refreshingDeferred=null,this._debug(o,"end")}}async _notifyAllSubscribers(t,n,r=!0){if(this._pendingInitNotifications!==null&&r){this._pendingInitNotifications.push({event:t,session:n,broadcast:r});return}const o=`#_notifyAllSubscribers(${t})`;this._debug(o,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const a=[],l=Array.from(this.stateChangeEmitters.values()).map(async u=>{try{await u.callback(t,n)}catch(f){a.push(f)}});if(await Promise.all(l),a.length>0){for(let u=0;u<a.length;u+=1)console.error(a[u]);throw a[0]}}finally{this._debug(o,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await ws(this.userStorage,this.storageKey+"-user",{user:n.user});const o=Object.assign({},n);delete o.user;const a=W0(o);await ws(this.storage,this.storageKey,a)}else{const o=W0(n);await ws(this.storage,this.storageKey,o)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Ln(this.storage,this.storageKey),await ZL(this.storage,this.storageKey),await Ln(this.storage,this.storageKey+"-user"),this.userStorage&&await Ln(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&on()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),vs);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((r.expires_at*1e3-t)/vs);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${vs}ms, refresh threshold is ${ll} ticks`),o<=ll&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof pM)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((r.expires_at*1e3-t)/vs);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${vs}ms, refresh threshold is ${ll} ticks`),o<=ll&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!on()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;if(this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
84{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(n,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){let o=r?.redirectTo,a=null,l=null,u=null;this.flowType==="pkce"&&([a,l,u]=await this._getCodeChallengeAndMethod(),o=this._maybeAppendFlowIdToRedirect(o,u));const f=[`provider=${encodeURIComponent(n)}`];if(o&&f.push(`redirect_to=${encodeURIComponent(o)}`),r?.scopes&&f.push(`scopes=${encodeURIComponent(r.scopes)}`),a!=null&&l!=null){const h=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(l)}`});f.push(h.toString())}if(r?.queryParams){const h=new URLSearchParams(r.queryParams);f.push(h.toString())}return r?.skipBrowserRedirect&&f.push(`skip_http_redirect=${r.skipBrowserRedirect}`),{url:`${t}?${f.join("&")}`,flowId:u}}_maybeAppendFlowIdToRedirect(t,n){return!t||!n||!this.experimental.appendPkceFlowIdToRedirects?t??void 0:eM(t,n)}async _getCodeChallengeAndMethod(t=!1){return tM(this.storage,this.storageKey,t,n=>this._debug("#_getCodeChallengeAndMethod()","evicted oldest pending PKCE verifier slot",n))}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:o,error:a}=n;return a?this._returnResult({data:null,error:a}):await _e(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=o?.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,o;const{data:a,error:l}=n;if(l)return this._returnResult({data:null,error:l});const u=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:f,error:h}=await _e(this.fetch,"POST",`${this.url}/factors`,{body:u,headers:this.headers,jwt:(r=a?.session)===null||r===void 0?void 0:r.access_token});return h?this._returnResult({data:null,error:h}):(t.factorType==="totp"&&f.type==="totp"&&(!((o=f?.totp)===null||o===void 0)&&o.qr_code)&&(f.totp.qr_code=`data:image/svg+xml;utf-8,${f.totp.qr_code}`),this._returnResult({data:f,error:null}))})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){const n=async()=>{try{return await this._useSession(async r=>{var o;const{data:a,error:l}=r;if(l)return this._returnResult({data:null,error:l});const u=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?Z0(t.webauthn.credential_response):eb(t.webauthn.credential_response)})}:{code:t.code}),{data:f,error:h}=await _e(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:u,headers:this.headers,jwt:(o=a?.session)===null||o===void 0?void 0:o.access_token});return h?this._returnResult({data:null,error:h}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+f.expires_in},f)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",f),this._returnResult({data:f,error:h}))})}catch(r){if(ge(r))return this._returnResult({data:null,error:r});throw r}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challenge(t){const n=async()=>{try{return await this._useSession(async r=>{var o;const{data:a,error:l}=r;if(l)return this._returnResult({data:null,error:l});const u=await _e(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(o=a?.session)===null||o===void 0?void 0:o.access_token});if(u.error)return u;const{data:f}=u;if(f.type!=="webauthn")return{data:f,error:null};switch(f.webauthn.type){case"create":return{data:Object.assign(Object.assign({},f),{webauthn:Object.assign(Object.assign({},f.webauthn),{credential_options:Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:J0(f.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},f),{webauthn:Object.assign(Object.assign({},f.webauthn),{credential_options:Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:X0(f.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(ge(r))return this._returnResult({data:null,error:r});throw r}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const o={all:[],phone:[],totp:[],webauthn:[]};for(const a of(t=n?.factors)!==null&&t!==void 0?t:[])o.all.push(a),a.status==="verified"&&o[a.factor_type].push(a);return{data:o,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,o,a;if(t)try{const{payload:w}=Tu(t);let E=null;w.aal&&(E=w.aal);let x=E;const{data:{user:S},error:T}=await this.getUser(t);if(T)return this._returnResult({data:null,error:T});((r=(n=S?.factors)===null||n===void 0?void 0:n.filter(j=>j.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(x="aal2");const C=w.amr||[];return{data:{currentLevel:E,nextLevel:x,currentAuthenticationMethods:C},error:null}}catch(w){if(ge(w))return this._returnResult({data:null,error:w});throw w}const{data:{session:l},error:u}
84=await this.getSession();if(u)return this._returnResult({data:null,error:u});if(!l)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:f}=Tu(l.access_token);let h=null;f.aal&&(h=f.aal);let m=h;((a=(o=l.user.factors)===null||o===void 0?void 0:o.filter(w=>w.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(m="aal2");const b=f.amr||[];return{data:{currentLevel:h,nextLevel:m,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:o}=n;return o?this._returnResult({data:null,error:o}):r?await _e(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:a=>({data:a,error:null})}):this._returnResult({data:null,error:new Zt})})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:o},error:a}=r;if(a)return this._returnResult({data:null,error:a});if(!o)return this._returnResult({data:null,error:new Zt});const l=await _e(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"approve"},xform:u=>({data:u,error:null})});return l.data&&l.data.redirect_url&&on()&&!n?.skipBrowserRedirect&&window.location.assign(l.data.redirect_url),l})}catch(r){if(ge(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:o},error:a}=r;if(a)return this._returnResult({data:null,error:a});if(!o)return this._returnResult({data:null,error:new Zt});const l=await _e(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"deny"},xform:u=>({data:u,error:null})});return l.data&&l.data.redirect_url&&on()&&!n?.skipBrowserRedirect&&window.location.assign(l.data.redirect_url),l})}catch(r){if(ge(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await _e(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new Zt})})}catch(t){if(ge(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:o}=n;return o?this._returnResult({data:null,error:o}):r?(await _e(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Zt})})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(u=>u.kid===t);if(r)return r;const o=Date.now();if(r=this.jwks.keys.find(u=>u.kid===t),r&&this.jwks_cached_at+PL>o)return r;const{data:a,error:l}=await _e(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(l)throw l;return!a.keys||a.keys.length===0||(this.jwks=a,this.jwks_cached_at=o,r=a.keys.find(u=>u.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:w,error:E}
84=await this.getSession();if(E||!w.session)return this._returnResult({data:null,error:E});r=w.session.access_token}const{header:o,payload:a,signature:l,raw:{header:u,payload:f}}=Tu(r);if(!n?.allowExpired)try{sM(a.exp)}catch(w){throw new nd(w instanceof Error?w.message:"JWT validation failed")}const h=!o.alg||o.alg.startsWith("HS")||!o.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(o.kid,n?.keys?{keys:n.keys}:n?.jwks);if(!h){const{error:w}=await this.getUser(r);if(w)throw w;return{data:{claims:a,header:o,signature:l},error:null}}const m=oM(o.alg),g=await crypto.subtle.importKey("jwk",h,m,!0,["verify"]);if(!await crypto.subtle.verify(m,g,l,UL(`${u}.${f}`)))throw new nd("Invalid JWT signature");return{data:{claims:a,header:o,signature:l},error:null}}catch(r){if(ge(r))return this._returnResult({data:null,error:r});throw r}}async signInWithPasskey(t){var n,r,o;Tr(this.experimental);try{if(!od())return this._returnResult({data:null,error:new Rr("Browser does not support WebAuthn",null)});const{data:a,error:l}=await this._startPasskeyAuthentication({options:{captchaToken:(n=t?.options)===null||n===void 0?void 0:n.captchaToken}});if(l||!a)return this._returnResult({data:null,error:l});const u=X0(a.options),f=(o=(r=t?.options)===null||r===void 0?void 0:r.signal)!==null&&o!==void 0?o:fm.createNewAbortSignal(),{data:h,error:m}=await xE({publicKey:u,signal:f});if(m||!h)return this._returnResult({data:null,error:m??new Rr("WebAuthn ceremony failed",null)});const g=eb(h);return this._verifyPasskeyAuthentication({challengeId:a.challenge_id,credential:g})}catch(a){if(ge(a))return this._returnResult({data:null,error:a});throw a}}async registerPasskey(t){var n,r;Tr(this.experimental);try{if(!od())return this._returnResult({data:null,error:new Rr("Browser does not support WebAuthn",null)});const{data:o,error:a}=await this._startPasskeyRegistration();if(a||!o)return this._returnResult({data:null,error:a});const l=J0(o.options),u=(r=(n=t?.options)===null||n===void 0?void 0:n.signal)!==null&&r!==void 0?r:fm.createNewAbortSignal(),{data:f,error:h}=await bE({publicKey:l,signal:u});if(h||!f)return this._returnResult({data:null,error:h??new Rr("WebAuthn ceremony failed",null)});const m=Z0(f);return this._verifyPasskeyRegistration({challengeId:o.challenge_id,credential:m})}catch(o){if(ge(o))return this._returnResult({data:null,error:o});throw o}}async _startPasskeyRegistration(){Tr(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new Zt});const{data:o,error:a}=await _e(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:o,error:null})})}catch(t){if(ge(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){Tr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!r)return this._returnResult({data:null,error:new Zt});const{data:a,error:l}=await _e(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:r.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:a,error:null})})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(t){var n;Tr(this.experimental);try{const{data:r,error:o}=await _e(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=t?.options)===null||n===void 0?void 0:n.captchaToken}}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:r,error:null})}catch(r){if(ge(r))return this._returnResult({data:null,error:r});throw r}}async _verifyPasskeyAuthentication(t){Tr(this.experimental);try{const{data:n,error:r}=await _e(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:lr});return r?this._returnResult({data:null,error:r}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){Tr(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new Zt});const{data:o,error:a}=await _e(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:l=>({data:l,error:null})});return a?this._returnResult({data:null,error:a}):this._returnResult({data:o,error:null})})}catch(t){if(ge(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){Tr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:o}=n;
84if(o)return this._returnResult({data:null,error:o});if(!r)return this._returnResult({data:null,error:new Zt});const{data:a,error:l}=await _e(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:r.access_token,body:{friendly_name:t.friendlyName}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:a,error:null})})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(t){Tr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!r)return this._returnResult({data:null,error:new Zt});const{error:a}=await _e(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:r.access_token,noResolveJson:!0});return a?this._returnResult({data:null,error:a}):this._returnResult({data:null,error:null})})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}}}jl.nextInstanceID={};const RM=jl,AM="2.112.4";let cl="",ad;if(typeof Deno<"u"){var hp;cl="deno",ad=(hp=Deno.version)===null||hp===void 0?void 0:hp.deno}else if(typeof document<"u")cl="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")cl="react-native";else{var pp;cl="node";const e=globalThis.process;ad=e==null||(pp=e.version)===null||pp===void 0?void 0:pp.replace(/^v/,"")}const _E=[`runtime=${cl}`];ad&&_E.push(`runtime-version=${ad}`);const jM={"X-Client-Info":`supabase-js/${AM}; ${_E.join("; ")}`},PM={headers:jM},NM={schema:"public"},OM={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},IM={},DM={enabled:!1,respectSamplingDecision:!0};function LM(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[n,r,o,a]=t;if(n.length!==2||r.length!==32||o.length!==16||a.length!==2)return null;const l=/^[0-9a-f]+$/i;return!l.test(n)||!l.test(r)||!l.test(o)||!l.test(a)||r==="00000000000000000000000000000000"||o==="0000000000000000"?null:{version:n,traceId:r,parentId:o,traceFlags:a,isSampled:(parseInt(a,16)&1)===1}}function MM(e,t){if(!e||!t||t.length===0)return!1;let n;if(e instanceof URL)n=e;else try{n=new URL(e)}catch{return!1}for(const r of t)try{if(typeof r=="string"){if($M(n.hostname,r))return!0}else if(r instanceof RegExp){if(r.test(n.hostname))return!0}else if(typeof r=="function"&&r(n))return!0}catch{continue}return!1}function $M(e,t){if(t===e)return!0;if(t.startsWith("*.")){const n=t.slice(2);if(e.endsWith(n)&&(e===n||e.endsWith("."+n)))return!0}return!1}function FM(e){const t=[];try{const n=new URL(e);t.push(n.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function Pl(e){"@babel/helpers - typeof";return Pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pl(e)}function UM(e,t){if(Pl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zM(e){var t=UM(e,"string");return Pl(t)=="symbol"?t:t+""}function BM(e,t,n){return(t=zM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function kt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nb(Object(n),!0).forEach(function(r){BM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const HM=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),VM=()=>Headers,SE=e=>e.startsWith("sb_publishable_")||e.startsWith("sb_secret_"),WM="sb_temp_",rb=new Set,qM=e=>{var t,n;if(!e.startsWith("sb_")||SE(e)||e.startsWith(WM))return;const r=(t=(n=e.match(/^sb_[a-zA-Z0-9]+_/))===null||n===void 0?void 0:n[0])!==null&&t!==void 0?t:"unknown";rb.has(r)||(rb.add(r),console.warn("@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is;
84 if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type."))},sb=(e,t,n,r,o,a)=>{const l=HM(r),u=VM(),f=o?.enabled===!0,h=o?.respectSamplingDecision!==!1,m=f?FM(t):null,g=!(a?.omitApiKeyAsBearer&&SE(e));return async(b,w)=>{const E=await n();let x=new u(w?.headers);if(x.has("apikey")||x.set("apikey",e),!x.has("Authorization")){const S=E??(g?e:null);S&&x.set("Authorization",`Bearer ${S}`)}if(m){const S=GM(b,m,h);S&&(S.traceparent&&!x.has("traceparent")&&x.set("traceparent",S.traceparent),S.tracestate&&!x.has("tracestate")&&x.set("tracestate",S.tracestate),S.baggage&&!x.has("baggage")&&x.set("baggage",S.baggage))}return l(b,kt(kt({},w),{},{headers:x}))}};let ob=!1,ib=!1;function GM(e,t,n){const r=GD();if(!r)return ob||(ob=!0,console.warn("@supabase/supabase-js: tracePropagation is enabled but the tracing runtime is not loaded, so trace headers will not be attached. Add `import '@supabase/supabase-js/tracing'` at your application entry point (requires the OpenTelemetry API package to be installed). The CDN/UMD build does not support trace propagation.")),null;if(!MM(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const o=r();if(!o||!o.traceparent){var a;if(!(o==null||(a=o.carrierKeys)===null||a===void 0)&&a.length&&!ib){ib=!0;const l=o.carrierKeys.includes("sentry-trace")?" Sentry detected: set `propagateTraceparent: true` in Sentry.init() to emit it.":" Configure your tracing SDK to emit W3C trace context on outgoing requests.";console.warn(`@supabase/supabase-js: tracePropagation is enabled and a tracing SDK is active, but its propagator wrote [${o.carrierKeys.join(", ")}] and no W3C traceparent header, so trace headers will not be attached.`+l)}return null}if(n){const l=LM(o.traceparent);if(l&&!l.isSampled)return{traceparent:o.traceparent}}return o}function ab(e){return typeof e=="boolean"?{enabled:e}:e}function KM(e){return e.endsWith("/")?e:e+"/"}function YM(e,t){var n,r,o,a,l,u;const{db:f,auth:h,realtime:m,global:g}=e,{db:b,auth:w,realtime:E,global:x}=t,S=ab(e.tracePropagation),T=ab(t.tracePropagation),k={db:kt(kt({},b),f),auth:kt(kt({},w),h),realtime:kt(kt({},E),m),storage:{},global:kt(kt(kt({},x),g),{},{headers:kt(kt({},(n=x?.headers)!==null&&n!==void 0?n:{}),(r=g?.headers)!==null&&r!==void 0?r:{})}),tracePropagation:{enabled:(o=(a=S?.enabled)!==null&&a!==void 0?a:T?.enabled)!==null&&o!==void 0?o:!1,respectSamplingDecision:(l=(u=S?.respectSamplingDecision)!==null&&u!==void 0?u:T?.respectSamplingDecision)!==null&&l!==void 0?l:!0},accessToken:async()=>""};return e.accessToken?k.accessToken=e.accessToken:delete k.accessToken,k}function QM(e){const t=e?.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(KM(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var JM=class extends RM{constructor(e){super(e)}},XM=class{constructor(e,t,n){var r,o;this.supabaseUrl=e,this.supabaseKey=t;const a=QM(e);if(!t)throw new Error("supabaseKey is required.");qM(t),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:NM,realtime:IM,auth:kt(kt({},OM),{},{storageKey:l}),global:PM,tracePropagation:DM},f=YM(n??{},u);if(this.settings=f,this.storageKey=(r=f.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(o=f.global.headers)!==null&&o!==void 0?o:{},f.accessToken)this.accessToken=f.accessToken,this.auth=new Proxy({},{get:(m,g)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(g)} is not possible`)}});else{var h;this.auth=this._initSupabaseAuthClient((h=f.auth)!==null&&h!==void 0?h:{},this.headers,f.global.fetch)}this.fetch=sb(t,e,this._getSessionToken.bind(this),f.global.fetch,f.tracePropagation),this.functionsFetch=sb(t,e,this._getSessionToken.bind(this),f.global.fetch,f.tracePropagation,{omitApiKeyAsBearer
84:!0}),this.realtime=this._initRealtimeClient(kt({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},f.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(m=>this.realtime.setAuth(m)).catch(m=>console.warn("Failed to set initial Realtime auth token:",m)),this.rest=new o2(new URL("rest/v1",a).href,{headers:this.headers,schema:f.db.schema,fetch:this.fetch,timeout:f.db.timeout,urlLengthLimit:f.db.urlLengthLimit,retry:f.db.retry}),this.storage=new EL(this.storageUrl.href,this.headers,this.fetch,n?.storage),f.accessToken||this._listenForAuthEvents()}get functions(){return new QD(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getSessionToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:null}async _getAccessToken(){var e=this,t;return(t=await e._getSessionToken())!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:o,storageKey:a,flowType:l,lock:u,debug:f,throwOnError:h,experimental:m,lockAcquireTimeout:g,skipAutoInitialize:b},w,E){const x={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new JM({url:this.authUrl.href,headers:kt(kt({},x),w),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:o,flowType:l,lock:u,debug:f,throwOnError:h,experimental:m,fetch:E,lockAcquireTimeout:g,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(S=>S.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new K2(this.realtimeUrl.href,kt(kt({},e),{},{params:kt(kt({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t?.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN"||e==="INITIAL_SESSION")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const ZM=(e,t,n)=>new XM(e,t,n);function e$(){if(typeof window<"u"||globalThis.Deno!==void 0)return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=20:!1}e$()&&console.warn("â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");const hm=HD(),Me=ZM(hm.url,hm.anonKey,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}});typeof window<"u"&&console.log(`[Supabase] Connected to ${aa()} environment: ${hm.url}`);const EE={artsDirectoryEnabled:!1,volunteerRotaEnabled:!1};let Li=null,Hu=null;async function t$(){const{data:e}=await Me.from("site_settings").select("setting_key, setting_value").in("setting_key",["arts_directory_enabled","volunteer_rota_enabled"]),t={...EE};if(e)for(const n of e)n.setting_key==="arts_directory_enabled"&&(t.artsDirectoryEnabled=n.setting_value!=="false"),n.setting_key==="volunteer_rota_enabled"&&(t.volunteerRotaEnabled=n.setting_value==="true");return Li=t,t}function kE(){const[e,t]=y.useState(Li??EE),[n,r]=y.useState(!Li);return y.useEffect(()=>{if(Li){t(Li),r(!1);return}Hu||(Hu=t$()),Hu.then(o=>{t(o),r(!1)})},[]),{flags:e,loading:n}}function SB(){Li=null,Hu=null}function Hd(){const[e,t]=y.useState(null),[n,r]=y.useState(null),[o,a]=y.useState(!0),[l,u]=y.useState(!1),[f,h]=y.useState(!1),[m,g]=y.useState(!1),[b,w]=y.useState(!1),[E,x]=y.useState(!1),[S,T]=y.useState([]),[k,C]=y.useState(null),[j,O]=y.useState(null),[M,D]=y.useState(!1),q=l||m||b||E;y.useEffect(()=>{let G=!0;const{data:{subscription:Q}}=Me.auth.onAuthStateChange((te,B)=>{G&&(r(B),t(B?.user??null),B?.user?G&&(J(B.user.id),ne(B.user.id),ie(B.user.id)):(u(!1),h(!1),g(!1),w(!1),x(!1),T([]),C(null),O(null),D(!1),a(!1)))});return Me.auth.getSession().then(({data:{session:te}}
84)=>{G&&(r(te),t(te?.user??null),te?.user?(J(te.user.id),ne(te.user.id),ie(te.user.id)):a(!1))}),()=>{G=!1,Q.unsubscribe()}},[]);const J=async G=>{try{const{data:Q}=await Me.from("user_roles").select("role").eq("user_id",G),te=Q?.some(z=>z.role==="admin")??!1,B=Q?.some(z=>z.role==="member")??!1,F=Q?.some(z=>z.role==="show_admin")??!1,W=Q?.some(z=>z.role==="marketing")??!1,N=Q?.some(z=>z.role==="trustee")??!1;if(u(te),h(B),g(F),w(W),x(N),F&&!te){const{data:z}=await Me.from("production_admins").select("production_id").eq("user_id",G);T(z?.map(Y=>Y.production_id)??[])}else te&&T([])}finally{a(!1)}},ne=async G=>{const{data:Q}=await Me.from("membership_applications").select("status").eq("user_id",G).maybeSingle();C(Q?Q.status:"none")},ie=async G=>{const{data:Q}=await Me.from("volunteer_applications").select("status, is_active_volunteer").eq("user_id",G).maybeSingle();Q?Q.is_active_volunteer?(O("active"),D(!0)):(O(Q.status),D(!1)):(O("none"),D(!1))};return{user:e,session:n,loading:o,isAdmin:l,isMember:f,isShowAdmin:m,isMarketing:b,isTrustee:E,isAnyAdmin:q,assignedProductions:S,membershipStatus:k,volunteerStatus:j,isVolunteer:M,canEditProduction:G=>l||S.includes(G),signIn:async(G,Q)=>{const{error:te}=await Me.auth.signInWithPassword({email:G,password:Q});return{error:te}},signOut:async()=>{const{error:G}=await Me.auth.signOut();return{error:G}}}}const Cu=({flag:e,allowPrivileged:t,children:n})=>{const{flags:r,loading:o}=kE(),{isAdmin:a,isTrustee:l,isMarketing:u,loading:f}=Hd();if(o||t&&f)return null;const h=t&&(a||l||u);return!r[e]&&!h?d.jsx(Xp,{to:"/",replace:!0}):d.jsx(d.Fragment,{children:n})},ko={canView:!0,canEdit:!0,canDelete:!0,canExport:!0},Et={canView:!0,canEdit:!0,canDelete:!1,canExport:!1},TE={canView:!0,canEdit:!0,canDelete:!1,canExport:!0},n$={canView:!0,canEdit:!1,canDelete:!1,canExport:!0},rt={canView:!0,canEdit:!1,canDelete:!1,canExport:!1},Lt={canView:!1,canEdit:!1,canDelete:!1,canExport:!1},r$={ticket_sales:rt,financial_reports:Lt,discount_codes:rt,companies:rt,seating_plans:rt,config:Lt,show_admins:Lt,comms_preferences:rt,memberships:rt,volunteers:rt,users:rt,containers:Lt,marketing_preferences:n$,analytics:Et,functions:Lt,hero_carousel:Et,news:Et,ticket_lottery:TE,pages:Et,team:Et,policies:rt,job_descriptions:rt,gallery:Lt,productions:rt,production_edit:Lt,production_marketing:rt,import_members:Lt,company_finance:rt,socials:ko,marketing_plan:ko,internal_events:rt,email_campaigns:ko,directory_categories:rt,daily_updates:Lt,quizzes:ko,signage:ko,qr_codes:ko,meeting_minutes:Lt,llm_work:rt},s$={ticket_sales:rt,financial_reports:Lt,discount_codes:Et,companies:Et,seating_plans:rt,config:Lt,show_admins:Lt,comms_preferences:rt,memberships:{canView:!0,canEdit:!1,canDelete:!1,canExport:!0},volunteers:Et,users:rt,containers:Lt,marketing_preferences:rt,analytics:Et,functions:Lt,hero_carousel:Et,news:Et,ticket_lottery:TE,pages:Et,team:Et,policies:Et,job_descriptions:Et,gallery:Lt,productions:Et,production_edit:Et,production_marketing:rt,import_members:Lt,company_finance:Et,socials:rt,marketing_plan:Et,internal_events:rt,email_campaigns:rt,directory_categories:Et,daily_updates:Lt,quizzes:Et,signage:Lt,qr_codes:rt,meeting_minutes:Et,llm_work:rt};function o$(e,t){return t.isAdmin?ko:t.isTrustee?s$[e]:t.isMarketing?r$[e]:Lt}const i$=Bl("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Do({className:e,variant:t,...n}){return d.jsx("div",{className:Le(i$({variant:t}),e),...n})}const CE=GS,RE=KS,a$=YS,AE=y.forwardRef(({className:e,...t},n)=>d.jsx(Od,{className:Le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));AE.displayName=Od.displayName;const l$=Bl("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),bg=y.forwardRef(({side:e="right",className:t,children:n,...r},o)=>d.jsxs(a$,{children:[d.jsx(AE,{}),d.jsxs(Id,{ref:o,className:Le(l$({side:e}),t),...r,children:[n,d.jsxs(QS,{className:"absolute right-4 top-4 roun
84ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[d.jsx(Zi,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));bg.displayName=Id.displayName;const jE=({className:e,...t})=>d.jsx("div",{className:Le("flex flex-col space-y-2 text-center sm:text-left",e),...t});jE.displayName="SheetHeader";const PE=y.forwardRef(({className:e,...t},n)=>d.jsx(Dd,{ref:n,className:Le("text-lg font-semibold text-foreground",e),...t}));PE.displayName=Dd.displayName;const NE=y.forwardRef(({className:e,...t},n)=>d.jsx(Ld,{ref:n,className:Le("text-sm text-muted-foreground",e),...t}));NE.displayName=Ld.displayName;var c$="Separator",lb="horizontal",u$=["horizontal","vertical"],OE=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=lb,...o}=e,a=d$(r)?r:lb,u=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return d.jsx(Ze.div,{"data-orientation":a,...u,...o,ref:t})});OE.displayName=c$;function d$(e){return u$.includes(e)}var IE=OE;const DE=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>d.jsx(IE,{ref:o,decorative:n,orientation:t,className:Le("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));DE.displayName=IE.displayName;const f$=[{label:"Content",items:[{label:"News",path:"/admin/news",section:"news"},{label:"Homepage Slides",path:"/admin/hero-carousel",section:"hero_carousel"},{label:"Pages",path:"/admin/pages",section:"pages"},{label:"Gallery",path:"/admin/gallery",section:"gallery"},{label:"Team",path:"/admin/team",section:"team"},{label:"Policies",path:"/admin/policies",section:"policies"},{label:"Job Descriptions",path:"/admin/job-descriptions",section:"job_descriptions"}]},{label:"Marketing",items:[{label:"Socials",path:"/admin/socials",section:"socials"},{label:"Email Campaigns",path:"/admin/email-campaigns",section:"email_campaigns"},{label:"Marketing Plan",path:"/admin/marketing-plan",section:"marketing_plan"},{label:"QR Codes",path:"/admin/qr-codes",section:"qr_codes"},{label:"Digital Signage",path:"/admin/signage",section:"signage"},{label:"Quizzes",path:"/admin/quizzes",section:"quizzes"},{label:"Ticket Lottery",path:"/admin/ticket-lottery",section:"ticket_lottery"},{label:"Analytics",path:"/admin/analytics",section:"analytics"},{label:"LLM Work",path:"/admin/llm-work",section:"llm_work"}]},{label:"Shows & Finance",items:[{label:"Ticket Sales",path:"/admin/ticket-sales",section:"ticket_sales"},{label:"Financial Reports",path:"/admin/financial-reports",section:"financial_reports"},{label:"Discount Codes",path:"/admin/discount-codes",section:"discount_codes"},{label:"Seating Plans",path:"/admin/seating-plans",section:"seating_plans"}]},{label:"People",items:[{label:"Users",path:"/admin/users",section:"users"},{label:"Memberships",path:"/admin/memberships",section:"memberships"},{label:"Meeting Minutes",path:"/admin/meeting-minutes",section:"meeting_minutes"},{label:"Show Admins",path:"/admin/show-admins",section:"show_admins"},{label:"Volunteers",path:"/admin/volunteers",section:"volunteers"},{label:"Volunteer Shifts",path:"/admin/volunteer-shifts",adminOnly:!0,indent:!0},{label:"Shift Types",path:"/admin/volunteer-shift-types",adminOnly:!0,indent:!0},{label:"Skills",path:"/admin/volunteer-skills",adminOnly:!0,indent:!0},{label:"Volunteer Shows",path:"/admin/volunteer-shows",adminOnly:!0,indent:!0},{label:"Email Opt-outs",path:"/admin/communication-preferences",section:"comms_preferences"},{label:"Marketing Consent",path:"/admin/marketing-preferences",section:"marketing_preferences"}]},{label:"Directory",items:[{label:"Companies",path:"/admin/companies",section:"companies"},{label:"Categories",path:"/admin/directory-categories",section:"directory_categories"},{label:"Company Finance",path:"/admin/companies/finance",section:"company_finance"}]},{label:"Settings & Tools",items:[{label:"Site Settings",path:"/admin/config",section:"config"},{label:"Tools",path:"/admin/functions",section:"functions"},{label:"Internal Events",path:"/admin/internal-events",section:"internal_events"},{label:"Daily Updates",path:"/admin/daily-updates",adminOnly:!0},{label:"Import Members",path:"/admin/import-members",section:"import_members"},{label:"Import Mailing List",path:"/admin/import-mailing-list",adminOnly:!0},{label:"Import Volunteers",path:"/admin/import-volunteers",adminOnly:!0},{label:"Collections",path:"/admin/containers",section:"containers"},{label:"Backfill Image Crops",path:"/admin/backfill-image-crops",adminOnly:!0}]}];
84function cb({isAdmin:e,isMarketing:t,isTrustee:n,isShowAdmin:r,roleBadge:o,onNav:a,onSignOut:l}){const u=Vt(),f={isAdmin:e,isMarketing:t,isTrustee:n},h=g=>g.adminOnly?e:g.section?o$(g.section,f).canView:!0,m=g=>g==="/admin"?u.pathname==="/admin":u.pathname===g||u.pathname.startsWith(g+"/");return d.jsxs("div",{className:"flex flex-col h-full bg-background",children:[d.jsxs("div",{className:"px-4 py-4 border-b border-border shrink-0",children:[d.jsx("div",{className:"font-bold text-foreground text-sm leading-none mb-2",children:"Admin Panel"}),o&&d.jsx(Do,{variant:e?"default":"secondary",className:"text-xs",children:o})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto py-2",children:[d.jsx("div",{className:"px-2 pb-2",children:d.jsxs(Ae,{to:"/admin",onClick:a,className:Le("flex items-center gap-2 px-3 py-2 rounded-md text-sm font-semibold transition-colors w-full",m("/admin")?"bg-primary text-primary-foreground":"text-foreground hover:bg-accent hover:text-accent-foreground"),children:[d.jsx(RR,{className:"h-4 w-4 shrink-0"}),"Productions"]})}),d.jsx(DE,{className:"mx-2 mb-2"}),f$.map(g=>{const b=g.items.filter(h);return b.length===0?null:d.jsxs("div",{className:"px-2 pb-3",children:[d.jsx("div",{className:"px-3 py-1 text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-1",children:g.label}),b.map(w=>d.jsx(Ae,{to:w.path,onClick:a,className:Le("flex items-center px-3 py-1.5 rounded-md text-sm transition-colors w-full",w.indent&&"pl-4",m(w.path)?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:text-foreground hover:bg-accent/50"),children:w.label},w.path))]},g.label)})]}),d.jsxs("div",{className:"border-t border-border p-3 space-y-1 shrink-0",children:[d.jsx(Ce,{variant:"outline",size:"sm",className:"w-full justify-start",asChild:!0,children:d.jsxs(Ae,{to:"/",onClick:a,children:[d.jsx(jR,{className:"h-4 w-4 mr-2"}),"Back to Website"]})}),d.jsxs(Ce,{variant:"ghost",size:"sm",className:"w-full justify-start text-muted-foreground hover:text-foreground",onClick:()=>{a?.(),l()},children:[d.jsx(Ux,{className:"h-4 w-4 mr-2"}),"Sign Out"]})]})]})}function h$(){const[e,t]=y.useState(!1),{isAdmin:n,isShowAdmin:r,isMarketing:o,isTrustee:a,signOut:l}=Hd(),u=no(),f=n?"Global Admin":r?"Show Admin":o?"Marketing":a?"Trustee":"",m={isAdmin:n,isMarketing:o,isTrustee:a,isShowAdmin:r,roleBadge:f,onSignOut:async()=>{await l(),u("/admin/login")}};return d.jsxs("div",{className:"flex min-h-screen bg-background",children:[d.jsx("aside",{className:"hidden md:flex w-56 shrink-0 flex-col border-r border-border sticky top-0 h-screen",children:d.jsx(cb,{...m})}),d.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[d.jsxs("header",{className:"md:hidden sticky top-0 z-20 flex items-center gap-2 px-4 py-3 border-b border-border bg-background",children:[d.jsxs(CE,{open:e,onOpenChange:t,children:[d.jsx(RE,{asChild:!0,children:d.jsx(Ce,{variant:"ghost",size:"icon","aria-label":"Open navigation menu",children:d.jsx(Bx,{className:"h-5 w-5"})})}),d.jsx(bg,{side:"left",className:"w-56 p-0 overflow-hidden",children:d.jsx(cb,{...m,onNav:()=>t(!1)})})]}),d.jsx("span",{className:"font-semibold text-sm",children:"Admin"}),f&&d.jsx(Do,{variant:n?"default":"secondary",className:"ml-auto text-xs",children:f})]}),d.jsx("main",{className:"flex-1",children:d.jsx(y.Suspense,{fallback:d.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:d.jsx(Zs,{className:"h-8 w-8 animate-spin text-muted-foreground"})}),children:d.jsx(SO,{})})})]})]})}function Nl(e,...t){return t.forEach(n=>{if(n){for(const r in n)if(n.hasOwnProperty(r)){const o=n[r];Array.isArray(o)?e[r]=o.slice(0):typeof o=="object"?(e[r]||(e[r]={}),Nl(e[r],o)):e[r]=o}}}),e}function p$(e,t){const{colorCount:n,quantizer:r,generators:o,filters:a}=e,l={colorCount:n},u=typeof r=="string"?{name:r,options:{}}:r;return u.options=Nl({},l,u.options),Nl({},{quantizer:u,generators:o,filters:a},t)}class m${constructor(t,n={}){this._src=t,this._opts=Nl({},mm.DefaultOpts,n)}maxColorCount(t){return this._opts.colorCount=t,this}maxDimension(t){return this._opts.maxDimension=t,this}addFilter(t){return this._opts.filters?this._opts.filters.push(t):this._opts.filters=[t],this}removeFilter(t){if(this._opts.filters){const n=this._opts.filters.indexOf(t);n>0&&this._opts.filters.splice(n)}return this}clearFilters(){return this._opts.filters=[],this}quality(t){return this._opts.quality=t,this}useImageClass(t){return this._opts.ImageClass=t,this}useGenerator(t,n){return this._opts.generators||(this._opts.generators=[]),this._opts.generators.push(n?{name:t,options:n}:t),this}useQuantizer(t,n){return this._opts.quantizer=n?{name:t,options:n}:t,this}build(){return new mm(this._src,this._opts)}getPalette(){return this.build().getPalette()}}const LE=class pm{constructor(t,n){this._src=t,this.opts=Nl({},pm.DefaultOpts,n)}static use(t){this._pipeline=t}static from(t){return new m$(t)}get result(){return this._result}_process(t,n){t.scaleDown(this.opts);const r=p$(this.opts,n);return pm._pipeline.process(t.getImageData(),r)}async getPalette(){const t=new this.opts.ImageClass;try{const n=await t.load(this._src),r=await this._process(n,{generators:["default"]});this._result=r;const o=r.palettes.default;if(!o)throw new Error("Something went wrong and a palette was not found, please file a bug against our GitHub repo: https://github.com/vibrant-Colors/node-vibrant/");return t.remove(),o}catch(n){return t.remove(),Promise.reject(n)}}async getPalettes(){const t=new this.opts.ImageClass;try{const n=await t.load(this._src),r=await this._process(n,{generators:["*"]});this._result=r;const o=r.palettes;return t.remove(),o}catch(n){return t.remove(),Promise.reject(n)}}};LE.DefaultOpts={colorCount:64,quality:5,filters:[]};let mm=LE;function g$(e){return Object.prototype.toString.call(e)==="[object Object]"}function ub(e){return g$(e)||Array.isArray(e)}function y$(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function xg(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==a?!1:n.every(l=>{const u=e[l],f=t[l];return typeof u=="function"?`${u}`==`${f}
84`:!ub(u)||!ub(f)?u===f:xg(u,f)})}function db(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function v$(e,t){if(e.length!==t.length)return!1;const n=db(e),r=db(t);return n.every((o,a)=>{const l=r[a];return xg(o,l)})}function _g(e){return typeof e=="number"}function gm(e){return typeof e=="string"}function Vd(e){return typeof e=="boolean"}function fb(e){return Object.prototype.toString.call(e)==="[object Object]"}function bt(e){return Math.abs(e)}function Sg(e){return Math.sign(e)}function ml(e,t){return bt(e-t)}function w$(e,t){if(e===0||t===0||bt(e)<=bt(t))return 0;const n=ml(bt(e),bt(t));return bt(n/e)}function b$(e){return Math.round(e*100)/100}function Ol(e){return Il(e).map(Number)}function Pr(e){return e[Kl(e)]}function Kl(e){return Math.max(0,e.length-1)}function Eg(e,t){return t===Kl(e)}function hb(e,t=0){return Array.from(Array(e),(n,r)=>t+r)}function Il(e){return Object.keys(e)}function ME(e,t){return[e,t].reduce((n,r)=>(Il(r).forEach(o=>{const a=n[o],l=r[o],u=fb(a)&&fb(l);n[o]=u?ME(a,l):l}),n),{})}function ym(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function x$(e,t){const n={start:r,center:o,end:a};function r(){return 0}function o(f){return a(f)/2}function a(f){return t-f}function l(f,h){return gm(e)?n[e](f):e(t,f,h)}return{measure:l}}function Dl(){let e=[];function t(o,a,l,u={passive:!0}){let f;if("addEventListener"in o)o.addEventListener(a,l,u),f=()=>o.removeEventListener(a,l,u);else{const h=o;h.addListener(l),f=()=>h.removeListener(l)}return e.push(f),r}function n(){e=e.filter(o=>o())}const r={add:t,clear:n};return r}function _$(e,t,n,r){const o=Dl(),a=1e3/60;let l=null,u=0,f=0;function h(){o.add(e,"visibilitychange",()=>{e.hidden&&E()})}function m(){w(),o.clear()}function g(S){if(!f)return;l||(l=S,n(),n());const T=S-l;for(l=S,u+=T;u>=a;)n(),u-=a;const k=u/a;r(k),f&&(f=t.requestAnimationFrame(g))}function b(){f||(f=t.requestAnimationFrame(g))}function w(){t.cancelAnimationFrame(f),l=null,u=0,f=0}function E(){l=null,u=0}return{init:h,destroy:m,start:b,stop:w,update:n,render:r}}function S$(e,t){const n=t==="rtl",r=e==="y",o=r?"y":"x",a=r?"x":"y",l=!r&&n?-1:1,u=m(),f=g();function h(E){const{height:x,width:S}=E;return r?x:S}function m(){return r?"top":n?"right":"left"}function g(){return r?"bottom":n?"left":"right"}function b(E){return E*l}return{scroll:o,cross:a,startEdge:u,endEdge:f,measureSize:h,direction:b}}function Bo(e=0,t=0){const n=bt(e-t);function r(h){return h<e}function o(h){return h>t}function a(h){return r(h)||o(h)}function l(h){return a(h)?r(h)?e:t:h}function u(h){return n?h-n*Math.ceil((h-t)/n):h}return{length:n,max:t,min:e,constrain:l,reachedAny:a,reachedMax:o,reachedMin:r,removeOffset:u}}function $E(e,t,n){const{constrain:r}=Bo(0,e),o=e+1;let a=l(t);function l(b){return n?bt((o+b)%o):r(b)}function u(){return a}function f(b){return a=l(b),g}function h(b){return m().set(u()+b)}function m(){return $E(e,u(),n)}const g={get:u,set:f,add:h,clone:m};return g}function E$(e,t,n,r,o,a,l,u,f,h,m,g,b,w,E,x,S,T,k){const{cross:C,direction:j}=e,O=["INPUT","SELECT","TEXTAREA"],M={passive:!1},D=Dl(),q=Dl(),J=Bo(50,225).constrain(w.measure(20)),ne={mouse:300,touch:400},ie={mouse:500,touch:600},re=E?43:25;let pe=!1,L=0,G=0,Q=!1,te=!1,B=!1,F=!1;function W(ve){if(!k)return;function Ue(ht){(Vd(k)||k(ve,ht))&&Se(ht)}const De=t;D.add(De,"dragstart",ht=>ht.preventDefault(),M).add(De,"touchmove",()=>{},M).add(De,"touchend",()=>{}).add(De,"touchstart",Ue).add(De,"mousedown",Ue).add(De,"touchcancel",ke).add(De,"contextmenu",ke).add(De,"click",$e,!0)}function N(){D.clear(),q.clear()}function z(){const ve=F?n:t;q.add(ve,"touchmove",ce,M).add(ve,"touchend",ke).add(ve,"mousemove",ce,M).add(ve,"mouseup",ke)}function Y(ve){const Ue=ve.nodeName||"";return O.includes(Ue)}function X(){return(E?ie:ne)[F?"mouse":"touch"]}function me(ve,Ue){const De=g.add(Sg(ve)*-1),ht=m.byDistance(ve,!E).distance;return E||bt(ve)<J?ht:S&&Ue?ht*.5:m.byIndex(De.get(),0).distance}function Se(ve){const Ue=ym(ve,r);F=Ue,B=E&&Ue&&!ve.buttons&&pe,pe=ml(o.get(),l.get())>=2,!(Ue&&ve.button!==0)&&(Y(ve.target)||(Q=!0,a.pointerDown(ve),h.useFriction(0).useDuration(0),o.set(l),z(),L=a.readPoint(ve),G=a.readPoint(ve,C),b.emit("pointerDown")))}function ce(ve){if(!ym(ve,r)&&ve.touches.length>=2)return ke(ve);const De=a.readPoint(ve),ht=a.readPoint(ve,C),ze=ml(De,L),$t=ml(ht,G);if(!te&&!F&&(!ve.cancelable||(te=ze>$t,!te)))return ke(ve);const at=a.pointerMove(ve);ze>x&&(B=!0),h.useFriction(.3).useDuration(.75),u.start(),o.add(j(at)),ve.preventDefault()}function ke(ve){const De=m.byDistance(0,!1).index!==g.get(),ht=a.pointerUp(ve)*X(),ze=me(j(ht),De),$t=w$(ht,ze),at=re-10*$t,jt=T+$t/50;te=!1,Q=!1,q.clear(),h.useDuration(at).useFriction(jt),f.distance(ze,!E),F=!1,b.emit("pointerUp")}function $e(ve){B&&(ve.stopPropagation(),ve.preventDefault(),B=!1)}function Ge(){return Q}return{init:W,destroy:N,pointerDown:Ge}}function k$(e,t){let r,o;function a(g){return g.timeStamp}function l(g,b){const E=`client${(b||e.scroll)==="x"?"X":"Y"}`;return(ym(g,t)?g:g.touches[0])[E]}function u(g){return r=g,o=g,l(g)}function f(g){const b=l(g)-l(o),w=a(g)-a(r)>170;
vendor: 13,201 bytes, line 84
84return o=g,w&&(r=g),b}function h(g){if(!r||!o)return 0;const b=l(o)-l(r),w=a(g)-a(r),E=a(g)-a(o)>170,x=b/w;return w&&!E&&bt(x)>.1?x:0}return{pointerDown:u,pointerMove:f,pointerUp:h,readPoint:l}}function T$(){function e(n){const{offsetTop:r,offsetLeft:o,offsetWidth:a,offsetHeight:l}=n;return{top:r,right:o+a,bottom:r+l,left:o,width:a,height:l}}return{measure:e}}function C$(e){function t(r){return e*(r/100)}return{measure:t}}function R$(e,t,n,r,o,a,l){const u=[e].concat(r);let f,h,m=[],g=!1;function b(S){return o.measureSize(l.measure(S))}function w(S){if(!a)return;h=b(e),m=r.map(b);function T(k){for(const C of k){if(g)return;const j=C.target===e,O=r.indexOf(C.target),M=j?h:m[O],D=b(j?e:r[O]);if(bt(D-M)>=.5){S.reInit(),t.emit("resize");break}}}f=new ResizeObserver(k=>{(Vd(a)||a(S,k))&&T(k)}),n.requestAnimationFrame(()=>{u.forEach(k=>f.observe(k))})}function E(){g=!0,f&&f.disconnect()}return{init:w,destroy:E}}function A$(e,t,n,r,o,a){let l=0,u=0,f=o,h=a,m=e.get(),g=0;function b(){const M=r.get()-e.get(),D=!f;let q=0;return D?(l=0,n.set(r),e.set(r),q=M):(n.set(e),l+=M/f,l*=h,m+=l,e.add(l),q=m-g),u=Sg(q),g=m,O}function w(){const M=r.get()-t.get();return bt(M)<.001}function E(){return f}function x(){return u}function S(){return l}function T(){return C(o)}function k(){return j(a)}function C(M){return f=M,O}function j(M){return h=M,O}const O={direction:x,duration:E,velocity:S,seek:b,settled:w,useBaseFriction:k,useBaseDuration:T,useFriction:j,useDuration:C};return O}function j$(e,t,n,r,o){const a=o.measure(10),l=o.measure(50),u=Bo(.1,.99);let f=!1;function h(){return!(f||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function m(w){if(!h())return;const E=e.reachedMin(t.get())?"min":"max",x=bt(e[E]-t.get()),S=n.get()-t.get(),T=u.constrain(x/l);n.subtract(S*T),!w&&bt(S)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function g(w){f=!w}return{shouldConstrain:h,constrain:m,toggleActive:g}}function P$(e,t,n,r,o){const a=Bo(-t+e,0),l=g(),u=m(),f=b();function h(E,x){return ml(E,x)<=1}function m(){const E=l[0],x=Pr(l),S=l.lastIndexOf(E),T=l.indexOf(x)+1;return Bo(S,T)}function g(){return n.map((E,x)=>{const{min:S,max:T}=a,k=a.constrain(E),C=!x,j=Eg(n,x);return C?T:j||h(S,k)?S:h(T,k)?T:k}).map(E=>parseFloat(E.toFixed(3)))}function b(){if(t<=e+o)return[a.max];if(r==="keepSnaps")return l;const{min:E,max:x}=u;return l.slice(E,x)}return{snapsContained:f,scrollContainLimit:u}}function N$(e,t,n){const r=t[0],o=n?r-e:Pr(t);return{limit:Bo(o,r)}}function O$(e,t,n,r){const a=t.min+.1,l=t.max+.1,{reachedMin:u,reachedMax:f}=Bo(a,l);function h(b){return b===1?f(n.get()):b===-1?u(n.get()):!1}function m(b){if(!h(b))return;const w=e*(b*-1);r.forEach(E=>E.add(w))}return{loop:m}}function I$(e){const{max:t,length:n}=e;function r(a){const l=a-t;return n?l/-n:0}return{get:r}}function D$(e,t,n,r,o){const{startEdge:a,endEdge:l}=e,{groupSlides:u}=o,f=g().map(t.measure),h=b(),m=w();function g(){return u(r).map(x=>Pr(x)[l]-x[0][a]).map(bt)}function b(){return r.map(x=>n[a]-x[a]).map(x=>-bt(x))}function w(){return u(h).map(x=>x[0]).map((x,S)=>x+f[S])}return{snaps:h,snapsAligned:m}}function L$(e,t,n,r,o,a){const{groupSlides:l}=o,{min:u,max:f}=r,h=m();function m(){const b=l(a),w=!e||t==="keepSnaps";return n.length===1?[a]:w?b:b.slice(u,f).map((E,x,S)=>{const T=!x,k=Eg(S,x);if(T){const C=Pr(S[0])+1;return hb(C)}if(k){const C=Kl(a)-Pr(S)[0]+1;return hb(C,Pr(S)[0])}return E})}return{slideRegistry:h}}function M$(e,t,n,r,o){const{reachedAny:a,removeOffset:l,constrain:u}=r;function f(E){return E.concat().sort((x,S)=>bt(x)-bt(S))[0]}function h(E){const x=e?l(E):u(E),S=t.map((k,C)=>({diff:m(k-x,0),index:C})).sort((k,C)=>bt(k.diff)-bt(C.diff)),{index:T}=S[0];return{index:T,distance:x}}function m(E,x){const S=[E,E+n,E-n];if(!e)return E;if(!x)return f(S);const T=S.filter(k=>Sg(k)===x);return T.length?f(T):Pr(S)-n}function g(E,x){const S=t[E]-o.get(),T=m(S,x);return{index:E,distance:T}}function b(E,x){const S=o.get()+E,{index:T,distance:k}=h(S),C=!e&&a(S);if(!x||C)return{index:T,distance:E};const j=t[T]-k,O=E+m(j,0);return{index:T,distance:O}}return{byDistance:b,byIndex:g,shortcut:m}}function $$(e,t,n,r,o,a,l){function u(g){const b=g.distance,w=g.index!==t.get();a.add(b),b&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),w&&(n.set(t.get()),t.set(g.index),l.emit("select"))}function f(g,b){const w=o.byDistance(g,b);u(w)}function h(g,b){const w=t.clone().set(g),E=o.byIndex(w.get(),b);u(E)}return{distance:f,index:h}}function F$(e,t,n,r,o,a,l,u){const f={passive:!0,capture:!0};let h=0;function m(w){if(!u)return;function E(x){if(new Date().getTime()-h>10)return;l.emit("slideFocusStart"),e.scrollLeft=0;const k=n.findIndex(C=>C.includes(x));_g(k)&&(o.useDuration(0),r.index(k,0),l.emit("slideFocus"))}a.add(document,"keydown",g,!1),t.forEach((x,S)=>{a.add(x,"focus",T=>{(Vd(u)||u(w,T))&&E(S)},f)})}function g(w){w.code==="Tab"&&(h=new Date().getTime())}return{init:m}}function ul(e){let t=e;function n(){return t}function r(f){t=l(f)}function o(f){t+=l(f)}function a(f){t-=l(f)}function l(f){return _g(f)?f:f.get()}return{get:n,set:r,add:o,subtract:a}}function FE(e,t){const n=e.scroll==="x"?l:u,r=t.style;let o=null,a=!1;function l(b){return`translate3d(${b}px,0px,0px)`}function u(b){return`translate3d(0px,${b}px,0px)`}function f(b){if(a)return;const w=b$(e.direction(b));w!==o&&(r.transform=n(w),o=w)}function h(b){a=!b}function m(){a||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:m,to:f,toggleActive:h}}function U$(e,t,n,r,o,a,l,u,f){const m=Ol(o),g=Ol(o).reverse(),b=T().concat(k());function w(D,q){return D.reduce((J,ne)=>J-o[ne],q)}function E(D,q){return D.reduce((J,ne)=>w(J,q)>0?J.concat([ne]):J,[])}function x(D){return a.map((q,J)=>({start:q-r[J]+.5+D,end:q+t-.5+D}))}function S(D,q,J){const ne=x(q);return D.map(ie=>{const re=J?0:-n,pe=J?n:0,L=J?"end":"start",G=ne[ie][L];return{index:ie,loopPoint:G,slideLocation:ul(-1),translate:FE(e,f[ie]),target:()=>u.get()>G?re:pe}})}function T(){const D=l[0],q=E(g,D);return S(q,n,!1)}function k(){const D=t-l[0]-1,q=E(m,D);return S(q,-n,!0)}function C(){return b.every(({index:D})=>{const q=m.filter(J=>J!==D);return w(q,t)<=.1})}function j(){b.forEach(D=>{const{target:q,translate:J,slideLocation:ne}=D,ie=q();ie!==ne.get()&&(J.to(ie),ne.set(ie))})}function O(){b.forEach(D=>D.translate.clear())}return{canLoop:C,clear:O,loop:j,loopPoints:b}}function z$(e,t,n){let r,o=!1;function a(f){if(!n)return;function h(m){for(const g of m)if(g.type==="childList"){f.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(m=>{o||(Vd(n)||n(f,m))&&h(m)}),r.observe(e,{childList:!0})}function l(){r&&r.disconnect(),o=!0}return{init:a,destroy:l}}function B$(e,t,n,r){const o={};let a=null,l=null,u,f=!1;function h(){u=new IntersectionObserver(E=>{f||(E.forEach(x=>{const S=t.indexOf(x.target);o[S]=x}),a=null,l=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(E=>u.observe(E))}function m(){u&&u.disconnect(),f=!0}function g(E){return Il(o).reduce((x,S)=>{const T=parseInt(S),{isIntersecting:k}=o[T];return(E&&k||!E&&!k)&&x.push(T),x},[])}function b(E=!0){if(E&&a)return a;if(!E&&l)return l;const x=g(E);return E&&(a=x),E||(l=x),x}return{init:h,destroy:m,get:b}}function H$(e,t,n,r,o,a){const{measureSize:l,startEdge:u,endEdge:f}=e,h=n[0]&&o,m=E(),g=x(),b=n.map(l),w=S();function E(){if(!h)return 0;const k=n[0];return bt(t[u]-k[u])}function x(){if(!h)return 0;const k=a.getComputedStyle(Pr(r));return parseFloat(k.getPropertyValue(`margin-${f}`))}function S(){return n.map((k,C,j)=>{const O=!C,M=Eg(j,C);return O?b[C]+m:M?b[C]+g:j[C+1][u]-k[u]}).map(bt)}return{slideSizes:b,slideSizesWithGaps:w,startGap:m,endGap:g}}function V$(e,t,n,r,o,a,l,u,f){const{startEdge:h,endEdge:m,direction:g}=e,b=_g(n);function w(T,k){return Ol(T).filter(C=>C%k===0).map(C=>T.slice(C,C+k))}function E(T){return T.length?Ol(T).reduce((k,C,j)=>{const O=Pr(k)||0,M=O===0,D=C===Kl(T),q=o[h]-a[O][h],J=o[h]-a[C][m],ne=!r&&M?g(l):0,ie=!r&&D?g(u):0,re=bt(J-ie-(q+ne));return j&&re>t+f&&k.push(C),D&&k.push(T.length),k},[]).map((k,C,j)=>{const O=Math.max(j[C-1]||0);return T.slice(O,k)}):[]}function x(T){return b?w(T,n):E(T)}return{groupSlides:x}}function W$(e,t,n,r,o,a,l){const{align:u,axis:f,direction:h,startIndex:m,loop:g,duration:b,dragFree:w,dragThreshold:E,inViewThreshold:x,slidesToScroll:S,skipSnaps:T,containScroll:k,watchResize:C,watchSlides:j,watchDrag:O,watchFocus:M}=a,D=2,q=T$(),J=q.measure(t),ne=n.map(q.measure),ie=S$(f,h),re=ie.measureSize(J),pe=C$(re),L=x$(u,re),G=!g&&!!k,Q=g||!!k,{slideSizes:te,slideSizesWithGaps:B,startGap:F,endGap:W}=H$(ie,J,ne,n,Q,o),N=V$(ie,re,S,g,J,ne,F,W,D),{snaps:z,snapsAligned:Y}=D$(ie,L,J,ne,N),X=-Pr(z)+Pr(B),{snapsContained:me,scrollContainLimit:Se}=P$(re,X,Y,k,D),ce=G?me:Y,{limit:ke}=N$(X,ce,g),$e=$E(Kl(ce),m,g),Ge=$e.clone(),He=Ol(n),ve=({dragHandler:_t,scrollBody:cn,scrollBounds:Xn,options:{loop:qt}})=>{qt||Xn.constrain(_t.pointerDown()),cn.seek()},Ue=({scrollBody:_t,translate:cn,location:Xn,offsetLocation:qt,previousLocation:un,scrollLooper:mr,slideLooper:wn,dragHandler:$r,animation:Fr,eventHandler:$n,scrollBounds:Zn,options:{loop:Gt}},Pt)=>{const tn=_t.settled(),ts=!Zn.shouldConstrain(),Ne=Gt?tn:tn&&ts,qe=Ne&&!$r.pointerDown();qe&&Fr.stop();const Je=Xn.get()*Pt+un.get()*(1-Pt);qt.set(Je),Gt&&(mr.loop(_t.direction()),wn.loop()),cn.to(qt.get()),qe&&$n.emit("settle"),Ne||$n.emit("scroll")},De=_$(r,o,()=>ve(Jn),_t=>Ue(Jn,_t)),ht=.68,ze=ce[$e.get()],$t=ul(ze),at=ul(ze),jt=ul(ze),Ft=ul(ze),nt=A$($t,jt,at,Ft,b,ht),Mn=M$(g,ce,X,ke,Ft),Wt=$$(De,$e,Ge,nt,Mn,Ft,l),Lr=I$(ke),Mr=Dl(),st=B$(t,n,l,x),{slideRegistry:Ct}=L$(G,k,ce,Se,N,He),ln=F$(e,n,Ct,Wt,nt,Mr,l,M),Jn={ownerDocument:r,ownerWindow:o,eventHandler:l,containerRect:J,slideRects:ne,animation:De,axis:ie,dragHandler:E$(ie,e,r,o,Ft,k$(ie,o),$t,De,Wt,nt,Mn,$e,l,pe,w,E,T,ht,O),eventStore:Mr,percentOfView:pe,index:$e,indexPrevious:Ge,limit:ke,location:$t,offsetLocation:jt,previousLocation:at,options:a,resizeHandler:R$(t,l,o,n,ie,C,q),scrollBody:nt,scrollBounds:j$(ke,jt,Ft,nt,pe),scrollLooper:O$(X,ke,jt,[$t,jt,at,Ft]),scrollProgress:Lr,scrollSnapList:ce.map(Lr.get),scrollSnaps:ce,scrollTarget:Mn,scrollTo:Wt,slideLooper:U$(ie,re,X,te,B,z,ce,jt,n),slideFocus:ln,slidesHandler:z$(t,l,j),slidesInView:st,slideIndexes:He,slideRegistry:Ct,slidesToScroll:N,target:Ft,translate:FE(ie,t)};return Jn}function q$(){let e={},t;function n(h){t=h}function r(h){return e[h]||[]}function o(h){return r(h).forEach(m=>m(t,h)),f}function a(h,m){return e[h]=r(h).concat([m]),f}function l(h,m){return e[h]=r(h).filter(g=>g!==m),f}function u(){e={}}const f={init:n,emit:o,off:l,on:a,clear:u};return f}const G$={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function K$(e){function t(a,l){return ME(a,l||{})}function n(a){const l=a.breakpoints||{},u=Il(l).filter(f=>e.matchMedia(f).matches).map(f=>l[f]).reduce((f,h)=>t(f,h),{});return t(a,u)}function r(a){return a.map(l=>Il(l.breakpoints||{})).reduce((l,u)=>l.concat(u),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function Y$(e){let t=[];function n(a,l){return t=l.filter(({options:u})=>e.optionsAtMedia(u).active!==!1),t.forEach(u=>u.init(a,e)),l.reduce((u,f)=>Object.assign(u,{[f.name]:f}),{})}function r(){t=t.filter(a=>a.destroy())}return{init:n,destroy:r}}function ld(e,t,n){const r=e.ownerDocument,o=r.defaultView,a=K$(o),l=Y$(a),u=Dl(),f=q$(),{mergeOptions:h,optionsAtMedia:m,optionsMediaQueries:g}=a,{on:b,off:w,emit:E}=f,x=ie;let S=!1,T,k=h(G$,ld.globalOptions),C=h(k),j=[],O,M,D;function q(){const{container:He,slides:ve}=C;M=(gm(He)?e.querySelector(He):He)||e.children[0];const De=gm(ve)?M.querySelectorAll(ve):ve;D=[].slice.call(De||M.children)}function J(He){const ve=W$(e,M,D,r,o,He,f);if(He.loop&&!ve.slideLooper.canLoop()){const Ue=Object.assign({},He,{loop:!1});return J(Ue)}return ve}function ne(He,ve){S||(k=h(k,He),C=m(k),j=ve||j,q(),T=J(C),g([k,...j.map(({options:Ue})=>Ue)]).forEach(Ue=>u.add(Ue,"change",ie)),C.active&&(T.translate.to(T.location.get()),T.animation.init(),T.slidesInView.init(),T.slideFocus.init(Ge),T.eventHandler.init(Ge),T.resizeHandler.init(Ge),T.slidesHandler.init(Ge),T.options.loop&&T.slideLooper.loop(),M.offsetParent&&D.length&&T.dragHandler.init(Ge),O=l.init(Ge,j)))}function ie(He,ve){const Ue=N();re(),ne(h({startIndex:Ue},He),ve),f.emit("reInit")}function re(){T.dragHandler.destroy(),T.eventStore.clear(),T.translate.clear(),T.slideLooper.clear(),T.resizeHandler.destroy(),T.slidesHandler.destroy(),T.slidesInView.destroy(),T.animation.destroy(),l.destroy(),u.clear()}function pe(){S||(S=!0,u.clear(),re(),f.emit("destroy"),f.clear())}function L(He,ve,Ue){!C.active||S||(T.scrollBody.useBaseFriction().useDuration(ve===!0?0:C.duration),T.scrollTo.index(He,Ue||0))}function G(He){const ve=T.index.add(1).get();L(ve,He,-1)}function Q(He){const ve=T.index.add(-1).get();L(ve,He,1)}function te(){return T.index.add(1).get()!==N()}function B(){return T.index.add(-1).get()!==N()}
84function F(){return T.scrollSnapList}function W(){return T.scrollProgress.get(T.offsetLocation.get())}function N(){return T.index.get()}function z(){return T.indexPrevious.get()}function Y(){return T.slidesInView.get()}function X(){return T.slidesInView.get(!1)}function me(){return O}function Se(){return T}function ce(){return e}function ke(){return M}function $e(){return D}const Ge={canScrollNext:te,canScrollPrev:B,containerNode:ke,internalEngine:Se,destroy:pe,off:w,on:b,emit:E,plugins:me,previousScrollSnap:z,reInit:x,rootNode:ce,scrollNext:G,scrollPrev:Q,scrollProgress:W,scrollSnapList:F,scrollTo:L,selectedScrollSnap:N,slideNodes:$e,slidesInView:Y,slidesNotInView:X};return ne(t,n),setTimeout(()=>f.emit("init"),0),Ge}ld.globalOptions=void 0;function kg(e={},t=[]){const n=y.useRef(e),r=y.useRef(t),[o,a]=y.useState(),[l,u]=y.useState(),f=y.useCallback(()=>{o&&o.reInit(n.current,r.current)},[o]);return y.useEffect(()=>{xg(n.current,e)||(n.current=e,f())},[e,f]),y.useEffect(()=>{v$(r.current,t)||(r.current=t,f())},[t,f]),y.useEffect(()=>{if(y$()&&l){ld.globalOptions=kg.globalOptions;const h=ld(l,n.current,r.current);return a(h),()=>h.destroy()}else a(void 0)},[l,a]),[u,o]}kg.globalOptions=void 0;const Q$={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function J$(e,t){const n=e.scrollSnapList();return typeof t=="number"?n.map(()=>t):t(n,e)}function X$(e,t){const n=e.rootNode();return t&&t(n)||n}function Tg(e={}){let t,n,r,o,a=null,l=0,u=!1,f=!1,h=!1,m=!1;function g(L,G){n=L;const{mergeOptions:Q,optionsAtMedia:te}=G,B=Q(Q$,Tg.globalOptions),F=Q(B,e);if(t=te(F),n.scrollSnapList().length<=1)return;m=t.jump,r=!1,o=J$(n,t.delay);const{eventStore:W,ownerDocument:N}=n.internalEngine(),z=!!n.internalEngine().options.watchDrag,Y=X$(n,t.rootNode);W.add(N,"visibilitychange",T),z&&n.on("pointerDown",C),z&&!t.stopOnInteraction&&n.on("pointerUp",j),t.stopOnMouseEnter&&W.add(Y,"mouseenter",O),t.stopOnMouseEnter&&!t.stopOnInteraction&&W.add(Y,"mouseleave",M),t.stopOnFocusIn&&n.on("slideFocusStart",S),t.stopOnFocusIn&&!t.stopOnInteraction&&W.add(n.containerNode(),"focusout",x),t.playOnInit&&x()}function b(){n.off("pointerDown",C).off("pointerUp",j).off("slideFocusStart",S),S(),r=!0,u=!1}function w(){const{ownerWindow:L}=n.internalEngine();L.clearTimeout(l),l=L.setTimeout(ie,o[n.selectedScrollSnap()]),a=new Date().getTime(),n.emit("autoplay:timerset")}function E(){const{ownerWindow:L}=n.internalEngine();L.clearTimeout(l),l=0,a=null,n.emit("autoplay:timerstopped")}function x(){if(!r){if(k()){h=!0;return}u||n.emit("autoplay:play"),w(),u=!0}}function S(){r||(u&&n.emit("autoplay:stop"),E(),u=!1)}function T(){if(k())return h=u,S();h&&x()}function k(){const{ownerDocument:L}=n.internalEngine();return L.visibilityState==="hidden"}function C(){f||S()}function j(){f||x()}function O(){f=!0,S()}function M(){f=!1,x()}function D(L){typeof L<"u"&&(m=L),x()}function q(){u&&S()}function J(){u&&x()}function ne(){return u}function ie(){const{index:L}=n.internalEngine(),G=L.clone().add(1).get(),Q=n.scrollSnapList().length-1,te=t.stopOnLastSnap&&G===Q;if(n.canScrollNext()?n.scrollNext(m):n.scrollTo(0,m),n.emit("autoplay:select"),te)return S();x()}function re(){if(!a)return null;const L=o[n.selectedScrollSnap()],G=new Date().getTime()-a;return L-G}return{name:"autoplay",options:e,init:g,destroy:b,play:D,stop:q,reset:J,isPlaying:ne,timeUntilNext:re}}Tg.globalOptions=void 0;const Z$="https://yfbtyrteodefbwqqedmo.supabase.co/storage/v1/object/public",eF="https://api.theabbeytheatre.com/storage/v1/object/public";function Vu(){return aa()==="production"?eF:Z$}function EB(e,t){return`${Vu()}/${e}/${t}`}function pb(e){const t=e.match(/supabase\.co\/storage\/v1\/object\/public\/(.+)$/);if(t)return t[1];const n=e.match(/theabbeytheatre\.com\/storage\/v1\/object\/public\/(.+)$/);return n?n[1]:null}function dr(e){if(!e)return"";if(e.includes("yfbtyrteodefbwqqedmo.supabase.co/storage/v1/object/public/")){const r=pb(e);if(r)return`${Vu()}/${r}`}if(e.includes("api.theabbeytheatre.com/storage/v1/object/public/")){const r=pb(e);
84if(r)return`${Vu()}/${r}`}const t=["production-images","team-photos","gallery-images","policy-documents","job-descriptions","custom-pages","signage-media"],n=e.split("/")[0];return t.includes(n)?`${Vu()}/${e}`:e}const mb=e=>{try{const t=document.createElement("canvas"),n=t.getContext("2d");if(!n)return null;t.width=1,t.height=1,n.drawImage(e,0,0,1,1);const[r,o,a]=n.getImageData(0,0,1,1).data;return .299*r+.587*o+.114*a}catch(t){return console.warn("[HeroCarousel] Image brightness analysis unavailable",t),null}},tF=({page:e="home"})=>{const{user:t}=Hd(),[n,r]=y.useState(0),[o,a]=y.useState({}),{data:l,isLoading:u}=Sn({queryKey:["hero-carousel",e],queryFn:async()=>{const{data:k,error:C}=await Me.from("hero_carousel_slides").select("*, productions(is_cancelled)").eq("page",e).eq("is_active",!0).order("display_order",{ascending:!0});if(C)throw C;return(k||[]).filter(j=>!j.productions?.is_cancelled)}}),{data:f}=Sn({queryKey:["carousel-personalisation",e,t?.id],queryFn:async()=>{const{data:k,error:C}=await Me.functions.invoke("get-personalised-carousel",{body:{page:e}});return C?(console.error("[HeroCarousel] Personalisation error:",C),{slideOrder:[],isPersonalised:!1}):k},enabled:!!l&&l.length>0,staleTime:1e3*60*5}),h=y.useMemo(()=>{if(!l)return[];if(!f?.slideOrder||f.slideOrder.length===0)return l;const k=new Map(f.slideOrder.map((C,j)=>[C,j]));return[...l].sort((C,j)=>{const O=k.get(C.id)??999,M=k.get(j.id)??999;return O-M})},[l,f]),{data:m}=Sn({queryKey:["hero-carousel-config",e],queryFn:async()=>{const{data:k,error:C}=await Me.from("hero_carousel_config").select("*").eq("page",e).maybeSingle();if(C)throw C;return k}});y.useEffect(()=>{!h||h.length===0||h.forEach(k=>{const C=dr(k.image_url);mm.from(C).getPalette().then(j=>{if(!j?.Vibrant){const ne=new Image;ne.crossOrigin="anonymous",ne.src=C,ne.onload=()=>{const ie=mb(ne);a(re=>({...re,[k.id]:{tone:ie!==null&&ie>128?"dark":"light",strokeColor:"rgba(0,0,0,0.5)"}}))};return}const{r:O,g:M,b:D}=j.Vibrant,q=(O*299+M*587+D*114)/1e3,J=`rgb(${O}, ${M}, ${D})`;a(ne=>({...ne,[k.id]:{tone:q>160?"dark":"light",strokeColor:J}}))}).catch(()=>{const j=new Image;j.crossOrigin="anonymous",j.src=C,j.onload=()=>{const O=mb(j);a(M=>({...M,[k.id]:{tone:O!==null&&O>128?"dark":"light",strokeColor:"rgba(0,0,0,0.5)"}}))}})})},[h]);const[g,b]=kg({loop:!0,duration:30},[Tg({delay:6e3,stopOnInteraction:!1})]),w=y.useCallback(()=>{b&&b.scrollPrev()},[b]),E=y.useCallback(()=>{b&&b.scrollNext()},[b]),x=y.useCallback(k=>{b&&b.scrollTo(k)},[b]),S=y.useCallback(()=>{b&&r(b.selectedScrollSnap())},[b]);y.useEffect(()=>{if(b)return S(),b.on("select",S),b.on("reInit",S),()=>{b.off("select",S),b.off("reInit",S)}},[b,S]);const T={height:m?`${m.height_vh}vh`:"70vh",minHeight:m?`${m.min_height_px}px`:"400px",...m?.max_height_px?{maxHeight:`${m.max_height_px}px`}:{}};return u||!h||h.length===0?d.jsx("section",{className:"relative w-full overflow-hidden bg-gradient-to-br from-primary/90 to-secondary/80",style:T,children:d.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:d.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary-foreground/20 border-t-primary-foreground"})})}):d.jsxs("section",{className:"relative w-full overflow-hidden",style:T,children:[d.jsx("div",{className:"embla",ref:g,children:d.jsx("div",{className:"embla__container flex",children:h.map((k,C)=>{const j=o[k.id]||{tone:"light"},O=k.text_color==="white"?"light":k.text_color==="black"?"dark":j.tone,M=k.show_title!==!1,D=k.show_subtitle!==!1,q=k.show_plan_visit_button!==!1,J=dr(k.image_url),ne=k.mobile_image_url?dr(k.mobile_image_url):J,ie=k.crop_x!=null,re=ie?{}:{objectPosition:`${k.image_position_x||50}% ${k.image_position_y||50}%`,transform:`scale(${(k.image_scale||100)/100})`},pe=!!k.mobile_image_url,G=(pe?k.mobile_crop_x!=null:ie)?{}:pe?{objectPosition:"50% 50%",transform:"scale(1)"}:{objectPosition:`${k.image_position_x||50}% ${k.image_position_y||50}%`,transform:`scale(${(k.image_scale||100)/100})`};return d.jsxs("div",{className:"embla__slide relative min-w-0 flex-[0_0_100%]",children:[d.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[d.jsx("img",{src:J,alt:"",loading:C===0?"eager":"lazy",fetchPriority:C===0?"high":void 0,className:"absolute inset-0 h-full w-full object-cover transition-transform duration-700 hidden md:block",style:re}),d.jsx("img",{src:ne,alt:"",loading:C===0?"eager":"lazy",fetchPriority:C===0?"high":void 0,className:"absolute inset-0 h-full w-full object-cover transition-transform duration-700 md:hidden",style:G}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/90 via-background/50 to-background/20"})]}),d.jsxs("div",{className:Le("relative mx-auto flex h-full max-w-7xl flex-col items-start justify-center px-4 sm:px-6 lg:px-8",O==="dark"?"text-gray-900":"text-white"),children:[M&&d.jsx("h1",{className:Le("max-w-3xl text-5xl font-bold tracking-tight animate-fade-in sm:text-6xl lg:text-7xl",O==="dark"?"text-gray-900":"text-white"),style:{textShadow:O==="dark"?"0 2px 6px rgba(0, 0, 0, 0.4), 0 0 12px rgba(0, 0, 0, 0.3)":"0 2px 6px rgba(0, 0, 0, 0.6), 0 0 18px rgba(0, 0, 0, 0.4)"},children:k.title}),D&&k.subtitle&&d.jsx("p",{className:"mt-6 max-w-2xl text-xl animate-fade-in sm:text-2xl",style:{animationDelay:"0.1s",textShadow:O==="dark"?"0 2px 5px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 0, 0, 0.3)":"0 2px 5px rgba(0, 0, 0, 0.6), 0 0 14px rgba(0, 0, 0, 0.4)"},children:k.subtitle}),k.cta_text&&k.cta_link||q?d.jsxs("div",{className:"mt-10 flex gap-4 animate-fade-in",style:{animationDelay:"0.2s"},children:[k.cta_text&&k.cta_link&&d.jsx(Ce,{asChild:!0,size:"lg",className:"bg-secondary hover:bg-secondary/90",children:d.jsxs(Ae,{to:k.cta_link,children:[k.cta_text,d.jsx(Om,{className:"ml-2 h-5 w-5"})]})}),q&&d.jsx(Ce,{asChild:!0,size:"lg",variant:"outline",className:"border-primary-foreground
84/20 bg-primary-foreground/5 text-primary-foreground hover:bg-primary-foreground/10",children:d.jsx(Ae,{to:"/visit",children:"Plan Your Visit"})})]}):null]}),d.jsx("span",{className:"sr-only",children:k.alt_text})]},k.id)})})}),h.length>1&&d.jsxs(d.Fragment,{children:[d.jsx(Ce,{variant:"ghost",size:"icon",onClick:w,className:"absolute left-4 top-1/2 z-10 hidden h-12 w-12 -translate-y-1/2 rounded-full bg-background/10 text-primary-foreground backdrop-blur-sm transition-all hover:bg-background/20 hover:scale-110 md:flex","aria-label":"Previous slide",children:d.jsx($x,{className:"h-6 w-6"})}),d.jsx(Ce,{variant:"ghost",size:"icon",onClick:E,className:"absolute right-4 top-1/2 z-10 hidden h-12 w-12 -translate-y-1/2 rounded-full bg-background/10 text-primary-foreground backdrop-blur-sm transition-all hover:bg-background/20 hover:scale-110 md:flex","aria-label":"Next slide",children:d.jsx(Im,{className:"h-6 w-6"})}),d.jsx("div",{className:"absolute bottom-6 left-1/2 z-10 flex -translate-x-1/2 gap-2",children:h.map((k,C)=>d.jsx("button",{onClick:()=>x(C),className:Le("h-2 rounded-full transition-all",C===n?"w-8 bg-primary-foreground":"w-2 bg-primary-foreground/40 hover:bg-primary-foreground/60"),"aria-label":`Go to slide ${C+1}`},C))})]})]})},UE=y.forwardRef(({className:e,type:t,...n},r)=>d.jsx("input",{type:t,className:Le("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));UE.displayName="Input";function zE(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var a;const l=f=>f===null?null:JSON.parse(f,void 0),u=(a=n.getItem(o))!=null?a:null;return u instanceof Promise?u.then(l):l(u)},setItem:(o,a)=>n.setItem(o,JSON.stringify(a,void 0)),removeItem:o=>n.removeItem(o)}}const vm=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return vm(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return vm(r)(n)}}}},nF=(e,t)=>(n,r,o)=>{let a={storage:zE(()=>localStorage),partialize:x=>x,version:0,merge:(x,S)=>({...S,...x}),...t},l=!1;const u=new Set,f=new Set;let h=a.storage;if(!h)return e((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...x)},r,o);const m=()=>{const x=a.partialize({...r()});return h.setItem(a.name,{state:x,version:a.version})},g=o.setState;o.setState=(x,S)=>(g(x,S),m());const b=e((...x)=>(n(...x),m()),r,o);o.getInitialState=()=>b;let w;const E=()=>{var x,S;if(!h)return;l=!1,u.forEach(k=>{var C;return k((C=r())!=null?C:b)});const T=((S=a.onRehydrateStorage)==null?void 0:S.call(a,(x=r())!=null?x:b))||void 0;return vm(h.getItem.bind(h))(a.name).then(k=>{if(k)if(typeof k.version=="number"&&k.version!==a.version){if(a.migrate){const C=a.migrate(k.state,k.version);return C instanceof Promise?C.then(j=>[!0,j]):[!0,C]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,k.state];return[!1,void 0]}).then(k=>{var C;const[j,O]=k;if(w=a.merge(O,(C=r())!=null?C:b),n(w,!0),j)return m()}).then(()=>{T?.(w,void 0),w=r(),l=!0,f.forEach(k=>k(w))}).catch(k=>{T?.(void 0,k)})};return o.persist={setOptions:x=>{a={...a,...x},x.storage&&(h=x.storage)},clearStorage:()=>{h?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>E(),hasHydrated:()=>l,onHydrate:x=>(u.add(x),()=>{u.delete(x)}),onFinishHydration:x=>(f.add(x),()=>{f.delete(x)})},a.skipHydration||E(),w||b},rF=nF,wm=new Map,gl=e=>{try{return window.localStorage.getItem(e)}catch{return wm.get(e)??null}},Oi={getItem:gl,setItem:(e,t)=>{try{window.localStorage.setItem(e,t)}catch{wm.set(e,t)}},removeItem:e=>{try{window.localStorage.removeItem(e)}catch{wm.delete(e)}}},sF=()=>{let e=gl("cart_session_id");return e||(e=`session_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,Oi.setItem("cart_session_id",e)),e},BE=fS()(rF((e,t)=>({items:[],cartId:null,checkoutUrl:null,isLoading:!1,isCheckingOut:!1,reservationExpiresAt:null,discountCode:null,sessionId:sF(),userId:null,checkoutStartedAt:null,serverSyncedAt:null,activeReservation:null,reservationIds:[],addItem:n=>{const{items:r}=t(),o=r.find(a=>a.categoryId===n.categoryId&&a.showtimeId===n.showtimeId);e(o?{items:r.map(a=>a.categoryId===n.categoryId&&a.showtimeId===n.showtimeId?{...a,quantity:a.quantity+n.quantity}:a)}:{items:[...r,n]})},updateQuantity:(n,r)=>{if(r<=0){t().removeItem(n);return}e({items:t().items.map(o=>o.categoryId===n?{...o,quantity:r}:o)})},removeItem:n=>{e({items:t().items.filter(r=>r.categoryId!==n)})},clearCart:()=>{e({items:[],cartId:null,checkoutUrl:null,reservationExpiresAt:null,isCheckingOut:!1,discountCode:null,reservationIds:[]})},setCartId:n=>e({cartId:n}),setCheckoutUrl:n=>e({checkoutUrl:n}
84),setLoading:n=>e({isLoading:n}),setCheckingOut:n=>e({isCheckingOut:n}),setReservationExpiry:n=>e({reservationExpiresAt:n}),setDiscountCode:n=>e({discountCode:n}),setReservationIds:n=>e({reservationIds:n}),createCheckout:async()=>{const{items:n,discountCode:r,reservationIds:o,setLoading:a,setCheckingOut:l,setCheckoutUrl:u,syncToServer:f}=t();if(console.log("Cart store: Starting checkout with",n.length,"items"),n.length===0)return console.error("Cart store: No items in cart"),null;a(!0),e({checkoutStartedAt:Date.now()}),l(!0),await f();try{console.log("Cart store: Calling create-checkout edge function...");const{data:h,error:m}=await Me.functions.invoke("create-checkout",{body:{items:n,discountCode:r||void 0,reservationIds:o}});if(m)throw new Error(m.message);if(!h?.url)throw new Error("No checkout URL returned");return console.log("Cart store: Checkout URL received:",h.url),u(h.url),h.url}catch(h){throw console.error("Cart store: Failed to create checkout:",h),l(!1),e({checkoutStartedAt:null}),h}finally{a(!1)}},syncToServer:async()=>{const{items:n,discountCode:r,reservationExpiresAt:o,sessionId:a}=t();try{const{data:{user:l}}=await Me.auth.getUser();if(l){const{error:u}=await Me.from("user_carts").upsert([{session_id:null,user_id:l.id,cart_data:JSON.parse(JSON.stringify(n)),discount_code:r,reservation_expires_at:o}],{onConflict:"user_id"});if(u)throw u}else{const{error:u}=await Me.rpc("upsert_session_cart",{p_session_id:a,p_cart_data:JSON.parse(JSON.stringify(n)),p_discount_code:r,p_reservation_expires_at:o});if(u)throw u}e({serverSyncedAt:Date.now()}),console.log("Cart synced to server")}catch(l){console.error("Failed to sync cart to server:",l)}},syncFromServer:async()=>{const{sessionId:n}=t();try{const{data:{user:r}}=await Me.auth.getUser();let o=null;if(r){const{data:l,error:u}=await Me.from("user_carts").select("cart_data, discount_code, reservation_expires_at").eq("user_id",r.id).maybeSingle();if(u)throw u;o=l}else{const{data:l,error:u}=await Me.rpc("get_session_cart",{p_session_id:n});if(u)throw u;o=Array.isArray(l)?l[0]:l}if(!o){console.log("No cart found on server");return}const a=Array.isArray(o.cart_data)?o.cart_data:[];e({items:a,discountCode:o.discount_code,reservationExpiresAt:o.reservation_expires_at,userId:r?.id||null,serverSyncedAt:Date.now()}),console.log("Cart restored from server:",a.length,"items")}catch(r){console.error("Failed to sync cart from server:",r)}},resetCheckoutState:()=>{e({isCheckingOut:!1,checkoutStartedAt:null,checkoutUrl:null}),Oi.removeItem("checkoutStartedAt")},loadActiveReservation:()=>{try{const n=gl("activeReservation");if(n){const r=JSON.parse(n),o=new Date(r.expiresAt).getTime(),a=Date.now();o>a?e({activeReservation:r}):(Oi.removeItem("activeReservation"),e({activeReservation:null}))}else e({activeReservation:null})}catch(n){console.error("Failed to load active reservation:",n),e({activeReservation:null})}},clearActiveReservation:async()=>{const{activeReservation:n}=t();if(n?.reservationIds?.length)try{await Me.from("ticket_reservations").delete().in("id",n.reservationIds)}catch(r){console.error("Failed to delete reservations:",r)}Oi.removeItem("activeReservation"),e({activeReservation:null})}}),{name:"ticket-cart",storage:zE(()=>Oi),partialize:e=>({items:e.items,cartId:e.cartId,checkoutUrl:e.checkoutUrl,reservationExpiresAt:e.reservationExpiresAt,discountCode:e.discountCode,reservationIds:e.reservationIds}),onRehydrateStorage:()=>async e=>{if(console.log("Cart rehydrated:",e?.items?.length||0,"items"),e?.isCheckingOut&&e?.checkoutStartedAt&&Date.now()-e.checkoutStartedAt>1200*1e3&&(e.resetCheckoutState(),console.log("Abandoned checkout detected, state reset")),e?.items&&e.items.length>0&&e.isCheckingOut)try{const{data:{user:t}}=await Me.auth.getUser();if(t){const n=new Date(Date.now()-3e5).toISOString(),{data:r}=await Me.from("orders").select("id, completed_at").eq("user_id",t.id).eq("payment_status","paid").gte("completed_at",n).order("completed_at",{ascending:!1}).limit(1);r&&r.length>0&&(console.log("Recent completed order found, clearing cart and reservation"),e.clearCart(),Oi.removeItem("activeReservation"))}}
84catch(t){console.error("Failed to check for completed orders:",t)}if(e){const t=gl("pendingReservation"),n=gl("pendingSeatsToRestore");!t&&!n?await e.syncFromServer():console.log("Skipping server sync - pending reservation exists"),e.loadActiveReservation()}}})),gb=()=>{const e=no(),[t,n]=y.useState(!1),[r,o]=y.useState(null),[a,l]=y.useState(null),[u,f]=y.useState(""),[h,m]=y.useState(!1),[g,b]=y.useState([]),[w,E]=y.useState(!1),{items:x,isLoading:S,isCheckingOut:T,reservationExpiresAt:k,discountCode:C,activeReservation:j,updateQuantity:O,removeItem:M,createCheckout:D,clearCart:q,setDiscountCode:J,loadActiveReservation:ne,clearActiveReservation:ie}=BE(),re=x.reduce((Y,X)=>Y+X.quantity,0),pe=x.reduce((Y,X)=>Y+X.price*X.quantity,0);y.useEffect(()=>{t&&ne()},[t,ne]);const L=y.useMemo(()=>[],[x]);y.useEffect(()=>{(async()=>{if(x.length===0||L.length===0){b([]);return}E(!0);try{const{data:X,error:me}=await Me.functions.invoke("suggest-discounts",{body:{productionIds:L}});if(me)throw me;b(X?.suggestions||[])}catch(X){console.error("Error fetching discount suggestions:",X)}finally{E(!1)}})()},[x,L]),y.useEffect(()=>{if(!k||x.length===0){o(null);return}const Y=()=>{const me=new Date(k).getTime(),Se=Date.now(),ce=Math.max(0,Math.floor((me-Se)/1e3));o(ce),ce===0?(q(),gn.error("Reservation expired",{description:"Your seats have been released. Please select seats again."})):ce===120?gn.warning("Only 2 minutes remaining!",{description:"Complete your checkout soon to secure your seats."}):ce===60&&gn.warning("Only 1 minute remaining!",{description:"Your reservation is about to expire."})};Y();const X=setInterval(Y,1e3);return()=>clearInterval(X)},[k,x.length,q]),y.useEffect(()=>{if(!j||x.length>0){l(null);return}const Y=()=>{const me=new Date(j.expiresAt).getTime(),Se=Date.now(),ce=Math.max(0,Math.floor((me-Se)/1e3));l(ce),ce===0&&(ie(),gn.error("Reservation expired",{description:"Your seats have been released. Please select seats again."}))};Y();const X=setInterval(Y,1e3);return()=>clearInterval(X)},[j,x.length,ie]);const G=Y=>{const X=Math.floor(Y/60),me=Y%60;return`${X}:${me.toString().padStart(2,"0")}`},Q=async()=>{if(u.trim()){m(!0);try{const Y=pe,{data:X,error:me}=await Me.functions.invoke("validate-discount-code",{body:{code:u.toUpperCase().trim(),cartProductionIds:L,cartTotal:Y}});if(me||!X||!X.valid){gn.error(X?.error||"Invalid discount code"),m(!1);return}J(u.toUpperCase().trim()),gn.success("Discount code applied"),f("")}catch(Y){console.error("Error validating discount:",Y),gn.error("Failed to validate discount code")}finally{m(!1)}}},te=()=>{J(null),gn.success("Discount code removed")},B=async()=>{try{const Y=await D();Y&&(window.open(Y,"_blank"),n(!1),gn.success("Opening checkout in new tab"))}catch(Y){console.error("Checkout failed:",Y),gn.error("Failed to create checkout. Please try again.")}},F=()=>{n(!1),e("/basket")},W=()=>{j&&(n(!1),e(`/seat-selection/${j.showtimeId}`))},N=async()=>{await ie(),gn.success("Reservation cancelled")},z=re>0?re:j?.selectedSeats?.length||0;return d.jsxs(CE,{open:t,onOpenChange:n,children:[d.jsx(RE,{asChild:!0,children:d.jsxs(Ce,{variant:"ghost",size:"icon",className:"relative","aria-label":"Shopping cart",children:[d.jsx(Aw,{className:"h-5 w-5"}),z>0&&d.jsx(Do,{className:"absolute -top-2 -right-2 h-5 w-5 rounded-full p-0 flex items-center justify-center text-xs bg-secondary",children:z})]})}),d.jsxs(bg,{className:"w-full sm:max-w-lg flex flex-col h-full",children:[d.jsxs(jE,{className:"flex-shrink-0",children:[d.jsx(PE,{children:"Shopping Cart"}),d.jsx(NE,{children:re===0?"Your cart is empty":`${re} item${re!==1?"s":""} in your cart`})]}),r!==null&&d.jsxs("div",{className:`flex items-center gap-2 p-3 rounded-lg border ${r<=60?"bg-destructive/10 border-destructive":r<=120?"bg-yellow-500/10 border-yellow-500":"bg-muted border-border"}`,children:[d.jsx(yl,{className:`h-4 w-4 ${r<=60?"text-destructive":r<=120?"text-yellow-600":"text-muted-foreground"}`}),d.jsxs("div",{className:"flex-1",children:[d.jsxs("p",{className:`text-sm font-medium ${r<=60?"text-destructive":r<=120?"text-yellow-600":"text-foreground"}`,children:["Reservation expires in ",G(r)]}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Complete checkout to secure your seats"})]})]}),d.jsx("div",{className:"flex flex-col flex-1 pt-6 min-h-0",children:x.length===0&&!j?d.jsx("div",{className:"flex-1 flex items-center justify-center",children:d.jsxs("div",{className:"text-center",children:[d.jsx(A
84w,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),d.jsx("p",{className:"text-muted-foreground",children:"Your cart is empty"})]})}):x.length===0&&j?d.jsx("div",{className:"flex-1 flex flex-col",children:d.jsxs("div",{className:"space-y-4",children:[a!==null&&d.jsxs("div",{className:`flex items-center gap-2 p-3 rounded-lg border ${a<=60?"bg-destructive/10 border-destructive":a<=120?"bg-yellow-500/10 border-yellow-500":"bg-muted border-border"}`,children:[d.jsx(yl,{className:`h-4 w-4 ${a<=60?"text-destructive":a<=120?"text-yellow-600":"text-muted-foreground"}`}),d.jsx("div",{className:"flex-1",children:d.jsxs("p",{className:`text-sm font-medium ${a<=60?"text-destructive":a<=120?"text-yellow-600":"text-foreground"}`,children:["Reservation expires in ",G(a)]})})]}),d.jsxs("div",{className:"p-4 bg-muted/50 rounded-lg border space-y-3",children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(xR,{className:"h-5 w-5 text-primary mt-0.5"}),d.jsxs("div",{className:"flex-1",children:[d.jsx("h4",{className:"font-semibold",children:j.showDetail
84s?.title}),d.jsxs("p",{className:"text-sm text-muted-foreground",children:[j.showDetails?.date," at ",j.showDetails?.time]})]})]}),d.jsxs("div",{className:"pl-8",children:[d.jsxs("p",{className:"text-sm font-medium",children:[j.selectedSeats?.length||0," seat",(j.selectedSeats?.length||0)!==1?"s":""," reserved"]}),d.jsx("p",{className:"text-xs text-muted-foreground",children:j.selectedSeats?.map(Y=>`${String.fromCharCode(65+Y.row)}${Y.seat+1}`).join(", ")})]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs(Ce,{onClick:F,className:"w-full bg-secondary hover:bg-secondary/90",size:"lg",children:[d.jsx(Om,{className:"w-4 h-4 mr-2"}),"Continue to Checkout"]}),d.jsx(Ce,{onClick:W,variant:"outline",className:"w-full",children:"Change Seats"}),d.jsx(Ce,{onClick:N,variant:"ghost",className:"w-full text-destructive hover:text-destructive hover:bg-destructive/10",children:"Cancel Reservation"})]})]})}):d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"flex-1 overflow-y-auto pr-2 min-h-0",children:d.jsx("div",{className:"space-y-4",children:x.map((Y,X)=>d.jsxs("div",{className:"flex gap-4 p-2 border rounded-lg",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("h4",{className:"font-medium truncate",children:Y.showTitle}),d.jsxs("p",{className:"text-sm text-muted-foreground",children:[Y.categoryName," ⢠",Y.showDate," at ",Y.showTime]}),d.jsxs("p",{className:"font-semibold",children:["£",Y.price.toFixed(2)," x ",Y.quantity]})]}),d.jsxs("div",{className:"flex flex-col items-end gap-2 flex-shrink-0",children:[d.jsx(Ce,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>M(Y.categoryId),"aria-label":"Remove item",children:d.jsx($R,{className:"h-3 w-3"})}),d.jsx("div",{className:"flex items-center gap-1",children:d.jsxs("span",{className:"text-sm text-muted-foreground",children:["Qty: ",Y.quantity]})})]})]},`${Y.categoryId}-${X}`))})}),d.jsxs("div",{className:"flex-shrink-0 space-y-4 pt-4 border-t bg-background",children:[g.length>0&&!C&&d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium",children:"Special Offers"}),g.map((Y,X)=>d.jsxs("div",{className:"p-3 bg-blue-500/10 border border-blue-500/20 rounded-lg space-y-2",children:[d.jsx("p",{className:"text-sm font-medium text-blue-700 dark:text-blue-300",children:Y.message||`Get ${Y.discountType==="percentage"?`${Y.discountValue}%`:`£${Y.discountValue}`} off eligible items!`}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("code",{className:"text-xs bg-background px-2 py-1 rounded border font-mono",children:Y.discountCode}),d.jsx(Ce,{variant:"outline",size:"sm",onClick:()=>{f(Y.discountCode),Q()},className:"text-xs",children:"Apply Code"})]})]},X))]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium",children:"Discount Code"}),C?d.jsxs("div",{className:"flex items-center gap-2 p-3 bg-green-500/10 border border-green-500/20 rounded-lg",children:[d.jsx(LR,{className:"h-4 w-4 text-green-600"}),d.jsx("span",{className:"flex-1 font-mono text-sm font-semibold",children:C}),d.jsx(Ce,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:te,"aria-label":"Remove discount code",children:d.jsx(Zi,{className:"h-3 w-3"})})]}):d.jsxs("div",{className:"flex gap-2",children:[d.jsx(UE,{placeholder:"Enter code",value:u,onChange:Y=>f(Y.target.value.toUpperCase()),onKeyDown:Y=>Y.key==="Enter"&&Q(),className:"uppercase",disabled:h}),d.jsx(Ce,{variant:"outline",onClick:Q,disabled:!u.trim()||h,children:h?d.jsx(Zs,{className:"h-4 w-4 animate-spin"}):"Apply"})]})]}),d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-lg font-semibold",children:"Total"}),d.jsxs("span",{className:"text-xl font-bold",children:["£",pe.toFixed(2)]})]}),C&&d.jsx("p",{className:"text-xs text-muted-foreground",children:"Discount will be applied at checkout"}),d.jsx(Ce,{onClick:B,className:"w-full bg-secondary hover:bg-secondary/90",size:"lg",disabled:x.length===0||S||T||r!==null&&r===0,children:S||T?d.jsxs(d.Fragment,{children:[d.jsx(Zs,{className:"w-4 h-4 mr-2 animate-spin"}),T?"Processing...":"Creating Checkout..."]}):d.jsxs(d.Fragment,{children:[d.jsx(CR,{className:"w-4 h-4 mr-2"}),"Proceed to Checkout"]})})]})]})})]})]})};var oF=y.createContext(void 0);function HE(e){const t=y.useContext(oF);return e||t||"ltr"}var mp="rovingFocusGroup.onEntryFocus",iF={bubbles:!1,cancelable:!0},Yl="RovingFocusGroup",[bm,VE,aF]=Rm(Yl),[lF,WE]=Es(Yl,[aF]),[cF,uF]=lF(Yl),qE=y.forwardRef((e,t)=>
vendor: 4,355 bytes, line 84
84d.jsx(bm.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(bm.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(dF,{...e,ref:t})})}));qE.displayName=Yl;var dF=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:f,onEntryFocus:h,preventScrollOnEntryFocus:m=!1,...g}=e,b=y.useRef(null),w=xt(t,b),E=HE(a),[x,S]=Xi({prop:l,defaultProp:u??null,onChange:f,caller:Yl}),[T,k]=y.useState(!1),C=Yn(h),j=VE(n),O=y.useRef(!1),[M,D]=y.useState(0);return y.useEffect(()=>{const q=b.current;if(q)return q.addEventListener(mp,C),()=>q.removeEventListener(mp,C)},[C]),d.jsx(cF,{scope:n,orientation:r,dir:E,loop:o,currentTabStopId:x,onItemFocus:y.useCallback(q=>S(q),[S]),onItemShiftTab:y.useCallback(()=>k(!0),[]),onFocusableItemAdd:y.useCallback(()=>D(q=>q+1),[]),onFocusableItemRemove:y.useCallback(()=>D(q=>q-1),[]),children:d.jsx(Ze.div,{tabIndex:T||M===0?-1:0,"data-orientation":r,...g,ref:w,style:{outline:"none",...e.style},onMouseDown:Re(e.onMouseDown,()=>{O.current=!0}),onFocus:Re(e.onFocus,q=>{const J=!O.current;if(q.target===q.currentTarget&&J&&!T){const ne=new CustomEvent(mp,iF);if(q.currentTarget.dispatchEvent(ne),!ne.defaultPrevented){const ie=j().filter(Q=>Q.focusable),re=ie.find(Q=>Q.active),pe=ie.find(Q=>Q.id===x),G=[re,pe,...ie].filter(Boolean).map(Q=>Q.ref.current);YE(G,m)}}O.current=!1}),onBlur:Re(e.onBlur,()=>k(!1))})})}),GE="RovingFocusGroupItem",KE=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:l,...u}=e,f=No(),h=a||f,m=uF(GE,n),g=m.currentTabStopId===h,b=VE(n),{onFocusableItemAdd:w,onFocusableItemRemove:E,currentTabStopId:x}=m;return y.useEffect(()=>{if(r)return w(),()=>E()},[r,w,E]),d.jsx(bm.ItemSlot,{scope:n,id:h,focusable:r,active:o,children:d.jsx(Ze.span,{tabIndex:g?0:-1,"data-orientation":m.orientation,...u,ref:t,onMouseDown:Re(e.onMouseDown,S=>{r?m.onItemFocus(h):S.preventDefault()}),onFocus:Re(e.onFocus,()=>m.onItemFocus(h)),onKeyDown:Re(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){m.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const T=pF(S,m.orientation,m.dir);if(T!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let C=b().filter(j=>j.focusable).map(j=>j.ref.current);if(T==="last")C.reverse();else if(T==="prev"||T==="next"){T==="prev"&&C.reverse();const j=C.indexOf(S.currentTarget);C=m.loop?mF(C,j+1):C.slice(j+1)}setTimeout(()=>YE(C))}}),children:typeof l=="function"?l({isCurrentTabStop:g,hasTabStop:x!=null}):l})})});KE.displayName=GE;var fF={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function hF(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function pF(e,t,n){const r=hF(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return fF[r]}function YE(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function mF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var gF=qE,yF=KE,xm=["Enter"," "],vF=["ArrowDown","PageUp","Home"],QE=["ArrowUp","PageDown","End"],wF=[...vF,...QE],bF={ltr:[...xm,"ArrowRight"],rtl:[...xm,"ArrowLeft"]},xF={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ql="Menu",[Ll,_F,SF]=Rm(Ql),[Vo,JE]=Es(Ql,[SF,_d,WE]),Wd=_d(),XE=WE(),[EF,Wo]=Vo(Ql),[kF,Jl]=Vo(Ql),ZE=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:l=!0}=e,u=Wd(t),[f,h]=y.useState(null),m=y.useRef(!1),g=Yn(a),b=HE(o);return y.useEffect(()=>{const w=()=>{m.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},E=()=>m.current=!1;return document.addEventListener("keydown",w,{capture:!0}),()=>{document.removeEventListener("keydown",w,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),d.jsx(__,{...u,children:d.jsx(EF,{scope:t,open:n,onOpenChange:g,content:f,onContentChange:h,children:d.jsx(kF,{scope:t,onClose:y.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:m,dir:b,modal:l,children:r})})})};ZE.displayName=Ql;var TF="MenuAnchor",Cg=y.forwardRef((e,t)=>
vendor: 13,470 bytes, line 84
84{const{__scopeMenu:n,...r}=e,o=Wd(n);return d.jsx(S_,{...o,...r,ref:t})});Cg.displayName=TF;var Rg="MenuPortal",[CF,ek]=Vo(Rg,{forceMount:void 0}),tk=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Wo(Rg,t);return d.jsx(CF,{scope:t,forceMount:n,children:d.jsx(Xr,{present:n||a.open,children:d.jsx(gd,{asChild:!0,container:o,children:r})})})};tk.displayName=Rg;var fr="MenuContent",[RF,Ag]=Vo(fr),nk=y.forwardRef((e,t)=>{const n=ek(fr,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Wo(fr,e.__scopeMenu),l=Jl(fr,e.__scopeMenu);return d.jsx(Ll.Provider,{scope:e.__scopeMenu,children:d.jsx(Xr,{present:r||a.open,children:d.jsx(Ll.Slot,{scope:e.__scopeMenu,children:l.modal?d.jsx(AF,{...o,ref:t}):d.jsx(jF,{...o,ref:t})})})})}),AF=y.forwardRef((e,t)=>{const n=Wo(fr,e.__scopeMenu),r=y.useRef(null),o=xt(t,r);return y.useEffect(()=>{const a=r.current;if(a)return jS(a)},[]),d.jsx(jg,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Re(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),jF=y.forwardRef((e,t)=>{const n=Wo(fr,e.__scopeMenu);return d.jsx(jg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),PF=qi("MenuContent.ScrollLock"),jg=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEntryFocus:f,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:b,onDismiss:w,disableOutsideScroll:E,...x}=e,S=Wo(fr,n),T=Jl(fr,n),k=Wd(n),C=XE(n),j=_F(n),[O,M]=y.useState(null),D=y.useRef(null),q=xt(t,D,S.onContentChange),J=y.useRef(0),ne=y.useRef(""),ie=y.useRef(0),re=y.useRef(null),pe=y.useRef("right"),L=y.useRef(0),G=E?dg:y.Fragment,Q=E?{as:PF,allowPinchZoom:!0}:void 0,te=F=>{const W=ne.current+F,N=j().filter(ce=>!ce.disabled),z=document.activeElement,Y=N.find(ce=>ce.ref.current===z)?.textValue,X=N.map(ce=>ce.textValue),me=HF(X,W,Y),Se=N.find(ce=>ce.textValue===me)?.ref.current;(function ce(ke){ne.current=ke,window.clearTimeout(J.current),ke!==""&&(J.current=window.setTimeout(()=>ce(""),1e3))})(W),Se&&setTimeout(()=>Se.focus())};y.useEffect(()=>()=>window.clearTimeout(J.current),[]),_S();const B=y.useCallback(F=>pe.current===re.current?.side&&WF(F,re.current?.area),[]);return d.jsx(RF,{scope:n,searchRef:ne,onItemEnter:y.useCallback(F=>{B(F)&&F.preventDefault()},[B]),onItemLeave:y.useCallback(F=>{B(F)||(D.current?.focus(),M(null))},[B]),onTriggerLeave:y.useCallback(F=>{B(F)&&F.preventDefault()},[B]),pointerGraceTimerRef:ie,onPointerGraceIntentChange:y.useCallback(F=>{re.current=F},[]),children:d.jsx(G,{...Q,children:d.jsx(ug,{asChild:!0,trapped:o,onMountAutoFocus:Re(a,F=>{F.preventDefault(),D.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:d.jsx(Ul,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:b,onDismiss:w,children:d.jsx(gF,{asChild:!0,...C,dir:T.dir,orientation:"vertical",loop:r,currentTabStopId:O,onCurrentTabStopIdChange:M,onEntryFocus:Re(f,F=>{T.isUsingKeyboardRef.current||F.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(E_,{role:"menu","aria-orientation":"vertical","data-state":vk(S.open),"data-radix-menu-content":"",dir:T.dir,...k,...x,ref:q,style:{outline:"none",...x.style},onKeyDown:Re(x.onKeyDown,F=>{const N=F.target.closest("[data-radix-menu-content]")===F.currentTarget,z=F.ctrlKey||F.altKey||F.metaKey,Y=F.key.length===1;N&&(F.key==="Tab"&&F.preventDefault(),!z&&Y&&te(F.key));const X=D.current;if(F.target!==X||!wF.includes(F.key))return;F.preventDefault();const Se=j().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);QE.includes(F.key)&&Se.reverse(),zF(Se)}),onBlur:Re(e.onBlur,F=>{F.currentTarget.contains(F.target)||(window.clearTimeout(J.current),ne.current="")}),onPointerMove:Re(e.onPointerMove,Ml(F=>{const W=F.target,N=L.current!==F.clientX;if(F.currentTarget.contains(W)&&N){const z=F.clientX>L.current?"right":"left";pe.current=z,L.current=F.clientX}}))})})})})})})});nk.displayName=fr;var NF="MenuGroup",Pg=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(Ze.div,{role:"group",...r,ref:t})});Pg.displayName=NF;var OF="MenuLabel",rk=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(Ze.div,{...r,ref:t})});rk.displayName=OF;var cd="MenuItem",yb="menu.itemSelect",qd=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=y.useRef(null),l=Jl(cd,e.__scopeMenu),u=Ag(cd,e.__scopeMenu),f=xt(t,a),h=y.useRef(!1),m=()=>{const g=a.current;if(!n&&g){const b=new CustomEvent(yb,{bubbles:!0,cancelable:!0});g.addEventListener(yb,w=>r?.(w),{once:!0}),Am(g,b),b.defaultPrevented?h.current=!1:l.onClose()}};return d.jsx(sk,{...o,ref:f,disabled:n,onClick:Re(e.onClick,m),onPointerDown:g=>{e.onPointerDown?.(g),h.current=!0},onPointerUp:Re(e.onPointerUp,g=>{h.current||g.currentTarget?.click()}),onKeyDown:Re(e.onKeyDown,g=>{const b=u.searchRef.current!=="";n||b&&g.key===" "||xm.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})});qd.displayName=cd;var sk=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,l=Ag(cd,n),u=XE(n),f=y.useRef(null),h=xt(t,f),[m,g]=y.useState(!1),[b,w]=y.useState("");return y.useEffect(()=>{const E=f.current;E&&w((E.textContent??"").trim())},[a.children]),d.jsx(Ll.ItemSlot,{scope:n,disabled:r,textValue:o??b,children:d.jsx(yF,{asChild:!0,...u,focusable:!r,children:d.jsx(Ze.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:h,onPointerMove:Re(e.onPointerMove,Ml(E=>{r?l.onItemLeave(E):(l.onItemEnter(E),E.defaultPrevented||E.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Re(e.onPointerLeave,Ml(E=>l.onItemLeave(E))),onFocus:Re(e.onFocus,()=>g(!0)),onBlur:Re(e.onBlur,()=>g(!1))})})})}),IF="MenuCheckboxItem",ok=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return d.jsx(uk,{scope:e.__scopeMenu,checked:n,children:d.jsx(qd,{role:"menuitemcheckbox","aria-checked":ud(n)?"mixed":n,...o,ref:t,"data-state":Og(n),onSelect:Re(o.onSelect,()=>r?.(ud(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ok.displayName=IF;var ik="MenuRadioGroup",[DF,LF]=Vo(ik,{value:void 0,onValueChange:()=>{}}),ak=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Yn(r);return d.jsx(DF,{scope:e.__scopeMenu,value:n,onValueChange:a,children:d.jsx(Pg,{...o,ref:t})})});ak.displayName=ik;var lk="MenuRadioItem",ck=y.forwardRef((e,t)=>{const{value:n,...r}=e,o=LF(lk,e.__scopeMenu),a=n===o.value;return d.jsx(uk,{scope:e.__scopeMenu,checked:a,children:d.jsx(qd,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Og(a),onSelect:Re(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});ck.displayName=lk;var Ng="MenuItemIndicator",[uk,MF]=Vo(Ng,{checked:!1}),dk=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=MF(Ng,n);return d.jsx(Xr,{present:r||ud(a.checked)||a.checked===!0,children:d.jsx(Ze.span,{...o,ref:t,"data-state":Og(a.checked)})})});dk.displayName=Ng;var $F="MenuSeparator",fk=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(Ze.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});fk.displayName=$F;var FF="MenuArrow",hk=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Wd(n);return d.jsx(k_,{...o,...r,ref:t})});hk.displayName=FF;var UF="MenuSub",[kB,pk]=Vo(UF),dl="MenuSubTrigger",mk=y.forwardRef((e,t)=>{const n=Wo(dl,e.__scopeMenu),r=Jl(dl,e.__scopeMenu),o=pk(dl,e.__scopeMenu),a=Ag(dl,e.__scopeMenu),l=y.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:f}=a,h={__scopeMenu:e.__scopeMenu},m=y.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return y.useEffect(()=>m,[m]),y.useEffect(()=>{const g=u.current;return()=>{window.clearTimeout(g),f(null)}},[u,f]),d.jsx(Cg,{asChild:!0,...h,children:d.jsx(sk,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":vk(n.open),...e,ref:md(t,o.onTriggerChange),onClick:g=>{e.onClick?.(g),!(e.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Re(e.onPointerMove,Ml(g=>{a.onItemEnter(g),!g.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(a.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:Re(e.onPointerLeave,Ml(g=>{m();const b=n.content?.getBoundingClientRect();if(b){const w=n.content?.dataset.side,E=w==="right",x=E?-5:5,S=b[E?"left":"right"],T=b[E?"right":"left"];a.onPointerGraceIntentChange({area:[{x:g.clientX+x,y:g.clientY},{x:S,y:b.top},{x:T,y:b.top},{x:T,y:b.bottom},{x:S,y:b.bottom}],side:w}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(g),g.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Re(e.onKeyDown,g=>{const b=a.searchRef.current!=="";e.disabled||b&&g.key===" "||bF[r.dir].includes(g.key)&&(n.onOpenChange(!0),n.content?.focus(),g.preventDefault())})})})});mk.displayName=dl;var gk="MenuSubContent",yk=y.forwardRef((e,t)=>{const n=ek(fr,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Wo(fr,e.__scopeMenu),l=Jl(fr,e.__scopeMenu),u=pk(gk,e.__scopeMenu),f=y.useRef(null),h=xt(t,f);return d.jsx(Ll.Provider,{scope:e.__scopeMenu,children:d.jsx(Xr,{present:r||a.open,children:d.jsx(Ll.Slot,{scope:e.__scopeMenu,children:d.jsx(jg,{id:u.contentId,"aria-labelledby":u.triggerId,...o,ref:h,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{l.isUsingKeyboardRef.current&&f.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:Re(e.onFocusOutside,m=>{m.target!==u.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Re(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:Re(e.onKeyDown,m=>{const g=m.currentTarget.contains(m.target),b=xF[l.dir].includes(m.key);g&&b&&(a.onOpenChange(!1),u.trigger?.focus(),m.preventDefault())})})})})})});yk.displayName=gk;function vk(e){return e?"open":"closed"}function ud(e){return e==="indeterminate"}function Og(e){return ud(e)?"indeterminate":e?"checked":"unchecked"}function zF(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function BF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function HF(e,t,n){const o=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let l=BF(e,Math.max(a,0));o.length===1&&(l=l.filter(h=>h!==n));const f=l.find(h=>h.toLowerCase().startsWith(o.toLowerCase()));return f!==n?f:void 0}function VF(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,l=t.length-1;a<t.length;l=a++){const u=t[a],f=t[l],h=u.x,m=u.y,g=f.x,b=f.y;m>r!=b>r&&n<(g-h)*(r-m)/(b-m)+h&&(o=!o)}return o}function WF(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return VF(n,t)}function Ml(e){return t=>t.pointerType==="mouse"?e(t):void 0}var qF=ZE,GF=Cg,KF=tk,YF=nk,QF=Pg,JF=rk,XF=qd,ZF=ok,e4=ak,t4=ck,n4=dk,r4=fk,s4=hk,o4=mk,i4=yk,Gd="DropdownMenu",[a4]=Es(Gd,[JE]),En=JE(),[l4,wk]=a4(Gd),bk=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:l,modal:u=!0}=e,f=En(t),h=y.useRef(null),[m,g]=Xi({prop:o,defaultProp:a??!1,onChange:l,caller:Gd});return d.jsx(l4,{scope:t,triggerId:No(),triggerRef:h,contentId:No(),open:m,onOpenChange:g,onOpenToggle:y.useCallback(()=>g(b=>!b),[g]),modal:u,children:d.jsx(qF,{...f,open:m,onOpenChange:g,dir:r,modal:u,children:n})})};bk.displayName=Gd;var xk="DropdownMenuTrigger",_k=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=wk(xk,n),l=En(n);return d.jsx(GF,{asChild:!0,...l,children:d.jsx(Ze.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:md(t,a.triggerRef),onPointerDown:Re(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(a.onOpenToggle(),a.open||u.preventDefault())}),onKeyDown:Re(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&a.onOpenToggle(),u.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});_k.displayName=xk;var c4="DropdownMenuPortal",Sk=e=>{const{__scopeDropdownMenu:t,...n}=e,r=En(t);return d.jsx(KF,{...r,...n})};Sk.displayName=c4;var Ek="DropdownMenuContent",kk=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wk(Ek,n),a=En(n),l=y.useRef(!1);return d.jsx(YF,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:Re(e.onCloseAutoFocus,u=>{l.current||o.triggerRef.current?.focus(),l.current=!1,u.preventDefault()}),onInteractOutside:Re(e.onInteractOutside,u=>{const f=u.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0,m=f.button===2||h;(!o.modal||m)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});kk.displayName=Ek;var u4="DropdownMenuGroup",d4=y.forwardRef((e,t)=>
84{const{__scopeDropdownMenu:n,...r}=e,o=En(n);return d.jsx(QF,{...o,...r,ref:t})});d4.displayName=u4;var f4="DropdownMenuLabel",Tk=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=En(n);return d.jsx(JF,{...o,...r,ref:t})});Tk.displayName=f4;var h4="DropdownMenuItem",Ck=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=En(n);return d.jsx(XF,{...o,...r,ref:t})});Ck.displayName=h4;var p4="DropdownMenuCheckboxItem",Rk=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=En(n);return d.jsx(ZF,{...o,...r,ref:t})});Rk.displayName=p4;var m4="DropdownMenuRadioGroup",g4=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=En(n);return d.jsx(e4,{...o,...r,ref:t})});g4.displayName=m4;var y4="DropdownMenuRadioItem",Ak=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=En(n);return d.jsx(t4,{...o,...r,ref:t})});Ak.displayName=y4;var v4="DropdownMenuItemIndicator",jk=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=En(n);return d.jsx(n4,{...o,...r,ref:t})});jk.displayName=v4;var w4="DropdownMenuSeparator",Pk=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=En(n);return d.jsx(r4,{...o,...r,ref:t})});Pk.displayName=w4;var b4="DropdownMenuArrow",x4=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=En(n);return d.jsx(s4,{...o,...r,ref:t})});x4.displayName=b4;var _4="DropdownMenuSubTrigger",Nk=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=En(n);return d.jsx(o4,{...o,...r,ref:t})});Nk.displayName=_4;var S4="DropdownMenuSubContent",Ok=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=En(n);return d.jsx(i4,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ok.displayName=S4;var E4=bk,k4=_k,T4=Sk,Ik=kk,Dk=Tk,Lk=Ck,Mk=Rk,$k=Ak,Fk=jk,Uk=Pk,zk=Nk,Bk=Ok;const vb=E4,wb=k4,C4=y.forwardRef(({className:e,inset:t,children:n,...r},o)=>d.jsxs(zk,{ref:o,className:Le("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,d.jsx(Im,{className:"ml-auto h-4 w-4"})]}));C4.displayName=zk.displayName;const R4=y.forwardRef(({className:e,...t},n)=>d.jsx(Bk,{ref:n,className:Le("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));R4.displayName=Bk.displayName;const _m=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(T4,{children:d.jsx(Ik,{ref:r,sideOffset:t,className:Le("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));_m.displayName=Ik.displayName;const ps=y.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(Lk,{ref:r,className:Le("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));ps.displayName=Lk.displayName;const A4=y.forwardRef(({className:e,children:t,checked:n,...r},o)=>d.jsxs(Mk,{ref:o,className:Le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(Fk,{children:d.jsx(ER,{className:"h-4 w-4"})})}),t]}));A4.displayName=Mk.displayName;const j4=y.forwardRef(({className:e,children:t,...n},r)=>d.jsxs($k,{ref:r,className:Le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(Fk,{children:d.jsx(kR,{className:"h-2 w-2 fill-current"})})}),t]}));j4.displayName=$k.displayName;const P4=y.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(Dk,{ref:r,className:Le("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));P4.displayName=Dk.displayName;const Hk=y.forwardRef(({className:e,...t},n)=>d.jsx(Uk,{ref:n,className:Le("-mx-1 my-1 h-px bg-muted",e),...t}));Hk.displayName=Uk.displayName;const N4="/assets/abbey-logo-DnQvdkm4.webp",O4=[{name:"Home",href:"/"},{name:"What's On",href:"/shows"},{name:"Arts Directory",href:"/arts-directory",featureFlag:"artsDirectoryEnabled"},{name:"News",href:"/news"},{name:"Plan Your Visit",href:"/visit",submenu:[{name:"Directions & Parking",href:"/visit"},{name:"Box Office",href:"/box-office"},{name:"Facilities",href:"/facilities"}
84,{name:"Accessibility",href:"/accessibility"}]},{name:"Venue Hire",href:"/venue-hire"},{name:"About",href:"/about",submenu:[{name:"About Us",href:"/about"},{name:"Meet the Team",href:"/meet-the-team"},{name:"Gallery",href:"/gallery"},{name:"Safeguarding",href:"/safeguarding"},{name:"Marketing",href:"/marketing"},{name:"Policies & Procedures",href:"/policies-procedures-risk-assessments"},{name:"Technical Information",href:"/technical-information"}]},{name:"Support Us",href:"/support",submenu:[{name:"Support Us",href:"/support"},{name:"Become a Member",href:"/member-signup"},{name:"Become a Volunteer",href:"/become-a-volunteer"}]}],Lo=()=>{const[e,t]=y.useState(!1),[n,r]=y.useState(null),{isAdmin:o,isShowAdmin:a,isMarketing:l,isTrustee:u,isMember:f,membershipStatus:h}=Hd(),{flags:m}=kE(),g=Vt(),b=no(),[w,E]=y.useState([]);y.useEffect(()=>{(async()=>{const{data:C}=await Me.from("pages").select("id, title, slug, navigation_order").eq("is_published",!0).eq("show_in_navigation",!0).order("navigation_order",{ascending:!0});C&&E(C)})()},[]),y.useEffect(()=>{Me.auth.getSession().then(({data:{session:C}})=>{r(C?.user??null)});const{data:{subscription:k}}=Me.auth.onAuthStateChange((C,j)=>{r(j?.user??null)});return()=>k.unsubscribe()},[]);const x=k=>k==="/"?g.pathname==="/":g.pathname.startsWith(k),S=async()=>{await Me.auth.signOut(),gn.success("Signed out successfully"),b("/")},T=[...O4.filter(k=>!k.featureFlag||m[k.featureFlag]),...w.map(k=>({name:k.title,href:`/page/${k.slug}`}))];return d.jsxs("header",{className:"sticky top-0 z-50 w-full border-b border-border bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:[d.jsxs("nav",{className:"mx-auto flex max-w-7xl items-center justify-between p-4 lg:px-8","aria-label":"Global",children:[d.jsx("div",{className:"flex lg:flex-1",children:d.jsxs(Ae,{to:"/",className:"-m-1.5 p-1.5 flex items-center gap-3",children:[d.jsx("img",{src:N4,alt:"The Abbey Theatre logo",width:40,height:40,className:"h-10 w-10"}),d.jsx("span",{className:"text-2xl font-bold tracking-tight text-primary",children:"The Abbey Theatre"}),XS()&&d.jsx(Do,{variant:"outline",className:"bg-yellow-100 text-yellow-800 border-yellow-300 text-xs font-semibold",children:"DEV"})]})}),d.jsxs("div",{className:"flex lg:hidden gap-2",children:[d.jsx(gb,{}),n?d.jsx(Ce,{variant:"ghost",size:"icon",onClick:()=>b("/my-account"),"aria-label":"My account",children:d.jsx(jw,{className:"h-5 w-5"})}):d.jsx(Ce,{variant:"ghost",size:"sm",onClick:()=>b("/auth"),children:"Sign In"}),d.jsx(Ce,{variant:"ghost",size:"icon",onClick:()=>t(!e),"aria-label":e?"Close menu":"Open menu",children:e?d.jsx(Zi,{className:"h-6 w-6"}):d.jsx(Bx,{className:"h-6 w-6"})})]}),d.jsx("div",{className:"hidden lg:flex lg:gap-x-8",children:T.map(k=>k.submenu?d.jsxs(vb,{children:[d.jsx(wb,{asChild:!0,children:d.jsx("button",{className:`text-sm font-medium transition-colors hover:text-primary relative ${x(k.href)?"text-primary after:absolute after:bottom-[-20px] after:left-0 after:right-0 after:h-0.5 after:bg-primary":"text-muted-foreground"}`,children:k.name})}),d.jsx(_m,{children:k.submenu.map(C=>d.jsx(ps,{asChild:!0,children:d.jsx(Ae,{to:C.href,className:"cursor-pointer",children:C.name})},C.name))})]},k.name):d.jsx(Ae,{to:k.href,className:`text-sm font-medium transition-colors hover:text-primary relative ${x(k.href)?"text-primary after:absolute after:bottom-[-20px] after:left-0 after:right-0 after:h-0.5 after:bg-primary":"text-muted-foreground"}`,children:k.name},k.name))}),d.jsxs("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end lg:gap-2 lg:items-center",children:[d.jsx(gb,{}),n&&d.jsx(Ce,{variant:"ghost",size:"icon",onClick:()=>b("/my-tickets"),"aria-label":"My Tickets",children:d.jsx(Mp,{className:"h-5 w-5"})}),n?d.jsxs(vb,{children:[d.jsx(wb,{asChild:!0,children:d.jsx(Ce,{variant:"ghost",size:"icon","aria-label":"User account menu",children:d.jsx(jw,{className:"h-5 w-5"})})}),d.jsxs(_m,{align:"end",children:[d.jsxs(ps,{onClick:()=>b("/my-account"),children:[d.jsx(Hx,{className:"mr-2 h-4 w-4"}),"My Account"]}),d.jsxs(ps,{onClick:()=>b("/my-tickets"),children:[d.jsx(Mp,{className:"mr-2 h-4 w-4"}),"My Tickets"]}),(o||f)&&d.jsxs(ps,{onClick:()=>
84b("/members"),children:[d.jsx(Vh,{className:"mr-2 h-4 w-4"}),"Members"]}),!o&&!f&&h==="pending"&&d.jsxs(ps,{disabled:!0,className:"opacity-70",children:[d.jsx(Vh,{className:"mr-2 h-4 w-4"}),"Members",d.jsx(Do,{variant:"secondary",className:"ml-2 text-xs",children:"Pending"})]}),!o&&!f&&(h==="none"||h==="rejected")&&d.jsxs(ps,{onClick:()=>b("/member-signup"),children:[d.jsx(Vh,{className:"mr-2 h-4 w-4"}),"Become a Member"]}),(o||a||l||u)&&d.jsxs(ps,{onClick:()=>b("/admin"),children:[d.jsx(DR,{className:"mr-2 h-4 w-4"}),"Admin"]}),d.jsx(Hk,{}),d.jsxs(ps,{onClick:S,children:[d.jsx(Ux,{className:"mr-2 h-4 w-4"}),"Sign Out"]})]})]}):d.jsx(Ce,{variant:"ghost",size:"sm",onClick:()=>b("/auth"),children:"Sign In"})]})]}),e&&d.jsx("div",{className:"lg:hidden border-t border-border max-h-[calc(100vh-4rem)] overflow-y-auto",children:d.jsxs("div",{className:"space-y-1 px-4 py-4",children:[T.map(k=>k.submenu?d.jsxs("div",{className:"space-y-1",children:[d.jsx("div",{className:"px-3 py-2 text-sm font-semibold text-muted-foreground",children:k.name}),k.submenu.map(C=>d.jsx(Ae,{to:C.href,onClick:()=>t(!1),className:`block rounded-md px-6 py-2 text-base font-medium ${x(C.href)?"bg-primary/10 text-primary":"text-foreground hover:bg-muted"}`,children:C.name},C.name))]},k.name):d.jsx(Ae,{to:k.href,onClick:()=>t(!1),className:`block rounded-md px-3 py-2 text-base font-medium ${x(k.href)?"bg-primary/10 text-primary":"text-foreground hover:bg-muted"}`,children:k.name},k.name)),n&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"border-t border-border my-2"}),d.jsx("button",{onClick:()=>{t(!1),b("/my-account")},className:"block w-full text-left rounded-md px-3 py-2 text-base font-medium text-foreground hover:bg-muted",children:"My Account"}),d.jsx("button",{onClick:()=>{t(!1),b("/my-tickets")},className:"block w-full text-left rounded-md px-3 py-2 text-base font-medium text-foreground hover:bg-muted",children:"My Tickets"}),(o||f)&&d.jsx("button",{onClick:()=>{t(!1),b("/members")},className:"block w-full text-left rounded-md px-3 py-2 text-base font-medium text-foreground hover:bg-muted",children:"Members"}),!o&&!f&&h==="pending"&&d.jsxs("span",{className:"block w-full text-left rounded-md px-3 py-2 text-base font-medium text-muted-foreground",children:["Members ",d.jsx(Do,{variant:"secondary",className:"ml-2 text-xs",children:"Pending"})]}),!o&&!f&&(h==="none"||h==="rejected")&&d.jsx("button",{onClick:()=>{t(!1),b("/member-signup")},className:"block w-full text-left rounded-md px-3 py-2 text-base font-medium text-foreground hover:bg-muted",children:"Become a Member"}),(o||a||l||u)&&d.jsx("button",{onClick:()=>{t(!1),b("/admin")},className:"block w-full text-left rounded-md px-3 py-2 text-base font-medium text-foreground hover:bg-muted",children:"Admin"}),d.jsx("button",{onClick:()=>{t(!1),S()},className:"block w-full text-left rounded-md px-3 py-2 text-base font-medium text-foreground hover:bg-muted",children:"Sign Out"})]})]})})]})},I4="/assets/logo-nbbc-uBS8ETeG.png",D4="/assets/logo-wcc-CAUMsVq7.png",L4="/assets/logo-ace-lq4v3PtA.png",M4=({className:e})=>d.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor",children:d.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})}),$4=({className:e})=>d.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor",children:d.jsx("path",{d:"M12 10.8c-1.087-2.114-4.046-6.053-6.798-7.995C2.566.944 1.561 1.266.902 1.565.139 1.908 0 3.08 0 3.768c0 .69.378 5.65.624 6.479.785 2.627 3.593 3.503 6.204 3.258 1.006-.095-.07.138-3.4 1.577C.015 16.7 4.056 21.223 6.441 21.685c3.248.63 6.05-2.09 5.56-4.012-.032.126-.033.252 0 0-.033.252-.033.126 0 0 .49 1.922 3.312 4.641 6.56 4.012 2.384-.462 6.425-4.985 3.013-6.603-3.33-1.44-4.406-1.672-3.4-1.577 2.611.245 5.42-.631 6.204-3.258.246-.83.624-5.789.624-6.479 0-.688-.139-1.86-.902-2.203-.659-.3-1.664-.62-4.3 1.24C16.046 4.748 13.087 8.687 12 10.8z"})}),F4={facebook:({className:e})=>d.jsx(Fx,{className:e}),instagram:({className:e})=>d.jsx(PR,{className:e}),x:M4,youtube:({className:e})=>d.jsx(UR,{className:e}),bluesky:$4};function Mo(){const[e,t]=y.useState([]);return y.useEffect(()=>{Me.from("social_media_links").select("id, platform, url").eq("is_active",!0).order("display_order").then(({data:n})=>t(n||[]))},[]),d.jsx("footer",{className:"bg-muted/30 border-t border-border",children:d.jsxs("div",{className:"container mx-auto px-4 py-12",children:[d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-8",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold text-foreground mb-4",children:"The Abbey Theatre"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"A community theatre bringing the best in local drama, music, and entertainment to Nuneaton and the surrounding area."})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold text-foreground mb-4",children:"Qu
84ick Links"}),d.jsxs("ul",{className:"space-y-2 text-sm",children:[d.jsx("li",{children:d.jsx(Ae,{to:"/shows",className:"text-muted-foreground hover:text-primary transition-colors",children:"What's On"})}),d.jsx("li",{children:d.jsx(Ae,{to:"/news",className:"text-muted-foreground hover:text-primary transition-colors",children:"News"})}),d.jsx("li",{children:d.jsx(Ae,{to:"/arts-directory",className:"text-muted-foreground hover:text-primary transition-colors",children:"Arts Directory"})}),d.jsx("li",{children:d.jsx(Ae,{to:"/visit",className:"text-muted-foreground hover:text-primary transition-colors",children:"Plan Your Visit"})}),d.jsx("li",{children:d.jsx(Ae,{to:"/things-to-do-in-nuneaton",className:"text-muted-foreground hover:text-primary transition-colors",children:"Things to Do in Nuneaton"})}),d.jsx("li",{children:d.jsx(Ae,{to:"/venue-hire",className:"text-muted-foreground hover:text-primary transition-colors",children:"Venue Hire"})}),d.jsx("li",{children:d.jsx(Ae,{to:"/about",className:"text-muted-foreground hover:text-primary transition-colors",children:"About Us"})})]})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold text-foreground mb-4",children:"Information"}),d.jsxs("ul",{className:"space-y-2 text-sm",children:[d.jsx("li",{children:d.jsx(Ae,{to:"/box-office",className:"text-muted-foreground hover:text-primary transition-colors",children:"Box Office"})}),d.jsx("li",{children:d.jsx(Ae,{to:"/accessibility",className:"text-muted-foreground hover:text-primary transition-colors",children:"Accessibility"})}),d.jsx("li",{children:d.jsx(Ae,{to:"/policies-procedures-risk-assessments",className:"text-muted-foreground hover:text-primary transition-colors",children:"Policies & Procedures"})}),d.jsx("li",{children:d.jsx(Ae,{to:"/privacy-policy",className:"text-muted-foreground hover:text-primary transition-colors",children:"Privacy Policy"})}),d.jsx("li",{children:d.jsx(Ae,{to:"/cookie-policy",className:"text-muted-foreground hover:text-primary transition-colors",children:"Cookie Policy"})}),d.jsx("li",{children:d.jsx(Ae,{to:"/terms-of-service",className:"text-muted-foreground hover:text-primary transition-colors",children:"Terms of Service"})}),d.jsx("li",{children:d.jsx(Ae,{to:"/data-deletion",className:"text-muted-foreground hover:text-primary transition-colors",children:"Data Deletion"})}),d.jsx("li",{children:d.jsx(Ae,{to:"/sitemap",className:"text-muted-foreground hover:text-primary transition-colors",children:"Sitemap"})}),d.jsx("li",{children:d.jsx(ID,{})})]})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold text-foreground mb-4",children:"Contact"}),d.jsxs("address",{className:"text-sm text-muted-foreground not-italic space-y-2",children:[d.jsx("p",{children:"Pool Bank Street"}),d.jsx("p",{children:"Nuneaton"}),d.jsx("p",{children:"CV11 5DB"}),d.jsx("p",{className:"pt-2",children:d.jsx("a",{href:"mailto:[email protected]",className:"hover:text-primary transition-colors",children:"[email protected]"})})]})]})]}),e.length>0&&d.jsx("div",{className:"flex justify-center gap-4 mt-8 pt-8 border-t border-border",children:e.map(n=>{const r=F4[n.platform];return r?d.jsx("a",{href:n.url,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-primary transition-colors","aria-label":`Follow us on ${n.platform}`,children:d.jsx(r,{className:"h-5 w-5"})},n.id):null})}),d.jsxs("div",{className:`flex flex-col items-center gap-4 ${e.length>0?"mt-4 pt-4":"mt-8 pt-8"} border-t border-border`,children:[d.jsxs("div",{className:"flex items-center justify-center gap-8 flex-wrap",children:[d.jsx("img",{src:I4,alt:"Nuneaton and Bedworth Borough Council",width:160,height:64,className:"h-16 w-auto",loading:"lazy"}),d.jsx("img",{src:D4,alt:"Warwickshire County Council",width:160,height:64,className:"h-16 w-auto",loading:"lazy"}),d.jsx("img",{src:L4,alt:"Arts Council England",width:160,height:64,className:"h-16 w-auto",loading:"lazy"})]}),d.jsx("p",{className:"text-sm text-muted-foreground text-center",children:"We receive a small annual grant from NBBC towards our running costs."})]}),d.jsxs("div",{className:`border-t border-border ${e.length>0?"mt-4 pt-4":"mt-8 pt-8"} text-center text-sm text-muted-foreground space-y-1`,children:[d.jsx("p",{children:"Abbey Theatre, Nuneaton, CV11 5DB"}),d.jsxs("p",{children:["© ",new Date().getFullYear()," The Abbey Theatre. All rights reserved."]}),d.jsx("p",{children:"Nuneaton Arts CIO, Registered Charity No. 1193774"})]})]})})}function U4({className:e,...t}){return d.jsx("div",{className:Le("animate-pulse rounded-md bg-muted",e),...t})}const dd=({src:e,alt:t,loading:n="lazy",width:r,height:o,aspectRatio:a,showSkeleton:l=!0,className:u,containerClassName:f,fallback:h,objectPosition:m,imageScale:g,style:b,...w})=>{const[E,x]=y.useState(!0),[S,T]=y.useState(!1),k=y.useCallback(()=>{x(!1)},[]),C=y.useCallback(()=>{x(!1),T(!0)},[]);return S&&h?d.jsx(d.Fragment,{children:h}):S?d.jsx("div",{className:Le("flex items-center justify-center bg-muted text-muted-foreground",a,f),style:{width:r,height:o},children:d.jsx("span",{className:"text-sm",children:"Image unavailable"})}):l||a?d.jsxs("div",{className:Le("relative overflow-hidden",a,f),style:a?void 0:{width:r,height:o},children:[l&&E&&d.jsx(U4,{className:"absolute inset-0 z-10"}),d.jsx("img",{src:e,alt:t,loading:n,width:r,height:o,onLoad:k,onError:C,className:Le("transition-opacity duration-300",E?"opacity-0":"opacity-100",u),style:{objectPosition:m,...g&&g!==100?{transform:`scale(${g/100})`}:{},...b},...w})]}):d.jsx("img",{src:e,alt:t,loading:n,width:r,height:o,onLoad:k,onError:C,className:Le("transition-opacity duration-300",E?"opacity-0":"opacity-100",u),style:{objectPosition:m,...g&&g!==100?{transform:`scale(${g/100})`}:{},...b},...w})},bb=({title:e,description:t,imageUrl:n,imageAlt:r="",ctaText:o,ctaLink:a,reverse:l=!1,children:u})=>d.jsx("section",{className:"py-16 lg:py-24",children:d.jsx("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:d.jsxs("div",{className:`grid gap-12 lg:grid-cols-2 lg:gap-16 items-center ${l?"lg:grid-flow-dense":""}`,children:[d.jsxs("div",{className:l?"lg:col-start-2":"",children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tight sm:text-4xl lg:text-5xl",children:e}),d.jsx("p",{className:"mt-6 text-lg text-muted-foreground leading-relaxed",children:t}),u&&d.jsx("div",{className:"mt-6",children:u}),o&&a&&d.jsx(Ce,{asChild:!0,size:"lg",className:"mt-8 bg-secondary hover:bg-secondary/90",children:d.jsxs(Ae,{to:a,children:[o,d.jsx(Om,{className:"ml-2 h-5 w-5"})]})})]}),n&&d.jsx("div",{className:`relative overflow-hidden rounded-lg ${l?"lg:col-start-1":""}`,children:d.jsx(dd,{src:n,alt:r,loading:"lazy",aspectRatio:"aspect-[4/3]",className:"h-full w-full object-cover",showSkeleton:!0})})]})})}),Ig=y.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:Le("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));
vendor: 5,344 bytes, line 84
84Ig.displayName="Card";const z4=y.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:Le("flex flex-col space-y-1.5 p-6",e),...t}));z4.displayName="CardHeader";const B4=y.forwardRef(({className:e,...t},n)=>d.jsx("h3",{ref:n,className:Le("text-2xl font-semibold leading-none tracking-tight",e),...t}));B4.displayName="CardTitle";const H4=y.forwardRef(({className:e,...t},n)=>d.jsx("p",{ref:n,className:Le("text-sm text-muted-foreground",e),...t}));H4.displayName="CardDescription";const Dg=y.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:Le("p-6 pt-0",e),...t}));Dg.displayName="CardContent";const Vk=y.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:Le("flex items-center p-6 pt-0",e),...t}));Vk.displayName="CardFooter";function Dr(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Ho(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const Wk=6048e5,V4=864e5,qk=6e4,Gk=36e5;let W4={};function Kd(){return W4}function $l(e,t){const n=Kd(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Dr(e),a=o.getDay(),l=(a<r?7:0)+a-r;return o.setDate(o.getDate()-l),o.setHours(0,0,0,0),o}function fd(e){return $l(e,{weekStartsOn:1})}function Kk(e){const t=Dr(e),n=t.getFullYear(),r=Ho(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=fd(r),a=Ho(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const l=fd(a);return t.getTime()>=o.getTime()?n+1:t.getTime()>=l.getTime()?n:n-1}function xb(e){const t=Dr(e);return t.setHours(0,0,0,0),t}function _b(e){const t=Dr(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function q4(e,t){const n=xb(e),r=xb(t),o=+n-_b(n),a=+r-_b(r);return Math.round((o-a)/V4)}function G4(e){const t=Kk(e),n=Ho(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),fd(n)}function K4(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Y4(e){if(!K4(e)&&typeof e!="number")return!1;const t=Dr(e);return!isNaN(Number(t))}function Q4(e){const t=Dr(e),n=Ho(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const J4={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},X4=(e,t,n)=>{let r;const o=J4[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function gp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Z4={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},eU={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},tU={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},nU={date:gp({formats:Z4,defaultWidth:"full"}),time:gp({formats:eU,defaultWidth:"full"}),dateTime:gp({formats:tU,defaultWidth:"full"})},rU={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},sU=(e,t,n,r)=>rU[e];function Za(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,u=n?.width?String(n.width):l;o=e.formattingValues[u]||e.formattingValues[l]}else{const l=e.defaultWidth,u=n?.width?String(n.width):e.defaultWidth;o=e.values[u]||e.values[l]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const oU={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},iU={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},aU={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},lU={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
84ay","Saturday"]},cU={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},uU={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},dU=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},fU={ordinalNumber:dU,era:Za({values:oU,defaultWidth:"wide"}),quarter:Za({values:iU,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Za({values:aU,defaultWidth:"wide"}),day:Za({values:lU,defaultWidth:"wide"}),dayPeriod:Za({values:cU,defaultWidth:"wide",formattingValues:uU,defaultFormattingWidth:"wide"})};function el(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const l=a[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(u)?pU(u,g=>g.test(l)):hU(u,g=>g.test(l));let h;h=e.valueCallback?e.valueCallback(f):f,h=n.valueCallback?n.valueCallback(h):h;const m=t.slice(l.length);return{value:h,rest:m}}}function hU(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function pU(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function mU(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let l=e.valueCallback?e.valueCallback(a[0]):a[0];l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(o.length);return{value:l,rest:u}}}const gU=/^(\d+)(th|st|nd|rd)?/i,yU=/\d+/i,vU={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},wU={any:[/^b/i,/^(a|c)/i]},bU={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xU={any:[/1/i,/2/i,/3/i,/4/i]},_U={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},SU={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},EU={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},kU={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},TU={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},CU={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},RU={ordinalNumber:mU({matchPattern:gU,parsePattern:yU,valueCallback:e=>parseInt(e,10)}),era:el({matchPatterns:vU,defaultMatchWidth:"wide",parsePatterns:wU,defaultParseWidth:"any"}),quarter:el({matchPatterns:bU,defaultMatchWidth:"wide",parsePatterns:xU,defaultParseWidth:"any",valueCallback:e=>e+1}),month:el({matchPatterns:_U,defaultMatchWidth:"wide",parsePatterns:SU,defaultParseWidth:"any"}),day:el({matchPatterns:EU,defaultMatchWidth:"wide",parsePatterns:kU,defaultParseWidth:"any"}),dayPeriod:el({matchPatterns:TU,defaultMatchWidth:"any",parsePatterns:CU,defaultParseWidth:"any"})},AU={code:"en-US",formatDistance:X4,formatLong:nU,formatRelative:sU,localize:fU,match:RU,options:{weekStartsOn:0,firstWeekContainsDate:1}};function jU(e){const t=Dr(e);return q4(t,Q4(t))+1}function PU(e){const t=Dr(e),n=+fd(t)-+G4(t);return Math.round(n/Wk)+1}function Yk(e,t){const n=Dr(e),r=n.getFullYear(),o=Kd(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,l=Ho(e,0);l.setFullYear(r+1,0,a),l.setHours(0,0,0,0);const u=$l(l,t),f=Ho(e,0);f.setFullYear(r,0,a),f.setHours(0,0,0,0);const h=$l(f,t);return n.getTime()>=u.getTime()?r+1:n.getTime()>=h.getTime()?r:r-1}function NU(e,t){const n=Kd(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Yk(e,t),a=Ho(e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),$l(a,t)}function OU(e,t){const n=Dr(e),r=+$l(n,t)-+NU(n,t);return Math.round(r/Wk)+1}function tt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Gs={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return tt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):tt(n+1,2)},d(e,t){return tt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return tt(e.getHours()%12||12,t.length)},H(e,t){return tt(e.getHours(),t.length)},m(e,t){return tt(e.getMinutes(),t.length)},s(e,t){return tt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return tt(o,t.length)}},ji={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Sb={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Gs.y(e,t)},Y:function(e,t,n,r){const o=Yk(e,r),a=o>0?o:1-o;if(t==="YY"){const l=a%100;return tt(l,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):tt(a,t.length)},R:function(e,t){const n=Kk(e);return tt(n,t.length)},u:function(e,t){const n=e.getFullYear();return tt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return tt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return tt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Gs.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return tt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=OU(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):tt(o,t.length)},I:function(e,t,n){const r=PU(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):tt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Gs.d(e,t)},D:function(e,t,n){const r=jU(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):tt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return tt(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return tt(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return tt(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=ji.noon:r===0?o=ji.midnight:o=r/12>
vendor: 3,692 bytes, line 84
84=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=ji.evening:r>=12?o=ji.afternoon:r>=4?o=ji.morning:o=ji.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Gs.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Gs.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):tt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):tt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Gs.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Gs.s(e,t)},S:function(e,t){return Gs.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return kb(r);case"XXXX":case"XX":return To(r);default:return To(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return kb(r);case"xxxx":case"xx":return To(r);default:return To(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Eb(r,":");default:return"GMT"+To(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Eb(r,":");default:return"GMT"+To(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return tt(r,t.length)},T:function(e,t,n){const r=e.getTime();return tt(r,t.length)}};function Eb(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+tt(a,2)}function kb(e,t){return e%60===0?(e>0?"-":"+")+tt(Math.abs(e)/60,2):To(e,t)}function To(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=tt(Math.trunc(r/60),2),a=tt(r%60,2);return n+o+t+a}const Tb=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Qk=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},IU=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Tb(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Tb(r,t)).replace("{{time}}",Qk(o,t))},DU={p:Qk,P:IU},LU=/^D+$/,MU=/^Y+$/,$U=["D","DD","YY","YYYY"];function FU(e){return LU.test(e)}function UU(e){return MU.test(e)}function zU(e,t,n){const r=BU(e,t,n);if(console.warn(r),$U.includes(e))throw new RangeError(r)}function BU(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const HU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,VU=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,WU=/^'([^]*?)'?$/,qU=/''/g,GU=/[a-zA-Z]/;
84function vn(e,t,n){const r=Kd(),o=n?.locale??r.locale??AU,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,l=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,u=Dr(e);if(!Y4(u))throw new RangeError("Invalid time value");let f=t.match(VU).map(m=>{const g=m[0];if(g==="p"||g==="P"){const b=DU[g];return b(m,o.formatLong)}return m}).join("").match(HU).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:KU(m)};if(Sb[g])return{isToken:!0,value:m};if(g.match(GU))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:m}});o.localize.preprocessor&&(f=o.localize.preprocessor(u,f));const h={firstWeekContainsDate:a,weekStartsOn:l,locale:o};return f.map(m=>{if(!m.isToken)return m.value;const g=m.value;(!n?.useAdditionalWeekYearTokens&&UU(g)||!n?.useAdditionalDayOfYearTokens&&FU(g))&&zU(g,t,String(e));const b=Sb[g[0]];return b(u,g,o.localize,h)}).join("")}function KU(e){const t=e.match(WU);return t?t[1].replace(qU,"'"):e}function Mi(e,t){const r=XU(e);let o;if(r.date){const f=ZU(r.date,2);o=ez(f.restDateString,f.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);const a=o.getTime();let l=0,u;if(r.time&&(l=tz(r.time),isNaN(l)))return new Date(NaN);if(r.timezone){if(u=nz(r.timezone),isNaN(u))return new Date(NaN)}else{const f=new Date(a+l),h=new Date(0);return h.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),h.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),h}return new Date(a+l+u)}const Ru={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},YU=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,QU=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,JU=/^([+-])(\d{2})(?::?(\d{2}))?$/;function XU(e){const t={},n=e.split(Ru.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Ru.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Ru.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const o=Ru.timezone.exec(r);
84o?(t.time=r.replace(o[1],""),t.timezone=o[1]):t.time=r}return t}function ZU(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const o=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?o:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function ez(e,t){if(t===null)return new Date(NaN);const n=e.match(YU);if(!n)return new Date(NaN);const r=!!n[4],o=tl(n[1]),a=tl(n[2])-1,l=tl(n[3]),u=tl(n[4]),f=tl(n[5])-1;if(r)return az(t,u,f)?rz(t,u,f):new Date(NaN);{const h=new Date(0);return!oz(t,a,l)||!iz(t,o)?new Date(NaN):(h.setUTCFullYear(t,a,Math.max(o,l)),h)}}function tl(e){return e?parseInt(e):1}function tz(e){const t=e.match(QU);if(!t)return NaN;const n=yp(t[1]),r=yp(t[2]),o=yp(t[3]);return lz(n,r,o)?n*Gk+r*qk+o*1e3:NaN}function yp(e){return e&&parseFloat(e.replace(",","."))||0}function nz(e){if(e==="Z")return 0;const t=e.match(JU);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return cz(r,o)?n*(r*Gk+o*qk):NaN}function rz(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const o=r.getUTCDay()||7,a=(t-1)*7+n+1-o;return r.setUTCDate(r.getUTCDate()+a),r}const sz=[31,null,31,30,31,30,31,31,30,31,30,31];function Jk(e){return e%400===0||e%4===0&&e%100!==0}function oz(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(sz[t]||(Jk(e)?29:28))}function iz(e,t){return t>=1&&t<=(Jk(e)?366:365)}function az(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function lz(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function cz(e,t){return t>=0&&t<=59}const uz=e=>{if(!e||e.length===0)return"";const t=e.map(a=>Mi(a.date)).sort((a,l)=>a.getTime()-l.getTime()),n=t[0],r=t[t.length-1],o=a=>{const l=vn(a,"d"),u=["th","st","nd","rd"][Number(l)%100>10&&Number(l)%100<14?0:Number(l)%10]||"th";return`${l}${u}`};return t.length===1||n.getTime()===r.getTime()?`${o(n)} ${vn(n,"MMM")}`:vn(n,"MMM yyyy")===vn(r,"MMM yyyy")?`${o(n)} to ${o(r)} ${vn(n,"MMM")}`:`${o(n)} ${vn(n,"MMM")} to ${o(r)} ${vn(r,"MMM")}`},dz=e=>{if(!e||e.length===0)return"";const t=Mi(e[0].date),n=vn(t,"EEEE"),[r,o]=e[0].time.split(":"),a=parseInt(r,10),l=a>=12?"pm":"am",u=a%12||12,f=o==="00"?`${u}${l}`:`${u}:${o}${l}`;return`${n}s at ${f}`},Lg=({production:e,listId:t="productions",listName:n="Productions",listIndex:r})=>{const o=()=>pI(t,n,{id:e.id,name:e.title,category:e.type||"Theatre",index:r}),{data:a}=Sn({queryKey:["production-thumbnail",e.id],queryFn:async()=>{const{data:w,error:E}=await Me.from("production_images").select("*").eq("production_id",e.id).eq("image_type","thumbnail").order("is_primary",{ascending:!1}).limit(1).maybeSingle();if(E)throw E;return w}}),{data:l}=Sn({queryKey:["production-showtimes",e.id],queryFn:async()=>{const w=new Date().toISOString().split("T")[0],{data:E,error:x}=await Me.from("showtimes").select("date, time").eq("production_id",e.id).gte("date",w).order("date",{ascending:!0});if(x)throw x;return E}}),{data:u}=Sn({queryKey:["production-company",e.id],queryFn:async()=>{const{data:w,error:E}=await Me.from("productions").select("company_id").eq("id",e.id).single();if(E||!w?.company_id)return null;const{data:x}=await Me.from("companies_public").select("id, name, logo_url, slug").eq("id",w.company_id).single();return x}}),{data:f}=Sn({queryKey:["production-categories",e.id],queryFn:async()=>{const{data:w}=await Me.from("production_categories").select("categories(name)").eq("production_id",e.id);return(w||[]).map(E=>E.categories).filter(Boolean)}}),h=e.type==="Daytime Course",m=(f||[]).some(w=>w?.name?.toLowerCase()==="film"),g=!h&&e.age_guidance&&(m||e.show_age_guidance),b=l&&l.length>0?h?dz(l):uz(l):null;return d.jsxs(Ig,{className:"group flex flex-col overflow-hidden transition-all hover:shadow-lg",children:[d.jsx(Ae,{to:`/shows/${e.slug}`,onClick:o,children:d.jsx("div",{className:"overflow-hidden bg-muted",children:a?.image_url?d.jsx(dd,{src:dr(a.image_url),alt:a.alt_text||e.title,loading:"lazy",aspectRatio:"aspect-square",className:"h-full w-full object-cover transition-transform duration-300 group-hover:scale-105",objectPosition:a.crop_x==null?`${a.image_position_x??50}% ${a.image_position_y??50}%`:void 0,imageScale:a.crop_x==null?a.image_scale??100:void 0,showSkeleton:!0}):d.jsx("div",{className:"flex aspect-square h-full w-full items-center justify-center bg-gradient-to-br from-primary/20 to-secondary/20",children:d.jsx("span",{className:"text-muted-foreground",children:"Production Image"})})})}),d.jsxs(Dg,{className:"flex-1 p-6",children:[d.jsx(Ae,{to:`/shows/${e.slug}`,onClick:o,children:d.jsx("h3",{className:"mb-2 text-2xl font-bold tracking-tight transition-colors group-hover:text-primary",children:e.title})}),d.jsx("p",{className:"line-clamp-3 text-sm text-muted-foreground",children:e.description}),d.jsxs("div",{className:"mt-4 flex items-center gap-4 text-sm text-muted-foreground",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[b&&d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(Mx,{className:"h-4 w-4"}),d.jsx("span",{children:b})]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(yl,{className:"h-4 w-4"}),d.jsx("span",{children:e.running_time})]}),g&&d.jsxs("span",{className:"text-muted-foreground",children:["Guide: ",e.age_guidance]})]}),u?.logo_url&&d.jsx("div",{className:"ml-auto h-6 w-6 shrink-0",children:d.jsx("img",{src:dr(u.logo_url),alt:u.name,className:"h-full w-full object-contain"})})]})]}),d.jsx(Vk,{className:"border-t p-6",children:d.jsx(Ce,{asChild:!0,className:"w-full",children:d.jsx(Ae,{to:`/shows/${e.slug}`,onClick:o,children:"View Details"})})})]})},Xk="/assets/theatre-exterior-B0TRbe2b.webp",fz="/assets/community-theatre-DRkEZ7hw.webp",vp="The Abbey Theatre",Zk="https://www.abbeytheatre.co.uk",hz=`${Zk}
84/og-image.webp`,Cb="@abbeynuneaton";function Yd({title:e,description:t,canonicalPath:n,ogImage:r=hz,ogType:o="website",noIndex:a=!1,titleTemplate:l=!0,jsonLd:u}){const f=Vt(),h=e?l?`${e} | ${vp}`:e:vp;let m;if(n?.startsWith("http"))m=n;else{const w=n??f.pathname;m=`${Zk}${w}`}const g=u?Array.isArray(u)?u:[u]:[],b=a||!Zu();return d.jsxs(gC,{children:[d.jsx("title",{children:h}),t&&d.jsx("meta",{name:"description",content:t}),d.jsx("link",{rel:"canonical",href:m}),b&&d.jsx("meta",{name:"robots",content:"noindex,nofollow,noarchive,nosnippet"}),d.jsx("meta",{property:"og:title",content:h}),t&&d.jsx("meta",{property:"og:description",content:t}),d.jsx("meta",{property:"og:url",content:m}),d.jsx("meta",{property:"og:type",content:o}),d.jsx("meta",{property:"og:image",content:r}),d.jsx("meta",{property:"og:site_name",content:vp}),d.jsx("meta",{property:"og:locale",content:"en_GB"}),d.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),d.jsx("meta",{name:"twitter:site",content:Cb}),d.jsx("meta",{name:"twitter:creator",content:Cb}),d.jsx("meta",{name:"twitter:title",content:h}),t&&d.jsx("meta",{name:"twitter:description",content:t}),d.jsx("meta",{name:"twitter:image",content:r}),g.map((w,E)=>d.jsx("script",{type:"application/ld+json",children:JSON.stringify(w)},E))]})}const Tt="https://www.abbeytheatre.co.uk",Ji="The Abbey Theatre",Mg={"@type":"PostalAddress",streetAddress:"Pool Bank Street",addressLocality:"Nuneaton",addressRegion:"Warwickshire",postalCode:"CV11 5DB",addressCountry:"GB"},pz={"@type":"GeoCoordinates",latitude:52.5241,longitude:-1.4685};function mz(e=[]){return{"@context":"https://schema.org","@type":"PerformingGroup","@id":`${Tt}/#organization`,name:Ji,alternateName:"Abbey Theatre Nuneaton",url:Tt,logo:`${Tt}/favicon.webp`,image:`${Tt}/og-image.webp`,email:"[email protected]",telephone:"+44-2476-327359",address:Mg,sameAs:e.length>0?e:void 0}}function gz(){return{"@context":"https://schema.org","@type":"PerformingArtsTheater","@id":`${Tt}/#theatre`,name:Ji,url:Tt,logo:`${Tt}/favicon.webp`,image:`${Tt}/og-image.webp`,telephone:"+44-2476-327359",email:"[email protected]",address:Mg,geo:pz,openingHoursSpecification:[{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Wednesday"],opens:"08:30",closes:"15:30"}]}}function $g(e){return{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:(e[0]?.href==="/"||e[0]?.href===Tt?e:[{name:"Home",href:"/"},...e]).map((n,r)=>({"@type":"ListItem",position:r+1,name:n.name,item:n.href.startsWith("http")?n.href:`${Tt}${n.href}`}))}}function yz(e,t){return{"@context":"https://schema.org","@type":"ItemList",name:e,numberOfItems:t.length,itemListElement:t.map((n,r)=>({"@type":"ListItem",position:r+1,name:n.name,url:n.href.startsWith("http")?n.href:`${Tt}${n.href}`}))}}function TB(e){const t=`${Tt}/news/${e.slug}`;return{"@context":"https://schema.org","@type":"NewsArticle",headline:e.title,description:e.description,url:t,mainEntityOfPage:{"@type":"WebPage","@id":t},image:e.imageUrl?[e.imageUrl]:[`${Tt}/og-image.webp`],datePublished:e.publishedAt??void 0,dateModified:e.updatedAt??e.publishedAt??void 0,author:e.authorName?{"@type":"Person",name:e.authorName}:{"@type":"Organization",name:Ji,url:Tt},publisher:{"@type":"Organization",name:Ji,logo:{"@type":"ImageObject",url:`${Tt}/favicon.webp`}}}}const vz=`${Tt}/#theatre`,wz=`${Tt}/#organization`;function Rb(){return{"@type":"PerformingArtsTheater","@id":vz,name:Ji,url:Tt,address:Mg}}function wp(e){const t=new Date(`${e}T12:00:00Z`);return new Intl.DateTimeFormat("en-GB",{timeZone:"Europe/London",timeZoneName:"short"}).format(t).includes("BST")?"+01:00":"+00:00"}function bp(e){const[t="00",n="00",r="00"]=e.split(":");return`${t.padStart(2,"0")}:${n.padStart(2,"0")}:${(r.split(".")[0]||"00").padStart(2,"0")}`}function bz(e){if(!e.performances.length)return null;const t=e.imageUrl||`${Tt}/og-image.webp`,n=e.performances.map(o=>{const a=bp(o.time),l=wp(o.date),u=`${o.date}T${a}${l}`,f=e.durationMinutes&&e.durationMinutes>0?new Date(new Date(`${o.date}T${a}${l}`).getTime()+e.durationMinutes*6e4).toISOString():void 0;
84return{"@type":"TheaterEvent",name:e.title,description:e.description,url:e.url,image:t,startDate:u,endDate:f,duration:e.durationMinutes?`PT${e.durationMinutes}M`:void 0,typicalAgeRange:e.ageGuidance||void 0,eventStatus:e.cancelled?"https://schema.org/EventCancelled":"https://schema.org/EventScheduled",eventAttendanceMode:"https://schema.org/OfflineEventAttendanceMode",location:Rb(),organizer:{"@type":"Organization","@id":wz,name:Ji,url:Tt},performer:e.companyName?{"@type":"PerformingGroup",name:e.companyName}:void 0,offers:typeof o.price=="number"?{"@type":"Offer",url:o.bookingUrl||e.url,priceCurrency:"GBP",price:o.price,availability:e.cancelled||o.bookable===!1?"https://schema.org/SoldOut":"https://schema.org/InStock"}:void 0}});if(n.length===1)return{"@context":"https://schema.org",...n[0]};const r=[...e.performances].sort((o,a)=>`${o.date}${o.time}`<`${a.date}${a.time}`?-1:1);return{"@context":"https://schema.org","@type":"EventSeries",name:e.title,description:e.description,url:e.url,image:t,startDate:`${r[0].date}T${bp(r[0].time)}${wp(r[0].date)}`,endDate:`${r[r.length-1].date}T${bp(r[r.length-1].time)}${wp(r[r.length-1].date)}`,location:Rb(),eventStatus:e.cancelled?"https://schema.org/EventCancelled":"https://schema.org/EventScheduled",eventAttendanceMode:"https://schema.org/OfflineEventAttendanceMode",subEvent:n}}const xz=()=>{const{clearCart:e,items:t,checkoutUrl:n}=BE();y.useEffect(()=>{(async()=>{if(new URLSearchParams(window.location.search).get("checkout")==="success"){e(),gn.success("Order confirmed! Your tickets are ready.",{description:'Check "My Tickets" to view your order.'}),window.history.replaceState({},"","/");return}if(t.length>0&&n)try{const{data:{user:u}}=await Me.auth.getUser();if(!u)return;const f=new Date(Date.now()-1800*1e3).toISOString(),{data:h}=await Me.from("orders").select("id, completed_at").eq("user_id",u.id).eq("payment_status","paid").gte("completed_at",f).order("completed_at",{ascending:!1}).limit(1);h&&h.length>0&&(e(),gn.success("Order confirmed! Your tickets are ready.",{description:'Check "My Tickets" to view your order.'}))}catch(u){console.error("Error checking for completed order:",u)}})()},[e,t,n]);const{data:r,isLoading:o}=Sn({queryKey:["productions"],queryFn:async()=>{const a=new Date().toISOString().split("T")[0],{data:l,error:u}=await Me.from("productions").select("*, showtimes(date)").eq("type","Theatre Production").eq("is_cancelled",!1).neq("booking_visibility","hidden");if(u)throw u;return(l||[]).map(h=>{const m=(h.showtimes||[]).filter(g=>g.date>=a).sort((g,b)=>g.date.localeCompare(b.date));return{...h,earliestDate:m[0]?.date||null}}).filter(h=>h.earliestDate!==null).sort((h,m)=>h.earliestDate?m.earliestDate?h.earliestDate.localeCompare(m.earliestDate):-1:1)}});return d.jsxs("div",{className:"min-h-screen flex flex-col",children:[d.jsx(Yd,{title:`The Abbey Theatre${XS()?" (test)":""} - Where Stories Come Alive`,titleTemplate:!1,description:"Experience world-class community theatre in the heart of Nuneaton. Book tickets for upcoming shows, discover our programmes, and plan your visit to The Abbey Theatre.",canonicalPath:"/",jsonLd:mz()}),d.jsx(Lo,{}),d.jsx("div",{className:"container mx-auto max-w-screen-xl px-4",children:d.jsx(tF,{page:"home"})}),d.jsx("section",{className:"bg-background py-8 lg:py-12",children:d.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[d.jsxs("div",{className:"mb-12 flex flex-col gap-6 sm:flex-row sm:items-end sm:justify-between",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tight sm:text-4xl lg:text-5xl",children:"What's On"}),d.jsx("p",{className:"mt-4 text-lg text-muted-foreground",children:"Experience world-class theatre"})]}),d.jsxs("div",{className:"flex flex-wrap gap-3",children:[d.jsx(Ce,{asChild:!0,variant:"outline",size:"lg",children:d.jsx(Ae,{to:"/shows",children:"View All Shows"})}),d.jsx(Ce,{asChild:!0,variant:"outline",size:"lg",children:d.jsx(Ae,{to:"/shows?type=courses",children:"View Daytime Activities"})}),d.jsx(Ce,{asChild:!0,variant:"outline",size:"lg",children:d.jsx(Ae,{to:"/things-to-do-in-nuneaton",children:"Things to Do in Nuneaton"})})]})]}),o?d.jsx("div",{className:"flex justify-center py-12",children:d.jsx(Zs,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):!r||r.length===0?d.jsx("div",{className:"rounded-lg border border-dashed border-muted-foreground
84/25 bg-muted/5 p-12 text-center",children:d.jsx("p",{className:"text-lg text-muted-foreground",children:"No shows currently available. Check back soon!"})}):d.jsx("div",{className:"grid gap-8 sm:grid-cols-2 lg:grid-cols-3",children:r.map(a=>d.jsx(Lg,{production:a},a.id))})]})}),d.jsx(bb,{title:"A Theatre for Our Community",description:"The Abbey Theatre has been at the heart of Nuneaton's cultural life for decades, bringing world-class productions and nurturing local talent. We're more than just a venueâwe're a community hub where stories are shared, imaginations run wild, and connections are made.",imageUrl:Xk,imageAlt:"The Abbey Theatre exterior",ctaText:"Learn More",ctaLink:"/about"}),d.jsx(bb,{title:"A Volunteer-Run Community Theatre",description:"The Abbey Theatre is Nuneaton's only local theatre, operated by Nuneaton Arts CIO (Charity No 1193774). All trustees are volunteers. We've been bringing live theatre to the community since 1969, when local Arts enthusiasts converted a drill hall into this wonderful venue. Join us in keeping live theatre alive in Nuneaton.",imageUrl:fz,imageAlt:"Community theatre",ctaText:"Support Us",ctaLink:"/support",reverse:!0}),d.jsx("section",{className:"bg-primary py-16 lg:py-24",children:d.jsxs("div",{className:"mx-auto max-w-4xl px-4 text-center sm:px-6 lg:px-8",children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tight text-primary-foreground sm:text-4xl lg:text-5xl",children:"Plan Your Visit"}),d.jsx("p",{className:"mt-6 text-lg text-primary-foreground/90",children:"Located in the heart of Nuneaton with excellent transport links. Our venue is fully accessible, and we offer a range of facilities to make your visit comfortable and enjoyable."}),d.jsxs("div",{className:"mt-10 flex flex-wrap justify-center gap-4",children:[d.jsx(Ce,{asChild:!0,size:"lg",variant:"secondary",children:d.jsx(Ae,{to:"/visit",children:"Visit Information"})}),d.jsx(Ce,{asChild:!0,size:"lg",className:"bg-primary-foreground text-primary hover:bg-primary-foreground/90",children:d.jsx(Ae,{to:"/accessibility",children:"Accessibility"})})]})]})}),d.jsx(Mo,{})]})},_z=()=>{const[e,t]=tI(),n=e.get("type"),[r,o]=y.useState(n==="courses"?"Daytime Course":"Theatre Production");y.useEffect(()=>{n==="courses"&&r!=="Daytime Course"&&o("Daytime Course")},[n]);const a=g=>{o(g),t(g==="Daytime Course"?{type:"courses"}:{})},{data:l,isLoading:u}=Sn({queryKey:["all-productions",r],queryFn:async()=>{const g=new Date().toISOString().split("T")[0],{data:b,error:w}=await Me.from("productions").select("*, showtimes(date)").eq("type",r).eq("is_cancelled",!1).neq("booking_visibility","hidden");if(w)throw w;return(b||[]).map(x=>{const S=(x.showtimes||[]).filter(T=>T.date>=g).sort((T,k)=>T.date.localeCompare(k.date));return{...x,earliestDate:S[0]?.date||null}}).filter(x=>x.earliestDate!==null).sort((x,S)=>x.earliestDate?S.earliestDate?x.earliestDate.localeCompare(S.earliestDate):-1:1)}}),f=r==="Daytime Course"?"daytime_activities":"whats_on",h=r==="Daytime Course"?"Daytime Activities":"What's On";y.useEffect(()=>{!l||l.length===0||hI(f,h,l.map((g,b)=>({id:g.id,name:g.title,category:g.type||"Theatre",index:b})))},[l,f,h]);const m=y.useMemo(()=>{const g=$g([{name:r==="Daytime Course"?"Daytime Activities":"What's On",href:r==="Daytime Course"?"/shows?type=courses":"/shows"}]);return!l||l.length===0?[g]:[g,yz(r==="Daytime Course"?"Daytime Activities â The Abbey Theatre":"What's On â The Abbey Theatre",l.map(b=>({name:b.title,href:`/shows/${b.slug}`})))]},[l,r]);return d.jsxs("div",{className:"min-h-screen flex flex-col",children:[d.jsx(Yd,{title:r==="Daytime Course"?"Daytime Activities in Nuneaton":"What's On in Nuneaton â Shows & Tickets",description:r==="Daytime Course"?"Daytime courses, workshops and classes in Nuneaton â drama, singing and creative sessions at The Abbey Theatre. Book your place online.":"What's on in Nuneaton this month: plays, musicals, comedy, live music, tribute nights and family shows at The Abbey Theatre. Tickets from £10, book online.",canonicalPath:r==="Daytime Course"?"/shows?type=courses":"/shows",jsonLd:m}),d.jsx(Lo,{}),d.jsx("main",{className:"flex-1 py-16 lg:py-24",children:d.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[d.jsxs("div",{className:"mb-12",children:[d.jsxs("div",{className:"flex items-center justify-between mb-6",children:[d.jsx("h1",{className:"text-4xl font-bold tracking-tight sm:text-5xl lg:text-6xl",children:r==="Theatre Production"?"What's On":"Daytime Activities"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Ce,{variant:r==="Theatre Production"?"default":"outline",onClick:()=>a("Theatre Production"),children:"Shows"}),d.jsx(Ce,{variant:r==="Daytime Course"?"default":"outline",onClick:()=>a("Daytime Course"),children:"Courses"})]})]}),d.jsx("p",{className:"text-lg text-muted-foreground",children:r==="Theatre Production"?"Discover our upcoming productions and book your tickets":"Explore our daytime courses and workshops"})]}),u?d.jsx("div",{className:"flex justify-center py-12",children:d.jsx(Zs,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):!l||l.length===0?d.jsxs("div",{className:"rounded-lg border border-dashed border-muted-foreground
84/25 bg-muted/5 p-12 text-center",children:[d.jsx("h2",{className:"text-2xl font-semibold mb-4",children:r==="Theatre Production"?"No shows found":"No courses found"}),d.jsx("p",{className:"text-lg text-muted-foreground",children:r==="Theatre Production"?"We don't have any shows scheduled yet. Check back soon!":"We don't have any daytime courses scheduled yet. Check back soon!"})]}):d.jsx("div",{className:"grid gap-8 sm:grid-cols-2 lg:grid-cols-3",children:l.map((g,b)=>d.jsx(Lg,{production:g,listId:f,listName:h,listIndex:b},g.id))}),d.jsx("div",{className:"mt-16 pt-8 border-t border-border text-center",children:d.jsx(Ce,{asChild:!0,variant:"outline",size:"lg",children:d.jsxs(Ae,{to:"/past-events",children:[d.jsx(AR,{className:"mr-2 h-4 w-4"}),"View Past Events"]})})})]})}),d.jsx(Mo,{})]})},Ab=[{q:"What is there to do in Nuneaton in the evening?",a:"Nuneaton town centre has a good range of restaurants, pubs and cinemas, and The Abbey Theatre on Pool Bank Street runs live shows most weeks of the year â plays, musicals, comedy, live music, tribute nights and family pantomime. Most evening performances start at 7:30pm."},{q:"Is there anything to do in Nuneaton with kids?",a:"Yes â as well as Riversley Park, the Museum & Art Gallery and Pingles Leisure Centre, The Abbey Theatre programmes family shows, youth theatre productions and an annual pantomime. Age guidance is shown on every show page so you can pick something suitable."},{q:"How much does it cost to see a show at The Abbey Theatre?",a:"Most tickets are between £10 and £20, with concessions on many performances. Some community and daytime events are free. You can book online, or in person at the Box Office."},{q:"Where do I park for The Abbey Theatre, Nuneaton?",a:"Pool Bank Street car park is directly next to the theatre and stays open for theatre customers in the evening. Nuneaton railway station is about a 10 minute walk away."},{q:"What indoor things are there to do in Nuneaton when it rains?",a:"Nuneaton Museum & Art Gallery, the library, the cinema and bowling are all indoors â and a matinee or evening performance at The Abbey Theatre is a good rainy-day option, with a licensed bar on site."}],Sz=[{title:"See a live show at The Abbey Theatre",body:"Nuneaton's only dedicated theatre, running since 1969 and staffed by volunteers. Drama, musicals, comedy, live music and pantomime, plus daytime courses and workshops. Tickets are typically £10â£20.",link:{to:"/shows",label:"See what's on"}},{title:"Riversley Park & Nuneaton Museum",body:"Free-to-enter park with formal gardens, play areas and the town's museum and art gallery, including the George Eliot collection. A ten minute walk from the theatre."},{title:"George Eliot heritage trail",body:"Nuneaton is the birthplace of novelist George Eliot. The trail links Chilvers Coton church, Griff House and the museum collection â a good half-day out for visitors."},{title:"Bedworth, Hartshill Hayes & the countryside",body:"Hartshill Hayes Country Park has woodland walks and views over the Anker valley, and the Coventry Canal towpath makes an easy flat walk out of town."},{title:"Eat and drink in the town centre",body:"Independent cafés, pubs and restaurants around Abbey Street and Market Place â handy for a pre-show meal before a 7:30pm curtain up."},{title:"Volunteer or join in",body:"The Abbey Theatre is run by volunteers, on stage and behind the scenes. It's one of the friendliest ways to get involved with something local.",link:{to:"/become-a-volunteer",label:"Volunteer with us"}}],Ez=()=>{const{data:e,isLoading:t}=Sn({queryKey:["things-to-do-productions"],queryFn:async()=>{const r=new Date().toISOString().split("T")[0],{data:o,error:a}=await Me.from("productions").select("*, showtimes(date)").eq("type","Theatre Production").eq("is_cancelled",!1);if(a)throw a;return(o||[]).map(l=>{const u=(l.showtimes||[]).filter(f=>f.date>=r).sort((f,h)=>f.date.localeCompare(h.date));return{...l,earliestDate:u[0]?.date||null}}).filter(l=>l.earliestDate).sort((l,u)=>l.earliestDate.localeCompare(u.earliestDate)).slice(0,6)}}),n={"@context":"https://schema.org","@type":"FAQPage",mainEntity:Ab.map(r=>
84({"@type":"Question",name:r.q,acceptedAnswer:{"@type":"Answer",text:r.a}}))};return d.jsxs("div",{className:"min-h-screen flex flex-col",children:[d.jsx(Yd,{title:"Things to Do in Nuneaton â Shows, Days Out & What's On",titleTemplate:!1,description:"A local guide to things to do in Nuneaton: live shows and theatre, family days out, parks, museums and heritage â plus what's on this month at The Abbey Theatre.",canonicalPath:"/things-to-do-in-nuneaton",jsonLd:[n,gz(),$g([{name:"Things to Do in Nuneaton",href:"/things-to-do-in-nuneaton"}]),{"@context":"https://schema.org","@type":"WebPage",name:"Things to Do in Nuneaton",url:`${Tt}/things-to-do-in-nuneaton`,about:{"@type":"City",name:"Nuneaton"}}]}),d.jsx(Lo,{}),d.jsxs("main",{className:"flex-1",children:[d.jsx("section",{className:"py-12 lg:py-20",children:d.jsx("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:d.jsxs("div",{className:"grid gap-10 lg:grid-cols-2 lg:items-center",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-4xl font-bold tracking-tight sm:text-5xl lg:text-6xl",children:"Things to Do in Nuneaton"}),d.jsx("p",{className:"mt-6 text-lg text-muted-foreground",children:"Looking for something to do in Nuneaton this week? This is our local guide â live shows, family days out, parks, museums and heritage â written by the volunteers who run The Abbey Theatre on Pool Bank Street, right in the middle of town."}),d.jsxs("div",{className:"mt-8 flex flex-wrap gap-3",children:[d.jsx(Ce,{asChild:!0,size:"lg",children:d.jsx(Ae,{to:"/shows",children:"What's on this month"})}),d.jsx(Ce,{asChild:!0,size:"lg",variant:"outline",children:d.jsx(Ae,{to:"/visit",children:"Plan your visit"})})]})]}),d.jsx("img",{src:Xk,alt:"The Abbey Theatre on Pool Bank Street, Nuneaton",loading:"lazy",className:"rounded-lg object-cover w-full h-72 lg:h-96"})]})})}),d.jsx("section",{className:"bg-muted/30 py-12 lg:py-16",children:d.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tight sm:text-4xl",children:"What's on in Nuneaton right now"}),d.jsx("p",{className:"mt-4 text-lg text-muted-foreground",children:"Upcoming performances at The Abbey Theatre â book online in a couple of minutes."}),t?d.jsx("div",{className:"flex justify-center py-12",children:d.jsx(Zs,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):!e||e.length===0?d.jsxs("p",{className:"mt-8 text-muted-foreground",children:["No shows are on sale at the moment â check back soon, or"," ",d.jsx(Ae,{to:"/shows",className:"underline",children:"browse the full programme"}),"."]}):d.jsx("div",{className:"mt-10 grid gap-8 sm:grid-cols-2 lg:grid-cols-3",children:e.map(r=>d.jsx(Lg,{production:r},r.id))}),d.jsx("div",{className:"mt-10",children:d.jsx(Ce,{asChild:!0,variant:"outline",size:"lg",children:d.jsx(Ae,{to:"/shows",children:"View all shows"})})})]})}),d.jsx("section",{className:"py-12 lg:py-16",children:d.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tight sm:text-4xl",children:"Our pick of days out in and around Nuneaton"}),d.jsx("div",{className:"mt-10 grid gap-6 md:grid-cols-2 lg:grid-cols-3",children:Sz.map(r=>d.jsx(Ig,{className:"h-full",children:d.jsxs(Dg,{className:"pt-6",children:[d.jsx("h3",{className:"text-xl font-semibold",children:r.title}),d.jsx("p",{className:"mt-3 text-muted-foreground",children:r.body}),r.link&&d.jsx(Ae,{to:r.link.to,className:"mt-4 inline-block font-medium underline",children:r.link.label})]})},r.title))})]})}),d.jsx("section",{className:"bg-muted/30 py-12 lg:py-16",children:d.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tight sm:text-4xl",children:"Getting here and planning your evening"}),d.jsxs("div",{className:"mt-10 grid gap-8 sm:grid-cols-2 lg:grid-cols-4",children:[d.jsxs("div",{children:[d.jsx(zx,{className:"h-6 w-6 text-primary"}),d.jsx("h3",{className:"mt-3 font-semibold",children:"Where we are"}),d.jsx("p",{className:"mt-2 text-muted-foreground",children:"Pool Bank Street, Nuneaton, Warwickshire CV11 5DB â a few minutes' walk from the town centre."})]}),d.jsxs("div",{children:[d.jsx(SR,{className:"h-6 w-6 text-primary"}),d.jsx("h3",{className:"mt-3 font-semibold",children:"Parking"}),d.jsx("p",{className:"mt-2 text-muted-foreground",children:"Pool Bank Street car park sits right next to the theatre and stays open for theatre customers in the evening."})]}),d.jsxs("div",{children:[d.jsx(MR,{className:"h-6 w-6 text-primary"}),d.jsx("h3",{className:"mt-3 font-semibold",children:"By train"}),d.jsx("p",{className:"mt-2 text-muted-foreground",children:"Nuneaton station is roughly a 10 minute walk, with direct services from C
84oventry, Birmingham and Leicester."})]}),d.jsxs("div",{children:[d.jsx(yl,{className:"h-6 w-6 text-primary"}),d.jsx("h3",{className:"mt-3 font-semibold",children:"Show times"}),d.jsx("p",{className:"mt-2 text-muted-foreground",children:"Evening performances usually start at 7:30pm, with matinees on selected Saturdays and Sundays."})]})]}),d.jsxs("div",{className:"mt-10 flex flex-wrap gap-3",children:[d.jsx(Ce,{asChild:!0,variant:"outline",children:d.jsxs(Ae,{to:"/accessibility",children:[d.jsx(bR,{className:"mr-2 h-4 w-4"})," Accessibility"]})}),d.jsx(Ce,{asChild:!0,variant:"outline",children:d.jsxs(Ae,{to:"/box-office",children:[d.jsx(Mp,{className:"mr-2 h-4 w-4"})," Box Office"]})})]})]})}),d.jsx("section",{className:"py-12 lg:py-16",children:d.jsxs("div",{className:"mx-auto max-w-4xl px-4 sm:px-6 lg:px-8",children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tight sm:text-4xl",children:"Frequently asked questions"}),d.jsx("dl",{className:"mt-10 space-y-8",children:Ab.map(r=>d.jsxs("div",{children:[d.jsx("dt",{className:"text-lg font-semibold",children:r.q}),d.jsx("dd",{className:"mt-2 text-muted-foreground",children:r.a})]},r.q))})]})})]}),d.jsx(Mo,{})]})},Ao={name:"The Abbey Theatre",streetAddress:"Pool Bank Street",addressLocality:"Nuneaton",addressRegion:"Warwickshire",postalCode:"CV11 5DB",phone:"02476 327359",boxOfficeHours:"Mon & Weds, 8:30am to 3:30pm"},kz=`${Ao.name}, ${Ao.streetAddress}, ${Ao.addressLocality}, ${Ao.addressRegion} ${Ao.postalCode}`,nl={arrival:"The foyer opens ahead of each performance and the auditorium usually opens about 20 minutes before the advertised start time.",bar:"The foyer bar serves drinks and refreshments before the show and during the interval.",parking:"Pay and display parking is available in the town centre car parks a short walk from Pool Bank Street.",transport:"Nuneaton railway station and the bus station are both within walking distance of the theatre.",accessibility:"Step-free access, accessible seating and an accessible toilet are available. Contact the box office to discuss any access requirements before you book."},Tz=({title:e,url:t,description:n})=>{const r=t||window.location.href,o=n||e,a=async()=>{try{await navigator.clipboard.writeText(r),gn.success("Link copied to clipboard!")}catch{gn.error("Failed to copy link")}},l=()=>{const m=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(r)}`;window.open(m,"_blank","width=600,height=400")},u=()=>{const m=`https://twitter.com/intent/tweet?url=${encodeURIComponent(r)}&text=${encodeURIComponent(o)}`;window.open(m,"_blank","width=600,height=400")},f=()=>{const m=`https://wa.me/?text=${encodeURIComponent(`${o} ${r}`)}`;window.open(m,"_blank")},h=()=>{const m=encodeURIComponent(e),g=encodeURIComponent(`Check out this show at The Abbey Theatre: 85 86${o} 87 88${r}`);window.location.href=`mailto:?subject=${m}&body=${g}`};return d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("span",{className:"text-sm text-muted-foreground mr-1",children:"Share:"}),d.jsx(Ce,{variant:"outline",size:"icon",onClick:l,title:"Share on Facebook",className:"h-9 w-9",children:d.jsx(Fx,{className:"h-4 w-4"})}),d.jsx(Ce,{variant:"outline",size:"icon",onClick:u,title:"Share on X (Twitter)",className:"h-9 w-9",children:d.jsx("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor",children:d.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}),d.jsx(Ce,{variant:"outline",size:"icon",onClick:f,title:"Share on WhatsApp",className:"h-9 w-9",children:d.jsx(IR,{className:"h-4 w-4"})}),d.jsx(Ce,{variant:"outline",size:"icon",onClick:h,title:"Share via Email",className:"h-9 w-9",children:d.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("rect",{width:"20",height:"16",x:"2",y:"4",rx:"2"}),d.jsx("path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"})]})}),d.jsx(Ce,{variant:"outline",size:"icon",onClick:a,title:"Copy link",className:"h-9 w-9",children:d.jsx(NR,{className:"h-4 w-4"})})]})},Sm=e=>{if(!e)return null;const t=[/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/|youtube\.com\/v\/)([a-zA-Z0-9_-]{11})/,/(?:youtube\.com\/shorts\/|youtube\.com\/live\/)([a-zA-Z0-9_-]{11})/,/^([a-zA-Z0-9_-]{11})$/];for(const n of t){const r=e.match(n);if(r)return r[1]}return null},Fg=(e,t="medium")=>`https://img.youtube.com/vi/${e}/${{default:"default",medium:"mqdefault",high:"hqdefault",maxres:"maxresdefault"}[t]}.jpg`,Cz=({videoId:e,title:t="YouTube video",className:n="",autoPlay:r=!1,isLightbox:o=!1})=>{const a=y.useRef(null),[l,u]=y.useState(!1),[f,h]=y.useState(r),m=typeof window<"u"?window.location.origin:"",g=`https://www.youtube.com/embed/${e}?${new URLSearchParams({rel:"0",modestbranding:"1",playsinline:"1",...m?{origin:m}:{},...r?{autoplay:"1",mute:"0"}:{}}).toString()}`;return y.useEffect(()=>{if(f){const b=setTimeout(()=>u(!0),100);return()=>clearTimeout(b)}},[f]),f?d.jsxs("div",{className:`relative w-full bg-black ${n}`,children:[!l&&d.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/80",children:d.jsx("div",{className:"w-12 h-12 border-4 border-white/30 border-t-white rounded-full animate-spin"})}),d.jsx("iframe",{ref:a,src:g,title:t,className:"w-full h-full",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture;
88 web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0,loading:"lazy"})]}):d.jsxs("button",{type:"button",onClick:()=>h(!0),className:`relative w-full bg-black cursor-pointer group focus:outline-none focus:ring-2 focus:ring-primary ${n}`,"aria-label":`Play ${t}`,children:[d.jsx("img",{src:Fg(e,o?"maxres":"high"),alt:t,className:"w-full h-full object-cover",loading:"lazy"}),d.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30 group-hover:bg-black/40 transition-colors",children:d.jsx("div",{className:"w-16 h-16 md:w-20 md:h-20 rounded-full bg-red-600 group-hover:bg-red-700 transition-colors flex items-center justify-center shadow-lg",children:d.jsx(Wu,{className:"w-8 h-8 md:w-10 md:h-10 text-white fill-white ml-1"})})}),d.jsx("span",{className:"sr-only",children:t})]})},Rz=({items:e,isOpen:t,onOpenChange:n,initialIndex:r=0,productionTitle:o="Media"})=>{const[a,l]=y.useState(r);y.useEffect(()=>{t&&l(r)},[t,r]);const u=e[a],f=y.useCallback(()=>{l(k=>k===0?e.length-1:k-1)},[e.length]),h=y.useCallback(()=>{l(k=>k===e.length-1?0:k+1)},[e.length]);y.useEffect(()=>{if(!t)return;const k=C=>{C.key==="ArrowLeft"?(C.preventDefault(),f()):C.key==="ArrowRight"?(C.preventDefault(),h()):C.key==="Escape"&&n(!1)};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[t,f,h,n]);const[m,g]=y.useState(null),[b,w]=y.useState(null),E=50,x=k=>{w(null),g(k.targetTouches[0].clientX)},S=k=>{w(k.targetTouches[0].clientX)},T=()=>{if(!m||!b)return;const k=m-b,C=k>E,j=k<-E;C?h():j&&f()};return u?d.jsx(mg,{open:t,onOpenChange:n,children:d.jsxs(Md,{className:"max-w-6xl w-[95vw] h-[90vh] p-0 bg-black/95 border-none flex flex-col",onTouchStart:x,onTouchMove:S,onTouchEnd:T,children:[d.jsxs($d,{className:"sr-only",children:[o," media gallery"]}),d.jsx(Fd,{className:"sr-only",children:"Use the next and previous controls to browse images and videos."}),d.jsxs("div",{className:"relative flex-1 flex items-center justify-center min-h-0",children:[u.type==="image"?d.jsx("img",{src:dr(u.url),alt:u.alt||o,className:"max-h-full max-w-full object-contain"}):d.jsx("div",{className:"w-full h-full flex items-center justify-center p-4",children:d.jsx("div",{className:"w-full max-w-4xl aspect-video",children:d.jsx(Cz,{videoId:u.videoId||Sm(u.url)||"",title:u.title||o,autoPlay:!0,isLightbox:!0,className:"w-full h-full"})})}),e.length>1&&d.jsxs(d.Fragment,{children:[d.jsx("button",{onClick:f,className:"absolute left-2 md:left-4 p-2 md:p-3 rounded-full bg-background/20 hover:bg-background/40 transition-colors text-white hidden sm:flex items-center justify-center","aria-label":"Previous",children:d.jsx($x,{className:"h-6 w-6 md:h-8 md:w-8"})}),d.jsx("button",{onClick:h,className:"absolute right-2 md:right-4 p-2 md:p-3 rounded-full bg-background/20 hover:bg-background/40 transition-colors text-white hidden sm:flex items-center justify-center","aria-label":"Next",children:d.jsx(Im,{className:"h-6 w-6 md:h-8 md:w-8"})})]})]}),d.jsxs("div",{className:"flex-shrink-0 p-3 md:p-4 bg-black/50",children:[d.jsxs("div",{className:"flex items-center justify-center gap-2 text-white text-sm",children:[d.jsxs("span",{className:"bg-black/50 px-3 py-1 rounded-full",children:[a+1," / ",e.length]}),u.title&&d.jsx("span",{className:"truncate max-w-[200px] md:max-w-none",children:u.title}),u.type==="video"&&d.jsxs("span",{className:"flex items-center gap-1 text-red-400",children:[d.jsx(Wu,{className:"h-3 w-3 fill-current"})," Video"]})]}),d.jsx("p",{className:"text-center text-xs text-white/60 mt-2 sm:hidden",children:"Swipe left/right to navigate"})]}),e.length>1&&e.length<=10&&d.jsx("div",{className:"hidden md:flex flex-shrink-0 justify-center gap-2 p-4 bg-black/70 overflow-x-auto",children:e.map((k,C)=>d.jsx("button",{onClick:()=>l(C),className:Le("relative w-16 h-12 rounded overflow-hidden transition-all flex-shrink-0",C===a?"ring-2 ring-primary ring-offset-2 ring-offset-black":"opacity-60 hover:opacity-100"),"aria-label":`View ${k.type==="video"?"video":"image"} ${C+1}`,children:k.type==="image"?d.jsx("img",{src:dr(k.url),alt:"",className:"w-full h-full object-cover"}):d.jsxs(d.Fragment,{children:[d.jsx("img",{src:Fg(k.videoId||Sm(k.url)||"","default"),alt:"",className:"w-full h-full object-cover"}),d.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40",children:d.jsx(Wu,{className:"h-4 w-4 text-white fill-white"})})]})},C))})]})}):null};function jb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Az(e){if(Array.isArray(e))return e}function jz(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,l,u=[],f=!0,h=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;
vendor: 6,752 bytes, lines 88-89
88!(f=(r=a.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){h=!0,o=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw o}}return u}}function Pz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 89In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nz(e,t){return Az(e)||jz(e,t)||Oz(e,t)||Pz()}function Oz(e,t){if(e){if(typeof e=="string")return jb(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jb(e,t):void 0}}const eT=Object.entries,Pb=Object.setPrototypeOf,Iz=Object.isFrozen,Dz=Object.getPrototypeOf,Lz=Object.getOwnPropertyDescriptor;let Ht=Object.freeze,en=Object.seal,Ii=Object.create,tT=typeof Reflect<"u"&&Reflect,Em=tT.apply,km=tT.construct;Ht||(Ht=function(t){return t});en||(en=function(t){return t});Em||(Em=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),a=2;a<r;a++)o[a-2]=arguments[a];return t.apply(n,o)});km||(km=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new t(...r)});const Co=Mt(Array.prototype.forEach),Mz=Mt(Array.prototype.lastIndexOf),Nb=Mt(Array.prototype.pop),rl=Mt(Array.prototype.push),$z=Mt(Array.prototype.splice),Wi=Array.isArray,fl=Mt(String.prototype.toLowerCase),xp=Mt(String.prototype.toString),Ob=Mt(String.prototype.match),sl=Mt(String.prototype.replace),Ib=Mt(String.prototype.indexOf),Fz=Mt(String.prototype.trim),Uz=Mt(Number.prototype.toString),zz=Mt(Boolean.prototype.toString),Db=typeof BigInt>"u"?null:Mt(BigInt.prototype.toString),Lb=typeof Symbol>"u"?null:Mt(Symbol.prototype.toString),On=Mt(Object.prototype.hasOwnProperty),ol=Mt(Object.prototype.toString),mn=Mt(RegExp.prototype.test),So=Bz(TypeError);function Mt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Em(e,t,r)}}function Bz(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return km(e,n)}}function Qe(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fl;if(Pb&&Pb(e,null),!Wi(t))return e;let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const a=n(o);a!==o&&(Iz(t)||(t[r]=a),o=a)}e[o]=!0}return e}function Hz(e){for(let t=0;t<e.length;t++)On(e,t)||(e[t]=null);return e}function Wn(e){const t=Ii(null);for(const r of eT(e)){var n=Nz(r,2);const o=n[0],a=n[1];On(e,o)&&(Wi(a)?t[o]=Hz(a):a&&typeof a=="object"&&a.constructor===Object?t[o]=Wn(a):t[o]=a)}return t}function Vz(e){switch(typeof e){case"string":return e;case"number":return Uz(e);case"boolean":return zz(e);case"bigint":return Db?Db(e):"0";case"symbol":return Lb?Lb(e):"Symbol()";case"undefined":return ol(e);case"function":case"object":{if(e===null)return ol(e);const t=e,n=kr(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:ol(r)}return ol(e)}default:return ol(e)}}function kr(e,t){for(;e!==null;){const r=Lz(e,t);if(r){if(r.get)return Mt(r.get);if(typeof r.value=="function")return Mt(r.value)}e=Dz(e)}function n(){return null}return n}function Wz(e){try{return mn(e,""),!0}catch{return!1}}const Mb=Ht(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),_p=Ht(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Sp=Ht(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),qz=Ht(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ep=Ht(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Gz=Ht(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$b=Ht(["#text"]),Fb=Ht(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
89spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),kp=Ht(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ub=Ht(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Au=Ht(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Kz=en(/{{[\w\W]*|^[\w\W]*}}/g),Yz=en(/<%[\w\W]*|^[\w\W]*%>/g),Qz=en(/\${[\w\W]*/g),Jz=en(/^data-[\-\w.\u00B7-\uFFFF]+$/),Xz=en(/^aria-[\-\w]+$/),zb=en(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Zz=en(/^(?:\w+script|data):/i),e3=en(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),t3=en(/^html$/i),n3=en(/^[a-z][.\w]*(-[.\w]+)+$/i),Bb=en(/<[/\w!]/g),Hb=en(/<[/\w]/g),r3=en(/<\/no(script|embed|frames)/i),s3=en(/\/>/i),Vn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},nT=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],o3=Ht(Qe({},nT)),i3=(function(){const e={};return Co(nT,t=>{e[t]=en(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Ht(e)})(),a3=function(){return typeof window>"u"?null:window},l3=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;
vendor: 15,479 bytes, line 89
89const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Vb=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ks=function(t,n,r,o){return On(t,n)&&Wi(t[n])?Qe(o.base?Wn(o.base):{},t[n],o.transform):r},Tp=function(t,n,r){const o=On(t,n)?t[n]:void 0;return o&&typeof o=="object"?Wn(o):r()};function rT(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a3();const t=de=>rT(de);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==Vn.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const r=n,o=r.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,l=e.Node,u=e.Element,f=e.NodeFilter,h=e.NamedNodeMap;h===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const m=e.DOMParser,g=e.trustedTypes,b=u.prototype,w=kr(b,"cloneNode"),E=kr(b,"remove"),x=kr(b,"nextSibling"),S=kr(b,"childNodes"),T=kr(b,"parentNode"),k=kr(b,"shadowRoot"),C=kr(b,"attributes"),j=l&&l.prototype?kr(l.prototype,"nodeType"):null,O=l&&l.prototype?kr(l.prototype,"nodeName"):null,M=l&&l.prototype?kr(l.prototype,"ownerDocument"):null,D=function(A){return j?j(A):A.nodeType},q=function(A){return O?O(A):A.nodeName};if(typeof a=="function"){const de=n.createElement("template");de.content&&de.content.ownerDocument&&(n=de.content.ownerDocument)}let J,ne="",ie,re=!1,pe=0;const L=function(){if(pe>0)throw So('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},G=function(A){L(),pe++;try{return J.createHTML(A)}finally{pe--}},Q=function(A){L(),pe++;try{return J.createScriptURL(A)}finally{pe--}},te=function(){return re||(ie=l3(g,o),re=!0),ie},B=n,F=B.implementation,W=B.createNodeIterator,N=B.createDocumentFragment,z=B.getElementsByTagName,Y=r.importNode;let X=Vb();t.isSupported=typeof eT=="function"&&typeof T=="function"&&F&&F.createHTMLDocument!==void 0;const me=Kz,Se=Yz,ce=Qz,ke=Jz,$e=Xz,Ge=Zz,He=e3,ve=n3;let Ue=zb,De=null;const ht=Qe({},[...Mb,..._p,...Sp,...Ep,...$b]);let ze=null;const $t=Qe({},[...Fb,...kp,...Ub,...Au]);let at=Object.seal(Ii(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),jt=null,Ft=null;const nt=Object.seal(Ii(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Mn=!0,Wt=!0,Lr=!1,Mr=!0,st=!1,Ct=!0,ln=!1,Jn=!1,_t=null,cn=null,Xn=!1,qt=!1,un=!1,mr=!1,wn=!0,$r=!1;const Fr="user-content-";let $n=!0,Zn=!1,Gt={},Pt=null;const tn=Qe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let ts=null;const Ne=Qe({},["audio","video","img","source","image","track"]);let qe=null;const Je=Qe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Nt="http://www.w3.org/1998/Math/MathML",Ut="http://www.w3.org/2000/svg",lt="http://www.w3.org/1999/xhtml";let Kt=lt,Rt=!1,kn=null;const ro=Qe({},[Nt,Ut,lt],xp),so=Ht(["mi","mo","mn","ms","mtext"]);let ks=Qe({},so);const qo=Ht(["annotation-xml"]);let ca=Qe({},qo);const Qd=Qe({},["title","style","font","a","script"]);let oo=null;const ns=["application/xhtml+xml","text/html"],Xl="text/html";let pt=null,Ts=null;const Zl=n.createElement("form"),ua=function(A){return A instanceof RegExp||A instanceof Function},Go=function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ts&&Ts===A)return;(!A||typeof A!="object")&&(A={}),A=Wn(A),oo=ns.indexOf(A.PARSER_MEDIA_TYPE)===-1?Xl:A.PARSER_MEDIA_TYPE,pt=oo==="application/xhtml+xml"?xp:fl,De=Ks(A,"ALLOWED_TAGS",ht,{transform:pt}),ze=Ks(A,"ALLOWED_ATTR",$t,{transform:pt}),kn=Ks(A,"ALLOWED_NAMESPACES",ro,{transform:xp}),qe=Ks(A,"ADD_URI_SAFE_ATTR",Je,{transform:pt,base:Je}),ts=Ks(A,"ADD_DATA_URI_TAGS",Ne,{transform:pt,base:Ne}),Pt=Ks(A,"FORBID_CONTENTS",tn,{transform:pt}),jt=Ks(A,"FORBID_TAGS",Wn({}),{transform:pt}),Ft=Ks(A,"FORBID_ATTR",Wn({}),{transform:pt}),Gt=On(A,"USE_PROFILES")?A.USE_PROFILES&&typeof A.USE_PROFILES=="object"?Wn(A.USE_PROFILES):A.USE_PROFILES:!1,Mn=A.ALLOW_ARIA_ATTR!==!1,Wt=A.ALLOW_DATA_ATTR!==!1,Lr=A.ALLOW_UNKNOWN_PROTOCOLS||!1,Mr=A.ALLOW_SELF_CLOSE_IN_ATTR!==!1,st=A.SAFE_FOR_TEMPLATES||!1,Ct=A.SAFE_FOR_XML!==!1,ln=A.WHOLE_DOCUMENT||!1,qt=A.RETURN_DOM||!1,un=A.RETURN_DOM_FRAGMENT||!1,mr=A.RETURN_TRUSTED_TYPE||!1,Xn=A.FORCE_BODY||!1,wn=A.SANITIZE_DOM!==!1,$r=A.SANITIZE_NAMED_PROPS||!1,$n=A.KEEP_CONTENT!==!1,Zn=A.IN_PLACE||!1,Ue=Wz(A.ALLOWED_URI_REGEXP)?A.ALLOWED_URI_REGEXP:zb,Kt=typeof A.NAMESPACE=="string"?A.NAMESPACE:lt,ks=Tp(A,"MATHML_TEXT_INTEGRATION_POINTS",()=>Qe({},so)),ca=Tp(A,"HTML_INTEGRATION_POINTS",()=>Qe({},qo));const U=Tp(A,"CUSTOM_ELEMENT_HANDLING",()=>Ii(null));if(at=Ii(null),On(U,"tagNameCheck")&&ua(U.tagNameCheck)&&(at.tagNameCheck=U.tagNameCheck),On(U,"attributeNameCheck")&&ua(U.attributeNameCheck)&&(at.attributeNameCheck=U.attributeNameCheck),On(U,"allowCustomizedBuiltInElements")&&typeof U.allowCustomizedBuiltInElements=="boolean"&&(at.allowCustomizedBuiltInElements=U.allowCustomizedBuiltInElements),en(at),st&&(Wt=!1),un&&(qt=!0),Gt&&(De=Qe({},$b),ze=Ii(null),Gt.html===!0&&(Qe(De,Mb),Qe(ze,Fb)),Gt.svg===!0&&(Qe(De,_p),Qe(ze,kp),Qe(ze,Au)),Gt.svgFilters===!0&&(Qe(De,Sp),Qe(ze,kp),Qe(ze,Au)),Gt.mathMl===!0&&(Qe(De,Ep),Qe(ze,Ub),Qe(ze,Au))),nt.tagCheck=null,nt.attributeCheck=null,On(A,"ADD_TAGS")&&(typeof A.ADD_TAGS=="function"?nt.tagCheck=A.ADD_TAGS:Wi(A.ADD_TAGS)&&(De===ht&&(De=Wn(De)),Qe(De,A.ADD_TAGS,pt))),On(A,"ADD_ATTR")&&(typeof A.ADD_ATTR=="function"?nt.attributeCheck=A.ADD_ATTR:Wi(A.ADD_ATTR)&&(ze===$t&&(ze=Wn(ze)),Qe(ze,A.ADD_ATTR,pt))),On(A,"ADD_FORBID_CONTENTS")&&Wi(A.ADD_FORBID_CONTENTS)&&(Pt===tn&&(Pt=Wn(Pt)),Qe(Pt,A.ADD_FORBID_CONTENTS,pt)),$n&&(De["#text"]=!0),ln&&Qe(De,["html","head","body"]),De.table&&(Qe(De,["tbody"]),delete jt.tbody),A.TRUSTED_TYPES_POLICY){if(typeof A.TRUSTED_TYPES_POLICY.createHTML!="function")throw So('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof A.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw So('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const ee=J;J=A.TRUSTED_TYPES_POLICY;try{ne=G("")}catch(he){throw J=ee,he}}else A.TRUSTED_TYPES_POLICY===null?(J=void 0,ne=""):(J===void 0&&(J=te()),J&&typeof ne=="string"&&(ne=G("")));Ht&&Ht(A),Ts=A},da=Qe({},[..._p,...Sp,...qz]),ec=Qe({},[...Ep,...Gz]),Jd=function(A,U,ee){return U.namespaceURI===lt?A==="svg":U.namespaceURI===Nt?A==="svg"&&(ee==="annotation-xml"||ks[ee]):!!da[A]},yt=function(A,U,ee){return U.namespaceURI===lt?A==="math":U.namespaceURI===Ut?A==="math"&&ca[ee]:!!ec[A]},Xd=function(A,U,ee){return U.namespaceURI===Ut&&!ca[ee]||U.namespaceURI===Nt&&!ks[ee]?!1:!ec[A]&&(Qd[A]||!da[A])},fa=function(A){let U=T(A);(!U||!U.tagName)&&(U={namespaceURI:Kt,tagName:"template"});const ee=fl(A.tagName),he=fl(U.tagName);return kn[A.namespaceURI]?A.namespaceURI===Ut?Jd(ee,U,he):A.namespaceURI===Nt?yt(ee,U,he):A.namespaceURI===lt?Xd(ee,U,he):!!(oo==="application/xhtml+xml"&&kn[A.namespaceURI]):!1},gr=function(A){rl(t.removed,{element:A});try{T(A).removeChild(A)}catch{if(E(A),!T(A))throw So("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},io=function(A,U,ee){try{A.removeAttributeNode(U)}catch{try{A.removeAttribute(ee)}catch{}}},Ko=function(A){bn(A);const U=S(A);if(U){const he=[];Co(U,be=>{rl(he,be)}),Co(he,be=>{try{E(be)}catch{}})}const ee=C(A);if(ee)for(let he=ee.length-1;he>=0;--he){const be=ee[he],je=be&&be.name;typeof je=="string"&&io(A,be,je)}},Ur=function(A,U,ee){if(!ee)try{ee=U.getAttributeNode(A)}catch{ee=null}rl(t.removed,{attribute:ee||null,from:U});try{ee?U.removeAttributeNode(ee):U.removeAttribute(A)}catch{try{U.removeAttribute(A)}catch{}}if(A==="is")if(qt||un)try{gr(U)}catch{}else try{U.setAttribute(A,"")}catch{}},Yo=function(A){const U=C(A);if(U)for(let ee=U.length-1;ee>=0;--ee){const he=U[ee],be=he&&he.name;typeof be!="string"||ze[pt(be)]||io(A,he,be)}},bn=function(A){const U=[A];for(;U.length>0;){const ee=U.pop();D(ee)===Vn.element&&Yo(ee);const be=S(ee);if(be)for(let je=be.length-1;je>=0;--je)U.push(be[je])}},tc=function(A,U){return Ct?A==="patchsrc"?!0:A==="for"&&U!=="label"&&U!=="output":!1},Fn=function(A){if(!Ct)return;const U=[A];for(;U.length>0;){const ee=U.pop(),he=D(ee);if(he===Vn.processingInstruction||he===Vn.comment&&mn(Hb,ee.data)){try{E(ee)}catch{}continue}if(he===Vn.element){const je=ee,Ke=pt(q(ee));try{je.hasAttribute&&je.hasAttribute("patchsrc")&&je.removeAttribute("patchsrc"),je.hasAttribute&&je.hasAttribute("for")&&tc("for",Ke)&&je.removeAttribute("for")}catch{}}const be=S(ee);if(be)for(let je=be.length-1;je>=0;--je)U.push(be[je])}},nc=function(A){let U=null,ee=null;if(Xn)A="<remove></remove>"+A;else{const je=Ob(A,/^[\r\n\t ]+/);ee=je&&je[0]}oo==="application/xhtml+xml"&&Kt===lt&&(A='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+A+"</body></html>");const he=J?G(A):A;if(Kt===lt)try{U=new m().parseFromString(he,oo)}catch{}if(!U||!U.documentElement){U=F.createDocument(Kt,"template",null);try{U.documentElement.innerHTML=Rt?ne:he}catch{}}const be=U.body||U.documentElement;return A&&ee&&be.insertBefore(n.createTextNode(ee),be.childNodes[0]||null),Kt===lt?z.call(U,ln?"html":"body")[0]:ln?U.documentElement:be},rc=function(A){const U=M?M(A):A.ownerDocument;return W.call(U||A,A,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},Qo=function(A){return A=sl(A,me," "),A=sl(A,Se," "),A=sl(A,ce," "),A},Cs=function(A){var U;A.normalize();const ee=M?M(A):A.ownerDocument,he=W.call(ee||A,A,f.SHOW_TEXT|f.SHOW_COMMENT|f.SHOW_CDATA_SECTION|f.SHOW_PROCESSING_INSTRUCTION,null);let be=he.nextNode();for(;be;)be.data=Qo(be.data),be=he.nextNode();const je=(U=A.querySelectorAll)===null||U===void 0?void 0:U.call(A,"template");je&&Co(je,Ke=>{er(Ke.content)&&Cs(Ke.content)})},rs=function(A){const U=O?O(A):null;return typeof U!="string"||pt(U)!=="form"?!1:typeof A.nodeName!="string"||typeof A.textContent!="string"||typeof A.removeChild!="function"||A.attributes!==C(A)||typeof A.removeAttribute!="function"||typeof A.setAttribute!="function"||typeof A.namespaceURI!="string"||typeof A.insertBefore!="function"||typeof A.hasChildNodes!="function"||A.nodeType!==j(A)||A.childNodes!==S(A)},er=function(A){if(!j||typeof A!="object"||A===null)return!1;try{return j(A)===Vn.documentFragment}catch{return!1}},zr=function(A){if(!j||typeof A!="object"||A===null)return!1;try{return typeof j(A)=="number"}catch{return!1}};function tr(de,A,U){de.length!==0&&Co(de,ee=>{ee.call(t,A,U,Ts)})}const Zd=function(A,U){return!!(Ct&&A.hasChildNodes()&&!zr(A.firstElementChild)&&mn(Bb,A.textContent)&&mn(Bb,A.innerHTML)||Ct&&A.namespaceURI===lt&&o3[U]&&(zr(A.firstElementChild)||typeof A.textContent=="string"&&mn(i3[U],A.textContent))||A.nodeType===Vn.processingInstruction||Ct&&A.nodeType===Vn.comment&&mn(Hb,A.data))},Rs=function(A,U){if(A instanceof RegExp)return mn(A,U);if(A instanceof Function){for(var ee=arguments.length,he=new Array(ee>2?ee-2:0),be=2;be<ee;be++)he[be-2]=arguments[be];return!!A(U,...he)}return!1},sc=function(A,U,ee){if(!jt[U]&&ha(U)&&Rs(at.tagNameCheck,U))return!1;if($n&&!Pt[U]){const he=T(A),be=S(A);if(be&&he){const je=be.length;for(let Ke=je-1;Ke>=0;--Ke){const ct=A===ee?w(be[Ke],!0):be[Ke];he.insertBefore(ct,x(A))}}}return gr(A),!0},Jo=function(A,U,ee,he){return A.length===0?U:U===ee||U===he?Wn(U):U},As=function(A,U){return A===U||T(A)!==null?!1:(Zn&&bn(A),!0)},oc=function(A,U){if(tr(X.beforeSanitizeElements,A,null),As(A,U))return!0;if(rs(A))return gr(A),!0;const ee=pt(q(A));if(De=Jo(X.uponSanitizeElement,De,ht,_t),tr(X.uponSanitizeElement,A,{tagName:ee,allowedTags:De}),As(A,U))return!0;if(Zd(A,ee))return gr(A),!0;if(jt[ee]||!(nt.tagCheck instanceof Function&&nt.tagCheck(ee))&&!De[ee]){const be=sc(A,ee,U);return be===!1&&tr(X.afterSanitizeElements,A,null),be}if(D(A)===Vn.element&&!fa(A)||(ee==="noscript"||ee==="noembed"||ee==="noframes")&&mn(r3,A.innerHTML))return gr(A),!0;if(st&&A.nodeType===Vn.text){const be=Qo(A.textContent);A.textContent!==be&&(rl(t.removed,{element:A.cloneNode()}),A.textContent=be)}return tr(X.afterSanitizeElements,A,null),!1},Xo=function(A,U,ee){if(Ft[U]||tc(U,A)||wn&&(U==="id"||U==="name")&&(ee in n||ee in Zl))return!1;const he=ze[U]||nt.attributeCheck instanceof Function&&nt.attributeCheck(U,A);return Wt&&mn(ke,U)||Mn&&mn($e,U)?!0:he?qe[U]||mn(Ue,sl(ee,He,""))||(U==="src"||U==="xlink:href"||U==="href")&&A!=="script"&&Ib(ee,"data:")===0&&ts[A]||Lr&&!mn(Ge,sl(ee,He,""))?!0:!ee:ha(A)&&Rs(at.tagNameCheck,A)&&Rs(at.attributeNameCheck,U,A)||U==="is"&&at.allowCustomizedBuiltInElements&&Rs(at.tagNameCheck,ee)},et=Qe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ha=function(A){return!et[fl(A)]&&mn(ve,A)},ic=function(A,U,ee,he){if(J&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!ee)switch(g.getAttributeType(A,U)){case"TrustedHTML":return G(he);case"TrustedScriptURL":return Q(he)}return he},pa=function(A,U,ee,he){try{ee?A.setAttributeNS(ee,U,he):A.setAttribute(U,he),rs(A)?gr(A):Nb(t.removed)}catch{Ur(U,A)}},ma=function(A){tr(X.beforeSanitizeAttributes,A,null);const U=A.attributes;if(!U||rs(A))return;ze=Jo(X.uponSanitizeAttribute,ze,$t,cn);const ee={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ze,forceKeepAttr:void 0};let he=U.length;const be=pt(A.nodeName);for(;he--;){const je=U[he],Ke=je.name,ct=je.namespaceURI,nn=je.value,Ot=pt(Ke),ga=nn;let Yt=Ke==="value"?ga:Fz(ga);if(ee.attrName=Ot,ee.attrValue=Yt,ee.keepAttr=!0,ee.forceKeepAttr=void 0,tr(X.uponSanitizeAttribute,A,ee),Yt=ee.attrValue,$r&&(Ot==="id"||Ot==="name")&&Ib(Yt,Fr)!==0&&(Ur(Ke,A,je),Yt=Fr+Yt),Ct&&mn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Yt)){Ur(Ke,A,je);continue}if(Ot==="attributename"&&Ob(Yt,"href")){Ur(Ke,A,je);continue}if(!ee.forceKeepAttr){if(!ee.keepAttr){Ur(Ke,A,je);continue}if(!Mr&&mn(s3,Yt)){Ur(Ke,A,je);continue}if(st&&(Yt=Qo(Yt)),!Xo(be,Ot,Yt)){Ur(Ke,A,je);continue}Yt=ic(be,Ot,ct,Yt),Yt!==ga&&pa(A,Ke,ct,Yt)}}tr(X.afterSanitizeAttributes,A,null)},ao=function(A){let U=null;const ee=rc(A);for(tr(X.beforeSanitizeShadowDOM,A,null);U=ee.nextNode();)if(tr(X.uponSanitizeShadowNode,U,null),oc(U,A),ma(U),er(U.content)&&ao(U.content),D(U)===Vn.element){const he=k(U);er(he)&&(Zo(he),ao(he))}tr(X.afterSanitizeShadowDOM,A,null)},Zo=function(A){const U=[{node:A,shadow:null}];for(;U.length>0;){const ee=U.pop();if(ee.shadow){ao(ee.shadow);continue}
89const he=ee.node,je=D(he)===Vn.element,Ke=S(he);if(Ke)for(let ct=Ke.length-1;ct>=0;--ct)U.push({node:Ke[ct],shadow:null});if(je){const ct=O?O(he):null;if(typeof ct=="string"&&pt(ct)==="template"){const nn=he.content;er(nn)&&U.push({node:nn,shadow:null})}}if(je){const ct=k(he);er(ct)&&U.push({node:null,shadow:ct},{node:ct,shadow:null})}}};return t.sanitize=function(de){let A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=null,ee=null,he=null,be=null;if(Rt=!de,Rt&&(de="<!-->"),typeof de!="string"&&!zr(de)&&(de=Vz(de),typeof de!="string"))throw So("dirty is not a string, aborting");if(!t.isSupported)return de;Jn?(De=_t,ze=cn):Go(A),(X.uponSanitizeElement.length>0||X.uponSanitizeAttribute.length>0)&&(De=Wn(De)),X.uponSanitizeAttribute.length>0&&(ze=Wn(ze)),t.removed=[];const je=Zn&&typeof de!="string"&&zr(de);if(je){Fn(de);const nn=q(de);if(typeof nn=="string"){const Ot=pt(nn);if(!De[Ot]||jt[Ot])throw Ko(de),So("root node is forbidden and cannot be sanitized in-place")}if(rs(de))throw Ko(de),So("root node is clobbered and cannot be sanitized in-place");try{Zo(de)}catch(Ot){throw Ko(de),Ot}}else if(zr(de))U=nc("<!---->"),ee=U.ownerDocument.importNode(de,!0),ee.nodeType===Vn.element&&ee.nodeName==="BODY"||ee.nodeName==="HTML"?U=ee:U.appendChild(ee),Zo(ee);else{if(!qt&&!st&&!ln&&de.indexOf("<")===-1)return J&&mr?G(de):de;if(U=nc(de),!U)return qt?null:mr?ne:""}U&&Xn&&gr(U.firstChild);const Ke=je?de:U;try{const nn=rc(Ke);for(;he=nn.nextNode();)oc(he,Ke),ma(he),er(he.content)&&ao(he.content)}catch(nn){throw je&&(Ko(de),Co(t.removed,Ot=>{Ot.element&&bn(Ot.element)})),nn}if(je)return Co(t.removed,nn=>{nn.element&&bn(nn.element)}),st&&Cs(de),de;if(qt){if(st&&Cs(U),un)for(be=N.call(U.ownerDocument);U.firstChild;)be.appendChild(U.firstChild);else be=U;return(ze.shadowroot||ze.shadowrootmode)&&(be=Y.call(r,be,!0)),be}let ct=ln?U.outerHTML:U.innerHTML;return ln&&De["!doctype"]&&U.ownerDocument&&U.ownerDocument.doctype&&U.ownerDocument.doctype.name&&mn(t3,U.ownerDocument.doctype.name)&&(ct="<!DOCTYPE "+U.ownerDocument.doctype.name+`> 90`+ct),st&&(ct=Qo(ct)),J&&mr?G(ct):ct},t.setConfig=function(){let de=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Go(de),Jn=!0,_t=De,cn=ze},t.clearConfig=function(){Ts=null,Jn=!1,_t=null,cn=null,J=ie,ne=""},t.isValidAttribute=function(de,A,U){Ts||Go({});const ee=pt(de),he=pt(A);return Xo(ee,he,U)},t.addHook=function(de,A){typeof A=="function"&&On(X,de)&&rl(X[de],A)},t.removeHook=function(de,A){if(On(X,de)){if(A!==void 0){const U=Mz(X[de],A);return U===-1?void 0:$z(X[de],U,1)[0]}return Nb(X[de])}},t.removeHooks=function(de){On(X,de)&&(X[de]=[])},t.removeAllHooks=function(){X=Vb()},t}var Ug=rT();const CB=Object.freeze(Object.defineProperty({__proto__:null,default:Ug},Symbol.toStringTag,{value:"Module"}));Ug.addHook("uponSanitizeElement",(e,t)=>{if(t.tagName==="iframe"){const n=e;(n.getAttribute("src")||"").match(/^https:\/\/(www\.)?(youtube\.com|youtube-nocookie\.com)\/embed\//)?n.setAttribute("referrerpolicy","strict-origin-when-cross-origin"):e.parentNode?.removeChild(e)}});function c3(e){return Ug.sanitize(e,{ADD_TAGS:["iframe"],ADD_ATTR:["allow","allowfullscreen","frameborder","src","title","loading","referrerpolicy"]})}function Cp(e){return vn(new Date(`1970-01-01T${e}`),"h:mmaaa")}const u3="Europe/London",d3=(e=new Date)=>{const t=new Intl.DateTimeFormat("en-GB",{timeZone:u3,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(e),n=r=>t.find(o=>o.type===r)?.value??"00";return{date:`${n("year")}-${n("month")}-${n("day")}`,time:`${n("hour")}:${n("minute")}:${n("second")}`}},f3=e=>{const[t="00",n="00",r="00"]=e.split(":"),o=r.split(".")[0].slice(0,2)||"00";return[t,n,o].map(a=>a.padStart(2,"0")).join(":")},ju=(e,t)=>{const n=f3(e.time),r=e.date<t.date,o=e.date===t.date&&n<t.time;return{isHidden:r,isDisabled:o}},Wb=()=>{const{slug:e}=cO(),t=no(),[n,r]=y.useState(!1),[o,a]=y.useState(0),[l,u]=y.useState(()=>new Date),{data:f,isLoading:h}=Sn({queryKey:["production",e],queryFn:async()=>{let L=Me.from("productions").select(` 91 *, 92 production_images(*), 93 company:companies(id, name, logo_url, slug) 94 `);e?.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i)?L=L.eq("id",e):L=L.eq("slug",e);const{data:Q,error:te}=await L.single();if(te)throw te;return Q},enabled:!!e}),m=f?.is_cancelled===!0;y.useEffect(()=>{!e||h||f||Me.rpc("record_not_found",{p_path:window.location.pathname,p_referrer:document.referrer||null}).then(({error:L})=>{L&&console.warn("Failed to log 404:",L.message)})},[e,h,f]);const{data:g}=Sn({queryKey:["showtimes",f?.id],queryFn:async()=>{const{data:L,error:G}=await Me.from("showtimes").select(` 95 *, 96 showtime_pricing( 97 pricing:production_pricing(*) 98 ) 99 `).eq("production_id",f?.id).order("date",{ascending:!0}).order("time",{ascending:!0});if(G)throw G;return L||[]},enabled:!!f?.id}),{data:b}=Sn({queryKey:["production-pricing",f?.id],queryFn:async()=>{const{data:L,error:G}=await Me.from("production_pricing").select("id, category_name, price, description, display_order").eq("production_id",f?.id).order("display_order");if(G)throw G;return L||[]},enabled:!!f?.id}),{data:w}
99=Sn({queryKey:["production-videos",f?.id],queryFn:async()=>{const{data:L,error:G}=await Me.from("production_videos").select("*").eq("production_id",f?.id).order("display_order");if(G)throw G;return L||[]},enabled:!!f?.id}),E=y.useMemo(()=>f?.production_images?.filter(L=>L.image_type==="carousel")||[],[f?.production_images]),x=y.useMemo(()=>f?.production_images?.find(L=>L.image_type==="banner"),[f?.production_images]),S=y.useMemo(()=>{const L=[];return E.forEach(G=>{L.push({type:"image",url:G.image_url,alt:G.alt_text||f?.title})}),w?.forEach(G=>{const Q=Sm(G.youtube_url);Q&&L.push({type:"video",url:G.youtube_url,videoId:Q,title:G.title||f?.title})}),L},[E,w,f?.title]),T=y.useCallback(L=>{a(L),r(!0)},[]),k=(L,G)=>{if(!L)return;let Q="";try{Q=new URL(L).hostname}catch{Q=""}Ja("outbound_click",{link_url:L,link_domain:Q,link_text:"Buy Tickets",production_id:f?.id,production_title:f?.title,showtime_id:G,transport_type:"beacon"})},C=y.useMemo(()=>d3(l),[l]),j=y.useMemo(()=>{const L=f?.running_time;if(!L)return null;const G=/(\d+)\s*(h|hr|hour)/i.exec(L),Q=/(\d+)\s*(m|min)/i.exec(L);if(G||Q)return(G?parseInt(G[1],10)*60:0)+(Q?parseInt(Q[1],10):0);const te=/(\d+)/.exec(L);return te?parseInt(te[1],10):null},[f?.running_time]),O=y.useMemo(()=>{const L=(g||[]).flatMap(Q=>(Q.showtime_pricing||[]).map(te=>parseFloat(te.pricing?.price??"0"))),G=(b||[]).map(Q=>parseFloat(String(Q.price??"0")));return[...L,...G].filter(Q=>!Number.isNaN(Q))},[g,b]),M=y.useMemo(()=>{if(O.length===0)return null;const L=Math.min(...O),G=Math.max(...O);return L<=0&&G<=0?"Free":L===G?`£${L.toFixed(2)}`:`£${L.toFixed(2)} to £${G.toFixed(2)}`},[O]),D=y.useMemo(()=>(g||[]).filter(L=>!ju(L,C).isHidden),[g,C]),q=!!g&&g.length>0&&D.length===0,J=y.useMemo(()=>{if(!g||g.length===0)return null;const L=D.length>0?D:g,G=Mi(L[0].date),Q=Mi(L[L.length-1].date);return G.getTime()===Q.getTime()?vn(G,"EEEE d MMMM yyyy"):`${vn(G,"d MMMM")} to ${vn(Q,"d MMMM yyyy")}`},[g,D]),{data:ne}=Sn({queryKey:["current-productions-alternatives",f?.id],queryFn:async()=>{const L=new Date().toISOString().split("T")[0],{data:G}=await Me.from("showtimes").select("date, productions!inner(id, title, slug, is_cancelled)").gte("date",L).order("date",{ascending:!0}).limit(40),Q=new Set,te=[];for(const B of G||[]){const F=B.productions;if(!(!F||F.is_cancelled||F.id===f?.id||Q.has(F.id))&&(Q.add(F.id),te.push({id:F.id,title:F.title,slug:F.slug}),te.length>=4))break}return te},enabled:!!f?.id&&(q||m)}),ie=L=>{Ja("venue_info_click",{link_target:L,production_id:f?.id,production_title:f?.title})},re=y.useMemo(()=>{if(!f||!g||g.length===0)return null;const L=`${Tt}/shows/${f.slug}`,G=(f.description||f.synopsis||"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim().slice(0,300);return bz({title:f.title,description:G,url:L,imageUrl:x?.image_url?dr(x.image_url):null,durationMinutes:j,ageGuidance:f.age_guidance,companyName:f.company?.name||f.company||null,cancelled:m,performances:g.map(Q=>{const te=(Q.showtime_pricing||[]).map(N=>parseFloat(N.pricing?.price??"0")).filter(N=>!Number.isNaN(N)),B=(b||[]).map(N=>parseFloat(String(N.price??"0"))).filter(N=>!Number.isNaN(N)),F=te.length>0?te:B,W=ju(Q,C);return{date:Q.date,time:Q.time,price:F.length>0?Math.min(...F):void 0,bookingUrl:Q.external_url||L,bookable:!W.isHidden&&!W.isDisabled&&!m}})})},[f,g,b,x,j,m,C]);y.useEffect(()=>{if(f){const L=g?.flatMap(Q=>Q.showtime_pricing?.map(te=>parseFloat(te.pricing?.price||0))||[])||[],G=L.length>0?Math.min(...L):0;fI({id:f.id,name:f.title,category:"Theatre",price:G})}},[f,g]),y.useEffect(()=>{window.scrollTo(0,0)},[e]),y.useEffect(()=>{const L=window.setInterval(()=>{u(new Date)},3e4);return()=>{window.clearInterval(L)}},[]);const pe=y.useMemo(()=>{if(!f)return;const L=[];return re&&L.push(re),L.push($g([{name:"What's On",href:"/shows"},{name:f.title,href:`/shows/${f.slug}`}
99])),L},[f,re]);return h?d.jsxs("div",{className:"min-h-screen flex flex-col",children:[d.jsx(Lo,{}),d.jsx("div",{className:"flex-1 flex justify-center items-center py-24",children:d.jsx(Zs,{className:"h-8 w-8 animate-spin text-muted-foreground"})}),d.jsx(Mo,{})]}):f?d.jsxs("div",{className:"min-h-screen flex flex-col",children:[f&&d.jsx(Yd,{title:m?`${f.title} (cancelled)`:q?`${f.title} (past production)`:`${f.title}${J?` â ${J}`:""}`,description:m?`${f.title} at The Abbey Theatre, Nuneaton has been cancelled. See what else is on.`:q?`${f.title} has finished its run at The Abbey Theatre, Nuneaton. Booking has ended â see what's on now.`:`${f.title} at The Abbey Theatre, Nuneaton${J?`, ${J}`:""}${M?`. Tickets ${M}`:""}. Book online or call the box office.`.slice(0,158),canonicalPath:`/shows/${f.slug}`,ogType:"event",ogImage:x?.image_url?dr(x.image_url):void 0,jsonLd:pe}),d.jsx(Lo,{}),d.jsx("main",{className:"py-12 lg:py-16",children:d.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[d.jsxs("div",{className:"flex items-center justify-between mb-6",children:[d.jsxs(Ce,{variant:"ghost",onClick:()=>t("/shows"),children:[d.jsx(_R,{className:"h-4 w-4 mr-2"}),"Back to Shows"]}),f.company?.logo_url&&d.jsx(Ae,{to:`/company/${f.company.slug}`,className:"shrink-0",children:d.jsx("img",{src:dr(f.company.logo_url),alt:f.company.name,className:"h-12 max-w-[120px] object-contain"})})]}),d.jsxs("div",{className:"grid gap-12 lg:grid-cols-2",children:[d.jsx("div",{className:"space-y-4",children:x?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"overflow-hidden rounded-lg",children:d.jsx(dd,{src:dr(x.image_url),alt:x.alt_text||`${f.title} at The Abbey Theatre, Nuneaton`,loading:"eager",fetchPriority:"high",aspectRatio:"aspect-video",className:"h-full w-full object-cover",objectPosition:x.crop_x==null?`${x.image_position_x??50}% ${x.image_position_y??50}%`:void 0,imageScale:x.crop_x==null?x.image_scale??100:void 0,showSkeleton:!0})}),S.length>0&&d.jsx("div",{className:"grid grid-cols-4 gap-4",children:S.slice(0,4).map((L,G)=>d.jsxs("button",{onClick:()=>T(G),className:"relative overflow-hidden rounded-lg cursor-pointer transition-transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:[L.type==="image"?d.jsx(dd,{src:dr(L.url),alt:L.alt||f.title,loading:"lazy",aspectRatio:"aspect-square",className:"h-full w-full object-cover",showSkeleton:!0}):d.jsxs(d.Fragment,{children:[d.jsx("img",{src:Fg(L.videoId||"","medium"),alt:L.title||"Video",className:"w-full aspect-square object-cover",loading:"lazy"}),d.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30",children:d.jsx("div",{className:"w-8 h-8 rounded-full bg-red-600 flex items-center justify-center",children:d.jsx(Wu,{className:"w-4 h-4 text-white fill-white ml-0.5"})})})]}),G===3&&S.length>4&&d.jsxs("div",{className:"absolute inset-0 bg-black/60 flex items-center justify-center text-white font-semibold text-lg",children:["+",S.length-4]})]},G))})]}):d.jsx("div",{className:"aspect-video rounded-lg bg-muted flex items-center justify-center",children:d.jsx("span",{className:"text-muted-foreground",children:"No image available"})})}),d.jsx(Rz,{items:S,isOpen:n,onOpenChange:r,initialIndex:o,productionTitle:f.title}),d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-4xl font-bold tracking-tight lg:text-5xl",children:f.title}),d.jsxs("div",{className:"mt-4 flex flex-wrap gap-4 text-muted-foreground",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(yl,{className:"h-4 w-4"}),d.jsx("span",{children:f.running_time})]}),f.age_guidance?.trim()&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Mx,{className:"h-4 w-4"}),d.jsxs("span",{children:["Guide: ",f.age_guidance]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(zx,{className:"h-4 w-4"}),d.jsx("span",{children:"The Abbey Theatre, Nuneaton"}),f.company&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"mx-1",children:"â¢"}),d.jsx(Ae,{to:`/company/${f.company.slug}`,className:"text-primary hover:underline",children:f.company.name})]})]})]}),d.jsx("div",{className:"mt-4",children:d.jsx(Tz,{title:f.title,de
99scription:f.synopsis?.substring(0,100)||f.description?.substring(0,100)})}),!m&&!q&&D.length>0&&d.jsxs("div",{className:"mt-6",children:[d.jsx(Ce,{size:"lg",className:"w-full sm:w-auto",onClick:()=>{Ja("book_tickets_click",{production_id:f.id,production_title:f.title,booking_route:"scroll_to_dates"});const L=document.getElementById("performance-dates");if(L){const Q=L.getBoundingClientRect().top+window.scrollY-96;window.scrollTo({top:Q,behavior:"smooth"})}},children:"Book tickets"}),M&&d.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["Tickets ",M]})]})]}),m&&d.jsxs("div",{className:"mb-6 rounded-lg border border-destructive/40 bg-destructive/10 p-4 text-destructive",children:[d.jsx("p",{className:"font-semibold",children:"This production has been cancelled."}),d.jsx("p",{className:"mt-1 text-sm",children:"Online booking is no longer available. Existing orders are being retained while we arrange next steps."})]}),!m&&q&&d.jsxs("div",{className:"mb-6 rounded-lg border bg-muted/40 p-4",children:[d.jsx("p",{className:"font-semibold",children:"Booking has ended for this production."}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"This run has finished. You can still read about it below, or see whatâs on now."})]}),d.jsxs("section",{"aria-labelledby":"at-a-glance",className:"rounded-lg border bg-card p-6",children:[d.jsx("h2",{id:"at-a-glance",className:"text-xl font-semibold mb-4",children:"At a glance"}),d.jsxs("dl",{className:"grid gap-x-8 gap-y-3 sm:grid-cols-2 text-sm",children:[J&&d.jsxs("div",{children:[d.jsx("dt",{className:"font-medium",children:"Dates"}),d.jsx("dd",{className:"text-muted-foreground",children:J})]}),D.length>0&&d.jsxs("div",{children:[d.jsx("dt",{className:"font-medium",children:"Start times"}),d.jsx("dd",{className:"text-muted-foreground",children:[...new Set(D.map(L=>Cp(L.time)))].join(", ")})]}),f.running_time?.trim()&&d.jsxs("div",{children:[d.jsx("dt",{className:"font-medium",children:"Running time"}),d.jsx("dd",{className:"text-muted-foreground",children:f.running_time})]}),f.interval_info?.trim()&&d.jsxs("div",{children:[d.jsx("dt",{className:"font-medium",children:"Interval"}),d.jsx("dd",{className:"text-muted-foreground",children:f.interval_info})]}),M&&d.jsxs("div",{children:[d.jsx("dt",{className:"font-medium",children:"Tickets"}),d.jsx("dd",{className:"text-muted-foreground",children:M})]}),f.age_guidance?.trim()&&d.jsxs("div",{children:[d.jsx("dt",{className:"font-medium",children:"Age guidance"}),d.jsx("dd",{className:"text-muted-foreground",children:f.age_guidance})]}),(f.company?.name||f.company)&&d.jsxs("div",{children:[d.jsx("dt",{className:"font-medium",children:"Presented by"}),d.jsx("dd",{className:"text-muted-foreground",children:f.company?.slug?d.jsx(Ae,{to:`/company/${f.company.slug}`,className:"text-primary hover:underline",children:f.company.name}):f.company?.name||f.company})]}),d.jsxs("div",{className:"sm:col-span-2",children:[d.jsx("dt",{className:"font-medium",children:"Venue"}),d.jsx("dd",{className:"text-muted-foreground",children:kz})]}),d.jsxs("div",{className:"sm:col-span-2",children:[d.jsx("dt",{className:"font-medium",children:"Booking"}),d.jsx("dd",{className:"text-muted-foreground",children:m?"Cancelled â online booking is closed.":q?"Booking has ended for this production.":`Book online below, or call the box office on ${Ao.phone} (${Ao.boxOfficeHours}).`})]})]})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"About this show"}),d.jsx("div",{className:"prose prose-sm max-w-none text-muted-foreground prose-headings:text-foreground prose-strong:text-foreground",dangerouslySetInnerHTML:{__html:c3(f.synopsis||"")}})]}),g&&g.length>0&&(()=>{const L=f.booking_visibility||"visible",G=f.booking_opens_at?new Date(f.booking_opens_at):null,Q=L==="hidden",te=L==="scheduled"&&G&&l<G,B=m||!Q&&!te,F=g.filter(W=>!ju(W,C).isHidden);return d.jsxs("div",{id:"performance-dates",children:[d.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Performance Dates"}),te&&G&&d.jsx("div",{className:"mb-4 p-4 bg-muted rounded-lg border",children:d.jsxs("p",{className:"text-sm text-muted-foreground",children:[d.jsx(OR,{className:"inline-block h-4 w-4 mr-2"}),"Booking opens on ",vn(G,"EEEE, MMMM d, yyyy")," at ",vn(G,"h:mmaaa")]})}),d.jsxs("div",{className:"space-y-3",children:[F.length===0&&d.jsx("div",{className:"p-4 border rounded-lg bg-muted/30 text-sm text-muted-foreground",children:"There are no performance dates currently available to book online."}),F.map(W=>{const N=ju(W,C),z=W.showtime_pricing&&W.showtime_pricing.length>0?W.showtime_pricing:(b||[]).map(ce=>({pricing:ce})),Y=z.length>0,X=Y&&z.every(ce=>parseFloat(ce.pricing?.price||0)<=0),me=m||N.isDisabled||!Y&&!W.external_url,Se=m?"Cancelled":N.isDisabled?"Performance Started":W.external_url?"Book Now":Y?X?"Free":"Buy Tickets":"Contact Us";return d.jsxs("div",{className:`flex items-center justify-between p-4 border rounded-lg ${me?"bg-muted/30 border-muted text-muted-foreground":""}`,children:[d.jsxs("div",{className:"flex-1",children:[d.jsx("div",{className:`font-medium ${me?"text-muted-foreground":""}`,children:vn(Mi(W.date),"EEEE, MMMM d, yyyy")}),d.jsx("div",{className:"text-sm text-muted-foreground",children:Cp(W.time)}
99)]}),d.jsxs("div",{className:"flex items-center gap-4",children:[B&&!W.external_url&&d.jsxs("div",{className:"text-right text-sm",children:[d.jsx("div",{className:"mb-1",children:W.seating_type==="general_seating"&&d.jsx(Do,{variant:"outline",className:"mb-1",children:"General Seating"})}),z.length>0&&d.jsx(d.Fragment,{children:z.map((ce,ke)=>{const $e=parseFloat(ce.pricing?.price||0);return d.jsxs("div",{children:[ce.pricing?.category_name,": ",$e===0?"Free":`£${$e.toFixed(2)}`]},ke)})})]}),B&&d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsx(Ce,{"aria-label":`${Se} for ${f.title} on ${vn(Mi(W.date),"EEEE d MMMM yyyy")} at ${Cp(W.time)}`,onClick:()=>{me||(Ja("select_performance",{production_id:f.id,production_title:f.title,showtime_id:W.id,performance:`${W.date} ${W.time}`}),Ja("book_tickets_click",{production_id:f.id,production_title:f.title,showtime_id:W.id,booking_route:W.external_url?"external":W.seating_type==="general_seating"?"general_seating":"seat_selection"}),W.external_url?(k(W.external_url,W.id),window.open(W.external_url,"_blank")):W.seating_type==="general_seating"?t(`/general-seating/${W.id}`):t(`/seat-selection/${W.id}`))},disabled:me,variant:me?"outline":"default",children:Se}),W.external_url&&d.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:W.external_url.toLowerCase().includes("ticketsource")?"Ticketsource":"Other site"}),m?d.jsx("span",{className:"text-xs text-destructive mt-1",children:"This production has been cancelled."}):N.isDisabled&&d.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Online booking has closed for this performance."})]})]})]},W.id)})]})]})})(),d.jsxs("section",{"aria-labelledby":"plan-your-visit",className:"rounded-lg border p-6",children:[d.jsx("h2",{id:"plan-your-visit",className:"text-xl font-semibold mb-3",children:"Planning your visit"}),d.jsxs("ul",{className:"space-y-2 text-sm text-muted-foreground",children:[d.jsx("li",{children:nl.arrival}),d.jsx("li",{children:nl.bar}),d.jsx("li",{children:nl.parking}),d.jsx("li",{children:nl.transport}),d.jsx("li",{children:f.accessibility_notes?.trim()||nl.accessibility})]}),d.jsxs("div",{className:"mt-4 flex flex-wrap gap-4 text-sm",children:[d.jsx(Ae,{to:"/visit",className:"text-primary hover:underline",onClick:()=>ie("visit"),children:"Getting here & parking"}),d.jsx(Ae,{to:"/accessibility",className:"text-primary hover:underline",onClick:()=>ie("accessibility"),children:"Accessibility"}),d.jsx(Ae,{to:"/box-office",className:"text-primary hover:underline",onClick:()=>ie("box-office"),children:"Box office"}),d.jsx(Ae,{to:"/things-to-do-in-nuneaton",className:"text-primary hover:underline",onClick:()=>ie("things-to-do"),children:"Things to do in Nuneaton"})]})]})]})]}),(q||m)&&(ne?.length??0)>0&&d.jsxs("section",{"aria-labelledby":"whats-on-now",className:"mt-16 border-t pt-8",children:[d.jsx("h2",{id:"whats-on-now",className:"text-2xl font-semibold mb-4",children:"Whatâs on now"}),d.jsx("ul",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:ne.map(L=>d.jsx("li",{children:d.jsx(Ae,{to:`/shows/${L.slug}`,className:"block rounded-lg border p-4 hover:border-primary hover:text-primary transition-colors",children:L.title})},L.id))}),d.jsx("p",{className:"mt-4 text-sm",children:d.jsx(Ae,{to:"/shows",className:"text-primary hover:underline",children:"See the full Whatâs On listing"})})]})]})}),d.jsx(Mo,{})]}):d.jsxs("div",{className:"min-h-screen flex flex-col",children:[d.jsx(Lo,{}),d.jsxs("div",{className:"flex-1 mx-auto max-w-7xl px-4 py-24 text-center",children:[d.jsx("h1",{className:"text-4xl font-bold",children:"Show not found"}),d.jsx("p",{className:"mt-4 text-muted-foreground",children:"The show you're looking for doesn't exist."})]}),d.jsx(Mo,{})]})},h3=({children:e})=>{const t=Vt(),n=no(),[r,o]=y.useState(!0),[a,l]=y.useState(!1);return y.useEffect(()=>{const u=async m=>{const{data:g,error:b}=await Me.from("url_redirects").select("id, new_path, redirect_type").eq("is_active",!0).ilike("old_path",m).maybeSingle();if(b)throw b;return g},f=async m=>{const g=m.match(/^\/events\/([^/]+)\/?$/i);if(!g)return null;const w=decodeURIComponent(g[1]).toLowerCase().split("-ondate-")[0].replace(/-+$/,"");if(w){const{data:E}=await Me.from("productions").select("slug").ilike("slug",w).maybeSingle();if(E?.slug)return`/shows/${E.slug}`}return"/shows"};(async()=>{try{const m=t.pathname;
99let g=await u(m);if(!g&&m.length>1&&m.endsWith("/")&&(g=await u(m.replace(/\/+$/,""))),g){await Me.rpc("increment_redirect_hit",{p_old_path:m}),n(g.new_path,{replace:!0});return}const b=await f(m);if(b){n(b,{replace:!0});return}Me.rpc("record_not_found",{p_path:m,p_referrer:document.referrer||null}).then(({error:w})=>{w&&console.warn("Failed to log 404:",w.message)}),l(!0)}catch(m){console.error("Redirect check failed:",m),l(!0)}finally{o(!1)}})()},[t.pathname,n]),r?d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:d.jsx("div",{className:"animate-pulse text-muted-foreground",children:"Loading..."})}):a?d.jsx(d.Fragment,{children:e}):null},p3=()=>{const e=Vt();return y.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),d.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[d.jsx(Lo,{}),d.jsx("main",{className:"flex-1 flex items-center justify-center",children:d.jsxs("div",{className:"text-center",children:[d.jsx("h1",{className:"mb-4 text-6xl font-bold text-primary",children:"404"}),d.jsx("p",{className:"mb-6 text-xl text-muted-foreground",children:"Oops! Page not found"}),d.jsx(Ce,{asChild:!0,children:d.jsx(Ae,{to:"/",children:"Return to Home"})})]})}),d.jsx(Mo,{})]})},m3=()=>d.jsx(h3,{children:d.jsx(p3,{})}),g3=y.lazy(()=>oe(()=>import("./PastEvents-Dl64sxOt.js"),[])),y3=y.lazy(()=>oe(()=>import("./About-ZtDSy_g3.js"),__vite__mapDeps([0,1,2]))),v3=y.lazy(()=>oe(()=>import("./Visit-I_sdM8cb.js"),__vite__mapDeps([3,4,5,6]))),w3=y.lazy(()=>oe(()=>import("./Support-_fYxCRlZ.js"),__vite__mapDeps([7,1,8]))),b3=y.lazy(()=>oe(()=>import("./Accessibility-CPhyf-2M.js"),__vite__mapDeps([9,5]))),x3=y.lazy(()=>oe(()=>import("./Auth--AygLpOO.js"),__vite__mapDeps([10,11]))),_3=y.lazy(()=>oe(()=>import("./ResetPassword-BGFI-d72.js"),[])),S3=y.lazy(()=>oe(()=>import("./MyTickets-_l5g3OFa.js"),__vite__mapDeps([12,11,13,14,6,15]))),E3=y.lazy(()=>oe(()=>import("./MyAccount-B3W76FNC.js"),__vite__mapDeps([16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,6,1,8,31,32,33,34,35]))),k3=y.lazy(()=>oe(()=>import("./VenueHire-DiMI5Y_R.js"),__vite__mapDeps([36,2]))),T3=y.lazy(()=>oe(()=>import("./BoxOffice-Bal8LqYp.js"),__vite__mapDeps([37,4]))),C3=y.lazy(()=>oe(()=>import("./Facilities-DIoILW3d.js"),__vite__mapDeps([38,1,2]))),R3=y.lazy(()=>oe(()=>import("./ConditionsOfHire-DIC4--ex.js"),__vite__mapDeps([39,40,4]))),qb=y.lazy(()=>oe(()=>import("./ArtsDirectory-BT6081Ue.js"),__vite__mapDeps([41,23,24,25,26,42,29,43,2,44]))),A3=y.lazy(()=>oe(()=>import("./SuggestListing-B4Qc-qa8.js"),__vite__mapDeps([45,46,23,24,25,26,47,48,49,50,35]))),j3=y.lazy(()=>oe(()=>import("./Company-FN0N8vA8.js"),__vite__mapDeps([51,2,6,5,52]))),P3=y.lazy(()=>oe(()=>import("./StaffArea-1LOtU9SW.js"),__vite__mapDeps([53,40,15]))),N3=y.lazy(()=>oe(()=>import("./BecomeVolunteer-PMbXPbT5.js"),__vite__mapDeps([54,17,46,18,55,56,19,1,57,58,35]))),O3=y.lazy(()=>oe(()=>import("./Gallery-De5t9zcH.js"),[])),I3=y.lazy(()=>oe(()=>import("./Members-CN4U9BH5.js"),__vite__mapDeps([59,40,15]))),D3=y.lazy(()=>oe(()=>import("./MemberSignup-DYzyBw_K.js"),__vite__mapDeps([60,17,46,18,56,19,58,35]))),L3=y.lazy(()=>oe(()=>import("./SeatSelection-DOce3ysI.js"),__vite__mapDeps([61,62]))),M3=y.lazy(()=>oe(()=>import("./GeneralSeating-C_yg-YgZ.js"),__vite__mapDeps([63,64,65,29]))),$3=y.lazy(()=>oe(()=>import("./Basket-D_1A007f.js"),__vite__mapDeps([66,23,24,25,26,56,64]))),F3=y.lazy(()=>oe(()=>import("./CustomPage-Cb0IEkbL.js"),[])),U3=y.lazy(()=>oe(()=>import("./PrivacyPolicy-B-_4M_91.js"),[])),z3=y.lazy(()=>oe(()=>import("./TermsOfService-U8jSh3it.js"),[])),B3=y.lazy(()=>oe(()=>import("./DataDeletion-DD9AX5HS.js"),[])),H3=y.lazy(()=>oe(()=>import("./CookiePolicy-PvJOmJlw.js"),[])),V3=y.lazy(()=>oe(()=>import("./MeetTheTeam-BHB3Xt6i.js"),[])),W3=y.lazy(()=>oe(()=>import("./PoliciesProcedures-ThQQQ65V.js"),__vite__mapDeps([67,40,15,6]))),q3=y.lazy(()=>oe(()=>import("./Sitemap-X6WaQN7v.js"),[])),G3=y.lazy(()=>oe(()=>import("./TechnicalInformation-D9F3mEo4.js"),__vite__mapDeps([68,56,15,6,58]))),K3=y.lazy(()=>oe(()=>import("./Safeguarding-uBArKInZ.js"),__vite__mapDeps([69,46,56,70,40,2,71,6]))),Y3=y.lazy(()=>oe(()=>import("./Marketing-DDXxfSI6.js"),__vite__mapDeps([72,56,73,58,74,49,6]))),Q3=y.lazy(()=>oe(()=>import("./PaymentSuccess-BUrE6Fl5.js"),__vite__mapDeps([75,74]))),J3=y.lazy(()=>oe(()=>import("./PaymentCancelled-DNmqkHoL.js"),__vite__mapDeps([76,77]))),X3=y.lazy(()=>oe(()=>import("./TicketLottery-DzURht6D.js"),__vite__mapDeps([78,18,79,24,80,8,26,25,31,48,40]))),Z3=y.lazy(()=>oe(()=>import("./News-BUC3vLMx.js"),__vite__mapDeps([81,82]))),e5=y.lazy(()=>oe(()=>import("./NewsArticle-DSrc0hZJ.js"),__vite__mapDeps([83,27]))),t5=y.lazy(()=>oe(()=>import("./NewsTag-bjyhDhfN.js"),__vite__mapDeps([84,82]))),n5=y.lazy(()=>oe(()=>import("./Unsubscribe-CpN_wVIh.js"),__vite__mapDeps([85,74,77]))),Gb=y.lazy(()=>oe(()=>import("./TagShows-7GbwwvOG.js"),[])),r5=y.lazy(()=>oe(()=>import("./AdminLogin-Bs12qixq.js"),[])),s5=y.lazy(()=>oe(()=>import("./Admin-BOJ9IV6r.js"),__vite__mapDeps([86,87,23,24,25,26,29,88,89,73,57,90,91]))),Kb=y.lazy(()=>oe(()=>import("./AdminProductionForm-CN0AHcg9.js"),__vite__mapDeps([92,46,93,20,21,94,23,24,25,26,95,43,52,65,29,49,11,18,19,55,42,58,96,97,47,62,30,15,98,50,99,100,101,102]))),o5=y.lazy(()=>oe(()=>import("./AdminSeatingPlans-Ff4QKysg.js"),__vite__mapDeps([103,19,29,102,34]))),Yb=y.lazy(()=>oe(()=>
99import("./AdminSeatingPlanForm-BjaBRTai.js"),[])),i5=y.lazy(()=>oe(()=>import("./AdminHeroCarousel-CukoygG9.js"),__vite__mapDeps([104,46,96,24,97,47,62,30,22,23,25,26,19,29,50,49,28,34,33,90]))),a5=y.lazy(()=>oe(()=>import("./AdminBackfillImageCrops-DzOYE7it.js"),__vite__mapDeps([105,97,47]))),l5=y.lazy(()=>oe(()=>import("./AdminTicketSales-CGo4GFjd.js"),__vite__mapDeps([106,23,24,25,26,107,79,50,40]))),c5=y.lazy(()=>oe(()=>import("./AdminConfig-C7b_YqNA.js"),__vite__mapDeps([108,11,109,74,77,110,33,34,30,48,23,24,25,26,107,29]))),u5=y.lazy(()=>oe(()=>import("./AdminDiscountCodes-aDMmbKgM.js"),__vite__mapDeps([111,46,23,24,25,26,99,100,101,95,29,90]))),d5=y.lazy(()=>oe(()=>import("./AdminPages-CEEX4Do3.js"),__vite__mapDeps([112,87,107,29,89,33,34,90]))),Qb=y.lazy(()=>oe(()=>import("./AdminPageForm-Cg5EnNy8.js"),__vite__mapDeps([113,46,93,20,21,94,23,24,25,26,95,43,52,65,29,49]))),f5=y.lazy(()=>oe(()=>import("./AdminShowAdmins-HL8BfTmv.js"),__vite__mapDeps([114,23,24,25,26,18,29,115]))),h5=y.lazy(()=>oe(()=>import("./AdminUsers-Bs91y9pc.js"),__vite__mapDeps([116,11,23,24,25,26,19,110,1,6,70,32]))),p5=y.lazy(()=>oe(()=>import("./AdminCommunicationPreferences-DLC0vsgU.js"),__vite__mapDeps([117,46,29,118,90]))),m5=y.lazy(()=>oe(()=>import("./AdminMemberships-B-K0mQvR.js"),__vite__mapDeps([119,11,107,19,46,15,6,42,88,118,26,25]))),g5=y.lazy(()=>oe(()=>import("./AdminTeam-3H-c0ye0.js"),__vite__mapDeps([120,80,19,29,28,25,115,90]))),y5=y.lazy(()=>oe(()=>import("./AdminTeamGroupForm-CT5Uw_q2.js"),__vite__mapDeps([121,30]))),v5=y.lazy(()=>oe(()=>import("./AdminTeamMemberForm-CegGqSew.js"),__vite__mapDeps([122,46,23,24,25,26,47,50,30]))),w5=y.lazy(()=>oe(()=>import("./AdminGallery-8m1W98Lj.js"),__vite__mapDeps([123,47,29,49,26,25,50,90]))),b5=y.lazy(()=>oe(()=>import("./AdminPolicies-BnLCFmd0.js"),__vite__mapDeps([124,46,22,19,80,29,28,40,90,50,26,25]))),x5=y.lazy(()=>oe(()=>import("./AdminMeetingMinutes-DldoQ8ro.js"),__vite__mapDeps([125,46,22,19,29,40,15,90]))),_5=y.lazy(()=>oe(()=>import("./AdminJobDescriptions-Dxt6z6yH.js"),__vite__mapDeps([126,22,46,80,26,29,25,40,15,50,90]))),S5=y.lazy(()=>oe(()=>import("./AdminVolunteers-D4uzsI-b.js"),__vite__mapDeps([127,22,46,11,18,80,27,42,6,26,25,5,40]))),E5=y.lazy(()=>oe(()=>import("./AdminCompanies-DqnWyPdT.js"),__vite__mapDeps([128,11,29,129,2,6,44,90]))),Jb=y.lazy(()=>oe(()=>import("./AdminCompanyForm-B0l3CUVi.js"),__vite__mapDeps([130,46,23,24,25,26,47,129,6,2,50]))),k5=y.lazy(()=>oe(()=>import("./AdminCompanyReviews-C5CmjSW7.js"),__vite__mapDeps([131,46,29,90]))),T5=y.lazy(()=>oe(()=>import("./AdminDirectoryCategories-ZeFsKqON.js"),__vite__mapDeps([132,23,24,25,26,29,90]))),C5=y.lazy(()=>oe(()=>import("./AdminContainers-BKTvhr9r.js"),__vite__mapDeps([133,40,50]))),R5=y.lazy(()=>oe(()=>import("./AdminMarketingPreferences-AO_Mz4kL.js"),__vite__mapDeps([134,23,24,25,26,107,6]))),A5=y.lazy(()=>oe(()=>import("./AdminImportMembers-BRMjMUFS.js"),__vite__mapDeps([135,107,74,50]))),j5=y.lazy(()=>oe(()=>import("./AdminImportVolunteers-DMzkwAxs.js"),__vite__mapDeps([136,107,74,50]))),P5=y.lazy(()=>oe(()=>import("./AdminTicketLottery-DTR_TBYs.js"),__vite__mapDeps([137,11,27,31,30,91,93,20,21,94,23,24,25,26,95,43,52,65,29,49,107,15]))),N5=y.lazy(()=>oe(()=>import("./AdminNews-DDE5Okzo.js"),__vite__mapDeps([138,107,87,29,89,90]))),Xb=y.lazy(()=>oe(()=>import("./AdminNewsForm-DMCM1n8O.js"),__vite__mapDeps([139,46,93,20,21,94,23,24,25,26,95,43,52,65,29,49,47,57,50]))),O5=y.lazy(()=>oe(()=>import("./AdminNewsTags-DlzJ8s88.js"),__vite__mapDeps([140,107,29,90]))),I5=y.lazy(()=>oe(()=>import("./AdminAnalytics-B03RR_7i.js"),__vite__mapDeps([141,18,99,100,101,95,23,24,25,26,107,142,94,21,109,88,118,48,77,110]))),D5=y.lazy(()=>oe(()=>import("./AdminLlmWork-CDhYbLCe.js"),__vite__mapDeps([143,107,11,23,24,25,26,110,33]))),L5=y.lazy(()=>oe(()=>import("./AdminFunctions-Bk9JG0wI.js"),__vite__mapDeps([144,107,110]))),M5=y.lazy(()=>oe(()=>import("./AdminFinancialReports-1uBtzks-.js"),__vite__mapDeps([145,18,11,23,24,25,26,46,107,13,14,15,6]))),$5=y.lazy(()=>oe(()=>import("./AdminProductionMarketing-UtJwVc-D.js"),__vite__mapDeps([146,107,23,24,25,26,142,94,21,93,20,95,43,52,65,29,49,101,90,98,102,110]))),F5=y.lazy(()=>oe(()=>import("./AdminCompanyFinance-Cf-j50bT.js"),__vite__mapDeps([147,107]))),U5=y.lazy(()=>oe(()=>import("./AdminCompanyFinanceDetail-A3OjVC0t.js"),__vite__mapDeps([148,107,11,46,23,24,25,26,29]))),z5=y.lazy(()=>oe(()=>import("./AdminSocials-UoZJAdk5.js"),__vite__mapDeps([149,46,107,23,24,25,26,18,99,100,101,95,11,29,34,1,73,47,110,89,4,49,50,88]))),B5=y.lazy(()=>oe(()=>import("./AdminMarketingPlan-DMehfCgj.js"),__vite__mapDeps([150,151,46,23,24,25,26,107,99,100,101,95,19,152,29,90]))),H5=y.lazy(()=>oe(()=>import("./AdminQRCodes-zJKFL1KA.js"),__vite__mapDeps([153,14,23,24,25,26,98,15])
99)),V5=y.lazy(()=>oe(()=>import("./AdminInternalEvents-DQWnLprd.js"),__vite__mapDeps([154,18,46,15,42,29,90]))),W5=y.lazy(()=>oe(()=>import("./AdminEmailCampaigns-CNngING5.js"),__vite__mapDeps([155,99,100,101,95,23,24,25,26,107,19,11,79,18,50,29,90,34,98,49,40,30,71]))),q5=y.lazy(()=>oe(()=>import("./AdminImportMailingList-CXI0dm--.js"),__vite__mapDeps([156,18,23,24,25,26,107,50,40]))),G5=y.lazy(()=>oe(()=>import("./AdminDailyUpdates-CpkuKWp5.js"),__vite__mapDeps([157,107,23,24,25,26,18,19,71,29,90]))),K5=y.lazy(()=>oe(()=>import("./AdminVolunteerShiftTypes-DZa9Q2lI.js"),__vite__mapDeps([158,46,107,29,90]))),Y5=y.lazy(()=>oe(()=>import("./AdminVolunteerSkills-Jmqu3Kpk.js"),__vite__mapDeps([159,46,107,29,90]))),Q5=y.lazy(()=>oe(()=>import("./AdminVolunteerShows-BW0r8FiV.js"),__vite__mapDeps([160,46,107,23,24,25,26,11,100,152,29,90]))),J5=y.lazy(()=>oe(()=>import("./AdminVolunteerShifts-DV7emJdM.js"),__vite__mapDeps([161,46,107,23,24,25,26,29,90]))),X5=y.lazy(()=>oe(()=>import("./VolunteerRota-BOkigiB1.js"),__vite__mapDeps([162,23,24,25,26,56]))),Z5=y.lazy(()=>oe(()=>import("./Quizzes-Blt4hbiN.js"),[])),eB=y.lazy(()=>oe(()=>import("./Quiz-Cntg-RTz.js"),__vite__mapDeps([163,151,18,55,164,31,27]))),tB=y.lazy(()=>oe(()=>import("./QuizClaim-ClHwaAue.js"),__vite__mapDeps([165,164,48]))),nB=y.lazy(()=>oe(()=>import("./QuizResult-DyV2fjSp.js"),__vite__mapDeps([166,164,27,71]))),rB=y.lazy(()=>oe(()=>import("./AdminQuizzes-DSTBuB2H.js"),__vite__mapDeps([167,29,90]))),Zb=y.lazy(()=>oe(()=>import("./AdminQuizForm-D7PpaaYS.js"),__vite__mapDeps([168,46,23,24,25,26,18,11,47,50,29,28,118]))),sB=y.lazy(()=>oe(()=>import("./AdminSignage-C47CInYz.js"),__vite__mapDeps([169,46,11,23,24,25,26,34,50,29,98,90]))),oB=y.lazy(()=>oe(()=>import("./SignageScreen-oWb1JbT6.js"),[])),iB=new oN,aB=()=>d.jsx("div",{className:"min-h-screen flex items-center justify-center",children:d.jsx(Zs,{className:"h-8 w-8 animate-spin text-muted-foreground"})}),lB=()=>d.jsx(uN,{client:iB,children:d.jsxs(UP,{children:[d.jsx(_A,{}),d.jsx(ej,{}),d.jsx(QO,{children:d.jsxs(LD,{children:[d.jsx(UD,{}),d.jsx(WD,{}),d.jsx(MD,{}),d.jsx(y.Suspense,{fallback:d.jsx(aB,{}),children:d.jsxs(kO,{children:[d.jsx(Z,{path:"/",element:d.jsx(xz,{})}),d.jsx(Z,{path:"/shows",element:d.jsx(_z,{})}),d.jsx(Z,{path:"/things-to-do-in-nuneaton",element:d.jsx(Ez,{})}),d.jsx(Z,{path:"/whats-on",element:d.jsx(Xp,{to:"/shows",replace:!0})}),d.jsx(Z,{path:"/past-events",element:d.jsx(g3,{})}),d.jsx(Z,{path:"/shows/:slug",element:d.jsx(Wb,{})}),d.jsx(Z,{path:"/show/:slug",element:d.jsx(Wb,{})}),d.jsx(Z,{path:"/category/:slug",element:d.jsx(Gb,{kind:"category"})}),d.jsx(Z,{path:"/genre/:slug",element:d.jsx(Gb,{kind:"genre"})}),d.jsx(Z,{path:"/seat-selection/:showtimeId",element:d.jsx(L3,{})}),d.jsx(Z,{path:"/general-seating/:showtimeId",element:d.jsx(M3,{})}),d.jsx(Z,{path:"/basket",element:d.jsx($3,{})}),d.jsx(Z,{path:"/payment-success",element:d.jsx(Q3,{})}),d.jsx(Z,{path:"/payment-cancelled",element:d.jsx(J3,{})}),d.jsx(Z,{path:"/about",element:d.jsx(y3,{})}),d.jsx(Z,{path:"/visit",element:d.jsx(v3,{})}),d.jsx(Z,{path:"/support",element:d.jsx(w3,{})}),d.jsx(Z,{path:"/accessibility",element:d.jsx(b3,{})}),d.jsx(Z,{path:"/venue-hire",element:d.jsx(k3,{})}),d.jsx(Z,{path:"/box-office",element:d.jsx(T3,{})}),d.jsx(Z,{path:"/facilities",element:d.jsx(C3,{})}),d.jsx(Z,{path:"/conditions-of-hire",element:d.jsx(R3,{})}),d.jsx(Z,{path:"/auth",element:d.jsx(x3,{})}),d.jsx(Z,{path:"/auth/reset-password",element:d.jsx(_3,{})}),d.jsx(Z,{path:"/my-tickets",element:d.jsx(S3,{})}),d.jsx(Z,{path:"/my-account",element:d.jsx(E3,{})}),d.jsx(Z,{path:"/member-signup",element:d.jsx(D3,{})}),d.jsx(Z,{path:"/members",element:d.jsx(I3,{})}),d.jsx(Z,{path:"/company/:slug",element:d.jsx(Cu,{flag:"artsDirectoryEnabled",children:d.jsx(j3,{})})}),d.jsx(Z,{path:"/arts-directory",element:d.jsx(Cu,{flag:"artsDirectoryEnabled",children:d.jsx(qb,{})})}),d.jsx(Z,{path:"/arts-directory/suggest",element:d.jsx(Cu,{flag:"artsDirectoryEnabled",children:d.jsx(A3,{})})}),d.jsx(Z,{path:"/arts-directory/category/:categorySlug",element:d.jsx(Cu,{flag:"artsDirectoryEnabled",children:d.jsx(qb,{})})}),d.jsx(Z,{path:"/staff-area",element:d.jsx(P3,{})}),d.jsx(Z,{path:"/become-a-volunteer",element:d.jsx(N3,{})}),d.jsx(Z,{path:"/gallery",element:d.jsx(O3,{})}),d.jsx(Z,{path:"/page/:slug",element:d.jsx(F3,{})}),d.jsx(Z,{path:"/privacy-policy",element:d.jsx(U3,{})}),d.jsx(Z,{path:"/cookie-policy",element:d.jsx(H3,{})}),d.jsx(Z,{path:"/terms-of-service",element:d.jsx(z3,{})}),d.jsx(Z,{path:"/data-deletion",element:d.jsx(B3,{})}),d.jsx(Z,{path:"/meet-the-team",element:d.jsx(V3,{})}),d.jsx(Z,{path:"/team",element:d.jsx(Xp,{to:"/meet-the-team",replace:!0})}),d.jsx(Z,{path:"/policies-procedures-risk-assessments",element:d.jsx(W3,{})}),d.jsx(Z,{path:"/sitemap",element:d.jsx(q3,{})}),d.jsx(Z,{path:"/technical-information",element:d.jsx(G3,{})}),d.jsx(Z,{path:"/safeguarding",element:d.jsx(K3,{})}),d.jsx(Z,{path:"/marketing",element:d.jsx(Y3,{})}),d.jsx(Z,{path:"/ticket-lottery",element:d.jsx(X3,{})}),d.jsx(Z,{path:"/news",element:d.jsx(Z3,{})}),d.jsx(Z,{path:"/news/tag/:tagSlug",element:d.jsx(t5,{})}),d.jsx(Z,{path:"/news/:slug",element:d.jsx(e5,{})}),d.jsx(Z,{path:"/screen/:slug",element:d.jsx(oB,{})}),d.jsx(Z,{path:"/volunteer-rota",element:d.jsx(X5,{})}),d.jsx(Z,{path:"/quizzes",element:d.jsx(Z5,{})}),d.jsx(Z,{path:"/quizzes/:slug/claim",element:d.jsx(tB,{})}),d.jsx(Z,{path:"/quizzes/:slug/result/:resultSlug",element:d.jsx(nB,{})}),d.jsx(Z,{path:"/quizzes/:slug",element:d.jsx(eB,{})}),d.jsx(Z,{path:"/unsubscribe",element:d.jsx(n5,{})}),d.jsx(Z,{path:"/admin/login",element:d.jsx(r5,{})}),d.jsxs(Z,{element:d.jsx(h$,{}),children:[d.jsx(Z,{path:"/admin",element:d.jsx(s5,{})}),d.jsx(Z,{path:"/admin/productions/new",element:d.jsx(Kb,{})}),d.jsx(Z,{path:"/admin/productions/:id",element:d.jsx(Kb,{})}),d.jsx(Z,{path:"/admin/productions/:id/marketing",element:d.jsx($5,{})}),d.jsx(Z,{path:"/admin/seating-plans",element:d.jsx(o5,{})}),d.jsx(Z,{path:"/admin/seating-plans/new",element:d.jsx(Yb,{})}),d.jsx(Z,{path:"/admin/seating-plans/:id",element:d.jsx(Yb,{})}),d.jsx(Z,{path:"/admin/hero-carousel",element:d.jsx(i5,{})}),d.jsx(Z,{path:"/admin/backfill-image-crops",element:d.jsx(a5,{})}),d.jsx(Z,{path:"/admin/ticket-sales",element:d.jsx(l5,{})}),d.jsx(Z,{path:"/admin/discount-codes",element:d.jsx(u5,{})}),d.jsx(Z,{path:"/admin/config",element:d.jsx(c5,{})}),d.jsx(Z,{path:"/admin/users",element:d.jsx(h5,{})}),d.jsx(Z,{path:"/admin/pages",element:d.jsx(d5,{})}),d.jsx(Z,{path:"/admin/pages/new",element:d.jsx(Qb,{})}),d.jsx(Z,{path:"/admin/pages/:id",element:d.jsx(Qb,{})}),d.jsx(Z,{path:"/admin/show-admins",element:d.jsx(f5,{})}),d.jsx(Z,{path:"/admin/communication-preferences",element:d.jsx(p5,{})}),d.jsx(Z,{path:"/admin/memberships",element:d.jsx(m5,{})}),d.jsx(Z,{path:"/admin/team",element:d.jsx(g5,{})}),d.jsx(Z,{path:"/admin/team/groups/:id",element:d.jsx(y5,{})}),d.jsx(Z,{path:"/admin/team/members/:id",element:d.jsx(v5,{})}),d.jsx(Z,{path:"/admin/gallery",element:d.jsx(w5,{})}),d.jsx(Z,{path:"/admin/policies",element:d.jsx(b5,{})}),d.jsx(Z,{path:"/admin/meeting-minutes",element:d.jsx(x5,{})}),d.jsx(Z,{path:"/admin/job-descriptions",element:d.jsx(_5,{})}),d.jsx(Z,{path:"/admin/containers",element:d.jsx(C5,{})}),d.jsx(Z,{path:"/admin/marketing-preferences",element:d.jsx(R5,{})}),d.jsx(Z,{path:"/admin/volunteers",element:d.jsx(S5,{})}),d.jsx(Z,{path:"/admin/volunteer-shifts",element:d.jsx(J5,{})}),d.jsx(Z,{path:"/admin/volunteer-shift-types",element:d.jsx(K5,{})}),d.jsx(Z,{path:"/admin/volunteer-skills",element:d.jsx(Y5,{})}),d.jsx(Z,{path:"/admin/volunteer-shows",element:d.jsx(Q5,{})}),d.jsx(Z,{path:"/admin/companies",element:d.jsx(E5,{})}),d.jsx(Z,{path:"/admin/companies/new",element:d.jsx(Jb,{})}),d.jsx(Z,{path:"/admin/companies/:id",element:d.jsx(Jb,{})}),d.jsx(Z,{path:"/admin/companies/:companyId/reviews",element:d.jsx(k5,{})}),d.jsx(Z,{path:"/admin/companies/finance",element:d.jsx(F5,{})}),d.jsx(Z,{path:"/admin/companies/:companyId/finance",element:d.jsx(U5,{})}),d.jsx(Z,{path:"/admin/directory-categories",element:d.jsx(T5,{})}),d.jsx(Z,{path:"/admin/socials",element:d.jsx(z5,{})}),d.jsx(Z,{path:"/admin/marketing-plan",element:d.jsx(B5,{})}),d.jsx(Z,{path:"/admin/qr-codes",element:d.jsx(H5,{})}),d.jsx(Z,{path:"/admin/import-members",element:d.jsx(A5,{})}),d.jsx(Z,{path:"/admin/import-volunteers",element:d.jsx(j5,{})}),d.jsx(Z,{path:"/admin/import-mailing-list",element:d.jsx(q5,{})}),d.jsx(Z,{path:"/admin/ticket-lottery",element:d.jsx(P5,{})}),d.jsx(Z,{path:"/admin/news",element:d.jsx(N5,{})}),d.jsx(Z,{path:"/admin/news/tags",element:d.jsx(O5,{})}),d.jsx(Z,{path:"/admin/news/new",element:d.jsx(Xb,{})}),d.jsx(Z,{path:"/admin/news/:id",element:d.jsx(Xb,{})}),d.jsx(Z,{path:"/admin/analytics",element:d.jsx(I5,{})}),d.jsx(Z,{path:"/admin/llm-work",element:d.jsx(D5,{})}),d.jsx(Z,{path:"/admin/functions",element:d.jsx(L5,{})}),d.jsx(Z,{path:"/admin/financial-reports",element:d.jsx(M5,{})}),d.jsx(Z,{path:"/admin/signage",element:d.jsx(sB,{})}),d.jsx(Z,{path:"/admin/internal-events",element:d.jsx(V5,{})}),d.jsx(Z,{path:"/admin/email-campaigns",element:d.jsx(W5,{})}),d.jsx(Z,{path:"/admin/daily-updates",element:d.jsx(G5,{})}),d.jsx(Z,{path:"/admin/quizzes",element:d.jsx(rB,{})}),d.jsx(Z,{path:"/admin/quizzes/new",element:d.jsx(Zb,{})}),d.jsx(Z,{path:"/admin/quizzes/:id",element:d.jsx(Zb,{})})]}),d.jsx(Z,{path:"*",element:d.jsx(m3,{})})]})})]})})]})}),cB="https://www.abbeytheatre.co.uk";class uB extends y.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){console.error("[AppErrorBoundary] The application could not render",t,n)}render(){return this.state.error?d.jsx("main",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-foreground",children:d.jsxs("section",{className:"w-full max-w-lg border border-border bg-card p-6 text-center shadow-lg",children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"The page could not be displayed"}),d.jsx("p",{className:"mt-3 text-muted-foreground",children:"Please reload the page. If the problem continues, use the live Abbey Theatre website."}),d.jsxs("div",{className:"mt-6 flex flex-col justify-center gap-3 sm:flex-row",children:[d.jsx(Ce,{onClick:()=>window.location.reload(),children:"Reload page"}),d.jsx(Ce,{asChild:!0,variant:"outline",children:d.jsx("a",{href:cB,target:"_blank",rel:"noopener noreferrer",children:"Open the live site"})})]})]})}):this.props.children}}if(!Zu()&&typeof document<"u"){const e=document.createElement("meta");e.setAttribute("name","robots"),e.setAttribute("content","noindex,nofollow,noarchive,nosnippet"),document.head.appendChild(e)}B1.createRoot(document.getElementById("root")).render(d.jsx(lx,{children:d.jsx(uB,{children:d.jsx(lB,{})})}));export{kE as $,_R as A,Ce as B,Ig as C,mg as D,DE as E,Mo as F,Le as G,Lo as H,UE as I,Hx as J,Mp as K,Ae as L,zx as M,vn as N,Cp as O,Do as P,Ze as Q,se as R,Yd as S,MR as T,Vh as U,Yn as V,bs as W,Es as X,cN as Y,Zi as Z,Mx as _,Zs as a,jS as a$,CR as a0,Im as a1,$R as a2,bb as a3,xR as a4,cO as a5,U4 as a6,dd as a7,dr as a8,oe as a9,f_ as aA,GS as aB,KS as aC,wB as aD,YS as aE,bB as aF,Id as aG,Dd as aH,Ld as aI,QS as aJ,Od as aK,AC as aL,xI as aM,Vl as aN,qp as aO,xl as aP,nN as aQ,an as aR,Dn as aS,qP as aT,__ as aU,_d as aV,Rm as aW,QC as aX,S_ as aY,gd as aZ,pd as a_,$x as aa,Fx as ab,PR as ac,Mi as ad,gC as ae,FR as af,CC as ag,ER as ah,mB as ai,LR as aj,BE as ak,yB as al,gB as am,c3 as an,ID as ao,HE as ap,Xi as aq,No as ar,gF as as,yF as at,Re as au,Xr as av,WE as aw,Fl as ax,xt as ay,_I as az,Lg as b,Vt as b$,_S as b0,dg as b1,ug as b2,Ul as b3,qi as b4,E_ as b5,k_ as b6,Tm as b7,kR as b8,Bl as b9,xb as bA,q4 as bB,AU as bC,Q4 as bD,fd as bE,PU as bF,OU as bG,K4 as bH,Kd as bI,Wu as bJ,SB as bK,jR as bL,jw as bM,CE as bN,bg as bO,jE as bP,PE as bQ,NE as bR,EC as bS,Dx as bT,vb as bU,wb as bV,_m as bW,ps as bX,tx as bY,qk as bZ,_B as b_,IR as ba,mI as bb,vB as bc,Oo as bd,yz as be,TB as bf,Tz as bg,Xp as bh,AR as bi,o$ as bj,UP as bk,hB as bl,pB as bm,OR as bn,zP as bo,yg as bp,xB as bq,NR as br,EB as bs,ux as bt,UR as bu,Dr as bv,$l as bw,_b as bx,Wk as by,Ho as bz,z4 as c,dB as c0,CB as c1,B4 as d,Dg as e,$g as f,yl as g,SR as h,We as i,d as j,Hd as k,no as l,fz as m,H4 as n,bR as o,tI as p,gn as q,y as r,Me as s,gz as t,Sn as u,Io as v,Md as w,gg as x,$d as y,Fd 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.