vendor: 14,826 bytes, lines 1-4
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-DQ073bpS.js","assets/utils-KNdIxHLD.js","assets/useRouter-cqa85HvV.js","assets/link-BCAXn4Xn.js","assets/photo-variants-D3twpW_O.js","assets/star-Ct92LdI0.js","assets/PhotoImg-WYEnfK3t.js","assets/EstimateForm-DzMcwQDQ.js","assets/label-DLOsmE9x.js","assets/invariant-BeDuhpwN.js","assets/circle-check-Bwo1O_eg.js","assets/leads.functions-BDJBfIiM.js","assets/about-CENp_LmG.js","assets/PageHero-D0LWt5TR.js","assets/ContentSection-CyukMplg.js","assets/CTABand-Bl3H-JSa.js","assets/Reveal-yNIQxvKu.js","assets/air-duct-cleaning-DykoZqPU.js","assets/wind-DNP4_LtK.js","assets/RelatedServices-CWRi3n1_.js","assets/arrow-right-Jnahk_8C.js","assets/air-duct-mold-removal-zHM1u83u.js","assets/fan-D_gZPfPB.js","assets/carpet-floor-cleaning-DFG0h4yd.js","assets/chimney-dryer-vent-cleaning-BcU83NFE.js","assets/ServicePage-G22YkyO_.js","assets/commercial-xojFYK5U.js","assets/BeforeAfterSlider-B7QPNad5.js","assets/commercial-air-duct-cleaning-VJuct0WW.js","assets/commercial-dryer-vent-duct-cleaning-BuDvUqWc.js","assets/commercial-kitchen-vent-hood-cleaning-B0qJ2-GB.js","assets/commercial-laundry-exhaust-duct-cleaning-Dr1PMnN_.js","assets/commercial-mold-inspection-D483A5BM.js","assets/search-DbR2242M.js","assets/commercial-mold-remediation-BM8fZ9dQ.js","assets/hexagon-BOHhHdwa.js","assets/commercial-odor-removal-DE5EIdaN.js","assets/waves-COvUD5K3.js","assets/commercial-water-damage-restoration-QTFY6thS.js","assets/droplets-DlE9o9hC.js","assets/contact-P9P7e5FX.js","assets/dead-animal-removal-DIhLSZ62.js","assets/facility-care-program-C9iob4Pn.js","assets/accordion-Cc9otCoK.js","assets/faqs-Cagil3L7.js","assets/hard-floor-cleaning-BlmzXXgE.js","assets/hvac-plenum-cleaning-D3DpYoRR.js","assets/hvac-uv-light-installation-jIELLI_H.js","assets/major-projects-5kKM8Phe.js","assets/PhotoGallery-DyLOstPY.js","assets/mold-inspection-CpimDvCS.js","assets/mold-remediation-C7La_oYe.js","assets/odor-removal-CCZKYwkO.js","assets/privacy-L1_s0YZp.js","assets/rebuilding-and-repair-services-yQyqT1KS.js","assets/hammer-CIQiVi65.js","assets/reviews-Be42EwKg.js","assets/serving-area-eJI5ti_y.js","assets/special-offers-C5iL8AJy.js","assets/structural-damage-repair-DkLVku_f.js","assets/terms-CjvYtiGy.js","assets/water-damage-restoration-B3Foi_bp.js","assets/admin.leads-DMv8cBcw.js","assets/blog.index-blsCZJN6.js","assets/blog._slug-cKp2E1ok.js","assets/blog._slug-Zmh9X-l4.js","assets/service-area._city-DvE9YoXn.js"])))=>i.map(i=>d[i]); 2import{a as e,i as t,n,r,t as i}from"./utils-KNdIxHLD.js";import{n as a,r as o,t as s}from"./useRouter-cqa85HvV.js";import{a as c,i as l,n as u,o as d,r as f,t as p}from"./invariant-BeDuhpwN.js";import{C as m,D as h,E as g,O as _,S as v,T as y,_ as b,a as x,b as S,c as C,d as ee,f as te,g as w,h as ne,i as re,l as ie,m as ae,n as oe,o as se,p as ce,r as T,s as E,t as D,u as le,v as ue,w as de,x as fe,y as pe}from"./link-BCAXn4Xn.js";import{c as me,f as he,l as ge,s as _e,t as ve,u as ye}from"./photo-variants-D3twpW_O.js";var be=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,re());else{var t=n(l);t!==null&&oe(x,t.startTime-e)}}var S=!1,C=-1,ee=5,te=-1;function w(){return g?!0:!(e.unstable_now()-te<ee)}function ne(){if(g=!1,S){var t=e.unstable_now();te=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&w());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&oe(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?re():S=!1}}}var re;if(typeof y==`function`)re=function(){y(ne)};else if(typeof MessageChannel<`u`){var ie=new MessageChannel,ae=ie.port2;ie.port1.onmessage=ne,re=function(){ae.postMessage(null)}}else re=function(){_(ne,0)};function oe(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ee=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,oe(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,re()))),r},e.unstable_shouldYield=w,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),xe=t(((e,t)=>{t.exports=be()})),Se=t((e=>{var t=o();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=i.p;try{if(c.T=null,i.p=2,e)return e()}finally{c.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.8`})),Ce=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Se()})),we=t((e=>{var t=xe(),n=o(),r=Ce();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(s(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return u(a),e;if(o===r)return u(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var c=!1,l=a.child;l;){if(l===n){c=!0,n=a,r=o;break}if(l===r){c=!0,r=a,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=a;break}if(l===r){c=!0,r=o,n=a;break}l=l.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),ee=Symbol.for(`react.suspense_list`),te=Symbol.for(`react.memo`),w=Symbol.for(`react.lazy`),ne=Symbol.for(`react.activity`),re=Symbol.for(`react.memo_cache_sentinel`),ie=Symbol.iterator;function ae(e){return typeof e!=`object`||!e?null:(e=ie&&e[ie]||e[`@@iterator`],typeof e==`function`?e:null)}var oe=Symbol.for(`react.client.reference`);function se(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case ee:return`SuspenseList`;case ne:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case te:return t=e.displayName||null,t===null?se(e.type)||`Memo`:t;case w:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var ce=Array.isArray,T=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,E=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D={pending:!1,data:null,method:null,action:null},le=[],ue=-1;function de(e){return{current:e}}function fe(e){0>ue||(e.current=le[ue],le[ue]=null,ue--)}function pe(e,t){ue++,le[ue]=e.current,e.current=t}var me=de(null),he=de(null),ge=de(null),_e=de(null);function ve(e,t){switch(pe(ge,t),pe(he,e),pe(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gd(t),e=Kd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}fe(me),pe(me,e)}function ye(){fe(me),fe(he),fe(ge)}function be(e){e.memoizedState!==null&&pe(_e,e);var t=me.current,n=Kd(t,e.type);t!==n&&(pe(he,e),pe(me,n))}function Se(e){he.current===e&&(fe(me),fe(he)),_e.current===e&&(fe(_e),tp._currentValue=D)}var we,Te;function Ee(e){if(we===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);we=t&&t[1]||``,Te=-1<e.stack.indexOf(` 3 at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return` 4`+we+e+Te}var De=!1;function Oe(e,t){if(!e||De)return``;De=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}
vendor: 13,132 bytes, lines 4-9
4else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(` 5`),l=s.split(` 6`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=` 7`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{De=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ee(n):``}function ke(e,t){switch(e.tag){case 26:case 27:case 5:return Ee(e.type);case 16:return Ee(`Lazy`);case 13:return e.child!==t&&t!==null?Ee(`Suspense Fallback`):Ee(`Suspense`);case 19:return Ee(`SuspenseList`);case 0:case 15:return Oe(e.type,!1);case 11:return Oe(e.type.render,!1);case 1:return Oe(e.type,!0);case 31:return Ee(`Activity`);default:return``}}function Ae(e){try{var t=``,n=null;do t+=ke(e,n),n=e,e=e.return;while(e);return t}catch(e){return` 8Error generating stack: `+e.message+` 9`+e.stack}}var je=Object.prototype.hasOwnProperty,Me=t.unstable_scheduleCallback,Ne=t.unstable_cancelCallback,Pe=t.unstable_shouldYield,Fe=t.unstable_requestPaint,Ie=t.unstable_now,Le=t.unstable_getCurrentPriorityLevel,Re=t.unstable_ImmediatePriority,ze=t.unstable_UserBlockingPriority,Be=t.unstable_NormalPriority,Ve=t.unstable_LowPriority,He=t.unstable_IdlePriority,Ue=t.log,We=t.unstable_setDisableYieldValue,Ge=null,Ke=null;function qe(e){if(typeof Ue==`function`&&We(e),Ke&&typeof Ke.setStrictMode==`function`)try{Ke.setStrictMode(Ge,e)}catch{}}var Je=Math.clz32?Math.clz32:Ze,Ye=Math.log,Xe=Math.LN2;function Ze(e){return e>>>=0,e===0?32:31-(Ye(e)/Xe|0)|0}var Qe=256,$e=262144,et=4194304;function tt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function nt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=tt(n))):i=tt(o):i=tt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=tt(n))):i=tt(o)):i=tt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function rt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function it(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function at(){var e=et;return et<<=1,!(et&62914560)&&(et=4194304),e}function ot(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function st(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ct(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Je(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&<(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function lt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Je(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ut(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Je(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function dt(e,t){var n=t&-t;return n=n&42?1:ft(n),(n&(e.suspendedLanes|t))===0?n:0}function ft(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function pt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function mt(){var e=E.p;return e===0?(e=window.event,e===void 0?32:_p(e.type)):e}function ht(e,t){var n=E.p;try{return E.p=e,t()}finally{E.p=n}}var gt=Math.random().toString(36).slice(2),_t=`__reactFiber$`+gt,vt=`__reactProps$`+gt,yt=`__reactContainer$`+gt,bt=`__reactEvents$`+gt,xt=`__reactListeners$`+gt,St=`__reactHandles$`+gt,Ct=`__reactResources$`+gt,wt=`__reactMarker$`+gt;function Tt(e){delete e[_t],delete e[vt],delete e[bt],delete e[xt],delete e[St]}function Et(e){var t=e[_t];if(t)return t;for(var n=e.parentNode;n;){if(t=n[yt]||n[_t]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mf(e);e!==null;){if(n=e[_t])return n;e=mf(e)}return t}e=n,n=e.parentNode}return null}function Dt(e){if(e=e[_t]||e[yt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ot(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function kt(e){var t=e[Ct];return t||=e[Ct]={hoistableStyles:new Map,hoistableScripts:new Map},t}function At(e){e[wt]=!0}var jt=new Set,Mt={};function Nt(e,t){Pt(e,t),Pt(e+`Capture`,t)}function Pt(e,t){for(Mt[e]=t,e=0;e<t.length;e++)jt.add(t[e])}var Ft=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),It={},Lt={};function Rt(e){return je.call(Lt,e)?!0:je.call(It,e)?!1:Ft.test(e)?Lt[e]=!0:(It[e]=!0,!1)}function zt(e,t,n){if(Rt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Bt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Vt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Ht(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ut(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Wt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gt(e){if(!e._valueTracker){var t=Ut(e)?`checked`:`value`;e._valueTracker=Wt(e,t,``+e[t])}}function Kt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ut(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function qt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Jt=/[\n"\\]/g;function Yt(e){return e.replace(Jt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Xt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Ht(t)):e.value!==``+Ht(t)&&(e.value=``+Ht(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Qt(e,o,Ht(n)):Qt(e,o,Ht(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Ht(s):e.removeAttribute(`name`)}function Zt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Gt(e);return}n=n==null?``:``+Ht(n),t=t==null?n:``+Ht(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Gt(e)}function Qt(e,t,n){t===`number`&&qt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function $t(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Ht(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function en(e,t,n){if(t!=null&&(t=``+Ht(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ht(n)}function tn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ce(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Ht(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Gt(e)}function nn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function an(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||rn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function on(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&an(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&an(e,o,t[o])}function sn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var cn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`
9clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),ln=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function un(e){return ln.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function dn(){}var fn=null;function pn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mn=null,hn=null;function gn(e){var t=Dt(e);if(t&&(e=t.stateNode)){var n=e[vt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Xt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Yt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[vt]||null;if(!a)throw Error(i(90));Xt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Kt(r)}break a;case`textarea`:en(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&$t(e,!!n.multiple,t,!1)}}}var _n=!1;
vendor: 81,436 bytes, line 9
9function vn(e,t,n){if(_n)return e(t,n);_n=!0;try{return e(t)}finally{if(_n=!1,(mn!==null||hn!==null)&&(Tu(),mn&&(t=mn,e=hn,hn=mn=null,gn(t),e)))for(t=0;t<e.length;t++)gn(e[t])}}function yn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[vt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var bn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),xn=!1;if(bn)try{var Sn={};Object.defineProperty(Sn,"passive",{get:function(){xn=!0}}),window.addEventListener(`test`,Sn,Sn),window.removeEventListener(`test`,Sn,Sn)}catch{xn=!1}var Cn=null,wn=null,Tn=null;function En(){if(Tn)return Tn;var e,t=wn,n=t.length,r,i=`value`in Cn?Cn.value:Cn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Tn=i.slice(e,1<r?1-r:void 0)}function Dn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function On(){return!0}function kn(){return!1}function An(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?On:kn,this.isPropagationStopped=kn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=On)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=On)},persist:function(){},isPersistent:On}),t}var jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mn=An(jn),Nn=p({},jn,{view:0,detail:0}),Pn=An(Nn),Fn,In,Ln,Rn=p({},Nn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Ln&&(Ln&&e.type===`mousemove`?(Fn=e.screenX-Ln.screenX,In=e.screenY-Ln.screenY):In=Fn=0,Ln=e),Fn)},movementY:function(e){return`movementY`in e?e.movementY:In}}),zn=An(Rn),Bn=An(p({},Rn,{dataTransfer:0})),Vn=An(p({},Nn,{relatedTarget:0})),Hn=An(p({},jn,{animationName:0,elapsedTime:0,pseudoElement:0})),Un=An(p({},jn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Wn=An(p({},jn,{data:0})),Gn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Kn={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`},qn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Jn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=qn[e])?!!t[e]:!1}function Yn(){return Jn}var Xn=An(p({},Nn,{key:function(e){if(e.key){var t=Gn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Dn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Kn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yn,charCode:function(e){return e.type===`keypress`?Dn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Dn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Zn=An(p({},Rn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Qn=An(p({},Nn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yn})),$n=An(p({},jn,{propertyName:0,elapsedTime:0,pseudoElement:0})),er=An(p({},Rn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),tr=An(p({},jn,{newState:0,oldState:0})),nr=[9,13,27,32],rr=bn&&`CompositionEvent`in window,ir=null;bn&&`documentMode`in document&&(ir=document.documentMode);var ar=bn&&`TextEvent`in window&&!ir,or=bn&&(!rr||ir&&8<ir&&11>=ir),sr=` `,cr=!1;function lr(e,t){switch(e){case`keyup`:return nr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ur(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var dr=!1;function fr(e,t){switch(e){case`compositionend`:return ur(t);case`keypress`:return t.which===32?(cr=!0,sr):null;case`textInput`:return e=t.data,e===sr&&cr?null:e;default:return null}}function pr(e,t){if(dr)return e===`compositionend`||!rr&&lr(e,t)?(e=En(),Tn=wn=Cn=null,dr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return or&&t.locale!==`ko`?null:t.data;default:return null}}var mr={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 O(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!mr[e.type]:t===`textarea`}function hr(e,t,n,r){mn?hn?hn.push(r):hn=[r]:mn=r,t=Ad(t,`onChange`),0<t.length&&(n=new Mn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var gr=null,_r=null;function vr(e){Cd(e,0)}function yr(e){if(Kt(Ot(e)))return e}function br(e,t){if(e===`change`)return t}var xr=!1;if(bn){var Sr;if(bn){var Cr=`oninput`in document;if(!Cr){var wr=document.createElement(`div`);wr.setAttribute(`oninput`,`return;`),Cr=typeof wr.oninput==`function`}Sr=Cr}else Sr=!1;xr=Sr&&(!document.documentMode||9<document.documentMode)}function Tr(){gr&&(gr.detachEvent(`onpropertychange`,Er),_r=gr=null)}function Er(e){if(e.propertyName===`value`&&yr(_r)){var t=[];hr(t,_r,e,pn(e)),vn(vr,t)}}function Dr(e,t,n){e===`focusin`?(Tr(),gr=t,_r=n,gr.attachEvent(`onpropertychange`,Er)):e===`focusout`&&Tr()}function Or(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return yr(_r)}function kr(e,t){if(e===`click`)return yr(t)}function Ar(e,t){if(e===`input`||e===`change`)return yr(t)}function jr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Mr=typeof Object.is==`function`?Object.is:jr;function Nr(e,t){if(Mr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!je.call(t,i)||!Mr(e[i],t[i]))return!1}return!0}function Pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fr(e,t){var n=Pr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Pr(n)}}function Ir(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ir(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=qt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=qt(e.document)}return t}function Rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var zr=bn&&`documentMode`in document&&11>=document.documentMode,Br=null,Vr=null,Hr=null,Ur=!1;function Wr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ur||Br==null||Br!==qt(r)||(r=Br,`selectionStart`in r&&Rr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hr&&Nr(Hr,r)||(Hr=r,r=Ad(Vr,`onSelect`),0<r.length&&(t=new Mn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Br)))}function Gr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Kr={animationend:Gr(`Animation`,`AnimationEnd`),animationiteration:Gr(`Animation`,`AnimationIteration`),animationstart:Gr(`Animation`,`AnimationStart`),transitionrun:Gr(`Transition`,`TransitionRun`),transitionstart:Gr(`Transition`,`TransitionStart`),transitioncancel:Gr(`Transition`,`TransitionCancel`),transitionend:Gr(`Transition`,`TransitionEnd`)},qr={},Jr={};bn&&(Jr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Kr.animationend.animation,delete Kr.animationiteration.animation,delete Kr.animationstart.animation),`TransitionEvent`in window||delete Kr.transitionend.transition);function Yr(e){if(qr[e])return qr[e];if(!Kr[e])return e;var t=Kr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Jr)return qr[e]=t[n];return e}var Xr=Yr(`animationend`),Zr=Yr(`animationiteration`),Qr=Yr(`animationstart`),$r=Yr(`transitionrun`),ei=Yr(`transitionstart`),ti=Yr(`transitioncancel`),ni=Yr(`transitionend`),ri=new Map,ii=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ii.push(`scrollEnd`);function ai(e,t){ri.set(e,t),Nt(t,[e])}var oi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},si=[],ci=0,li=0;function ui(){for(var e=ci,t=li=ci=0;t<e;){var n=si[t];si[t++]=null;var r=si[t];si[t++]=null;var i=si[t];si[t++]=null;var a=si[t];if(si[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&mi(n,i,a)}}function di(e,t,n,r){si[ci++]=e,si[ci++]=t,si[ci++]=n,si[ci++]=r,li|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function fi(e,t,n,r){return di(e,t,n,r),hi(e)}function pi(e,t){return di(e,null,null,t),hi(e)}function mi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Je(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function hi(e){if(50<gu)throw gu=0,_u=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var gi={};function _i(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vi(e,t,n,r){return new _i(e,t,n,r)}function yi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bi(e,t){var n=e.alternate;return n===null?(n=vi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function xi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Si(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)yi(e)&&(s=1);else if(typeof e==`string`)s=Kf(e,n,me.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ne:return e=vi(31,n,t,a),e.elementType=ne,e.lanes=o,e;case _:return Ci(n.children,a,o,t);case v:s=8,a|=24;break;case y:return e=vi(12,n,t,a|2),e.elementType=y,e.lanes=o,e;case C:return e=vi(13,n,t,a),e.elementType=C,e.lanes=o,e;case ee:return e=vi(19,n,t,a),e.elementType=ee,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case x:s=10;break a;case b:s=9;break a;case S:s=11;break a;case te:s=14;break a;case w:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=vi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ci(e,t,n,r){return e=vi(7,e,r,t),e.lanes=n,e}function wi(e,t,n){return e=vi(6,e,null,t),e.lanes=n,e}function Ti(e){var t=vi(18,null,null,0);return t.stateNode=e,t}function Ei(e,t,n){return t=vi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Di=new WeakMap;function Oi(e,t){if(typeof e==`object`&&e){var n=Di.get(e);return n===void 0?(t={value:e,source:t,stack:Ae(t)},Di.set(e,t),t):n}return{value:e,source:t,stack:Ae(t)}}var ki=[],Ai=0,ji=null,Mi=0,Ni=[],Pi=0,Fi=null,Ii=1,Li=``;function Ri(e,t){ki[Ai++]=Mi,ki[Ai++]=ji,ji=e,Mi=t}function zi(e,t,n){Ni[Pi++]=Ii,Ni[Pi++]=Li,Ni[Pi++]=Fi,Fi=e;var r=Ii;e=Li;var i=32-Je(r)-1;r&=~(1<<i),n+=1;var a=32-Je(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ii=1<<32-Je(t)+i|n<<i|r,Li=a+e}else Ii=1<<a|n<<i|r,Li=e}function Bi(e){e.return!==null&&(Ri(e,1),zi(e,1,0))}function Vi(e){for(;e===ji;)ji=ki[--Ai],ki[Ai]=null,Mi=ki[--Ai],ki[Ai]=null;for(;e===Fi;)Fi=Ni[--Pi],Ni[Pi]=null,Li=Ni[--Pi],Ni[Pi]=null,Ii=Ni[--Pi],Ni[Pi]=null}function Hi(e,t){Ni[Pi++]=Ii,Ni[Pi++]=Li,Ni[Pi++]=Fi,Ii=t.id,Li=t.overflow,Fi=e}var Ui=null,k=null,A=!1,Wi=null,Gi=!1,j=Error(i(519));function Ki(e){throw Qi(Oi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),j}function qi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[_t]=e,t[vt]=r,n){case`dialog`:J(`cancel`,t),J(`close`,t);break;case`iframe`:case`object`:case`embed`:J(`load`,t);break;case`video`:case`audio`:for(n=0;n<xd.length;n++)J(xd[n],t);break;case`source`:J(`error`,t);break;case`img`:case`image`:case`link`:J(`error`,t),J(`load`,t);break;case`details`:J(`toggle`,t);break;case`input`:J(`invalid`,t),Zt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:J(`invalid`,t);break;case`textarea`:J(`invalid`,t),tn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Id(t.textContent,n)?(r.popover!=null&&(J(`beforetoggle`,t),J(`toggle`,t)),r.onScroll!=null&&J(`scroll`,t),r.onScrollEnd!=null&&J(`scrollend`,t),r.onClick!=null&&(t.onclick=dn),t=!0):t=!1,t||Ki(e,!0)}function Ji(e){for(Ui=e.return;Ui;)switch(Ui.tag){case 5:case 31:case 13:Gi=!1;return;case 27:case 3:Gi=!0;return;default:Ui=Ui.return}}function Yi(e){if(e!==Ui)return!1;if(!A)return Ji(e),A=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||qd(e.type,e.memoizedProps)),n=!n),n&&k&&Ki(e),Ji(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));k=pf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));k=pf(e)}else t===27?(t=k,tf(e.type)?(e=ff,ff=null,k=e):k=t):k=Ui?df(e.stateNode.nextSibling):null;return!0}function Xi(){k=Ui=null,A=!1}function Zi(){var e=Wi;return e!==null&&(nu===null?nu=e:nu.push.apply(nu,e),Wi=null),e}function Qi(e){Wi===null?Wi=[e]:Wi.push(e)}var $i=de(null),ea=null,ta=null;function na(e,t,n){pe($i,t._currentValue),t._currentValue=n}function ra(e){e._currentValue=$i.current,fe($i)}function ia(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function aa(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ia(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ia(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function oa(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Mr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===_e.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[tp]:e.push(tp))}a=a.return}e!==null&&aa(t,e,n,r),t.flags|=262144}function sa(e){for(e=e.firstContext;e!==null;){if(!Mr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ca(e){ea=e,ta=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function la(e){return da(ea,e)}function ua(e,t){return ea===null&&ca(e),da(e,t)}function da(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ta===null){if(e===null)throw Error(i(308));ta=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ta=ta.next=t;return n}var fa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},pa=t.unstable_scheduleCallback,ma=t.unstable_NormalPriority,ha={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ga(){return{controller:new fa,data:new Map,refCount:0}}function _a(e){e.refCount--,e.refCount===0&&pa(ma,function(){e.controller.abort()})}var va=null,ya=0,ba=0,xa=null;function Sa(e,t){if(va===null){var n=va=[];ya=0,ba=hd(),xa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ya++,t.then(Ca,Ca),t}function Ca(){if(--ya===0&&va!==null){xa!==null&&(xa.status=`fulfilled`);var e=va;va=null,ba=0,xa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function wa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ta=T.S;T.S=function(e,t){au=Ie(),typeof t==`object`&&t&&typeof t.then==`function`&&Sa(e,t),Ta!==null&&Ta(e,t)};var Ea=de(null);function Da(){var e=Ea.current;return e===null?V.pooledCache:e}function Oa(e,t){t===null?pe(Ea,Ea.current):pe(Ea,t.pool)}function ka(){var e=Da();return e===null?null:{parent:ha._currentValue,pool:e}}var Aa=Error(i(460)),ja=Error(i(474)),Ma=Error(i(542)),Na={then:function(){}};function Pa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Fa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(dn,dn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,za(e),e;default:if(typeof t.status==`string`)t.then(dn,dn);else{if(e=V,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,za(e),e}throw La=t,Aa}}function Ia(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(La=e,Aa):e}}var La=null;function Ra(){if(La===null)throw Error(i(459));var e=La;return La=null,e}function za(e){if(e===Aa||e===Ma)throw Error(i(483))}var Ba=null,Va=0;function Ha(e){var t=Va;return Va+=1,Ba===null&&(Ba=[]),Fa(Ba,e,t)}function Ua(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Wa(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ga(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=bi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=wi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===w&&Ia(i)===t.type)?(t=a(t,n.props),Ua(t,n),t.return=e,t):(t=Si(n.type,n.key,n.props,null,e.mode,r),Ua(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ei(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ci(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=wi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=Si(t.type,t.key,t.props,null,e.mode,n),Ua(n,t),n.return=e,n;case g:return t=Ei(t,e.mode,n),t.return=e,t;case w:return t=Ia(t),f(e,t,n)}if(ce(t)||ae(t))return t=Ci(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ha(t),n);if(t.$$typeof===x)return f(e,ua(e,t),n);Wa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case w:return n=Ia(n),p(e,t,n,r)}if(ce(n)||ae(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ha(n),r);if(n.$$typeof===x)return p(e,t,ua(e,n),r);Wa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case w:return r=Ia(r),m(e,t,n,r,i)}if(ce(r)||ae(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ha(r),i);if(r.$$typeof===x)return m(e,t,n,ua(t,r),i);Wa(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),A&&Ri(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return A&&Ri(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),A&&Ri(i,h),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),A&&Ri(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return A&&Ri(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),A&&Ri(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===w&&Ia(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ua(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===_?(c=Ci(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=Si(o.type,o.key,o.props,null,e.mode,c),Ua(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}t(e,r),r=r.sibling}c=Ei(o,e.mode,c),c.return=e,e=c}return s(e);case w:return o=Ia(o),b(e,r,o,c)}if(ce(o))return v(e,r,o,c);if(ae(o)){if(l=ae(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ha(o),c);if(o.$$typeof===x)return b(e,r,ua(e,o),c);Wa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=wi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Va=0;var i=b(e,t,n,r);return Ba=null,i}catch(t){if(t===Aa||t===Ma)throw t;var a=vi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ka=Ga(!0),qa=Ga(!1),Ja=!1;function Ya(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,B&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=hi(e),mi(e,null,n),t}return di(e,r,t,n),hi(e)}function $a(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ut(e,n)}}function eo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var to=!1;function no(){if(to){var e=xa;if(e!==null)throw e}}function ro(e,t,n,r){to=!1;var i=e.updateQueue;Ja=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(U&f)===f:(r&f)===f){f!==0&&f===ba&&(to=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Ja=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Xl|=o,e.lanes=o,e.memoizedState=d}}function io(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function ao(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)io(n[e],t)}var oo=de(null),so=de(0);function co(e,t){e=Jl,pe(so,e),pe(oo,t),Jl=e|t.baseLanes}function lo(){pe(so,Jl),pe(oo,oo.current)}function uo(){Jl=so.current,fe(oo),fe(so)}var fo=de(null),po=null;function mo(e){var t=e.alternate;pe(yo,yo.current&1),pe(fo,e),po===null&&(t===null||oo.current!==null||t.memoizedState!==null)&&(po=e)}function ho(e){pe(yo,yo.current),pe(fo,e),po===null&&(po=e)}function go(e){e.tag===22?(pe(yo,yo.current),pe(fo,e),po===null&&(po=e)):_o(e)}function _o(){pe(yo,yo.current),pe(fo,fo.current)}function vo(e){fe(fo),po===e&&(po=null),fe(yo)}var yo=de(0);function bo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||lf(n)||uf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var xo=0,M=null,N=null,So=null,Co=!1,wo=!1,To=!1,Eo=0,Do=0,Oo=null,ko=0;function Ao(){throw Error(i(321))}function jo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Mr(e[n],t[n]))return!1;return!0}function Mo(e,t,n,r,i,a){return xo=a,M=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?qs:I,To=!1,a=n(r,i),To=!1,wo&&(a=Po(t,n,r,i)),No(e),a}function No(e){T.H=Ks;var t=N!==null&&N.next!==null;if(xo=0,So=N=M=null,Co=!1,Do=0,Oo=null,t)throw Error(i(300));e===null||uc||(e=e.dependencies,e!==null&&sa(e)&&(uc=!0))}function Po(e,t,n,r){M=e;var a=0;do{if(wo&&(Oo=null),Do=0,wo=!1,25<=a)throw Error(i(301));if(a+=1,So=N=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}T.H=Js,o=t(n,r)}while(wo);return o}function Fo(){var e=T.H,t=e.useState()[0];return t=typeof t.then==`function`?Ho(t):t,e=e.useState()[0],(N===null?null:N.memoizedState)!==e&&(M.flags|=1024),t}function Io(){var e=Eo!==0;return Eo=0,e}function Lo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ro(e){if(Co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Co=!1}xo=0,So=N=M=null,wo=!1,Do=Eo=0,Oo=null}function zo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return So===null?M.memoizedState=So=e:So=So.next=e,So}function Bo(){if(N===null){var e=M.alternate;e=e===null?null:e.memoizedState}else e=N.next;var t=So===null?M.memoizedState:So.next;if(t!==null)So=t,N=e;else{if(e===null)throw M.alternate===null?Error(i(467)):Error(i(310));N=e,e={memoizedState:N.memoizedState,baseState:N.baseState,baseQueue:N.baseQueue,queue:N.queue,next:null},So===null?M.memoizedState=So=e:So=So.next=e}return So}function Vo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ho(e){var t=Do;return Do+=1,Oo===null&&(Oo=[]),e=Fa(Oo,e,t),t=M,(So===null?t.memoizedState:So.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?qs:I),e}function Uo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ho(e);if(e.$$typeof===x)return la(e)}throw Error(i(438,String(e)))}function Wo(e){var t=null,n=M.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=M.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Vo(),M.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=re;return t.index++,n}function Go(e,t){return typeof t==`function`?t(e):t}function P(e){return Ko(Bo(),N,e)}function Ko(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(xo&f)===f:(U&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ba&&(d=!0);else if((xo&p)===p){u=u.next,p===ba&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,M.lanes|=p,Xl|=p;f=u.action,To&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,M.lanes|=f,Xl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Mr(o,e.memoizedState)&&(uc=!0,d&&(n=xa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function qo(e){var t=Bo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Mr(o,t.memoizedState)||(uc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Jo(e,t,n){var r=M,a=Bo(),o=A;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Mr((N||a).memoizedState,n);if(s&&(a.memoizedState=n,uc=!0),a=a.queue,ys(Zo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||So!==null&&So.memoizedState.tag&1){if(r.flags|=2048,ms(9,{destroy:void 0},Xo.bind(null,r,a,n,t),null),V===null)throw Error(i(349));o||xo&127||Yo(r,t,n)}return n}function Yo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=M.updateQueue,t===null?(t=Vo(),M.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Xo(e,t,n,r){t.value=n,t.getSnapshot=r,Qo(t)&&$o(e)}function Zo(e,t,n){return n(function(){Qo(t)&&$o(e)})}function Qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Mr(e,n)}catch{return!0}}function $o(e){var t=pi(e,2);t!==null&&bu(t,e,2)}function es(e){var t=zo();if(typeof e==`function`){var n=e;if(e=n(),To){qe(!0);try{n()}finally{qe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:e},t}function ts(e,t,n,r){return e.baseState=n,Ko(e,N,typeof r==`function`?r:Go)}function ns(e,t,n,r,a){if(Ws(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};T.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,rs(t,o)):(o.next=n.next,t.pending=n.next=o)}}function rs(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=T.T,o={};T.T=o;try{var s=n(i,r),c=T.S;c!==null&&c(o,s),is(e,t,s)}catch(n){os(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),T.T=a}}else try{a=n(i,r),is(e,t,a)}catch(n){os(e,t,n)}}function is(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){as(e,t,n)},function(n){return os(e,t,n)}):as(e,t,n)}function as(e,t,n){t.status=`fulfilled`,t.value=n,ss(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,rs(e,n)))}function os(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ss(t),t=t.next;while(t!==r)}e.action=null}function ss(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function cs(e,t){return t}function ls(e,t){if(A){var n=V.formState;if(n!==null){a:{var r=M;if(A){if(k){b:{for(var i=k,a=Gi;i.nodeType!==8;){if(!a){i=null;break b}if(i=df(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){k=df(i.nextSibling),r=i.data===`F!`;break a}}Ki(r)}r=!1}r&&(t=n[0])}}return n=zo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:t},n.queue=r,n=Vs.bind(null,M,r),r.dispatch=n,r=es(!1),a=Us.bind(null,M,!1,r.queue),r=zo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=ns.bind(null,M,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function us(e){return ds(Bo(),N,e)}function ds(e,t,n){if(t=Ko(e,t,cs)[0],e=P(Go)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ho(t)}catch(e){throw e===Aa?Ma:e}else r=t;t=Bo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(M.flags|=2048,ms(9,{destroy:void 0},fs.bind(null,i,n),null)),[r,a,e]}function fs(e,t){e.action=t}function ps(e){var t=Bo(),n=N;if(n!==null)return ds(t,n,e);Bo(),t=t.memoizedState,n=Bo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ms(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=M.updateQueue,t===null&&(t=Vo(),M.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function hs(){return Bo().memoizedState}function gs(e,t,n,r){var i=zo();M.flags|=e,i.memoizedState=ms(1|t,{destroy:void 0},n,r===void 0?null:r)}function _s(e,t,n,r){var i=Bo();r=r===void 0?null:r;var a=i.memoizedState.inst;N!==null&&r!==null&&jo(r,N.memoizedState.deps)?i.memoizedState=ms(t,a,n,r):(M.flags|=e,i.memoizedState=ms(1|t,a,n,r))}function vs(e,t){gs(8390656,8,e,t)}function ys(e,t){_s(2048,8,e,t)}function bs(e){M.flags|=4;var t=M.updateQueue;if(t===null)t=Vo(),M.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function xs(e){var t=Bo().memoizedState;return bs({ref:t,nextImpl:e}),function(){if(B&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Ss(e,t){return _s(4,2,e,t)}function Cs(e,t){return _s(4,4,e,t)}function ws(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ts(e,t,n){n=n==null?null:n.concat([e]),_s(4,4,ws.bind(null,t,e),n)}function Es(){}function Ds(e,t){var n=Bo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&jo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Os(e,t){var n=Bo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&jo(t,r[1]))return r[0];if(r=e(),To){qe(!0);try{e()}finally{qe(!1)}}return n.memoizedState=[r,t],r}function ks(e,t,n){return n===void 0||xo&1073741824&&!(U&261930)?e.memoizedState=t:(e.memoizedState=n,e=yu(),M.lanes|=e,Xl|=e,n)}function As(e,t,n,r){return Mr(n,t)?n:oo.current===null?!(xo&42)||xo&1073741824&&!(U&261930)?(uc=!0,e.memoizedState=n):(e=yu(),M.lanes|=e,Xl|=e,t):(e=ks(e,n,r),Mr(e,t)||(uc=!0),e)}function js(e,t,n,r,i){var a=E.p;E.p=a!==0&&8>a?a:8;var o=T.T,s={};T.T=s,Us(e,!1,t,n);try{var c=i(),l=T.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Hs(e,t,wa(c,r),vu(e)):Hs(e,t,r,vu(e))}catch(n){Hs(e,t,{then:function(){},status:`rejected`,reason:n},vu())}finally{E.p=a,o!==null&&s.types!==null&&(o.types=s.types),T.T=o}}function Ms(){}function Ns(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ps(e).queue;js(e,a,t,D,n===null?Ms:function(){return Fs(e),n(r)})}function Ps(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:D,baseState:D,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:D},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Fs(e){var t=Ps(e);t.next===null&&(t=e.alternate.memoizedState),Hs(e,t.next.queue,{},vu())}function Is(){return la(tp)}function Ls(){return Bo().memoizedState}function Rs(){return Bo().memoizedState}function zs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=vu();e=Za(n);var r=Qa(t,e,n);r!==null&&(bu(r,t,n),$a(r,t,n)),t={cache:ga()},e.payload=t;return}t=t.return}}function Bs(e,t,n){var r=vu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ws(e)?Gs(t,n):(n=fi(e,t,n,r),n!==null&&(bu(n,e,r),F(n,t,r)))}function Vs(e,t,n){Hs(e,t,n,vu())}function Hs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ws(e))Gs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Mr(s,o))return di(e,t,i,0),V===null&&ui(),!1}catch{}if(n=fi(e,t,i,r),n!==null)return bu(n,e,r),F(n,t,r),!0}return!1}function Us(e,t,n,r){if(r={lane:2,revertLane:hd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ws(e)){if(t)throw Error(i(479))}else t=fi(e,n,r,2),t!==null&&bu(t,e,2)}function Ws(e){var t=e.alternate;return e===M||t!==null&&t===M}function Gs(e,t){wo=Co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function F(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ut(e,n)}}var Ks={readContext:la,use:Uo,useCallback:Ao,useContext:Ao,useEffect:Ao,useImperativeHandle:Ao,useLayoutEffect:Ao,useInsertionEffect:Ao,useMemo:Ao,useReducer:Ao,useRef:Ao,useState:Ao,useDebugValue:Ao,useDeferredValue:Ao,useTransition:Ao,useSyncExternalStore:Ao,useId:Ao,useHostTransitionStatus:Ao,useFormState:Ao,useActionState:Ao,useOptimistic:Ao,useMemoCache:Ao,useCacheRefresh:Ao};Ks.useEffectEvent=Ao;var qs={readContext:la,use:Uo,useCallback:function(e,t){return zo().memoizedState=[e,t===void 0?null:t],e},useContext:la,useEffect:vs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),gs(4194308,4,ws.bind(null,t,e),n)},useLayoutEffect:function(e,t){return gs(4194308,4,e,t)},useInsertionEffect:function(e,t){gs(4,2,e,t)},useMemo:function(e,t){var n=zo();t=t===void 0?null:t;var r=e();if(To){qe(!0);try{e()}finally{qe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=zo();if(n!==void 0){var i=n(t);if(To){qe(!0);try{n(t)}finally{qe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Bs.bind(null,M,e),[r.memoizedState,e]},useRef:function(e){var t=zo();return e={current:e},t.memoizedState=e},useState:function(e){e=es(e);var t=e.queue,n=Vs.bind(null,M,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Es,useDeferredValue:function(e,t){return ks(zo(),e,t)},useTransition:function(){var e=es(!1);return e=js.bind(null,M,e.queue,!0,!1),zo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=M,a=zo();if(A){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),V===null)throw Error(i(349));U&127||Yo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,vs(Zo.bind(null,r,o,e),[e]),r.flags|=2048,ms(9,{destroy:void 0},Xo.bind(null,r,o,n,t),null),n},useId:function(){var e=zo(),t=V.identifierPrefix;if(A){var n=Li,r=Ii;n=(r&~(1<<32-Je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Eo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ko++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Is,useFormState:ls,useActionState:ls,useOptimistic:function(e){var t=zo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Us.bind(null,M,!0,n),n.dispatch=t,[e,t]},useMemoCache:Wo,useCacheRefresh:function(){return zo().memoizedState=zs.bind(null,M)},useEffectEvent:function(e){var t=zo(),n={impl:e};return t.memoizedState=n,function(){if(B&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},I={readContext:la,use:Uo,useCallback:Ds,useContext:la,useEffect:ys,useImperativeHandle:Ts,useInsertionEffect:Ss,useLayoutEffect:Cs,useMemo:Os,useReducer:P,useRef:hs,useState:function(){return P(Go)},useDebugValue:Es,useDeferredValue:function(e,t){return As(Bo(),N.memoizedState,e,t)},useTransition:function(){var e=P(Go)[0],t=Bo().memoizedState;return[typeof e==`boolean`?e:Ho(e),t]},useSyncExternalStore:Jo,useId:Ls,useHostTransitionStatus:Is,useFormState:us,useActionState:us,useOptimistic:function(e,t){return ts(Bo(),N,e,t)},useMemoCache:Wo,useCacheRefresh:Rs};I.useEffectEvent=xs;var Js={readContext:la,use:Uo,useCallback:Ds,useContext:la,useEffect:ys,useImperativeHandle:Ts,useInsertionEffect:Ss,useLayoutEffect:Cs,useMemo:Os,useReducer:qo,useRef:hs,useState:function(){return qo(Go)},useDebugValue:Es,useDeferredValue:function(e,t){var n=Bo();return N===null?ks(n,e,t):As(n,N.memoizedState,e,t)},useTransition:function(){var e=qo(Go)[0],t=Bo().memoizedState;return[typeof e==`boolean`?e:Ho(e),t]},useSyncExternalStore:Jo,useId:Ls,useHostTransitionStatus:Is,useFormState:ps,useActionState:ps,useOptimistic:function(e,t){var n=Bo();return N===null?(n.baseState=e,[e,n.queue.dispatch]):ts(n,N,e,t)},useMemoCache:Wo,useCacheRefresh:Rs};Js.useEffectEvent=xs;function Ys(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Xs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=vu(),i=Za(r);i.payload=t,n!=null&&(i.callback=n),t=Qa(e,i,r),t!==null&&(bu(t,e,r),$a(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=vu(),i=Za(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Qa(e,i,r),t!==null&&(bu(t,e,r),$a(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=vu(),r=Za(n);r.tag=2,t!=null&&(r.callback=t),t=Qa(e,r,n),t!==null&&(bu(t,e,n),$a(t,e,n))}};function Zs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Nr(n,r)||!Nr(i,a):!0}function Qs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Xs.enqueueReplaceState(t,t.state,null)}function $s(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function ec(e){oi(e)}function tc(e){console.error(e)}function nc(e){oi(e)}function rc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function ic(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function ac(e,t,n){return n=Za(n),n.tag=3,n.payload={element:null},n.callback=function(){rc(e,t)},n}function oc(e){return e=Za(e),e.tag=3,e}function sc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){ic(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){ic(t,n,r),typeof i!=`function`&&(cu===null?cu=new Set([this]):cu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function cc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&oa(t,n,a,!0),n=fo.current,n!==null){switch(n.tag){case 31:case 13:return po===null?Mu():n.alternate===null&&Yl===0&&(Yl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Na?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Xu(e,r,a)),!1;case 22:return n.flags|=65536,r===Na?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Xu(e,r,a)),!1}throw Error(i(435,n.tag))}return Xu(e,r,a),Mu(),!1}if(A)return t=fo.current,t===null?(r!==j&&(t=Error(i(423),{cause:r}),Qi(Oi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Oi(r,n),a=ac(e.stateNode,r,a),eo(e,a),Yl!==4&&(Yl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==j&&(e=Error(i(422),{cause:r}),Qi(Oi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Oi(o,n),tu===null?tu=[o]:tu.push(o),Yl!==4&&(Yl=2),t===null)return!0;r=Oi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=ac(n.stateNode,r,e),eo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(cu===null||!cu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=oc(a),sc(a,e,n,r),eo(n,a),!1}n=n.return}while(n!==null);return!1}var lc=Error(i(461)),uc=!1;function dc(e,t,n,r){t.child=e===null?qa(t,null,n,r):Ka(t,e.child,n,r)}function fc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ca(t),r=Mo(e,t,n,o,a,i),s=Io(),e!==null&&!uc?(Lo(e,t,i),Pc(e,t,i)):(A&&s&&Bi(t),t.flags|=1,dc(e,t,r,i),t.child)}function pc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!yi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,mc(e,t,a,r,i)):(e=Si(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Fc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Nr:n,n(o,r)&&e.ref===t.ref)return Pc(e,t,i)}return t.flags|=1,e=bi(a,r),e.ref=t.ref,e.return=t,t.child=e}function mc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Nr(a,r)&&e.ref===t.ref)if(uc=!1,t.pendingProps=r=a,Fc(e,i))e.flags&131072&&(uc=!0);else return t.lanes=e.lanes,Pc(e,t,i)}return Sc(e,t,n,r,i)}function hc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return _c(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Oa(t,a===null?null:a.cachePool),a===null?lo():co(t,a),go(t);else return r=t.lanes=536870912,_c(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Oa(t,null),lo(),_o(t)):(Oa(t,a.cachePool),co(t,a),_o(t),t.memoizedState=null);return dc(e,t,i,n),t.child}function gc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function _c(e,t,n,r,i){var a=Da();return a=a===null?null:{parent:ha._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Oa(t,null),lo(),go(t),e!==null&&oa(e,t,r,!0),t.childLanes=i,null}function vc(e,t){return t=jc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function yc(e,t,n){return Ka(t,e.child,null,n),e=vc(t,t.pendingProps),e.flags|=2,vo(t),t.memoizedState=null,e}function bc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(A){if(r.mode===`hidden`)return e=vc(t,r),t.lanes=536870912,gc(null,e);if(ho(t),(e=k)?(e=cf(e,Gi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fi===null?null:{id:Ii,overflow:Li},retryLane:536870912,hydrationErrors:null},n=Ti(e),n.return=t,t.child=n,Ui=t,k=null)):e=null,e===null)throw Ki(t);return t.lanes=536870912,null}return vc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ho(t),a)if(t.flags&256)t.flags&=-257,t=yc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(uc||oa(e,t,n,!1),a=(n&e.childLanes)!==0,uc||a){if(r=V,r!==null&&(s=dt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,pi(e,s),bu(r,e,s),lc;Mu(),t=yc(e,t,n)}else e=o.treeContext,k=df(s.nextSibling),Ui=t,A=!0,Wi=null,Gi=!1,e!==null&&Hi(t,e),t=vc(t,r),t.flags|=4096;return t}return e=bi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function xc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Sc(e,t,n,r,i){return ca(t),n=Mo(e,t,n,r,void 0,i),r=Io(),e!==null&&!uc?(Lo(e,t,i),Pc(e,t,i)):(A&&r&&Bi(t),t.flags|=1,dc(e,t,n,i),t.child)}function Cc(e,t,n,r,i,a){return ca(t),t.updateQueue=null,n=Po(t,r,n,i),No(e),r=Io(),e!==null&&!uc?(Lo(e,t,a),Pc(e,t,a)):(A&&r&&Bi(t),t.flags|=1,dc(e,t,n,a),t.child)}function wc(e,t,n,r,i){if(ca(t),t.stateNode===null){var a=gi,o=n.contextType;typeof o==`object`&&o&&(a=la(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Xs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ya(t),o=n.contextType,a.context=typeof o==`object`&&o?la(o):gi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ys(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Xs.enqueueReplaceState(a,a.state,null),ro(t,r,a,i),no(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=$s(n,s);a.props=c;var l=a.context,u=n.contextType;o=gi,typeof u==`object`&&u&&(o=la(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Qs(t,a,r,o),Ja=!1;var f=t.memoizedState;a.state=f,ro(t,r,a,i),no(),l=t.memoizedState,s||f!==l||Ja?(typeof d==`function`&&(Ys(t,n,d,r),l=t.memoizedState),(c=Ja||Zs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Xa(e,t),o=t.memoizedProps,u=$s(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=gi,typeof l==`object`&&l&&(c=la(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Qs(t,a,r,c),Ja=!1,f=t.memoizedState,a.state=f,ro(t,r,a,i),no();var p=t.memoizedState;o!==d||f!==p||Ja||e!==null&&e.dependencies!==null&&sa(e.dependencies)?(typeof s==`function`&&(Ys(t,n,s,r),p=t.memoizedState),(u=Ja||Zs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&sa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,xc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ka(t,e.child,null,i),t.child=Ka(t,null,n,i)):dc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Pc(e,t,i),e}function Tc(e,t,n,r){return Xi(),t.flags|=256,dc(e,t,n,r),t.child}var Ec={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dc(e){return{baseLanes:e,cachePool:ka()}}function Oc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=$l),e}function kc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(yo.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(A){if(a?mo(t):_o(t),(e=k)?(e=cf(e,Gi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fi===null?null:{id:Ii,overflow:Li},retryLane:536870912,hydrationErrors:null},n=Ti(e),n.return=t,t.child=n,Ui=t,k=null)):e=null,e===null)throw Ki(t);return uf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(_o(t),a=t.mode,c=jc({mode:`hidden`,children:c},a),r=Ci(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Dc(n),r.childLanes=Oc(e,s,n),t.memoizedState=Ec,gc(null,r)):(mo(t),Ac(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(mo(t),t.flags&=-257,t=Mc(e,t,n)):t.memoizedState===null?(_o(t),c=r.fallback,a=t.mode,r=jc({mode:`visible`,children:r.children},a),c=Ci(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ka(t,e.child,null,n),r=t.child,r.memoizedState=Dc(n),r.childLanes=Oc(e,s,n),t.memoizedState=Ec,t=gc(null,r)):(_o(t),t.child=e.child,t.flags|=128,t=null);else if(mo(t),uf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Qi({value:r,source:null,stack:null}),t=Mc(e,t,n)}else if(uc||oa(e,t,n,!1),s=(n&e.childLanes)!==0,uc||s){if(s=V,s!==null&&(r=dt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,pi(e,r),bu(s,e,r),lc;lf(c)||Mu(),t=Mc(e,t,n)}else lf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,k=df(c.nextSibling),Ui=t,A=!0,Wi=null,Gi=!1,e!==null&&Hi(t,e),t=Ac(t,r.children),t.flags|=4096);return t}return a?(_o(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=bi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=Ci(c,a,n,null),c.flags|=2):c=bi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,gc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Dc(n):(a=c.cachePool,a===null?a=ka():(l=ha._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Oc(e,s,n),t.memoizedState=Ec,gc(e.child,r)):(mo(t),n=e.child,e=n.sibling,n=bi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Ac(e,t){return t=jc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function jc(e,t){return e=vi(22,e,null,t),e.lanes=0,e}function Mc(e,t,n){return Ka(t,e.child,null,n),e=Ac(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function L(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ia(e.return,t,n)}function R(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Nc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=yo.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,pe(yo,o),dc(e,t,r,n),r=A?Mi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&L(e,n,t);else if(e.tag===19)L(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&bo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),R(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&bo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}R(t,!0,n,null,a,r);break;case`together`:R(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Pc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(oa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=bi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=bi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Fc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&sa(e)))}function Ic(e,t,n){switch(t.tag){case 3:ve(t,t.stateNode.containerInfo),na(t,ha,e.memoizedState.cache),Xi();break;case 27:case 5:be(t);break;case 4:ve(t,t.stateNode.containerInfo);break;case 10:na(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ho(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(mo(t),e=Pc(e,t,n),e===null?null:e.sibling):kc(e,t,n):(mo(t),t.flags|=128,null);mo(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(oa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Nc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),pe(yo,yo.current),r)break;return null;case 22:return t.lanes=0,hc(e,t,n,t.pendingProps);case 24:na(t,ha,e.memoizedState.cache)}return Pc(e,t,n)}function Lc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)uc=!0;else{if(!Fc(e,n)&&!(t.flags&128))return uc=!1,Ic(e,t,n);uc=!!(e.flags&131072)}else uc=!1,A&&t.flags&1048576&&zi(t,Mi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ia(t.elementType),t.type=e,typeof e==`function`)yi(e)?(r=$s(e,r),t.tag=1,t=wc(null,t,e,r,n)):(t.tag=0,t=Sc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===S){t.tag=11,t=fc(null,t,e,r,n);break a}if(a===te){t.tag=14,t=pc(null,t,e,r,n);break a}}throw t=se(e)||e,Error(i(306,t,``))}}return t;case 0:return Sc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=$s(r,t.pendingProps),wc(e,t,r,a,n);case 3:a:{if(ve(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Xa(e,t),ro(t,r,null,n);var s=t.memoizedState;if(r=s.cache,na(t,ha,r),r!==o.cache&&aa(t,[ha],n,!0),no(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Tc(e,t,r,n);break a}else if(r!==a){a=Oi(Error(i(424)),t),Qi(a),t=Tc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(k=df(e.firstChild),Ui=t,A=!0,Wi=null,Gi=!0,n=qa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Xi(),r===a){t=Pc(e,t,n);break a}dc(e,t,r,n)}t=t.child}return t;case 26:return xc(e,t),e===null?(n=Mf(t.type,null,t.pendingProps,null))?t.memoizedState=n:A||(n=t.type,e=t.pendingProps,r=Wd(ge.current).createElement(n),r[_t]=t,r[vt]=e,Rd(r,n,e),At(r),t.stateNode=r):t.memoizedState=Mf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return be(t),e===null&&A&&(r=t.stateNode=hf(t.type,t.pendingProps,ge.current),Ui=t,Gi=!0,a=k,tf(t.type)?(ff=a,k=df(r.firstChild)):k=a),dc(e,t,t.pendingProps.children,n),xc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&A&&((a=r=k)&&(r=of(r,t.type,t.pendingProps,Gi),r===null?a=!1:(t.stateNode=r,Ui=t,k=df(r.firstChild),Gi=!1,a=!0)),a||Ki(t)),be(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,qd(a,o)?r=null:s!==null&&qd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Mo(e,t,Fo,null,null,n),tp._currentValue=a),xc(e,t),dc(e,t,r,n),t.child;case 6:return e===null&&A&&((e=n=k)&&(n=sf(n,t.pendingProps,Gi),n===null?e=!1:(t.stateNode=n,Ui=t,k=null,e=!0)),e||Ki(t)),null;case 13:return kc(e,t,n);case 4:return ve(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ka(t,null,r,n):dc(e,t,r,n),t.child;case 11:return fc(e,t,t.type,t.pendingProps,n);case 7:return dc(e,t,t.pendingProps,n),t.child;case 8:return dc(e,t,t.pendingProps.children,n),t.child;case 12:return dc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,na(t,t.type,r.value),dc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ca(t),a=la(a),r=r(a),t.flags|=1,dc(e,t,r,n),t.child;case 14:return pc(e,t,t.type,t.pendingProps,n);case 15:return mc(e,t,t.type,t.pendingProps,n);case 19:return Nc(e,t,n);case 31:return bc(e,t,n);case 22:return hc(e,t,n,t.pendingProps);case 24:return ca(t),r=la(ha),e===null?(a=Da(),a===null&&(a=V,o=ga(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ya(t),na(t,ha,a)):((e.lanes&n)!==0&&(Xa(e,t),ro(t,null,null,n),no()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,na(t,ha,r),r!==a.cache&&aa(t,[ha],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),na(t,ha,r))),dc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Rc(e){e.flags|=4}function zc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(ku())e.flags|=8192;else throw La=Na,ja}else e.flags&=-16777217}function Bc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!qf(t))if(ku())e.flags|=8192;else throw La=Na,ja}function Vc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:at(),e.lanes|=t,eu|=t)}function Hc(e,t){if(!A)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Uc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Wc(e,t,n){var r=t.pendingProps;switch(Vi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Uc(t),null;case 1:return Uc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ra(ha),ye(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Yi(t)?Rc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Zi())),Uc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Rc(t),o===null?(Uc(t),zc(t,a,null,r,n)):(Uc(t),Bc(t,o))):o?o===e.memoizedState?(Uc(t),t.flags&=-16777217):(Rc(t),Uc(t),Bc(t,o)):(e=e.memoizedProps,e!==r&&Rc(t),Uc(t),zc(t,a,e,r,n)),null;case 27:if(Se(t),n=ge.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Uc(t),null}e=me.current,Yi(t)?qi(t,e):(e=hf(a,r,n),t.stateNode=e,Rc(t))}return Uc(t),null;case 5:if(Se(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Uc(t),null}if(o=me.current,Yi(t))qi(t,o);else{var s=Wd(ge.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[_t]=t,o[vt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Rd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Rc(t)}}return Uc(t),zc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ge.current,Yi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ui,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[_t]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Id(e.nodeValue,n)),e||Ki(t,!0)}else e=Wd(e).createTextNode(r),e[_t]=t,t.stateNode=e}return Uc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Yi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[_t]=t}else Xi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),e=!1}else n=Zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(vo(t),t):(vo(t),null);if(t.flags&128)throw Error(i(558))}return Uc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Yi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[_t]=t}else Xi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),a=!1}else a=Zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(vo(t),t):(vo(t),null)}return vo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Vc(t,t.updateQueue),Uc(t),null);case 4:return ye(),e===null&&Ed(t.stateNode.containerInfo),Uc(t),null;case 10:return ra(t.type),Uc(t),null;case 19:if(fe(yo),r=t.memoizedState,r===null)return Uc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null)if(a)Hc(r,!1);else{if(Yl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=bo(e),o!==null){for(t.flags|=128,Hc(r,!1),e=o.updateQueue,t.updateQueue=e,Vc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)xi(n,e),n=n.sibling;return pe(yo,yo.current&1|2),A&&Ri(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ie()>ou&&(t.flags|=128,a=!0,Hc(r,!1),t.lanes=4194304)}else{if(!a)if(e=bo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Vc(t,e),Hc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!A)return Uc(t),null}else 2*Ie()-r.renderingStartTime>ou&&n!==536870912&&(t.flags|=128,a=!0,Hc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Uc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ie(),e.sibling=null,n=yo.current,pe(yo,a?n&1|2:n&1),A&&Ri(t,r.treeForkCount),e);case 22:case 23:return vo(t),uo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Uc(t),t.subtreeFlags&6&&(t.flags|=8192)):Uc(t),n=t.updateQueue,n!==null&&Vc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&fe(Ea),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ra(ha),Uc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Gc(e,t){switch(Vi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ra(ha),ye(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Se(t),null;case 31:if(t.memoizedState!==null){if(vo(t),t.alternate===null)throw Error(i(340));Xi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(vo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Xi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return fe(yo),null;case 4:return ye(),null;case 10:return ra(t.type),null;case 22:case 23:return vo(t),uo(),e!==null&&fe(Ea),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ra(ha),null;case 25:return null;default:return null}}function Kc(e,t){switch(Vi(t),t.tag){case 3:ra(ha),ye();break;case 26:case 27:case 5:Se(t);break;case 4:ye();break;case 31:t.memoizedState!==null&&vo(t);break;case 13:vo(t);break;case 19:fe(yo);break;case 10:ra(t.type);break;case 22:case 23:vo(t),uo(),e!==null&&fe(Ea);break;case 24:ra(ha)}}function qc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){K(t,t.return,e)}}function Jc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){K(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){K(t,t.return,e)}}function Yc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ao(t,n)}catch(t){K(e,e.return,t)}}}function Xc(e,t,n){n.props=$s(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){K(e,t,n)}}function Zc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){K(e,t,n)}}function Qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){K(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){K(e,t,n)}else n.current=null}function $c(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){K(e,e.return,t)}}function el(e,t,n){try{var r=e.stateNode;zd(r,e.type,n,t),r[vt]=t}catch(t){K(e,e.return,t)}}function tl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&tf(e.type)||e.tag===4}function nl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||tl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&tf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=dn));else if(r!==4&&(r===27&&tf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&tf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Rd(t,r,n),t[_t]=e,t[vt]=n}catch(t){K(e,e.return,t)}}var ol=!1,sl=!1,cl=!1,ll=typeof WeakSet==`function`?WeakSet:Set,ul=null;function dl(e,t){if(e=e.containerInfo,Hd=up,e=Lr(e),Rr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Ud={focusedElem:e,selectionRange:n},up=!1,ul=t;ul!==null;)if(t=ul,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ul=e;else for(;ul!==null;){switch(t=ul,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=$s(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){K(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)af(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:af(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ul=e;break}ul=t.return}}function fl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:El(e,n),r&4&&qc(5,n);break;case 1:if(El(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){K(n,n.return,e)}else{var i=$s(n.type,t.memoizedProps);t=t.memoizedState;
vendor: 5,379 bytes, line 9
9try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){K(n,n.return,e)}}r&64&&Yc(n),r&512&&Zc(n,n.return);break;case 3:if(El(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{ao(e,t)}catch(e){K(n,n.return,e)}}break;case 27:t===null&&r&4&&al(n);case 26:case 5:El(e,n),t===null&&r&4&&$c(n),r&512&&Zc(n,n.return);break;case 12:El(e,n);break;case 31:El(e,n),r&4&&_l(e,n);break;case 13:El(e,n),r&4&&vl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=$u.bind(null,n),X(e,n))));break;case 22:if(r=n.memoizedState!==null||ol,!r){t=t!==null&&t.memoizedState!==null||sl,i=ol;var a=sl;ol=r,(sl=t)&&!a?Ol(e,n,!!(n.subtreeFlags&8772)):El(e,n),ol=i,sl=a}break;case 30:break;default:El(e,n)}}function pl(e){var t=e.alternate;t!==null&&(e.alternate=null,pl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Tt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var z=null,ml=!1;function hl(e,t,n){for(n=n.child;n!==null;)gl(e,t,n),n=n.sibling}function gl(e,t,n){if(Ke&&typeof Ke.onCommitFiberUnmount==`function`)try{Ke.onCommitFiberUnmount(Ge,n)}catch{}switch(n.tag){case 26:sl||Qc(n,t),hl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:sl||Qc(n,t);var r=z,i=ml;tf(n.type)&&(z=n.stateNode,ml=!1),hl(e,t,n),gf(n.stateNode),z=r,ml=i;break;case 5:sl||Qc(n,t);case 6:if(r=z,i=ml,z=null,hl(e,t,n),z=r,ml=i,z!==null)if(ml)try{(z.nodeType===9?z.body:z.nodeName===`HTML`?z.ownerDocument.body:z).removeChild(n.stateNode)}catch(e){K(n,t,e)}else try{z.removeChild(n.stateNode)}catch(e){K(n,t,e)}break;case 18:z!==null&&(ml?(e=z,nf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Fp(e)):nf(z,n.stateNode));break;case 4:r=z,i=ml,z=n.stateNode.containerInfo,ml=!0,hl(e,t,n),z=r,ml=i;break;case 0:case 11:case 14:case 15:Jc(2,n,t),sl||Jc(4,n,t),hl(e,t,n);break;case 1:sl||(Qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Xc(n,t,r)),hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:sl=(r=sl)||n.memoizedState!==null,hl(e,t,n),sl=r;break;default:hl(e,t,n)}}function _l(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fp(e)}catch(e){K(t,t.return,e)}}}function vl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fp(e)}catch(e){K(t,t.return,e)}}function yl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ll),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ll),t;default:throw Error(i(435,e.tag))}}function bl(e,t){var n=yl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=ed.bind(null,e,t);t.then(r,r)}})}function xl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(tf(c.type)){z=c.stateNode,ml=!1;break a}break;case 5:z=c.stateNode,ml=!1;break a;case 3:case 4:z=c.stateNode.containerInfo,ml=!0;break a}c=c.return}if(z===null)throw Error(i(160));gl(o,s,a),z=null,ml=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Cl(t,e),t=t.sibling}var Sl=null;function Cl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xl(t,e),wl(e),r&4&&(Jc(3,e,e.return),qc(3,e),Jc(5,e,e.return));break;case 1:xl(t,e),wl(e),r&512&&(sl||n===null||Qc(n,n.return)),r&64&&ol&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=Sl;if(xl(t,e),wl(e),r&512&&(sl||n===null||Qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[wt]||o[_t]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Rd(o,r,n),o[_t]=e,At(o),r=o;break a;case`link`:var s=Wf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Rd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Wf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Rd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[_t]=e,At(o),r=o}e.stateNode=r}else Gf(a,e.type,e.stateNode);else e.stateNode=zf(a,r,e.memoizedProps);
vendor: 62,681 bytes, lines 9-10
9else o===r?r===null&&e.stateNode!==null&&el(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Gf(a,e.type,e.stateNode):zf(a,r,e.memoizedProps))}break;case 27:xl(t,e),wl(e),r&512&&(sl||n===null||Qc(n,n.return)),n!==null&&r&4&&el(e,e.memoizedProps,n.memoizedProps);break;case 5:if(xl(t,e),wl(e),r&512&&(sl||n===null||Qc(n,n.return)),e.flags&32){a=e.stateNode;try{nn(a,``)}catch(t){K(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,el(e,a,n===null?a:n.memoizedProps)),r&1024&&(cl=!0);break;case 6:if(xl(t,e),wl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){K(e,e.return,t)}}break;case 3:if(Uf=null,a=Sl,Sl=yf(t.containerInfo),xl(t,e),Sl=a,wl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Fp(t.containerInfo)}catch(t){K(e,e.return,t)}cl&&(cl=!1,Tl(e));break;case 4:r=Sl,Sl=yf(e.stateNode.containerInfo),xl(t,e),wl(e),Sl=r;break;case 12:xl(t,e),wl(e);break;case 31:xl(t,e),wl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 13:xl(t,e),wl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(iu=Ie()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=ol,d=sl;if(ol=u||a,sl=d||l,xl(t,e),sl=d,ol=u,wl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||ol||sl||Dl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){K(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){K(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?rf(m,!0):rf(l.stateNode,!1)}catch(e){K(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,bl(e,n))));break;case 19:xl(t,e),wl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 30:break;case 21:break;default:xl(t,e),wl(e)}}function wl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(tl(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;il(e,nl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(nn(o,``),n.flags&=-33),il(e,nl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;rl(e,nl(e),s);break;default:throw Error(i(161))}}catch(t){K(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Tl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function El(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fl(e,t.alternate,t),t=t.sibling}function Dl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Jc(4,t,t.return),Dl(t);break;case 1:Qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Xc(t,t.return,n),Dl(t);break;case 27:gf(t.stateNode);case 26:case 5:Qc(t,t.return),Dl(t);break;case 22:t.memoizedState===null&&Dl(t);break;case 30:Dl(t);break;default:Dl(t)}e=e.sibling}}function Ol(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Ol(i,a,n),qc(4,a);break;case 1:if(Ol(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){K(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)io(c[i],s)}catch(e){K(r,r.return,e)}}n&&o&64&&Yc(a),Zc(a,a.return);break;case 27:al(a);case 26:case 5:Ol(i,a,n),n&&r===null&&o&4&&$c(a),Zc(a,a.return);break;case 12:Ol(i,a,n);break;case 31:Ol(i,a,n),n&&o&4&&_l(i,a);break;case 13:Ol(i,a,n),n&&o&4&&vl(i,a);break;case 22:a.memoizedState===null&&Ol(i,a,n),Zc(a,a.return);break;case 30:break;default:Ol(i,a,n)}t=t.sibling}}function kl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&_a(n))}function Al(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_a(e))}function jl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ml(e,t,n,r),t=t.sibling}function Ml(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:jl(e,t,n,r),i&2048&&qc(9,t);break;case 1:jl(e,t,n,r);break;case 3:jl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_a(e)));break;case 12:if(i&2048){jl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){K(t,t.return,e)}}else jl(e,t,n,r);break;case 31:jl(e,t,n,r);break;case 13:jl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?jl(e,t,n,r):(a._visibility|=2,Nl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?jl(e,t,n,r):Pl(e,t),i&2048&&kl(o,t);break;case 24:jl(e,t,n,r),i&2048&&Al(t.alternate,t);break;default:jl(e,t,n,r)}}function Nl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Nl(a,o,s,c,i),qc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Nl(a,o,s,c,i)):u._visibility&2?Nl(a,o,s,c,i):Pl(a,o),i&&l&2048&&kl(o.alternate,o);break;case 24:Nl(a,o,s,c,i),i&&l&2048&&Al(o.alternate,o);break;default:Nl(a,o,s,c,i)}t=t.sibling}}function Pl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Pl(n,r),i&2048&&kl(r.alternate,r);break;case 24:Pl(n,r),i&2048&&Al(r.alternate,r);break;default:Pl(n,r)}t=t.sibling}}var Fl=8192;function Il(e,t,n){if(e.subtreeFlags&Fl)for(e=e.child;e!==null;)Ll(e,t,n),e=e.sibling}function Ll(e,t,n){switch(e.tag){case 26:Il(e,t,n),e.flags&Fl&&e.memoizedState!==null&&Jf(n,Sl,e.memoizedState,e.memoizedProps);break;case 5:Il(e,t,n);break;case 3:case 4:var r=Sl;Sl=yf(e.stateNode.containerInfo),Il(e,t,n),Sl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Fl,Fl=16777216,Il(e,t,n),Fl=r):Il(e,t,n));break;default:Il(e,t,n)}}function Rl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function zl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Hl(r,e)}Rl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Bl(e),e=e.sibling}function Bl(e){switch(e.tag){case 0:case 11:case 15:zl(e),e.flags&2048&&Jc(9,e,e.return);break;case 3:zl(e);break;case 12:zl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Vl(e)):zl(e);break;default:zl(e)}}function Vl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Hl(r,e)}Rl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Jc(8,t,t.return),Vl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Vl(t));break;default:Vl(t)}e=e.sibling}}function Hl(e,t){for(;ul!==null;){var n=ul;switch(n.tag){case 0:case 11:case 15:Jc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:_a(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ul=r;else a:for(n=e;ul!==null;){r=ul;var i=r.sibling,a=r.return;if(pl(r),r===n){ul=null;break a}if(i!==null){i.return=a,ul=i;break a}ul=a}}}var Ul={getCacheForType:function(e){var t=la(ha),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return la(ha).controller.signal}},Wl=typeof WeakMap==`function`?WeakMap:Map,B=0,V=null,H=null,U=0,W=0,Gl=null,Kl=!1,G=!1,ql=!1,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=null,nu=null,ru=!1,iu=0,au=0,ou=1/0,su=null,cu=null,lu=0,uu=null,du=null,fu=0,pu=0,mu=null,hu=null,gu=0,_u=null;function vu(){return B&2&&U!==0?U&-U:T.T===null?mt():hd()}function yu(){if($l===0)if(!(U&536870912)||A){var e=$e;$e<<=1,!($e&3932160)&&($e=262144),$l=e}else $l=536870912;return e=fo.current,e!==null&&(e.flags|=32),$l}function bu(e,t,n){(e===V&&(W===2||W===9)||e.cancelPendingCommit!==null)&&(Du(e,0),wu(e,U,$l,!1)),st(e,n),(!(B&2)||e!==V)&&(e===V&&(!(B&2)&&(Zl|=n),Yl===4&&wu(e,U,$l,!1)),cd(e))}function xu(e,t,n){if(B&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||rt(e,t),a=r?Fu(e,t):Nu(e,t,!0),o=r;do{if(a===0){G&&!r&&wu(e,t,0,!1);break}if(n=e.current.alternate,o&&!Cu(n)){a=Nu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=tu;var l=c.current.memoizedState.isDehydrated;if(l&&(Du(c,s).flags|=256),s=Nu(c,s,!1),s!==2){if(ql&&!l){c.errorRecoveryDisabledLanes|=o,Zl|=o,a=4;break a}o=nu,nu=a,o!==null&&(nu===null?nu=o:nu.push.apply(nu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Du(e,0),wu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:wu(r,t,$l,!Kl);break a;case 2:nu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=iu+300-Ie(),10<a)){if(wu(r,t,$l,!Kl),nt(r,0,!0)!==0)break a;fu=t,r.timeoutHandle=Xd(Su.bind(null,r,n,nu,su,ru,t,$l,Zl,eu,Kl,o,`Throttled`,-0,0),a);break a}Su(r,n,nu,su,ru,t,$l,Zl,eu,Kl,o,null,-0,0)}break}while(1);cd(e)}function Su(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:dn},Ll(t,a,d);var m=(a&62914560)===a?iu-Ie():(a&4194048)===a?au-Ie():0;if(m=Xf(d,m),m!==null){fu=a,e.cancelPendingCommit=m(Hu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),wu(e,a,o,!l);return}}Hu(e,t,a,n,r,i,o,s,c)}function Cu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Mr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function wu(e,t,n,r){t&=~Ql,t&=~Zl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Je(i),o=1<<a;r[a]=-1,i&=~o}n!==0&<(e,n,t)}function Tu(){return B&6?!0:(ld(0,!1),!1)}function Eu(){if(H!==null){if(W===0)var e=H.return;else e=H,ta=ea=null,Ro(e),Ba=null,Va=0,e=H;for(;e!==null;)Kc(e.alternate,e),e=e.return;H=null}}function Du(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Zd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),fu=0,Eu(),V=e,H=n=bi(e.current,null),U=t,W=0,Gl=null,Kl=!1,G=rt(e,t),ql=!1,eu=$l=Ql=Zl=Xl=Yl=0,nu=tu=null,ru=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Je(r),a=1<<i;t|=e[i],r&=~a}return Jl=t,ui(),n}function Ou(e,t){M=null,T.H=Ks,t===Aa||t===Ma?(t=Ra(),W=3):t===ja?(t=Ra(),W=4):W=t===lc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Gl=t,H===null&&(Yl=1,rc(e,Oi(t,e.current)))}function ku(){var e=fo.current;return e===null?!0:(U&4194048)===U?po===null:(U&62914560)===U||U&536870912?e===po:!1}function Au(){var e=T.H;return T.H=Ks,e===null?Ks:e}function ju(){var e=T.A;return T.A=Ul,e}function Mu(){Yl=4,Kl||(U&4194048)!==U&&fo.current!==null||(G=!0),!(Xl&134217727)&&!(Zl&134217727)||V===null||wu(V,U,$l,!1)}function Nu(e,t,n){var r=B;B|=2;var i=Au(),a=ju();(V!==e||U!==t)&&(su=null,Du(e,t)),t=!1;var o=Yl;a:do try{if(W!==0&&H!==null){var s=H,c=Gl;switch(W){case 8:Eu(),o=6;break a;case 3:case 2:case 9:case 6:fo.current===null&&(t=!0);var l=W;if(W=0,Gl=null,zu(e,s,c,l),n&&G){o=0;break a}break;default:l=W,W=0,Gl=null,zu(e,s,c,l)}}Pu(),o=Yl;break}catch(t){Ou(e,t)}while(1);return t&&e.shellSuspendCounter++,ta=ea=null,B=r,T.H=i,T.A=a,H===null&&(V=null,U=0,ui()),o}function Pu(){for(;H!==null;)Lu(H)}function Fu(e,t){var n=B;B|=2;var r=Au(),a=ju();V!==e||U!==t?(su=null,ou=Ie()+500,Du(e,t)):G=rt(e,t);a:do try{if(W!==0&&H!==null){t=H;var o=Gl;b:switch(W){case 1:W=0,Gl=null,zu(e,t,o,1);break;case 2:case 9:if(Pa(o)){W=0,Gl=null,Ru(t);break}t=function(){W!==2&&W!==9||V!==e||(W=7),cd(e)},o.then(t,t);break a;case 3:W=7;break a;case 4:W=5;break a;case 7:Pa(o)?(W=0,Gl=null,Ru(t)):(W=0,Gl=null,zu(e,t,o,7));break;case 5:var s=null;switch(H.tag){case 26:s=H.memoizedState;case 5:case 27:var c=H;if(s?qf(s):c.stateNode.complete){W=0,Gl=null;var l=c.sibling;if(l!==null)H=l;else{var u=c.return;u===null?H=null:(H=u,Bu(u))}break b}}W=0,Gl=null,zu(e,t,o,5);break;case 6:W=0,Gl=null,zu(e,t,o,6);break;case 8:Eu(),Yl=6;break a;default:throw Error(i(462))}}Iu();break}catch(t){Ou(e,t)}while(1);return ta=ea=null,T.H=r,T.A=a,B=n,H===null?(V=null,U=0,ui(),Yl):0}function Iu(){for(;H!==null&&!Pe();)Lu(H)}function Lu(e){var t=Lc(e.alternate,e,Jl);e.memoizedProps=e.pendingProps,t===null?Bu(e):H=t}function Ru(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Cc(n,t,t.pendingProps,t.type,void 0,U);break;case 11:t=Cc(n,t,t.pendingProps,t.type.render,t.ref,U);break;case 5:Ro(t);default:Kc(n,t),t=H=xi(t,Jl),t=Lc(n,t,Jl)}e.memoizedProps=e.pendingProps,t===null?Bu(e):H=t}function zu(e,t,n,r){ta=ea=null,Ro(t),Ba=null,Va=0;var i=t.return;try{if(cc(e,i,t,n,U)){Yl=1,rc(e,Oi(n,e.current)),H=null;return}}catch(t){if(i!==null)throw H=i,t;Yl=1,rc(e,Oi(n,e.current)),H=null;return}t.flags&32768?(A||r===1?e=!0:G||U&536870912?e=!1:(Kl=e=!0,(r===2||r===9||r===3||r===6)&&(r=fo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Vu(t,e)):Bu(t)}function Bu(e){var t=e;do{if(t.flags&32768){Vu(t,Kl);return}e=t.return;var n=Wc(t.alternate,t,Jl);if(n!==null){H=n;return}if(t=t.sibling,t!==null){H=t;return}H=t=e}while(t!==null);Yl===0&&(Yl=5)}function Vu(e,t){do{var n=Gc(e.alternate,e);if(n!==null){n.flags&=32767,H=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){H=e;return}H=e=n}while(e!==null);Yl=6,H=null}function Hu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do qu();while(lu!==0);if(B&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=li,ct(e,n,o,s,c,l),e===V&&(H=V=null,U=0),du=t,uu=e,fu=n,pu=o,mu=a,hu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,td(Be,function(){return Ju(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=T.T,T.T=null,a=E.p,E.p=2,s=B,B|=4;try{dl(e,t,n)}finally{B=s,E.p=a,T.T=r}}lu=1,Uu(),Wu(),Gu()}}function Uu(){if(lu===1){lu=0;var e=uu,t=du,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=T.T,T.T=null;var r=E.p;E.p=2;var i=B;B|=4;try{Cl(t,e);var a=Ud,o=Lr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Ir(s.ownerDocument.documentElement,s)){if(c!==null&&Rr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Fr(s,h),v=Fr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}up=!!Hd,Ud=Hd=null}finally{B=i,E.p=r,T.T=n}}e.current=t,lu=2}}function Wu(){if(lu===2){lu=0;var e=uu,t=du,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=T.T,T.T=null;var r=E.p;E.p=2;var i=B;B|=4;try{fl(e,t.alternate,t)}finally{B=i,E.p=r,T.T=n}}lu=3}}function Gu(){if(lu===4||lu===3){lu=0,Fe();var e=uu,t=du,n=fu,r=hu;t.subtreeFlags&10256||t.flags&10256?lu=5:(lu=0,du=uu=null,Ku(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(cu=null),pt(n),t=t.stateNode,Ke&&typeof Ke.onCommitFiberRoot==`function`)try{Ke.onCommitFiberRoot(Ge,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=T.T,i=E.p,E.p=2,T.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{T.T=t,E.p=i}}fu&3&&qu(),cd(e),i=e.pendingLanes,n&261930&&i&42?e===_u?gu++:(gu=0,_u=e):gu=0,ld(0,!1)}}function Ku(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,_a(t)))}function qu(){return Uu(),Wu(),Gu(),Ju()}function Ju(){if(lu!==5)return!1;var e=uu,t=pu;pu=0;var n=pt(fu),r=T.T,a=E.p;try{E.p=32>n?32:n,T.T=null,n=mu,mu=null;var o=uu,s=fu;if(lu=0,du=uu=null,fu=0,B&6)throw Error(i(331));var c=B;if(B|=4,Bl(o.current),Ml(o,o.current,s,n),B=c,ld(0,!1),Ke&&typeof Ke.onPostCommitFiberRoot==`function`)try{Ke.onPostCommitFiberRoot(Ge,o)}catch{}return!0}finally{E.p=a,T.T=r,Ku(e,t)}}function Yu(e,t,n){t=Oi(n,t),t=ac(e.stateNode,t,2),e=Qa(e,t,2),e!==null&&(st(e,2),cd(e))}function K(e,t,n){if(e.tag===3)Yu(e,e,n);else for(;t!==null;){if(t.tag===3){Yu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(cu===null||!cu.has(r))){e=Oi(n,e),n=oc(2),r=Qa(t,n,2),r!==null&&(sc(n,r,t,e),st(r,2),cd(r));break}}t=t.return}}function Xu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Wl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(ql=!0,i.add(n),e=Zu.bind(null,e,t,n),t.then(e,e))}function Zu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,V===e&&(U&n)===n&&(Yl===4||Yl===3&&(U&62914560)===U&&300>Ie()-iu?!(B&2)&&Du(e,0):Ql|=n,eu===U&&(eu=0)),cd(e)}function Qu(e,t){t===0&&(t=at()),e=pi(e,t),e!==null&&(st(e,t),cd(e))}function $u(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qu(e,n)}function ed(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Qu(e,n)}function td(e,t){return Me(e,t)}var nd=null,rd=null,id=!1,ad=!1,od=!1,sd=0;function cd(e){e!==rd&&e.next===null&&(rd===null?nd=rd=e:rd=rd.next=e),ad=!0,id||(id=!0,md())}function ld(e,t){if(!od&&ad){od=!0;do for(var n=!1,r=nd;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,q(r,a))}else a=U,a=nt(r,r===V?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||rt(r,a)||(n=!0,q(r,a));r=r.next}while(n);od=!1}}function ud(){dd()}function dd(){ad=id=!1;var e=0;sd!==0&&Yd()&&(e=sd);for(var t=Ie(),n=null,r=nd;r!==null;){var i=r.next,a=fd(r,t);a===0?(r.next=null,n===null?nd=i:n.next=i,i===null&&(rd=n)):(n=r,(e!==0||a&3)&&(ad=!0)),r=i}lu!==0&&lu!==5||ld(e,!1),sd!==0&&(sd=0)}function fd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Je(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=it(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=V,n=U,n=nt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(W===2||W===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ne(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||rt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ne(r),pt(n)){case 2:case 8:n=ze;break;case 32:n=Be;break;case 268435456:n=He;break;default:n=Be}return r=pd.bind(null,e),n=Me(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ne(r),e.callbackPriority=2,e.callbackNode=null,2}function pd(e,t){if(lu!==0&&lu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(qu()&&e.callbackNode!==n)return null;var r=U;return r=nt(e,e===V?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(xu(e,r,t),fd(e,Ie()),e.callbackNode!=null&&e.callbackNode===n?pd.bind(null,e):null)}function q(e,t){if(qu())return null;xu(e,t,!0)}function md(){$d(function(){B&6?Me(Re,ud):dd()})}function hd(){if(sd===0){var e=ba;e===0&&(e=Qe,Qe<<=1,!(Qe&261888)&&(Qe=256)),sd=e}return sd}function gd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:un(``+e)}function _d(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function vd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=gd((i[vt]||null).action),o=r.submitter;o&&(t=(t=o[vt]||null)?gd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Mn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(sd!==0){var e=o?_d(i,o):new FormData(i);Ns(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?_d(i,o):new FormData(i),Ns(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var yd=0;yd<ii.length;yd++){var bd=ii[yd];ai(bd.toLowerCase(),`on`+(bd[0].toUpperCase()+bd.slice(1)))}ai(Xr,`onAnimationEnd`),ai(Zr,`onAnimationIteration`),ai(Qr,`onAnimationStart`),ai(`dblclick`,`onDoubleClick`),ai(`focusin`,`onFocus`),ai(`focusout`,`onBlur`),ai($r,`onTransitionRun`),ai(ei,`onTransitionStart`),ai(ti,`onTransitionCancel`),ai(ni,`onTransitionEnd`),Pt(`onMouseEnter`,[`mouseout`,`mouseover`]),Pt(`onMouseLeave`,[`mouseout`,`mouseover`]),Pt(`onPointerEnter`,[`pointerout`,`pointerover`]),Pt(`onPointerLeave`,[`pointerout`,`pointerover`]),Nt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Nt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Nt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Nt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Nt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Nt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var xd=`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(` `),Sd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(xd));function Cd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){oi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){oi(e)}i.currentTarget=null,a=c}}}}function J(e,t){var n=t[bt];n===void 0&&(n=t[bt]=new Set);var r=e+`__bubble`;n.has(r)||(Dd(t,e,2,!1),n.add(r))}function wd(e,t,n){var r=0;t&&(r|=4),Dd(n,e,r,t)}var Td=`_reactListening`+Math.random().toString(36).slice(2);function Ed(e){if(!e[Td]){e[Td]=!0,jt.forEach(function(t){t!==`selectionchange`&&(Sd.has(t)||wd(t,!1,e),wd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Td]||(t[Td]=!0,wd(`selectionchange`,!1,t))}}function Dd(e,t,n,r){switch(_p(t)){case 2:var i=dp;break;case 8:i=fp;break;default:i=pp}n=i.bind(null,t,n,e),i=void 0,!xn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Od(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=Et(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}vn(function(){var r=a,i=pn(n),o=[];a:{var c=ri.get(e);if(c!==void 0){var l=Mn,u=e;switch(e){case`keypress`:if(Dn(n)===0)break a;case`keydown`:case`keyup`:l=Xn;break;case`focusin`:u=`focus`,l=Vn;break;case`focusout`:u=`blur`,l=Vn;break;case`beforeblur`:case`afterblur`:l=Vn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=zn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Bn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Qn;break;case Xr:case Zr:case Qr:l=Hn;break;case ni:l=$n;break;case`scroll`:case`scrollend`:l=Pn;break;case`wheel`:l=er;break;case`copy`:case`cut`:case`paste`:l=Un;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Zn;break;case`toggle`:case`beforetoggle`:l=tr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=yn(m,p),g!=null&&d.push(kd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==fn&&(u=n.relatedTarget||n.fromElement)&&(Et(u)||u[yt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Et(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=zn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Zn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Ot(l),h=u==null?c:Ot(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Et(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=jd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Md(o,c,l,d,!1),u!==null&&f!==null&&Md(o,f,u,d,!0)}}a:{if(c=r?Ot(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=br;else if(O(c))if(xr)v=Ar;else{v=Or;var y=Dr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&sn(r.elementType)&&(v=br):v=kr;if(v&&=v(e,r)){hr(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Qt(c,`number`,c.value)}switch(y=r?Ot(r):window,e){case`focusin`:(O(y)||y.contentEditable===`true`)&&(Br=y,Vr=r,Hr=null);break;case`focusout`:Hr=Vr=Br=null;break;case`mousedown`:Ur=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ur=!1,Wr(o,n,i);break;case`selectionchange`:if(zr)break;case`keydown`:case`keyup`:Wr(o,n,i)}var b;if(rr)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else dr?lr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(or&&n.locale!==`ko`&&(dr||x!==`onCompositionStart`?x===`onCompositionEnd`&&dr&&(b=En()):(Cn=i,wn=`value`in Cn?Cn.value:Cn.textContent,dr=!0)),y=Ad(r,x),0<y.length&&(x=new Wn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=ur(n),b!==null&&(x.data=b)))),(b=ar?fr(e,n):pr(e,n))&&(x=Ad(r,`onBeforeInput`),0<x.length&&(y=new Wn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),vd(o,e,r,n,i)}Cd(o,t)})}function kd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ad(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=yn(e,n),i!=null&&r.unshift(kd(e,i,a)),i=yn(e,t),i!=null&&r.push(kd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function jd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Md(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=yn(n,a),l!=null&&o.unshift(kd(n,l,c))):i||(l=yn(n,a),l!=null&&o.push(kd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Nd=/\r\n?/g,Pd=/\u0000|\uFFFD/g;function Fd(e){return(typeof e==`string`?e:``+e).replace(Nd,` 10`).replace(Pd,``)}function Id(e,t){return t=Fd(t),Fd(e)===t}function Y(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||nn(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&nn(e,``+r);break;case`className`:Bt(e,`class`,r);break;case`tabIndex`:Bt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Bt(e,n,r);break;case`style`:on(e,r,o);break;case`data`:if(t!==`object`){Bt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=un(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Y(e,t,`name`,a.name,a,null),Y(e,t,`formEncType`,a.formEncType,a,null),Y(e,t,`formMethod`,a.formMethod,a,null),Y(e,t,`formTarget`,a.formTarget,a,null)):(Y(e,t,`encType`,a.encType,a,null),Y(e,t,`method`,a.method,a,null),Y(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=un(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=dn);break;case`onScroll`:r!=null&&J(`scroll`,e);break;case`onScrollEnd`:r!=null&&J(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=un(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:J(`beforetoggle`,e),J(`toggle`,e),zt(e,`popover`,r);break;case`xlinkActuate`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:zt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=cn.get(n)||n,zt(e,n,r))}}function Ld(e,t,n,r,a,o){switch(n){case`style`:on(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?nn(e,r):(typeof r==`number`||typeof r==`bigint`)&&nn(e,``+r);break;case`onScroll`:r!=null&&J(`scroll`,e);break;case`onScrollEnd`:r!=null&&J(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=dn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[vt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):zt(e,n,r)}}}function Rd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:J(`error`,e),J(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Y(e,t,o,s,n,null)}}a&&Y(e,t,`srcSet`,n.srcSet,n,null),r&&Y(e,t,`src`,n.src,n,null);return;case`input`:J(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Y(e,t,r,d,n,null)}}Zt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in J(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Y(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&$t(e,!!r,n,!0):$t(e,!!r,t,!1);return;case`textarea`:for(s in J(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Y(e,t,s,c,n,null)}tn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Y(e,t,l,r,n,null)}return;case`dialog`:J(`beforetoggle`,e),J(`toggle`,e),J(`cancel`,e),J(`close`,e);break;case`iframe`:case`object`:J(`load`,e);break;case`video`:case`audio`:for(r=0;r<xd.length;r++)J(xd[r],e);break;case`image`:J(`error`,e),J(`load`,e);break;case`details`:J(`toggle`,e);break;case`embed`:case`source`:case`link`:J(`error`,e),J(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Y(e,t,u,r,n,null)}return;default:if(sn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Ld(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Y(e,t,c,r,n,null))}function zd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Y(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Y(e,t,p,m,r,f)}}Xt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Y(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Y(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?$t(e,!!n,n?[]:``,!1):$t(e,!!n,t,!0)):$t(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Y(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Y(e,t,s,a,r,o)}en(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Y(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Y(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Y(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Y(e,t,u,p,r,m)}return;default:if(sn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Ld(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Ld(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Y(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Y(e,t,f,p,r,m)}function Bd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Vd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Bd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Bd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Hd=null,Ud=null;function Wd(e){return e.nodeType===9?e:e.ownerDocument}function Gd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Kd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function qd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Jd=null;function Yd(){var e=window.event;return e&&e.type===`popstate`?e!==Jd&&(Jd=e,!0):(Jd=null,!1)}var Xd=typeof setTimeout==`function`?setTimeout:void 0,Zd=typeof clearTimeout==`function`?clearTimeout:void 0,Qd=typeof Promise==`function`?Promise:void 0,$d=typeof queueMicrotask==`function`?queueMicrotask:Qd===void 0?Xd:function(e){return Qd.resolve(null).then(e).catch(ef)};function ef(e){setTimeout(function(){throw e})}function tf(e){return e===`head`}function nf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Fp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)gf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,gf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[wt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&gf(e.ownerDocument.body);n=i}while(n);Fp(t)}function rf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function af(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:af(n),Tt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function of(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[wt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=df(e.nextSibling),e===null)break}return null}function sf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=df(e.nextSibling),e===null))return null;return e}function cf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=df(e.nextSibling),e===null))return null;return e}function lf(e){return e.data===`$?`||e.data===`$~`}function uf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function X(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function df(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var ff=null;function pf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return df(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hf(e,t,n){switch(t=Wd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function gf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Tt(e)}var _f=new Map,vf=new Set;function yf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var bf=E.d;E.d={f:xf,r:Sf,D:Tf,C:Ef,L:Df,m:Of,X:Af,S:kf,M:jf};function xf(){var e=bf.f(),t=Tu();return e||t}function Sf(e){var t=Dt(e);t!==null&&t.tag===5&&t.type===`form`?Fs(t):bf.r(e)}var Cf=typeof document>`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=Yt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Rd(t,`link`,e),At(t),r.head.appendChild(t)))}}function Tf(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Ef(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Df(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Yt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Yt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Yt(n.imageSizes)+`"]`)):i+=`[href="`+Yt(e)+`"]`;var a=i;switch(t){case`style`:a=Nf(e);break;case`script`:a=Lf(e)}_f.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Pf(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),Rd(t,`link`,e),At(t),r.head.appendChild(t)))}}function Of(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Yt(r)+`"][href="`+Yt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!_f.has(a)&&(e=p({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),Rd(r,`link`,e),At(r),n.head.appendChild(r)}}}function kf(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=kt(r).hoistableStyles,a=Nf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Pf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);At(c),Rd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Af(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=kt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=p({src:e,async:!0},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),At(a),Rd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=kt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),At(a),Rd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t,n,r){var a=(a=ge.current)?yf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Nf(n.href),n=kt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Nf(n.href);var o=kt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Pf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},_f.set(e,n),o||If(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Lf(n),n=kt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Nf(e){return`href="`+Yt(e)+`"`}function Pf(e){return`link[rel="stylesheet"][`+e+`]`}function Ff(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function If(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Rd(t,`link`,n),At(t),e.head.appendChild(t))}function Lf(e){return`[src="`+Yt(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Yt(n.href)+`"]`);if(r)return t.instance=r,At(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),At(r),Rd(r,`style`,a),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Nf(n.href);var o=e.querySelector(Pf(a));if(o)return t.state.loading|=4,t.instance=o,At(o),o;r=Ff(n),(a=_f.get(a))&&Vf(r,a),o=(e.ownerDocument||e).createElement(`link`),At(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Rd(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(a=e.querySelector(Rf(o)))?(t.instance=a,At(a),a):(r=n,(a=_f.get(o))&&(r=p({},n),Hf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),At(a),Rd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Bf(r,n.precedence,e));return t.instance}function Bf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Uf=null;function Wf(e,t,n){if(Uf===null){var r=new Map,i=Uf=new Map;i.set(n,r)}else i=Uf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[wt]||a[_t]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Gf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Kf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Nf(r.href),a=t.querySelector(Pf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,At(a);return}a=t.ownerDocument||t,r=Ff(r),(i=_f.get(i))&&Vf(r,i),a=a.createElement(`link`),At(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Rd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Yf===0&&(Yf=62500*Vd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Zf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var tp={$$typeof:x,Provider:null,Consumer:null,_currentValue:D,_currentValue2:D,_threadCount:0};function np(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ot(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ot(0),this.hiddenUpdates=ot(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function rp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new np(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=vi(3,null,null,t),e.current=a,a.stateNode=e,t=ga(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ya(a),e}function ip(e){return e?(e=gi,e):gi}function ap(e,t,n,r,i,a){i=ip(i),r.context===null?r.context=i:r.pendingContext=i,r=Za(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Qa(e,r,t),n!==null&&(bu(n,e,t),$a(n,e,t))}function op(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sp(e,t){op(e,t),(e=e.alternate)&&op(e,t)}function cp(e){if(e.tag===13||e.tag===31){var t=pi(e,67108864);t!==null&&bu(t,e,67108864),sp(e,67108864)}}function lp(e){if(e.tag===13||e.tag===31){var t=vu();t=ft(t);var n=pi(e,t);n!==null&&bu(n,e,t),sp(e,t)}}var up=!0;function dp(e,t,n,r){var i=T.T;T.T=null;var a=E.p;try{E.p=2,pp(e,t,n,r)}finally{E.p=a,T.T=i}}function fp(e,t,n,r){var i=T.T;T.T=null;var a=E.p;try{E.p=8,pp(e,t,n,r)}finally{E.p=a,T.T=i}}function pp(e,t,n,r){if(up){var i=mp(r);if(i===null)Od(e,t,r,hp,n),Ep(e,r);else if(Op(i,e,t,n,r))r.stopPropagation();else if(Ep(e,r),t&4&&-1<Tp.indexOf(e)){for(;i!==null;){var a=Dt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=tt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Je(o);s.entanglements[1]|=c,o&=~c}cd(a),!(B&6)&&(ou=Ie()+500,ld(0,!1))}}break;case 31:case 13:s=pi(a,2),s!==null&&bu(s,a,2),Tu(),sp(a,2)}if(a=mp(r),a===null&&Od(e,t,r,hp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Od(e,t,r,null,n)}}function mp(e){return e=pn(e),gp(e)}var hp=null;function gp(e){if(hp=null,e=Et(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hp=e,null}function _p(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Le()){case Re:return 2;case ze:return 8;case Be:case Ve:return 32;case He:return 268435456;default:return 32}default:return 32}}var vp=!1,yp=null,bp=null,xp=null,Sp=new Map,Cp=new Map,wp=[],Tp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Ep(e,t){switch(e){case`focusin`:case`focusout`:yp=null;break;case`dragenter`:case`dragleave`:bp=null;break;case`mouseover`:case`mouseout`:xp=null;break;case`pointerover`:case`pointerout`:Sp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Cp.delete(t.pointerId)}}function Dp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Dt(t),t!==null&&cp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Op(e,t,n,r,i){switch(t){case`focusin`:return yp=Dp(yp,e,t,n,r,i),!0;case`dragenter`:return bp=Dp(bp,e,t,n,r,i),!0;case`mouseover`:return xp=Dp(xp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Sp.set(a,Dp(Sp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Cp.set(a,Dp(Cp.get(a)||null,e,t,n,r,i)),!0}return!1}function kp(e){var t=Et(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,ht(e.priority,function(){lp(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,ht(e.priority,function(){lp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ap(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);fn=r,n.target.dispatchEvent(r),fn=null}else return t=Dt(n),t!==null&&cp(t),e.blockedOn=n,!1;t.shift()}return!0}
10function jp(e,t,n){Ap(e)&&n.delete(t)}function Z(){vp=!1,yp!==null&&Ap(yp)&&(yp=null),bp!==null&&Ap(bp)&&(bp=null),xp!==null&&Ap(xp)&&(xp=null),Sp.forEach(jp),Cp.forEach(jp)}function Mp(e,n){e.blockedOn===n&&(e.blockedOn=null,vp||(vp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Z)))}var Np=null;function Pp(e){Np!==e&&(Np=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Np===e&&(Np=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(gp(r||n)===null)continue;break}var a=Dt(n);a!==null&&(e.splice(t,3),t-=3,Ns(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Fp(e){function t(t){return Mp(t,e)}yp!==null&&Mp(yp,e),bp!==null&&Mp(bp,e),xp!==null&&Mp(xp,e),Sp.forEach(t),Cp.forEach(t);for(var n=0;n<wp.length;n++){var r=wp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<wp.length&&(n=wp[0],n.blockedOn===null);)kp(n),n.blockedOn===null&&wp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[vt]||null;if(typeof a==`function`)o||Pp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[vt]||null)s=o.formAction;else if(gp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Pp(n)}}}function Ip(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Lp(e){this._internalRoot=e}Rp.prototype.render=Lp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ap(n,vu(),e,t,null,null)},Rp.prototype.unmount=Lp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ap(e.current,2,null,e,null,null),Tu(),t[yt]=null}};function Rp(e){this._internalRoot=e}Rp.prototype.unstable_scheduleHydration=function(e){if(e){var t=mt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wp.length&&t!==0&&t<wp[n].priority;n++);wp.splice(n,0,e),n===0&&kp(e)}};var zp=n.version;if(zp!==`19.2.8`)throw Error(i(527,zp,`19.2.8`));E.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Bp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:T,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Vp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vp.isDisabled&&Vp.supportsFiber)try{Ge=Vp.inject(Bp),Ke=Vp}catch{}}e.hydrateRoot=function(e,t,n){if(!a(e))throw Error(i(299));var r=!1,o=``,s=ec,c=tc,l=nc,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=rp(e,1,!0,t,n??null,r,o,u,s,c,l,Ip),t.context=ip(null),n=t.current,r=vu(),r=ft(r),o=Za(r),o.callback=null,Qa(n,o,r),n=r,t.current.lanes=n,st(t,n),cd(t),e[yt]=t.current,Ed(e),new Rp(t)}})),Te=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=we()})),Ee=`__TSS_CONTEXT`,De=Symbol.for(`TSS_SERVER_FUNCTION`),Oe=Symbol.for(`TSS_SERVER_FUNCTION_FACTORY`),ke=`application/x-tss-framed`;`${ke}`;var Ae=()=>window.__TSS_START_OPTIONS__;function je(e){return e.replaceAll(`\0`,`/`).replaceAll(`�`,`/`).replace(/~([~0r])/g,(e,t)=>t===`0`?`\0`:t===`r`?`�`:t)}function Me(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var Ne=4,Pe=5;function Fe(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function Ie(e,t,n){let r=e.substring(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.substring(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.substring(s,a);return[o?3:c?1:2,c||`_splat`,r.substring(0,i),e.substring(t+a+1,c?n:e.length)]}}return r}function Le(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,l=s.length,u=s.endsWith(`/`)?l-1:l,d=c?.caseSensitive??e,f=c?.params?.parse??c?.parseParams,p,m=a?n-1:0;if(!r||s.includes(`$`)){p=a?.slice()??[];let e=y(p);e&&typeof e!=`string`&&e[0]===2&&(p[p.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),u)],m=l)}for(;o<l;){let e=o,t=s.indexOf(`/`,e),n=t===-1?l:t,a=Ie(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;d?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=ze(r);c=n,t.set(e,n)}}else{let t=a[0],h=a[2],g=a[3]??``;if(t===2&&(n=l,o=n+1),p&&m<n&&(m<e-1&&p.push(s.substring(m,e-1)),a[2]=`/`+h,t===2&&a[3]!==void 0&&u<l&&(a[3]=g.slice(0,-1)),p.push(a),m=n),!r)continue;let _=d&&!!(h||g);d||(h=h.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!f&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===h&&e.suffix===g);if(y)c=y;else{let e=ze(r,t,_,h,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}p&&m<u&&p.push(s.substring(m,u));let h=p?.slice();if(!r)return h;
10if(f&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=ze(r,Pe);(r.pathless??=[]).push(e),r=e}let g=(t.path||!t.children)&&!t.isRoot;if(g&&u<l){let e=ze(r,Ne);r.index=e,r=e}return r.parse=f??null,r.priority=c?.params?.priority??0,r.route||(r.data=h,g&&(r.route=t)),[r,o,h]}function Re(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function ze(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Be(e,t){let n=ze(),r=[];function i(e,t,n,a){let[o,s,c]=Le(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(Re);t.masksTree=n,t.flatCache=Me(1e3)}function Ve(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Ge(e,t.masksTree);return t.flatCache.set(e,r),r}function He(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=ze(),Le(t,{from:e},1,o),i.singleCache.set(a,o)),Ge(r,o,n)}function Ue(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Ge(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=qe(a.route)),t.matchCache.set(r,a),a}function We(e,t=!1){let n=ze(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&p(),i[e.id]=e,o!==0&&e.path){let t=ee(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=Le(t,e,n,c,r,l);if(e._interpolation=f,e.children)for(let t of e.children)s(t,d,u,f)}s(e,1,n);for(let e of r)e.sort(Re);return{processedTree:{segmentTree:n,singleCache:Me(1e3),matchCache:Me(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function Ge(e,t,n=!1){let r=e.split(`/`),i=Ye(e,r,t,n);if(!i)return null;let[a]=Ke(e,r,i);return{route:i.node.route,rawParams:a}}function Ke(e,t,n){let r=Je(n.node),i=n.node.data&&Fe(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===Ne)break;if(u.kind===Pe){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function qe(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Je(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ye(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!y(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!$e(l,n))continue;if(i.parse){if(!Qe(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==Ne&&$e(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===Ne||i.kind===2)&&$e(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Qe(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&Ze(f,o))return n;$e(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(_||!(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)))){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+Xe(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+Xe(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+Xe(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+Xe(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function Xe(e,t){return 2**(e-t-1)}function Ze(e,t){return e===2**(t-1)-1}function Qe(e,t,n){let r,i;try{[r,i]=Ke(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function $e(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Ne)>(e.node.kind===Ne)||t.node.kind===Ne==(e.node.kind===Ne)&&t.node.depth>e.node.depth)))}function et(){try{return sessionStorage}catch{return}}var tt=`tsr-scroll-restoration-v1_3`,nt=et();function rt(){try{return JSON.parse(nt?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var it=rt(),at=`data-scroll-restoration-id`,ot=e=>e.state.__TSR_key||e.href;function st(e){let t=e.getAttribute(at);if(t)return`[${at}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var ct=!1,lt=`window`;function ut(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function dt(e){let t=new Set;for(let n of e){if(n===lt)continue;let e=ut(n);e&&t.add(e)}return t}
10function ft(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||ot,a=new Set,o=e=>{let t=it[e]||={};for(let e of a)e===document?t[lt]={scrollX,scrollY}:e.isConnected&&(t[st(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,ct=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{ct||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{nt?.setItem(tt,JSON.stringify(it))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),!r.r&&(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=it[d];if(e){let t=it[u];for(let n in e){if(n===lt){if(s)continue}else{let e=ut(n);if(!e||s&&o&&(l??=dt(o),l.has(e)))continue}t||=it[u]={},t[n]??=e[n]}}}ct=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=dt(o));let t=e&&i&&c,s=r.e?it[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===lt){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=ut(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{ct=!1}}))}function pt(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function mt(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function ht(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=mt(r):Array.isArray(t)?t.push(mt(r)):n[e]=[t,mt(r)]}return n}var gt=/^(?:\s|["[{\d-]|fa|nu|tr)/,_t=yt(JSON.parse),vt=bt(JSON.stringify,JSON.parse);function yt(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.substring(1));let r=ht(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!gt.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function bt(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!gt.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=pt(e,r);return t?`?${t}`:``}}var xt=`__root__`;function St(e,t,n){let r=ie(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=x(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>Ct(n,s.input({url:e})),output:({url:e})=>s.output({url:wt(n,e)})}:s}function Ct(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function wt(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Tt(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{ce(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var Et=`__TSR_index`,Dt=`popstate`,Ot=`beforeunload`,kt=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function At(e){let t=kt.exec(e);return t?`/`+e.slice(t[0].length):e}function jt(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>` 11\r`.includes(e)?``:encodeURIComponent(e))),At(e)}function Mt(e){let t=e.getLocation(),n=new Set,r=r=>
11{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=Ft(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[Et];i=Nt(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[Et];i=Nt(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[Et]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function Nt(e,t){let n=It();return{...t,key:n,__TSR_key:n,[Et]:e}}function Pt(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>jt(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>Ft(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=It();t.history.replaceState({[Et]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=Ft(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[Et]-l.state[Et],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=Mt({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Ot,x,{capture:!0}),t.removeEventListener(Dt,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(Ot,x,{capture:!0}),t.addEventListener(Dt,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function Ft(e,t){let n=jt(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=It();t={[Et]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function It(){return(Math.random()+1).toString(36).substring(7)}function Lt(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function Rt(e){return e.pathname+e.search+e.hash}function zt(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Bt(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Vt(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Ht({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Ut(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function Wt(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var Gt=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:Pt()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&ie(n)?St(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Tt(this.latestLocation,e),ft(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=We(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Be(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:Me(1e3)}},this.subscribe=(e,t)=>
11{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:ne(e),external:!1,searchStr:o,search:g(t?.search,i),hash:ne(r.slice(1)),state:_(t?.state,a)}}let o=Ct(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:ne(At(o.pathname)),external:!!this.rewrite&&Lt(o,this.origin),searchStr:c,search:g(t?.search,s),hash:ne(o.hash.slice(1)),state:_(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=Ue(ee(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=Ft(n.href,{});n={...n,to:Ct(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=n._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>(t=!0,i??=this.matchRoutesLightweight(r)),s=n.to?`${n.to}`:`.`,c=C(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[ee(c)],u=c.includes(`$`),d;if(l)d=l._branch??=qe(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?l?._interpolation??Le(!1,{fullPath:c},0):void 0,p;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(p??=Xt(n.params,e),!fe(p))break;p===e&&(p=Object.assign(ae(),p));try{Object.assign(p,t(p))}catch{}}}p??=Xt(n.params,Zt(n.params,f)?o()[3]:Qt);let m=e.leaveParams?c:At(ne(f?E(c,f,p,this.pathParamsDecoder):c)),h=$t(d,e._includeValidateSearch),g=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,Yt(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?en(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||Qt,v=this.options.stringifySearch(_),y=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,x=y?`#${y}`:``,S=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:Qt,te=`${m}${v}${x}`,w,re,ie=!1;if(this.rewrite){let e=new URL(te,this.origin),t=e.origin,n=wt(this.rewrite,e);w=Rt(e),Lt(n,t)?(re=n.href,ie=!0):re=At(Rt(n))}else w=b(te),re=w;return{publicHref:re,href:w,pathname:m,search:_,searchStr:v,state:S,hash:y??``,external:ie,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=Ve(r.pathname,this.processedTree);if(t){let i=Object.assign(ae(),t.rawParams),{from:a,params:o,...s}=t.route,c=Xt(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&!r.maskedLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return Kt(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=ee(this.latestLocation.href)===ee(n.href)&&w(Ht(n.state),Ht(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>
11{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?S(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return Kt(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await Jn(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Vt(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&zt(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(h.test(n)||(r=S(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:Lt(e,this.origin)||(n=Rt(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=on,this.preloadRoute=e=>Yn(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?C(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=He(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!w(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?w(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=se(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??vt,parseSearch:e.parseSearch??_t,protocolAllowlist:e.protocolAllowlist??te}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=Le(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:ee(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?tn(this.options.notFoundMode,a):void 0,l=Array(a.length),d=this._committed,f=(e,t)=>{let n=d[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?d.find(t=>t.routeId===e.id):void 0},p;for(let n=0;n<a.length;n++){let i=a[n],o=l[n-1],d,m,h;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=Yt(i.options.validateSearch,{...n})??void 0;d={...n,...e},m={...r,...e}}catch(e){let r=e;if(e instanceof qt||(r=new qt(e.message,{cause:e})),t?.throwOnError)throw r;d=n,m={},h=r}}let v=``,y=``;try{v=i.options.loaderDeps?.({search:d})??``,y=v&&JSON.stringify(v)||``}catch(e){if(t?.throwOnError)throw e;h??=e}
11let b=ae(),x=i._interpolation?E(i.fullPath,i._interpolation,r,this.pathParamsDecoder,b):i.fullPath,S=i.id+x+y,C=f(i,n),ee=this._cache.get(S)??(C?.id===S?C:void 0);p=ee?._strictParams??Object.assign(b,p);let te;if(!ee)try{nn(i,p)}catch(e){if(te=c(e)||u(e)?e:new Jt(e.message,{cause:e}),t?.throwOnError)throw te}let w=C?`stay`:`enter`,ne;if(ee)ne={...ee,cause:w,search:g(C?C.search:ee.search,d),_strictSearch:m,searchError:h};else{let e=zt(i)?`pending`:`success`;ne={id:S,ssr:i.options.ssr,index:n,routeId:i.id,params:C?.params??p,_strictParams:p,pathname:x,updatedAt:Date.now(),search:C?g(C.search,d):d,_strictSearch:m,searchError:h,status:e,isFetching:!1,error:void 0,paramsError:te,context:{},abortController:t?._controller??new AbortController,cause:w,loaderDeps:C?_(C.loaderDeps,v):v,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let re=s===i.id;ne._notFound&&!re&&(ne.error=void 0),ne._notFound=re,l[n]=ne}for(let e=0;e<l.length;e++){let n=l[e];n.params=n.cause===`stay`?g(n.params,p):p,t?._controller&&(n.context={})}return l}matchRoutesLightweight(e){let t=y(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=y(a),c={...e.search};for(let e of a)try{Object.assign(c,Yt(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=o;for(let t of a)try{nn(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function Kt(e,t,{replace:n,ignoreBlocker:r}){if(!m(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var qt=class extends Error{},Jt=class extends Error{};function Yt(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new qt(`Async validation not supported`);if(n.issues)throw new qt(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Xt(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function Zt(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!v.call(e,t[1]))}var Qt=Object.freeze({});function $t(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=Yt(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function en(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=pe(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function tn(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return xt}function nn(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function rn(e,t){return e.options[t]?.preload?.()}function an(e,t){let n=rn(e,`component`),r=rn(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function on(e,t,n){let r=()=>t===!1?void 0:t?rn(e,t):an(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function sn(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function cn(e){let t=e.length;for(let n=0;n<t;n++){let r=e[n];if(r._assetEnd!==void 0){t=Math.min(t,Math.max(n+1,r._assetEnd));continue}if(r.status!==`success`||r._notFound){t=n+1;break}}return t<e.length?e.slice(0,t):e}var ln=0,un=1,dn=2,fn=3,pn=[4];
11function mn(e){return typeof e[0]==`number`}function hn(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function gn(e,t){return e.routesById[t.routeId]}function _n(e,t,n){return u(e)?[fn,e]:c(e)?(e.routeId||=n,[dn,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[un,e]):[ln,e]}function vn(e,t){let n=_n(t,!0,e.id);if(n[0]!==un)return n;try{e.options.onError?.(n[1])}catch(t){n=_n(t,!0,e.id)}return n}function yn(e,t,n,r,i){return i[0].signal.aborted?pn:Fn(e,t,n,vn(n,r),i)}async function bn(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=gn(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return Sn(e,r),[i,yn(e,t,u,a,n)]}if(c.aborted)return[i,pn];let p=r.paramsError??r.searchError;if(p!==void 0)return Sn(e,r),[i,yn(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{Tn(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?hn(a,c):a);if(c.aborted)return[i,pn];let s=Fn(e,t,u,_n(o,!1,u.id),n);if(s[0]!==ln)return Sn(e,r),[i,s];r.context={...r.context,...o}}catch(a){return Sn(e,r),[i,yn(e,t,u,a,n)]}finally{r.status=h,Tn(e,r,!1,n[0])}}i()}function xn(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function Sn(e,t){let n=t._flight;t._flight=void 0,xn(e,t,n)?.abort()}function Cn(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=xn(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function wn(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Tn(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function En(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function Dn(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return pn;if(!i)return[ln,void 0];let l=n._flight;Tn(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(En(e,t,n,r,s,a,!!o[3]))).then(e=>_n(e,!1,r.id),e=>_n(e,!0,r.id)).then(t=>(t[0]!==ln&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===un&&l[2]?vn(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Fn(e,t,r,await hn(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return Sn(e,n),pn}finally{Tn(e,n,!1,s)}}function On(e,t,n){t[0]!==fn&&(e.status=`success`,e.error=void 0,t[0]===ln?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function kn(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&Sn(e,r)}function An(e,t){return t[0]===un||t[0]===dn?{...e,status:t[0]===un?`error`:`notFound`,error:t[1],_flight:void 0}:e}function jn(e,t,n,r,i,a,o){let s=t[1][n],c=gn(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(En(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=pn)),!p)if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>
11e.routeId===s.routeId&&e.id!==s.id)))}}catch(n){s.invalid=!0,Sn(e,s),p=yn(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!!(m&&f&&s.status===`success`&&!l&&!a[4]&&((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)!==`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,xn(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let ee=!p&&x?Dn(e,t,s,c,g,i,a).then(t=>(On(s,t,l),t[0]===ln&&(m&&!a[0].signal.aborted&&kn(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[ln,s.loaderData]),te=(async()=>{try{let e=on(c,void 0,C);e&&await hn(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,yn(e,t,c,r,a)]}let r=await ee;x&&r[0]===ln&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,ee,te]),!y)return ee.then(e=>An(s,e));let w={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let ne=Dn(e,t,w,c,g,i,a).then(e=>(s.isFetching=!1,On(w,e,!1),e));return(t[2]??=[]).push([n,ne,te,w]),ne.then(e=>An(w,e))}async function Mn(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=gn(e,t[n]);try{let e=on(i,!1);e&&await hn(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Nn(e,t){t[2]&&=(Cn(e,t[2].map(e=>e[3])),void 0)}async function Pn(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=fn)throw[a,t];!i&&t[0]!==ln&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===fn)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Fn(e,t,n,r,i,a){for(;r[0]===fn;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[fn,t]:[fn,t,a]}return[fn,o,n]}catch(e){r=a?[un,e]:vn(n,e),a=!0}}return r}async function In(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===dn?Mn(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=fn)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==ln&&t[0]<fn&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=fn){let n=s[1];if(n[0]!==fn||n[1].options.reloadDocument||n[2])return Nn(e,t),n;c=!0,s=[0,[un,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>
11{i&&(u._notFound=void 0,l===un?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=gn(e,u);try{await hn(i?Promise.resolve().then(()=>on(m,l===un?`errorComponent`:`notFoundComponent`)):Promise.all([on(m),on(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Nn(e,t),pn}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Nn(e,t),Cn(e,o),p()):u.status=`success`}return t}async function Ln(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=gn(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await hn(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function Rn(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await Mn(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=jn(e,i,t,u,f,r,l)},m=await bn(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===dn){let t=await Mn(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=fn&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=In(e,i,u,r[0],Pn(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=Pn(i[2],void 0,void 0,h.then(e=>mn(e)?0:sn(n).length,()=>0))),o=await h}catch(t){if(Nn(e,i),t===a&&a.aborted)return pn;throw t}return mn(o)?o:Ln(e,o,a,r[6]===n.length?r[6]:0)}function zn(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=gn(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>zn(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function Bn(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function Vn(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!sn(t[3]).some(e=>e.id===n[1]))return;let i;try{await hn(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function Hn(e,t){e._committed=t,e.stores.setMatches(t)}function Un(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=sn(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=gn(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=Ut(n);Hn(e,n),Cn(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),Wt(e,i,n,a,l,t)}async function Wn(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function Gn(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function Kn(e,t,n,r,i){let a=n.map(e=>({...e}));wn(a);for(let t of r)Sn(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await In(e,o,r,t[0],i)}catch(t){throw Cn(e,a),t}if(mn(s)){Cn(e,a),s[0]===fn&&e._tx===t&&e._committed===n&&await Gn(e,t,s);return}if(await Ln(e,s,t[0].signal),e._tx!==t||e._committed!==n){Cn(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),Sn(e,n))}Hn(e,a),Cn(e,n,a)}async function qn(e,t,n,r,i,a){let o=await Rn(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(mn(o)){let n=o[0]===fn&&e._tx===t;if((!n||o[1].options.reloadDocument)&&Bn(e,t),Cn(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){Bn(e,t);return}await Gn(e,t,o);return}let s=o[1];if(e._tx===t&&await Vn(e,t),e._tx!==t){Bn(e,t),Cn(e,s),Nn(e,o);return}let c=t[2],l=Vt(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>
11{if(e._tx===t&&await Vn(e,t),e._tx!==t){Bn(e,t),Cn(e,s),Nn(e,o);return}let n=await e.startTransition(()=>{Bn(e,t),Un(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){Nn(e,o);return}u?.length&&Kn(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function Jn(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=Vt(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await Wn(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});wn(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Cn(e,m),await Wn(e,n);return}e._preflight=void 0;let g,_=()=>qn(e,y,f,()=>zn(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>Wn(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Tn(e,t,!1)}n[0].abort(),Cn(e,n[3],y[3],!0)}if(e._tx!==y){Cn(e,y[3]),y[3]=[],g?.(),await Wn(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&zn(e,y),g?.(_()),await y[5]}async function Yn(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),wn(a),o=(e._preloads??=new Map).set(i,a),s=await Rn(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),Cn(e,a)),i.abort()}if(!mn(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){c(e)||console.error(e);return}}}async function Xn(e){let t=window.$_TSR,n=e.options.serializationAdapters;n?.length&&(t.t=new Map(n.map(e=>[e.key,e.fromSerializable])),t.buffer.forEach(e=>e())),t.initialized=!0;let r=t.router;e.ssr={manifest:r.manifest},e.options.ssr={nonce:document.querySelector(`meta[property="csp-nonce"]`)?.content};let i=r.matches,a=new AbortController,o=e._preflight;e._preflight=a,o?.abort();let s=()=>e._preflight===a,c,l,u,d;try{if(await hn(e.options.hydrate?.(r.dehydratedData),a.signal),!s())return;let t=e.history.location;u=t.href,d=t.state,e.updateLatestLocation(),c=e.latestLocation,e.stores.location.set(c),l=e.matchRoutes(c,{_controller:a})}catch(t){if(s()&&(e._preflight=void 0),a.abort(t),t!==a.signal)throw t}if(!s())return;let f=[],p,m=0,h=t=>{m=Math.min(m,t+1);let n=f.splice(t);for(let t of n)gn(e,t).options.loader&&(t.status===`success`||!t.invalid&&`loaderData`in t)&&kn(e,{...t,status:`success`,error:void 0,preload:!0},e._cache.get(t.id));Cn(e,n)},g=i.length>l.length?l.findIndex(e=>e._notFound)+1:i.length,_=!1;for(let t=0;t<g;t++){let n=l[t],r=i[t];if(typeof r.i!=`string`||je(r.i)!==n.id){p??=t;break}m=t+1;let a=gn(e,n);if((`l`in r||r.s===`success`&&r.e===void 0&&a.options.loader)&&(n.loaderData=r.l),n.status=r.s,n.ssr=r.ssr,a.options.ssr=n.ssr,n.updatedAt=r.u,n.error=r.e,n._notFound||=r.g,n.status===`error`||n.status===`notFound`||n._notFound){_=!0,f.push(n),(n.ssr===!1||n.ssr===`data-only`)&&(p??=t);break}if(n.status===`pending`){p??=t;break}f.push(n),n.ssr===`data-only`&&(p??=t)}!_&&f.length===g&&g<l.length&&(p=g);let v=f.map(async t=>{try{let n=gn(e,t);return await(t._notFound?Promise.all([on(n),on(n,`notFoundComponent`)]):on(n,t.status===`error`?`errorComponent`:t.status===`notFound`?`notFoundComponent`:void 0)),!0}catch{return!1}}),y=0;try{for(;y<v.length&&await hn(v[y],a.signal);)y++}catch{return}if(!s())return;y<f.length&&h(y);let b=Math.max(p===f.length?f.length+1:f.length,y<v.length?y:m);for(let t=0;t<b;t++){let n=l[t],r=gn(e,n),o=l[t-1]?.context??e.options.context??{},u;if(r.options.context){try{u=n._ctx=r.options.context({deps:n.loaderDeps,params:n.params,context:o,location:c,navigate:t=>e.navigate({...t,_fromLocation:c}),buildLocation:e.buildLocation,cause:n.cause,abortController:a,preload:!1,matches:l,routeId:r.id})||{}}catch{if(!s())return;if(n.status!==`error`&&n.status!==`notFound`&&!n._notFound){p=Math.min(p??t,t),h(t);break}}if(!s())return}n.context={...o,...u,...f[t]&&i[t].b}}if(await Ln(e,[c,l],a.signal,0,m),!s())return;let x=p!==void 0||f.length<g,S=_&&f.length===g?l:f,C=x?l:S,ee;if(x&&p!==void 0){let e=C[p];ee=e.ssr===`data-only`&&m>p+1?m:void 0,C=C.slice(),C[p]={...e,status:`pending`,ssr:e.ssr===`data-only`&&`data-only`,_assetEnd:ee}}let te=()=>{let t=e.history.location;return x&&!e._tx&&t.href===u&&t.state===d&&e._committed===S&&S.length&&!a.signal.aborted?a:void 0},w=[te,t=>{if(e._handoff!==w)return;e._handoff=void 0;let n=S.length;
11if(!t||!te()||S.some((e,n)=>e.id!==t[n]?.id)){a.abort();return}let r=ee;if(r!==void 0){for(let e=n;e<r;e++)if(l[e]?.id!==t[e]?.id){r=e>p+1?e:void 0;break}}let i=S.map(e=>({...e}));r!==void 0&&(i[p]._assetEnd=r),Cn(e,t.splice(0,n,...i));for(let e=n;e<t.length;e++){let n=t[e],r=l[e];r?.id===n.id&&r._ctx&&(n._ctx=r._ctx),n.abortController=a}return n}];e._committed=S,e._lifecycleEnd=Ut(S),e._handoff=w,e._preflight=void 0,e.batch(()=>{e.stores.setMatches(C),e.stores.status.set(`idle`),x||e.stores.resolvedLocation.set(e.stores.location.get())})}var Zn=Symbol.asyncIterator,Qn=Symbol.hasInstance,$n=Symbol.isConcatSpreadable,er=Symbol.iterator,tr=Symbol.match,nr=Symbol.matchAll,rr=Symbol.replace,ir=Symbol.search,ar=Symbol.species,or=Symbol.split,sr=Symbol.toPrimitive,cr=Symbol.toStringTag,lr=Symbol.unscopables,ur={[Zn]:0,[Qn]:1,[$n]:2,[er]:3,[tr]:4,[nr]:5,[rr]:6,[ir]:7,[ar]:8,[or]:9,[sr]:10,[cr]:11,[lr]:12},dr={0:Zn,1:Qn,2:$n,3:er,4:tr,5:nr,6:rr,7:ir,8:ar,9:or,10:sr,11:cr,12:lr},fr={2:!0,3:!1,1:void 0,0:null,4:-0,5:1/0,6:-1/0,7:NaN},pr={0:`Error`,1:`EvalError`,2:`RangeError`,3:`ReferenceError`,4:`SyntaxError`,5:`TypeError`,6:`URIError`},mr={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function O(e,t,n,r,i,a,o,s,c,l,u,d){return{t:e,i:t,s:n,c:r,m:i,p:a,e:o,a:s,f:c,b:l,o:u,l:d}}function hr(e){return O(2,void 0,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}var gr=hr(2),_r=hr(3),vr=hr(1),yr=hr(0),br=hr(4),xr=hr(5),Sr=hr(6),Cr=hr(7),wr=64,Tr=/[\x00-\x07\x0b\x0e-\x1f<\u2028\u2029\ud800-\udfff]/;function Er(e){switch(e){case`"`:return`\\"`;case`\\`:return`\\\\`;case` 12`:return`\\n`;case`\r`:return`\\r`;case`\b`:return`\\b`;case` `:return`\\t`;case`\f`:return`\\f`;case`<`:return`\\x3C`;case`\u2028`:return`\\u2028`;case`\u2029`:return`\\u2029`;default:return}}function Dr(e){if(e.length>=wr&&!Tr.test(e))return JSON.stringify(e).slice(1,-1);let t=``,n=0,r;for(let i=0,a=e.length;i<a;i++)r=Er(e[i]),r&&(t+=e.slice(n,i)+r,n=i+1);return n===0?t=e:t+=e.slice(n),t}function Or(e){switch(e){case`\\\\`:return`\\`;case`\\"`:return`"`;case`\\n`:return` 13`;case`\\r`:return`\r`;case`\\b`:return`\b`;case`\\t`:return` `;case`\\f`:return`\f`;case`\\x3C`:return`<`;case`\\u2028`:return`\u2028`;case`\\u2029`:return`\u2029`;default:return e}}function kr(e){return typeof e==`string`&&!e.includes(`\\`)?e:e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,Or)}var{toString:Ar}=Object.prototype,jr={parsing:1,serialization:2,deserialization:3};function Mr(e){return`Seroval Error (step: ${jr[e]})`}var Nr=(e,t)=>Mr(e),Pr=class extends Error{constructor(e,t){super(Nr(e,t)),this.cause=t}},Fr=class extends Pr{constructor(e){super(`parsing`,e)}},Ir=class extends Pr{constructor(e){super(`deserialization`,e)}};function Lr(e){return`Seroval Error (specific: ${e})`}var Rr=class extends Error{constructor(e){super(Lr(1)),this.value=e}},zr=class extends Error{constructor(e){super(Lr(2))}},Br=class extends Error{constructor(e){super(Lr(3))}},Vr=class extends Error{constructor(e){super(Lr(4))}},Hr=class extends Error{constructor(e){super(Lr(5)),this.value=e}},Ur=class extends Error{constructor(e){super(Lr(6))}},Wr=class extends Error{constructor(e){super(Lr(7))}},Gr=class extends Error{constructor(e){super(Lr(8))}},Kr=class extends Error{constructor(e){super(Lr(9))}},qr=`__SEROVAL_REFS__`,Jr=new Map,Yr=new Map;function Xr(e){return Jr.has(e)}function Zr(e){return Yr.has(e)}function Qr(e){if(Xr(e))return Jr.get(e);throw new Hr(e)}function $r(e){if(Zr(e))return Yr.get(e);throw new Ur(e)}typeof globalThis<`u`?Object.defineProperty(globalThis,qr,{value:Yr,configurable:!0,writable:!1,enumerable:!1}):typeof window<`u`?Object.defineProperty(window,qr,{value:Yr,configurable:!0,writable:!1,enumerable:!1}):typeof self<`u`?Object.defineProperty(self,qr,{value:Yr,configurable:!0,writable:!1,enumerable:!1}):typeof global<`u`&&Object.defineProperty(global,qr,{value:Yr,configurable:!0,writable:!1,enumerable:!1});function ei(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function ti(e){let t=pr[ei(e)];return e.name===t?e.constructor.name===t?{}:{name:e.constructor.name}:{name:e.name}}function ni(e,t){let n=ti(e),r=Object.getOwnPropertyNames(e);for(let i=0,a=r.length,o;i<a;i++)o=r[i],o!==`name`&&o!==`message`&&(o===`stack`?t&4&&(n||={},n[o]=e[o]):(n||={},n[o]=e[o]));return n}function ri(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:+!Object.isExtensible(e)}function ii(e){switch(e){case 1/0:return xr;case-1/0:return Sr}return e===e?Object.is(e,-0)?br:O(0,void 0,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0):Cr}function ai(e){return O(1,void 0,Dr(e),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function oi(e){return O(3,void 0,``+e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function si(e){return O(4,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function ci(e,t){let n=t.valueOf();return O(5,e,n===n?t.toISOString():``,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}
13function li(e,t,n){return O(36,e,n.toString(),t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function ui(e,t){return O(6,e,void 0,Dr(t.source),t.flags,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function di(e,t){return O(17,e,ur[t],void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function fi(e,t){return O(18,e,Dr(Qr(t)),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function pi(e,t,n){return O(25,e,n,Dr(t),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function mi(e,t,n){return O(9,e,void 0,void 0,void 0,void 0,void 0,n,void 0,void 0,ri(t),void 0)}function hi(e,t){return O(21,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}var gi=1e6;function _i(e,t,n){if(t.length>gi)throw new Rr(t);return O(15,e,void 0,t.constructor.name,void 0,void 0,void 0,void 0,n,t.byteOffset,void 0,t.length)}function vi(e,t,n){if(t.length>gi)throw new Rr(t);return O(16,e,void 0,t.constructor.name,void 0,void 0,void 0,void 0,n,t.byteOffset,void 0,t.length)}function yi(e,t,n){if(t.byteLength>gi)throw new Rr(t);return O(20,e,void 0,void 0,void 0,void 0,void 0,void 0,n,t.byteOffset,void 0,t.byteLength)}function bi(e,t,n){return O(13,e,ei(t),void 0,Dr(t.message),n,void 0,void 0,void 0,void 0,void 0,void 0)}function xi(e,t,n){return O(14,e,ei(t),void 0,Dr(t.message),n,void 0,void 0,void 0,void 0,void 0,void 0)}function Si(e,t){return O(7,e,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,void 0)}function Ci(e,t){return O(28,void 0,void 0,void 0,void 0,void 0,void 0,[e,t],void 0,void 0,void 0,void 0)}function wi(e,t){return O(30,void 0,void 0,void 0,void 0,void 0,void 0,[e,t],void 0,void 0,void 0,void 0)}function Ti(e,t,n){return O(31,e,void 0,void 0,void 0,void 0,void 0,n,t,void 0,void 0,void 0)}function Ei(e,t){return O(32,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function Di(e,t){return O(33,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function Oi(e,t){return O(34,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function ki(e,t,n,r){return O(35,e,n,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,r)}var Ai=class{constructor(e,t){this.value=e,this.replacement=t}},ji=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,n)=>{e.s=t,e.f=n}),e},Mi=e=>t=>()=>{let n=0,r={[e](){return r},next(){if(n>t.d)return{done:!0,value:void 0};let e=n++,r=t.v[e];if(e===t.t)throw r;return{done:e===t.d,value:r}}};return r},Ni=(e,t)=>n=>()=>{let r=0,i=-1,a=!1,o=[],s=[],c={finalize(e=0,t=s.length){for(;e<t;e++)s[e].s({done:!0,value:void 0})}};n.on({next(e){let t=s.shift();t&&t.s({done:!1,value:e}),o.push(e)},throw(e){let t=s.shift();t&&t.f(e),c.finalize(),i=o.length,a=!0,o.push(e)},return(e){let t=s.shift();t&&t.s({done:!0,value:e}),c.finalize(),i=o.length,o.push(e)}});let l={[e](){return l},next(){if(i===-1){let e=r++;if(e>=o.length){let e=t();return s.push(e),e.p}return{done:!1,value:o[e]}}if(r>i)return{done:!0,value:void 0};let e=r++,n=o[e];if(e!==i)return{done:!1,value:n};if(a)throw n;return{done:!0,value:n}}};return l},Pi=e=>{let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer},Fi=class{constructor(e,t,n){this.v=e,this.t=t,this.d=n}};function Ii(e){return e instanceof Fi}function Li(e,t,n){return new Fi(e,t,n)}function Ri(e){let t=[],n=-1,r=-1,i=e[er]();for(;;)try{let e=i.next();if(t.push(e.value),e.done){r=t.length-1;break}}catch(e){n=t.length,r=n,t.push(e);break}return Li(t,n,r)}var zi=Mi(er);function Bi(e){return zi(e)}var Vi={},Hi={},Ui={0:{},1:{},2:{},3:{},4:{},5:{}};function k(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function A(e,t){k(e,t),t.add(e)}function Wi(e,t,n){k(e,t),t.set(e,n)}function Gi(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function j(e,t){return e.get(Gi(e,t))}function Ki(e,t,n){return e.set(Gi(e,t),n),n}var qi=new WeakMap,Ji=new WeakMap,Yi=new WeakMap,Xi=new WeakMap,Zi=new WeakMap,Qi=new WeakSet,$i=class{constructor(){A(this,Qi),Wi(this,qi,[]),Wi(this,Ji,[]),Wi(this,Yi,!0),Wi(this,Xi,!1),Wi(this,Zi,0)}on(e){let t=j(Yi,this),n=0;if(t){for(;n<j(Zi,this)&&j(Ji,this)[n];n++);if(n===j(Zi,this)){var r;Ki(Zi,this,(r=j(Zi,this),r++,r))}j(Ji,this)[n]=e}return Gi(Qi,this,ta).call(this,e),()=>{if(j(Yi,this)&&t){for(t=!1,j(Ji,this)[n]=void 0;j(Zi,this)>0&&!j(Ji,this)[j(Zi,this)-1];){var e;Ki(Zi,this,(e=j(Zi,this),e--,e))}j(Ji,this).length=j(Zi,this)}}}next(e){j(Yi,this)&&(j(qi,this).push(e),Gi(Qi,this,ea).call(this,e,`next`))}throw(e){j(Yi,this)&&(j(qi,this).push(e),Gi(Qi,this,ea).call(this,e,`throw`),Ki(Yi,this,!1),Ki(Xi,this,!1),j(Ji,this).length=0)}return(e){j(Yi,this)&&(j(qi,this).push(e),Gi(Qi,this,ea).call(this,e,`return`),Ki(Yi,this,!1),Ki(Xi,this,!0),j(Ji,this).length=0)}};function ea(e,t){for(let r=0;r<j(Zi,this);r++){var n;(n=j(Ji,this)[r])==null||n[t](e)}}function ta(e){for(let t=0,n=j(qi,this).length;t<n;t++){let r=j(qi,this)[t];!j(Yi,this)&&t===n-1?e[j(Xi,this)?`return`:`throw`](r):e.next(r)}}function na(e){return e instanceof $i}function ra(){return new $i}function ia(e,t){let n=ra(),r=e[Zn](),i=!1,a=!1;t?.push(()=>{a||i||(i=!0,Promise.resolve().then(()=>r.return?.call(r)).catch(()=>{}))});async function o(){try{for(;!i;){let e=await r.next();if(i)return;if(e.done){a=!0,n.return(e.value);break}n.next(e.value)}}catch(e){a=!0,i||n.throw(e)}}return o().catch(()=>{}),n}var aa=Ni(Zn,ji);function oa(e){return aa(e)}async function sa(e){try{return[1,await e]}catch(e){return[0,e]}}function ca(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:127^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3,compactArrayBufferViews:t.compactArrayBufferViews??!1}}function la(e,t){e.marked.add(t)}function ua(e,t){let n=e.refs.size;return e.refs.set(t,n),n}function da(e,t){let n=e.refs.get(t);return n==null?{type:0,value:ua(e,t)}:(la(e,n),{type:1,value:si(n)})}function fa(e,t){let n=da(e,t);return n.type===1?n:Xr(t)?{type:2,value:fi(n.value,t)}:n}function pa(e,t){let n=fa(e,t);if(n.type!==0)return n.value;if(t in ur)return di(n.value,t);throw new Rr(t)}function ma(e,t){let n=da(e,Ui[t]);return n.type===1?n.value:O(26,n.value,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function ha(e){let t=da(e,Vi);return t.type===1?t.value:O(27,t.value,void 0,void 0,void 0,void 0,void 0,void 0,pa(e,er),void 0,void 0,void 0)}function ga(e){let t=da(e,Hi);return t.type===1?t.value:O(29,t.value,void 0,void 0,void 0,void 0,void 0,[ma(e,1),pa(e,Zn)],void 0,void 0,void 0,void 0)}function _a(e,t,n,r){return O(n?11:10,e,void 0,void 0,void 0,r,void 0,void 0,void 0,void 0,ri(t),void 0)}function va(e,t,n,r){return O(8,t,void 0,void 0,void 0,void 0,{k:n,v:r},void 0,ma(e,0),void 0,void 0,void 0)}function ya(e,t){if(!e.compactArrayBufferViews)return t;let n=new Uint8Array(t.buffer,t.byteOffset,t.byteLength).slice().buffer,r=t.constructor;return new r(n)}function ba(e){if(typeof Buffer<`u`)return Buffer.from(e).toString(`base64`);let t=new Uint8Array(e);if(typeof t.toBase64==`function`)return t.toBase64();let n=``;for(let e=0,r=t.length;e<r;e++)n+=String.fromCharCode(t[e]);return btoa(n)}
13function xa(e,t,n){return O(19,t,ba(n),void 0,void 0,void 0,void 0,void 0,ma(e,5),void 0,void 0,void 0)}function Sa(e,t){return{base:ca(e,t),child:void 0}}var Ca=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return Ua(this._p,this.depth,e)}};async function wa(e,t,n){let r=[];for(let i=0,a=n.length;i<a;i++)i in n?r[i]=await Ua(e,t,n[i]):r[i]=0;return r}async function Ta(e,t,n,r){return mi(n,r,await wa(e,t,r))}async function Ea(e,t,n){let r=Object.entries(n),i=[],a=[];for(let n=0,o=r.length;n<o;n++)i.push(Dr(r[n][0])),a.push(await Ua(e,t,r[n][1]));return er in n&&(i.push(pa(e.base,er)),a.push(Ci(ha(e.base),await Ua(e,t,Ri(n))))),Zn in n&&(i.push(pa(e.base,Zn)),a.push(wi(ga(e.base),await Ua(e,t,ia(n))))),cr in n&&(i.push(pa(e.base,cr)),a.push(ai(n[cr]))),$n in n&&(i.push(pa(e.base,$n)),a.push(n[$n]?gr:_r)),{k:i,v:a}}async function Da(e,t,n,r,i){return _a(n,r,i,await Ea(e,t,r))}async function Oa(e,t,n,r){return hi(n,await Ua(e,t,r.valueOf()))}async function ka(e,t,n,r){return r=ya(e.base,r),_i(n,r,await Ua(e,t,r.buffer))}async function Aa(e,t,n,r){return r=ya(e.base,r),vi(n,r,await Ua(e,t,r.buffer))}async function ja(e,t,n,r){return r=ya(e.base,r),yi(n,r,await Ua(e,t,r.buffer))}async function Ma(e,t,n,r){let i=ni(r,e.base.features);return bi(n,r,i?await Ea(e,t,i):void 0)}async function Na(e,t,n,r){let i=ni(r,e.base.features);return xi(n,r,i?await Ea(e,t,i):void 0)}async function Pa(e,t,n,r){let i=[],a=[];for(let[n,o]of r.entries())i.push(await Ua(e,t,n)),a.push(await Ua(e,t,o));return va(e.base,n,i,a)}async function Fa(e,t,n,r){let i=[];for(let n of r.keys())i.push(await Ua(e,t,n));return Si(n,i)}async function Ia(e,t,n,r){let i=e.base.plugins;if(i)for(let a=0,o=i.length;a<o;a++){let o=i[a];if(o.parse.async&&o.test(r))return pi(n,o.tag,await o.parse.async(r,new Ca(e,t),{id:n}))}}async function La(e,t,n,r){let[i,a]=await sa(r);return O(12,n,i,void 0,void 0,void 0,void 0,void 0,await Ua(e,t,a),void 0,void 0,void 0)}function Ra(e,t,n,r,i){let a=[],o=n.on({next:n=>{la(this.base,t),Ua(this,e,n).then(e=>{a.push(Ei(t,e))},e=>{i(e),o()})},throw:n=>{la(this.base,t),Ua(this,e,n).then(e=>{a.push(Di(t,e)),r(a),o()},e=>{i(e),o()})},return:n=>{la(this.base,t),Ua(this,e,n).then(e=>{a.push(Oi(t,e)),r(a),o()},e=>{i(e),o()})}})}async function za(e,t,n,r){return Ti(n,ma(e.base,4),await new Promise(Ra.bind(e,t,n,r)))}async function Ba(e,t,n,r){let i=[];for(let n=0,a=r.v.length;n<a;n++)i[n]=await Ua(e,t,r.v[n]);return ki(n,i,r.t,r.d)}async function Va(e,t,n,r){if(Array.isArray(r))return Ta(e,t,n,r);if(na(r))return za(e,t,n,r);if(Ii(r))return Ba(e,t,n,r);let i=r.constructor;if(i!==void 0&&typeof i!=`function`){let e=Object.getPrototypeOf(r);i=e===null?void 0:e.constructor}if(i===Ai)return Ua(e,t,r.replacement);let a=await Ia(e,t,n,r);if(a)return a;switch(i){case Object:return Da(e,t,n,r,!1);case void 0:return Da(e,t,n,r,!0);case Date:return ci(n,r);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return Ma(e,t,n,r);case Number:case Boolean:case String:case BigInt:return Oa(e,t,n,r);case ArrayBuffer:return xa(e.base,n,r);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return ka(e,t,n,r);case DataView:return ja(e,t,n,r);case Map:return Pa(e,t,n,r);case Set:return Fa(e,t,n,r)}if(i===Promise||r instanceof Promise)return La(e,t,n,r);let o=e.base.features;if(o&32&&i===RegExp)return ui(n,r);if(o&16)switch(i){case BigInt64Array:case BigUint64Array:return Aa(e,t,n,r)}if(o&1&&typeof AggregateError<`u`&&(i===AggregateError||r instanceof AggregateError))return Na(e,t,n,r);if(o&64&&typeof Temporal<`u`)switch(i){case Temporal.Instant:return li(n,0,r);case Temporal.Duration:return li(n,1,r);case Temporal.PlainDate:return li(n,2,r);case Temporal.PlainDateTime:return li(n,3,r);case Temporal.PlainMonthDay:return li(n,4,r);case Temporal.PlainTime:return li(n,5,r);case Temporal.PlainYearMonth:return li(n,6,r);case Temporal.ZonedDateTime:return li(n,7,r)}if(r instanceof Error)return Ma(e,t,n,r);if(er in r||Zn in r)return Da(e,t,n,r,!!i);throw new Rr(r)}
13async function Ha(e,t,n){let r=fa(e.base,n);if(r.type!==0)return r.value;let i=await Ia(e,t,r.value,n);if(i)return i;throw new Rr(n)}async function Ua(e,t,n){if(t>=e.base.depthLimit)throw new Kr(e.base.depthLimit);switch(typeof n){case`boolean`:return n?gr:_r;case`undefined`:return vr;case`string`:return ai(n);case`number`:return ii(n);case`bigint`:return oi(n);case`object`:if(n){let r=fa(e.base,n);return r.type===0?await Va(e,t+1,r.value,n):r.value}return yr;case`symbol`:return pa(e.base,n);case`function`:return Ha(e,t,n);default:throw new Rr(n)}}async function Wa(e,t){try{return await Ua(e,0,t)}catch(e){throw e instanceof Fr?e:new Fr(e)}}function Ga(e){return e}function Ka(e,t){for(let n=0,r=t.length;n<r;n++){let r=t[n];e.has(r)||(e.add(r),r.extends&&Ka(e,r.extends))}}function qa(e){if(e){let t=new Set;return Ka(t,e),[...t]}}function Ja(e){switch(e){case`Int8Array`:return Int8Array;case`Int16Array`:return Int16Array;case`Int32Array`:return Int32Array;case`Uint8Array`:return Uint8Array;case`Uint16Array`:return Uint16Array;case`Uint32Array`:return Uint32Array;case`Uint8ClampedArray`:return Uint8ClampedArray;case`Float32Array`:return Float32Array;case`Float64Array`:return Float64Array;case`BigInt64Array`:return BigInt64Array;case`BigUint64Array`:return BigUint64Array;default:throw new Wr(e)}}function Ya(e){switch(e){case`constructor`:case`__proto__`:case`prototype`:case`__defineGetter__`:case`__defineSetter__`:case`__lookupGetter__`:case`__lookupSetter__`:return!1;default:return!0}}function Xa(e){switch(e){case Zn:case $n:case cr:case er:return!0;default:return!1}}var Za=1e6,Qa=512,$a=1e4,eo=2e4;function to(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var no=1e3;function ro(e,t){let n=t.maxBase64Length??Za;if(!Number.isSafeInteger(n)||n<0)throw RangeError(`maxBase64Length must be a non-negative safe integer`);let r=t.refs||new Map;return`types`in r||Object.assign(r,{types:new Map}),{mode:e,plugins:t.plugins,refs:r,features:t.features??127^(t.disabledFeatures||0),depthLimit:t.depthLimit||no,maxBase64Length:n}}function io(e){return{mode:2,base:ro(2,e),child:void 0}}var ao=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return P(this._p,this.depth,e)}};function oo(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new Gr({t:4,i:t});if(e.refs.has(t))throw Error(`Conflicted ref id: `+t)}function so(e){return!!e&&(typeof e==`object`||typeof e==`function`)&&`then`in e&&typeof e.then==`function`}function co(e,t,n){return oo(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,n),n}function lo(e,t,n){return oo(e.base,t),e.base.refs.set(t,n),n}function uo(e,t,n){return e.mode===1?co(e,t,n):lo(e,t,n)}function fo(e,t,n){if(Object.hasOwn(t,n))return t[n];throw new Gr(e)}function po(e,t){return uo(e,t.i,$r(kr(t.s)))}function mo(e,t){if(!Array.isArray(t))throw new Gr(e)}function ho(e,t,n){let r=n.a;mo(n,r);let i=r.length,a=uo(e,n.i,Array(i));for(let n=0,o;n<i;n++)o=r[n],o&&(a[n]=P(e,t,o));return to(a,n.o),a}function go(e,t,n){Ya(t)?e[t]=n:Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0})}function _o(e,t,n,r,i){if(typeof r==`string`)go(n,kr(r),P(e,t,i));else{let a=P(e,t,r);switch(typeof a){case`string`:go(n,a,P(e,t,i));break;case`symbol`:Xa(a)&&(n[a]=P(e,t,i));break;default:throw new Gr(r)}}}function vo(e,t,n){e.base.refs.types.set(t,n)}function yo(e,t,n,r){if(e.base.refs.types.get(n)!==r)throw new Gr(t)}function bo(e,t,n,r){let i=n.k;if(mo(n,i),mo(n,n.v),i.length>0)for(let a=0,o=n.v,s=i.length;a<s;a++)_o(e,t,r,i[a],o[a]);return r}function xo(e,t,n){let r=uo(e,n.i,n.t===10?{}:Object.create(null));return bo(e,t,n.p,r),to(r,n.o),r}function M(e,t){return uo(e,t.i,new Date(t.s))}function N(e,t){if(!(e.base.features&64))throw new zr(t);let n;switch(t.c){case 0:n=Temporal.Instant.from(t.s);break;case 1:n=Temporal.Duration.from(t.s);break;case 2:n=Temporal.PlainDate.from(t.s);break;case 3:n=Temporal.PlainDateTime.from(t.s);break;case 4:n=Temporal.PlainMonthDay.from(t.s);break;case 5:n=Temporal.PlainTime.from(t.s);break;case 6:n=Temporal.PlainYearMonth.from(t.s);break;case 7:n=Temporal.ZonedDateTime.from(t.s);break;default:throw new Gr(t)}return uo(e,t.i,n)}function So(e,t){if(e.base.features&32){let n=kr(t.c);if(n.length>eo)throw new Gr(t);return uo(e,t.i,new RegExp(n,t.m))}throw new zr(t)}function Co(e,t,n){let r=uo(e,n.i,new Set);mo(n,n.a);for(let i=0,a=n.a,o=a.length;i<o;i++)r.add(P(e,t,a[i]));return r}function wo(e,t,n){let r=uo(e,n.i,new Map);mo(n,n.e.k),mo(n,n.e.v);for(let i=0,a=n.e.k,o=n.e.v,s=a.length;i<s;i++)r.set(P(e,t,a[i]),P(e,t,o[i]));return r}function To(e,t){if(typeof t.s!=`string`)throw new Gr(t);if(t.s.length>e.base.maxBase64Length)throw RangeError(`ArrayBuffer exceeds maxBase64Length (`+e.base.maxBase64Length+`)`);let n=kr(t.s),r;if(n.length<Qa||typeof Buffer>`u`)r=Pi(n);else{let e=atob(n);r=new ArrayBuffer(e.length),Buffer.from(r).write(e,`latin1`)}return uo(e,t.i,r)}function Eo(e,t,n){let r=Ja(n.c),i=P(e,t,n.f);if(!(i instanceof ArrayBuffer))throw new Gr(n);let a=n.b??0;if(a<0||a>i.byteLength)throw new Gr(n);return uo(e,n.i,new r(i,a,n.l))}
13function Do(e,t,n){let r=P(e,t,n.f);if(!(r instanceof ArrayBuffer))throw new Gr(n);let i=n.b??0;if(i<0||i>r.byteLength)throw new Gr(n);return uo(e,n.i,new DataView(r,i,n.l))}function Oo(e,t,n,r){if(n.p){let i=bo(e,t,n.p,{});Object.defineProperties(r,Object.getOwnPropertyDescriptors(i))}return r}function ko(e,t,n){return Oo(e,t,n,uo(e,n.i,AggregateError([],kr(n.m))))}function Ao(e,t,n){let r=fo(n,mr,n.s);return Oo(e,t,n,uo(e,n.i,new r(kr(n.m))))}function jo(e,t,n){let r=ji(),i=uo(e,n.i,r.p),a=P(e,t,n.f);if(so(a))throw new Gr(n.f);return n.s?r.s(a):r.f(a),i}function Mo(e,t,n){return uo(e,n.i,Object(P(e,t,n.f)))}function No(e,t,n){let r=e.base.plugins;if(r){let i=kr(n.c);for(let a=0,o=r.length;a<o;a++){let o=r[a];if(o.tag===i)return uo(e,n.i,o.deserialize(n.s,new ao(e,t),{id:n.i}))}}throw new Br(n.c)}function Po(e,t){let n=uo(e,t.i,uo(e,t.s,ji()).p);return vo(e,t.s,22),n}function Fo(e,t,n){let r=e.base.refs.get(n.i);if(r){yo(e,n,n.i,22);let i=P(e,t,n.a[1]);if(so(i))throw new Gr(n.a[1]);n.t===23?r.s(i):r.f(i);return}throw new Vr(`Promise`)}function Io(e,t,n){P(e,t,n.a[0]);let r=P(e,t,n.a[1]);if(!Ii(r))throw new Gr(n.a[1]);return Bi(r)}function Lo(e,t,n){P(e,t,n.a[0]);let r=P(e,t,n.a[1]);if(!na(r))throw new Gr(n.a[1]);return oa(r)}function Ro(e,t,n){let r=uo(e,n.i,ra());vo(e,n.i,31);let i=n.a;mo(n,i);let a=i.length;if(a)for(let n=0;n<a;n++)P(e,t,i[n]);return r}function zo(e,t,n){let r=e.base.refs.get(n.i);if(r){yo(e,n,n.i,31),r.next(P(e,t,n.f));return}throw new Vr(`Stream`)}function Bo(e,t,n){let r=e.base.refs.get(n.i);if(r){yo(e,n,n.i,31),r.throw(P(e,t,n.f));return}throw new Vr(`Stream`)}function Vo(e,t,n){let r=e.base.refs.get(n.i);if(r){yo(e,n,n.i,31),r.return(P(e,t,n.f));return}throw new Vr(`Stream`)}function Ho(e,t,n){P(e,t,n.f)}function Uo(e,t,n){P(e,t,n.a[1])}function Wo(e,t){return Number.isInteger(e)&&e>=-1&&e<t}function Go(e,t,n){mo(n,n.a);let r=n.a.length;if(!(Wo(n.s,r)&&Wo(n.l,r)))throw new Gr(n);let i=uo(e,n.i,Li([],n.s,n.l));for(let a=0;a<r;a++)i.v[a]=P(e,t,n.a[a]);return i}function P(e,t,n){if(t>e.base.depthLimit)throw new Kr(e.base.depthLimit);switch(t+=1,n.t){case 2:return fo(n,fr,n.s);case 0:return Number(n.s);case 1:return kr(String(n.s));case 3:if(String(n.s).length>$a)throw new Gr(n);return BigInt(n.s);case 4:return e.base.refs.get(n.i);case 18:return po(e,n);
13case 9:return ho(e,t,n);case 10:case 11:return xo(e,t,n);case 5:return M(e,n);case 6:return So(e,n);case 7:return Co(e,t,n);case 8:return wo(e,t,n);case 19:return To(e,n);case 16:case 15:return Eo(e,t,n);case 20:return Do(e,t,n);case 14:return ko(e,t,n);case 13:return Ao(e,t,n);case 12:return jo(e,t,n);case 17:return fo(n,dr,n.s);case 21:return Mo(e,t,n);case 25:return No(e,t,n);case 22:return Po(e,n);case 23:case 24:return Fo(e,t,n);case 28:return Io(e,t,n);case 30:return Lo(e,t,n);case 31:return Ro(e,t,n);case 32:return zo(e,t,n);case 33:return Bo(e,t,n);case 34:return Vo(e,t,n);case 27:return Ho(e,t,n);case 29:return Uo(e,t,n);case 35:return Go(e,t,n);case 36:return N(e,n);default:throw new zr(n)}}function Ko(e,t){try{return P(e,0,t)}catch(e){throw new Ir(e)}}function qo(e,t){let n=qa(t.plugins);return Ko(io({maxBase64Length:t.maxBase64Length,plugins:n,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit}),e)}async function Jo(e,t={}){let n=qa(t.plugins),r=Sa(1,{compactArrayBufferViews:t.compactArrayBufferViews,plugins:n,disabledFeatures:t.disabledFeatures});return{t:await Wa(r,e),f:r.base.features,m:Array.from(r.base.marked)}}function Yo(e){return Ga({tag:`$TSR/t/`+e.key,test:e.test,parse:{sync(t,n){return{v:n.parse(e.toSerializable(t))}},async async(t,n){return{v:await n.parse(e.toSerializable(t))}},stream(t,n){return{v:n.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,n){return e.fromSerializable(n.deserialize(t.v))}})}var Xo=Ga({tag:`$TSR/Error`,test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return`new Error(`+t.serialize(e.message)+`)`},deserialize(e,t){return Error(t.deserialize(e.message))}}),Zo=class{constructor(e,t){this.stream=e,this.hint=t?.hint??`binary`}};function Qo(e){let t=[];for(let n=0;n<e.length;n+=32768)t.push(String.fromCharCode.apply(null,e.subarray(n,n+32768)));return btoa(t.join(``))}var $o=new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});function es(e){try{return`t`+$o.decode(e)}catch{return`b`+Qo(e)}}function ts(e,t,n){n?.throwIfAborted();let r=ra(),i=e.getReader(),a=!0,o=()=>{a=!1,n?.removeEventListener(`abort`,c),i.releaseLock()},s=e=>a?(i.cancel(e).catch(()=>{}),o(),!0):!1,c=()=>{s(n.reason)&&r.throw(n.reason)};return n?.addEventListener(`abort`,c),(async()=>{try{for(;a;){let{done:e,value:n}=await i.read();if(!a)return;if(e){o(),r.return(void 0);return}r.next(t(n))}}catch(e){s(e)&&r.throw(e)}})(),[r,s]}function ns(e){return Ga({tag:`tss/RawStream`,test:e=>e instanceof Zo,parse:{async:async(t,n)=>{let r=await n.parse(t.hint===`text`),[i]=ts(t.stream,t.hint===`text`?es:Qo,e);return{text:r,stream:await n.parse(i)}}},serialize:void 0,deserialize:void 0})}var rs=ns(),is={},as=e=>new ReadableStream({start(t){e.on({next(e){try{t.enqueue(e)}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),os=Ga({tag:`seroval-plugins/web/ReadableStreamFactory`,test(e){return e===is},parse:{sync(){return is},async async(){return await Promise.resolve(is)},stream(){return is}},serialize(){return as.toString()},deserialize(){return is}});async function ss(e,t){try{for(;;){let n=await t.read();if(n.done){e.return(n.value),t.releaseLock();break}e.next(n.value)}}catch(n){t.releaseLock(),e.throw(n)}}function cs(e){e.cancel().catch(()=>{}),e.releaseLock()}function ls(e){let t=ra(),n=e.getReader(),r=cs.bind(null,n);return ss(t,n).catch(r),[t,r]}var us=Ga({tag:`seroval/plugins/web/ReadableStream`,extends:[os],test(e){return typeof ReadableStream>`u`?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(is),stream:t.parse(ra())}},async async(e,t){return{factory:await t.parse(is),stream:await t.parse(ls(e)[0])}},stream(e,t){let[n,r]=ls(e);return t.addCleanup(r),{factory:t.parse(is),stream:t.parse(n)}}},serialize(e,t){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},deserialize(e,t){let n=t.deserialize(e.stream);if(!n||typeof n!=`object`||!na(n))throw Error(`Expected a stream source.`);return as(n)}});
13function ds(e){return[Xo,e?ns(e):rs,us]}[...ds()];function fs(e){return Ga({tag:`tss/RawStream`,test:()=>!1,parse:{},serialize:void 0,deserialize(t,n){return e(n.deserialize(t.streamId))}})}function ps(e){return[...(Ae()?.serializationAdapters)?.map(Yo)??[],...e]}function ms(e){return ps(ds(e))}var hs=new TextDecoder,gs=new Uint8Array,_s=new ByteLengthQueuingStrategy({highWaterMark:0});function vs(e){let t=e.getReader(),n=new Map,r=0,i,a,o=()=>{i?.(),i=void 0},s=(e,t)=>{let n=e[1];e[1]=!1,n&&(t===1?n.close():n.error(t[0]))},c=new ReadableStream({start(e){a=e},pull:o,cancel(e){let i=[e===void 0?Error(`Framed response cancelled`):e];r=i,o(),t.cancel(e).catch(()=>{});for(let e of n.values())s(e,i)}});function l(e){let t=n.get(e);if(t)return t;if(n.size>=1024)throw Error(`Too many raw streams`);let i,a=[new ReadableStream({start(e){i=e},cancel(){a[1]!==!1&&(a[1]=null)}},_s),i];return n.set(e,a),r!==0&&s(a,r),a}function u(e){if(e===0||e>>>0!==e)throw RangeError(`Invalid raw stream ID`);return l(e)[0]}return(async()=>{let e=gs,o=0;async function c(){for(;o===e.byteLength;){e=gs,o=0;let n=await t.read();if(r!==0||n.done)return!1;e=n.value}return!0}async function u(t,n){if(t===0)return gs;if(!await c()){if(n)return;throw Error(`Incomplete frame`)}if(e.byteLength-o>=t){let n=e.subarray(o,o+t);return o+=t,o===e.byteLength&&(e=gs,o=0),n}let r=new Uint8Array(t),i=0;for(;i<t;){if(!await c())throw Error(`Incomplete frame`);let n=Math.min(t-i,e.byteLength-o);r.set(e.subarray(o,o+n),i),o+=n,i+=n}return o===e.byteLength&&(e=gs,o=0),r}try{for(;r===0;){let e=await u(9,!0);if(r!==0)return;if(!e){for(let e of n.values())if(e[1])throw Error(`Incomplete raw stream`);r=1,a.close();return}let t=e[0],o=(e[1]<<24|e[2]<<16|e[3]<<8|e[4])>>>0,c=(e[5]<<24|e[6]<<16|e[7]<<8|e[8])>>>0;if(e=gs,t>3||t===0!=(o===0)||c>16777216||t===2&&c!==0)throw Error(`Invalid frame`);let d=t===0?void 0:l(o);if(d?.[1]===!1)throw Error(`Raw stream already ended`);let f=await u(c);if(r!==0)return;if(!d){let e=hs.decode(f);for(f=gs,a.enqueue(e);r===0&&a.desiredSize<=0;)await new Promise(e=>{i=e});continue}if(t===1){let e=d[1];if(e){if(-e.desiredSize>134217728){e.error(Error(`Raw stream ${o} has too many unread bytes`)),d[1]=null,f=gs;continue}let t=f.byteLength*4<f.buffer.byteLength?f.slice():f;f=gs,e.enqueue(t)}}else s(d,t===2?1:[Error(hs.decode(f))])}}catch(e){if(r===0){let i=[e];r=i,t.cancel(e).catch(()=>{}),a.error(e);for(let e of n.values())s(e,i)}}finally{e=gs,t.releaseLock()}})(),[c,u]}var ys=Symbol.for(`TSR_DEFERRED_PROMISE`);function bs(e,t){let n=e;return n[ys]?n:(n[ys]={status:`pending`},n.then(e=>{n[ys].status=`success`,n[ys].data=e}).catch(e=>{n[ys].status=`error`,n[ys].error={data:(t?.serializeError??Bt)(e),__isServerError:!0}}),n)}function xs(e,t){if(e)return typeof e==`string`?e:e[t]}function Ss(e){return e?.scriptFormat??`module`}function Cs(e,t,n){let r=ws(t),i=xs(n,`script`)??r.crossOrigin;return{...Ss(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,...i?{crossOrigin:i}:{}}}function ws(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function Ts(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function Es(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function Ds(e,t,n,r){let i=cn(e),a=[],o=[];for(let e of i)for(let t of Array.isArray(e.scripts)?e.scripts:[]){if(!t)continue;let{children:e,...i}=t;a.push({tag:`script`,attrs:{...i,...r,nonce:n},children:e})}if(t)for(let e of i)for(let r of t.routes[e.routeId]?.scripts??[])o.push({tag:`script`,attrs:{...r.attrs,nonce:n},children:r.children});return[a,o]}function Os([e,t],n){return n?[...n.before,...e,...t,n.boundary]:[...e,...t]}var ks=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=xt:this.parentRoute||p();let r=n?xt:t?.path;r&&r!==`/`&&(r=le(r));let i=t?.id||r,a=n?xt:x((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:x(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=ee(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>l({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},As=class extends ks{constructor(e){super(e)}};function js(e){return e}var Ms;function Ns(e,t,n){try{return qo(e,t)}catch(e){throw Fs(n),e}}async function Ps(e){e.length>0&&(await Promise.allSettled(e),e.length=0)}function Fs(e){for(let t of e)t.catch(()=>{});e.length=0}var Is=Object.prototype.hasOwnProperty;function Ls(e){for(let t in e)if(Is.call(e,t))return!0;return!1}async function Rs(e,t,n){Ms||=ms();let r=t[0],i=r.fetch??n,a=r.data instanceof FormData,o=new Headers(r.headers);if(o.set(`x-tsr-serverFn`,`true`),a||o.set(`accept`,`${ke}, application/x-ndjson, application/json`),r.method===`GET`){if(a)throw Error(`FormData is not supported with GET requests`);let t=await zs(r);if(t!==void 0){let n=pt({payload:t});e.includes(`?`)?e+=`&${n}`:e+=`?${n}`}}let s;return r.method===`POST`&&(s=await Vs(r),typeof s==`string`&&o.set(`content-type`,`application/json`)),Hs(()=>i(e,{method:r.method,headers:o,signal:r.signal,body:s}))}async function zs(e){let t;return e.data!==void 0&&(t={data:e.data}),e.context&&Ls(e.context)&&((t??={}).context=e.context),t?Bs(t,e.signal):void 0}async function Bs(e,t){t?.throwIfAborted();let n;try{n=await Jo(e,{plugins:t?ms(t):Ms})}finally{t?.throwIfAborted()}return JSON.stringify(n)}async function Vs(e){if(e.data instanceof FormData){let t;return e.context&&Ls(e.context)&&(t=await Bs(e.context,e.signal)),t!==void 0&&e.data.set(Ee,t),e.data}return zs(e)}async function Hs(e){let t;try{t=await e()}catch(e){if(e instanceof Response)t=e;else throw e}if(t.headers.get(`x-tss-raw`)===`true`)return t;let n=t.headers.get(`content-type`);if(n||p(),t.headers.get(`x-tss-serialized`)){let e;if(n.includes(`application/x-tss-framed`)){let r=/;\s*v=(\d+)/.exec(n)?.[1];if(r&&+r!=1)throw Error(`Unsupported framed protocol version ${r}`);if(!t.body)throw Error(`No response body for framed response`);let[i,a]=vs(t.body);e=await Us(i,[fs(a),...Ms])}else if(n.includes(`application/json`)){let n=await t.json(),r=[];e=Ns(n,{plugins:Ms},r),await Ps(r)}if(e||p(),e instanceof Error)throw e;return e}if(n.includes(`application/json`)){let e=await t.json(),n=f(e);if(n)throw n;if(c(e))throw e;return e}if(!t.ok)throw Error(await t.text());return t}
13async function Us(e,t){let n=e.getReader(),r={refs:new Map,plugins:t},i=e=>{n.cancel(e).catch(()=>{})},a,o=[];try{let e=await n.read();if(e.done)throw Error(`Stream ended before first object`);a=Ns(JSON.parse(e.value),r,o)}catch(e){throw i(e),n.releaseLock(),e}return(async()=>{let e=[];try{for(;;){let t=await n.read();if(t.done)return;Ns(JSON.parse(t.value),r,e),Fs(e)}}catch(e){i(e),console.error(`Stream processing error:`,e)}finally{n.releaseLock()}})(),await Ps(o),a}function Ws(e){let t=`/_serverFn/`+e;return Object.assign((...e)=>{let n=Ae()?.serverFns?.fetch;return Rs(t,e,n??fetch)},{url:t,serverFnMeta:{id:e},[De]:!0})}var Gs=js({key:`$TSS/serverfn`,test:e=>typeof e!=`function`||!(De in e)?!1:!!e[De],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>Ws(e)}),F=e(o(),1),Ks=F.use,qs=F.useLayoutEffect,I=r();function Js({promise:e}){if(Ks)return Ks(e);let t=bs(e);if(t[ys].status===`pending`)throw t;if(t[ys].status===`error`)throw t[ys].error;return t[ys].data}function Ys(e){let t=(0,I.jsx)(Xs,{...e});return e.fallback?(0,I.jsx)(F.Suspense,{fallback:e.fallback,children:t}):t}function Xs(e){let t=Js(e);return e.children(t)}var Zs=class extends F.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?F.createElement(this.props.errorComponent??Qs,{error:e[0],reset:this.reset}):this.props.children}};function Qs({error:e}){let[t,n]=F.useState(!1);return(0,I.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,I.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,I.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,I.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,I.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,I.jsx)(`div`,{children:(0,I.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,I.jsx)(`code`,{children:e.message}):null})}):null]})}var $s=F.createContext(void 0),ec=F.createContext(void 0);function tc({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function nc(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var rc=[],ic=0,{link:ac,unlink:oc,propagate:sc,checkDirty:cc,shallowPropagate:lc}=tc({update(e){return e._update()},notify(e){rc[dc++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,hc(e))}}),uc=0,dc=0,fc,pc=0;function mc(e){try{++pc,e()}finally{--pc||gc()}}function hc(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=oc(n,e)}function gc(){if(!(pc>0)){for(;uc<dc;){let e=rc[uc];rc[uc++]=void 0,e.notify()}uc=0,dc=0}}function _c(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return fc!==void 0&&ac(i,fc,ic),i._snapshot},subscribe(e){let t=nc(e),n={current:!1},r=vc(()=>{i.get(),n.current?(fc=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=fc,o=t?.compare??Object.is;if(n)fc=i,++ic,i.depsTail=void 0;else if(e===void 0)return!1;
13n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{fc=a,n&&(i.flags&=-5),hc(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&cc(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&lc(e)}}else e&32&&(i.flags=e&-33);return fc!==void 0&&ac(i,fc,ic),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(sc(e),lc(e),gc())}},i}function vc(e){let t=()=>{let t=fc;fc=n,++ic,n.depsTail=void 0,n.flags=6;try{return e()}finally{fc=t,n.flags&=-5,hc(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&cc(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,hc(this)}};return t(),n}var yc={};function bc(e,t){let n=F.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=_(n.current,i):i}}function xc(e){let t=s(),n=F.useContext(e.from?ec:$s),r=e.from??n,i=t.stores.getMatchStore(r),a=bc(e,t),o=oe(i,e=>e?a(e):yc);if(o!==yc)return o;(e.shouldThrow??!0)&&p()}function Sc(e){return xc({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Cc(e){let{select:t,...n}=e;return xc({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function wc(e){return xc({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Tc(e){return xc({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Ec(e){let t=s();return F.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Dc(e){return xc({...e,select:t=>e.select?e.select(t.context):t.context})}var Oc=class extends ks{constructor(e){super(e),this.useMatch=e=>xc({...e,from:this.id}),this.useRouteContext=e=>Dc({...e,from:this.id}),this.useSearch=e=>Tc({...e,from:this.id}),this.useParams=e=>wc({...e,from:this.id}),this.useLoaderDeps=e=>Cc({...e,from:this.id}),this.useLoaderData=e=>Sc({...e,from:this.id}),this.useNavigate=()=>Ec({from:this.fullPath}),this.Link=F.forwardRef((e,t)=>(0,I.jsx)(D,{ref:t,from:this.fullPath,...e}))}};function kc(e){return new Oc(e)}function Ac(){return e=>Mc(e)}var jc=class extends As{constructor(e){super(e),this.useMatch=e=>xc({...e,from:this.id}),this.useRouteContext=e=>Dc({...e,from:this.id}),this.useSearch=e=>Tc({...e,from:this.id}),this.useParams=e=>wc({...e,from:this.id}),this.useLoaderDeps=e=>Cc({...e,from:this.id}),this.useLoaderData=e=>Sc({...e,from:this.id}),this.useNavigate=()=>Ec({from:this.fullPath}),this.Link=F.forwardRef((e,t)=>(0,I.jsx)(D,{ref:t,from:this.fullPath,...e}))}};function Mc(e){return new jc(e)}function L(e){return e=>{let t=kc(e);return t.isRoot=!1,t}}function R(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(de(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r)if(Ks)Ks(a());else throw a();return F.createElement(r,e)};return o.preload=a,o}function Nc(e){let t=s(),n=`not-found-${oe(t.stores.location,e=>e.pathname)}-${oe(t.stores.status)}`;return(0,I.jsx)(Zs,{getResetKey:()=>n,onCatch:(t,n)=>{if(c(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(c(t))return e.fallback?.(t);throw t},children:e.children})}function Pc(){return(0,I.jsx)(`p`,{children:`Not Found`})}function Fc(e,t,n){return t.options.notFoundComponent?(0,I.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,I.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,I.jsx)(Pc,{})}function Ic(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,I.jsx)(n,{}):null}var Lc=(e,t)=>e[0]===t[0]&&e[1]===t[1],Rc=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,zc=F.memo(function({routeId:e}){let t=s();return(0,I.jsx)(Bc,{router:t,match:oe(t.stores.getMatchStore(e))})});function Bc({router:e,match:t}){let n=e.routesById[t.routeId],r=Ic(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,l=Rc(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),u=(0,I.jsx)(Vc,{match:t});s&&(u=(0,I.jsx)(T,{fallback:r,children:u})),o&&(u=(0,I.jsx)(Nc,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return F.createElement(o,e)},children:u})),i&&(u=(0,I.jsx)(Zs,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(c(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:u})),l&&(u=(0,I.jsx)(F.Suspense,{fallback:r,children:u}));let d=n.isRoot?n.options.shellComponent:void 0;return(0,I.jsx)($s.Provider,{value:t.routeId,children:d?(0,I.jsxs)(d,{children:[u,null]}):(0,I.jsxs)(I.Fragment,{children:[u,null]})})}var Vc=F.memo(function({match:e}){let t=s(),n=e.routeId,r=t.routesById[n],i=F.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=F.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,I.jsx)(e,{},i):(0,I.jsx)(Hc,{})},[i,r.options.component,t.options.defaultComponent]);
13if(e.status===`pending`){if(t.ssr&&!Rc(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return Ic(t,r)}if(e.status===`notFound`)return Fc(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Hc=F.memo(function(){let e=s(),t=F.useContext($s),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=oe(a,e=>[!!e._notFound,e.error],{compare:Lc}),i=oe(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Fc(e,e.routesById[t],r);if(!i)return null;let a=(0,I.jsx)(zc,{routeId:i});return t===`__root__`?(0,I.jsx)(F.Suspense,{fallback:Ic(e),children:a}):a});function Uc(e,t){let n=e[1];e.length=0,n?.(t)}function Wc({t:e}){let t=s(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Uc(n,!1),n.push(i,a),e(t),F.startTransition(r)}),qs(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(ee(r.publicHref)!==ee(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...Vt(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Gc(){let e=s(),t=e.routesById[xt],n=Ic(e,t),r=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Wc,{t:F.useState()[1]}),e.ssr?(0,I.jsx)(Kc,{}):(0,I.jsx)(F.Suspense,{fallback:n,children:(0,I.jsx)(Kc,{})})]});return e.options.InnerWrap?(0,I.jsx)(e.options.InnerWrap,{children:r}):r}function Kc(){let e=s(),t=e._rendered,n=oe(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;qs(()=>{t[0]===n&&Uc(t,!0)},[t,n]);let a=i?(0,I.jsx)(zc,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,I.jsx)(Zs,{getResetKey:()=>r,onCatch:void 0,children:a})}var qc=e=>({createMutableStore:_c,createReadonlyStore:_c,batch:mc}),Jc=e=>new Yc(e),Yc=class extends Gt{constructor(e){super(e,qc)}};function Xc({router:e,children:t,...n}
13){fe(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,I.jsx)(a.Provider,{value:e,children:t});return e.options.Wrap?(0,I.jsx)(e.options.Wrap,{children:r}):r}function Zc({router:e,...t}){return(0,I.jsx)(Xc,{router:e,...t,children:(0,I.jsx)(Gc,{})})}function Qc(e){let t=s({warn:e?.router===void 0}),n=e?.router||t;return oe(n.stores.__store,bc(e,n))}function $c(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function el(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e,a=F.useMemo(()=>n===void 0?void 0:{__html:n},[n]);switch(e.tag){case`title`:return(0,I.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,I.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,I.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,I.jsx)(`style`,{...t,dangerouslySetInnerHTML:a,nonce:r});case`script`:return(0,I.jsx)(tl,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function tl({attrs:e,children:t,preventScriptHoist:n}){s();let r=re(),i=F.useMemo(()=>t===void 0?void 0:{__html:t},[t]),a=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(F.useEffect(()=>{if(!a){if(e?.src){let t=document.createElement(`a`);t.href=e.src;let n=t.href;for(let e of document.scripts)if(e.src===n)return;let r=document.createElement(`script`);return $c(r,e),document.head.appendChild(r),()=>r.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.scripts){if(e.hasAttribute(`src`))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,$c(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,a]),a&&typeof t==`string`)return(0,I.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:i});if(!r){if(e?.src)return(0,I.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,I.jsx)(`script`,{...e,dangerouslySetInnerHTML:i,suppressHydrationWarning:!0})}return null}function nl(e,t,n,r){n=cn(n);let i=n.map(e=>e.meta).filter(e=>e!==void 0),a=[],o={},s;for(let e=i.length-1;e>=0;e--){let n=i[e];for(let e=n.length-1;e>=0;e--){let r=n[e];if(r)if(r.title)s||={tag:`title`,children:r.title};else if(`script:ld+json`in r)try{let e=JSON.stringify(r[`script:ld+json`]);a.push({tag:`script`,attrs:{type:`application/ld+json`},children:ue(e)})}catch{}else{let e=r.name??r.property;if(e){if(o[e])continue;o[e]=!0}a.push({tag:`meta`,attrs:{...r,nonce:t}})}}}s&&a.push(s),t&&a.push({tag:`meta`,attrs:{property:`csp-nonce`,content:t}}),a.reverse();let c=n.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:t}})),l=e.ssr?.manifest,u=[];l&&(n.forEach(e=>{(l.routes[e.routeId]?.css)?.forEach(e=>{let n=Es(e);u.push({tag:`link`,attrs:{rel:`stylesheet`,...n,crossOrigin:xs(r,`stylesheet`)??n.crossOrigin,suppressHydrationWarning:!0,nonce:t}})})}),l.inlineStyle&&u.push({tag:`style`,attrs:{...l.inlineStyle.attrs,nonce:t},children:l.inlineStyle.children,inlineCss:!0}));let d=[];l&&n.forEach(e=>{l.routes[e.routeId]?.preloads?.forEach(e=>{d.push({tag:`link`,attrs:{...Cs(l,e,r),nonce:t}})})});let f=n.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`style`,attrs:{...n,nonce:t},children:e})),p=n.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`script`,attrs:{...n,nonce:t},children:e})),m=[];return Ts(m,a),m.push(...d),Ts(m,c),m.push(...u),Ts(m,f),Ts(m,p),m}var rl=e=>
13{let t=s(),n=t.options.ssr?.nonce,r=F.useCallback(r=>nl(t,n,r,e),[e,n,t]);return oe(t.stores.matches,r,{compare:w})};function il(e){let t=rl(e.assetCrossOrigin),n=s().options.ssr?.nonce;return(0,I.jsx)(I.Fragment,{children:t.map(e=>(0,F.createElement)(el,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var al={suppressHydrationWarning:!0},ol=()=>{let e=s(),t=e.options.ssr?.nonce,n=n=>{let r=Ds(n,e.ssr?.manifest,t,al);for(let e of r[1])if(typeof e.attrs?.src==`string`){let t=e;t.preventScriptHoist=!0}return r};return sl(oe(e.stores.matches,e=>Os(n(e)),{compare:w}))};function sl(e){return(0,I.jsx)(I.Fragment,{children:e.map((e,t)=>(0,F.createElement)(el,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var cl=(e,t)=>{let n={type:`request`,...t||e},r=e=>cl({},Object.assign(n,{validator:e,inputValidator:e}));return{options:n,middleware:e=>cl({},Object.assign(n,{middleware:e})),validator:r,inputValidator:r,client:e=>cl({},Object.assign(n,{client:e})),server:e=>cl({},Object.assign(n,{server:e}))}};function ll(e,t){for(let n=0,r=t.length;n<r;n++){let r=t[n];e.has(r)||(e.add(r),r.extends&&ll(e,r.extends))}}var ul=e=>({getOptions:async()=>{let t=await e();if(t.serializationAdapters){let e=new Set;ll(e,t.serializationAdapters),t.serializationAdapters=Array.from(e)}return t},createMiddleware:cl}),dl=Symbol.for(`@supabase/supabase-js.traceContextExtractor`);function fl(){return globalThis[dl]}var pl=function(){return pl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},pl.apply(this,arguments)};function z(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ml(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function hl(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var gl=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),_l=class extends Error{constructor(e,t=`FunctionsError`,n){super(e),this.name=t,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}},vl=class extends _l{constructor(e){super(`Failed to send a request to the Edge Function`,`FunctionsFetchError`,e)}},yl=class extends _l{constructor(e){super(`Relay Error invoking the Edge Function`,`FunctionsRelayError`,e)}},bl=class extends _l{constructor(e){super(`Edge Function returned a non-2xx status code`,`FunctionsHttpError`,e)}},xl;(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`})(xl||={});var Sl=class{constructor(e,{headers:t={},customFetch:n,region:r=xl.Any}={}){this.url=e,this.headers=t,this.region=r,this.fetch=gl(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return ml(this,arguments,void 0,function*(e,t={}){var n;let r,i,a;try{let{headers:n,method:o,body:s,signal:c,timeout:l}=t,u={},{region:d}=t;d||=this.region;let f=new URL(`${this.url}/${e}`);d&&d!==`any`&&(u[`x-region`]=d,f.searchParams.set(`forceFunctionRegion`,d));let p,m=!!n&&Object.keys(n).some(e=>e.toLowerCase()===`content-type`);s&&!m?typeof Blob<`u`&&s instanceof Blob||s instanceof ArrayBuffer?(u[`Content-Type`]=`application/octet-stream`,p=s):typeof s==`string`?(u[`Content-Type`]=`text/plain`,p=s):typeof FormData<`u`&&s instanceof FormData?p=s:(u[`Content-Type`]=`application/json`,p=JSON.stringify(s)):p=s&&typeof s!=`string`&&!(typeof Blob<`u`&&s instanceof Blob)&&!(s instanceof ArrayBuffer)&&!(typeof FormData<`u`&&s instanceof FormData)?JSON.stringify(s):s;let h=c;l&&(i=new AbortController,r=setTimeout(()=>i.abort(),l),c?(h=i.signal,a=()=>i.abort(),c.addEventListener(`abort`,a)):h=i.signal);let g=yield this.fetch(f.toString(),{method:o||`POST`,headers:Object.assign(Object.assign(Object.assign({},u),this.headers),n),body:p,signal:h}).catch(e=>{throw new vl(e)}),_=g.headers.get(`x-relay-error`);if(_&&_===`true`)throw new yl(g);if(!g.ok)throw new bl(g);let v=(g.headers.get(`Content-Type`)??`text/plain`).split(`;`)[0].trim().toLowerCase(),y;return y=v===`application/json`?yield g.json():v===`application/octet-stream`||v===`application/pdf`?yield g.blob():v===`text/event-stream`?g:v===`multipart/form-data`?yield g.formData():yield g.text(),{data:y,error:null,response:g}}catch(e){return{data:null,error:e,response:e instanceof bl||e instanceof yl?e.context:void 0}}finally{r&&clearTimeout(r),a&&((n=t.signal)==null||n.removeEventListener(`abort`,a))}})}},Cl=3,wl=e=>Math.min(1e3*2**e,3e4),Tl=[520,503],El=[`GET`,`HEAD`,`OPTIONS`],Dl=class extends
13Error{constructor(e){super(e.message),this.name=`PostgrestError`,this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Ol(e){"@babel/helpers - typeof";return Ol=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ol(e)}function kl(e,t){if(Ol(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Ol(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Al(e){var t=kl(e,`string`);return Ol(t)==`symbol`?t:t+``}function jl(e,t,n){return(t=Al(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ml(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Nl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ml(Object(n),!0).forEach(function(t){jl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ml(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pl(e,t){return new Promise(n=>{if(t?.aborted){n();return}let r=setTimeout(()=>{t?.removeEventListener(`abort`,i),n()},e);function i(){clearTimeout(r),n()}t?.addEventListener(`abort`,i)})}function Fl(e,t,n,r){return!(!r||n>=Cl||!El.includes(e)||!Tl.includes(t))}var Il=class{constructor(e){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=e.shouldThrowOnError??!1,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle??!1,this.shouldStripNulls=e.shouldStripNulls??!1,this.urlLengthLimit=e.urlLengthLimit??8e3,this.retryEnabled=e.retry??!0,this.fetch=e.fetch?e.fetch:fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get(`Accept`)===`text/csv`)throw 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){let e=this.headers.get(`Accept`);e===`application/vnd.pgrst.object+json`?this.headers.set(`Accept`,`application/vnd.pgrst.object+json;nulls=stripped`):(!e||e===`application/json`)&&this.headers.set(`Accept`,`application/vnd.pgrst.array+json;nulls=stripped`)}let r=this.fetch,i=(async()=>{let e=0;for(;;){let t={};n.headers.forEach((e,n)=>{t[n]=e}),e>0&&(t[`X-Retry-Count`]=String(e));let i;try{i=await r(n.url.toString(),{method:n.method,headers:t,body:JSON.stringify(n.body,(e,t)=>typeof t==`bigint`?t.toString():t),signal:n.signal})}catch(t){if(t?.name===`AbortError`||t?.code===`ABORT_ERR`||!El.includes(n.method))throw t;if(n.retryEnabled&&e<Cl){let t=wl(e);e++,await Pl(t,n.signal);continue}throw t}if(Fl(n.method,i.status,e,n.retryEnabled)){let t=i.headers?.get(`Retry-After`)??null,r=t===null?wl(e):Math.max(0,parseInt(t,10)||0)*1e3;await i.text(),e++,await Pl(r,n.signal);continue}return await n.processResponse(i)}})();return this.shouldThrowOnError||(i=i.catch(e=>{let t=``,n=``,r=``,i=e?.cause;if(i){let n=i?.message??``,r=i?.code??``;t=`${e?.name??`FetchError`}: ${e?.message}`,t+=`\n\nCaused by: ${i?.name??`Error`}: ${n}`,r&&(t+=` (${r})`),i?.stack&&(t+=`\n${i.stack}`)}else t=e?.stack??``;let a=this.url.toString().length;return e?.name===`AbortError`||e?.code===`ABORT_ERR`?(r=``,n=`Request was aborted (timeout or manual cancellation)`,a>this.urlLengthLimit&&(n+=`. Note: Your request URL is ${a} 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.`)):(i?.name===`HeadersOverflowError`||i?.code===`UND_ERR_HEADERS_OVERFLOW`)&&(r=``,n=`HTTP headers exceeded server limits (typically 16KB)`,a>this.urlLengthLimit&&(n+=`. Your request URL is ${a} 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:`${e?.name??`FetchError`}: ${e?.message}`,details:t,hint:n,code:r},data:null,count:null,status:0,statusText:``}})),i.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,i=null,a=e.status,o=e.statusText;if(e.ok){if(t.method!==`HEAD`){let i=await e.text();if(i!==``)if(t.headers.get(`Accept`)===`text/csv`)r=i;else if(t.headers.get(`Accept`)&&t.headers.get(`Accept`)?.includes(`application/vnd.pgrst.plan+text`))r=i;else try{r=JSON.parse(i)}catch{if(n={message:i},r=null,t.shouldThrowOnError)throw new Dl({message:i,details:``,hint:``,code:``})}}let s=t.headers.get(`Prefer`)?.match(/count=(exact|planned|estimated)/),c=e.headers.get(`content-range`)?.split(`/`);if(s&&c&&c.length>1&&(i=parseInt(c[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,i=null,a=406,o=`Not Acceptable`,t.shouldThrowOnError)throw new Dl(Nl(Nl({},n),{},{hint:n.hint??``}))}else r=r.length===1?r[0]:null}else{let i=await e.text();try{n=JSON.parse(i),Array.isArray(n)&&e.status===404&&(r=[],n=null,a=200,o=`OK`)}
vendor: 8,717 bytes, line 13
13catch{e.status===404&&i===``?(a=204,o=`No Content`):n={message:i}}if(n&&t.shouldThrowOnError)throw new Dl(n)}return{success:n===null,error:n,data:r,count:i,status:a,statusText:o}}returns(){return this}overrideTypes(){return this}},Ll=class extends Il{throwOnError(){return super.throwOnError()}select(e){let t=!1,n=(e??`*`).split(``).map(e=>/\s/.test(e)&&!t?``:(e===`"`&&(t=!t),e)).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:i=r}={}){let a=i?`${i}.order`:`order`,o=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${o?`${o},`:``}${e}.${t?`asc`:`desc`}${n===void 0?``:n?`.nullsfirst`:`.nullslast`}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){let r=n===void 0?`limit`:`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){let i=r===void 0?`offset`:`${r}.offset`,a=r===void 0?`limit`:`${r}.limit`;return this.url.searchParams.set(i,`${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:i=!1,format:a=`text`}={}){let o=[e?`analyze`:null,t?`verbose`:null,n?`settings`:null,r?`buffers`:null,i?`wal`:null].filter(Boolean).join(`|`),s=this.headers.get(`Accept`)??`application/json`;return this.headers.set(`Accept`,`application/vnd.pgrst.plan+${a}; for="${s}"; options=${o};`),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}},Rl=RegExp(`[,()]`),zl=class extends Ll{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){let n=Array.from(new Set(t)).map(e=>typeof e==`string`&&Rl.test(e)?`"${e}"`:`${e}`).join(`,`);return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){let n=Array.from(new Set(t)).map(e=>typeof e==`string`&&Rl.test(e)?`"${e}"`:`${e}`).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 i=``;r===`plain`?i=`pl`:r===`phrase`?i=`ph`:r===`websearch`&&(i=`w`);let a=n===void 0?``:`(${n})`;return this.url.searchParams.append(e,`${i}fts${a}.${t}`),this}match(e){return Object.entries(e).filter(([e,t])=>t!==void 0).forEach(([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){let 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}},Bl=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:i=8e3,retry:a}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=i,this.retry=a}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){let{head:n=!1,count:r}=t??{},i=n?`HEAD`:`GET`,a=!1,o=(e??`*`).split(``).map(e=>/\s/.test(e)&&!a?``:(e===`"`&&(a=!a),e)).join(``),{url:s,headers:c}=this.cloneRequestState();return s.searchParams.set(`select`,o),r&&c.append(`Prefer`,`count=${r}`),new zl({method:i,url:s,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){let{url:r,headers:i}=this.cloneRequestState();if(t&&i.append(`Prefer`,`count=${t}`),n||i.append(`Prefer`,`missing=default`),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);r.searchParams.set(`columns`,e.join(`,`))}}return new zl({method:`POST`,url:r,headers:i,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){let{url:a,headers:o}=this.cloneRequestState();if(o.append(`Prefer`,`resolution=${n?`ignore`:`merge`}-duplicates`),t!==void 0&&a.searchParams.set(`on_conflict`,t),r&&o.append(`Prefer`,`count=${r}`),i||o.append(`Prefer`,`missing=default`),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);a.searchParams.set(`columns`,e.join(`,`))}}return new zl({method:`POST`,url:a,headers:o,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){let{url:n,headers:r}=this.cloneRequestState();return t&&r.append(`Prefer`,`count=${t}`),new zl({method:`PATCH`,url:n,headers:r,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){let{url:t,headers:n}=this.cloneRequestState();return e&&n.append(`Prefer`,`count=${e}`),new zl({method:`DELETE`,url:t,headers:n,schema:this.schema,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}},Vl=class e{constructor(e,{headers:t={},schema:n,fetch:r,timeout:i,urlLengthLimit:a=8e3,retry:o}={}){this.url=e,this.headers=new Headers(t),this.schemaName=n,this.urlLengthLimit=a;let s=r??globalThis.fetch;this.fetch=i!==void 0&&i>0?(e,t)=>{let n=new AbortController,r=setTimeout(()=>n.abort(),i),a=t?.signal;if(a){if(a.aborted)return clearTimeout(r),s(e,t);let i=()=>{clearTimeout(r),n.abort()};return a.addEventListener(`abort`,i,{once:!0}),s(e,Nl(Nl({},t),{},{signal:n.signal})).finally(()=>{clearTimeout(r),a.removeEventListener(`abort`,i)})}return s(e,Nl(Nl({},t),{},{signal:n.signal})).finally(()=>clearTimeout(r))}:s,this.retry=o}from(e){if(!e||typeof e!=`string`||e.trim()===``)throw Error(`Invalid relation name: relation must be a non-empty string.`);return new Bl(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new e(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,t={},{head:n=!1,get:r=!1,count:i}={}){let a,o=new URL(`${this.url}/rpc/${e}`),s,c=e=>typeof e==`object`&&!!e&&(!Array.isArray(e)||e.some(c)),l=n&&Object.values(t).some(c);l?(a=`POST`,s=t):n||r?(a=n?`HEAD`:`GET`,Object.entries(t).filter(([e,t])=>t!==void 0).map(([e,t])=>[e,Array.isArray(t)?`{${t.join(`,`)}}`:`${t}
13`]).forEach(([e,t])=>{o.searchParams.append(e,t)})):(a=`POST`,s=t);let u=new Headers(this.headers);return l?u.set(`Prefer`,i?`count=${i},return=minimal`:`return=minimal`):i&&u.set(`Prefer`,`count=${i}`),new zl({method:a,url:o,headers:u,schema:this.schemaName,body:s,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}},Hl=class{constructor(){}static detectEnvironment(){if(typeof WebSocket<`u`)return{type:`native`,wsConstructor:WebSocket};let e=globalThis;if(typeof globalThis<`u`&&e.WebSocket!==void 0)return{type:`native`,wsConstructor:e.WebSocket};let t=typeof global<`u`?global:void 0;if(t&&t.WebSocket!==void 0)return{type:`native`,wsConstructor:t.WebSocket};if(typeof globalThis<`u`&&e.WebSocketPair!==void 0&&globalThis.WebSocket===void 0)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`&&e.EdgeRuntime||typeof navigator<`u`&&navigator.userAgent?.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.`};let n=globalThis.process;if(n){let e=n.versions;if(e&&e.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(){let e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let t=e.error||`WebSocket not supported in this environment.`;throw e.workaround&&(t+=`\n\nSuggested solution: ${e.workaround}`),Error(t)}static isWebSocketSupported(){try{return this.detectEnvironment().type===`native`}catch{return!1}}},Ul=`realtime-js/2.112.4`,Wl=`1.0.0`,B=`2.0.0`,V=B,H=1e4,U={closed:`closed`,errored:`errored`,joined:`joined`,joining:`joining`,leaving:`leaving`},W={close:`phx_close`,error:`phx_error`,join:`phx_join`,reply:`phx_reply`,leave:`phx_leave`,access_token:`access_token`},Gl={connecting:`connecting`,open:`open`,closing:`closing`,closed:`closed`},Kl=class{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT=`broadcast`,this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,t){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event==`string`)return t(this._binaryEncodeUserBroadcastPush(e));let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(e){return this._isArrayBuffer(e.payload?.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){let t=e.payload?.payload??new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,t)}_encodeJsonUserBroadcastPush(e){let t=e.payload?.payload??{},n=new TextEncoder().encode(JSON.stringify(t)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,n)}_encodeUserBroadcastPush(e,t,n){let r=new TextEncoder,i=r.encode(e.topic),a=r.encode(e.ref??``),o=r.encode(e.join_ref??``),s=r.encode(e.payload.event),c=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},l=r.encode(Object.keys(c).length===0?``:JSON.stringify(c));if(o.length>255)throw Error(`joinRef length ${o.length} exceeds maximum of 255`);if(a.length>255)throw Error(`ref length ${a.length} exceeds maximum of 255`);if(i.length>255)throw Error(`topic length ${i.length} exceeds maximum of 255`);if(s.length>255)throw Error(`userEvent length ${s.length} exceeds maximum of 255`);if(l.length>255)throw Error(`metadata length ${l.length} exceeds maximum of 255`);let u=this.USER_BROADCAST_PUSH_META_LENGTH+o.length+a.length+i.length+s.length+l.length,d=new ArrayBuffer(this.HEADER_LENGTH+u),f=new DataView(d),p=new Uint8Array(d),m=0;f.setUint8(m++,this.KINDS.userBroadcastPush),f.setUint8(m++,o.length),f.setUint8(m++,a.length),f.setUint8(m++,i.length),f.setUint8(m++,s.length),f.setUint8(m++,l.length),f.setUint8(m++,t),p.set(o,m),m+=o.length,p.set(a,m),m+=a.length,p.set(i,m),m+=i.length,p.set(s,m),m+=s.length,p.set(l,m),m+=l.length;var h=new Uint8Array(d.byteLength+n.byteLength);return h.set(new Uint8Array(d),0),h.set(new Uint8Array(n),d.byteLength),h.buffer}decode(e,t){if(this._isArrayBuffer(e))return t(this._binaryDecode(e));if(typeof e==`string`){let[n,r,i,a,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:a,payload:o})}return t({})}_binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,t,r)}}_decodeUserBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+4,c=n.decode(e.slice(s,s+r));s+=r;let l=n.decode(e.slice(s,s+i));s+=i;let u=n.decode(e.slice(s,s+a));s+=a;let d=e.slice(s,e.byteLength),f=o===this.JSON_ENCODING?JSON.parse(n.decode(d)):d,p={type:this.BROADCAST_EVENT,event:l,payload:f};return a>0&&(p.meta=JSON.parse(u)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:p}}_isArrayBuffer(e){return e instanceof ArrayBuffer||e?.constructor?.name===`ArrayBuffer`}_pick(e,t){return!e||typeof e!=`object`?{}:Object.fromEntries(Object.entries(e).filter(([e])=>t.includes(e)))}},G;(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`})(G||={});var ql=(e,t,n={})=>{let r=n.skipTypes??[];return t?Object.keys(t).reduce((n,i)=>(n[i]=Jl(i,e,t,r),n),{}):{}},Jl=(e,t,n,r)=>{let i=t.find(t=>t.name===e)?.type,a=n[e];return i&&!r.includes(i)?Yl(i,a):Xl(a)},Yl=(e,t)=>
vendor: 19,870 bytes, lines 13-14
13{if(e.charAt(0)===`_`)return eu(t,e.slice(1,e.length));switch(e){case G.bool:return Zl(t);case G.float4:case G.float8:case G.int2:case G.int4:case G.int8:case G.numeric:case G.oid:return Ql(t);case G.json:case G.jsonb:return $l(t);case G.timestamp:return tu(t);case G.abstime:case G.date:case G.daterange:case G.int4range:case G.int8range:case G.money:case G.reltime:case G.text:case G.time:case G.timestamptz:case G.timetz:case G.tsrange:case G.tstzrange:return Xl(t);default:return Xl(t)}},Xl=e=>e,Zl=e=>{switch(e){case`t`:return!0;case`f`:return!1;default:return e}},Ql=e=>{if(typeof e==`string`){let t=parseFloat(e);if(!Number.isNaN(t))return t}return e},$l=e=>{if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e},eu=(e,t)=>{if(typeof e!=`string`)return e;let n=e.length-1,r=e[n];if(e[0]===`{`&&r===`}`){let r,i=e.slice(1,n);try{r=JSON.parse(`[`+i+`]`)}catch{r=i?i.split(`,`):[]}return r.map(e=>Yl(t,e))}return e},tu=e=>typeof e==`string`?e.replace(` `,`T`):e,nu=e=>{let 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+=`/api/broadcast`,t.href},ru=e=>typeof e==`function`?e:function(){return e},iu=typeof self<`u`?self:null,au=typeof window<`u`?window:null,ou=iu||au||globalThis,su=`2.0.0`,cu=1e4,lu=1e3,uu=100,du={connecting:0,open:1,closing:2,closed:3},fu={closed:`closed`,errored:`errored`,joined:`joined`,joining:`joining`,leaving:`leaving`},pu={close:`phx_close`,error:`phx_error`,join:`phx_join`,reply:`phx_reply`,leave:`phx_leave`},mu={longpoll:`longpoll`,websocket:`websocket`},hu={complete:4},gu=`base64url.bearer.phx.`,_u=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()}matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(t=>t.status===e).forEach(e=>e.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})}},vu=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+=1,this.callback()},this.timerCalc(this.tries+1))}},yu=class{constructor(e,t,n){this.state=fu.closed,this.topic=e,this.params=ru(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new _u(this,pu.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new vu(()=>{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=fu.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this.joinPush.receive(`error`,e=>{this.state=fu.errored,this.socket.hasLogger()&&this.socket.log(`channel`,`error ${this.topic}`,e),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log(`channel`,`close ${this.topic}`),this.state=fu.closed,this.socket.remove(this)}),this.onError(e=>{this.socket.hasLogger()&&this.socket.log(`channel`,`error ${this.topic}`,e),this.isJoining()&&this.joinPush.reset(),this.state=fu.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 _u(this,pu.leave,ru({}),this.timeout).send(),this.state=fu.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(pu.reply,(e,t)=>{this.trigger(this.replyEventName(t),e)})}join(e=this.timeout){if(this.joinedOnce)throw 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=fu.closed,this.bindings=[]}onClose(e){this.on(pu.close,e)}onError(e){return this.on(pu.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||t!==void 0&&t!==n.ref)}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t||={},!this.joinedOnce)throw Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new _u(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=fu.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log(`channel`,`leave ${this.topic}`),this.trigger(pu.close,`leave`)},n=new _u(this,pu.leave,ru({}),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?r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log(`channel`,`dropping outdated message`,{topic:e,event:t,payload:n,joinRef:r}),!1):!0:!1}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=fu.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let i=this.onMessage(e,t,n,r);if(t&&!i)throw Error(`channel onMessage callbacks must return the payload, modified or unmodified`);let a=this.bindings.filter(r=>r.event===e&&this.filterBindings(r,t,n));for(let e=0;e<a.length;e++)a[e].callback(i,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===fu.closed}isErrored(){return this.state===fu.errored}isJoined(){return this.state===fu.joined}isJoining(){return this.state===fu.joining}isLeaving(){return this.state===fu.leaving}},bu=class{static request(e,t,n,r,i,a,o){if(ou.XDomainRequest){let n=new ou.XDomainRequest;return this.xdomainRequest(n,e,t,r,i,a,o)}if(ou.XMLHttpRequest){let s=new ou.XMLHttpRequest;return this.xhrRequest(s,e,t,n,r,i,a,o)}if(ou.fetch&&ou.AbortController)return this.fetchRequest(e,t,n,r,i,a,o);throw Error(`No suitable XMLHttpRequest implementation found`)}static fetchRequest(e,t,n,r,i,a,o){let s={method:e,headers:n,body:r},c=null;return i&&(c=new AbortController,setTimeout(()=>c.abort(),i),s.signal=c.signal),ou.fetch(t,s).then(e=>e.text()).then(e=>this.parseJSON(e)).then(e=>o&&o(e)).catch(e=>{e.name===`AbortError`&&a?a():o&&o(null)}),c}static xdomainRequest(e,t,n,r,i,a,o){return e.timeout=i,e.open(t,n),e.onload=()=>{let t=this.parseJSON(e.responseText);o&&o(t)},a&&(e.ontimeout=a),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,i,a,o,s){e.open(t,n,!0),e.timeout=a;for(let[t,n]of Object.entries(r))e.setRequestHeader(t,n);return e.onerror=()=>s&&s(null),e.onreadystatechange=()=>{e.readyState===hu.complete&&s&&s(this.parseJSON(e.responseText))},o&&(e.ontimeout=o),e.send(i),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 i=t?`${t}[${r}]`:r,a=e[r];typeof a==`object`?n.push(this.serialize(a,i)):n.push(encodeURIComponent(i)+`=`+encodeURIComponent(a))}return n.join(`&`)}static appendParams(e,t){return Object.keys(t).length===0?e:`${e}${e.match(/\?/)?`&`:`?`}${this.serialize(t)}`}},xu=e=>{let t=``,n=new Uint8Array(e),r=n.byteLength;for(let e=0;e<r;e++)t+=String.fromCharCode(n[e]);return btoa(t)},Su=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(gu)&&(this.authToken=atob(t[1].slice(gu.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=du.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace(`ws://`,`http://`).replace(`wss://`,`https://`).replace(RegExp(`(.*)/`+mu.websocket),`$1/`+mu.longpoll)}endpointURL(){return bu.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=du.connecting}ontimeout(){this.onerror(`timeout`),this.closeAndRetry(1005,`timeout`,!1)}isActive(){return this.readyState===du.open||this.readyState===du.connecting}poll(){let e={Accept:`application/json`};this.authToken&&(e[`X-Phoenix-AuthToken`]=this.authToken),this.ajax(`GET`,e,null,()=>this.ontimeout(),e=>{if(e){var{status:t,token:n,messages:r}=e;if(t===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,`session_gone`,!1);return}this.token=n}else t=0;switch(t){case 200:r.forEach(e=>{setTimeout(()=>this.onmessage({data:e}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=du.open,this.onopen({}),this.poll();break;case 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 Error(`unhandled poll status ${t}`)}})}send(e){typeof e!=`string`&&(e=xu(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;let n=t+uu,r=e.slice(t,n);this.ajax(`POST`,{"Content-Type":`application/x-ndjson`},r.join(` 14`),()=>this.onerror(`timeout`),t=>{!t||t.status!==200?(this.awaitingBatchAck=!1,this.onerror(t&&t.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 e of this.reqs)e.abort();this.readyState=du.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,i){let a;a=bu.request(e,this.endpointURL(),t,n,this.timeout,()=>{this.reqs.delete(a),r()},e=>{this.reqs.delete(a),this.isActive()&&i(e)}),this.reqs.add(a)}},Cu=class e{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,t=>{let{onJoin:n,onLeave:r,onSync:i}=this.caller;this.joinRef=this.channel.joinRef(),this.state=e.syncState(this.state,t,n,r),this.pendingDiffs.forEach(t=>{this.state=e.syncDiff(this.state,t,n,r)}),this.pendingDiffs=[],i()}),this.channel.on(r.diff,t=>{let{onJoin:n,onLeave:r,onSync:i}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(t):(this.state=e.syncDiff(this.state,t,n,r),i())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(t){return e.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,t,n,r){let i=this.toNullProtoObj(this.clone(e));t=this.toNullProtoObj(t);let a=Object.create(null),o=Object.create(null);return this.map(i,(e,n)=>{t[e]||(o[e]=n)}),this.map(t,(e,t)=>{let n=i[e];if(n){let r=t.metas.map(e=>e.phx_ref),i=n.metas.map(e=>e.phx_ref),s=t.metas.filter(e=>i.indexOf(e.phx_ref)<0),c=n.metas.filter(e=>r.indexOf(e.phx_ref)<0);s.length>0&&(a[e]=t,a[e].metas=s),c.length>0&&(o[e]=this.clone(n),o[e].metas=c)}else a[e]=t}),this.syncDiff(i,{joins:a,leaves:o},n,r)}static syncDiff(e,t,n,r){e=this.toNullProtoObj(e);let{joins:i,leaves:a}=this.clone(t);return n||=function(){},r||=function(){},this.map(i,(t,r)=>{let i=e[t];if(e[t]=this.clone(r),i){let n=e[t].metas.map(e=>e.phx_ref),r=i.metas.filter(e=>n.indexOf(e.phx_ref)<0);e[t].metas.unshift(...r)}n(t,i,r)}),this.map(a,(t,n)=>{let i=e[t];if(!i)return;let a=n.metas.map(e=>e.phx_ref);i.metas=i.metas.filter(e=>a.indexOf(e.phx_ref)<0),r(t,i,n),i.metas.length===0&&delete e[t]}),e}static list(e,t){return t||=function(e,t){return t},this.map(e,(e,n)=>t(e,n))}static map(e,t){return Object.getOwnPropertyNames(e).map(n=>t(n,e[n]))}static toNullProtoObj(e){if(Object.getPrototypeOf(e)===null)return e;let t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(n=>{t[n]=e[n]}),t}static clone(e){return JSON.parse(JSON.stringify(e))}},wu={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,i,a,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:a,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:i,payload:a}=e,o=new TextEncoder,s=o.encode(t),c=o.encode(n),l=o.encode(i),u=o.encode(r);this.assertFieldSize(s.byteLength,`join_ref`),this.assertFieldSize(c.byteLength,`ref`),this.assertFieldSize(l.byteLength,`topic`),this.assertFieldSize(u.byteLength,`event`);let d=this.META_LENGTH+s.byteLength+c.byteLength+l.byteLength+u.byteLength,f=new ArrayBuffer(this.HEADER_LENGTH+d),p=new Uint8Array(f),m=new DataView(f),h=0;m.setUint8(h++,this.KINDS.push),m.setUint8(h++,s.byteLength),m.setUint8(h++,c.byteLength),m.setUint8(h++,l.byteLength),m.setUint8(h++,u.byteLength),p.set(s,h),h+=s.byteLength,p.set(c,h),h+=c.byteLength,p.set(l,h),h+=l.byteLength,p.set(u,h),h+=u.byteLength;var g=new Uint8Array(f.byteLength+a.byteLength);return g.set(p,0),g.set(new Uint8Array(a),f.byteLength),g.buffer},assertFieldSize(e,t){if(e>255)throw 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),i=t.getUint8(2),a=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,s=n.decode(e.slice(o,o+r));o+=r;let c=n.decode(e.slice(o,o+i));o+=i;let l=n.decode(e.slice(o,o+a));return o+=a,{join_ref:s,ref:null,topic:c,event:l,payload:e.slice(o,e.byteLength)}},decodeReply(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(e.slice(s,s+r));s+=r;let l=n.decode(e.slice(s,s+i));s+=i;let u=n.decode(e.slice(s,s+a));s+=a;let d=n.decode(e.slice(s,s+o));s+=o;let f={status:d,response:e.slice(s,e.byteLength)};return{join_ref:c,ref:l,topic:u,event:pu.reply,payload:f}},decodeBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=this.HEADER_LENGTH+2,o=n.decode(e.slice(a,a+r));a+=r;let s=n.decode(e.slice(a,a+i));return a+=i,{join_ref:null,ref:null,topic:o,event:s,payload:e.slice(a,e.byteLength)}}},Tu=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||cu,this.transport=t.transport||ou.WebSocket||Su,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=ou&&ou.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=wu.encode.bind(wu),this.defaultDecoder=wu.decode.bind(wu),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===Su?(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder):(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder);let r=null;au&&au.addEventListener&&(au.addEventListener(`pagehide`,e=>{this.conn&&(this.disconnect(),r=this.connectClock)}),au.addEventListener(`pageshow`,e=>{r===this.connectClock&&(r=null,this.connect())}),au.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=e=>t.rejoinAfterMs?t.rejoinAfterMs(e):[1e3,2e3,5e3][e-1]||1e4,this.reconnectAfterMs=e=>t.reconnectAfterMs?t.reconnectAfterMs(e):[10,50,100,150,200,250,500,1e3,2e3][e-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(e,t,n)=>{console.log(`${e}: ${t}`,n)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=ru(t.params||{}),this.endPoint=`${e}/${mu.websocket}`,this.vsn=t.vsn||su,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new vu(()=>{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&&ru(t.authToken)}getLongPollTransport(){return Su}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&=(this.conn.close(),null),this.transport=e}protocol(){return location.protocol.match(/^https/)?`wss`:`ws`}endPointURL(){let e=bu.appendParams(bu.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)===`/`?e.charAt(1)===`/`?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`: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=ru(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Su?this.connectWithF
vendor: 4,375 bytes, line 14
14allback(Su,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(i=>{i.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case Su:return`LongPoll`;default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=[`phoenix`,`${gu}${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=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}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,i,a,o=this.transportName(e),s=t=>{this.log(`transport`,`falling back to ${o}...`,t),this.off([i,a]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return s(`memorized`);this.fallbackTimer=setTimeout(s,t),a=this.onError(e=>{this.log(`transport`,`error`,e),r&&!n&&(clearTimeout(this.fallbackTimer),s(e))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let t=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${t}`,`true`),this.log(`transport`,`established ${t} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(s,t),this.ping(e=>{this.log(`transport`,`connected to primary after`,e),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(Error(`heartbeat timeout`)),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),lu,`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();let 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===du.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)}
vendor: 11,703 bytes, line 14
14triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(pu.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case du.connecting:return`connecting`;case du.open:return`open`;case du.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(([t])=>e.indexOf(t)===-1)}channel(e,t={}){let n=new yu(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:i,join_ref:a}=e;this.log(`push`,`${t} ${n} (${a}, ${i})`,r)}this.isConnected()?this.encode(e,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(e,e=>this.conn.send(e)))}makeRef(){let e=this.ref+1;return this.ref=e===this.ref?0: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,e=>{let{topic:t,event:n,payload:r,ref:i,join_ref:a}=e;if(i&&i===this.pendingHeartbeatRef){let e=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(r.status===`ok`?`ok`:`error`,e)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log(`receive`,`${r.status||``} ${t} ${n} ${i&&`(`+i+`)`||``}`.trim(),r);for(let e=0;e<this.channels.length;e++){let o=this.channels[e];o.isMember(t,n,r,a)&&o.trigger(n,r,i,a)}this.triggerStateCallbacks(`message`,e)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(t){this.log(`error`,`error in ${e} callback`,t)}})}catch(t){this.log(`error`,`error triggering ${e} callbacks`,t)}}leaveOpenTopic(e){let t=this.channels.find(t=>t.topic===e&&(t.isJoined()||t.isJoining()));t&&(this.hasLogger()&&this.log(`transport`,`leaving duplicate topic "${e}"`),t.leave())}},Eu=class e{constructor(t,n){let r=ku(n);this.presence=new Cu(t.getChannel(),r),this.presence.onJoin((n,r,i)=>{let a=e.onJoinPayload(n,r,i);t.getChannel().trigger(`presence`,a)}),this.presence.onLeave((n,r,i)=>{let a=e.onLeavePayload(n,r,i);t.getChannel().trigger(`presence`,a)}),this.presence.onSync(()=>{t.getChannel().trigger(`presence`,{event:`sync`})})}get state(){return e.transformState(this.presence.state)}static transformState(e){return e=Ou(e),Object.getOwnPropertyNames(e).reduce((t,n)=>{let r=e[n];return t[n]=Du(r),t},{})}static onJoinPayload(e,t,n){return{event:`join`,key:e,currentPresences:Au(t),newPresences:Du(n)}}static onLeavePayload(e,t,n){return{event:`leave`,key:e,currentPresences:Au(t),leftPresences:Du(n)}}};function Du(e){return e.metas.map(e=>{let t=Object.getOwnPropertyDescriptors(e),n=Object.defineProperties({},t);return n.presence_ref=n.phx_ref,delete n.phx_ref,delete n.phx_ref_prev,n})}function Ou(e){return JSON.parse(JSON.stringify(e))}function ku(e){return e?.events&&{events:e.events}}function Au(e){return e?.metas?Du(e):[]}var ju;(function(e){e.SYNC=`sync`,e.JOIN=`join`,e.LEAVE=`leave`})(ju||={});var Mu=class{get state(){return this.presenceAdapter.state}constructor(e,t){this.channel=e,this.presenceAdapter=new Eu(this.channel.channelAdapter,t)}};function Nu(e){if(e instanceof Error)return e;if(typeof e==`string`)return Error(e);if(e&&typeof e==`object`){let t=e;if(typeof t.code==`number`){let n=typeof t.reason==`string`&&t.reason?` (${t.reason})`:``;return Error(`socket closed: ${t.code}${n}`,{cause:e})}return Error(`channel error: transport failure`,{cause:e})}return Error(`channel error: connection lost`)}var Pu=class{constructor(e,t,n){let r=Fu(n);this.channel=e.getSocket().channel(t,r),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,t){return this.channel.on(e,t)}off(e,t){this.channel.off(e,t)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,t,n){let r;try{r=this.channel.push(e,t,n)}catch{throw Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>100){let e=this.channel.pushBuffer.shift();e.cancelTimeout(),this.socket.log(`channel`,`discarded push due to buffer overflow: ${e.event}`,e.payload())}return r}updateJoinPayload(e){let t=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},t),e)}canPush(){return this.socket.isConnected()&&this.state===U.joined}isJoined(){return this.state===U.joined}isJoining(){return this.state===U.joining}isClosed(){return this.state===U.closed}isLeaving(){return this.state===U.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}};function Fu(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:``,enabled:!1},private:!1},e.config)}}var Iu=/[,()"\\]/,Lu=e=>Iu.test(e)||e!==e.trim(),Ru=e=>`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`,zu=e=>{let t=e===null?`null`:String(e);return Lu(t)?Ru(t):t},Bu=e=>e===null?`null`:String(e),Vu=(e,t)=>{if(e===`in`){let e=Array.isArray(t)?t:[t];if(e.length===0)throw Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(e)).map(e=>zu(e)).join(`,`)})`}return e===`is`?`is.${Bu(t)}`:`${e}.${zu(t)}`},Hu=class{constructor(){this.filters=[]}add(e,t,n,r=!1){let i=r?`not.`:``;return this.filters.push(`${e}=${i}${Vu(t,n)}`),this}eq(e,t){return this.add(e,`eq`,t)}neq(e,t){return this.add(e,`neq`,t)}gt(e,t){return this.add(e,`gt`,t)}gte(e,t){return this.add(e,`gte`,t)}lt(e,t){return this.add(e,`lt`,t)}lte(e,t){return this.add(e,`lte`,t)}in(e,t){return this.add(e,`in`,t)}like(e,t){return this.add(e,`like`,t)}ilike(e,t){return this.add(e,`ilike`,t)}match(e,t){return this.add(e,`match`,t)}imatch(e,t){return this.add(e,`imatch`,t)}is(e,t){return this.add(e,`is`,t)}isDistinct(e,t){return this.add(e,`isdistinct`,t)}not(e,t,n){return this.add(e,t,n,!0)}build(){return this.filters.join(`,`)}toString(){return this.build()}},Uu;(function(e){e.ALL=`*`,e.INSERT=`INSERT`,e.UPDATE=`UPDATE`,e.DELETE=`DELETE`})(Uu||={});var Wu;(function(e){e.BROADCAST=`broadcast`,e.PRESENCE=`presence`,e.POSTGRES_CHANGES=`postgres_changes`,e.SYSTEM=`system`})(Wu||={});var Gu;(function(e){e.SUBSCRIBED=`SUBSCRIBED`,e.TIMED_OUT=`TIMED_OUT`,e.CLOSED=`CLOSED`,e.CHANNEL_ERROR=`CHANNEL_ERROR`})(Gu||={});var Ku=class e{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,t={config:{}},n){if(this.topic=e,this.params=t,this.socket=n,this.bindings={},this.subTopic=e.replace(/^realtime:/i,``),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:``,enabled:!1},private:!1},t.config),this.channelAdapter=new Pu(this.socket.socketAdapter,e,this.params),this.presence=new Mu(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=nu(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&this.params.config?.broadcast?.replay)throw Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,t=this.timeout){if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){let{config:{broadcast:n,presence:r,private:i}}=this.params,a=this.bindings.postgres_changes?.map(e=>e.filter)??[],o=!!this.bindings[Wu.PRESENCE]&&this.bindings[Wu.PRESENCE].length>0||this.params.config.presence?.enabled===!0,s={},c={broadcast:n,presence:Object.assign(Object.assign({},r),{enabled:o}),postgres_changes:a,private:i};this.socket.accessTokenValue&&(s.access_token=this.socket.accessTokenValue),this._onError(t=>{e?.(Gu.CHANNEL_ERROR,Nu(t))}),this._onClose(()=>e?.(Gu.CLOSED)),this.updateJoinPayload(Object.assign({config:c},s)),this._updateFilterMessage(),this.channelAdapter.subscribe(t).receive(`ok`,async({postgres_changes:t})=>{if(this.socket._isManualToken()||this.socket.setAuth(),t===void 0){e?.(Gu.SUBSCRIBED);return}this._updatePostgresBindings(t,e)}).receive(`error`,t=>{this.state=U.errored;let n=Object.values(t).join(`, `)||`error`;e?.(Gu.CHANNEL_ERROR,Error(n,{cause:t}))}).receive(`timeout`,()=>{e?.(Gu.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){let r=this.bindings.postgres_changes,i=r?.length??0,a=[];for(let o=0;o<i;o++){let i=r[o],{filter:{event:s,schema:c,table:l,filter:u}}=i,d=t&&t[o];if(d&&d.event===s&&e.isFilterValueEqual(d.schema,c)&&e.isFilterValueEqual(d.table,l)&&e.isFilterValueEqual(d.filter,u))a.push(Object.assign(Object.assign({},i),{id:d.id}));else{this.unsubscribe(),this.state=U.errored,n?.(Gu.CHANNEL_ERROR,Error(`mismatch between server and client bindings for postgres changes`));return}}this.bindings.postgres_changes=a,this.state!=U.errored&&n&&n(Gu.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:`presence`,event:`track`,payload:e},t)}async untrack(e={}){return await this.send({type:`presence`,event:`untrack`},e)}on(e,t,n){let r=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=e===Wu.PRESENCE||e===Wu.POSTGRES_CHANGES;if(r&&i)throw this.socket.log(`channel`,`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,t,n)}async httpSend(e,t,n={}){if(t==null)return Promise.reject(Error(`Payload is required for httpSend()`));let r=t instanceof ArrayBuffer||ArrayBuffer.isView(t),i={apikey:this.socket.apiKey?this.socket.apiKey:``,"Content-Type":r?`application/octet-stream`:`application/json`};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);let a=new URL(this.broadcastEndpointURL);a.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&a.searchParams.set(`private`,`true`);let o={method:`POST`,headers:i,body:r?t:JSON.stringify(t)},s=await this._fetchWithTimeout(a.toString(),o,n.timeout??this.timeout);if(s.status===202)return{success:!0};if(s.status===404)return Promise.reject(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
14ime-js/migrations/httpsend-server-version.md`));let c=s.statusText;try{let e=await s.json();c=e.error||e.message||c}catch{}return Promise.reject(Error(c))}async send(e,t={}){if(!this.channelAdapter.canPush()&&e.type===`broadcast`){let n=`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`,n):console.warn(n);let{event:r,payload:i}=e,a={apikey:this.socket.apiKey?this.socket.apiKey:``,"Content-Type":`application/json`};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);let o={method:`POST`,headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:r,payload:i,private:this.private}]})};try{let e=await this._fetchWithTimeout(this.broadcastEndpointURL,o,t.timeout??this.timeout);return await e.body?.cancel(),e.ok?`ok`:`error`}catch(e){return e instanceof Error&&e.name===`AbortError`?`timed out`:`error`}}return new Promise(n=>{let r=this.channelAdapter.push(e.type,e,t.timeout||this.timeout);e.type===`broadcast`&&!this.params?.config?.broadcast?.ack&&n(`ok`),r.receive(`ok`,()=>n(`ok`)),r.receive(`error`,()=>n(`error`)),r.receive(`timeout`,()=>n(`timed out`))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(t=>{this.channelAdapter.unsubscribe(e).receive(`ok`,()=>t(`ok`)).receive(`timeout`,()=>t(`timed out`)).receive(`error`,()=>t(`error`))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,t,n){let r=new AbortController,i=setTimeout(()=>r.abort(),n),a=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:r.signal}));return clearTimeout(i),a}_on(t,n,r){let i=t.toLocaleLowerCase(),a=n?.filter;if((a instanceof Hu||typeof a==`object`&&a&&typeof a.build==`function`)&&(n=Object.assign(Object.assign({},n),{filter:a.build()})),i===Wu.POSTGRES_CHANGES&&this.bindings[i]?.find(t=>e.isSamePostgresFilter(t.filter,n)))return this.socket.log(`error`,`duplicate \`postgres_changes\` binding for ${this.topic} ignored`,n),this;let o=this.channelAdapter.on(t,r),s={type:i,filter:n,callback:r,ref:o};return this.bindings[i]?this.bindings[i].push(s):this.bindings[i]=[s],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,t,n)=>{let r=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(r,n))return!1;let i=this.bindings[r]?.find(t=>t.ref===e.ref);if(!i)return!0;if([`broadcast`,`presence`,`postgres_changes`].includes(r))if(`id`in i){let e=i.id,n=i.filter?.event;return e&&t.ids?.includes(e)&&(n===`*`||n?.toLocaleLowerCase()===t.data?.type.toLocaleLowerCase())}else{let e=(i?.filter?.event)?.toLocaleLowerCase();return e===`*`||e===(t?.event)?.toLocaleLowerCase()}return i.type.toLocaleLowerCase()===r})}_notThisChannelEvent(e,t){let{close:n,error:r,leave:i,join:a}=W;return t&&[n,r,i,a].includes(e)&&t!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,t,n)=>{if(typeof t==`object`&&`ids`in t){let e=t.data,{schema:n,table:r,commit_timestamp:i,type:a,errors:o}=e;return Object.assign(Object.assign({},{schema:n,table:r,commit_timestamp:i,eventType:a,new:{},old:{},errors:o}),this._getPayloadRecords(e))}return t})}copyBindings(e){if(this.joinedOnce)throw Error(`cannot copy bindings into joined channel`);for(let t in e.bindings)for(let n of e.bindings[t])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(e,t){return(e??void 0)===(t??void 0)}static isSamePostgresFilter(t,n){let r=(t?.select)?.join()??void 0,i=(n?.select)?.join()??void 0;return t?.event===n?.event&&e.isFilterValueEqual(t?.schema,n?.schema)&&e.isFilterValueEqual(t?.table,n?.table)&&e.isFilterValueEqual(t?.filter,n?.filter)&&r===i}_getPayloadRecords(e){let t={new:{},old:{}};return(e.type===`INSERT`||e.type===`UPDATE`)&&(t.new=ql(e.columns,e.record)),(e.type===`UPDATE`||e.type===`DELETE`)&&(t.old=ql(e.columns,e.old_record)),t}},qu=class{constructor(e,t){this.socket=new Tu(e,t)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,t,n,r=1e4){return new Promise(i=>{setTimeout(()=>i(`timeout`),r),this.socket.disconnect(()=>{e(),i(`ok`)},t,n)})}push(e){this.socket.push(e)}log(e,t,n){this.socket.log(e,t,n)}hasLogger(){return this.socket.hasLogger()}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Gl.connecting}isDisconnecting(){return this.socket.connectionState()==Gl.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}},Ju={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},Yu=[1e3,2e3,5e3,1e4],K=1e4;function Xu(){let e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){return Array.from(e.keys())[t]??null},removeItem(t){e.delete(t)},setItem(t,n){e.set(t,String(n))}}}function Zu(){try{if(typeof globalThis<`u`&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return Xu()}var Qu=` 15 addEventListener("message", (e) => { 16 if (e.data.event === "start") { 17 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 18 } 19 });`,$u=class{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,t){if(this.channels=[],this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint=``,this.headers={},this.params={}
19,this.ref=0,this.serializer=new Kl,this._manuallySetToken=!1,this._authPromise=null,this._authGeneration=0,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),!t?.params?.apikey)throw Error(`API key is required to connect to Realtime`);this.apiKey=t.params.apikey;let n=this._initializeOptions(t);this.socketAdapter=new qu(e,n),this.httpEndpoint=nu(e),this.fetch=this._resolveFetch(t?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely(`connect`),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){let t=e.message;throw Error(`WebSocket not available: ${t}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,t){return this._cancelPendingDisconnect(),this.isDisconnecting()?`ok`:await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,t)}getChannels(){return this.channels}async removeChannel(e){let t=await e.unsubscribe();return t===`ok`&&e.teardown(),t}async removeAllChannels(){let e=this.channels.map(async e=>{let t=await e.unsubscribe();return e.teardown(),t}),t=await Promise.all(e);return await this.disconnect(),t}log(e,t,n){this.socketAdapter.log(e,t,n)}hasLogger(){return this.socketAdapter.hasLogger()}connectionState(){return this.socketAdapter.connectionState()||Gl.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,t={config:{}}){let n=`realtime:${e}`,r=this.getChannels().find(e=>e.topic===n);if(r)return r;{let n=new Ku(`realtime:${e}`,t,this);return this._cancelPendingDisconnect(),this.channels.push(n),n}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){let t=++this._authGeneration,n=this._performAuth(e,t);t===this._authGeneration&&(this._authPromise=n);try{await n}finally{this._authPromise===n&&(this._authPromise=null)}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(t=>t.topic!==e.topic),this.channels.length===0&&(this.log(`transport`,`no channels remaining, scheduling disconnect`),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log(`transport`,`disconnecting immediately - no channels`),this.disconnect();return}
19this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log(`transport`,`deferred disconnect fired - no channels, disconnecting`),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log(`transport`,`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log(`transport`,`pending disconnect cancelled - channel activity detected`),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e,t){let n,r=!1;if(e)n=e,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(e){this.log(`error`,`Error fetching access token from callback`,e),n=this.accessTokenValue}else n=this.accessTokenValue;t===this._authGeneration&&(this.accessToken?this._manuallySetToken=!1:r&&(this._manuallySetToken=!0),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(e=>{let t={access_token:n,version:Ul};e.updateJoinPayload(t),e.joinedOnce&&e.channelAdapter.isJoined()&&e.channelAdapter.push(W.access_token,{access_token:n})})))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e=`general`){this._isManualToken()||this.setAuth().catch(t=>{this.log(`error`,`Error setting auth in ${e}`,t)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(e=>{this.log(`error`,`error waiting for auth on connect`,e)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(t,n)=>{t!==`disconnected`&&(t==`sent`&&this._setAuthSafely(),e&&e(t,n))}}_startWorkerHeartbeat(){this.workerUrl?this.log(`worker`,`starting worker for from ${this.workerUrl}`):this.log(`worker`,`starting default worker`);let e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=e=>{this.log(`worker`,`worker error`,e.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=e=>{e.data.event===`keepAlive`&&this.sendHeartbeat()},this.workerRef.postMessage({event:`start`,interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&=(this.log(`worker`,`terminating worker`),this.workerRef.terminate(),void 0)}_workerObjectUrl(e){let t;if(e)t=e;else{let e=new Blob([Qu],{type:`application/javascript`});t=URL.createObjectURL(e)}return t}_initializeOptions(e){this.worker=e?.worker??!1,this.accessToken=e?.accessToken??null;let t={};t.timeout=e?.timeout??H,t.heartbeatIntervalMs=e?.heartbeatIntervalMs??Ju.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=e?.disconnectOnEmptyChannelsAfterMs??2*(e?.heartbeatIntervalMs??Ju.HEARTBEAT_INTERVAL),t.transport=e?.transport??Hl.getWebSocketConstructor(),t.params=e?.params,t.logger=e?.logger,t.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),t.sessionStorage=e?.sessionStorage??Zu(),t.reconnectAfterMs=e?.reconnectAfterMs??(e=>Yu[e-1]||K);let n,r,i=e?.vsn??V;switch(i){case Wl:n=(e,t)=>t(JSON.stringify(e)),r=(e,t)=>t(JSON.parse(e));break;case B:n=this.serializer.encode.bind(this.serializer),r=this.serializer.decode.bind(this.serializer);break;default:throw Error(`Unsupported serializer version: ${t.vsn}`)}if(t.vsn=i,t.encode=e?.encode??n,t.decode=e?.decode??r,t.beforeReconnect=this._reconnectAuth.bind(this),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,t.params=Object.assign(Object.assign({},t.params),{log_level:this.logLevel})),this.worker){if(typeof window<`u`&&!window.Worker)throw Error(`Web Worker is not supported`);this.workerUrl=e?.workerUrl,t.autoSendHeartbeat=!this.worker}return t}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
vendor: 4,836 bytes, line 19
19,ed=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 td(e,t,n){let r=new URL(t,e);if(n)for(let[e,t]of Object.entries(n))t!==void 0&&r.searchParams.set(e,t);return r.toString()}async function nd(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 rd(e){let t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:i,body:a,headers:o}){let s=td(e.baseUrl,r,i),c=await nd(e.auth),l=await t(s,{method:n,headers:{...a?{"Content-Type":`application/json`}:{},...c,...o},body:a?JSON.stringify(a):void 0}),u=await l.text(),d=(l.headers.get(`content-type`)||``).includes(`application/json`),f=d&&u?JSON.parse(u):u;if(!l.ok){let e=d?f:void 0,t=e?.error;throw new ed(t?.message??`Request failed with status ${l.status}`,{status:l.status,icebergType:t?.type,icebergCode:t?.code,details:e})}return{status:l.status,headers:l.headers,data:f}}}}function id(e){return e.join(`�`)}var ad=class{constructor(e,t=``){this.client=e,this.prefix=t}async listNamespaces(e){let t=e?{parent:id(e.namespace)}:void 0;return(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(e=>({namespace:e}))}async createNamespace(e,t){let 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/${id(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${id(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:`HEAD`,path:`${this.prefix}/namespaces/${id(e.namespace)}`}),!0}catch(e){if(e instanceof ed&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(e){if(e instanceof ed&&e.status===409)return;throw e}}};function od(e){return e.join(`�`)}var sd=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/${od(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){let n={};return this.accessDelegation&&(n[`X-Iceberg-Access-Delegation`]=this.accessDelegation),(await this.client.request({method:`POST`,path:`${this.prefix}/namespaces/${od(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){let n=await this.client.request({method:`POST`,path:`${this.prefix}/namespaces/${od(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/${od(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){let t={};return this.accessDelegation&&(t[`X-Iceberg-Access-Delegation`]=this.accessDelegation),(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${od(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){let t={};this.accessDelegation&&(t[`X-Iceberg-Access-Delegation`]=this.accessDelegation);try{return await this.client.request({method:`HEAD`,path:`${this.prefix}/namespaces/${od(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(e){if(e instanceof ed&&e.status===404)return!1;throw e}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof ed&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},cd=class{constructor(e){let t=`v1`;e.catalogName&&(t+=`/${e.catalogName}`);let n=e.baseUrl.endsWith(`/`)?e.baseUrl:`${e.baseUrl}/`;this.client=rd({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(`,`),this.namespaceOps=new ad(this.client,t),this.tableOps=new sd(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)}
19async 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 ld(e){"@babel/helpers - typeof";return ld=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ld(e)}function ud(e,t){if(ld(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ld(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function dd(e){var t=ud(e,`string`);return ld(t)==`symbol`?t:t+``}function fd(e,t,n){return(t=dd(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?pd(Object(n),!0).forEach(function(t){fd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var md=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 hd(e){return typeof e==`object`&&!!e&&`__isStorageError`in e}var gd=class extends md{constructor(e,t,n,r=`storage`,i){super(e,r,t,n),this.name=r===`vectors`?`StorageVectorsApiError`:`StorageApiError`,this.status=t,this.statusCode=n,this.code=i}toJSON(){return q(q({},super.toJSON()),{},{code:this.code})}},_d=class extends md{constructor(e,t,n=`storage`){super(e,n),this.name=n===`vectors`?`StorageVectorsUnknownError`:`StorageUnknownError`,this.originalError=t}};function vd(e,t,n){let r=q({},e),i=t.toLowerCase();for(let e of Object.keys(r))e.toLowerCase()===i&&delete r[e];return r[i]=n,r}function yd(e){let t={};for(let[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}var bd=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),xd=e=>{if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Sd=e=>{if(Array.isArray(e))return e.map(e=>Sd(e));if(typeof e==`function`||e!==Object(e))return e;let t={};return Object.entries(e).forEach(([e,n])=>{let r=e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace(/[-_]/g,``));t[r]=Sd(n)}),t},Cd=e=>!e||typeof e!=`string`||e.length===0||e.length>100||e.trim()!==e||e.includes(`/`)||e.includes(`\\`)?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),J=e=>e.split(`/`).map(encodeURIComponent).join(`/`),wd=e=>{if(typeof e==`object`&&e){let 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){let e=t.error;if(typeof e.message==`string`)return e.message}}return JSON.stringify(e)},Td=async(e,t,n,r)=>{if(typeof e==`object`&&e&&`json`in e&&typeof e.json==`function`){let n=e,i=parseInt(String(n.status),10);Number.isFinite(i)||(i=500),n.json().then(e=>{let n=e?.statusCode||e?.code||i+``;t(new gd(wd(e),i,n,r,e?.code))}).catch(()=>{let e=i+``;t(new gd(n.statusText||`HTTP ${i} error`,i,e,r))})}else t(new _d(wd(e),e,r))},Ed=(e,t,n,r)=>{let i={method:e,headers:t?.headers||{}};if(e===`GET`||e===`HEAD`||!r)return q(q({},i),n);if(xd(r)){let e=t?.headers||{},n;for(let[t,r]of Object.entries(e))t.toLowerCase()===`content-type`&&(n=r);i.headers=vd(e,`Content-Type`,n??`application/json`),i.body=JSON.stringify(r)}else i.body=r;return t?.duplex&&(i.duplex=t.duplex),q(q({},i),n)};async function Dd(e,t,n,r,i,a,o){return new Promise((s,c)=>{e(n,Ed(t,r,i,a)).then(e=>{if(!e.ok)throw e;if(r?.noResolveJson)return e;if(o===`vectors`){let t=e.headers.get(`content-type`);if(e.headers.get(`content-length`)===`0`||e.status===204||!t||!t.includes(`application/json`))return{}}return e.json()}).then(e=>s(e)).catch(e=>Td(e,c,r,o))})}function Od(e=`storage`){return{get:async(t,n,r,i)=>Dd(t,`GET`,n,r,i,void 0,e),post:async(t,n,r,i,a)=>Dd(t,`POST`,n,i,a,r,e),put:async(t,n,r,i,a)=>Dd(t,`PUT`,n,i,a,r,e),head:async(t,n,r,i)=>Dd(t,`HEAD`,n,q(q({},r),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,n,r,i,a)=>Dd(t,`DELETE`,n,i,a,r,e)}}var{get:kd,post:Ad,put:jd,head:Md,remove:Nd}=Od(`storage`),Pd=Od(`vectors`),Fd=class{constructor(e,t={},n,r=`storage`){this.shouldThrowOnError=!1,this.url=e,this.headers=yd(t),this.fetch=bd(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=vd(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(hd(e))return{data:null,error:e};throw e}}},Id=Symbol.toStringTag,Y=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Id]=`StreamDownloadBuilder`,this.promise=null}
19then(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.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(hd(t))return{data:null,error:t};throw t}}},Ld=Symbol.toStringTag,Rd=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Ld]=`BlobDownloadBuilder`,this.promise=null}asStream(){return new Y(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.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(hd(t))return{data:null,error:t};throw t}}},zd={limit:100,offset:0,sortBy:{column:`name`,order:`asc`}},Bd={cacheControl:`3600`,contentType:`text/plain;charset=UTF-8`,upsert:!1},Vd=class extends Fd{constructor(e,t={},n,r){super(e,t,r,`storage`),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var i=this;return i.handleOperation(async()=>{let a,o=q(q({},Bd),r),s=q(q({},i.headers),e===`POST`&&{"x-upsert":String(o.upsert)}),c=o.metadata;if(typeof Blob<`u`&&n instanceof Blob?(a=new FormData,a.append(`cacheControl`,o.cacheControl),c&&a.append(`metadata`,i.encodeMetadata(c)),a.append(``,n)):typeof FormData<`u`&&n instanceof FormData?(a=n,a.has(`cacheControl`)||a.append(`cacheControl`,o.cacheControl),c&&!a.has(`metadata`)&&a.append(`metadata`,i.encodeMetadata(c))):(a=n,s[`cache-control`]=`max-age=${o.cacheControl}`,s[`content-type`]=o.contentType,c&&(s[`x-metadata`]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<`u`&&a instanceof ReadableStream||a&&typeof a==`object`&&`pipe`in a&&typeof a.pipe==`function`)&&!o.duplex&&(o.duplex=`half`)),r?.headers)for(let[e,t]of Object.entries(r.headers))s=vd(s,e,t);let l=i._removeEmptyFolders(t),u=i._getFinalPath(l),d=await(e==`PUT`?jd:Ad)(i.fetch,`${i.url}/object/${u}`,a,q({headers:s},o?.duplex?{duplex:o.duplex}:{}));return{path:l,id:d.Id,fullPath:d.Key}})}async upload(e,t,n){return this.uploadOrUpdate(`POST`,e,t,n)}async uploadToSignedUrl(e,t,n,r){var i=this;let a=i._removeEmptyFolders(e),o=i._getFinalPath(a),s=new URL(i.url+`/object/upload/sign/${o}`);return s.searchParams.set(`token`,t),i.handleOperation(async()=>{let e,t=q(q({},Bd),r),o=q(q({},i.headers),{"x-upsert":String(t.upsert)}),c=t.metadata;if(typeof Blob<`u`&&n instanceof Blob?(e=new FormData,e.append(`cacheControl`,t.cacheControl),c&&e.append(`metadata`,i.encodeMetadata(c)),e.append(``,n)):typeof FormData<`u`&&n instanceof FormData?(e=n,e.has(`cacheControl`)||e.append(`cacheControl`,t.cacheControl),c&&!e.has(`metadata`)&&e.append(`metadata`,i.encodeMetadata(c))):(e=n,o[`cache-control`]=`max-age=${t.cacheControl}`,o[`content-type`]=t.contentType,c&&(o[`x-metadata`]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<`u`&&e instanceof ReadableStream||e&&typeof e==`object`&&`pipe`in e&&typeof e.pipe==`function`)&&!t.duplex&&(t.duplex=`half`)),r?.headers)for(let[e,t]of Object.entries(r.headers))o=vd(o,e,t);return{path:a,fullPath:(await jd(i.fetch,s.toString(),e,q({headers:o},t?.duplex?{duplex:t.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e),i=q({},n.headers);t?.upsert&&(i[`x-upsert`]=`true`);let a=await Ad(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:i}),o=new URL(n.url+a.url),s=o.searchParams.get(`token`);if(!s)throw new md(`No token returned by API`);return{signedUrl:o.toString(),path:e,token:s}})}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 Ad(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
19stinationBucket:n?.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await Ad(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 i=r._getFinalPath(e),a=typeof n?.transform==`object`&&n.transform!==null&&Object.keys(n.transform).length>0,o=await Ad(r.fetch,`${r.url}/object/sign/${i}`,q({expiresIn:t},a?{transform:n.transform}:{}),{headers:r.headers}),s=new URLSearchParams;n?.download&&s.set(`download`,n.download===!0?``:n.download),n?.cacheNonce!=null&&s.set(`cacheNonce`,String(n.cacheNonce));let c=s.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${c?`&${c}`:``}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{let i=await Ad(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));let o=a.toString();return i.map(e=>q(q({},e),{},{signedUrl:e.signedURL?encodeURI(`${r.url}${e.signedURL}${o?`&${o}`:``}`):null}))})}download(e,t,n){let r=typeof t?.transform==`object`&&t.transform!==null&&Object.keys(t.transform).length>0?`render/image/authenticated`:`object`,i=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(i,t.transform),t?.cacheNonce!=null&&i.set(`cacheNonce`,String(t.cacheNonce));let a=i.toString(),o=this._getFinalPath(e);return new Rd(()=>kd(this.fetch,`${this.url}/${r}/${o}${a?`?${a}`:``}`,{headers:this.headers,noResolveJson:!0},n),this.shouldThrowOnError)}async info(e){var t=this;let n=t._getFinalPath(e);return t.handleOperation(async()=>Sd(await kd(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;let n=t._getFinalPath(e);try{return await Md(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(hd(e)){let t=e instanceof gd?e.status:e instanceof _d?e.originalError?.status:void 0;if(t!==void 0&&[400,404].includes(t))return{data:!1,error:e}}throw e}}getPublicUrl(e,t){let 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));let i=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}`)+(i?`?${i}`:``)}}}async remove(e){var t=this;return t.handleOperation(async()=>await Nd(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async purgeCache(e,t,n){var r=this;return r.handleOperation(async()=>{let i=J(r._getFinalPath(e)),a=new URLSearchParams;t?.transformations&&a.set(`transformations`,`true`);let o=a.toString();return await Nd(r.fetch,`${r.url}/cdn/${i}${o?`?${o}`:``}`,{},{headers:r.headers},n)})}async list(e,t,n){var r=this;return r.handleOperation(async()=>{let i=t?.sortBy?q(q({},zd.sortBy),t.sortBy):zd.sortBy,a=q(q(q({},zd),t),{},{sortBy:i,prefix:e||``});return await Ad(r.fetch,`${r.url}/object/list/${r.bucketId}`,a,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{let r=q({},e);return await Ad(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<`u`?Buffer.from(e).toString(`base64`):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,``)}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,``).replace(/\/+/g,`/`)}applyTransformOptsToQuery(e,t){return t.width&&e.set(`width`,t.width.toString()),t.height&&e.set(`height`,t.height.toString()),t.resize&&e.set(`resize`,t.resize),t.format&&e.set(`format`,t.format),t.quality&&e.set(`quality`,t.quality.toString()),e}},Hd={"X-Client-Info":`storage-js/2.112.4`},Ud=class extends Fd{constructor(e,t={},n,r){let i=new URL(e);r?.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes(`storage.supabase.`)&&(i.hostname=i.hostname.replace(`supabase.`,`storage.supabase.`));let a=i.href.replace(/\/$/,``),o=q(q({},Hd),t);super(a,o,n,`storage`)}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let n=t.listBucketOptionsToQueryString(e);return await kd(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await kd(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await Ad(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 jd(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 Ad(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Nd(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async purgeBucketCache(e,t,n){var r=this;return r.handleOperation(async()=>{let i=new URLSearchParams;t?.transformations&&i.set(`transformations`,`true`);let a=i.toString();return await Nd(r.fetch,`${r.url}/cdn/${J(e)}${a?`?${a}`:``}`,{},{headers:r.headers},n)})}listBucketOptionsToQueryString(e){let 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>
190?`?`+new URLSearchParams(t).toString():``}},Wd=class extends Fd{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=q(q({},Hd),t);super(r,i,n,`storage`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await Ad(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let 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);let r=n.toString(),i=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await kd(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Nd(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!Cd(e))throw new md(`Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.`);let n=new cd({baseUrl:this.url,catalogName:e,auth:{type:`custom`,getHeaders:async()=>t.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(e,t){let n=e[t];return typeof n==`function`?async(...t)=>{try{return{data:await n.apply(e,t),error:null}}catch(e){if(r)throw e;return{data:null,error:e}}}:n}})}},Gd=class extends Fd{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=q(q({},Hd),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createIndex(e){var t=this;return t.handleOperation(async()=>await Pd.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Pd.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Pd.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Pd.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},Kd=class extends Fd{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=q(q({},Hd),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw Error(`Vector batch size must be between 1 and 500 items`);return t.handleOperation(async()=>await Pd.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Pd.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 Error(`segmentCount must be between 1 and 16`);if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Pd.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Pd.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 Error(`Keys batch size must be between 1 and 500 items`);return t.handleOperation(async()=>await Pd.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},qd=class extends Fd{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=q(q({},Hd),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await Pd.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Pd.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Pd.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Pd.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},Jd=class extends qd{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new Yd(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)}},Yd=class extends Gd{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName}))}
19async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new Xd(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},Xd=class extends Kd{constructor(e,t,n,r,i){super(e,t,i),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},Zd=class extends Ud{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new Vd(this.url,this.headers,e,this.fetch)}get vectors(){return new Jd(this.url+`/vector`,{headers:this.headers,fetch:this.fetch})}get analytics(){return new Wd(this.url+`/iceberg`,this.headers,this.fetch)}},Qd=`2.112.4`,$d=3e4,ef=3*$d,tf=2*$d,nf=`http://localhost:9999`,rf=`supabase.auth.token`,af={"X-Client-Info":`gotrue-js/${Qd}`},of=`X-Supabase-Api-Version`,sf={"2024-01-01":{timestamp:Date.parse(`2024-01-01T00:00:00.0Z`),name:`2024-01-01`}},cf=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,lf=`sb_flow_id`,uf=class extends Error{constructor(e,t,n){super(e),this.__isAuthError=!0,this.name=`AuthError`,this.status=t,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}};function X(e){return typeof e==`object`&&!!e&&`__isAuthError`in e}var df=class extends uf{constructor(e,t,n){super(e,t,n),this.name=`AuthApiError`,this.status=t,this.code=n}};function ff(e){return X(e)&&e.name===`AuthApiError`}var pf=class extends uf{constructor(e,t){super(e),this.name=`AuthUnknownError`,this.originalError=t}},mf=class extends uf{constructor(e,t,n,r){super(e,n,r),this.name=t,this.status=n}},hf=class extends mf{constructor(){super(`Auth session missing!`,`AuthSessionMissingError`,400,void 0)}};function gf(e){return X(e)&&e.name===`AuthSessionMissingError`}var _f=class extends mf{constructor(){super(`Auth session or user missing`,`AuthInvalidToken
19ResponseError`,500,void 0)}},vf=class extends mf{constructor(e){super(e,`AuthInvalidCredentialsError`,400,void 0)}},yf=class extends mf{constructor(e,t=null){super(e,`AuthImplicitGrantRedirectError`,500,void 0),this.details=null,this.details=t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}};function bf(e){return X(e)&&e.name===`AuthImplicitGrantRedirectError`}var xf=class extends mf{constructor(e,t=null){super(e,`AuthPKCEGrantCodeExchangeError`,500,void 0),this.details=null,this.details=t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}},Sf=class extends mf{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`)}},Cf=class extends mf{constructor(e,t){super(e,`AuthRetryableFetchError`,t,void 0)}};function wf(e){return X(e)&&e.name===`AuthRetryableFetchError`}var Tf=class extends mf{constructor(e=`Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)`){super(e,`AuthRefreshDiscardedError`,409,void 0)}};function Ef(e){return X(e)&&e.name===`AuthRefreshDiscardedError`}var Df=class extends mf{constructor(e,t,n){super(e,`AuthWeakPasswordError`,t,`weak_password`),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}},Of=class extends mf{constructor(e){super(e,`AuthInvalidJwtError`,400,`invalid_jwt`)}},kf=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`.split(``),Af=` 20\r=`.split(``),jf=(()=>{let e=Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Af.length;t+=1)e[Af[t].charCodeAt(0)]=-2;for(let t=0;t<kf.length;t+=1)e[kf[t].charCodeAt(0)]=t;return e})();function Mf(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;)n(kf[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6;else if(t.queuedBits>0)for(t.queue<<=6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;)n(kf[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6}function Nf(e,t,n){let r=jf[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;else throw Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}function Pf(e){let t=[],n=e=>{t.push(String.fromCodePoint(e))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=e=>{Lf(e,r,n)};for(let t=0;t<e.length;t+=1)Nf(e.charCodeAt(t),i,a);return t.join(``)}function Ff(e,t){if(e<=127){t(e);return}if(e<=2047){t(192|e>>6),t(128|e&63);return}if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function If(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){let t=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|t)+65536,n+=1}Ff(r,t)}}function Lf(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw Error(`Invalid UTF-8 sequence`);--t.utf8seq}else if(t.utf8seq>0){if(e<=127)throw Error(`Invalid UTF-8 sequence`);t.codepoint=t.codepoint<<6|e&63,--t.utf8seq,t.utf8seq===0&&n(t.codepoint)}}function Rf(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};for(let t=0;t<e.length;t+=1)Nf(e.charCodeAt(t),n,r);return new Uint8Array(t)}function zf(e){let t=[];return If(e,e=>t.push(e)),new Uint8Array(t)}function Bf(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};return e.forEach(e=>Mf(e,n,r)),Mf(null,n,r),t.join(``)}function Vf(e){return Math.round(Date.now()/1e3)+e}function Hf(){return Symbol(`auth-callback`)}var Uf=()=>typeof window<`u`&&typeof document<`u`,Wf={tested:!1,writable:!1},Gf=()=>{if(!Uf())return!1;try{if(typeof globalThis.localStorage!=`object`)return!1}catch{return!1}if(Wf.tested)return Wf.writable;let e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Wf.tested=!0,Wf.writable=!0}catch{Wf.tested=!0,Wf.writable=!1}return Wf.writable};function Kf(e){let t={},n=new URL(e);if(n.hash&&n.hash[0]===`#`)try{new URLSearchParams(n.hash.substring(1)).forEac
20h((e,n)=>{t[n]=e})}catch{}return n.searchParams.forEach((e,n)=>{t[n]=e}),t}var qf=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),Jf=e=>typeof e==`object`&&!!e&&`status`in e&&`ok`in e&&`json`in e&&typeof e.json==`function`,Yf=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Xf=async(e,t)=>{let n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Zf=async(e,t)=>{await e.removeItem(t)},Qf=class e{constructor(){this.promise=new e.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}};Qf.promiseConstructor=Promise;function $f(e){let t=e.split(`.`);if(t.length!==3)throw new Of(`Invalid JWT structure`);for(let e=0;e<t.length;e++)if(!cf.test(t[e]))throw new Of(`JWT not in base64url format`);return{header:JSON.parse(Pf(t[0])),payload:JSON.parse(Pf(t[1])),signature:Rf(t[2]),raw:{header:t[0],payload:t[1]}}}async function ep(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function tp(e,t){return new Promise((n,r)=>{(async()=>{for(let i=0;i<1/0;i++)try{let r=await e(i);if(!t(i,null,r)){n(r);return}}catch(e){if(!t(i,e)){r(e);return}}})()})}function np(e){return(`0`+e.toString(16)).substr(-2)}function rp(){let e=new Uint32Array(56);if(typeof crypto>`u`){let e=``;for(let t=0;t<56;t++)e+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~`.charAt(Math.floor(Math.random()*66));return e}return crypto.getRandomValues(e),Array.from(e,np).join(``)}async function ip(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t),r=new Uint8Array(n);return Array.from(r).map(e=>String.fromCharCode(e)).join(``)}async function ap(e){if(!(typeof crypto<`u`&&crypto.subtle!==void 0&&typeof TextEncoder<`u`))return console.warn(`WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256.`),e;let t=await ip(e);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}var op=/^[a-zA-Z0-9_-]{8,64}$/;function sp(e){return typeof e==`string`&&op.test(e)?e:null}function cp(){if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,np).join(``)}let e=``;for(let t=0;t<32;t++)e+=Math.floor(Math.random()*16).toString(16);return e}var lp=(e,t)=>`${e}-flow-${t}-code-verifier`,up=e=>`${e}-flows-code-verifier`;async function dp(e,t){let n=await Xf(e,up(t));return Array.isArray(n)?n.filter(e=>sp(e)!==null):[]}async function fp(e,t,n,r,i){await Yf(e,lp(t,n),r);let a=(await dp(e,t)).filter(e=>e!==n);for(a.push(n);a.length>5;){let n=a.shift();await Zf(e,lp(t,n)),i?.(n)}await Yf(e,up(t),a),await Yf(e,`${t}-code-verifier`,r)}async function pp(e,t,n){if(n){let r=await Xf(e,lp(t,n));return{verifier:typeof r==`string`?r:null,flowId:n}}let r=await Xf(e,`${t}-code-verifier`);return{verifier:typeof r==`string`?r:null,flowId:null}}async function mp(e,t,n){let r=`${t}-code-verifier`;if(!n){await Zf(e,r);return}let i=lp(t,n),a=await Xf(e,i);await Zf(e,i);let o=await dp(e,t),s=o.filter(e=>e!==n);s.length!==o.length&&(s.length>0?await Yf(e,up(t),s):await Zf(e,up(t))),a!=null&&a===await Xf(e,r)&&await Zf(e,r)}async function hp(e,t){let n=await dp(e,t);for(let r of n)await Zf(e,lp(t,r));await Zf(e,up(t)),await Zf(e,`${t}-code-verifier`)}function gp(e,t){let n=e.indexOf(`#`),r=n===-1?e:e.slice(0,n),i=n===-1?``:e.slice(n),a=r.indexOf(`?`);if(a!==-1){let e=r.slice(0,a),t=r.slice(a+1).split(`&`).filter(e=>e!==``&&e!==`sb_flow_id`&&!e.startsWith(`sb_flow_id=`));r=t.length>0?`${e}?${t.join(`&`)}`:e}let o=r.includes(`?`)?`&`:`?`;return`${r}${o}${lf}=${encodeURIComponent(t)}${i}`}async function _p(e,t,n=!1,r){let i=rp(),a=i;n&&(a+=`/recovery`);let o=cp();await fp(e,t,o,a,r);let s=await ap(i);return[s,i===s?`plain`:`s256`,o]}var vp=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function yp(e){let t=e.headers.get(of);if(!t||!t.match(vp))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function bp(e){if(!e)throw Error(`Missing exp claim`);if(e<=Math.floor(Date.now()/1e3))throw Error(`JWT has expired`)}function xp(e){switch(e){case`RS256`:return{name:`RSASSA-PKCS1-v1_5`,hash:{name:`
20SHA-256`}};case`ES256`:return{name:`ECDSA`,namedCurve:`P-256`,hash:{name:`SHA-256`}};default:throw Error(`Invalid alg claim`)}}var Sp=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Cp(e){if(!Sp.test(e))throw Error(`@supabase/auth-js: Expected parameter to be UUID but is not`)}function wp(e){if(!e.passkey)throw 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 Tp(){return new Proxy({},{get:(e,t)=>{if(t===`__isUserNotAvailableProxy`)return!0;if(typeof t==`symbol`){let e=t.toString();if(e===`Symbol(Symbol.toPrimitive)`||e===`Symbol(Symbol.toStringTag)`||e===`Symbol(util.inspect.custom)`)return}throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${t}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,t)=>{throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,t)=>{throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Ep(e,t){return new Proxy(e,{get:(e,n,r)=>{if(n===`__isInsecureUserWarningProxy`)return!0;if(typeof n==`symbol`){let t=n.toString();if(t===`Symbol(Symbol.toPrimitive)`||t===`Symbol(Symbol.toStringTag)`||t===`Symbol(util.inspect.custom)`||t===`Symbol(nodejs.util.inspect.custom)`)return Reflect.get(e,n,r)}return!t.value&&typeof n==`string`&&(console.warn(`Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server.`),t.value=!0),Reflect.get(e,n,r)}})}function Dp(e){return JSON.parse(JSON.stringify(e))}var Op=e=>{if(typeof e==`object`&&e){let 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)},kp=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function Ap(e){if(!Jf(e))throw new Cf(Op(e),0);let t;try{t=await e.json()}catch(t){throw kp.includes(e.status)?new Cf(e.statusText||`HTTP ${e.status}`,e.status):new pf(Op(t),t)}if(kp.includes(e.status))throw new Cf(Op(t),e.status);let n,r=yp(e);if(r&&r.getTime()>=sf[`2024-01-01`].timestamp&&typeof t==`object`&&t&&typeof t.code==`string`?n=t.code:typeof t==`object`&&t&&typeof t.error_code==`string`&&(n=t.error_code),!n){if(typeof t==`object`&&t&&typeof t.weak_password==`object`&&t.weak_password&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.reasons.reduce((e,t)=>e&&typeof t==`string`,!0))throw new Df(Op(t),e.status,t.weak_password.reasons)}else if(n===`weak_password`)throw new Df(Op(t),e.status,t.weak_password?.reasons||[]);else if(n===`session_not_found`)throw new hf;throw new df(Op(t),e.status||500,n)}var jp=(e,t,n,r)=>{let i={method:e,headers:t?.headers||{}};return e===`GET`?i:(i.headers=Object.assign({"Content-Type":`application/json;charset=UTF-8`},t?.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function Z(e,t,n,r){let i=Object.assign({},r?.headers);i[`X-Supabase-Api-Version`]||(i[of]=sf[`2024-01-01`].name),r?.jwt&&(i.Authorization=`Bearer ${r.jwt}`);let a=r?.query??{};r?.redirectTo&&(a.redirect_to=r.redirectTo);let o=await Mp(e,t,n+(Object.keys(a).length?`?`+new URLSearchParams(a).toString():``),{headers:i,noResolveJson:r?.noResolveJson},{},r?.body);return r?.xform?r?.xform(o):{data:Object.assign({},o),error:null}}async function Mp(e,t,n,r,i,a){let o=jp(t,r,i,a),s;try{s=await e(n,Object.assign({},o))}catch(e){throw new Cf(Op(e),0)}if(s.ok||await Ap(s),r?.noResolveJson)return s;try{return await s.json()}catch(e){await Ap(e)}}function Np(e){let t=null;zp(e)&&(t=Object.assign({},e),e.expires_at||(t.expires_at=Vf(e.expires_in)));
20let n=e.user??(typeof e?.id==`string`?e:null);return{data:{session:t,user:n},error:null}}function Pp(e){let t=Np(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((e,t)=>e&&typeof t==`string`,!0)&&(t.data.weak_password=e.weak_password),t}function Fp(e){return{data:{user:e.user??e},error:null}}function Ip(e){return{data:e,error:null}}function Lp(e){let{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a}=e,o=z(e,[`action_link`,`email_otp`,`hashed_token`,`redirect_to`,`verification_type`]);return{data:{properties:{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a},user:Object.assign({},o)},error:null}}function Rp(e){return e}function zp(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}var Bp=[`global`,`local`,`others`],Vp=class{constructor({url:e=``,headers:t={},fetch:n,experimental:r}){this.url=e,this.headers=t,this.fetch=qf(n),this.experimental=r??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,t=Bp[0]){if(Bp.indexOf(t)<0)throw Error(`@supabase/auth-js: Parameter scope must be one of ${Bp.join(`, `)}`);try{return await Z(this.fetch,`POST`,`${this.url}/logout?scope=${t}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(e){if(X(e))return{data:null,error:e};throw e}}async inviteUserByEmail(e,t={}){try{return await Z(this.fetch,`POST`,`${this.url}/invite`,{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:Fp})}catch(e){if(X(e))return{data:{user:null},error:e};throw e}}async generateLink(e){try{let{options:t}=e,n=z(e,[`options`]),r=Object.assign(Object.assign({},n),t);return`newEmail`in n&&(r.new_email=n?.newEmail,delete r.newEmail),await Z(this.fetch,`POST`,`${this.url}/admin/generate_link`,{body:r,headers:this.headers,xform:Lp,redirectTo:t?.redirectTo})}catch(e){if(X(e))return{data:{properties:null,user:null},error:e};throw e}}async createUser(e){try{return await Z(this.fetch,`POST`,`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Fp})}catch(e){if(X(e))return{data:{user:null},error:e};throw e}}async listUsers(e){try{let t={nextPage:null,lastPage:0,total:0},n=await Z(this.fetch,`GET`,`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:Rp});if(n.error)throw n.error;let r=await n.json(),i=n.headers.get(`x-total-count`)??0,a=n.headers.get(`link`)?.split(`,`)??[];return a.length>0&&(a.forEach(e=>{let n=parseInt(e.split(`;`)[0].split(`=`)[1].substring(0,1)),r=JSON.parse(e.split(`;`)[1].split(`=`)[1]);t[`${r}Page`]=n}),t.total=parseInt(i)),{data:Object.assign(Object.assign({},r),t),error:null}}catch(e){if(X(e))return{data:{users:[]},error:e};throw e}}async getUserById(e){Cp(e);try{return await Z(this.fetch,`GET`,`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Fp})}catch(e){if(X(e))return{data:{user:null},error:e};throw e}}async updateUserById(e,t){Cp(e);try{return await Z(this.fetch,`PUT`,`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:Fp})}catch(e){if(X(e))return{data:{user:null},error:e};throw e}}async deleteUser(e,t=!1){Cp(e);try{return await Z(this.fetch,`DELETE`,`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:Fp})}catch(e){if(X(e))return{data:{user:null},error:e};throw e}}async _listFactors(e){Cp(e.userId);try{let{data:t,error:n}=await Z(this.fetch,`GET`,`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:n}}catch(e){if(X(e))return{data:null,error:e};throw e}}async _deleteFactor(e){Cp(e.userId),Cp(e.id);try{return{data:await Z(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(e){if(X(e))return{data:null,error:e};throw e}}async _listOAuthClients(e){try{let t={nextPage:null,lastPage:0,total:0},n=await Z(this.fetch,`GET`,`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:Rp});if(n.error)throw n.error;let r=await n.json(),i=n.headers.get(`x-total-count`)??0,a=n.headers.get(`link`)?.split(`,`)??[];return a.length>
200&&(a.forEach(e=>{let n=parseInt(e.split(`;`)[0].split(`=`)[1].substring(0,1)),r=JSON.parse(e.split(`;`)[1].split(`=`)[1]);t[`${r}Page`]=n}),t.total=parseInt(i)),{data:Object.assign(Object.assign({},r),t),error:null}}catch(e){if(X(e))return{data:{clients:[]},error:e};throw e}}async _createOAuthClient(e){try{return await Z(this.fetch,`POST`,`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(X(e))return{data:null,error:e};throw e}}async _getOAuthClient(e){try{return await Z(this.fetch,`GET`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(X(e))return{data:null,error:e};throw e}}async _updateOAuthClient(e,t){try{return await Z(this.fetch,`PUT`,`${this.url}/admin/oauth/clients/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(X(e))return{data:null,error:e};throw e}}async _deleteOAuthClient(e){try{return await Z(this.fetch,`DELETE`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(X(e))return{data:null,error:e};throw e}}async _regenerateOAuthClientSecret(e){try{return await Z(this.fetch,`POST`,`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(X(e))return{data:null,error:e};throw e}}async _listCustomProviders(e){try{let t={};return e?.type&&(t.type=e.type),await Z(this.fetch,`GET`,`${this.url}/admin/custom-providers`,{headers:this.headers,query:t,xform:e=>({data:{providers:e?.providers??[]},error:null})})}catch(e){if(X(e))return{data:{providers:[]},error:e};throw e}}async _createCustomProvider(e){try{return await Z(this.fetch,`POST`,`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(X(e))return{data:null,error:e};throw e}}async _getCustomProvider(e){try{return await Z(this.fetch,`GET`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(X(e))return{data:null,error:e};throw e}}async _updateCustomProvider(e,t){try{return await Z(this.fetch,`PUT`,`${this.url}/admin/custom-providers/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(X(e))return{data:null,error:e};throw e}}async _deleteCustomProvider(e){try{return await Z(this.fetch,`DELETE`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(X(e))return{data:null,error:e};throw e}}async _adminListPasskeys(e){wp(this.experimental),Cp(e.userId);try{return await Z(this.fetch,`GET`,`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(X(e))return{data:null,error:e};throw e}}async _adminDeletePasskey(e){wp(this.experimental),Cp(e.userId),Cp(e.passkeyId);try{return await Z(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(X(e))return{data:null,error:e};throw e}}};function Hp(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}globalThis&&Gf()&&globalThis.localStorage&&globalThis.localStorage.getItem(`supabase.gotrue-js.locks.debug`);var Up=class extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}};function Wp(){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 Gp(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function Kp(e){return parseInt(e,16)}function qp(e){let t=new TextEncoder().encode(e);return`0x`+Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``)}function Jp(e){let{chainId:t,domain:n,expirationTime:r,issuedAt:i=new Date,nonce:a,notBefore:o,requestId:s,resources:c,scheme:l,uri:u,version:d}=e;if(!Number.isInteger(t))throw Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${t}`);if(!n)throw Error(`@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.`);if(a&&a.length<8)throw Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!u)throw Error(`@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.`);if(d!==`1`)throw Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${d}`);if(e.statement?.includes(` 21`))throw Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`);let f=Gp(e.address),p=`${l?`${l}://${n}`:n} wants you to sign in with your Ethereum account:\n${f}\n\n${e.statement?`${e.statement}\n`:``}`,m=`URI: ${u}\nVersion: ${d}\nChain ID: ${t}${a?`\nNonce: ${a}`:``}\nIssued At: ${i.toISOString()}`;if(r&&(m+=`\nExpiration Time: ${r.toISOString()}`),o&&(m+=`\nNot Before: ${o.toISOString()}`),s&&(m+=`\nRequest ID: ${s}`),c){let e=` 22Resources:`;for(let t of c){if(!t||typeof t!=`string`)throw Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${t}`);e+=`\n- ${t}`}m+=e}return`${p}\n${m}`}
22var Yp=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=r??(n instanceof Error?n.name:void 0)??`Unknown Error`,this.code=t}toJSON(){return{name:this.name,message:this.message,code:this.code}}},Xp=class extends Yp{constructor(e,t){super({code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:t,message:e}),this.name=`WebAuthnUnknownError`,this.originalError=t}};function Zp({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Yp({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new Yp({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new Yp({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new Yp({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 Yp({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new Yp({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new Yp({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new Yp({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!im(t))return new Yp({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new Yp({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new Yp({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 Yp({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 Yp({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}function Qp({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Yp({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new Yp({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!im(t))return new Yp({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new Yp({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new Yp({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 Yp({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}var $p=new class{createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}};function em(e){if(!e)throw Error(`Credential creation options are required`);if(typeof PublicKeyCredential<`u`&&`parseCreationOptionsFromJSON`in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON==`function`)return PublicKeyCredential.parseCreationOptionsFromJSON(e);let{challenge:t,user:n,excludeCredentials:r}=e,i=z(e,[`challenge`,`user`,`excludeCredentials`]),a=Rf(t).buffer,o=Object.assign(Object.assign({},n),{id:Rf(n.id).buffer}),s=Object.assign(Object.assign({},i),{challenge:a,user:o});if(r&&r.length>0){s.excludeCredentials=Array(r.length);for(let e=0;e<r.length;e++){let t=r[e];s.excludeCredentials[e]=Object.assign(Object.assign({},t),{id:Rf(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return s}function tm(e){if(!e)throw Error(`Credential request options are required`);if(typeof PublicKeyCredential<`u`&&`parseRequestOptionsFromJSON`in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON==`function`)return PublicKeyCredential.parseRequestOptionsFromJSON(e);let{challenge:t,allowCredentials:n}=e,r=z(e,[`challenge`,`allowCredentials`]),i=Rf(t).buffer,a=Object.assign(Object.assign({},r),{challenge:i});if(n&&n.length>0){a.allowCredentials=Array(n.length);for(let e=0;e<n.length;e++){let t=n[e];a.allowCredentials[e]=Object.assign(Object.assign({},t),{id:Rf(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return a}function nm(e){if(`toJSON`in e&&typeof e.toJSON==`function`)return e.toJSON();let t=e;
22return{id:e.id,rawId:e.id,response:{attestationObject:Bf(new Uint8Array(e.response.attestationObject)),clientDataJSON:Bf(new Uint8Array(e.response.clientDataJSON))},type:`public-key`,clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:t.authenticatorAttachment??void 0}}function rm(e){if(`toJSON`in e&&typeof e.toJSON==`function`)return e.toJSON();let t=e,n=e.getClientExtensionResults(),r=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Bf(new Uint8Array(r.authenticatorData)),clientDataJSON:Bf(new Uint8Array(r.clientDataJSON)),signature:Bf(new Uint8Array(r.signature)),userHandle:r.userHandle?Bf(new Uint8Array(r.userHandle)):void 0},type:`public-key`,clientExtensionResults:n,authenticatorAttachment:t.authenticatorAttachment??void 0}}function im(e){return e===`localhost`||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function am(){return!!(Uf()&&`PublicKeyCredential`in window&&window.PublicKeyCredential&&`credentials`in navigator&&typeof(navigator==null?void 0:navigator.credentials)?.create==`function`&&typeof(navigator==null?void 0:navigator.credentials)?.get==`function`)}async function om(e){try{let t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Xp(`Browser returned unexpected credential type`,t)}:{data:null,error:new Xp(`Empty credential response`,t)}}catch(t){return{data:null,error:Zp({error:t,options:e})}}}async function sm(e){try{let t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Xp(`Browser returned unexpected credential type`,t)}:{data:null,error:new Xp(`Empty credential response`,t)}}catch(t){return{data:null,error:Qp({error:t,options:e})}}}var cm={hints:[`security-key`],authenticatorSelection:{authenticatorAttachment:`cross-platform`,requireResidentKey:!1,userVerification:`preferred`,residentKey:`discouraged`},attestation:`direct`},lm={userVerification:`preferred`,hints:[`security-key`],attestation:`direct`};function um(...e){let t=e=>typeof e==`object`&&!!e&&!Array.isArray(e),n=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),r={};for(let i of e)if(i)for(let e in i){let a=i[e];if(a!==void 0)if(Array.isArray(a))r[e]=a;else if(n(a))r[e]=a;else if(t(a)){let n=r[e];r[e]=t(n)?um(n,a):um(a)}else r[e]=a}return r}function dm(e,t){return um(cm,e,t||{})}function fm(e,t){return um(lm,e,t||{})}var pm=class{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:`webauthn`}))}async _challenge({factorId:e,webauthn:t,friendlyName:n,signal:r},i){try{let{data:a,error:o}=await this.client.mfa.challenge({factorId:e,webauthn:t});if(!a)return{data:null,error:o};let s=r??$p.createNewAbortSignal();if(a.webauthn.type===`create`){let{user:e}=a.webauthn.credential_options.publicKey;if(!e.name){let t=n;if(t)e.name=`${e.id}:${t}`;else{let t=(await this.client.getUser()).data.user,n=t?.user_metadata?.name||t?.email||t?.id||`User`;e.name=`${e.id}:${n}`}}e.displayName||=e.name}switch(a.webauthn.type){case`create`:{let{data:t,error:n}=await om({publicKey:dm(a.webauthn.credential_options.publicKey,i?.create),signal:s});return t?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:t}},error:null}:{data:null,error:n}}case`request`:{let t=fm(a.webauthn.credential_options.publicKey,i?.request),{data:n,error:r}=await sm(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:t,signal:s}));return n?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:n}},error:null}:{data:null,error:r}}}}catch(e){return X(e)?{data:null,error:e}:{data:null,error:new pf(`Unexpected error in challenge`,e)}}}async _verify({challengeId:e,factorId:t,webauthn:n}){return this.client.mfa.verify({factorId:t,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:t=typeof window<`u`?window.location.hostname:void 0,rpOrigins:n=typeof window<`u`?[window.location.origin]:void 0,signal:r}={}},i){if(!t)return{data:null,error:new uf(`rpId is required for WebAuthn authentication`)};try{if(!am())return{data:null,error:new pf(`Browser does not support WebAuthn`,null)};let{data:a,error:o}=await this.challenge({factorId:e,webauthn:{rpId:t,rpOrigins:n},signal:r},{request:i});if(!a)return{data:null,error:o};let{webauthn:s}=a;return this._verify({factorId:e,challengeId:a.challengeId,webauthn:{type:s.type,rpId:t,rpOrigins:n,credential_response:s.credential_response}})}catch(e){return X(e)?{data:null,error:e}:{data:null,error:new pf(`Unexpected error in authenticate`,e)}}}async _register({friendlyName:e,webauthn:{rpId:t=typeof window<`u`?window.location.hostname:void 0,rpOrigins:n=typeof window<`u`?[window.location.origin]:void 0,signal:r}={}},i){if(!t)return{data:null,error:new uf(`rpId is required for WebAuthn registration`)};try{if(!am())return{data:null,error:new pf(`Browser does not support WebAuthn`,null)};let{data:a,error:o}=await this._enroll({friendlyName:e});if(!a)return await this.client.mfa.listFactors().then(t=>t.data?.all.find(t=>t.factor_type===`webauthn`&&t.friendly_name===e&&t.status!==`unverified`)).then(e=>e?this.client.mfa.unenroll({factorId:e?.id}):void 0),{data:null,error:o};let{data:s,error:c}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:t,rpOrigins:n},signal:r},{create:i});return s?this._verify({factorId:a.id,challengeId:s.challengeId,webauthn:{rpId:t,rpOrigins:n,type:s.webauthn.type,credential_response:s.webauthn.credential_response}}):{data:null,error:c}}catch(e){return X(e)?{data:null,error:e}:{data:null,error:new pf(`Unexpected error in register`,e)}}}};Wp();var mm={url:nf,storageKey:rf,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:af,flowType:`implicit`,debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},hm={},gm=!1,_m=class e{get jwks(){return hm[this.storageKey]?.jwks??{keys:[]}}set jwks(e){hm[this.storageKey]=Object.assign(Object.assign({},hm[this.storageKey]),{jwks:e})}get jwks_cached_at(){return hm[this.storageKey]?.cachedAt??-(2**53-1)}set jwks_cached_at(e){hm[this.storageKey]=Object.assign(Object.assign({},hm[this.storageKey]),{cachedAt:e})}constructor(t){var n;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;let r=Object.assign(Object.assign({},mm),t);if(this.storageKey=r.storageKey,this.instanceID=e.nextInstanceID[this.storageKey]??0,e.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!r.debug,typeof r.debug==`function`&&(this.logger=r.debug),this.instanceID>0&&Uf()){let e=`${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(e),this.logDebugMessages&&console.trace(e)}if(this.persistSession=r.persistSession,this.autoRefreshToken=r.autoRefreshToken,this.experimental=r.experimental??{},this.admin=new Vp({url:r.url,headers:r.headers,fetch:r.fetch,experimental:this.experimental}),this.url=r.url,this.headers=r.headers,this.fetch=qf(r.fetch),this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,this.hasCustomAuthorizationHeader=r.hasCustomAuthorizationHeader,this.throwOnError=r.throwOnError,this.lockAcquireTimeout=r.lockAcquireTimeout,r.lock!=null&&(this.lock=r.lock,gm||(gm=!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=-(2**53-1)),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 pm(this)}
22,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?(r.storage?this.storage=r.storage:Gf()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Hp(this.memoryStorage)),r.userStorage&&(this.userStorage=r.userStorage)):(this.memoryStorage={},this.storage=Hp(this.memoryStorage)),Uf()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(e){console.error(`Failed to create a new BroadcastChannel, multi-tab state changes will not be available`,e)}(n=this.broadcastChannel)==null||n.addEventListener(`message`,async e=>{this._debug(`received broadcast notification from other tab or client`,e),(e.data.event===`TOKEN_REFRESHED`||e.data.event===`SIGNED_IN`)&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(e.data.event,e.data.session,!1)}catch(e){this._debug(`#broadcastChannel`,`error`,e)}})}r.skipAutoInitialize||this.initialize().catch(e=>{this._debug(`#initialize()`,`error`,e)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Qd}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock==null?await this._initialize():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))();let e=await this.initializePromise,t=this._pendingInitNotifications??[];this._pendingInitNotifications=null;for(let e of t)await this._notifyAllSubscribers(e.event,e.session,e.broadcast);return e}async _initialize(){try{let e={},t=`none`;if(Uf()&&(e=Kf(window.location.href),this._isImplicitGrantCallback(e)?t=`implicit`:await this._isPKCECallback(e)&&(t=`pkce`)),Uf()&&this.detectSessionInUrl&&t!==`none`){let{data:n,error:r}=await this._getSessionFromURL(e,t);if(r){if(this._debug(`#_initialize()`,`error detecting session from URL`,r),bf(r)){let e=r.details?.code;if(e===`identity_already_exists`||e===`identity_not_found`||e===`single_identity_not_deletable`)return{error:r}}return{error:r}}let{session:i,redirectType:a}=n;return this._debug(`#_initialize()`,`detected session in URL`,i,`redirect type`,a),await this._saveSession(i),setTimeout(async()=>{a===`recovery`?await this._notifyAllSubscribers(`PASSWORD_RECOVERY`,i):await this._notifyAllSubscribers(`SIGNED_IN`,i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){return X(e)?this._returnResult({error:e}):this._returnResult({error:new pf(`Unexpected error during initialization`,e)})}finally{await this._handleVisibilityChange(),this._debug(`#_initialize()`,`end`)}}async signInAnonymously(e){try{let{data:t,error:n}=await Z(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,body:{data:e?.options?.data??{},gotrue_meta_security:{captcha_token:e?.options?.captchaToken}},xform:Np});if(n||!t)return this._returnResult({data:{user:null,session:null},error:n});let r=t.session,i=t.user;return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(`SIGNED_IN`,r)),this._returnResult({data:{user:i,session:r},error:null})}catch(e){if(X(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signUp(e){let t=null;try{let n;if(`email`in e){let{email:r,password:i,options:a}=e,o=null,s=null;this.flowType===`pkce`&&([o,s,t]=await this._getCodeChallengeAndMethod()),n=await Z(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(a?.emailRedirectTo,t),body:{email:r,password:i,data:a?.data??{},gotrue_meta_security:{captcha_token:a?.captchaToken}
22,code_challenge:o,code_challenge_method:s},xform:Np})}else if(`phone`in e){let{phone:t,password:r,options:i}=e;n=await Z(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,body:{phone:t,password:r,data:i?.data??{},channel:i?.channel??`sms`,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:Np})}else throw new vf(`You must provide either an email or phone number and a password`);let{data:r,error:i}=n;if(i||!r)return await mp(this.storage,this.storageKey,t),this._returnResult({data:{user:null,session:null},error:i});let a=r.session,o=r.user;return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,a)),this._returnResult({data:{user:o,session:a},error:null})}catch(e){if(await mp(this.storage,this.storageKey,t),X(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithPassword(e){try{let t;if(`email`in e){let{email:n,password:r,options:i}=e;t=await Z(this.fetch,`POST`,`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:n,password:r,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:Pp})}else if(`phone`in e){let{phone:n,password:r,options:i}=e;t=await Z(this.fetch,`POST`,`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:n,password:r,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:Pp})}else throw new vf(`You must provide either an email or phone number and a password`);let{data:n,error:r}=t;if(r)return this._returnResult({data:{user:null,session:null},error:r});if(!n||!n.session||!n.user){let e=new _f;return this._returnResult({data:{user:null,session:null},error:e})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers(`SIGNED_IN`,n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:r})}catch(e){if(X(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOAuth(e){return await this._handleProviderSignIn(e.provider,{redirectTo:e.options?.redirectTo,scopes:e.options?.scopes,queryParams:e.options?.queryParams,skipBrowserRedirect:e.options?.skipBrowserRedirect})}async exchangeCodeForSession(e,t){return await this.initializePromise,this.lock==null?this._exchangeCodeForSession(e,t):this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e,t))}async signInWithWeb3(e){let{chain:t}=e;switch(t){case`ethereum`:return await this.signInWithEthereum(e);case`solana`:return await this.signInWithSolana(e);default:throw Error(`@supabase/auth-js: Unsupported chain "${t}"`)}}async signInWithEthereum(e){let t,n;if(`message`in e)t=e.message,n=e.signature;else{let{chain:r,wallet:i,statement:a,options:o}=e,s;if(!Uf()){if(typeof i!=`object`||!o?.url)throw Error(`@supabase/auth-js: Both wallet and url must be specified in non-browser environments.`);s=i}else if(typeof i==`object`)s=i;else{let e=window;if(`ethereum`in e&&typeof e.ethereum==`object`&&`request`in e.ethereum&&typeof e.ethereum.request==`function`)s=e.ethereum;else throw 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.`)}let c=new URL(o?.url??window.location.href),l=await s.request({method:`eth_requestAccounts`}).then(e=>e).catch(()=>{throw Error(`@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid`)});if(!l||l.length===0)throw Error(`@supabase/auth-js: No accounts available. Please ensure the wallet is connected.`);let u=Gp(l[0]),d=o?.signInWithEthereum?.chainId;d||=Kp(await s.request({method:`eth_chainId`})),t=Jp({domain:c.host,address:u,statement:a,uri:c.href,version:`1`,chainId:d,nonce:o?.signInWithEthereum?.nonce,issuedAt:o?.signInWithEthereum?.issuedAt??new Date,expirationTime:o?.signInWithEthereum?.expirationTime,notBefore:o?.signInWithEthereum?.notBefore,requestId:o?.signInWithEthereum?.requestId,resources:o?.signInWithEthereum?.resources}),n=await s.request({method:`personal_sign`,params:[qp(t),u]})}try{let{data:r,error:i}=await Z(this.fetch,`POST`,`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:`ethereum`,message:t,signature:n},e.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options?.captchaToken}}:null),xform:Np});if(i)throw i;if(!r||!r.session||!r.user){let e=new _f;return this._returnResult({data:{user:null,session:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign({},r),error:i})}catch(e){if(X(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSolana(e){let t,n;if(`message`in e)t=e.message,n=e.signature;else{let{chain:r,wallet:i,statement:a,options:o}=e,s;if(!Uf()){if(typeof i!=`object`||!o?.url)throw Error(`@supabase/auth-js: Both wallet and url must be specified in non-browser environments.`);s=i}else if(typeof i==`object`)s=i;else{let e=window;if(`solana`in e&&typeof e.solana==`object`&&(`signIn`in e.solana&&typeof e.solana.signIn==`function`||`signMessage`in e.
22solana&&typeof e.solana.signMessage==`function`))s=e.solana;else throw 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.`)}let c=new URL(o?.url??window.location.href);if(`signIn`in s&&s.signIn){let e=await s.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},o?.signInWithSolana),{version:`1`,domain:c.host,uri:c.href}),a?{statement:a}:null)),r;if(Array.isArray(e)&&e[0]&&typeof e[0]==`object`)r=e[0];else if(e&&typeof e==`object`&&`signedMessage`in e&&`signature`in e)r=e;else throw Error(`@supabase/auth-js: Wallet method signIn() returned unrecognized value`);if(`signedMessage`in r&&`signature`in r&&(typeof r.signedMessage==`string`||r.signedMessage instanceof Uint8Array)&&r.signature instanceof Uint8Array)t=typeof r.signedMessage==`string`?r.signedMessage:new TextDecoder().decode(r.signedMessage),n=r.signature;else throw Error(`@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields`)}else{if(!(`signMessage`in s)||typeof s.signMessage!=`function`||!(`publicKey`in s)||typeof s!=`object`||!s.publicKey||!(`toBase58`in s.publicKey)||typeof s.publicKey.toBase58!=`function`)throw Error(`@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API`);t=[`${c.host} wants you to sign in with your Solana account:`,s.publicKey.toBase58(),...a?[``,a,``]:[``],`Version: 1`,`URI: ${c.href}`,`Issued At: ${o?.signInWithSolana?.issuedAt??new Date().toISOString()}`,...o?.signInWithSolana?.notBefore?[`Not Before: ${o.signInWithSolana.notBefore}`]:[],...o?.signInWithSolana?.expirationTime?[`Expiration Time: ${o.signInWithSolana.expirationTime}`]:[],...o?.signInWithSolana?.chainId?[`Chain ID: ${o.signInWithSolana.chainId}`]:[],...o?.signInWithSolana?.nonce?[`Nonce: ${o.signInWithSolana.nonce}`]:[],...o?.signInWithSolana?.requestId?[`Request ID: ${o.signInWithSolana.requestId}`]:[],...o?.signInWithSolana?.resources?.length?[`Resources`,...o.signInWithSolana.resources.map(e=>`- ${e}`)]:[]].join(` 23`);let e=await s.signMessage(new TextEncoder().encode(t),`utf8`);if(!e||!(e instanceof Uint8Array))throw Error(`@supabase/auth-js: Wallet signMessage() API returned an recognized value`);n=e}}try{let{data:r,error:i}=await Z(this.fetch,`POST`,`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:`solana`,message:t,signature:Bf(n)},e.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options?.captchaToken}}:null),xform:Np});if(i)throw i;if(!r||!r.session||!r.user){let e=new _f;return this._returnResult({data:{user:null,session:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign({},r),error:i})}catch(e){if(X(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _exchangeCodeForSession(e,t){let n=t?.flowId!=null,r=n?sp(t?.flowId):Uf()?sp(Kf(window.location.href)[lf]):null;n&&!r&&this._debug(`#_exchangeCodeForSession()`,`provided flowId is not a valid flow id`,t?.flowId);let{verifier:i,flowId:a}=n&&!r?{verifier:null,flowId:null}:await pp(this.storage,this.storageKey,r),[o,s]=(i??``).split(`/`);try{if(!o&&this.flowType===`pkce`)throw new Sf;let{data:t,error:n}=await Z(this.fetch,`POST`,`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:o},xform:Np});if(await mp(this.storage,this.storageKey,a),n)throw n;if(!t||!t.session||!t.user){let e=new _f;return this._returnResult({data:{user:null,session:null,redirectType:null},error:e})}return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(s===`recovery`?`PASSWORD_RECOVERY`:`SIGNED_IN`,t.session)),this._returnResult({data:Object.assign(Object.assign({},t),{redirectType:s??null}),error:n})}catch(e){if(await mp(this.storage,this.storageKey,a),X(e))return this._returnResult({data:{user:null,session:null,redirectType:null},error:e});throw e}}async signInWithIdToken(e){try{let{options:t,provider:n,token:r,access_token:i,nonce:a}=e,{data:o,error:s}=await Z(this.fetch,`POST`,`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:r,access_token:i,nonce:a,gotrue_meta_security:{captcha_token:t?.captchaToken}},xform:Np});if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!o||!o.session||!o.user){let e=new _f;return this._returnResult({data:{user:null,session:null},error:e})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers(`SIGNED_IN`,o.session)),this._returnResult({data:o,error:s})}catch(e){if(X(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOtp(e){let t=null;try{if(`email`in e){let{email:n,options:r}=e,i=null,a=null;this.flowType===`pkce`&&([i,a,t]=await this._getCodeChallengeAndMethod());let{error:o}=await Z(this.fetch,`POST`,`${this.url}/otp`,{headers:this.headers,body:{email:n,data:r?.data??{},create_user:r?.shouldCreateUser??!0,gotrue_meta_security:{captcha_token:r?.captchaToken},code_challenge:i,code_challenge_method:a},redirectTo:this._maybeAppendFlowIdToRedirect(r?.emailRedirectTo,t)});return this._returnResult({data:{user:null,session:null},error:o})}if(`phone`in e){let{phone:t,options:n}=e,{data:r,error:i}=await Z(this.fetch,`POST`,`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:n?.data??{},create_user:n?.shouldCreateUser??!0,gotrue_meta_security:{captcha_token:n?.captchaToken},channel:n?.channel??`sms`}});return this._returnResult({data:{user:null,session:null,messageId:r?.message_id},error:i})}throw new vf(`You must provide either an email or phone number.`)}catch(e){if(await mp(this.storage,this.storageKey,t),X(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async verifyOtp(e){try{let t,n;`options`in e&&(t=e.options?.redirectTo,n=e.options?.captchaToken);let{data:r,error:i}=await Z(this.fetch,`POST`,`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:n}}),redirectTo:t,xform:Np});if(i)throw i;if(!r)throw Error(`An error occurred on token verification.`);let a=r.session,o=r.user;return a?.access_token&&(await this._saveSession(a),await this._notifyAllSubscribers(e.type==`recovery`?`PASSWORD_RECOVERY`:`SIGNED_IN`,a)),this._returnResult({data:{user:o,session:a},error:null})}catch(e){if(X(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSSO(e){let t=null;try{let n=null,r=null;this.flowType===`pkce`&&([n,r,t]=await this._getCodeChallengeAndMethod());let i=await Z(this.fetch,`POST`,`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},`providerId`in e?{provider_id:e.providerId}:null),`domain`in e?{domain:e.domain}:null),{redirect_to:this._maybeAppendFlowIdToRedirect(e.options?.redirectTo,t)}),e?.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:n,code_challenge_method:r}),headers:this.headers,xform:Ip});return i.data?.url&&Uf()&&!e.options?.skipBrowserRedirect&&window.location.assign(i.data.url),this._returnResult(i)}catch(e){if(await mp(this.storage,this.storageKey,t),X(e))return this._returnResult({data:null,error:e});throw e}}async reauthenticate(){return await this.initializePromise,this.lock==null?await this._reauthenticate():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)throw n;if(!t)throw new hf;let{error:r}=await Z(this.fetch,`GET`,`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return this._returnResult({data:{user:null,session:null},error:r})})}catch(e){if(X(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){let t=null;try{let n=`${this.url}/resend`;if(`email`in e){let{email:r,type:i,options:a}=e,o=null,s=null;this.flowType===`pkce`&&([o,s,t]=await this._getCodeChallengeAndMethod());let{error:c}=await Z(this.fetch,`POST`,n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:a?.captchaToken}
23,code_challenge:o,code_challenge_method:s},redirectTo:this._maybeAppendFlowIdToRedirect(a?.emailRedirectTo,t)});return c&&await mp(this.storage,this.storageKey,t),this._returnResult({data:{user:null,session:null},error:c})}if(`phone`in e){let{phone:t,type:r,options:i}=e,{data:a,error:o}=await Z(this.fetch,`POST`,n,{headers:this.headers,body:{phone:t,type:r,gotrue_meta_security:{captcha_token:i?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a?.message_id},error:o})}throw new vf(`You must provide either an email or phone number and a type`)}catch(e){if(await mp(this.storage,this.storageKey,t),X(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async getSession(){return await this.initializePromise,this.lock==null?await this._useSession(async e=>e):await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e))}async _acquireLock(e,t){this._debug(`#_acquireLock`,`begin`,e);try{if(this.lockAcquired){let e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),n=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await n}catch{}})()),n}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug(`#_acquireLock`,`lock acquired for storage key`,this.storageKey);try{this.lockAcquired=!0;let e=t();for(this.pendingInLock.push((async()=>{try{await e}catch{}})()),await e;this.pendingInLock.length;){let e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}finally{this._debug(`#_acquireLock`,`lock released for storage key`,this.storageKey),this.lockAcquired=!1}})}finally{this._debug(`#_acquireLock`,`end`)}}async _useSession(e){this._debug(`#_useSession`,`begin`);try{return await e(await this.__loadSession())}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!`,Error().stack);try{let e=null,t=await Xf(this.storage,this.storageKey);if(this._debug(`#getSession()`,`session from storage`,t),t!==null&&(this._isValidSession(t)?e=t:(this._debug(`#getSession()`,`session from storage is not valid`),await this._removeSession())),!e)return{data:{session:null},error:null};let n=e.expires_at?e.expires_at*1e3-Date.now()<ef:!1;if(this._debug(`#__loadSession()`,`session has${n?``:` not`} expired`,`expires_at`,e.expires_at),!n){if(this.userStorage){let t=await Xf(this.userStorage,this.storageKey+`-user`);t?.user?e.user=t.user:e.user=Tp()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){let t={value:this.suppressGetSessionWarning};e.user=Ep(e.user,t),t.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}let{data:r,error:i}=await this._callRefreshToken(e.refresh_token);if(i){if(e.expires_at&&e.expires_at*1e3>Date.now()){let t=await Xf(this.storage,this.storageKey);if(t&&t.refresh_token===e.refresh_token)return this._returnResult({data:{session:e},error:null})}return this._returnResult({data:{session:null},error:i})}return this._returnResult({data:{session:r},error:null})}finally{this._debug(`#__loadSession()`,`end`)}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let t;return t=this.lock==null?await this._getUser():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()),t.data.user&&(this.suppressGetSessionWarning=!0),t}async _getUser(e){try{return e?await Z(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:e,xform:Fp}):await this._useSession(async e=>{let{data:t,error:n}=e;if(n)throw n;return!t.session?.access_token&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new hf}:await Z(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:t.session?.access_token??void 0,xform:Fp})})}catch(e){if(X(e))return gf(e)&&await this._removeSession(),this._returnResult({data:{user:null},error:e});throw e}}async updateUser(e,t={}){return await this.initializePromise,this.lock==null?await this._updateUser(e,t):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,t))}async _updateUser(e,t={}){let n=null;try{return await this._useSession(async r=>{let{data:i,error:a}=r;if(a)throw a;if(!i.session)throw new hf;let o=i.session,s=null,c=null;this.flowType===`pkce`&&e.email!=null&&([s,c,n]=await this._getCodeChallengeAndMethod());let{data:l,error:u}=await Z(this.fetch,`PUT`,`${this.url}/user`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(t?.emailRedirectTo,n),body:Object.assign(Object.assign({},e),{code_challenge:s,code_challenge_method:c}),jwt:o.access_token,xform:Fp});if(u)throw u;return o.user=l.user,await this._saveSession(o),await this._notifyAllSubscribers(`USER_UPDATED`,o),this._returnResult({data:{user:o.user},error:null})})}catch(e){if(await mp(this.storage,this.storageKey,n),X(e))return this._returnResult({data:{user:null},error:e});throw e}}async setSession(e){return await this.initializePromise,this.lock==null?await this._setSession(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new hf;let t=Date.now()/1e3,n=t,r=!0,i=null,{payload:a}=$f(e.access_token);if(a.exp&&(n=a.exp,r=n<=t),r){let{data:t,error:n}=await this._callRefreshToken(e.refresh_token);if(n)return this._returnResult({data:{user:null,session:null},error:n});if(!t)return{data:{user:null,session:null},error:null};i=t}else{let{data:r,error:a}=await this._getUser(e.access_token);if(a)return this._returnResult({data:{user:null,session:null},error:a});i={access_token:e.access_token,refresh_token:e.refresh_token,user:r.user,token_type:`bearer`,expires_in:n-t,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers(`SIGNED_IN`,i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(e){if(X(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}}async refreshSession(e){return await this.initializePromise,this.lock==null?await this._refreshSession(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{if(!e){let{data:n,error:r}=t;if(r)throw r;e=n.session??void 0}if(!e?.refresh_token)throw new hf;let{data:n,error:r}=await this._callRefreshToken(e.refresh_token);return r?this._returnResult({data:{user:null,session:null},error:r}):n?this._returnResult({data:{user:n.user,session:n},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(e){if(X(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _getSessionFromURL(e,t){try{if(!Uf())throw new yf(`No browser detected.`);if(e.error||e.error_description||e.error_code)throw new yf(e.error_description||`Error in URL with unspecified error_description`,{error:e.error||`unspecified_error`,code:e.error_code||`unspecified_code`});switch(t){case`implicit`:if(this.flowType===`pkce`)throw new xf(`Not a valid PKCE flow url.`);break;case`pkce`:if(this.flowType===`implicit`)throw new yf(`Not a valid implicit grant flow url.`)}if(t===`pkce`){if(this._debug(`#_initialize()`,`begin`,`is PKCE flow`,!0),!e.code)throw new xf(`No code detected.`);let{data:t,error:n}=await this._exchangeCodeForSession(e.code,{flowId:e[lf]});if(n)throw n;let r=new URL(window.location.href);return r.searchParams.delete(`code`),r.searchParams.delete(lf),window.history.replaceState(window.history.state,``,r.toString()),{data:{session:t.session,redirectType:t.redirectType??null},error:null}}let{provider_token:n,provider_refresh_token:r,access_token:i,refresh_token:a,expires_in:o,expires_at:s,token_type:c}=e;if(!i||!o||!a||!c)throw new yf(`No session defined in URL`);let l=Math.round(Date.now()/1e3),u=parseInt(o),d=l+u;s&&(d=parseInt(s));let f=d-l;
23f*1e3<=3e4&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${u}s`);let p=d-u;l-p>=120?console.warn(`@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale`,p,d,l):l-p<0&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew`,p,d,l);let{data:m,error:h}=await this._getUser(i);if(h)throw h;let g={provider_token:n,provider_refresh_token:r,access_token:i,expires_in:u,expires_at:d,refresh_token:a,token_type:c,user:m.user};return window.location.hash=``,this._debug(`#_getSessionFromURL()`,`clearing window.location.hash`),this._returnResult({data:{session:g,redirectType:e.type},error:null})}catch(e){if(X(e))return this._returnResult({data:{session:null,redirectType:null},error:e});throw e}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl==`function`?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){if(!e.code)return!1;let t=sp(e[lf]);return t&&await Xf(this.storage,lp(this.storageKey,t))?!0:!!await Xf(this.storage,`${this.storageKey}-code-verifier`)}async signOut(e={scope:`global`}){return await this.initializePromise,this.lock==null?await this._signOut(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:`global`}){return await this._useSession(async t=>{let n=async()=>{await this._removeSession()},{data:r,error:i}=t;if(i&&!gf(i))return this._returnResult({error:i});let a=r.session?.access_token;if(a){let{error:t}=await this.admin.signOut(a,e);if(t&&!(ff(t)&&(t.status===404||t.status===401||t.status===403)||gf(t)))return e!==`others`&&await n(),this._returnResult({error:t})}return e!==`others`&&await n(),this._returnResult({error:null})})}onAuthStateChange(e){let t=Hf(),n={id:t,callback:e,unsubscribe:()=>{this._debug(`#unsubscribe()`,`state change callback with id removed`,t),this.stateChangeEmitters.delete(t)}};return this._debug(`#onAuthStateChange()`,`registered callback with id`,t),this.stateChangeEmitters.set(t,n),(async()=>{await this.initializePromise,this.lock==null?await this._emitInitialSession(t):await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(t)})})(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async t=>{try{let{data:{session:n},error:r}=t;if(r)throw r;await this.stateChangeEmitters.get(e)?.callback(`INITIAL_SESSION`,n),this._debug(`INITIAL_SESSION`,`callback id`,e,`session`,n)}catch(t){await this.stateChangeEmitters.get(e)?.callback(`INITIAL_SESSION`,null),this._debug(`INITIAL_SESSION`,`callback id`,e,`error`,t),gf(t)||wf(t)||ff(t)&&(t.code===`refresh_token_not_found`||t.code===`refresh_token_already_used`||t.code===`session_expired`)?console.warn(t):console.error(t)}})}async resetPasswordForEmail(e,t={}){let n=null,r=null,i=null;this.flowType===`pkce`&&([n,r,i]=await this._getCodeChallengeAndMethod(!0));try{return await Z(this.fetch,`POST`,`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:r,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(t.redirectTo,i)})}catch(e){if(await mp(this.storage,this.storageKey,i),X(e))return this._returnResult({data:null,error:e});throw e}}async getUserIdentities(){try{let{data:e,error:t}=await this.getUser();if(t)throw t;return this._returnResult({data:{identities:e.user.identities??[]},error:null})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async linkIdentity(e){return`token`in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){let t=null;try{let{data:n,error:r}=await this._useSession(async n=>{let{data:r,error:i}=n;if(i)throw i;let{url:a,flowId:o}=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:e.options?.redirectTo,scopes:e.options?.scopes,queryParams:e.options?.queryParams,skipBrowserRedirect:!0});return t=o,await Z(this.fetch,`GET`,a,{headers:this.headers,jwt:r.session?.access_token??void 0})});if(r)throw r;return Uf()&&!e.options?.skipBrowserRedirect&&window.location.assign(n?.url),this._returnResult({data:{provider:e.provider,url:n?.url,flowId:t},error:null})}catch(n){if(X(n))return this._returnResult({data:{provider:e.provider,url:null,flowId:t},error:n});throw n}}async linkIdentityIdToken(e){return await this._useSession(async t=>{try{let{error:n,data:{session:r}}=t;if(n)throw n;let{options:i,provider:a,token:o,access_token:s,nonce:c}=e,{data:l,error:u}=await Z(this.fetch,`POST`,`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:r?.access_token??void 0,body:{provider:a,id_token:o,access_token:s,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:Np});return u?this._returnResult({data:{user:null,session:null},error:u}):!l||!l.session||!l.user?this._returnResult({data:{user:null,session:null},error:new _f}):(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers(`USER_UPDATED`,l.session)),this._returnResult({data:l,error:u}))}catch(e){if(await mp(this.storage,this.storageKey,null),X(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}})}async unlinkIdentity(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)throw r;return await Z(this.fetch,`DELETE`,`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:n.session?.access_token??void 0})})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _refreshAccessToken(e){let t=`#_refreshAccessToken()`;this._debug(t,`begin`);try{let n=Date.now();return await tp(async n=>(n>0&&await ep(200*2**(n-1)),this._debug(t,`refreshing attempt`,n),await Z(this.fetch,`POST`,`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Np})),(e,t)=>{let r=200*2**e;return t&&wf(t)&&Date.now()+r-n<3e4})}catch(e){if(this._debug(t,`error`,e),X(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}finally{this._debug(t,`end`)}}_isValidSession(e){return typeof e==`object`&&!!e&&`access_token`in e&&`refresh_token`in e&&`expires_at`in e}async _handleProviderSignIn(e,t){let{url:n,flowId:r}=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug(`#_handleProviderSignIn()`,`provider`,e,`options`,t,`url`,n),Uf()&&!t.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n,flowId:r},error:null}}async _recoverAndRefresh(){let e=`#_recoverAndRefresh()`;this._debug(e,`begin`);try{let t=await Xf(this.storage,this.storageKey);if(t&&this.userStorage){let e=await Xf(this.userStorage,this.storageKey+`-user`);!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!e&&(e={user:t.user},await Yf(this.userStorage,this.storageKey+`-user`,e)),t.user=e?.user??Tp()}else if(t&&!t.user&&!t.user){let e=await Xf(this.storage,this.storageKey+`-user`);e&&e?.user?(t.user=e.user,await Zf(this.storage,this.storageKey+`-user`),await Yf(this.storage,this.storageKey,t)):t.user=Tp()}if(this._debug(e,`session from storage`,t),!this._isValidSession(t)){this._debug(e,`session is not val
23id`),t!==null&&await this._removeSession();return}let n=(t.expires_at??1/0)*1e3-Date.now()<ef;if(this._debug(e,`session has${n?``:` not`} expired with margin of ${ef}s`),n){if(this.autoRefreshToken&&t.refresh_token){let{error:n}=await this._callRefreshToken(t.refresh_token);n&&(Ef(n)?this._debug(e,`refresh discarded by commit guard`,n):this._debug(e,`refresh failed`,n))}}else if(t.user&&t.user.__isUserNotAvailableProxy===!0)try{let{data:n,error:r}=await this._getUser(t.access_token);!r&&n?.user?(t.user=n.user,await this._saveSession(t),await this._notifyAllSubscribers(`SIGNED_IN`,t)):this._debug(e,`could not get user data, skipping SIGNED_IN notification`)}catch(t){console.error(`Error getting user data:`,t),this._debug(e,`error getting user data, skipping SIGNED_IN notification`,t)}else await this._notifyAllSubscribers(`SIGNED_IN`,t)}catch(t){this._debug(e,`error`,t),wf(t)?console.warn(t):console.error(t);return}finally{this._debug(e,`end`)}}async _callRefreshToken(e){var t,n;if(!e)throw new hf;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===e&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug(`#_callRefreshToken()`,`returning cached failure (cooldown active)`),this.lastRefreshFailure.result;let r=`#_callRefreshToken()`;this._debug(r,`begin`);try{this.refreshingDeferred=new Qf,this.refreshingDeferred.promise.then(void 0,()=>{});let t=await Xf(this.storage,this.storageKey),{data:n,error:i}=await this._refreshAccessToken(e);if(i)throw i;if(!n.session)throw new hf;let a=await Xf(this.storage,this.storageKey);if(t!==null&&(a===null||a.refresh_token!==t.refresh_token)){this._debug(r,`commit guard: storage changed since refresh started, discarding rotated tokens`,{startedWith:`present`,nowHolds:a?`replaced`:`cleared`});let e={data:null,error:new Tf};return this.refreshingDeferred.resolve(e),e}let o=this._sessionRemovalEpoch;if(await this._saveSession(n.session),this._sessionRemovalEpoch!==o){this._debug(r,`commit guard (post-save): _removeSession ran during _saveSession, undoing write`),await Zf(this.storage,this.storageKey),this.userStorage&&await Zf(this.userStorage,this.storageKey+`-user`);let e={data:null,error:new Tf};return this.refreshingDeferred.resolve(e),e}await this._notifyAllSubscribers(`TOKEN_REFRESHED`,n.session);let s={data:n.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(s),s}catch(i){if(this._debug(r,`error`,i),X(i)){let n={data:null,error:i};if(!wf(i)){let e=await Xf(this.storage,this.storageKey);e?.expires_at&&e.expires_at*1e3>Date.now()?this._debug(r,`proactive refresh failed, access token still valid â preserving session`):await this._removeSession()}return this.lastRefreshFailure={refreshToken:e,result:n,expiresAt:Date.now()+tf},(t=this.refreshingDeferred)==null||t.resolve(n),n}throw(n=this.refreshingDeferred)==null||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(r,`end`)}}async _notifyAllSubscribers(e,t,n=!0){if(this._pendingInitNotifications!==null&&n){this._pendingInitNotifications.push({event:e,session:t,broadcast:n});return}let r=`#_notifyAllSubscribers(${e})`;this._debug(r,`begin`,t,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:t});let r=[],i=Array.from(this.stateChangeEmitters.values()).map(async n=>{try{await n.callback(e,t)}catch(e){r.push(e)}});if(await Promise.all(i),r.length>0){for(let e=0;e<r.length;e+=1)console.error(r[e]);throw r[0]}}finally{this._debug(r,`end`)}}async _saveSession(e){this._debug(`#_saveSession()`,e),this.suppressGetSessionWarning=!0;let t=Object.assign({},e),n=t.user&&t.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&t.user&&await Yf(this.userStorage,this.storageKey+`-user`,{user:t.user});let e=Object.assign({},t);delete e.user;let r=Dp(e);await Yf(this.storage,this.storageKey,r)}else{let e=Dp(t);await Yf(this.storage,this.storageKey,e)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug(`#_removeSession()`),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Zf(this.storage,this.storageKey),await hp(this.storage,this.storageKey),await Zf(this.storage,this.storageKey+`-user`),this.userStorage&&await Zf(this.userStorage,this.storageKey+`-user`),await this._notifyAllSubscribers(`SIGNED_OUT`,null)}_removeVisibilityChangedCallback(){this._debug(`#_removeVisibilityChangedCallback()`);let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Uf()&&window!=null&&window.removeEventListener&&window.removeEventListener(`visibilitychange`,e)}
23catch(e){console.error(`removing visibilitychange callback failed`,e)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug(`#_startAutoRefresh()`);let e=setInterval(()=>this._autoRefreshTokenTick(),$d);this.autoRefreshTicker=e,e&&typeof e==`object`&&typeof e.unref==`function`?e.unref():typeof Deno<`u`&&typeof Deno.unrefTimer==`function`&&Deno.unrefTimer(e);let t=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=t,t&&typeof t==`object`&&typeof t.unref==`function`?t.unref():typeof Deno<`u`&&typeof Deno.unrefTimer==`function`&&Deno.unrefTimer(t)}async _stopAutoRefresh(){this._debug(`#_stopAutoRefresh()`);let e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);let t=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,t&&clearTimeout(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)==null||e.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug(`#_autoRefreshTokenTick()`,`begin`),this.lock!=null){try{await this._acquireLock(0,async()=>{try{let e=Date.now();try{return await this._useSession(async t=>{let{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at){this._debug(`#_autoRefreshTokenTick()`,`no session`);return}let r=Math.floor((n.expires_at*1e3-e)/$d);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${$d}ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(n.refresh_token)})}catch(e){console.error(`Auto refresh tick failed with error. This is likely a transient error.`,e)}}finally{this._debug(`#_autoRefreshTokenTick()`,`end`)}})}catch(e){if(e instanceof Up)this._debug(`auto refresh token tick lock not available`);else throw e}return}if(this.refreshingDeferred!==null){this._debug(`#_autoRefreshTokenTick()`,`refresh already in flight, skipping`);return}try{let e=Date.now();try{await this._useSession(async t=>{let{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at){this._debug(`#_autoRefreshTokenTick()`,`no session`);return}let r=Math.floor((n.expires_at*1e3-e)/$d);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${$d}ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(n.refresh_token)})}catch(e){console.error(`Auto refresh tick failed with error. This is likely a transient error.`,e)}}finally{this._debug(`#_autoRefreshTokenTick()`,`end`)}}async _handleVisibilityChange(){if(this._debug(`#_handleVisibilityChange()`),!Uf()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug(`#visibilityChangedCallback`,`error`,e)}},window==null||window.addEventListener(`visibilitychange`,this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error(`_handleVisibilityChange`,e)}}async _onVisibilityChanged(e){let t=`#_onVisibilityChanged(${e})`;if(this._debug(t,`visibilityState`,document.visibilityState),document.visibilityState===`visible`){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!==`visible`){this._debug(t,`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(t,`visibilityState is no longer visible, skipping recovery`);return}await this._recoverAndRefresh()}}else document.visibilityState===`hidden`&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,n){let r=n?.redirectTo,i=null,a=null,o=null;this.flowType===`pkce`&&([i,a,o]=await this._getCodeChallengeAndMethod(),r=this._maybeAppendFlowIdToRedirect(r,o));let s=[`provider=${encodeURIComponent(t)}`];if(r&&s.push(`redirect_to=${encodeURIComponent(r)}`),n?.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),i!=null&&a!=null){let e=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(a)}`});s.push(e.toString())}if(n?.queryParams){let e=new URLSearchParams(n.queryParams);s.push(e.toString())}return n?.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),{url:`${e}?${s.join(`&`)}`,flowId:o}}_maybeAppendFlowIdToRedirect(e,t){return!e||!t||!this.experimental.appendPkceFlowIdToRedirects?e??void 0:gp(e,t)}async _getCodeChallengeAndMethod(e=!1){return _p(this.storage,this.storageKey,e,e=>this._debug(`#_getCodeChallengeAndMethod()`,`evicted oldest pending PKCE verifier slot`,e))}async _unenroll(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;return r?this._returnResult({data:null,error:r}):await Z(this.fetch,`DELETE`,`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:n?.session?.access_token})})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _enroll(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType===`phone`?{phone:e.phone}:e.factorType===`totp`?{issuer:e.issuer}:{}),{data:a,error:o}=await Z(this.fetch,`POST`,`${this.url}/factors`,{body:i,headers:this.headers,jwt:n?.session?.access_token});return o?this._returnResult({data:null,error:o}):(e.factorType===`totp`&&a.type===`totp`&&a?.totp?.qr_code&&(a.totp.qr_code=`data:image/svg+xml;utf-8,${a.totp.qr_code}`),this._returnResult({data:a,error:null}))})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _verify(e){let t=async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=Object.assign({challenge_id:e.challengeId},`webauthn`in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type===`create`?nm(e.webauthn.credential_response):rm(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:o}=await Z(this.fetch,`POST`,`${this.url}/factors/${e.factorId}/verify`,{body:i,headers:this.headers,jwt:n?.session?.access_token});return o?this._returnResult({data:null,error:o}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers(`MFA_CHALLENGE_VERIFIED`,a),this._returnResult({data:a,error:o}))})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}};return this.lock==null?t():this._acquireLock(this.lockAcquireTimeout,t)}async _challenge(e){let t=async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=await Z(this.fetch,`POST`,`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:n?.session?.access_token});if(i.error)return i;let{data:a}=i;if(a.type!==`webauthn`)return{data:a,error:null};switch(a.webauthn.type){case`create`:return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:em(a.webauthn.credential_options.publicKey)})})}),error:null};case`request`:return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:tm(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}};return this.lock==null?t():this._acquireLock(this.lockAcquireTimeout,t)}async _challengeAndVerify(e){let{data:t,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){let{data:{user:e},error:t}=await this.getUser();if(t)return{data:null,error:t};let n={all:[],phone:[],totp:[],webauthn:[]};for(let t of e?.factors??[])n.all.push(t),t.status===`verified`&&n[t.factor_type].push(t);return{data:n,error:null}}async _getAuthenticatorAssuranceLevel(e){if(e)try{let{payload:t}=$f(e),n=null;t.aal&&(n=t.aal);let r=n,{data:{user:i},error:a}=await this.getUser(e);if(a)return this._returnResult({data:null,error:a});((i?.factors)?.filter(e=>e.status===`verified`)??[]).length>0&&(r=`aal2`);let o=t.amr||[];return{data:{currentLevel:n,nextLevel:r,currentAuthenticationMethods:o},error:null}}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}let{data:{session:t},error:n}
23=await this.getSession();if(n)return this._returnResult({data:null,error:n});if(!t)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};let{payload:r}=$f(t.access_token),i=null;r.aal&&(i=r.aal);let a=i;(t.user.factors?.filter(e=>e.status===`verified`)??[]).length>0&&(a=`aal2`);let o=r.amr||[];return{data:{currentLevel:i,nextLevel:a,currentAuthenticationMethods:o},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await Z(this.fetch,`GET`,`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new hf})})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _approveAuthorization(e,t){try{return await this._useSession(async n=>{let{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new hf});let a=await Z(this.fetch,`POST`,`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:r.access_token,body:{action:`approve`},xform:e=>({data:e,error:null})});return a.data&&a.data.redirect_url&&Uf()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _denyAuthorization(e,t){try{return await this._useSession(async n=>{let{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new hf});let a=await Z(this.fetch,`POST`,`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:r.access_token,body:{action:`deny`},xform:e=>({data:e,error:null})});return a.data&&a.data.redirect_url&&Uf()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _listOAuthGrants(){try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;return n?this._returnResult({data:null,error:n}):t?await Z(this.fetch,`GET`,`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new hf})})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?(await Z(this.fetch,`DELETE`,`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new hf})})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async fetchJwk(e,t={keys:[]}){let n=t.keys.find(t=>t.kid===e);if(n)return n;let r=Date.now();if(n=this.jwks.keys.find(t=>t.kid===e),n&&this.jwks_cached_at+6e5>r)return n;let{data:i,error:a}=await Z(this.fetch,`GET`,`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=r,n=i.keys.find(t=>t.kid===e),!n)?null:n}async getClaims(e,t={}){try{let n=e;if(!n){let{data:e,error:t}
23=await this.getSession();if(t||!e.session)return this._returnResult({data:null,error:t});n=e.session.access_token}let{header:r,payload:i,signature:a,raw:{header:o,payload:s}}=$f(n);if(!t?.allowExpired)try{bp(i.exp)}catch(e){throw new Of(e instanceof Error?e.message:`JWT validation failed`)}let c=!r.alg||r.alg.startsWith(`HS`)||!r.kid||!(`crypto`in globalThis&&`subtle`in globalThis.crypto)?null:await this.fetchJwk(r.kid,t?.keys?{keys:t.keys}:t?.jwks);if(!c){let{error:e}=await this.getUser(n);if(e)throw e;return{data:{claims:i,header:r,signature:a},error:null}}let l=xp(r.alg),u=await crypto.subtle.importKey(`jwk`,c,l,!0,[`verify`]);if(!await crypto.subtle.verify(l,u,a,zf(`${o}.${s}`)))throw new Of(`Invalid JWT signature`);return{data:{claims:i,header:r,signature:a},error:null}}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async signInWithPasskey(e){wp(this.experimental);try{if(!am())return this._returnResult({data:null,error:new pf(`Browser does not support WebAuthn`,null)});let{data:t,error:n}=await this._startPasskeyAuthentication({options:{captchaToken:e?.options?.captchaToken}});if(n||!t)return this._returnResult({data:null,error:n});let{data:r,error:i}=await sm({publicKey:tm(t.options),signal:e?.options?.signal??$p.createNewAbortSignal()});if(i||!r)return this._returnResult({data:null,error:i??new pf(`WebAuthn ceremony failed`,null)});let a=rm(r);return this._verifyPasskeyAuthentication({challengeId:t.challenge_id,credential:a})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async registerPasskey(e){wp(this.experimental);try{if(!am())return this._returnResult({data:null,error:new pf(`Browser does not support WebAuthn`,null)});let{data:t,error:n}=await this._startPasskeyRegistration();if(n||!t)return this._returnResult({data:null,error:n});let{data:r,error:i}=await om({publicKey:em(t.options),signal:e?.options?.signal??$p.createNewAbortSignal()});if(i||!r)return this._returnResult({data:null,error:i??new pf(`WebAuthn ceremony failed`,null)});let a=nm(r);return this._verifyPasskeyRegistration({challengeId:t.challenge_id,credential:a})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyRegistration(){wp(this.experimental);try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!t)return this._returnResult({data:null,error:new hf});let{data:r,error:i}=await Z(this.fetch,`POST`,`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:t.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){wp(this.experimental);try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new hf});let{data:i,error:a}=await Z(this.fetch,`POST`,`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyAuthentication(e){wp(this.experimental);try{let{data:t,error:n}=await Z(this.fetch,`POST`,`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:e?.options?.captchaToken}}});return n?this._returnResult({data:null,error:n}):this._returnResult({data:t,error:null})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyAuthentication(e){wp(this.experimental);try{let{data:t,error:n}=await Z(this.fetch,`POST`,`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:Np});return n?this._returnResult({data:null,error:n}):(t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(`SIGNED_IN`,t.session)),this._returnResult({data:t,error:null}))}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _listPasskeys(){wp(this.experimental);try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!t)return this._returnResult({data:null,error:new hf});let{data:r,error:i}=await Z(this.fetch,`GET`,`${this.url}/passkeys`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){wp(this.experimental);try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new hf});let{data:i,error:a}=await Z(this.fetch,`PATCH`,`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:e.friendlyName}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _deletePasskey(e){wp(this.experimental);try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new hf});let{error:i}=await Z(this.fetch,`DELETE`,`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}};_m.nextInstanceID={};var vm=_m,ym=`2.112.4`,bm=``,xm;if(typeof Deno<`u`)bm=`deno`,xm=Deno.version?.deno;else if(typeof document<`u`)bm=`web`;else if(typeof navigator<`u`&&navigator.product===`ReactNative`)bm=`react-native`;else{var Sm;bm=`node`;let e=globalThis.process;xm=e==null||(Sm=e.version)==null?void 0:Sm.replace(/^v/,``)}var Cm=[`runtime=${bm}`];xm&&Cm.push(`runtime-version=${xm}`);var wm={headers:{"X-Client-Info":`supabase-js/${ym}; ${Cm.join(`; `)}`}},Tm={schema:`public`},Em={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:`implicit`},Dm={},Om={enabled:!1,respectSamplingDecision:!0};function km(e){if(!e||typeof e!=`string`)return null;let t=e.split(`-`);if(t.length!==4)return null;let[n,r,i,a]=t;if(n.length!==2||r.length!==32||i.length!==16||a.length!==2)return null;let o=/^[0-9a-f]+$/i;return!o.test(n)||!o.test(r)||!o.test(i)||!o.test(a)||r===`00000000000000000000000000000000`||i===`0000000000000000`?null:{version:n,traceId:r,parentId:i,traceFlags:a,isSampled:(parseInt(a,16)&1)==1}}function Am(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(let e of t)try{if(typeof e==`string`){if(jm(n.hostname,e))return!0}
23else if(e instanceof RegExp){if(e.test(n.hostname))return!0}else if(typeof e==`function`&&e(n))return!0}catch{continue}return!1}function jm(e,t){if(t===e)return!0;if(t.startsWith(`*.`)){let n=t.slice(2);if(e.endsWith(n)&&(e===n||e.endsWith(`.`+n)))return!0}return!1}function Mm(e){let t=[];try{let 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 Nm(e){"@babel/helpers - typeof";return Nm=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Nm(e)}function Pm(e,t){if(Nm(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Nm(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Fm(e){var t=Pm(e,`string`);return Nm(t)==`symbol`?t:t+``}function Im(e,t,n){return(t=Fm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Lm(Object(n),!0).forEach(function(t){Im(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var zm=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),Bm=()=>Headers,Vm=e=>e.startsWith(`sb_publishable_`)||e.startsWith(`sb_secret_`),Hm=`sb_temp_`,Um=new Set,Wm=e=>{if(!e.startsWith(`sb_`)||Vm(e)||e.startsWith(Hm))return;let t=e.match(/^sb_[a-zA-Z0-9]+_/)?.[0]??`unknown`;Um.has(t)||(Um.add(t),console.warn(`@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is; if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type.`))},Gm=(e,t,n,r,i,a)=>{let o=zm(r),s=Bm(),c=i?.enabled===!0,l=i?.respectSamplingDecision!==!1,u=c?Mm(t):null,d=!(a?.omitApiKeyAsBearer&&Vm(e));return async(t,r)=>{let i=await n(),a=new s(r?.headers);if(a.has(`apikey`)||a.set(`apikey`,e),!a.has(`Authorization`)){let t=i??(d?e:null);t&&a.set(`Authorization`,`Bearer ${t}`)}if(u){let e=Jm(t,u,l);e&&(e.traceparent&&!a.has(`traceparent`)&&a.set(`traceparent`,e.traceparent),e.tracestate&&!a.has(`tracestate`)&&a.set(`tracestate`,e.tracestate),e.baggage&&!a.has(`baggage`)&&a.set(`baggage`,e.baggage))}return o(t,Rm(Rm({},r),{},{headers:a}))}},Km=!1,qm=!1;function Jm(e,t,n){let r=fl();if(!r)return Km||(Km=!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(!Am(typeof e==`string`||e instanceof URL?e:e.url,t))return null;let i=r();if(!i||!i.traceparent){var a;if(i!=null&&(a=i.carrierKeys)!=null&&a.length&&!qm){qm=!0;let e=i.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 [${i.carrierKeys.join(`, `)}] and no W3C traceparent header, so trace headers will not be attached.`+e)}return null}if(n){let e=km(i.traceparent);if(e&&!e.isSampled)return{traceparent:i.traceparent}}return i}function Ym(e){return typeof e==`boolean`?{enabled:e}:e}function Xm(e){return e.endsWith(`/`)?e:e+`/`}function Zm(e,t){let{db:n,auth:r,realtime:i,global:a}=e,{db:o,auth:s,realtime:c,global:l}=t,u=Ym(e.tracePropagation),d=Ym(t.tracePropagation),f={db:Rm(Rm({},o),n),auth:Rm(Rm({},s),r),realtime:Rm(Rm({},c),i),storage:{},global:Rm(Rm(Rm({},l),a),{},{headers:Rm(Rm({},l?.headers??{}),a?.headers??{})}),tracePropagation:{enabled:u?.enabled??d?.enabled??!1,respectSamplingDecision:u?.respectSamplingDecision??d?.respectSamplingDecision??!0},accessToken:async()=>``};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function Qm(e){let t=e?.trim();if(!t)throw Error(`supabaseUrl is required.`);if(!t.match(/^https?:\/\//i))throw Error(`Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.`);try{return new URL(Xm(t))}catch{throw Error(`Invalid supabaseUrl: Provided URL is malformed.`)}}var $m=class extends vm{constructor(e){super(e)}},eh=class{constructor(e,t,n){this.supabaseUrl=e,this.supabaseKey=t;let r=Qm(e);if(!t)throw Error(`supabaseKey is required.`);Wm(t),this.realtimeUrl=new URL(`realtime/v1`,r),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace(`http`,`ws`),this.authUrl=new URL(`auth/v1`,r),this.storageUrl=new URL(`storage/v1`,r),this.functionsUrl=new URL(`functions/v1`,r);let i=`sb-${r.hostname.split(`.`)[0]}-auth-token`,a={db:Tm,realtime:Dm,auth:Rm(Rm({},Em),{},{storageKey:i}),global:wm,tracePropagation:Om},o=Zm(n??{},a);this.settings=o,this.storageKey=o.auth.storageKey??``,this.headers=o.global.headers??{},o.accessToken?(this.accessToken=o.accessToken,this.auth=new Proxy({},{get:(e,t)=>{throw Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(t)} is not possible`)}})):this.auth=this._initSupabaseAuthClient(o.auth??{},this.headers,o.global.fetch),this.fetch=Gm(t,e,this._getSessionToken.bind(this),o.global.fetch,o.tracePropagation),this.functionsFetch=Gm(t,e,this._getSessionToken.bind(this),o.global.fetch,o.tracePropagation,{omitApiKeyAsBearer
23:!0}),this.realtime=this._initRealtimeClient(Rm({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},o.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(e=>this.realtime.setAuth(e)).catch(e=>console.warn(`Failed to set initial Realtime auth token:`,e)),this.rest=new Vl(new URL(`rest/v1`,r).href,{headers:this.headers,schema:o.db.schema,fetch:this.fetch,timeout:o.db.timeout,urlLengthLimit:o.db.urlLengthLimit,retry:o.db.retry}),this.storage=new Zd(this.storageUrl.href,this.headers,this.fetch,n?.storage),o.accessToken||this._listenForAuthEvents()}get functions(){return new Sl(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;if(e.accessToken)return await e.accessToken();let{data:t}=await e.auth.getSession();return t.session?.access_token??null}async _getAccessToken(){var e=this;return await e._getSessionToken()??e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,storageKey:a,flowType:o,lock:s,debug:c,throwOnError:l,experimental:u,lockAcquireTimeout:d,skipAutoInitialize:f},p,m){let h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new $m({url:this.authUrl.href,headers:Rm(Rm({},h),p),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,flowType:o,lock:s,debug:c,throwOnError:l,experimental:u,fetch:m,lockAcquireTimeout:d,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(e=>e.toLowerCase()===`authorization`)})}_initRealtimeClient(e){return new $u(this.realtimeUrl.href,Rm(Rm({},e),{},{params:Rm(Rm({},{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)}},th=(e,t,n)=>new eh(e,t,n);function nh(){if(typeof window<`u`||globalThis.Deno!==void 0)return!1;let e=globalThis.process;if(!e)return!1;let t=e.version;if(t==null)return!1;let n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=20:!1}nh()&&console.warn(`â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715`);function rh(){if(typeof window>`u`)return;let e=location.hostname,t=[`lovableproject.com`,`lovableproject-dev.com`,`lovable.app`,`gpt-eng.com`,`gptengineer.run`].some(t=>e===t||e.endsWith(`.`+t))?e.match(RegExp(`^(?:id-preview(?:-[a-z0-9]+)?|project)--([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:-dev)?(?=\\.|$)`,`i`))?.[1]??e.match(RegExp(`^([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?=[.-])`,`i`))?.[1]:void 0,n=window.parent&&window.parent!==window;if(!t||!n)return localStorage;let r=e.endsWith(`.lovableproject-dev.com`)||e.endsWith(`.gpt-eng.com`),i=r?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,a=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:``),o=a&&i.test(a)?[a]:r?[`https://lovable.dev`,`http://localhost:3000`]:[`https://lovable.dev`],s=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),c=(e,n,r)=>new Promise(i=>{let a=s(),c=!1,l,u=e=>{c||(c=!0,clearTimeout(l),window.removeEventListener(`message`,d),i(e))},d=e=>{if(o.indexOf(e.origin)<0)return;let t=e.data;t&&t.type===`lovable-preview-auth:result`&&t.requestId===a&&u(t)}
23;window.addEventListener(`message`,d);let f={type:e,requestId:a,projectId:t,key:n};r!==void 0&&(f.value=r);for(let e of o)window.parent.postMessage(f,e);l=setTimeout(()=>u(null),2e3)}),l=!0;return{getItem:async e=>{let t=await c(`lovable-preview-auth:get`,e);return!t&&l&&(await new Promise(e=>setTimeout(e,250)),t=await c(`lovable-preview-auth:get`,e)),l=!1,t&&t.ok&&typeof t.value==`string`?t.value===``?(localStorage.removeItem(e),null):t.value:localStorage.getItem(e)},setItem:(e,t)=>(localStorage.setItem(e,t),c(`lovable-preview-auth:set`,e,t).then(n=>{n&&n.ok&&typeof n.value==`string`&&localStorage.getItem(e)===t&&(n.value===``?localStorage.removeItem(e):localStorage.setItem(e,n.value))})),removeItem:e=>(localStorage.removeItem(e),c(`lovable-preview-auth:remove`,e).then(()=>void 0))}}function ih(e){return e.startsWith(`sb_publishable_`)||e.startsWith(`sb_secret_`)}function ah(e){return(t,n)=>{let r=new Headers(typeof Request<`u`&&t instanceof Request?t.headers:void 0);return n?.headers&&new Headers(n.headers).forEach((e,t)=>r.set(t,e)),ih(e)&&r.get(`Authorization`)===`Bearer ${e}`&&r.delete(`Authorization`),r.set(`apikey`,e),fetch(t,{...n,headers:r})}}function oh(){let e={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,TSS_DEV_SERVER:`false`,TSS_DEV_SSR_STYLES_BASEPATH:`/`,TSS_DEV_SSR_STYLES_ENABLED:`true`,TSS_DISABLE_CSRF_MIDDLEWARE_WARNING:`false`,TSS_INLINE_CSS_ENABLED:`false`,TSS_ROUTER_BASEPATH:``,TSS_SERVER_FN_BASE:`/_serverFn/`,VITE_SUPABASE_PROJECT_ID:`nclfhzxomheanehoubyq`,VITE_SUPABASE_PUBLISHABLE_KEY:`sb_publishable_smiQau_9kS5d-8XlEm9fmA_ehoWJz5P`,VITE_SUPABASE_URL:`https://nclfhzxomheanehoubyq.supabase.co`}.VITE_SUPABASE_URL||{}.SUPABASE_URL,t={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,TSS_DEV_SERVER:`false`,TSS_DEV_SSR_STYLES_BASEPATH:`/`,TSS_DEV_SSR_STYLES_ENABLED:`true`,TSS_DISABLE_CSRF_MIDDLEWARE_WARNING:`false`,TSS_INLINE_CSS_ENABLED:`false`,TSS_ROUTER_BASEPATH:``,TSS_SERVER_FN_BASE:`/_serverFn/`,VITE_SUPABASE_PROJECT_ID:`nclfhzxomheanehoubyq`,VITE_SUPABASE_PUBLISHABLE_KEY:`sb_publishable_smiQau_9kS5d-8XlEm9fmA_ehoWJz5P`,VITE_SUPABASE_URL:`https://nclfhzxomheanehoubyq.supabase.co`}.VITE_SUPABASE_PUBLISHABLE_KEY||{}.SUPABASE_PUBLISHABLE_KEY;if(!e||!t){let n=`Missing Supabase environment variable(s): ${[...e?[]:[`SUPABASE_URL`],...t?[]:[`SUPABASE_PUBLISHABLE_KEY`]].join(`, `)}. Connect Supabase in Lovable Cloud.`;throw console.error(`[Supabase] ${n}`),Error(n)}return th(e,t,{global:{fetch:ah(t)},auth:{storage:rh(),persistSession:!0,autoRefreshToken:!0}})}var sh,ch=new Proxy({},{get(e,t,n){return sh||=oh(),Reflect.get(sh,t,n)}}),lh=cl({type:`function`}).client(async({next:e})=>{let{data:t}=await ch.auth.getSession(),n=t.session?.access_token;return e({headers:n?{Authorization:`Bearer ${n}`}:{}})}),uh=cl(),dh=void 0,fh=ul(()=>({functionMiddleware:[lh],requestMiddleware:[uh,dh]})),ph=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(){}},mh=new class extends ph{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},hh={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},gh=new class{#e=hh;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function _h(e){setTimeout(e,0)}var vh=typeof window>`u`||`Deno`in globalThis;function yh(){}function bh(e,t){return typeof e==`function`?e(t):e}function xh(e){return typeof e==`number`&&e>=0&&e!==1/0}function Sh(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ch(e,t){return typeof e==`function`?e(t):e}function wh(e,t){return typeof e==`function`?e(t):e}function Th(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Dh(o,t.options))return!1}else if(!kh(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Eh(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Oh(t.options.mutationKey)!==Oh(a))return!1}else if(!kh(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Dh(e,t){return(t?.queryKeyHashFn||Oh)(e)}function Oh(e){return JSON.stringify(e,(e,t)=>Nh(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function kh(e,t){if(e===t)return!0;
23if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!kh(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!kh(e[r],t[r]))return!1;return!0}return!1}var Ah=Object.prototype.hasOwnProperty;function jh(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Mh(e)&&Mh(t);if(!r&&!(Nh(e)&&Nh(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Ah.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=jh(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Mh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Nh(e){if(!Ph(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Ph(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Ph(e){return Object.prototype.toString.call(e)===`[object Object]`}function Fh(e){return new Promise(t=>{gh.setTimeout(t,e)})}function Ih(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:jh(e,t)}function Lh(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Rh(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var zh=Symbol();function Bh(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===zh?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Vh(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Hh=(()=>{let e=()=>vh;return{isServer(){return e()},setIsServer(t){e=t}}})();function Uh(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Wh=_h;function Gh(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Wh,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Kh=Gh(),qh=new class extends ph{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let 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.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Jh(e){return Math.min(1e3*2**e,3e4)}function Yh(e){return(e??`online`)!==`online`||qh.isOnline()}var Xh=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Zh(e){let t=!1,n=0,r,i=Uh(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Xh(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>mh.isFocused()&&(e.networkMode===`always`||qh.isOnline())&&e.canRun(),u=()=>Yh(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Hh.isServer()?0:3),o=e.retryDelay??Jh,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),Fh(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Qh=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xh(this.gcTime)&&(this.#e=gh.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Hh.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(gh.clearTimeout(this.#e),this.#e=void 0)}};function $h(e){return{onFetch:(t,n)=>
23{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Vh(e,()=>t.signal,()=>n=!0)},u=Bh(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?Rh:Lh;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?tg:eg,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:eg(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function eg(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function tg(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var ng=class extends Qh{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=ag(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=ag(this.options);e.data!==void 0&&(this.setState(ig(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Ih(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(yh).catch(yh):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>wh(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===zh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>Ch(e.options.staleTime,this)===`static`)}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:!Sh(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.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.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)}
23)},i=()=>{let e=Bh(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?$h(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=Zh({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Xh&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Xh){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...rg(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...ig(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Kh.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function rg(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Yh(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function ig(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ag(e){let 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 og=class extends Qh{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||sg(),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.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Zh({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});
vendor: 2,869 bytes, line 23
23let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,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{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Kh.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function sg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var cg=class extends ph{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new og({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=lg(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=lg(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=lg(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=lg(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>
23t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Kh.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Eh(t,e))}findAll(e={}){return this.getAll().filter(t=>Eh(e,t))}notify(e){Kh.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Kh.batch(()=>Promise.all(e.map(e=>e.continue().catch(yh))))}};function lg(e){return e.options.scope?.id}var ug=class extends ph{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Dh(r,t),a=this.get(i);return a||(a=new ng({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Kh.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Th(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Th(e,t)):t}notify(e){Kh.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Kh.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Kh.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},dg=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new ug,this.#t=e.mutationCache||new cg,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=mh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=qh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ch(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=bh(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Kh.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Kh.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Kh.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Kh.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(yh).catch(yh)}invalidateQueries(e,t={}){return Kh.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Kh.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(yh)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(yh)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Ch(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(yh).catch(yh)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(yh).catch(yh)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return qh.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Oh(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{kh(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Oh(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{kh(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Dh(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===zh&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},fg=F.createContext(void 0),pg=({client:e,children:t})=>(F.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,I.jsx)(fg.Provider,{value:e,children:t})),mg=`/assets/styles-BUKstve1.css`;function hg(e,t={}){if(typeof window>`u`)return;window.__lovableEvents?.captureException?.(e,{source:`react_error_boundary`,route:window.location.pathname,...t},{mechanism:`react_error_boundary`,handled:!1,severity:`error`});let n=e instanceof Response?`Response ${e.status}${e.url?` at ${e.url}`:``}`:e instanceof Error?e.message:String(e),r=e instanceof Error?e.stack:void 0;window.__lovableReportRuntimeError?.({message:n,...r!==void 0&&{stack:r},filename:window.location.pathname})}function gg(e,t={}){if(typeof window>`u`)return;let n=window;typeof n.gtag==`function`&&n.gtag(`event`,e,t)}var _g={fleet:[1920,850],crew:[1920,850],vanCloseup:[1920,850],vansHouse:[
231920,695],vanCrop:[880,1217],techInDuct:[1920,1348],techDrywall:[1920,850],scaffoldGym:[1920,850],ductDirty:[1920,1006],ductInterior:[1920,850],hoodClean:[1920,850],moldFraming:[1920,850],moldWall:[1920,850],utilityCloset:[1920,850],ceilingLadder:[1920,695],dehumidifier:[1920,850],checkeredBath:[1920,850],crewAlamo:[1280,414],techCeilingCut:[1920,1434],fleetAirMovers:[1280,853],hepaRestaurant:[1920,1440],bathDemo:[1920,1434],containmentNegAir:[1114,743],moldPipe:[1440,1920],techContainmentHome:[1920,1440],hardwoodPulledDehu:[1920,1440],containmentLivingRoom:[1920,1222],airMoverCarpet:[1920,1011],airMoverWallCut:[1920,1440],studsDemoDehu:[1440,1920],moldBaseboardTile:[1440,1920],containmentNegAirPoles:[1440,1920],containmentDoNotEnter:[1440,1920],deconEntryDorm:[1440,1920],corridorDuctCollapse:[1440,1920],corridorBarrierTeal:[1440,1920],corridorBarrierGray:[1440,1920],hvacTechLadder:[1440,1920],hvacTwoTechs:[1440,1920],vanInterior:[1200,903],hoodBeforeAfter:[600,385],moldPlumbingWall:[1400,1045],containmentSpray:[600,800],scaffoldGymSmall:[600,596],moldFramingSmall:[400,300],closetBeforeAfter:[953,632],drywallCut:[600,448],ductDust:[800,590],flexDuct:[400,533],flir:[600,800],wallOpenedDehu:[360,480],studsAirMover:[633,845],dehuRug:[1600,1200],airMoverHall:[480,640],dehuWindow:[633,845],guttedBath:[1600,1200],moistureMeter:[1600,1200],hoodFanBefore:[1600,2133],hoodFanAfter:[1600,2133],hoodInteriorBefore:[1600,2133],hoodInteriorAfter:[1600,1200],exhaustBefore:[1600,2133],exhaustAfter:[1600,2133],ductRiserBefore:[1600,2133],ductRiserAfter:[1600,2133],stockCarpet:[1920,2560],stockOdor:[1920,1888],stockCrawlspace:[1920,1280],stockLaundryRoom:[1920,1280],stockLaundromat:[1920,1273],stockHotelCart:[1920,2880],stockHotelCorridor:[1920,2880],stockHardwood:[1920,1280],stockLivingRoom:[1920,2880]},vg=`(210) 982-0647`,yg=`tel:+12109820647`,bg=`(210) 349-1500`,xg=`tel:+12103491500`,Sg=`[email protected]`,Cg=`https://www.bbb.org/us/tx/san-antonio/profile/fire-water-damage-restoration/fire-water-restoration-0825-13102`,wg=`https://facebook.com/profile.php?id=61563231393066`,Tg=`https://www.enhancify.com/wwwfreshairsacom`,Eg=`https://maps.google.com/?cid=8460514833358183155`,Dg=`https://www.google.com/maps/dir/?api=1&destination=2418+Basse+Rd,+San+Antonio,+TX+78213`,Og={name:`Fresh Air Restoration & Cleaning`,legal:`Sanitary Air, Inc. DBA Fresh Air Restoration & Cleaning`,street:`2418 Basse Rd`,city:`San Antonio`,state:`TX`,zip:`78213`,founded:1991,moldCompanyLicense:`TDLR Mold Remediation Company #RCO0176`,moldContractorLicense:`TDLR Mold Remediation Contractor #MRC0212`},kg=[{label:`Mold`,items:[{label:`Mold Inspection`,to:`/mold-inspection`},{label:`Mold Remediation`,to:`/mold-remediation`},{label:`Air Duct Mold Removal`,to:`/air-duct-mold-removal`}]},{label:`Water & Structure`,items:[{label:`Water Damage Restoration`,to:`/water-damage-restoration`},{label:`Structural Damage Repair`,to:`/structural-damage-repair`},{label:`Rebuilding & Repair`,to:`/rebuilding-and-repair-services`}]},{label:`Air Quality`,items:[{label:`Air Duct Cleaning`,to:`/air-duct-cleaning`},{label:`HVAC Plenum Cleaning`,to:`/hvac-plenum-cleaning`},{label:`HVAC UV Light Installation`,to:`/hvac-uv-light-installation`}]},{label:`Cleaning`,items:[{label:`Carpet & Area Rug Cleaning`,to:`/carpet-floor-cleaning`},{label:`Hard Floor Cleaning`,to:`/hard-floor-cleaning`},{label:`Odor Removal`,to:`/odor-removal`},{label:`Chimney & Dryer Vent Cleaning`,to:`/chimney-dryer-vent-cleaning`},{label:`Dead Animal Removal`,to:`/dead-animal-removal`}]}],Ag=[{label:`Commercial Overview`,to:`/commercial`},{label:`Commercial Mold Inspection`,to:`/commercial-mold-inspection`},{label:`Commercial Mold Remediation`,to:`/commercial-mold-remediation`},{label:`Commercial Water Damage Restoration`,to:`/commercial-water-damage-restoration`},{label:`Commercial Air Duct Cleaning`,to:`/commercial-air-duct-cleaning`},{label:`Commercial Dryer Vent Cleaning`,to:`/commercial-dryer-vent-duct-cleaning`},{label:`Kitchen Vent Hood Cleaning`,to:`/commercial-kitchen-vent-hood-cleaning`},{label:`Laundry Exhaust Duct Cleaning`,to:`/commercial-laundry-exhaust-duct-cleaning`},{label:`Commercial Odor Removal`,to:`/commercial-odor-removal`},{label:`Facility Care Program`,to:`/facility-care-program`}],jg=[{label:`Services`,to:`/water-damage-restoration`,groups:kg},{label:`Commercial`,to:`/commercial`,children:Ag}
23,{label:`Rebuild & Repair`,shortLabel:`Rebuild`,to:`/rebuilding-and-repair-services`},{label:`Major Projects`,shortLabel:`Projects`,to:`/major-projects`},{label:`About`,to:`/about`},{label:`Reviews`,to:`/reviews`},{label:`Contact`,to:`/contact`}],Mg=[`Water Damage Restoration`,`Mold Inspection`,`Mold Remediation`,`Air Duct Cleaning & Sanitizing`,`HVAC Plenum / UV Light`,`Carpet, Rug & Hard Floor`,`Odor & Dead Animal Removal`,`Structural Damage Repair`,`Commercial`],Ng=`San Antonio.Alamo Heights.Castle Hills.Terrell Hills.Hollywood Park.Hill Country Village.Shavano Park.Leon Valley.Kirby.Windcrest.Converse.Universal City.Live Oak.Selma.Schertz.Cibolo.Garden Ridge.Timberwood Park.Helotes.Boerne.Fair Oaks Ranch.Bulverde.Spring Branch.Canyon Lake.New Braunfels.Seguin.Floresville.La Vernia.Elmendorf.Castroville.Lytle.Devine.Pleasanton.Bandera.Comfort.San Marcos.Kyle.Wimberley`.split(`.`),Pg=[`AT&T`,`HEB`,`VA`,`Fort Sam Houston`,`Lackland AFB`,`City of San Antonio`,`Bexar County`,`UTSA`],Fg=`https://freshairsa.com`;function Ig(e){return/^https?:\/\//.test(e)?e:`${Fg}${e}`}function Lg(e){let t=ge[e]?.src;if(!t)return[];let n=Ig(t),r=[{property:`og:image`,content:n},{name:`twitter:image`,content:n}],i=_g[e];return i&&(r.push({property:`og:image:width`,content:String(i[0])}),r.push({property:`og:image:height`,content:String(i[1])})),r}var Rg={services:{name:`Services`,path:`/water-damage-restoration`},commercial:{name:`Commercial`,path:`/commercial`},blog:{name:`Blog`,path:`/blog`},"serving-area":{name:`Serving Area`,path:`/serving-area`}};function zg({name:e,path:t,section:n}){let r=[{name:`Home`,path:`/`}];return n&&r.push(Rg[n]),r.push({name:e,path:t}),{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`BreadcrumbList`,itemListElement:r.map((e,t)=>({"@type":`ListItem`,position:t+1,name:e.name,item:`${Fg}${e.path}`}))})}}function Bg({title:e,description:t,image:n,imageKey:r,path:i,breadcrumb:a,section:o}){let s=[{title:e},{name:`description`,content:t},{property:`og:title`,content:e},{property:`og:description`,content:t},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary_large_image`}];r?s.push(...Lg(r)):n?(s.push({property:`og:image`,content:Ig(n)}),s.push({name:`twitter:image`,content:Ig(n)})):s.push(...Lg(`fleet`));let c=a&&i?[zg({name:a,path:i,...o?{section:o}:{}})]:[];if(i!==void 0){let e=`${Fg}${i===`/`?``:i}`;return s.push({property:`og:url`,content:e}),{meta:s,links:[{rel:`canonical`,href:e}],scripts:c}}return{meta:s,scripts:c}}function Vg({title:e,description:t,service:n,path:r,areaCommercial:i}){let a=`${Fg}${r}`,o=me[r]?.hero,s=Bg({title:e,description:t,path:r,breadcrumb:n,section:r.startsWith(`/commercial`)||r===`/facility-care-program`?`commercial`:`services`,...o?{imageKey:o}:{}});return{...s,links:[{rel:`canonical`,href:a}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`Service`,name:n,serviceType:n,description:t,url:a,provider:{"@type":`LocalBusiness`,name:Og.name,legalName:Og.legal,telephone:`+1-210-982-0647`,address:{"@type":`PostalAddress`,streetAddress:Og.street,addressLocality:Og.city,addressRegion:Og.state,postalCode:Og.zip,addressCountry:`US`}},areaServed:i?[`San Antonio`,`Bexar County`,`South Texas`,`Corpus Christi`,`Rio Grande Valley`]:[`San Antonio`,`Bexar County`,`Texas Hill Country`]})},...s.scripts]}}var Hg=[{id:`g1`,text:`Fresh Air worked quickly and professionally to remove water-soaked sheetrock, carpets, and baseboards after pipes broke during the big freeze. Despite high demand for his services, Chris went above and beyond to help us document damage â we didn't know how to do this. His team was polite, always on time, and they cleaned up after themselves. I highly recommend this company.`},{id:`g2`,text:`Fresh Air helped me with my flooding event. They came within an hour and got to work to help save the house. They did great follow up work and worked with my work schedule too. Thank you Alex, Chris, Tammy and Juan for coming out so quickly and the quality work!`},{id:`g3`,text:`I had a great experience with Fresh Air! They took care of a mold problem for me, and are helping my parents next. They are very inexpensive, extremely professional, and trustworthy. Air quality is very important and I have been having physical symptoms for months.`},{id:`g4`,text:`Chris and Team did a fantastic job. This is the second time that we have used their services. We can definitely breathe better in our home and rental property.`},{id:`g5`,text:`We have worked with Chris on multiple cleanups. Their crew does great work, clean and safe jobsites. We enjoy working with these guys!`}],Ug=(...e)=>
23e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Wg=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Gg=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Kg=e=>{let t=Gg(e);return t.charAt(0).toUpperCase()+t.slice(1)},qg={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`},Jg=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Yg=(0,F.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,F.createElement)(`svg`,{ref:c,...qg,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ug(`lucide`,i),...!a&&!Jg(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,F.createElement)(e,t)),...Array.isArray(a)?a:[a]])),Xg=(e,t)=>{let n=(0,F.forwardRef)(({className:n,...r},i)=>(0,F.createElement)(Yg,{ref:i,iconNode:t,className:Ug(`lucide-${Wg(Kg(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Kg(e),n},Zg=Xg(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Qg=Xg(`clipboard-check`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`m9 14 2 2 4-4`,key:`df797q`}]]),$g=Xg(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),e_=Xg(`map-pin`,[[`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`}]]),t_=Xg(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),n_=Xg(`phone`,[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]),r_=Xg(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),i_=Object.defineProperty,a_=(e,t)=>i_(e,`name`,{value:t,configurable:!0});function o_(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}a_(o_,`setRef`);function s_(...e){return t=>{let n=!1,r=e.map(e=>{let r=o_(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():o_(e[t],null)}}}}a_(s_,`composeRefs`);function c_(...e){return F.useCallback(s_(...e),e)}a_(c_,`useComposedRefs`);var l_=Object.defineProperty,u_=(e,t)=>l_(e,`name`,{value:t,configurable:!0});function d_(e){let t=F.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];b_(r)&&typeof w_==`function`&&(r=w_(r._payload)),F.Children.forEach(r,e=>{if(v_(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;b_(n)&&typeof w_==`function`&&(n=w_(n._payload)),a=h_(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=F.cloneElement(a,void 0,s):!o&&F.Children.count(r)===1&&F.isValidElement(r)&&(a=r);let c=a?__(a):void 0,l=c_(n,c);if(!a){if(r||r===0)throw Error(o?C_(e):S_(e));return r}let u=g_(i,a.props??{});return a.type!==F.Fragment&&(u.ref=n?l:c),F.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}u_(d_,`createSlot`);var f_=d_(`Slot`),p_=Symbol.for(`radix.slottable`);function m_(e){let t=u_(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=p_,t}u_(m_,`createSlottable`);var h_=u_((e,t)=>{if(`child`in e.props){let t=e.props.child;return F.isValidElement(t)?F.cloneElement(t,void 0,e.props.children(t.props.children)):null}return F.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function g_(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}u_(g_,`mergeProps`);function __(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)}u_(__,`getElementRef`);function v_(e){return F.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===p_}u_(v_,`isSlottable`);var y_=Symbol.for(`react.lazy`);function b_(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===y_&&`_payload`in e&&x_(e._payload)}u_(b_,`isLazyComponent`);function x_(e){return typeof e==`object`&&!!e&&`then`in e}u_(x_,`isPromiseLike`);var S_=u_(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),C_=u_(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),w_=F.use,T_=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,E_=n,D_=(e,t)=>n=>{if(t?.variants==null)return E_(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=T_(t)||T_(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>
23{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return E_(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},O_=D_(`inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-bold cursor-pointer transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`btn-skew btn-skew-blue text-white`,destructive:`btn-skew text-white`,outline:`btn-skew btn-skew-outline text-primary`,secondary:`bg-secondary text-secondary-foreground hover:brightness-95`,ghost:`hover:bg-secondary hover:text-primary`,link:`text-primary underline-offset-4 hover:underline`,emergency:`btn-skew text-white`,cyan:`btn-skew btn-skew-blue text-white`,onDark:`btn-skew btn-skew-light text-charcoal`,onDarkOutline:`btn-skew btn-skew-outline text-white`},size:{default:`h-11 px-6`,sm:`h-9 px-4 text-xs`,lg:`h-13 px-8 text-[0.95rem]`,xl:`h-14 px-9 text-[0.95rem] uppercase tracking-[0.06em]`,icon:`h-10 w-10`}},defaultVariants:{variant:`default`,size:`default`}}),k_=F.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...a},o)=>(0,I.jsx)(r?f_:`button`,{className:i(O_({variant:t,size:n,className:e})),ref:o,...a}));k_.displayName=`Button`;var A_=Object.defineProperty,j_=(e,t)=>A_(e,`name`,{value:t,configurable:!0}),M_=!!(typeof window<`u`&&window.document&&window.document.createElement);function N_(e,t,{checkForDefaultPrevented:n=!0}={}){return j_(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}j_(N_,`composeEventHandlers`);function P_(e){if(!M_)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}j_(P_,`getOwnerWindow`);function F_(e){if(!M_)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}j_(F_,`getOwnerDocument`);function I_(e,t=!1){let{activeElement:n}=F_(e);if(!n?.nodeName)return null;if(L_(n)&&n.contentDocument)return I_(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=F_(n).getElementById(e);if(t)return t}}return n}j_(I_,`getActiveElement`);function L_(e){return e.tagName===`IFRAME`}j_(L_,`isFrame`);var R_=Object.defineProperty,z_=(e,t)=>R_(e,`name`,{value:t,configurable:!0});function B_(e,t){let n=F.createContext(t);n.displayName=e+`Context`;let r=z_(e=>{let{children:t,...r}=e,i=F.useMemo(()=>r,Object.values(r));return(0,I.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=F.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return z_(i,`useContext`),[r,i]}
23z_(B_,`createContext`);function V_(e,t=[]){let n=[];function r(t,r){let i=F.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=z_(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=F.useMemo(()=>o,Object.values(o));return(0,I.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=F.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return z_(s,`useContext`),[o,s]}z_(r,`createContext`);let i=z_(()=>{let t=n.map(e=>F.createContext(e));return z_(function(n){let r=n?.[e]||t;return F.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,H_(i,...t)]}z_(V_,`createContextScope`);function H_(...e){let t=e[0];if(e.length===1)return t;let n=z_(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return z_(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return F.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}z_(H_,`composeContextScopes`);var U_=globalThis?.document?F.useLayoutEffect:()=>{},W_=Object.defineProperty,G_=(e,t)=>W_(e,`name`,{value:t,configurable:!0}),K_=F.useId||(()=>void 0),q_=0;function J_(e){let[t,n]=F.useState(K_());return U_(()=>{e||n(e=>e??String(q_++))},[e]),e||(t?`radix-${t}`:``)}G_(J_,`useId`);var Y_=Object.defineProperty,X_=(e,t)=>Y_(e,`name`,{value:t,configurable:!0}),Z_=F.useEffectEvent,Q_=F.useInsertionEffect;function $_(e){if(typeof Z_==`function`)return Z_(e);let t=F.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Q_==`function`?Q_(()=>{t.current=e}):U_(()=>{t.current=e}),F.useMemo(()=>((...e)=>t.current?.(...e)),[])}X_($_,`useEffectEvent`);var ev=Object.defineProperty,tv=(e,t)=>ev(e,`name`,{value:t,configurable:!0}),nv=F.useInsertionEffect||U_;function rv({prop:e,defaultProp:t,onChange:n=tv(()=>{},`onChange`),caller:r}){let[i,a,o]=iv({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,F.useCallback(t=>{if(s){let n=av(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}tv(rv,`useControllableState`);function iv({defaultProp:e,onChange:t}){let[n,r]=F.useState(e),i=F.useRef(n),a=F.useRef(t);return nv(()=>{a.current=t},[t]),F.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}tv(iv,`useUncontrolledState`);function av(e){return typeof e==`function`}tv(av,`isFunction`);var ov=Symbol(`RADIX:SYNC_STATE`);function sv(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=$_(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=F.useReducer((t,n)=>{if(n.type===ov)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=F.useRef(p);F.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=F.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return F.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:ov,state:i})},[i,d.state,c]),[h,f]}tv(sv,`useControllableStateReducer`);var cv=e(Ce(),1),lv=Object.defineProperty,uv=(e,t)=>
23lv(e,`name`,{value:t,configurable:!0}),dv=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=d_(`Primitive.${t}`),r=F.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,I.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function fv(e,t){e&&cv.flushSync(()=>e.dispatchEvent(t))}uv(fv,`dispatchDiscreteCustomEvent`);var pv=Object.defineProperty,mv=(e,t)=>pv(e,`name`,{value:t,configurable:!0});function hv(e){let t=F.useRef(e);return F.useEffect(()=>{t.current=e}),F.useMemo(()=>((...e)=>t.current?.(...e)),[])}mv(hv,`useCallbackRef`);var gv=Object.defineProperty,_v=(e,t)=>gv(e,`name`,{value:t,configurable:!0}),vv=`dismissableLayer.update`,yv=`dismissableLayer.pointerDownOutside`,bv=`dismissableLayer.focusOutside`,xv,Sv=F.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Cv=F.forwardRef(_v(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=F.useContext(Sv),[d,f]=F.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=F.useState({}),h=c_(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=F.useRef(!1),C=Ev(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:F.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),ee=Dv(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),te=d?y===g.length-1:!1,w=hv(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return F.useEffect(()=>{if(te)return p.addEventListener(`keydown`,w,{capture:!0}),()=>p.removeEventListener(`keydown`,w,{capture:!0})},[p,te,w]),F.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(xv=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Ov(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=xv))}},[d,p,n,u]),F.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Ov())},[d,u]),F.useEffect(()=>{let e=_v(()=>m({}),`handleUpdate`);return document.addEventListener(vv,e),()=>document.removeEventListener(vv,e)},[]),(0,I.jsx)(dv.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:N_(e.onFocusCapture,ee.onFocusCapture),onBlurCapture:N_(e.onBlurCapture,ee.onBlurCapture),onPointerDownCapture:N_(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function wv(){let e=F.useContext(Sv),[t,n]=F.useState(null);return F.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}_v(wv,`useDismissableLayerSurface`);var Tv=_v(()=>!0,`IS_TRUE`);function Ev(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Tv}=t,s=hv(e),c=F.useRef(!1),l=F.useRef(!1),u=F.useRef(new Map),d=F.useRef(()=>{});return F.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}_v(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}_v(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}_v(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}_v(p,`handleInteractionBubble`);let m=_v(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||kv(yv,s,p,{discrete:!0})};if(_v(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(
23),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:_v(()=>c.current=!0,`onPointerDownCapture`)}}_v(Ev,`usePointerDownOutside`);function Dv(e,t=globalThis?.document){let n=hv(e),r=F.useRef(!1);return F.useEffect(()=>{let e=_v(e=>{e.target&&!r.current&&kv(bv,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:_v(()=>r.current=!0,`onFocusCapture`),onBlurCapture:_v(()=>r.current=!1,`onBlurCapture`)}}_v(Dv,`useFocusOutside`);function Ov(){let e=new CustomEvent(vv);document.dispatchEvent(e)}_v(Ov,`dispatchUpdate`);function kv(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?fv(i,a):i.dispatchEvent(a)}_v(kv,`handleAndDispatchCustomEvent`);var Av=Object.defineProperty,jv=(e,t)=>Av(e,`name`,{value:t,configurable:!0}),Mv=`focusScope.autoFocusOnMount`,Nv=`focusScope.autoFocusOnUnmount`,Pv={bubbles:!1,cancelable:!0},Fv=F.forwardRef(jv(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=F.useState(null),l=hv(i),u=hv(a),d=F.useRef(null),f=c_(t,c),p=F.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;F.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Hv(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Hv(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Hv(s)};jv(e,`handleFocusIn`),jv(t,`handleFocusOut`),jv(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),F.useEffect(()=>{if(s){Uv.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Mv,Pv);s.addEventListener(Mv,l),s.dispatchEvent(t),t.defaultPrevented||(Iv(Kv(Rv(s)),{select:!0}),document.activeElement===e&&Hv(s))}return()=>{s.removeEventListener(Mv,l),setTimeout(()=>{let t=new CustomEvent(Nv,Pv);s.addEventListener(Nv,u),s.dispatchEvent(t),t.defaultPrevented||Hv(e??document.body,{select:!0}),s.removeEventListener(Nv,u),Uv.remove(p)},0)}}},[s,l,u,p]);let m=F.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Lv(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Hv(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Hv(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,I.jsx)(dv.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function Iv(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Hv(r,{select:t}),document.activeElement!==n)return}jv(Iv,`focusFirst`);function Lv(e){let t=Rv(e);return[zv(t,e),zv(t.reverse(),e)]}jv(Lv,`getTabbableEdges`);function Rv(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:jv(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}jv(Rv,`getTabbableCandidates`);function zv(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Bv(r,{upTo:t})))return r}jv(zv,`findVisible`);function Bv(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}jv(Bv,`isHidden`);function Vv(e){return e instanceof HTMLInputElement&&`select`in e}jv(Vv,`isSelectableInput`);function Hv(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Vv(e)&&t&&e.select()}}jv(Hv,`focus`);var Uv=Wv();function Wv(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Gv(e,t),e.unshift(t)},remove(t){e=Gv(e,t),e[0]?.resume()}}}jv(Wv,`createFocusScopesStack`);function Gv(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}jv(Gv,`arrayRemove`);function Kv(e){return e.filter(e=>e.tagName!==`A`)}jv(Kv,`removeLinks`);var qv=Object.defineProperty,Jv=F.forwardRef(((e,t)=>qv(e,`name`,{value:t,configurable:!0}
23))(function(e,t){let{container:n,...r}=e,[i,a]=F.useState(!1);U_(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?cv.createPortal((0,I.jsx)(dv.div,{...r,ref:t}),o):null},`Portal`)),Yv=Object.defineProperty,Xv=(e,t)=>Yv(e,`name`,{value:t,configurable:!0});function Zv(e,t){return F.useReducer((e,n)=>t[e][n]??e,e)}Xv(Zv,`useStateMachine`);var Qv=Xv(e=>{let{present:t,children:n}=e,r=$v(t),i=typeof n==`function`?n({present:r.isPresent}):F.Children.only(n),a=ty(r.ref,ry(i));return typeof n==`function`||r.isPresent?F.cloneElement(i,{ref:a}):null},`Presence`);function $v(e){let[t,n]=F.useState(),r=F.useRef(null),i=F.useRef(e),a=F.useRef(`none`),o=F.useRef(void 0),[s,c]=Zv(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return F.useEffect(()=>{s===`mounted`?(a.current=o.current??ny(r.current),o.current=void 0):a.current=`none`},[s]),U_(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=ny(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),U_(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Xv(a=>{let o=ny(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Xv(e=>{e.target===t&&(a.current=ny(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:F.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=ny(t)}else r.current=null;n(e)},[])}}Xv($v,`usePresence`);function ey(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Xv(ey,`setRef`);function ty(...e){let t=F.useRef(e);return t.current=e,F.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=ey(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():ey(n[e],null)}}},[])}Xv(ty,`useStableComposedRefs`);function ny(e){return e?.animationName||`none`}Xv(ny,`getAnimationName`);function ry(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)}Xv(ry,`getElementRef`);var iy=Object.defineProperty,ay=(e,t)=>iy(e,`name`,{value:t,configurable:!0}),oy=0,sy=null;function cy(e){return ly(),e.children}ay(cy,`FocusGuards`);function ly(){F.useEffect(()=>{sy||={start:uy(),end:uy()};let{start:e,end:t}=sy;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),oy++,()=>{oy===1&&(sy?.start.remove(),sy?.end.remove(),sy=null),oy=Math.max(0,oy-1)}},[])}ay(ly,`useFocusGuards`);function uy(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}ay(uy,`createFocusGuard`);var dy=`right-scroll-bar-position`,fy=`width-before-scroll-bar`,py=`with-scroll-bars-hidden`,my=`--removed-body-scroll-bar-size`;function hy(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function gy(e,t){var n=(0,F.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var _y=typeof window<`u`?F.useLayoutEffect:F.useEffect,vy=new WeakMap;function yy(e,t){var n=gy(t||null,function(t){return e.forEach(function(e){return hy(e,t)})});return _y(function(){var t=vy.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||hy(e,null)}
vendor: 8,095 bytes, lines 23-63
23),i.forEach(function(e){r.has(e)||hy(e,a)})}vy.set(n,e)},[e]),n}function by(e){return e}function xy(e,t){t===void 0&&(t=by);var n=[],r=!1;return{read:function(){if(r)throw 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(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Sy(e){e===void 0&&(e={});var t=xy(null);return t.options=pl({async:!0,ssr:!1},e),t}var Cy=function(e){var t=e.sideCar,n=z(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return F.createElement(r,pl({},n))};Cy.isSideCarExport=!0;function wy(e,t){return e.useMedium(t),Cy}var Ty=Sy(),Ey=function(){},Dy=F.forwardRef(function(e,t){var n=F.useRef(null),r=F.useState({onScrollCapture:Ey,onWheelCapture:Ey,onTouchMoveCapture:Ey}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=z(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=yy([n,t]),C=pl(pl({},b),i);return F.createElement(F.Fragment,null,u&&F.createElement(x,{sideCar:Ty,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?F.cloneElement(F.Children.only(s),pl(pl({},C),{ref:S})):F.createElement(v,pl({},C,{className:c,ref:S}),s))});Dy.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Dy.classNames={fullWidth:fy,zeroRight:dy};var Oy,ky=function(){if(Oy)return Oy;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Ay(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=ky();return t&&e.setAttribute(`nonce`,t),e}function jy(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function My(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Ny=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ay())&&(jy(t,n),My(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Py=function(){var e=Ny();return function(t,n){F.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Fy=function(){var e=Py();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Iy={left:0,top:0,right:0,gap:0},Ly=function(e){return parseInt(e||``,10)||0},Ry=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Ly(n),Ly(r),Ly(i)]},zy=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Iy;var t=Ry(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])}},By=Fy(),Vy=`data-scroll-locked`,Hy=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),` 24 .${py} { 25 overflow: hidden ${r}; 26 padding-right: ${s}px ${r}; 27 } 28 body[${Vy}] { 29 overflow: hidden ${r}; 30 overscroll-behavior: contain; 31 ${[t&&`position: relative ${r};`,n===`margin`&&` 32 padding-left: ${i}px; 33 padding-top: ${a}px; 34 padding-right: ${o}px; 35 margin-left:0; 36 margin-top:0; 37 margin-right: ${s}px ${r}; 38 `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)} 39 } 40 41 .${dy} { 42 right: ${s}px ${r}; 43 } 44 45 .${fy} { 46 margin-right: ${s}px ${r}; 47 } 48 49 .${dy} .${dy} { 50 right: 0 ${r}; 51 } 52 53 .${fy} .${fy} { 54 margin-right: 0 ${r}; 55 } 56 57 body[${Vy}] { 58 ${my}: ${s}px; 59 } 60`},Uy=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Wy=function(){F.useEffect(function(){return document.body.setAttribute(Vy,(Uy()+1).toString()),function(){var e=Uy()-1;e<=0?document.body.removeAttribute(Vy):document.body.setAttribute(Vy,e.toString())}},[])},Gy=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Wy();var a=F.useMemo(function(){return zy(i)},[i]);return F.createElement(By,{styles:Hy(a,!t,i,n?``:`!important`)})},Ky=!1;if(typeof window<`u`)try{var qy=Object.defineProperty({},"passive",{get:function(){return Ky=!0,!0}});window.addEventListener(`test`,qy,qy),window.removeEventListener(`test`,qy,qy)}catch{Ky=!1}var Jy=Ky?{passive:!1}:!1,Yy=function(e){return e.tagName===`TEXTAREA`},Xy=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Yy(e)&&n[t]===`visible`)},Zy=function(e){return Xy(e,`overflowY`)},Qy=function(e){return Xy(e,`overflowX`)},$y=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),nb(e,r)){var i=rb(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},eb=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},tb=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},nb=function(e,t){return e===`v`?Zy(t):Qy(t)},rb=function(e,t){return e===`v`?eb(t):tb(t)},ib=function(e,t){return e===`h`&&t===`rtl`?-1:1},ab=function(e,t,n,r,i){var a=ib(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=rb(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&nb(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},ob=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},sb=function(e){return[e.deltaX,e.deltaY]},cb=function(e){return e&&`current`in e?e.current:e},lb=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ub=function(e){return` 61 .block-interactivity-${e} {pointer-events: none;} 62 .allow-interactivity-${e} {pointer-events: all;} 63`},db=0,fb=[];function pb(e){var t=F.useRef([]),n=F.useRef([0,0]),r=F.useRef(),i=F.useState(db++)[0],a=F.useState(Fy)[0],o=F.useRef(e);F.useEffect(function(){o.current=e},[e]),F.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=hl([e.lockRef.current],(e.shards||[]).map(cb),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=F.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=ob(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=$y(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=$y(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return ab(h,t,e,h===`h`?s:c,!0)},[]),c=F.useCallback(function(e){var n=e;if(!(!fb.length||fb[fb.length-1]!==a)){var r=`deltaY`in n?sb(n):ob(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&lb(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}
63if(!i){var c=(o.current.shards||[]).map(cb).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=F.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:mb(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=F.useCallback(function(e){n.current=ob(e),r.current=void 0},[]),d=F.useCallback(function(t){l(t.type,sb(t),t.target,s(t,e.lockRef.current))},[]),f=F.useCallback(function(t){l(t.type,ob(t),t.target,s(t,e.lockRef.current))},[]);F.useEffect(function(){return fb.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Jy),document.addEventListener(`touchmove`,c,Jy),document.addEventListener(`touchstart`,u,Jy),function(){fb=fb.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Jy),document.removeEventListener(`touchmove`,c,Jy),document.removeEventListener(`touchstart`,u,Jy)}},[]);var p=e.removeScrollBar,m=e.inert;return F.createElement(F.Fragment,null,m?F.createElement(a,{styles:ub(i)}):null,p?F.createElement(Gy,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function mb(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var hb=wy(Ty,pb),gb=F.forwardRef(function(e,t){return F.createElement(Dy,pl({},e,{ref:t,sideCar:hb}))});gb.classNames=Dy.classNames;var _b=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},vb=new WeakMap,yb=new WeakMap,bb={},xb=0,Sb=function(e){return e&&(e.host||Sb(e.parentNode))},Cb=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Sb(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},wb=function(e,t,n,r){var i=Cb(t,Array.isArray(e)?e:[e]);bb[n]||(bb[n]=new WeakMap);var a=bb[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(vb.get(e)||0)+1,l=(a.get(e)||0)+1;vb.set(e,c),a.set(e,l),o.push(e),c===1&&i&&yb.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),xb++,function(){o.forEach(function(e){var t=vb.get(e)-1,i=a.get(e)-1;vb.set(e,t),a.set(e,i),t||(yb.has(e)||e.removeAttribute(r),yb.delete(e)),i||e.removeAttribute(n)}),xb--,xb||(vb=new WeakMap,vb=new WeakMap,yb=new WeakMap,bb={})}},Tb=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||_b(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),wb(r,i,n,`aria-hidden`)):function(){return null}},Eb=Object.defineProperty,Db=(e,t)=>Eb(e,`name`,{value:t,configurable:!0}),Ob=`Dialog`,[kb,Ab]=V_(Ob),[jb,Mb]=kb(Ob),Nb=Db(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=F.useRef(null),c=F.useRef(null),[l,u]=rv({prop:r,defaultProp:i??!1,onChange:a,caller:Ob}),[d,f]=F.useState(0),[p,m]=F.useState(0);return(0,I.jsx)(jb,{scope:t,triggerRef:s,contentRef:c,contentId:J_(),titleId:J_(),descriptionId:J_(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:F.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),Pb=`DialogTrigger`,Fb=F.forwardRef(Db(function(e,t){let{__scopeDialog:n,...r}=e,i=Mb(Pb,n),a=c_(t,i.triggerRef);return(0,I.jsx)(dv.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":tx(i.open),...r,ref:a,onClick:N_(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),Ib=`DialogPortal`,[Lb,Rb]=kb(Ib,{forceMount:void 0}),zb=Db(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Mb(Ib,t);return(0,I.jsx)(Lb,{scope:t,forceMount:n,children:F.Children.map(r,e=>(0,I.jsx)(Qv,{present:n||a.open,children:(0,I.jsx)(Jv,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),Bb=`DialogOverlay`,Vb=F.forwardRef(Db(function(e,t){let n=Rb(Bb,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Mb(Bb,e.__scopeDialog);return a.modal?(0,I.jsx)(Qv,{present:r||a.open,children:(0,I.jsx)(Ub,{...i,ref:t})}):null},`DialogOverlay`)),Hb=d_(`DialogOverlay.RemoveScroll`),Ub=F.forwardRef(Db(function(e,t){let{__scopeDialog:n,...r}=e,i=Mb(Bb,n),a=c_(t,wv());return(0,I.jsx)(gb,{as:Hb,allowPinchZoom:!0,shards:[i.contentRef],children:(0,I.jsx)(dv.div,{"data-state":tx(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),Wb=`DialogContent`,Gb=F.forwardRef(Db(function(e,t){let n=Rb(Wb,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Mb(Wb,e.__scopeDialog);return(0,I.jsx)(Qv,{present:r||a.open,children:a.modal?(0,I.jsx)(Kb,{...i,ref:t}):(0,I.jsx)(qb,{...i,ref:t})})},`DialogContent`)),Kb=F.forwardRef(Db(function(e,t){let n=Mb(Wb,e.__scopeDialog),r=F.useRef(null),i=c_(t,n.contentRef,r);return F.useEffect(()=>{let e=r.current;if(e)return Tb(e)},[]),(0,I.jsx)(Jb,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:N_(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:N_(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:N_(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),qb=F.forwardRef(Db(function(e,t){let n=Mb(Wb,e.__scopeDialog),r=F.useRef(!1),i=F.useRef(!1);return(0,I.jsx)(Jb,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),Jb=F.forwardRef(Db(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Mb(Wb,n);return ly(),(0,I.jsx)(I.Fragment,{children:(0,I.jsx)(Fv,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,I.jsx)(Cv,{role:`dialog`,id:s.
63contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":tx(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),Yb=`DialogTitle`,Xb=F.forwardRef(Db(function(e,t){let{__scopeDialog:n,...r}=e,i=Mb(Yb,n),{setTitleCount:a}=i;return U_(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,I.jsx)(dv.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),Zb=`DialogDescription`,Qb=F.forwardRef(Db(function(e,t){let{__scopeDialog:n,...r}=e,i=Mb(Zb,n),{setDescriptionCount:a}=i;return U_(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,I.jsx)(dv.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),$b=`DialogClose`,ex=F.forwardRef(Db(function(e,t){let{__scopeDialog:n,...r}=e,i=Mb($b,n);return(0,I.jsx)(dv.button,{type:`button`,...r,ref:t,onClick:N_(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function tx(e){return e?`open`:`closed`}Db(tx,`getState`);var nx=Nb,rx=Fb,ix=zb,ax=F.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Vb,{className:i(`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}));ax.displayName=Vb.displayName;var ox=D_(`fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out`,{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`}}),sx=F.forwardRef(({side:e=`right`,className:t,children:n,...r},a)=>(0,I.jsxs)(ix,{children:[(0,I.jsx)(ax,{}),(0,I.jsxs)(Gb,{ref:a,className:i(ox({side:e}),t),...r,children:[(0,I.jsxs)(ex,{className:`absolute right-4 top-4 roun
63ded-sm opacity-70 ring-offset-background cursor-pointer transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,I.jsx)(r_,{className:`h-4 w-4`}),(0,I.jsx)(`span`,{className:`sr-only`,children:`Close`})]}),n]})]}));sx.displayName=Gb.displayName;var cx=F.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Xb,{ref:n,className:i(`text-lg font-semibold text-foreground`,e),...t}));cx.displayName=Xb.displayName;var lx=F.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Qb,{ref:n,className:i(`text-sm text-muted-foreground`,e),...t}));lx.displayName=Qb.displayName;var ux={version:1,asset_id:`261dfaaf-d124-4172-96b9-c78fc0380567`,project_id:`2db433b4-2c6d-4a02-96a4-25fa7a21430a`,url:`/__l5e/assets-v1/261dfaaf-d124-4172-96b9-c78fc0380567/fresh-air-logo-transparent.png`,r2_key:`a/v1/2db433b4-2c6d-4a02-96a4-25fa7a21430a/261dfaaf-d124-4172-96b9-c78fc0380567/fresh-air-logo-transparent.png`,original_filename:`fresh-air-logo-transparent.png`,size:510456,content_type:`image/png`,created_at:`2026-09-02T21:15:24Z`};function dx(){let[e,t]=(0,F.useState)(!1),n=Qc({select:e=>e.location.pathname});return(0,I.jsx)(`header`,{className:`fixed inset-x-0 top-0 z-50 h-[88px] border-b-2 border-primary bg-white`,style:{boxShadow:`0 2px 0 0 rgba(48,96,168,0.18)`},children:(0,I.jsxs)(`div`,{className:`container-page flex h-[88px] items-center justify-between`,children:[(0,I.jsx)(D,{to:`/`,className:`flex items-center`,"aria-label":`Fresh Air Restoration & Cleaning home`,children:(0,I.jsx)(`img`,{src:ux.url,alt:`Fresh Air Restoration & Cleaning â water, mold, air ducts, San Antonio TX`,width:_e[0],height:_e[1],fetchPriority:`high`,className:`h-[56px] w-auto`})}),(0,I.jsx)(`nav`,{className:`hidden items-center gap-6 xl:flex`,"aria-label":`Main`,children:jg.map(e=>(0,I.jsxs)(`div`,{className:`group relative`,children:[(0,I.jsxs)(D,{to:e.to,"data-active":n===e.to,className:i(`flex items-center gap-1 whitespace-nowrap text-[15px] font-bold text-primary transition-colors hover:text-emergency`,n===e.to&&`text-emergency`),children:[e.shortLabel??e.label,e.children||e.groups?(0,I.jsx)(Zg,{className:`size-3.5 opacity-70`}):null]}),e.groups?(0,I.jsx)(`div`,{className:`invisible absolute left-0 top-full z-50 w-[min(58rem,calc(100vw-3rem))] pt-6 opacity-0 transition-opacity duration-200 group-hover:visible group-hover:opacity-100`,children:(0,I.jsx)(`div`,{className:`grid grid-cols-4 gap-6 border-t-4 border-emergency bg-white p-8 shadow-lift`,children:e.groups.map(e=>(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`type-display text-xs tracking-[0.1em] text-emergency`,children:e.label}),(0,I.jsx)(`ul`,{className:`mt-3 space-y-1`,children:e.items.map(e=>(0,I.jsx)(`li`,{children:(0,I.jsx)(D,{to:e.to,className:`block py-1 text-sm font-medium text-charcoal transition-colors hover:text-primary`,children:e.label})},e.to))})]},e.label))})}):e.children?(0,I.jsx)(`div`,{className:`invisible absolute left-1/2 top-full z-50 w-72 -translate-x-1/2 pt-6 opacity-0 transition-opacity duration-200 group-hover:visible group-hover:opacity-100`,children:(0,I.jsx)(`ul`,{className:`border-t-4 border-emergency bg-white p-4 shadow-lift`,children:e.children.map(e=>(0,I.jsx)(`li`,{children:(0,I.jsx)(D,{to:e.to,className:`block py-1.5 text-sm font-medium text-charcoal transition-colors hover:text-primary`,children:e.label})},e.to))})}):null]},e.label))}),(0,I.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,I.jsxs)(`span`,{className:`pill hidden items-center gap-2 whitespace-nowrap border-2 border-emergency px-4 py-1.5 text-[11px] font-bold uppercase tracking-[0.14em] text-emergency 2xl:inline-flex`,children:[(0,I.jsx)(`span`,{className:`pill size-1.5 bg-emergency`}),`24/7 Emergency`]}),(0,I.jsx)(k_,{asChild:!0,variant:`emergency`,size:`lg`,className:`hidden md:inline-flex`,children:(0,I.jsxs)(`a`,{href:yg,children:[(0,I.jsx)(n_,{}),` `,vg]})}),(0,I.jsxs)(nx,{open:e,onOpenChange:t,children:[(0,I.jsx)(rx,{asChild:!0,children:(0,I.jsx)(`button`,{"aria-label":`Open menu`,className:`inline-flex size-11 items-center justify-center text-primary xl:hidden`,children:(0,I.jsx)(t_,{className:`size-6`})})}),(0,I.jsx)(sx,{side:`right`,className:`w-[88vw] max-w-sm overflow-y-auto`,children:(0,I.jsxs)(`nav`,{className:`mt-8 flex flex-col gap-1`,"aria-label":`Mobile`,children:[jg.map(e=>(0,I.jsxs)(`div`,{className:`py-1`,children:[(0,I.jsx)(D,{to:e.to,onClick:()=>t(!1),className:`type-display block py-2 text-lg text-primary`,children:e.label}),e.groups?(0,I.jsx)(`div`,{className:`ml-1 space-y-3 border-l-2 border-emergency pl-4`,children:e.groups.map(e=>(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`type-display text-[0.7rem] tracking-[0.1em] text-emergency`,children:e.label}),(0,I.jsx)(`ul`,{children:e.items.map(e=>(0,I.jsx)(`li`,{children:(0,I.jsx)(D,{to:e.to,onClick:()=>t(!1),className:`block py-1.5 text-sm text-muted-foreground`,children:e.label})},e.to))})]},e.label))}):e.children?(0,I.jsx)(`ul`,{className:`ml-1 border-l-2 border-emergency pl-4`,children:e.children.map(e=>(0,I.jsx)(`li`,{children:(0,I.jsx)(D,{to:e.to,onClick:()=>t(!1),className:`block py-1.5 text-sm text-muted-foreground`,children:e.label})},e.to))}):null]},e.label)),[{to:`/serving-area`,label:`Serving Area`},{to:`/special-offers`,label:`Special Offers`},{to:`/faqs`,label:`FAQs`},{to:`/blog`,label:`Blog`}].map(e=>(0,I.jsx)(D,{to:e.to,onClick:()=>t(!1),className:`type-display py-2 text-lg text-primary`,children:e.label},e.to)),(0,I.jsx)(k_,{asChild:!0,variant:`emergency`,size:`xl`,className:`mt-6`,children:(0,I.jsxs)(`a`,{href:yg,children:[`Call `,vg]})})]})})]})]})]})})}function fx(){let e=kg.flatMap(e=>e.items),t=Ag;return(0,I.jsxs)(`footer`,{className:`border-t-4 border-emergency bg-charcoal pb-24 pt-16 text-white md:pb-16`,children:[(0,I.jsxs)(`div`,{className:`container-page grid gap-12 md:grid-cols-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(D,{to:`/`,className:`inline-block`,children:(0,I.jsx)(`img`,{src:ux.url,alt:`Fresh Air Restoration & Cleaning â water, mold, air ducts, San Antonio TX`,width:_e[0],height:_e[1],className:`h-auto w-[200px] bg-white p-3`,loading:`lazy`,decoding:`async`})}),(0,I.jsxs)(`address`,{className:`mt-6 space-y-3 text-sm not-italic text-ondark`,children:[(0,I.jsxs)(`p`,{className:`flex gap-2`,children:[(0,I.jsx)(e_,{className:`mt-0.5 size-4 shrink-0 text-cyan`}),(0,I.jsxs)(`a`,{href:Eg,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-cyan`,"aria-label":`Open Fresh Air Restoration & Cleaning in Google Maps`,children:[Og.street,`, `,Og.city,`, `,Og.state,` `,Og.zip]})]}),(0,I.jsxs)(`p`,{className:`flex gap-2`,children:[(0,I.jsx)(n_,{className:`mt-0.5 size-4 shrink-0 text-cyan`}),(0,I.jsx)(`span`,{children:(0,I.jsx)(`a`,{href:yg,className:`hover:text-cyan`,children:vg})})]}),(0,I.jsxs)(`p`,{className:`flex gap-2`,children:[(0,I.jsx)($g,{className:`mt-0.5 size-4 shrink-0 text-cyan`}),(0,I.jsxs)(`span`,{children:[`Emergency 24/7/365`,(0,I.jsx)(`br`,{}),`Office MonâFri 8amâ5pm`]})]})]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{className:`type-display text-sm tracking-[0.08em] text-white`,children:`Residential Services`}),(0,I.jsx)(`ul`,{className:`mt-4 space-y-2 text-sm text-ondark`,children:e.map(e=>(0,I.jsx)(`li`,{children:(0,I.jsx)(D,{to:e.to,className:`hover:text-cyan`,children:e.label})},e.to))})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{className:`type-display text-sm tracking-[0.08em] text-white`,children:`Commercial`}),(0,I.jsxs)(`ul`,{className:`mt-4 space-y-2 text-sm text-ondark`,children:[t.map(e=>(0,I.jsx)(`li`,{children:(0,I.jsx)(D,{to:e.to,className:`hover:text-cyan`,children:e.label})},e.to)),(0,I.jsx)(`li`,{children:(0,I.jsx)(D,{to:`/major-projects`,className:`hover:text-cyan`,children:`Major Projects`})})]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{className:`type-display text-sm tracking-[0.08em] text-white`,children:`Company`}),(0,I.jsxs)(`ul`,{className:`mt-4 space-y-2 text-sm text-ondark`,children:[(0,I.jsx)(`li`,{children:(0,I.jsx)(D,{to:`/about`,className:`hover:text-cyan`,children:`About`})}),(0,I.jsx)(`li`,{children:(0,I.jsx)(D,{to:`/reviews`,className:`hover:text-cyan`,children:`Reviews`})}),(0,I.jsx)(`li`,{children:(0,I.jsx)(D,{to:`/faqs`,className:`hover:text-cyan`,children:`FAQs`})}),(0,I.jsx)(`li`,{children:(0,I.jsx)(D,{to:`/serving-area`,className:`hover:text-cyan`,children:`Serving Area`})}),(0,I.jsx)(`li`,{children:(0,I.jsx)(D,{to:`/special-offers`,className:`hover:text-cyan`,children:`Special Offers`})}),(0,I.jsx)(`li`,{children:(0,I.jsx)(D,{to:`/blog`,className:`hover:text-cyan`,children:`Blog`})}),(0,I.jsx)(`li`,{children:(0,I.jsx)(D,{to:`/contact`,className:`hover:text-cyan`,children:`Contact`})})]})]})]}),(0,I.jsx)(`div`,{className:`container-page mt-12 flex flex-wrap gap-2 text-xs text-ondark`,children:[Og.moldCompanyLicense,Og.moldContractorLicense,`IICRC Certified`,`BBB A+`,`Hablamos Español`,`Financing available`,`10% military discount`,`Since 1991`].map(e=>(0,I.jsx)(`span`,{className:`chip-skew chip-skew-dark border border-white/20 px-3 py-1 text-white`,children:e},e))}),(0,I.jsxs)(`div`,{className:`container-page mt-8`,children:[(0,I.jsx)(`h2`,{className:`type-display text-sm tracking-[0.08em] text-white`,children:`Serving`}),(0,I.jsx)(`p`,{className:`mt-3 text-xs leading-relaxed text-ondark/80`,children:Ng.join(` · `)}),(0,I.jsx)(`p`,{className:`mt-3 text-xs leading-relaxed text-ondark/80`,children:`Commercial & military projects across South Texas, including Corpus Christi and the Rio Grande Valley.`})]}),(0,I.jsxs)(`div`,{className:`container-page mt-10 flex flex-col gap-2 border-t border-white/15 pt-6 text-xs text-ondark/70 sm:flex-row sm:items-center sm:justify-between`,children:[(0,I.jsxs)(`p`,{children:[`© `,new Date().getFullYear(),` `,Og.legal,`. All rights reserved.`]}),(0,I.jsxs)(`p`,{className:`flex flex-wrap gap-4`,children:[(0,I.jsx)(`a`,{href:Cg,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-cyan`,children:`BBB Profile`}),(0,I.jsx)(`a`,{href:wg,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-cyan`,children:`Facebook`}),(0,I.jsx)(D,{to:`/privacy`,className:`hover:text-cyan`,children:`Privacy Policy`}),(0,I.jsx)(D,{to:`/terms`,className:`hover:text-cyan`,children:`Terms of Service`})]})]})]})}function px(){return(0,I.jsxs)(`div`,{className:`fixed inset-x-0 bottom-0 z-50 grid grid-cols-2 gap-2 border-t-2 border-primary bg-white p-2 md:hidden`,children:[(0,I.jsxs)(`a`,{href:yg,className:`inline-flex btn-skew h-12 items-center justify-center gap-2 text-sm font-bold uppercase tracking-[0.08em] text-white`,children:[(0,I.jsx)(n_,{className:`size-4`}),` Call Now`]}),(0,I.jsxs)(D,{to:`/contact`,hash:`estimate`,className:`inline-flex btn-skew btn-skew-outline h-12 items-center justify-center gap-2 text-sm font-bold uppercase tracking-[0.08em] text-primary`,children:[(0,I.jsx)(Qg,{className:`size-4`}),` Free Estimate`]})]})}function mx(){return(0,I.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-background px-4`,children:(0,I.jsxs)(`div`,{className:`max-w-md text-center`,children:[(0,I.jsx)(`h1`,{className:`text-7xl font-bold text-foreground`,children:`404`}),(0,I.jsx)(`h2`,{className:`mt-4 text-xl font-semibold text-foreground`,children:`Page not found`}),(0,I.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`The page you're looking for doesn't exist or has been moved.`}),(0,I.jsx)(`div`,{className:`mt-6`,children:(0,I.jsx)(D,{to:`/`,className:`inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90`,children:`Go home`})})]})})}function hx({error:e,reset:t}){console.error(e);let n=s();return(0,F.useEffect)(()=>{hg(e instanceof Error?e:Error(String(e)),{boundary:`tanstack_root_error_component`})},[e]),(0,I.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-background px-4`,children:(0,I.jsxs)(`div`,{className:`max-w-md text-center`,children:[(0,I.jsx)(`h1`,{className:`text-xl font-semibold tracking-tight text-foreground`,children:`This page didn't load`}),(0,I.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`Something went wrong on our end. You can try refreshing or head back home.`}),(0,I.jsxs)(`div`,{className:`mt-6 flex flex-wrap justify-center gap-2`,children:[(0,I.jsx)(`button`,{onClick:()=>{n.invalidate(),t()},className:`inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90`,children:`Try again`}),(0,I.jsx)(`a`,{href:`/`,className:`inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent`,children:`Go home`})]})]})})}var gx={"@context":`https://schema.org`,"@type":`LocalBusiness`,name:`Fresh Air Restoration & Cleaning`,legalName:`
63Sanitary Air, Inc. DBA Fresh Air Restoration & Cleaning`,description:`Fresh Air Restoration & Cleaning is a family-owned San Antonio company, licensed for mold since 1991, handling water damage, mold and air duct cleaning 24/7.`,foundingDate:`1991`,telephone:`+1-210-982-0647`,address:{"@type":`PostalAddress`,streetAddress:`2418 Basse Rd`,addressLocality:`San Antonio`,addressRegion:`TX`,postalCode:`78213`,addressCountry:`US`},areaServed:[`San Antonio`,`Bexar County`,`South Texas`,`Corpus Christi`,`Rio Grande Valley`,...Ng.filter(e=>e!==`San Antonio`)],openingHoursSpecification:[{"@type":`OpeningHoursSpecification`,dayOfWeek:[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`],opens:`00:00`,closes:`23:59`,description:`Emergency service 24/7/365. Office MonâFri 8amâ5pm.`}],hasCredential:[{"@type":`EducationalOccupationalCredential`,credentialCategory:`license`,name:`TDLR Mold Remediation Company License #RCO0176`,recognizedBy:{"@type":`GovernmentOrganization`,name:`Texas Department of Licensing and Regulation`}},{"@type":`EducationalOccupationalCredential`,credentialCategory:`license`,name:`TDLR Mold Remediation Contractor License #MRC0212`,recognizedBy:{"@type":`GovernmentOrganization`,name:`Texas Department of Licensing and Regulation`}},{"@type":`EducationalOccupationalCredential`,credentialCategory:`certification`,name:`IICRC Certified Firm`}],aggregateRating:{"@type":`AggregateRating`,ratingValue:`4.4`,reviewCount:`31`,bestRating:`5`},knowsLanguage:[`en`,`es`],url:`https://freshairsa.com`,sameAs:[`https://www.bbb.org/us/tx/san-antonio/profile/fire-water-damage-restoration/fire-water-restoration-0825-13102`,`https://facebook.com/profile.php?id=61563231393066`]},Q=Ac()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1`},{title:`Fresh Air Restoration & Cleaning | San Antonio Since 1991`},{name:`description`,content:`San Antonio water damage restoration, mold remediation and air duct cleaning. Family owned since 1991. Answering 24/7.`},{name:`author`,content:`Sanitary Air, Inc.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary_large_image`}],links:[{rel:`stylesheet`,href:mg},{rel:`preconnect`,href:`https://fonts.googleapis.com`},{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossOrigin:`anonymous`},{rel:`stylesheet`,href:`https://fonts.googleapis.com/css2?family=Archivo:ital,wght@1,800;1,900&family=Manrope:wght@400;500;700;800&display=swap`},{rel:`icon`,href:`/favicon.png`,type:`image/png`}],scripts:[{children:`document.documentElement.dataset.js="on"`},{src:`https://www.googletagmanager.com/gtag/js?id=G-GX94PF885M`,async:!0},{children:`
vendor: 118 bytes, line 63
63window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','
63G-GX94PF885M
vendor: 25 bytes, line 63
63',{send_page_view:true});
63`},{type:`application/ld+json`,children:JSON.stringify(gx)}]}),shellComponent:_x,component:vx,notFoundComponent:mx,errorComponent:hx});function _x({children:e}){return(0,I.jsxs)(`html`,{lang:`en`,children:[(0,I.jsx)(`head`,{children:(0,I.jsx)(il,{})}),(0,I.jsxs)(`body`,{children:[e,(0,I.jsx)(ol,{})]})]})}function vx(){let{queryClient:e}=Q.useRouteContext(),t=Qc({select:e=>e.location.pathname}),n=(0,F.useRef)(!0);return(0,F.useEffect)(()=>{let e=e=>{let t=e.target.closest(`a`);t?.href?.startsWith(`tel:`)&&gg(`click_to_call`,{phone:t.href.replace(`tel:`,``),page_path:location.pathname})};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[]),(0,F.useEffect)(()=>{if(n.current){n.current=!1;return}gg(`page_view`,{page_path:location.pathname,page_location:location.href,page_title:document.title})},[t]),(0,I.jsxs)(pg,{client:e,children:[(0,I.jsx)(dx,{}),(0,I.jsx)(`main`,{children:(0,I.jsx)(Hc,{})}),(0,I.jsx)(fx,{}),(0,I.jsx)(px,{})]})}var yx=`modulepreload`,bx=function(e){return`/`+e},xx={},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=bx(t,n),t=s(t),t in xx)return;xx[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:yx,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Sx=L(`/`)({head:()=>{let e=Bg({title:`Water Damage, Mold & Air Duct Cleaning | San Antonio | Fresh Air`,description:`Family-owned San Antonio restoration since 1991: 24/7 water damage cleanup, TDLR-licensed mold remediation and air duct cleaning. Call (210) 982-0647 anytime.`,path:`/`,imageKey:`fleet`});return{...e,links:[...e.links??[],{rel:`preload`,as:`image`,href:ye,imagesrcset:ve.fleet?.webp,imagesizes:`(min-width: 1024px) 55vw, 100vw`,type:`image/webp`,fetchpriority:`high`}]}},component:R(()=>$(()=>import(`./routes-DQ073bpS.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),`component`)}),Cx=()=>$(()=>import(`./_-DJ7LAi8J.js`),[]),wx=new Set([`boerne-tx`,`new-braunfels-tx`,`schertz-tx`,`helotes-tx`,`bulverde-tx`,`universal-city-tx`,`fair-oaks-ranch-tx`,`alamo-heights-tx`]),Tx=/^\/contact\/(?:duct-cleaners|mold-remediation|mold-removal-companies)-service-area\/([^/]+)$/,Ex=[[/^\/contact\/.+/,`/serving-area`],[/^\/services?\/?$/,`/water-damage-restoration`],[/^\/commercial-services$/,`/commercial`],[/^\/san-antonio-vent-hood-cleaning$/,`/commercial-kitchen-vent-hood-cleaning`],[/^\/privacy-policy$/,`/privacy`],[/^\/index(?:\.php|\.html?)?$/,`/`]],Dx=L(`/$`)({beforeLoad:({location:e})=>{let t=e.pathname.replace(/\/+$/,``),n=t.match(Tx)?.[1];if(n&&wx.has(n))throw l({to:`/service-area/$city`,params:{city:n},statusCode:301});
63for(let[e,n]of Ex)if(e.test(t))throw l({to:n,statusCode:301});throw d()},component:R(Cx,`component`)}),Ox=L(`/a-guide-to-air-quality-in-your-home`)({beforeLoad:()=>{throw l({to:`/blog`,statusCode:301,throw:!0})}}),kx=L(`/about`)({head:()=>Bg({title:`About Fresh Air Restoration & Cleaning | San Antonio Since 1991`,description:`Meet the family that has run Fresh Air Restoration in San Antonio since 1991: IICRC certified, TDLR licensed for mold, BBB A+ rated, hablamos español.`,path:`/about`,breadcrumb:`About Fresh Air`,imageKey:`crew`}),component:R(()=>$(()=>import(`./about-CENp_LmG.js`),__vite__mapDeps([12,1,4,6,13,3,2,14,15,16])),`component`)}),Ax=`/air-duct-cleaning`,jx=L(`/air-duct-cleaning`)({head:()=>Vg({title:`Air Duct Cleaning San Antonio | HVAC Hygiene | Fresh Air`,description:`Air duct cleaning and sanitizing in San Antonio by RIA-certified technicians. Whole-system cleaning, plenums and UV options, from a family firm since 1991.`,service:`Air Duct Cleaning & Sanitizing`,path:Ax}),component:R(()=>$(()=>import(`./air-duct-cleaning-DykoZqPU.js`),__vite__mapDeps([17,1,4,18,13,3,2,6,14,15,19,20,16])),`component`)}),Mx=`/air-duct-mold-removal`,Nx=L(`/air-duct-mold-removal`)({head:()=>Vg({title:`Air Duct Mold Removal San Antonio | TDLR Licensed`,description:`Mold in your air ducts or air handler? Fresh Air holds both TDLR mold licenses and RIA duct certification â one San Antonio crew handles both.`,service:`Air Duct Mold Removal`,path:Mx}),component:R(()=>$(()=>import(`./air-duct-mold-removal-zHM1u83u.js`),__vite__mapDeps([21,1,4,22,13,3,2,6,14,15,19,20,16])),`component`)}),Px=L(`/areas-of-the-home-most-vulnerable-to-mold-growth`)({beforeLoad:()=>{throw l({to:`/blog`,statusCode:301,throw:!0})}}),Fx=L(`/benefits-of-regular-air-duct-cleaning-for-indoor-air-quality`)({beforeLoad:()=>{throw l({to:`/blog`,statusCode:301,throw:!0})}}),Ix=L(`/carpet-floor-cleaning`)({head:()=>Bg({title:`Carpet & Area Rug Cleaning San Antonio | Fresh Air`,description:`Carpet, area rug and upholstery cleaning in San Antonio. Hot water extraction and fine fabric care by IICRC-certified technicians from a family firm since 1991.`,path:`/carpet-floor-cleaning`,breadcrumb:`Carpet & Area Rug Cleaning`,section:`services`,imageKey:`airMoverCarpet`}),component:R(()=>$(()=>import(`./carpet-floor-cleaning-DFG0h4yd.js`),__vite__mapDeps([23,1,4,13,3,2,6,14,15,19,20,16])),`component`)}),Lx=`/chimney-dryer-vent-cleaning`,Rx=L(`/chimney-dryer-vent-cleaning`)({head:()=>Vg({title:`Chimney & Dryer Vent Cleaning San Antonio | Fresh Air`,description:`Chimney and dryer vent cleaning for San Antonio homes since 1991. We clear lint, creosote, nests and blockages, then verify airflow before we leave the job.`,service:`Chimney & Dryer Vent Cleaning`,path:Lx}),component:R(()=>$(()=>import(`./chimney-dryer-vent-cleaning-BcU83NFE.js`),__vite__mapDeps([24,1,4,18,25,3,2,20,13,6,14,15,16])),`component`)}),zx=L(`/chris-moreno`)({beforeLoad:()=>{throw l({to:`/about`,statusCode:301,throw:!0})}}),Bx=L(`/commercial`)({head:()=>Bg({title:`Commercial Restoration & Cleaning San Antonio | Fresh Air`,description:`Commercial restoration, duct and hood cleaning for San Antonio, the Hill Country, Corpus Christi, the Rio Grande Valley and South Texas. After-hours crews.`,path:`/commercial`,breadcrumb:`Commercial Services`,imageKey:`scaffoldGym`}),component:R(()=>$(()=>import(`./commercial-xojFYK5U.js`),__vite__mapDeps([26,1,3,2,4,20,13,6,14,15,16,27])),`component`)}),Vx=`/commercial-air-duct-cleaning`,Hx=L(`/commercial-air-duct-cleaning`)({head:()=>Vg({title:`Commercial Air Duct Cleaning San Antonio | Fresh Air`,description:`RIA-certified commercial air duct cleaning in San Antonio: supply, return, trunk lines, plenums and coils, with a photo report and after-hours scheduling.`,service:`Commercial Air Duct Cleaning`,path:Vx,areaCommercial:!0}),component:R(()=>$(()=>import(`./commercial-air-duct-cleaning-VJuct0WW.js`),__vite__mapDeps([28,1,4,18,25,3,2,20,13,6,14,15,16])),`component`)}),Ux=L(`/commercial-air-duct-cleaning-sanitizing-and-repair`)({beforeLoad:()=>{throw l({to:`/commercial-air-duct-cleaning`,statusCode:301,throw:!0})}}),Wx=L(`/commercial-dryer-vent-cleaning`)({beforeLoad:()=>{throw l({to:`/commercial-dryer-vent-duct-cleaning`,statusCode:301,throw:!0})}}),Gx=L(`/commercial-dryer-vent-duct-cleaning`)({head:()=>Bg({title:`Commercial Dryer Vent Cleaning San Antonio | Fresh Air`,de
63scription:`Commercial dryer vent and HVAC duct cleaning for San Antonio hotels, laundries, schools and military bases. Lint and fire-risk buildup cleared on your schedule.`,path:`/commercial-dryer-vent-duct-cleaning`,breadcrumb:`Commercial Dryer Vent & Duct Cleaning`,section:`commercial`}),component:R(()=>$(()=>import(`./commercial-dryer-vent-duct-cleaning-BuDvUqWc.js`),__vite__mapDeps([29,1,4,18,13,3,2,6,14,15,19,20,16])),`component`)}),Kx=L(`/commercial-environmental-cleaning-and-remediation`)({beforeLoad:()=>{throw l({to:`/commercial`,statusCode:301,throw:!0})}}),qx=`/commercial-kitchen-vent-hood-cleaning`,Jx=L(`/commercial-kitchen-vent-hood-cleaning`)({head:()=>Vg({title:`Kitchen Vent Hood Cleaning San Antonio | NFPA 96 | Fresh Air`,description:`NFPA 96 compliant kitchen vent hood cleaning in San Antonio. Hood, duct and rooftop fan service with certification stickers and after-hours crews since 1991.`,service:`Commercial Kitchen Vent Hood Cleaning`,path:qx,areaCommercial:!0}),component:R(()=>$(()=>import(`./commercial-kitchen-vent-hood-cleaning-B0qJ2-GB.js`),__vite__mapDeps([30,1,4,13,3,2,6,14,15,16,19,20,27])),`component`)}),Yx=`/commercial-laundry-exhaust-duct-cleaning`,Xx=L(`/commercial-laundry-exhaust-duct-cleaning`)({head:()=>Vg({title:`Commercial Laundry Exhaust Duct Cleaning San Antonio | Fresh Air`,description:`NFPA-standard laundry exhaust duct cleaning in San Antonio. Lint pulled from ducts, hoods, filters and fans for hotels, hospitals, dorms and laundromats.`,service:`Commercial Laundry Exhaust Duct Cleaning`,path:Yx,areaCommercial:!0}),component:R(()=>$(()=>import(`./commercial-laundry-exhaust-duct-cleaning-Dr1PMnN_.js`),__vite__mapDeps([31,1,4,25,3,2,20,13,6,14,15,16])),`component`)}),Zx=`/commercial-mold-inspection`,Qx=L(`/commercial-mold-inspection`)({head:()=>Vg({title:`Commercial Mold Inspection San Antonio | Fresh Air`,description:`Commercial mold inspection in San Antonio: moisture mapping, thermal imaging and air sampling, with documentation property managers and insurers can act on.`,service:`Commercial Mold Inspection`,path:Zx,areaCommercial:!0}),component:R(()=>$(()=>import(`./commercial-mold-inspection-D483A5BM.js`),__vite__mapDeps([32,1,4,33,25,3,2,20,13,6,14,15,16])),`component`)}),$x=`/commercial-mold-remediation`,eS=L(`/commercial-mold-remediation`)({head:()=>Vg({title:`Commercial Mold Remediation San Antonio | TDLR Licensed`,description:`TDLR-licensed commercial mold remediation in San Antonio. Containment, negative air and written protocols built for third-party clearance and tenant occupancy.`,service:`Commercial Mold Remediation`,path:$x,areaCommercial:!0}),component:R(()=>$(()=>import(`./commercial-mold-remediation-BM8fZ9dQ.js`),__vite__mapDeps([34,1,4,35,25,3,2,20,13,6,14,15,16])),`component`)}),tS=`/commercial-odor-removal`,nS=L(`/commercial-odor-removal`)({head:()=>Vg({title:`Commercial Odor Removal San Antonio | Fresh Air`,description:`Commercial odor removal in San Antonio for smoke, sewage, biohazard and dead animal odors. Treated at the source, scheduled after hours to keep doors open.`,service:`Commercial Odor Removal`,path:tS,areaCommercial:!0}),component:R(()=>$(()=>import(`./commercial-odor-removal-DE5EIdaN.js`),__vite__mapDeps([36,1,4,37,25,3,2,20,13,6,14,15,16])),`component`)}),rS=L(`/commercial-water-damage-repair-and-restoration`)({beforeLoad:()=>{throw l({to:`/commercial-water-damage-restoration`,statusCode:301,throw:!0})}}),iS=`/commercial-water-damage-restoration`,aS=L(`/commercial-water-damage-restoration`)({head:()=>Vg({title:`Commercial Water Damage Restoration San Antonio | 24/7`,description:`Commercial water damage restoration in San Antonio, 24/7/365. Two-hour emergency arrival, truck-mounted extraction, drying logs and direct carrier billing.`,service:`Commercial Water Damage Restoration`,path:iS,areaCommercial:!0}),component:R(()=>$(()=>import(`./commercial-water-damage-restoration-QTFY6thS.js`),__vite__mapDeps([38,1,4,39,25,3,2,20,13,6,14,15,16])),`component`)}),oS=L(`/contact`)({head:()=>Bg({title:`Contact Fresh Air Restoration & Cleaning | San Antonio 24/7`,description:`Call (210) 982-0647 for 24/7 water damage, mold and air duct service in San Antonio, or request a free estimate online. Family-owned, TDLR licensed since 1991.`,path:`/contact`,breadcrumb:`Contact`}),component:R(()=>$(()=>import(`./contact-P9P7e5FX.js`),__vite__mapDeps([40,1,4,13,3,2,6,14,16,7,8,9,10,11])),`component`)}),sS=`/dead-animal-removal`,cS=L(`/dead-animal-removal`)({head:()=>Vg({title:`Dead Animal Removal San Antonio | 24/7 | Fresh Air`,de
63scription:`Dead animal removal and odor cleanup in San Antonio. We locate the source in attics, walls, crawlspaces and ducts, remove it and sanitize. Available 24/7/365.`,service:`Dead Animal Removal & Mitigation`,path:sS}),component:R(()=>$(()=>import(`./dead-animal-removal-DIhLSZ62.js`),__vite__mapDeps([41,1,4,37,25,3,2,20,13,6,14,15,16])),`component`)}),lS=L(`/dust-dander-and-mold-how-local-duct-cleaners-improve-your-homes-air-quality`)({beforeLoad:()=>{throw l({to:`/blog`,statusCode:301,throw:!0})}}),uS=[{q:`Can you work after hours?`,a:`Yes. Night and weekend crews are standard for commercial work, so kitchens, lobbies and classrooms stay open.`},{q:`Do you handle multiple properties?`,a:`Yes. One calendar and consolidated invoicing across every site in your portfolio.`},{q:`What documentation do we get?`,a:`Certificates and before-and-after photo reports after every service, including NFPA 96 documentation for kitchen hoods.`},{q:`What areas do you cover?`,a:`San Antonio, the Hill Country, Corpus Christi, the Rio Grande Valley and South Texas.`},{q:`What happens in an emergency?`,a:`Call any time, 24/7/365. Facility Care clients get priority dispatch for water, mold and odor emergencies.`}],dS=()=>$(()=>import(`./facility-care-program-C9iob4Pn.js`),__vite__mapDeps([42,1,2,3,8,9,4,20,10,13,6,14,16,27,11,43])),fS=Bg({title:`Facility Care Program San Antonio | One Vendor, One Invoice`,description:`One agreement for scheduled duct, hood, exhaust and floor care plus priority 24/7 emergency response. For San Antonio property managers, schools, hotels, restaurants and multi-site portfolios.`,path:`/facility-care-program`,breadcrumb:`Facility Care Program`,section:`commercial`,imageKey:`fleetAirMovers`}),pS=L(`/facility-care-program`)({head:()=>({...fS,scripts:[...fS.scripts,{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`FAQPage`,mainEntity:uS.map(e=>({"@type":`Question`,name:e.q,acceptedAnswer:{"@type":`Answer`,text:e.a}}))})}]}),component:R(dS,`component`)}),mS=[{q:`How fast can you get here?`,a:`We answer 24/7/365 and dispatch immediately for active water losses in San Antonio and Bexar County. Emergency arrival is typically within two hours.`},{q:`Do you bill my insurance company?`,a:`Yes. For covered claims we document the loss, work with your adjuster and bill your carrier directly. No upfront money is required on covered claims â you handle your deductible, not the paperwork.`},{q:`Are you licensed for mold work in Texas?`,a:`Yes. We hold TDLR Mold Remediation Company license #RCO0176 and TDLR Mold Remediation Contractor license #MRC0212, and our technicians are IICRC certified.`},{q:`Are estimates free?`,a:`Yes, within San Antonio city limits. Commercial estimates are based on project scope.`},{q:`Do you guarantee your work?`,a:`Every job is backed by our commitment to integrity, professionalism and 100% guaranteed satisfaction. Service-specific warranties depend on the work performed; your estimator will explain exactly what applies to your project before we start.`},{q:`How should I prepare for a water damage visit?`,a:`Remove personal items from the affected area, give us clear access, and photograph the damage if you can. Have a rough idea of when the water started and what caused it. We will walk you through anything else when we schedule.`},{q:`Do you use negative-air (HEPA) equipment?`,a:`Yes. We use negative air machines and HEPA-filtered vacuums so contaminants are captured, not blown back into your home or business.`},{q:`How often should air ducts be cleaned?`,a:`In San Antonio we recommend having ducts cleaned every two years â construction dust and our dry climate load a system faster than in most cities. Sooner with pets, allergies, remodeling dust or a recent water event. Commercial intervals depend on use and occupancy; we'll recommend one after we see the system.`},{q:`Do you offer financing?`,a:`Yes. Enhancify financing is available on restoration and rebuild projects. Ask your estimator to review options during the walkthrough.`},{q:`Do you offer a military discount?`,a:`Active and retired military receive 10% off all services. Mention it on your first call and show ID at the time of service.`},{q:`¿Hablan Español?`,a:`SÃ. Our office and field teams are bilingual, so you can schedule and review your project in Spanish.`}],hS=()=>$(()=>import(`./faqs-Cagil3L7.js`),__vite__mapDeps([44,1,4,13,3,2,6,14,15,16,43])),gS=Bg({title:`FAQs | Water Damage, Mold & Duct Cleaning in San Antonio`,description:`Answers on emergency response times, insurance billing, Texas mold licensing and how often San Antonio homes really need duct cleaning. Ask us anything else.`,path:`/faqs`,breadcrumb:`FAQs`}),_S=L(`/faqs`)({head:()=>({...gS,scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`FAQPage`,mainEntity:mS.map(e=>
63({"@type":`Question`,name:e.q,acceptedAnswer:{"@type":`Answer`,text:e.a}}))})},...gS.scripts]}),component:R(hS,`component`)}),vS=L(`/gallery`)({beforeLoad:()=>{throw l({to:`/major-projects`,statusCode:301,throw:!0})}}),yS=`/hard-floor-cleaning`,bS=L(`/hard-floor-cleaning`)({head:()=>Vg({title:`Hard Floor, Tile & Grout Cleaning San Antonio | Fresh Air`,description:`Tile and grout, natural stone, VCT and hardwood cleaning and sealing in San Antonio. Certified stone and floor care from a family-owned company since 1991.`,service:`Hard Floor Cleaning`,path:yS}),component:R(()=>$(()=>import(`./hard-floor-cleaning-BlmzXXgE.js`),__vite__mapDeps([45,1,4,25,3,2,20,13,6,14,15,16])),`component`)}),xS=L(`/how-duct-cleaners-help-keep-dust-from-taking-over-your-home`)({beforeLoad:()=>{throw l({to:`/blog`,statusCode:301,throw:!0})}}),SS=L(`/how-moisture-problems-lead-to-mold-damage`)({beforeLoad:()=>{throw l({to:`/blog`,statusCode:301,throw:!0})}}),CS=L(`/how-to-tell-if-your-air-ducts-actually-need-cleaning-6-signs-your-hvac-system-is-circulating-more-than-air`)({beforeLoad:()=>{throw l({to:`/blog`,statusCode:301,throw:!0})}}),wS=`/hvac-plenum-cleaning`,TS=L(`/hvac-plenum-cleaning`)({head:()=>Vg({title:`HVAC Plenum Cleaning & Repair San Antonio | Fresh Air`,description:`Supply and return plenum cleaning in San Antonio, plus coil and blower detailing and liner repair, by RIA-certified Mechanical Systems Hygiene technicians.`,service:`HVAC Plenum Cleaning & Repair`,path:wS}),component:R(()=>$(()=>import(`./hvac-plenum-cleaning-D3DpYoRR.js`),__vite__mapDeps([46,1,4,22,14,6,25,3,2,20,13,15,16])),`component`)}),ES=`/hvac-uv-light-installation`,DS=L(`/hvac-uv-light-installation`)({head:()=>Vg({title:`HVAC UV Light Installation San Antonio | Fresh Air`,description:`UV-C light installation in your San Antonio HVAC system to knock down bacteria, mold spores and allergens as air circulates. Installed by certified techs.`,service:`HVAC UV Light Installation`,path:ES}),component:R(()=>$(()=>import(`./hvac-uv-light-installation-jIELLI_H.js`),__vite__mapDeps([47,1,4,25,3,2,20,13,6,14,15,16])),`component`)}),OS=L(`/major-projects`)({head:()=>Bg({title:`Major Projects & Case Studies | Fresh Air Restoration San Antonio`,description:`Three decades of institutional work in San Antonio: Fort Sam Houston, AT&T buildings, the Department of Veterans Affairs and the Tower of the Americas HVAC job.`,path:`/major-projects`,breadcrumb:`Major Projects`,imageKey:`fleet`}),component:R(()=>$(()=>import(`./major-projects-5kKM8Phe.js`),__vite__mapDeps([48,1,3,2,4,20,6,13,14,15,16,49])),`component`)}),kS=L(`/meet-the-team`)({beforeLoad:()=>{throw l({to:`/about`,statusCode:301,throw:!0})}}),AS=`/mold-inspection`,jS=L(`/mold-inspection`)({head:()=>Vg({title:`Mold Inspection San Antonio | Fresh Air Restoration`,description:`Mold inspection in San Antonio with moisture meters, thermal imaging and air sampling. Written report with photos from a TDLR-licensed team since 1991.`,service:`Mold Inspection`,path:AS}),component:R(()=>$(()=>import(`./mold-inspection-CpimDvCS.js`),__vite__mapDeps([50,1,4,33,25,3,2,20,13,6,14,15,16])),`component`)}),MS=`/mold-remediation`,NS=L(`/mold-remediation`)({head:()=>Vg({title:`Mold Remediation San Antonio | TDLR Licensed | Fresh Air`,description:`TDLR-licensed mold remediation in San Antonio since 1991. Containment, HEPA filtration and clearance-ready work, billed straight to your insurance carrier.`,service:`Mold Remediation`,path:MS}),component:R(()=>$(()=>import(`./mold-remediation-C7La_oYe.js`),__vite__mapDeps([51,1,4,35,13,3,2,6,14,15,19,20,16])),`component`)}),PS=`/odor-removal`,FS=L(`/odor-removal`)({head:()=>Vg({title:`Odor & Dead Animal Removal San Antonio | Fresh Air`,description:`Odor removal in San Antonio for smoke, pet, sewage and biological smells. We find and treat the source instead of masking it, then verify the air is clear.`,service:`Odor Removal`,path:PS}),component:R(()=>$(()=>import(`./odor-removal-CCZKYwkO.js`),__vite__mapDeps([52,1,4,37,13,3,2,6,14,15,19,20,16])),`component`)}),IS=L(`/privacy`)({head:()=>Bg({title:`Privacy Policy | Fresh Air Restoration & Cleaning San Antonio`,description:`How Fresh Air Restoration & Cleaning of San Antonio collects, uses and protects customer information, including SMS consent, text message and opt-out terms.`,path:`/privacy`,breadcrumb:`Privacy Policy`}),component:R(()=>$(()=>import(`./privacy-L1_s0YZp.js`),__vite__mapDeps([53,1,14,6,4])),`component`)}),LS=L(`/rebuilding-and-repair-services`)({head:()=>Bg({title:`Rebuilding & Repair Services San Antonio | Fresh Air Restoration`,description:`Rebuild and repair after water, fire or mold damage in San Antonio. Drywall, flooring, paint and trim handled in-house by one San Antonio contractor since 1991.`,path:`/rebuilding-and-repair-services`,breadcrumb:`Rebuilding & Repair`,
63section:`services`,imageKey:`checkeredBath`}),component:R(()=>$(()=>import(`./rebuilding-and-repair-services-yQyqT1KS.js`),__vite__mapDeps([54,1,4,55,13,3,2,6,14,15,19,20,16])),`component`)}),RS=L(`/request-callback-form`)({beforeLoad:()=>{throw l({to:`/contact`,statusCode:301,throw:!0})}}),zS=L(`/residential-air-duct-cleaning-sanitizing-and-repair`)({beforeLoad:()=>{throw l({to:`/air-duct-cleaning`,statusCode:301,throw:!0})}}),BS=L(`/residential-carpet-and-area-rug-cleaning`)({beforeLoad:()=>{throw l({to:`/carpet-floor-cleaning`,statusCode:301,throw:!0})}}),VS=L(`/residential-dead-animal-removal-and-mitigation`)({beforeLoad:()=>{throw l({to:`/dead-animal-removal`,statusCode:301,throw:!0})}}),HS=L(`/residential-environmental-cleaning-and-remediation`)({beforeLoad:()=>{throw l({to:`/`,statusCode:301,throw:!0})}}),US=L(`/residential-hard-floor-cleaning`)({beforeLoad:()=>{throw l({to:`/hard-floor-cleaning`,statusCode:301,throw:!0})}}),WS=L(`/residential-hvac-plenum-cleaning-and-repair`)({beforeLoad:()=>{throw l({to:`/hvac-plenum-cleaning`,statusCode:301,throw:!0})}}),GS=L(`/residential-hvac-system-uv-light-installation`)({beforeLoad:()=>{throw l({to:`/hvac-uv-light-installation`,statusCode:301,throw:!0})}}),KS=L(`/residential-mold-inspection`)({beforeLoad:()=>{throw l({to:`/mold-inspection`,statusCode:301,throw:!0})}}),qS=L(`/residential-mold-remediation`)({beforeLoad:()=>{throw l({to:`/mold-remediation`,statusCode:301,throw:!0})}}),JS=L(`/residential-odor-removal`)({beforeLoad:()=>{throw l({to:`/odor-removal`,statusCode:301,throw:!0})}}),YS=L(`/residential-water-damage-repair-and-restoration`)({beforeLoad:()=>{throw l({to:`/water-damage-restoration`,statusCode:301,throw:!0})}}),XS=L(`/reviews`)({head:()=>Bg({title:`Reviews | Fresh Air Restoration & Cleaning San Antonio`,description:`4.4 stars across 31 Google reviews for Fresh Air Restoration & Cleaning in San Antonio, plus BBB A+ and the Angi Super Service Award 8 of the last 10 years.`,path:`/reviews`,breadcrumb:`Reviews`}),component:R(()=>$(()=>import(`./reviews-Be42EwKg.js`),__vite__mapDeps([56,1,4,5,13,3,2,6,14,15,16])),`component`)}),ZS=L(`/serving-area`)({head:()=>Bg({title:`Service Area | San Antonio, Bexar County & South Texas | Fresh Air`,description:`Residential service across San Antonio, Bexar County and 100 miles out, with commercial and military work throughout South Texas. Family-owned since 1991.`,path:`/serving-area`,breadcrumb:`Serving Area`}),component:R(()=>$(()=>import(`./serving-area-eJI5ti_y.js`),__vite__mapDeps([57,1,3,2,4,13,6,14,15])),`component`)}),QS=L(`/special-offers`)({head:()=>Bg({title:`Special Offers | Military Discount & Financing | Fresh Air San Antonio`,description:`Current Fresh Air offers in San Antonio: Whole-House Allergy Treatment, 10% off all services for active and retired military, and Enhancify monthly financing.`,path:`/special-offers`,breadcrumb:`Special Offers`}),component:R(()=>$(()=>import(`./special-offers-C5iL8AJy.js`),__vite__mapDeps([58,1,4,13,3,2,6,14,15])),`component`)}),$S=`/structural-damage-repair`,eC=L(`/structural-damage-repair`)({head:()=>Vg({title:`Structural Damage Repair San Antonio | Fresh Air Restoration`,description:`Structural damage repair in San Antonio after water, fire or mold. We rebuild walls, ceilings, joists and subfloors to code with our own crews since 1991.`,service:`Structural Damage Repair`,path:$S}),component:R(()=>$(()=>import(`./structural-damage-repair-DkLVku_f.js`),__vite__mapDeps([59,1,4,55,25,3,2,20,13,6,14,15,16])),`component`)}),tC=L(`/terms`)({head:()=>Bg({title:`Terms of Service | Fresh Air Restoration & Cleaning San Antonio`,description:`Terms covering estimates, scheduling, payment, insurance billing and communications with Fresh Air Restoration & Cleaning, a San Antonio company since 1991.`,path:`/terms`,breadcrumb:`Terms of Service`}),component:R(()=>$(()=>import(`./terms-CjvYtiGy.js`),__vite__mapDeps([60,1,14,6,4])),`component`)}),nC=`/water-damage-restoration`,rC=L(`/water-damage-restoration`)({head:()=>Vg({title:`Water Damage Restoration in San Antonio | Fresh Air Restoration`,description:`Emergency water damage restoration in San Antonio, 24/7/365 since 1991. Extraction, structural drying and direct insurance billing. Call (210) 982-0647.`,
63service:`Water Damage Restoration`,path:nC}),component:R(()=>$(()=>import(`./water-damage-restoration-B3Foi_bp.js`),__vite__mapDeps([61,1,4,39,13,3,2,6,14,15,16,19,20,49])),`component`)}),iC=L(`/why-clean-your-air-ducts`)({beforeLoad:()=>{throw l({to:`/blog`,statusCode:301,throw:!0})}}),aC=L(`/why-it-is-worth-hiring-a-local-duct-cleaner-this-summer`)({beforeLoad:()=>{throw l({to:`/blog`,statusCode:301,throw:!0})}}),oC=L(`/why-your-diy-bleach-spray-can-t-replace-certified-mold-remediation`)({beforeLoad:()=>{throw l({to:`/blog`,statusCode:301,throw:!0})}}),sC=L(`/admin/leads`)({head:()=>({meta:[{title:`Lead Inbox | Fresh Air Restoration & Cleaning`},{name:`description`,content:`Private lead inbox for Fresh Air Restoration & Cleaning.`},{name:`robots`,content:`noindex, nofollow`}]}),component:R(()=>$(()=>import(`./admin.leads-DMv8cBcw.js`),__vite__mapDeps([62,1,2,8,9])),`component`)}),cC=L(`/blog/`)({head:()=>Bg({title:`Restoration Blog | Fresh Air Restoration & Cleaning San Antonio`,description:`Straight advice on water damage, mold licensing, humidity and indoor air quality from the San Antonio restoration family that has worked here since 1991.`,path:`/blog`,breadcrumb:`Blog`}),component:R(()=>$(()=>import(`./blog.index-blsCZJN6.js`),__vite__mapDeps([63,1,3,2,4,6,14,15,16])),`component`)}),lC=[{slug:`duct-cleaning-or-mold-remediation-which-one-do-you-need`,title:`Duct Cleaning or Mold Remediation?`,seoTitle:`Duct Cleaning vs Mold Remediation | San Antonio`,excerpt:`A duct cleaning and a mold remediation are not the same job, and in Texas they are not even the same credential. Here is how to tell which one your house needs.`,metaDescription:`Duct cleaning and mold remediation are different jobs with different credentials in Texas. How to tell which one your San Antonio home actually needs.`,date:`2026-09-18`,readTime:`8 min read`,category:`Mold Remediation`,photo:`utilityCloset`,sections:[{heading:`Two searches, one problem`,paragraphs:[`People call us about the same situation using two different phrases. Some ask for duct cleaning because the house smells musty when the air conditioning kicks on. Others ask for mold removal because they have seen something dark around a register or on the ceiling near a vent. Often those are the same problem caught at different stages.`,`The two services are not interchangeable, though. They involve different equipment, different paperwork and, in Texas, different credentials. Knowing which one you are buying protects you from paying for the wrong scope, or from paying twice.`]},{heading:`What a duct cleaning actually is`,paragraphs:[`A duct cleaning is mechanical work on the air distribution system. Supply runs, return runs, trunk lines, the plenum, the coil and the blower all get cleaned so the system stops circulating what has settled inside it. Done properly it covers the whole system rather than the few feet of duct visible behind a register.`,`It is maintenance. It removes accumulated dust, construction debris, pet dander and the film that builds up around a sweating plenum in a South Texas attic. Many jobs finish with an antimicrobial fog, and some homes benefit from UV-C at the coil to slow regrowth between cleanings.`,`What it is not is a remediation. A cleaning does not come with containment, clearance documentation, or a protocol written for a third-party test. If there is active mold growth in the system, cleaning alone can move spores around the house rather than remove the problem.`]},{heading:`What mold remediation actually is`,paragraphs:[`Remediation is the controlled removal of active growth. The work area is sealed, put under negative pressure and filtered through HEPA so that spores disturbed during removal do not travel into clean rooms. Materials that cannot be cleaned come out. What remains is treated, and the work is documented.`,`In Texas, this is licensed work. The state licenses both the company performing the remediation and the individual contractor supervising it. We hold both, TDLR Mold Remediation Company #RCO0176 and Contractor #MRC0212, and have since Texas began licensing mold remediation in 2004. Our duct-cleaning side is certified separately, through ASCR and RIA in Mechanical Systems Hygiene.`,`That distinction matters for a practical reason: documentation. If an insurance carrier or a buyer inspector asks what was done, a remediation produces a re
63cord. A cleaning produces an invoice.`]},{heading:`Where the two meet: the air handler`,paragraphs:[`Most of the confusion comes from one place. The air handler is where a mold problem and a mechanical problem become the same problem. It is dark, it holds condensate, and in a San Antonio summer it runs for months pulling humid air across a cold coil. Attic-mounted equipment makes it worse, because the space around it stays hot and the temperature difference at the coil is larger.`,`So mold in a duct system is both. Remediate the room and leave the system, and the next cooling cycle can reintroduce spores through the vents. Clean the system and leave the moisture source, and it comes back, usually within a season.`,`That is why we scope both sides together on these jobs, and it is the whole argument for [handling mold in the ducts with one licensed crew](/air-duct-mold-removal) instead of two contractors working around each other.`]},{heading:`How to tell which one you need`,paragraphs:[`A few rules of thumb from the field. If the only symptom is a musty smell, there has been no water event you know about, and nothing is visible at the registers, the likely answer is a cleaning plus a hunt for the moisture source. Smell without visible growth is usually dust, biofilm around the drain pan, or something that got wet once and dried.`,`If you can see growth, on the ceiling around a vent, on the coil, inside the plenum, or on the closet wall behind the air handler, start with an inspection rather than a cleaning. The same goes for a house where the smell returns reliably every time the system cycles on, or where there has been a roof leak, a supply-line failure or a backed-up condensate drain.`,`And if the growth covers a meaningful area of the building rather than the mechanical system, that is a structural remediation with the duct work as one part of the scope, not the other way around.`]},{heading:`Questions worth asking whoever you call`,paragraphs:[`Ask what license or certification the work is being performed under, and ask for the scope in writing before anyone starts. Those two questions sort out most of the ambiguity in this trade.`,`Ask whether the price covers the whole system or only the accessible runs. Ask whether an inspection happens before the scope is set, or whether the scope was decided over the phone. Ask what documentation you get at the end, and whether it is the kind an insurance carrier or a future buyer inspector will accept.`,`We are a family business that has worked out of the same shop on Basse Road since 1991, and we would rather tell you that you need a cleaning than sell you a remediation you do not. If the answer is genuinely unclear, an inspection is the cheap way to find out.`]}],related:[{label:`Air Duct Mold Removal`,to:`/air-duct-mold-removal`,line:`Both trades handled by one licensed crew.`},{label:`Mold Inspection`,to:`/mold-inspection`,line:`Find out what you are actually dealing with first.`},{label:`Air Duct Cleaning`,to:`/air-duct-cleaning`,line:`Whole-system cleaning for San Antonio homes.`}]},{slug:`why-it-is-worth-hiring-a-local-duct-cleaner-this-summer`,title:`Why a Local Duct Cleaner Matters This Summer`,seoTitle:`Why Hire a Local Duct Cleaner This Summer | Fresh Air`,excerpt:`San Antonio summers punish HVAC systems. A local crew knows the equipment, attic heat and homes behind every service call.`,metaDescription:`Why a local duct cleaner beats a call center in a San Antonio summer: attic heat, honest pricing and crews who know these homes. Family-owned since 1991.`,date:`2026-08-19`,readTime:`7 min read`,category:`Air Duct Cleaning`,photo:`crewAlamo`,sections:[{heading:`Summer changes the job`,paragraphs:[`By August, an air-conditioning system in San Antonio has been running hard for months. The attic is brutally hot. Filters load faster. Dust sticks to damp surfaces around a sweating plenum or drain pan. A duct-cleaning crew needs to understand those conditions before opening the first register.`,`We have worked from our shop at 2418 Basse Rd since long before online lead companies existed. Our crews know the common layouts in older central San Antonio homes, slab-foundation houses, Hill Country construction and newer systems spread across large attics. That local experience saves time because we know
63where the difficult access points usually are.`,`It also helps us schedule honestly. When the heat is relentless, every HVAC-related company gets busy. A local dispatcher knows where the crews are and what equipment is on each truck. We can offer same-week scheduling when the board allows it, without promising a time from a call center several states away.`]},{heading:`The price should make sense`,paragraphs:[`San Antonio homeowners see plenty of ads for a â$79 whole houseâ duct cleaning. That price does not cover the labor, equipment and time required to clean an entire HVAC system correctly. It is usually an opening price. Once a crew arrives, the definition of âwhole houseâ can get very small or the add-on list can get very long.`,`A proper [air duct cleaning](/air-duct-cleaning) proposal should identify the system being cleaned and the work included. We look at the supply and return runs, registers, plenum and accessible mechanical components. If we see damage, moisture or suspected growth, we explain it. We do not turn every dusty register into an emergency.`,`Ask any company who will actually arrive, where that crew is based and what happens if you have a question after the invoice. If the answer is another toll-free number, you may be buying a lead that has been resold to a subcontractor.`]},{heading:`Local layouts matter`,paragraphs:[`Our housing stock is not uniform. A 1950s home near Basse Road can have additions, patched duct runs and a return that was altered more than once. A newer house may have long flexible ducts laid across a huge attic. Commercial buildings can have rooftop units, high returns and occupied areas that require careful staging.`,`Crews who work here every week understand attic heat and South Texas humidity. They also recognize the connection between a clogged condensate line, a damp plenum and a musty odor at startup. Sometimes the right next step is [HVAC plenum cleaning](/hvac-plenum-cleaning). Sometimes it is an HVAC repair by the homeownerâs mechanical contractor. Good service includes knowing the difference.`,`Cedar and oak seasons also shape the calls we receive. Duct cleaning can remove accumulated debris inside a system, but it cannot stop outdoor pollen from entering when doors open. We set that expectation before work starts.`]},{heading:`Accountability is close by`,paragraphs:[`Fresh Air Restoration & Cleaning is family-owned and has served San Antonio since 1991. You can drive to our shop. You can call the same local number after the job. The people answering know the crews and the work order. That is a simple difference, but it matters when your air conditioner is running nonstop and you need a straight answer.`,`We are IICRC certified and RIA-certified in Mechanical Systems Hygiene. Those credentials guide the work, but accountability is more basic: protect the home, explain what we found, clean the system we agreed to clean and leave the registers and work areas in order.`,`If the inspection shows the ducts are not the problem, we will say so. Not every comfort issue calls for cleaning. Uneven temperatures may come from damaged ductwork, poor balancing or equipment trouble. A local company earns the next call by being honest on this one.`]}],related:[{label:`Air Duct Cleaning`,to:`/air-duct-cleaning`,line:`Whole-system cleaning for San Antonio homes.`},{label:`HVAC Plenum Cleaning`,to:`/hvac-plenum-cleaning`,line:`Clean the central air-distribution box and nearby components.`},{label:`HVAC UV Light Installation`,to:`/hvac-uv-light-installation`,line:`Targeted UV-C treatment where it makes sense.`}]},{slug:`how-to-tell-if-your-air-ducts-actually-need-cleaning-6-signs-your-hvac-system-is-circulating-more-than-air`,title:`6 Honest Signs Your Air Ducts Need Cleaning`,seoTitle:`6 Signs Your Air Ducts Need Cleaning | San Antonio`,excerpt:`Dusty registers do not tell the whole story. These six practical signs help San Antonio homeowners decide when to inspect the system.`,metaDescription:`Six honest signs your San Antonio air ducts need cleaning, from dust at the registers to musty startup smells, explained by RIA
63-certified techs since 1991.`,date:`2026-08-18`,readTime:`8 min read`,category:`Air Duct Cleaning`,photo:`ductDirty`,sections:[{heading:`Start with what you can see`,paragraphs:[`The first sign is visible dust building around supply registers soon after you wipe them clean. A light gray edge after months of use is normal. Thick buildup, dark streaks or debris blowing onto furniture deserves a closer look. Remove one register with the system off and use a flashlight. Do not reach into the duct or disturb anything you cannot identify.`,`The second sign is a filter that loads up in a few weeks instead of lasting through its normal service interval. We pull filters caked shut every August. Sometimes the duct system is contributing. Sometimes a renovation, a return-air leak, pets or a filter that is too restrictive for the equipment is the real cause. The filter is evidence, not a diagnosis.`,`Keep the old filter and note the installation date. That simple record gives an HVAC or [air duct cleaning](/air-duct-cleaning) technician useful information.`]},{heading:`Listen to the rooms`,paragraphs:[`The third sign is uneven room temperature combined with weak airflow at certain registers. Debris can restrict a duct, but so can a collapsed flexible run, a closed damper, a disconnected joint or an equipment problem. In San Antonio attics, flexible duct can be pinched by stored boxes or damaged during other work.`,`Compare similar rooms while the system is running. If one register barely moves air, note it. A whole-house cleaning will not repair a crushed duct. We would rather identify the physical problem than sell cleaning that cannot fix it.`,`The fourth sign is a musty smell when the system first kicks on. That odor can come from a damp drain pan, dirty coil area, wet insulation or buildup in the plenum. South Texas humidity makes moisture around HVAC equipment worth investigating. [HVAC plenum cleaning](/hvac-plenum-cleaning) may be part of the answer, but the moisture source must be corrected too.`]},{heading:`Notice how the house feels`,paragraphs:[`The fifth sign is allergy irritation that seems worse indoors than outside. Cedar and oak pollen are part of life here, so timing matters. If symptoms continue after outdoor counts change, look at the filter, indoor humidity, pets, visible dust and any history of water intrusion. Duct cleaning may reduce accumulated material being recirculated, but it is not an allergy cure.`,`The sixth sign is visible debris inside the plenum. The plenum is the large box connected to the air handler where air is distributed into the ducts. Heavy dust, deteriorated lining, water staining or suspected growth there should be evaluated. Do not open sealed equipment panels unless you know how to do it safely.`,`A musty plenum can point to a condensate issue. Suspected microbial growth changes the scope from routine cleaning to an inspection and possibly licensed [mold remediation](/mold-remediation).`]},{heading:`Annual cleaning is not a rule`,paragraphs:[`Not every home needs its ducts cleaned every year. A tight system with good filtration, no remodeling dust, no moisture problem and no visible buildup may go much longer. We do not use a calendar alone to recommend service.`,`Cleaning becomes more reasonable after major construction, a confirmed contamination event, years of neglected filtration, pest activity or visible accumulation throughout the system. The inspection should connect the recommendation to something you can see or document.`,`Fresh Air has served San Antonio since 1991 and is RIA-certified in Mechanical Systems Hygiene. Our job is to look at the whole system and give you a useful answer. If the ducts need cleaning, we explain the scope. If the issue belongs with an HVAC repair company or a licensed mold assessment, we tell you that too.`,`Before scheduling, take pictures of the registers, filter and any visible plenum debris. Note when odors appear and which rooms feel different. Those details help us separate a system-wide issue from one damaged run or one damp area.`]}],related:[{label:`Air Duct Cleaning`,to:`/air-duct-cleaning`,line:`Inspect and clean the complete air-distribution system.`},{label:`HVAC Plenum Cleaning`,to:`/hvac-plenum-cleaning`,line:`Address buildup in the systemâs central air box.`},{label:`Mold Inspection`,to:`/mold-inspection`,line:`Evaluate suspected growth and identify the right next step.`}]},{slug:`dust-dander-and-mold-how-local-duct-cleaners-improve-your-homes-air-quality`,title:`What Builds Up Inside South Texas Air Ducts`,seoTitle:`Dust, Dander and Mold in Air Ducts | San Antonio`,excerpt:`A clear look at what collects in local duct systems, what proper cleaning removes and when moisture turns a duct call into a mold job.`,metaDescription:`Dust, dander and mold in San Antonio duct systems: what proper cleaning removes, what it cannot fix, and when moisture turns it into a licensed mold job.`,date:`2026-07-05`,readTime:`7 min read`,category:`Indoor Air Quality`,photo:`ductInterior`,sections:[{heading:`Dust is never just dust`,paragraphs:[`Open a neglected return in a San Antonio home and
63you may find ordinary house dust, pet hair, fibers, skin flakes, renovation debris and outdoor soil. During cedar and oak seasons, pollen enters on clothing, shoes and every opened door. The return side of the system pulls part of that mixture toward the filter.`,`A good filter catches a great deal, but filters are not perfect and systems are not always tight. Gaps around return boxes, poorly fitted filters and older duct joints allow material to bypass filtration. We also see drywall dust left after remodeling and insulation disturbed during attic work.`,`That material can settle in ducts and the plenum. Whether it needs professional [air duct cleaning](/air-duct-cleaning) depends on how much is present, whether it is moving into rooms and whether moisture is involved.`]},{heading:`Humidity changes the picture`,paragraphs:[`Dry dust is one problem. Damp dust is another. South Texas air carries moisture, and an air-conditioning system creates condensation by design. A blocked drain, sweating cabinet, poorly insulated duct or overflowing pan can wet the surfaces around the air handler.`,`Dust and organic debris hold that moisture. If suspected growth appears on porous duct liner, insulation or nearby building material, simply vacuuming the visible area is not enough. The water source has to be corrected and the affected material has to be evaluated.`,`Texas licenses mold remediation. Fresh Air holds TDLR Mold Remediation Company #RCO0176 and TDLR Mold Remediation Contractor #MRC0212, and we were among the first companies licensed when the state program began. We keep routine duct cleaning separate from licensed [mold remediation](/mold-remediation) because the controls and documentation are different.`]},{heading:`What proper cleaning can remove`,paragraphs:[`A proper job removes accessible accumulated debris from the air-distribution system. That includes supply and return ducts, registers and the plenum areas covered by the agreed scope. Mechanical agitation loosens material. Negative pressure and collection equipment capture it instead of pushing it into the rooms.`,`Cleaning can reduce the dust available to be reintroduced into the house. It can improve airflow when buildup is part of the restriction. It may also remove a stale odor when the odor source is dry debris inside the system.`,`Cleaning does not seal a leaky return, repair a damaged condensate line, replace wet insulation or stop pollen at the front door. It does not remove a pet allergen from carpets and furniture. A crew should explain those limits before setting up equipment.`]},{heading:`Know when the scope has changed`,paragraphs:[`If a technician sees water staining, active moisture, deteriorated liner or suspected growth, the work should pause long enough to identify the cause. Continuing to stir up material without containment can make the problem harder to manage.`,`Sometimes the right path is cleaning plus an HVAC repair. Sometimes it is [mold inspection](/mold-inspection) and a written remediation plan. On commercial systems, access, occupied areas and mechanical hygiene requirements may call for a [commercial air duct cleaning](/commercial-air-duct-cleaning) scope.`,`Fresh Air is IICRC certified and RIA-certified in Mechanical Systems Hygiene. We have worked from 2418 Basse Rd since 1991. That experience has taught us to treat the system in front of us, not force every house into the same package.`,`Before approving work, ask to see the areas that drove the recommendation. A clear photograph of buildup, moisture staining or damaged liner is more useful than a vague warning. The proposal should name the system, the access points and the surfaces being cleaned.`,`After cleaning, filtration still matters. Install the correct filter, write the date on it and check the return for gaps. If humidity or drainage caused the buildup, confirm that repair instead of assuming clean ducts will stay clean on their own.`]}],related:[{label:`Air Duct Cleaning`,to:`/air-duct-cleaning`,line:`Remove accumulated debris from the complete system.`},{label:`Mold Inspection`,to:`/mold-inspection`,line:`Investigate moisture and suspected growth before work begins.`},{label:`Mold Remediation`,to:`/mold-remediation`,line:`TDLR-licensed containment and removal when cleaning is not enough.`}]},{slug:`areas-of-the-home-most-vulnerable-to-mold-growth`,title:`Where Mold Hides in San Antonio Homes`,seoTitle:`Where Mold Grows in San Antonio Homes | Fresh Air`,excerpt:`Six places we inspect first in San Antonio homes, from sink cabinets and washer boxes to AC plenums, slab-level walls and attics.`,metaDescription:`The six spots we check first for mold in San Antonio homes: sink cabinets, washer boxes, AC plenums, slab-level walls, attics and bathrooms. TDLR licensed.`,date:`2026-06-29`,readTime:`8 min read`,category:`Mold`,photo:`moldBaseboardTile`,sections:[{heading:`Start where water is used`,paragraphs:[`Under kitchen and bathroom sinks is the first place to look. Supply valves seep. Disposal connections loosen. A drain can leak only when the basin is full. The cabinet floor may hide the evidence until it swells or the baseboard outside the cabinet changes color.`,`Use a flashlight and feel around the shutoff valves with a dry paper towel. A small recurring drip can keep particleboard and drywall damp without leaving a puddle. If the material smells musty or feels soft, stop the leak before cleaning the surface.`,`Behind washing machines is another common location. Washer hoses, drain standpipes and supply boxes sit out of sight. After the 2021 and 2023 freezes, we opened walls across San Antonio where burst or cracked lines had soaked insulation and drywall behind appliances.`]},{heading:`Check the air-conditioning system`,paragraphs:[`The AC plenum and drain pan deserve attention because the system runs almost nonstop during a humid summer. Condensation is normal. Standing water, wet insulation and repeated drain backups are not.`,`A musty smell when the system starts can come from the plenum, coil area or nearby wet building material. Dust on a damp porous liner creates conditions where growth can develop. [HVAC plenum cleaning](/hvac-plenum-cleaning) may remove buildup, but a leak or drainage problem has to be repaired or the condition returns.`,`Do not spray household cleaner into the equipment. Turn the system off if water is near electrical components and call the appropriate HVAC professional. If suspected mold extends into building materials, arrange a [mold inspection](/mold-inspection).`]},{heading:`Read the baseboards`,paragraphs:[`At slab level, baseboards often tell the story first. A dark line, peeling paint, swollen trim or flooring that lifts along one wall can point to a plumbing leak, exterior water entry or moisture moving from an adjacent room.`,`San Antonio has many slab-foundation homes. A supply or drain problem below or within the slab may appear far from the source. Drying the visible floor does not prove the wall cavity is dry. We use moisture readings and, when needed, open a controlled area to inspect what is behind the finish.`,`Water heater closets create similar hidden damage. A relief valve, pan drain or c
63onnection can leak slowly. The closet may stay warm, dark and poorly ventilated, so the lower drywall and platform should be checked whenever the heater is serviced.`]},{heading:`Look up after storms`,paragraphs:[`Attic decking and roof penetrations are vulnerable after wind-driven rain. Flashing around vents, chimneys and roof transitions can admit a small amount of water that never reaches the living-room floor. Wet insulation may hold it against the decking.`,`Hill Country limestone exteriors can complicate tracing because water may enter at a roof or wall detail and travel before it shows indoors. Brown ceiling staining, compressed insulation or rusted fasteners help narrow the path.`,`Finding suspected growth does not tell you how far it extends or why it started. Texas requires licensed professionals for regulated mold work over the state threshold. Fresh Air holds TDLR company license #RCO0176 and contractor license #MRC0212. Our [mold remediation](/mold-remediation) work focuses on containment, removal and correcting the moisture conditions behind the damage.`,`A flashlight check twice a year can prevent surprises. Look below sinks, around washer connections and at the water heater pan. Check the AC drain before summer and scan attic decking after a hard storm. You are looking for a change: fresh staining, swelling, dampness or a new odor.`,`If you find one, photograph it before moving material. Do not close wet cabinets or stack belongings against a damp wall. Stop the source if it is safe, then get the hidden side checked. Early access is usually simpler than opening a larger area after finishes begin to fail.`]}],related:[{label:`Mold Inspection`,to:`/mold-inspection`,line:`Find the moisture source and document visible conditions.`},{label:`Mold Remediation`,to:`/mold-remediation`,line:`Licensed containment and removal for affected materials.`},{label:`Water Damage Restoration`,to:`/water-damage-restoration`,line:`Extract water and dry the structure after a leak.`}]},{slug:`why-your-diy-bleach-spray-can-t-replace-certified-mold-remediation`,title:`Why Bleach Is Not Mold Remediation`,seoTitle:`Why Bleach Cannot Replace Mold Remediation | San Antonio`,excerpt:`Bleach may lighten a stain, but porous materials, hidden moisture and airborne debris require containment, removal and licensed judgment.`,metaDescription:`Why bleach cannot replace certified mold remediation in San Antonio: porous materials, hidden moisture and airborne spores need containment and TDLR licensing.`,date:`2026-06-22`,readTime:`8 min read`,category:`Mold Remediation`,photo:`containmentNegAir`,sections:[{heading:`A lighter stain is not removal`,paragraphs:[`Bleach can change the color of growth on a hard surface. That visual change makes a homeowner feel like the problem is gone. On drywall, wood, insulation and other porou
63s materials, the visible surface is only part of the material.`,`Liquid can soak into those pores while the active ingredients behave differently at the surface. More important, spraying does not remove contaminated dust or damaged material. It leaves the source in place and adds moisture to an area that may already be wet.`,`The goal of [mold remediation](/mold-remediation) is not simply to kill something. The goal is to remove affected material and settled contamination under controlled conditions, clean the remaining surfaces and address the water source that allowed growth to develop.`]},{heading:`Containment protects the clean rooms`,paragraphs:[`Cutting mold-damaged drywall releases dust and fragments. Without containment, foot traffic and air movement can carry that debris into bedrooms, closets and the HVAC return. A plastic sheet draped across a doorway is not the same as a controlled work area.`,`We build containment around the affected space and use negative-air equipment with HEPA filtration. Negative pressure directs air into the work zone instead of letting it escape through gaps. Workers use protective equipment and follow a clean entry and exit process.`,`The setup can look excessive when the visible patch is small. It exists because removal is the dusty part of the job. Protecting the rest of the building is just as important as opening the damaged wall.`]},{heading:`Texas requires real credentials`,paragraphs:[`Texas is one of the few states that licenses mold remediation. For projects above the state threshold, state rules separate assessment from remediation and require licensed companies and contractors, a written protocol, controlled work practices and documentation.`,`Fresh Air Restoration & Cleaning holds TDLR Mold Remediation Company #RCO0176 and TDLR Mold Remediation Contractor #MRC0212. We were among the first licensed under the Texas program. Those numbers are not marketing initials. They identify the company and contractor responsible for regulated work.`,`A proper [mold inspection](/mold-inspection) helps define the affected area and the moisture source. On a regulated project, an independent licensed mold assessment consultant establishes the protocol and performs clearance. The remediator should not write its own passing grade.`]},{heading:`Fix the water or it comes back`,paragraphs:[`Mold is a moisture problem before it is a cleaning problem. We find it behind washing machines, under sinks, around AC plenums, at slab-level baseboards and below roof leaks. Spraying the stain without repairing the pipe, drain, flashing or condensation problem only resets the clock.`,`After the source is stopped, the structure still has to be dried. Surface paint can feel dry while insulation, studs or the back of drywall remain wet. Moisture readings and controlled access tell us more than touch alone.`,`Fresh Air is family-owned, IICRC certified and based at 2418 Basse Rd. We answer 24/7/365 for water losses and bill insurance carriers directly when the loss is covered. If you are looking at a stain and are unsure whether it is a simple maintenance issue or a remediation project, get the condition evaluated before you start cutting or spraying.`,`For a small spot on a hard, nonporous bathroom surface, routine cleaning and better moisture control may be enough. For soft drywall, insulation, ceiling tile or wood that stayed wet, the question is different. The material itself may need removal rather than another chemical.`,`Take pictures and write down when the leak or odor began. If an insurance claim may apply, save damaged supply lines and receipts when practical. Clear documentation helps the adjuster understand the loss and keeps the work tied to what actually happened.`]}],related:[{label:`Mold Inspection`,to:`/mold-inspection`,line:`Document suspected growth and locate the moisture source.`},{label:`Mold Remediation`,to:`/mold-remediation`,line:`TDLR-licensed containment, removal and cleaning.`},{label:`Water Damage Restoration`,to:`/water-damage-restoration`,line:`Dry hidden cavities after leaks and pipe breaks.`}]},{slug:`how-moisture-problems-lead-to-mold-damage`,title:`How a Small Leak Becomes Mold Damage`,seoTitle:`How Moisture Leads to Mold Damage | San Antonio`,excerpt:`A leak can disappear from view while walls stay wet. Learn why the first 24â48 hours matter and where San Antonio homes hide moisture.`,metaDescription:`How a small leak becomes mold damage in a San Antonio home, why the first 24 to 48 hours decide the outcome, and where our walls hide water. Licensed since 1991`,date:`2026-06-16`,readTime:`7 min read`,category:`Water & Mold`,photo:`hardwoodPulledDehu`,sections:[{heading:`The first 24â48 hours matter`,paragraphs:[`When a pipe breaks, the first job is to stop the water. The next job is to remove what escaped and start drying the materials it reached. The first 24â48 hours matter because drywall paper, wood, insulation and dust can hold enough moisture for microbial growth to begin.`,`That does not mean every wet wall becomes a mold project. Fast extraction, airflow and dehumidification can prevent a water loss from turning into one. Waiting until the room smells musty makes the work larger and more disruptive.`,`Fresh Air answers [water damage restoration](/water-damage-restoration) calls 24/7/365. The 2021 and 2023 freeze events showed why speed matters. Broken supply lines flooded homes across the city while water continued moving through walls and under floors.`]},{heading:`Leaks hide in ordinary places`,paragraphs:[`A slab leak may show up as warm flooring, a higher water bill or a damp baseboard far from a fixture. San Antonioâs slab foundations can let water travel under finishes before anyone sees a puddle.`,`An air-conditioner
63condensate line can drip inside a closet or overflow a pan in the attic. Because the system runs constantly through humid summers, the area may stay damp. Roof flashing can admit rain that wets attic insulation and decking without staining the ceiling immediately.`,`Supply-line drips under sinks, behind refrigerators and at washing-machine boxes are quieter. They wet the same small area every day. By the time cabinet wood swells or paint blisters, the back side may have been damp for weeks.`]},{heading:`Dry to the inside, not the touch`,paragraphs:[`A fan pointed at a wall can dry the paint while the cavity behind it remains wet. Vinyl flooring, cabinets and baseboards can trap moisture. Insulation holds water against studs. Hardwood can cup while the subfloor stays damp underneath.`,`We use moisture readings to map the affected area. When needed, we remove a baseboard, make a controlled opening or lift damaged material so air can reach the wet cavity. Commercial dehumidifiers remove moisture from the air while air movers help evaporation.`,`The drying plan should follow the water, not the visible stain. Our IICRC-certified team documents readings and photos. When insurance applies, we bill carriers directly and provide the scope they need to review the loss.`]},{heading:`Know when it becomes remediation`,paragraphs:[`If materials remained wet, a musty odor develops or suspected growth is visible, the project may need a [mold inspection](/mold-inspection). Drying equipment does not remove existing contamination, and demolition without containment can spread debris.`,`Texas licenses mold remediation above the state threshold. Fresh Air holds TDLR Mold Remediation Company #RCO0176 and Contractor #MRC0212. We were among the first licensed, and we keep the documentation and controls appropriate to the job.`,`The most useful call is the early one. If a condensate line, roof detail or supply tube has wet a wall, shut off the source if you can do so safely. Move belongings away. Then let a restoration professional check how far the moisture traveled before the surface convinces you everything is dry.`,`While help is on the way, do not run household fans across an area with suspected growth. Do not enter a room with a sagging wet ceiling. If water reached outlets or equipment, leave the power decision to a qualified professional. Personal safety comes before saving a baseboard.`,`Once drying starts, ask what is being measured and where. A good drying record follows affected materials over time. Equipment should stay because readings show it is needed, not because the calendar says every loss takes the same number of days.`,`Hard water can leave mineral marks around valves and fittings, so not every white deposit means an active leak. Wipe the area dry and check it again while the fixture runs. Fresh moisture, a moving meter or repeated dampness calls for repair and a cavity check.`]}],related:[{label:`Water Damage Restoration`,to:`/water-damage-restoration`,line:`24/7 extraction, moisture mapping and structural drying.`},{label:`Mold Inspection`,to:`/mold-inspection`,line:`Evaluate hidden moisture and suspected growth.`},{label:`Structural Damage Repair`,to:`/structural-damage-repair`,line:`Repair materials after drying and removal are complete.`}]},{slug:`benefits-of-regular-air-duct-cleaning-for-indoor-air-quality`,title:`What Air Duct Cleaning Can Actually Improve`,seoTitle:`Real Benefits of Air Duct Cleaning | San Antonio`,excerpt:`Duct cleaning can reduce recirculated dust, improve restricted airflow and remove some odors. It is useful, but it is not a cure-all.`,metaDescription:`What regular air duct cleaning really does for indoor air quality in San Antonio homes, what it will not fix, and how often it is worth doing. Since 1991.`,date:`2026-05-18`,readTime:`7 min read`,category:`Indoor Air Quality`,photo:`techInDuct`,sections:[{heading:`Less old dust in circulation`,paragraphs:[`A supply system with heavy buildup has more material available to move back into rooms. Proper [air duct cleaning](/air-duct-cleaning) removes accessible dust, fiber
63s, pet hair and renovation debris from the ducts, returns, registers and plenum areas included in the scope.`,`That does not make a house dust-free. South Texas soil, cedar and oak pollen, pets and daily living keep creating new dust. Cleaning resets a neglected system; filtration and housekeeping determine what happens next.`,`We often hear from homeowners who wipe a register and see a dark edge return quickly. Cleaning may help when the material is coming from inside the system. A leaking return or poorly fitted filter must also be corrected, or new debris will keep bypassing the filter.`]},{heading:`Airflow can improve`,paragraphs:[`Heavy debris on a filter, return grille or internal surface can restrict airflow. Removing that resistance may help the system move air more freely and keep room temperatures more even.`,`Cleaning cannot fix a crushed flexible duct, closed damper, disconnected run or failing blower. We see all of those in San Antonio attics. A responsible inspection separates buildup from mechanical trouble before promising a result.`,`Better airflow can also help a filter last closer to its expected interval. If a new filter is caked shut within weeks, there may be an unusual dust source, an air leak or a filter-selection problem. The answer is not automatically a more restrictive filter.`]},{heading:`Some odors have a removable source`,paragraphs:[`Dry dust and old debris can hold stale odors. If that material is the source, removing it can make startup air smell cleaner. The work should include the plenum and returns when those areas are part of the problem, not just a vacuum hose placed at each vent.`,`A musty odor is different. It can indicate a wet drain pan, damp duct liner, condensate problem or hidden water damage. [HVAC plenum cleaning](/hvac-plenum-cleaning) may be needed, but moisture has to be stopped first.`,`Strong odors from animals, smoke or a contaminated building material may require dedicated [odor removal](/odor-removal). Duct cleaning alone cannot remove a source that is still in the wall, attic or floor.`]},{heading:`It is not an allergy cure`,paragraphs:[`Cedar and oak seasons are hard on San Antonio households. Removing accumulated pollen and dust from a system may reduce what gets recirculated, but no honest company should promise to cure allergies. Outdoor air enters. Allergens remain in bedding, carpet and upholstery. Humidity and filtration matter too.`,`Not every home needs annual cleaning. We recommend it when an inspection shows visible accumulation, after major construction, following contamination or when the system has gone years with poor filtration. A clean, tight system may not need service just because the calendar changed.`,`Fresh Air has served San Antonio since 1991. We are RIA-certified in Mechanical Systems Hygiene and IICRC certified. Those credentials support a whole-system approach and a plain answer: clean what needs cleaning, repair what needs repair and do not sell duct service as a cure for every indoor-air complaint.`,`Before booking, ask for an inspection-based scope. It should identify the number of systems, the returns, accessible plenums and how debris will be collected. A company should be able to explain what changes you can reasonably expect and what conditions require another trade.`,`Afterward, keep the filter fitted tightly and check it during heavy cooling months. Watch for new moisture around the air handler. The lasting benefit comes from pairing a clean system with good filtration, dry equipment and sealed return paths.`,`Keep before-and-after photos with the service record. They establish what was present and which sections were cleaned. If dust returns quickly, those records help the next technician look for a return leak, damaged duct or unusual source instead of repeating the same work.`]}],related:[{label:`Air Duct Cleaning`,to:`/air-duct-cleaning`,line:`Whole-system debris removal with local crews.`},{label:`HVAC Plenum Cleaning`,to:`/hvac-plenum-cleaning`,line:`Address buildup near the heart of the air handler.`},{label:`Odor Removal`,to:`/odor-removal`,line:`Find and treat odor sources beyond the ductwork.`}]},{slug:`a-guide-to-air-quality-in-your-home`,title:`A Practical San Antonio Indoor Air Guide`,seoTitle:`San Antonio Indoor Air Quality Guide | Fresh Air`,excerpt:`Filters, humidity, ventilation and UV-C all have a place. Here is how to make practical indoor-air decisions in South Texas.`,metaDescription:`A practical guide to indoor air quality in San Antonio homes: filters, humidity, ventilation and UV-C, from a fam
63ily restoration company working here since 1991`,date:`2026-05-01`,readTime:`8 min read`,category:`Indoor Air Quality`,photo:`hvacTwoTechs`,sections:[{heading:`Start with the filter`,paragraphs:[`The filter is the simplest part of an indoor-air plan and the part most often ignored. Check it monthly during a San Antonio summer. Systems run long hours, and we pull filters caked shut every August.`,`MERV ratings describe how efficiently a filter captures different particle sizes. Higher is not automatically better for every system. A filter that is too restrictive can reduce airflow if the equipment and return were not designed for it. Use the range approved for your HVAC system and ask the service company if you are unsure.`,`Change intervals depend on the house. Pets, remodeling, open doors, wildfire smoke, cedar season and a leaky return can shorten the interval. Write the installation date on the frame and inspect the filter instead of trusting a blanket schedule.`]},{heading:`Control South Texas humidity`,paragraphs:[`Our air conditioners remove moisture while they cool. When equipment is oversized, short-cycling or draining poorly, the house can feel cool but clammy. Humidity also rises when outdoor air leaks into return ducts in a hot attic.`,`A comfortable indoor target is generally around the middle of the humidity range, not desert-dry and not sticky. The exact setting depends on the building and equipment. A basic hygrometer can show whether the house stays persistently humid.`,`If you see condensation, a wet drain pan or staining near the plenum, correct the source. Cleaning a damp surface without fixing drainage or insulation is temporary. Suspected growth may call for [mold inspection](/mold-inspection), especially when porous material is involved.`]},{heading:`Ventilate with a purpose`,paragraphs:[`Fresh outdoor air can dilute indo
63or odors and pollutants, but opening windows during cedar season or a humid afternoon may make conditions worse. Kitchen and bathroom exhaust fans should vent outdoors, not into the attic. Use them during cooking and bathing, then let them run long enough to clear moisture.`,`Keep return grilles open and unobstructed. Do not close multiple supply registers to force air elsewhere; that can upset system pressure. If rooms stay uneven, have the duct layout and balancing checked.`,`When visible debris is present throughout the system, [air duct cleaning](/air-duct-cleaning) can remove accumulated material. It should be one part of the plan, not a substitute for filtration, moisture control or ventilation.`]},{heading:`Use UV-C where it helps`,paragraphs:[`UV-C is most useful when aimed at a specific surface near the coil or plenum where microbial growth is a concern. It needs the right intensity, placement and exposure time. A small glowing bulb sold as a whole-house cure is often oversold.`,`[HVAC UV light installation](/hvac-uv-light-installation) does not remove dust, repair moisture problems or replace a filter. Bulbs also lose output and require maintenance. We explain what the light is treating and what it cannot do before installing one.`,`Cedar, oak pollen and mold spores can all trigger symptoms here, but the source may be outdoors, in the HVAC system or in wet building materials. Fresh Air has served San Antonio since 1991 and is RIA-certified in Mechanical Systems Hygiene. We look for the source first, then recommend the narrowest useful solution.`,`A simple home routine helps. Check the filter monthly in peak summer, keep supply and return grilles clear, use exhaust fans during bathing and cooking, and watch the indoor humidity trend. Walk the AC closet and nearby ceiling for fresh staining.`,`If symptoms or odors persist, change one variable at a time. Confirm filtration and moisture before buying gadgets. Photograph visible conditions and note when they occur. Specific observations lead to better recommendations than a general request to âclean the air.â`,`After a freeze or major water loss, indoor air work starts with drying. The 2021 and 2023 freezes pushed water into walls and flooring across San Antonio. A filter or UV lamp cannot correct wet drywall. Restore the building first, then clean the affected air system if inspection shows it is needed.`]}],related:[{label:`Air Duct Cleaning`,to:`/air-duct-cleaning`,line:`Remove visible buildup from the air-distribution system.`},{label:`HVAC UV Light Installation`,to:`/hvac-uv-light-installation`,line:`Targeted UV-C treatment near coils and plenums.`},{label:`Mold Inspection`,to:`/mold-inspection`,line:`Investigate moisture and suspected indoor growth.`}]},{slug:`why-clean-your-air-ducts`,title:`Why Clean Your Air Ducts?`,seoTitle:`Why Clean Your Air Ducts? | San Antonio Guide`,excerpt:`A proper duct cleaning handles the whole systemânot a quick vacuum at the vent. Here is what the work should include.`,metaDescription:`What a real air duct cleaning includes in San Antonio, from plenum to registers, and why a quick vent vacuum is not the same job. RIA-certified crews since 1991`,date:`2026-04-16`,readTime:`7 min read`,category:`Air Duct Cleaning`,photo:`hepaRestaurant`,sections:[{heading:`What duct cleaning is`,paragraphs:[`Air duct cleaning removes accumulated debris from the air-distribution system. In a house, that usually means the supply and return runs, registers, grilles and accessible plenum areas covered by the proposal.`,`The work uses negative pressure to keep loosened material moving toward collection equipment. Brushes, air tools or other mechanical agitation release dust from interior surfaces. Registers are removed and cleaned rather than used as the only access point.`,`The goal is simple: remove what has collected inside instead of blowing it into the rooms. Fresh Air is RIA-certified in Mechanical Systems Hygiene and has cleaned residential and commercial systems in San Antonio since 1991.`]},{heading:`The whole system matters`,paragraphs:[`A vacuum hose held at each register is not a whole-system cleaning. Dust follows airflow, so returns and the plenum often hold as much evidence as the supply runs. Accessible coil and blower areas should be inspected, even when HVAC service is needed for the actual cleaning or repair.`,`The crew should protect floors and furnishings, seal access points during the work and show you what they found. If a flexible duct is torn or collapsed, cleaning will not repair it. If liner is wet or deteriorated, the scope may
63need to change.`,`Our [air duct cleaning](/air-duct-cleaning) work begins with the system in front of us. We do not assume every house needs the same number of access openings or the same equipment setup.`]},{heading:`Know the honest reasons`,paragraphs:[`Cleaning makes sense when visible buildup is present, debris is leaving the registers, filtration has been neglected, pests entered the system or construction dust spread through the returns. It may also be appropriate after a contamination event.`,`Not every home needs annual service. A clean system with good filtration and no moisture problem can stay that way. We would rather show a homeowner a clean duct and leave than invent a reason to proceed.`,`A musty odor, water staining or suspected growth requires more care. The problem may be in the [HVAC plenum](/hvac-plenum-cleaning), a drain pan or wet building material. Cleaning dry dust cannot solve an active moisture source.`]},{heading:`Spot a shortcut operation`,paragraphs:[`Be cautious of a very low whole-house price, especially when the company cannot describe what is included. Ask whether returns, plenums and registers are part of the work. Ask how debris is collected and who will perform the service.`,`A crew should not use fear to turn ordinary dust into a mold claim. Suspected mold may need assessment, and regulated remediation in Texas requires licenses and controls. Fresh Air holds TDLR Mold Remediation Company #RCO0176 and Contractor #MRC0212 when that separate work is necessary.`,`You should receive a scope that matches the system, not an advertisement that changes at the front door. Our shop is at 2418 Basse Rd, our crews are local and the same company answers after the job. That accountability is part of a proper cleaning.`,`Before work starts, clear access to registers and the air handler. Ask the crew where hoses and collection equipment will go. Pets should be secured away from open doors and work zones. A careful setup protects the home and gives technicians room to reach the full system.`,`After the job, look at the cleaned registers and ask what was found in the returns and plenum. Keep any photographs with the invoice. Then maintain the right filter and address return leaks or moisture so the system does not quickly return to the same condition.`,`For commercial systems, the same principles apply at a larger scale. Access may require lifts, containment or after-hours scheduling. The proposal should account for occupied areas and mechanical layouts rather than applying a residential vent count to a school, restaurant or office.`]}],related:[{label:`Air Duct Cleaning`,to:`/air-duct-cleaning`,line:`See what our whole-system residential service includes.`},{label:`HVAC Plenum Cleaning`,to:`/hvac-plenum-cleaning`,line:`Clean the central distribution area, not only the vents.`},{label:`Commercial Air Duct Cleaning`,to:`/commercial-air-duct-cleaning`,line:`Mechanical hygiene for occupied commercial buildings.`}]},{slug:`the-importance-of-mold-remediation-in-your-home-or-business`,title:`Why Mold Remediation Matters at Home and Work`,seoTitle:`Mold Remediation for Homes & Businesses | San Antonio`,excerpt:`Homes need safe removal. Businesses also need documentation, controlled scheduling and a plan that protects occupants and operations.`,metaDescription:`Why mold remediation matters for San Antonio homes and businesses, and what containment, documentation and TDLR licensing add. Family firm since 1991.`,date:`2026-04-16`,readTime:`8 min read`,category:`Mold Remediation`,photo:`deconEntryDorm`,sections:[{heading:`The source decides the scope`,paragraphs:[`Mold growth follows moisture. In homes, we find it behind sink cabinets, washing machines, AC plenums, slab-level baseboards and roof leaks. In businesses, the source may be a rooftop unit, plumbing chase, sprinkler line or water event above an occupied suite.`,`The visible patch rarely tells the full story. Water can travel behind finishes and settle in insulation or wall cavities. A proper [mold inspection](/mold-inspection) looks for the source, maps affected material and determines whether licensed assessment is required.`,`Cleaning the stain while leaving the leak in place is not remediation. The moisture source must be repaired, affected porous material removed under control and the remaining structure cleaned and dried.`]},{heading:`Homes need containment`,paragraphs:[`In a residence, the work area may share air with bedrooms, closets and the kitchen. Removing drywall or insulation creates dust. Containment and negative air keep that material from traveling through the house.`,`Fresh Air holds TDLR Mold Remediation Company #RCO0176 and TDLR Mold Remediation Contractor #MRC0212. Texas is one of the few states that licenses this work, and we were among the first licensed. For projects over the state threshold, assessment and remediation follow defined roles and documentation.`,`Our [residential mold remediation](/mold-remediation) crews protect the path to the work area, establish decontamination procedures and use HEPA-filtered equipment. The controls are there to protect the rooms that were not affected.`]},{heading:`Businesses carry more exposure`,paragraphs:[`A commercial property has employees, customers, tenants and vendors moving through it. A poorly controlled demolition can spread debris beyond one suite and create questions that are difficult to answer later.`,`Property managers and insurers need clear records: where moisture was found, what materials were affected, what containment was built, what was removed and when drying was complete. Fresh Air documents the work and bills insurance carriers directly when coverage applies.`,`Our [commercial mold remediation](/commercial-mold-remediation) planning also considers access, loading areas, security and the buildingâs operating hours. We have experience working in occupied facilities where the job cannot simply take over the property.`]},{heading:`Plan around the operation`,paragraphs:[`After-hours and phased work can reduce disruption. A corridor may need temporary barriers. A restaurant may require equipment staging after close. A school, office or multifamily property may need different paths for occupants and remediation workers.`,`The [Facility Care Program](/facility-care-program) gives commercial clients a consistent contact for recurring cleaning, mechanical hygiene and response planning. Knowing the property before an emergency makes access and communication faster when a pipe breaks or an HVAC drain overflows.`,`Fresh Air is family-owned, IICRC certified and based at 2418 Basse Rd. We have responded 24/7/365 since 1991. Whether the affected space is a bedroom or an occupied commercial floor, the principles stay the same: stop the water, define the damage, contain the work, document the removal and verify the area is ready for repair.`,`Before work begins, one property representative should control communication. Share floor plans, access rules, alarm contacts and known sensitive areas. Decide where equipment can stage and how occupants will be routed. Those details keep a technical job from becoming an operational problem.`,`After removal, retain the protocol, daily records, photographs and clearance documents with the property file. That history helps insurers, managers and future maintenance teams understand what happened. It also gives the next responder a better starting point if another water event affects the building.`,`Do not wait for a tenant complaint to decide who can authorize emergency access. Keep current shutoff locations, roof contacts and insurance information with the response plan. During a night or weekend loss, those few details can prevent water from traveling into another unit while approvals are being sorted out.`]}],related:[{label:`Commercial Services`,to:`/commercial`,line:`Restoration and cleaning planned around occupied properties.`},{label:`Commercial Mold Remediation`,to:`/commercial-mold-remediation`,line:`Licensed containment, removal and documentation.`},{label:`Facility Care Program`,to:`/facility-care-program`,line:`A c
63onsistent response partner for commercial facilities.`}]}];function uC(e){return lC.find(t=>t.slug===e)}var dC=L(`/blog/$slug`)({loader:({params:e})=>{let t=uC(e.slug);if(!t)throw d();return{post:t}},head:({loaderData:e})=>{if(!e)return{meta:[{title:`Article unavailable | Fresh Air Restoration & Cleaning`}]};let t=e.post,n=Bg({title:t.seoTitle,description:t.metaDescription,path:`/blog/${t.slug}`,breadcrumb:t.title,section:`blog`,imageKey:t.photo}),r=Ig(he(t.photo).src);return{...n,meta:[...n.meta.filter(e=>e.property!==`og:type`),{property:`og:type`,content:`article`},{property:`article:published_time`,content:t.date},{property:`article:author`,content:`Fresh Air Restoration & Cleaning`}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`BlogPosting`,headline:t.title,description:t.metaDescription,datePublished:t.date,dateModified:t.date,image:[r],mainEntityOfPage:`${Fg}/blog/${t.slug}`,author:{"@type":`Organization`,name:`Fresh Air Restoration & Cleaning`},publisher:{"@type":`Organization`,name:`Fresh Air Restoration & Cleaning`,url:Fg,logo:{"@type":`ImageObject`,url:Ig(ux.url)}}})},...n.scripts]}},component:R(()=>$(()=>import(`./blog._slug-cKp2E1ok.js`),__vite__mapDeps([64,1,3,2,4,6,14,15,19,20,16])),`component`),notFoundComponent:R(()=>$(()=>import(`./blog._slug-Zmh9X-l4.js`),__vite__mapDeps([65,1,3,2,14,6,4])),`notFoundComponent`)}),fC={"boerne-tx":{slug:`boerne-tx`,city:`Boerne`,county:`Kendall County`,drive:`About 30 minutes northwest`,eyebrow:`Kendall County · About 30 Minutes Northwest`,title:`Water Damage, Mold & Duct Cleaning in Boerne, TX`,metaDescription:`Boerne water damage, mold and duct cleaning from a family-owned San Antonio team serving Kendall County since 1991, with dependable 24/7 emergency response.`,hero:`moldFraming`,intro:[`Boerne is where old Hill Country construction and fast subdivision growth meet. We work in century-old homes near downtown, newer neighborhoods off Highway 46, and acreage properties running on wells and septic systems.`,`Fresh Air has served Kendall County homes for decades. Boerne was one of the original communities we focused on because homeowners there needed one nearby company for water, mold, ducts, cleaning, and repairsânot a different vendor for every problem.`],calls:[{title:`Slab leaks in newer builds`,body:`New construction does not eliminate water risk. A hidden supply leak can travel under flooring before a wet baseboard or rising moisture reading gives it away.`},{title:`Older homes with limited ventilation`,body:`Downtown homes can have tight additions, enclosed cavities, and older ventilation layouts. When moisture enters, those slow-drying spaces need careful inspection and containment.`},{title:`Caliche dust in ductwork`,body:`Limestone and caliche dust from roads, lots, and construction settles quickly. Return leaks and open attic connections can load an otherwise sound duct system.`},{title:`Garage water-heater failures`,body:`A failed tank in an attached garage can wet shared walls, trim, storage, and nearby rooms. We trace the spread instead of stopping at the visible puddle.`}],dispatch:[`Boerne is roughly a 30-minute run northwest from our Basse Road shop in normal traffic. For an active water loss, we confirm the address, access, and shutoff status while the crew is being assigned.`,`Acreage addresses can take longer to reach than homes near I-10. Gate codes, well equipment details, and a clear description of the affected building help us bring the right drying and containment equipment the first time.`]},"new-braunfels-tx":{slug:`new-braunfels-tx`,city:`New Braunfels`,county:`Comal County`,drive:`About 40 minutes northeast`,eyebrow:`Comal County · About 40 Minutes Northeast`,title:`Water Damage, Mold & Duct Cleaning in New Braunfels, TX`,metaDescription:`New Braunfels water, mold and duct cleanup for homes and rentals, with river-flood experience, fast turnarounds and 24/7 response from our San Antonio team.`,hero:`airMoverHall`,intro:[`New Braunfels has two very different restoration pressures: real river exposure along the Guadalupe and Comal, and rapid subdivision growth farther from the water. Add a large vacation-rental market, and the cost of a wet room often includes lost guest nights.`,`We serve owner-occupied homes, long-term rentals, and short-term properties. The plan changes with the building, but the first priorities stay the same: stop the source, document the affected materials, and begin controlled drying quickly.`],calls:[{title:`River and surface-water intrusion`,body:`River water and storm runoff require a different cleanup plan than a clean supply-line break. We identify the water source before deciding what can be dried and what must be removed.`},{title:`Rental water events`,body:`For vacation rentals, downtime matters. We give owners and managers a clear scope, document conditions, and coordinate access so the property can move toward a safe reopening.`},{title:`Closed-up properties with mold`,body:`A house left warm and closed between stays can hide a slow leak or condensate problem. Odor, spotting, or swollen trim often leads to moisture behind the visible finish.`},{title:`Duct cleaning between tenants`,body:`Turnover is a practical time to clean returns and supply runs, especially after construction dust, pet occupancy, or a long period with the system running continuously.`}],dispatch:[`New Braunfels is about 40 minutes northeast of our Basse Road shop before I-35 traffic is factored
63in. We account for corridor congestion when we give an arrival window rather than promising an unrealistic minute.`,`For a rental, send the lockbox or manager contact early. For river-area properties, tell us whether roads and the electrical service are accessible before the crew leaves San Antonio.`]},"schertz-tx":{slug:`schertz-tx`,city:`Schertz`,county:`Guadalupe County`,drive:`About 25 minutes northeast`,eyebrow:`Guadalupe County · I-35 Corridor`,title:`Water Damage, Mold & Duct Cleaning in Schertz, TX`,metaDescription:`Schertz water damage, mold and duct cleaning with 24/7 response, direct insurance billing and 10% off all services for active and retired military families.`,hero:`vanCloseup`,intro:[`Schertz grew with the I-35 corridor and Randolph Air Force Base. Many neighborhoods are newer slab-on-grade construction, and many households are balancing deployments, PCS moves, rentals, and tight closing dates.`,`Fresh Air gives active and retired military 10% off every residential and commercial service. Mention the discount on the first call and show military ID when we arrive.`],calls:[{title:`Supply-line failures`,body:`Builder-grade connections and appliance lines often begin failing around the same period across a neighborhood. Water can move under floating floors well beyond the first wet cabinet.`},{title:`Aging water heaters`,body:`Clusters of homes built together can reach water-heater replacement age together. A garage or utility-room loss still needs moisture checks in shared walls and adjacent rooms.`},{title:`Attic condensate overflow`,body:`An AC running hard in a South Texas summer can overflow a pan or drain above the ceiling. We check insulation, drywall, framing, and the path water took down the wall.`},{title:`PCS-move duct cleaning`,body:`Military families often schedule duct cleaning before move-in or after move-out. It is a good window to address dust, pet debris, and disconnected or damaged runs.`}],dispatch:[`Schertz is normally about 25 minutes northeast of our shop, using Loop 410 and I-35. Rush-hour traffic can stretch that drive, so emergency dispatch is based on live conditions and the closest equipped crew.`,`If a move, inspection, or closing sets the deadline, tell us on the first call. We will separate urgent water mitigation from cleaning that can be scheduled around keys and occupancy.`]},"helotes-tx":{slug:`helotes-tx`,city:`Helotes`,county:`Northwest Bexar County`,drive:`About 20 minutes northwest`,eyebrow:`Northwest Bexar · About 20 Minutes`,title:`Water Damage, Mold & Duct Cleaning in Helotes, TX`,metaDescription:`Helotes water damage, mold and duct cleaning for Hill Country-edge homes, backed by IICRC-certified crews and dependable 24/7 response from nearby San Antonio.`,hero:`ductInterior`,intro:[`Helotes sits where northwest Bexar County starts feeling like the Hill Country. Larger lots, mature oaks, cedar, and neighborhoods near Government Canyon create different air and access conditions than homes near central San Antonio.`,`Long attic duct runs are common here. They spend summer in extreme attic heat, while older homes along the Loop 1604 corridor can also carry slab and plumbing risks that are easy to miss until finishes change.`],calls:[{title:`Collapsed attic ducts`,body:`Long flexible runs can sag, kink, or separate at a connection. A hot room or weak register may be an airflow problem above the ceiling rather than an equipment problem below it.`},{title:`Cedar and oak season complaints`,body:`Heavy pollen enters on people, pets, and outdoor air. We inspect the whole return-and-supply path before recommending cleaning or a whole-house allergy treatment.`},{title:`Slab leaks near 1604`,body:`Older corridor homes can show a warm floor, unexplained meter movement, or damp flooring before the leak is visible. Moisture mapping shows how far water traveled.`},{title:`Hot-attic condensate damage`,body:`Drain problems above living space can wet insulation and ceiling board. The cavity must be opened and dried based on readings, not just repainted after the stain fades.`}],dispatch:[`Most Helotes addresses are about 20 minutes from our Basse Road shop outside peak Loop 1604 traffic. Properties near Government Canyon or beyond the town center may add time on two-lane roads.`,`Let us know about gates, steep drives, or limited parking for equipment. Those details matter when a crew needs to unload air movers, dehumidifiers, duct tools, or containment material safely.`]},"bulverde-tx":{slug:`bulverde-tx`,city:`Bulverde`,county:`Comal County`,drive:`About 30 minutes north`,eyebrow:`Comal County · About 30 Minutes North`,title:`Water Damage, Mold & Duct Cleaning in Bulverde, TX`,metaDescription:`Bulverde water, mold and duct cleaning for acreage homes, wells and outbuildings, with family-owned service and 24/7 dis
63patch from San Antonio since 1991.`,hero:`vansHouse`,intro:[`Bulverde properties often work more like small compounds than city lots. A main house may share the acreage with a barn, workshop, guest space, well equipment, propane, and long utility runs.`,`Heavy minerals in well water leave their mark on fixtures and equipment. Distance from municipal services also means owners need a restoration crew that arrives prepared instead of assuming the nearest supply house is around the corner.`],calls:[{title:`Well-water plumbing failures`,body:`Mineral buildup can be hard on valves, heaters, and supply components. When a connection lets go, we trace water through cabinets, walls, and floors before setting drying equipment.`},{title:`Mold in barns and outbuildings`,body:`Workshops and storage buildings may have intermittent cooling and less ventilation than the house. Roof leaks and condensation can stay unnoticed behind stored contents.`},{title:`Large whole-home duct systems`,body:`More square footage means more returns, branches, zones, and attic connections. We scope the actual system rather than pricing a large custom home like a compact city house.`},{title:`Unusually long dryer vents`,body:`Laundry rooms placed deep inside a wide floor plan can have long vent runs with several turns. Lint restriction must be cleared through the full accessible run, not only at the wall.`}],dispatch:[`Bulverde is about 30 minutes north of Basse Road before Highway 281 traffic and the final acreage roads. We ask for the exact entrance and gate information because rural mailing addresses do not always point to the working access.`,`Tell us whether the loss is in the house, barn, shop, or guest building and whether power is available there. That changes which equipment and extension setup the crew brings from San Antonio.`]},"universal-city-tx":{slug:`universal-city-tx`,city:`Universal City`,county:`Northeast Bexar County`,drive:`About 25 minutes northeast`,eyebrow:`Military Community · Randolph AFB`,title:`Water Damage, Mold & Duct Cleaning in Universal City, TX`,metaDescription:`Universal City restoration and duct cleaning near Randolph AFB, with 10% military savings, 24/7 response and trusted San Antonio experience dating to 1991.`,hero:`crewAlamo`,intro:[`Universal City is a military community built around Randolph Air Force Base. Fresh Air offers active and retired military 10% off every service, backed by more than 30 years of work at Randolph and the other JBSA installations.`,`Rental turnover is part of the local rhythm as families PCS in and out. At the same time, many 1960s-through-1980s homes still contain original cast iron drains or galvanized supply plumbing that deserves close attention after a leak.`],calls:[{title:`Pipe failures in older homes`,body:`Cast iron drains and galvanized supply lines can fail out of sight. We look beyond the immediate opening for water that reached cabinets, wall cavities, flooring, or the next room.`},{title:`Landlord turnover cleaning`,body:`Owners call between tenants for duct, carpet, hard-floor, and odor work. Combining services in one visit can make a short turnover window easier to manage.`},{title:`Move-out mold findings`,body:`Furniture and stored belongings can hide staining until a house is emptied. We determine whether the issue is active moisture, old damage, or something that needs a licensed mold process.`},{title:`PCS-ready air systems`,body:`Before a family moves in, we can inspect and clean accessible duct components so dust, pet debris, or a disconnected run is not the first surprise in the new house.`}],dispatch:[`Universal City is usually about 25 minutes northeast from our Basse Road shop. Loop 410 and I-35 traffic affects the exact arrival, but the route is familiar from decades of work around Randolph and northeast San Antonio.`,`Mention military status during the first call and show ID at the appointment for the 10% discount. If the home is between occupants, provide the property manager or key contact before dispatch.`]},"fair-oaks-ranch-tx":{slug:`fair-oaks-ranch-tx`,city:`Fair Oaks Ranch`,county:`Bexar, Kendall and Comal counties`,drive:`About 30 minutes northwest`,eyebrow:`Tri-County · About 30 Minutes Northwest`,title:`Water Damage, Mold & Duct Cleaning in Fair Oaks Ranch, TX`,metaDescription:`Fair Oaks Ranch restoration for custom homes, multi-zone HVAC and larger claims, with adjuster-ready records, direct billing and 24/7 San Antonio response.`,hero:`hardwoodPulledDehu`,intro:[`Fair Oaks Ranch crosses Bexar, Kendall, and Comal counties, but its housing has a clear pattern: larger custom homes, multiple HVAC zones, and finished spaces that require a careful plan when water moves beyond one room.`,`Higher-value finishes make documentation especially important. We record affected materials and drying progress for the adjuster, work from an insurance-ready scope, and bill carriers directly when a covered claim is involved.`],calls:[{title:`Multi-zone duct systems`,body:`A large home may have separate air handlers, returns, dampers, and long attic branches. We identify the affected zone and system layout before cleaning or opening anything.`}
63,{title:`Finished lower-level water damage`,body:`Bonus rooms and finished lower levels can hold water behind trim, built-ins, and layered flooring. Drying decisions depend on the assembly, not just the surface appearance.`},{title:`Claims needing strong records`,body:`Photos, moisture readings, equipment logs, and a clear scope help an adjuster understand why work was necessary. We build that record as the job progresses.`},{title:`Custom finishes and containment`,body:`Cabinetry, hardwood, stone, and detailed millwork require selective access and controlled work areas. The goal is to remove what cannot be saved without damaging what can.`}],dispatch:[`Fair Oaks Ranch is roughly 30 minutes northwest of the Basse Road shop in normal traffic. The exact route changes with the address because the community spans three counties and several approaches.`,`For a larger loss, have the carrier and claim information ready if available. We can begin emergency mitigation without waiting for every insurance decision, then keep the adjuster informed with documented conditions and progress.`]},"alamo-heights-tx":{slug:`alamo-heights-tx`,city:`Alamo Heights`,county:`Inside Loop 410`,drive:`About 10 minutes`,eyebrow:`Inside Loop 410 · About 10 Minutes`,title:`Water Damage, Mold & Duct Cleaning in Alamo Heights, TX`,metaDescription:`Alamo Heights water, mold and duct restoration for historic homes, with careful containment, licensed mold work and 24/7 response from San Antonio minutes away.`,hero:`techContainmentHome`,intro:[`Alamo Heights is only a few minutes from our Basse Road shop, and its homes reward experience. Much of the 1920s-to-1940s housing stock uses pier-and-beam or early slab construction, plaster walls, and plumbing that may be original or partly replaced.`,`High property values and historic details make controlled access important. A fast demolition approach can create avoidable damage, especially where plaster, wood flooring, built-ins, or a damp crawlspace change how water should be traced.`],calls:[{title:`Cast iron and galvanized failures`,body:`Older drains and supply lines can leak inside walls or below floors. Mature tree roots also find weak drain joints, so the visible wet spot may not identify the true source.`},{title:`Crawlspace moisture and mold`,body:`Pier-and-beam homes need inspection from below as well as inside. Damp soil, plumbing leaks, and limited airflow can affect joists, subfloor, and indoor odor.`},{title:`Water held by plaster`,body:`Plaster and lath do not dry or release water like modern drywall. We use readings and selective access to avoid assuming a dry-looking wall is dry inside.`},{title:`Careful historic-home containment`,body:`Dust control and a defined work zone protect occupied rooms and original finishes. Licensed mold work follows a written protocol when Texas rules require one.`}],dispatch:[`Our shop at 2418 Basse Road is about 10 minutes from most Alamo Heights addresses. We are close enough to assess an active loss quickly without claiming that every traffic light or crew position will be the same.`,`Tell us about narrow drives, rear access, crawlspace entries, and original finishes before arrival. A few details help the crew bring the right protection, meters, and containment materials from the start.`]}};Object.keys(fC);function pC(e){return fC[e]}var mC=L(`/service-area/$city`)({beforeLoad:({params:e})=>{if(!pC(e.city))throw d()},head:({params:e})=>{let t=pC(e.city);if(!t)return{meta:[{title:`Service Area Not Found | Fresh Air`}]};let n=`/service-area/${t.slug}`,r=Bg({title:`${t.title} | Fresh Air`,description:t.metaDescription,path:n,breadcrumb:t.city,section:`serving-area`,imageKey:t.hero});return{...r,scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`LocalBusiness`,name:Og.name,legalName:Og.legal,url:`${Fg}${n}`,telephone:`+1-210-982-0647`,foundingDate:String(Og.founded),address:{"@type":`PostalAddress`,streetAddress:Og.street,addressLocality:Og.city,addressRegion:Og.state,postalCode:Og.zip,addressCountry:`US`},areaServed:{"@type":`City`,name:`${t.city}, Texas`}})},...r.scripts]}},component:R(()=>$(()=>import(`./service-area._city-DvE9YoXn.js`),__vite__mapDeps([66,1,3,2,10,5,13,4,6,14,15,16])),`component`)}),hC=Sx.update({id:`/`,path:`/`,getParentRoute:()=>Q}),gC=Dx.update({id:`/$`,path:`/$`,getParentRoute:()=>Q}),_C=Ox.update({id:`/a-guide-to-air-quality-in-your-home`,path:`/a-guide-to-air-quality-in-your-home`,getParentRoute:()=>Q}),vC=kx.update({id:`/about`,path:`/about`,getParentRoute:()=>Q}),yC=jx.update({id:`/air-duct-cleaning`,path:`/air-duct-cleaning`,getParentRoute:()=>Q}),bC=Nx.update({id:`/air-duct-mold-removal`,path:`/air-duct-mold-removal`,getParentRoute:()=>Q}),xC=Px.update({id:`/areas-of-the-home-most-vulnerable-to-mold-growth`,path:`/areas-of-the-home-most-vulnerable-to-mold-growth`,getParentRoute:()=>Q}),SC=Fx.update({id:`/benefits-of-regular-air-duct-cleaning-for-indoor-air-quality`,path:`/benefits-of-regular-air-duct-cleaning-for-indoor-air-quality`,getParentRoute:()=>Q}),CC=Ix.update({id:`/carpet-floor-cleaning`,path:`/carpet-floor-cleaning`,getParentRoute:()=>Q}),wC=Rx.update({id:`/chimney-dryer-vent-cleaning`,path:`/chimney-dryer-vent-cleaning`,getParentRoute:()=>Q}),TC=zx.update({id:`/chris-moreno`,path:`/chris-moreno`,getParentRoute:()=>Q}),EC=Bx.update({id:`/commercial`,path:`/commercial`,getParentRoute:()=>Q}),DC=Hx.update({id:`/commercial-air-duct-cleaning`,path:`/commercial-air-duct-cleaning`,getParentRoute:()=>Q}),OC=Ux.update({id:`/commercial-air-duct-cleaning-sanitizing-and-repair`,path:`/commercial-air-duct-cleaning-sanitizing-and-repair`,getParentRoute:()=>Q}),kC=Wx.update({id:`/commercial-dryer-vent-cleaning`,path:`/commercial-dryer-vent-cleaning`,getParentRoute:()=>Q}),AC=Gx.update({id:`/commercial-dryer-vent-duct-cleaning`,path:`/commercial-dryer-vent-duct-cleaning`,getParentRoute:()=>Q}),jC=Kx.update({id:`/commercial-environmental-cleaning-and-remediation`,path:`/commercial-environmental-cleaning-and-remediation`,getParentRoute:()=>Q}),MC=Jx.update({id:`/commercial-kitchen-vent-hood-cleaning`,path:`/commercial-kitchen-vent-hood-cleaning`,getParentRoute:()=>Q}),NC=Xx.update({id:`/commercial-laundry-exhaust-duct-cleaning`,path:`/commercial-laundry-exhaust-duct-cleaning`,getParentRoute:()=>Q}),PC=Qx.update({id:`/commercial-mold-inspection`,path:`/commercial-mold-inspection`,getParentRoute:()=>Q}),FC=eS.update({id:`/commercial-mold-remediation`,path:`/commercial-mold-remediation`,getParentRoute:()=>Q}),IC=nS.update({id:`/commercial-odor-removal`,path:`/commercial-odor-removal`,getParentRoute:()=>Q}),LC=rS.update({id:`/commercial-water-damage-repair-and-restoration`,path:`/commercial-water-damage-repair-and-restoration`,getParentRoute:()=>Q}),RC=aS.update({id:`/commercial-water-damage-restoration`,path:`/commercial-water-damage-restoration`,getParentRoute:()=>Q}),zC=oS.update({id:`/contact`,path:`/contact`,getParentRoute:()=>Q}),BC=cS.update({id:`/dead-animal-removal`,path:`/dead-animal-removal`,getParentRoute:()=>Q}),VC=lS.update({id:`/dust-dander-and-mold-how-local-duct-cleaners-improve-your-homes-air-quality`,path:`/dust-dander-and-mold-how-local-duct-cleaners-improve-your-homes-air-quality`,getParentRoute:()=>Q}),HC=pS.update({id:`/facility-care-program`,path:`/facility-care-program`,getParentRoute:()=>Q}),UC=_S.update({id:`/faqs`,path:`/faqs`,getParentRoute:()=>Q}),WC=vS.update({id:`/gallery`,path:`/gallery`,getParentRoute:()=>Q}),GC=bS.update({id:`/hard-floor-cleaning`,path:`/hard-floor-cleaning`,getParentRoute:()=>Q}),KC=xS.update({id:`/how-duct-cleaners-help-keep-dust-from-taking-over-your-home`,path:`/how-duct-cleaners-help-keep-dust-from-taking-over-your-home`,getParentRoute:()=>Q}),qC=SS.update({id:`/how-moisture-problems-lead-to-mold-damage`,path:`/how-moisture-problems-lead-to-mold-damage`,getParentRoute:()=>Q}),JC=CS.update({id:`/how-to-tell-if-your-air-ducts-actually-need-cleaning-6-signs-your-hvac-system-is-circulating-more-than-air`,path:`/how-to-tell-if-your-air-ducts-actually-need-cleaning-6-signs-your-hvac-system-is-circulating-more-than-air`,getParentRoute:()=>Q}),YC=TS.update({id:`/hvac-plenum-cleaning`,path:`/hvac-plenum-cleaning`,getParentRoute:()=>Q}),XC=DS.update({id:`/hvac-uv-light-installation`,path:`/hvac-uv-light-installation`,getParentRoute:()=>Q}),ZC=OS.update({id:`/major-projects`,path:`/major-projects`,getParentRoute:()=>Q}),QC=kS.update({id:`/meet-the-team`,path:`/meet-the-team`,getParentRoute:()=>Q}),$C=jS.update({id:`/mold-inspection`,path:`/mold-inspection`,getParentRoute:()=>Q}),ew=NS.update({id:`/mold-remediation`,path:`/mold-remediation`,getParentRoute:()=>Q}
63),tw=FS.update({id:`/odor-removal`,path:`/odor-removal`,getParentRoute:()=>Q}),nw=IS.update({id:`/privacy`,path:`/privacy`,getParentRoute:()=>Q}),rw=LS.update({id:`/rebuilding-and-repair-services`,path:`/rebuilding-and-repair-services`,getParentRoute:()=>Q}),iw=RS.update({id:`/request-callback-form`,path:`/request-callback-form`,getParentRoute:()=>Q}),aw=zS.update({id:`/residential-air-duct-cleaning-sanitizing-and-repair`,path:`/residential-air-duct-cleaning-sanitizing-and-repair`,getParentRoute:()=>Q}),ow=BS.update({id:`/residential-carpet-and-area-rug-cleaning`,path:`/residential-carpet-and-area-rug-cleaning`,getParentRoute:()=>Q}),sw=VS.update({id:`/residential-dead-animal-removal-and-mitigation`,path:`/residential-dead-animal-removal-and-mitigation`,getParentRoute:()=>Q}),cw=HS.update({id:`/residential-environmental-cleaning-and-remediation`,path:`/residential-environmental-cleaning-and-remediation`,getParentRoute:()=>Q}),lw=US.update({id:`/residential-hard-floor-cleaning`,path:`/residential-hard-floor-cleaning`,getParentRoute:()=>Q}),uw=WS.update({id:`/residential-hvac-plenum-cleaning-and-repair`,path:`/residential-hvac-plenum-cleaning-and-repair`,getParentRoute:()=>Q}),dw=GS.update({id:`/residential-hvac-system-uv-light-installation`,path:`/residential-hvac-system-uv-light-installation`,getParentRoute:()=>Q}),fw=KS.update({id:`/residential-mold-inspection`,path:`/residential-mold-inspection`,getParentRoute:()=>Q}),pw=qS.update({id:`/residential-mold-remediation`,path:`/residential-mold-remediation`,getParentRoute:()=>Q}),mw=JS.update({id:`/residential-odor-removal`,path:`/residential-odor-removal`,getParentRoute:()=>Q}),hw=YS.update({id:`/residential-water-damage-repair-and-restoration`,path:`/residential-water-damage-repair-and-restoration`,getParentRoute:()=>Q}),gw=XS.update({id:`/reviews`,path:`/reviews`,getParentRoute:()=>Q}),_w=ZS.update({id:`/serving-area`,path:`/serving-area`,getParentRoute:()=>Q}),vw=QS.update({id:`/special-offers`,path:`/special-offers`,getParentRoute:()=>Q}
63),yw=eC.update({id:`/structural-damage-repair`,path:`/structural-damage-repair`,getParentRoute:()=>Q}),bw=tC.update({id:`/terms`,path:`/terms`,getParentRoute:()=>Q}),xw=rC.update({id:`/water-damage-restoration`,path:`/water-damage-restoration`,getParentRoute:()=>Q}),Sw=iC.update({id:`/why-clean-your-air-ducts`,path:`/why-clean-your-air-ducts`,getParentRoute:()=>Q}),Cw=aC.update({id:`/why-it-is-worth-hiring-a-local-duct-cleaner-this-summer`,path:`/why-it-is-worth-hiring-a-local-duct-cleaner-this-summer`,getParentRoute:()=>Q}),ww=oC.update({id:`/why-your-diy-bleach-spray-can-t-replace-certified-mold-remediation`,path:`/why-your-diy-bleach-spray-can-t-replace-certified-mold-remediation`,getParentRoute:()=>Q}),Tw=sC.update({id:`/admin/leads`,path:`/admin/leads`,getParentRoute:()=>Q}),Ew=cC.update({id:`/blog/`,path:`/blog/`,getParentRoute:()=>Q}),Dw={IndexRoute:hC,SplatRoute:gC,AGuideToAirQualityInYourHomeRoute:_C,AboutRoute:vC,AirDuctCleaningRoute:yC,AirDuctMoldRemovalRoute:bC,AreasOfTheHomeMostVulnerableToMoldGrowthRoute:xC,BenefitsOfRegularAirDuctCleaningForIndoorAirQualityRoute:SC,CarpetFloorCleaningRoute:CC,ChimneyDryerVentCleaningRoute:wC,ChrisMorenoRoute:TC,CommercialRoute:EC,CommercialAirDuctCleaningRoute:DC,CommercialAirDuctCleaningSanitizingAndRepairRoute:OC,CommercialDryerVentCleaningRoute:kC,CommercialDryerVentDuctCleaningRoute:AC,CommercialEnvironmentalCleaningAndRemediationRoute:jC,CommercialKitchenVentHoodCleaningRoute:MC,CommercialLaundryExhaustDuctCleaningRoute:NC,CommercialMoldInspectionRoute:PC,CommercialMoldRemediationRoute:FC,CommercialOdorRemovalRoute:IC,CommercialWaterDamageRepairAndRestorationRoute:LC,CommercialWaterDamageRestorationRoute:RC,ContactRoute:zC,DeadAnimalRemovalRoute:BC,DustDanderAndMoldHowLocalDuctCleanersImproveYourHomesAirQualityRoute:VC,FacilityCareProgramRoute:HC,FaqsRoute:UC,GalleryRoute:WC,HardFloorCleaningRoute:GC,HowDuctCleanersHelpKeepDustFromTakingOverYourHomeRoute:KC,HowMoistureProblemsLeadToMoldDamageRoute:qC,HowToTellIfYourAirDuctsActuallyNeedCleaning6SignsYourHvacSystemIsCirculatingMoreThanAirRoute:JC,HvacPlenumCleaningRoute:YC,HvacUvLightInstallationRoute:XC,MajorProjectsRoute:ZC,MeetTheTeamRoute:QC,MoldInspectionRoute:$C,MoldRemediationRoute:ew,OdorRemovalRoute:tw,PrivacyRoute:nw,RebuildingAndRepairServicesRoute:rw,RequestCallbackFormRoute:iw,ResidentialAirDuctCleaningSanitizingAndRepairRoute:aw,ResidentialCarpetAndAreaRugCleaningRoute:ow,ResidentialDeadAnimalRemovalAndMitigationRoute:sw,ResidentialEnvironmentalCleaningAndRemediationRoute:cw,ResidentialHardFloorCleaningRoute:lw,ResidentialHvacPlenumCleaningAndRepairRoute:uw,ResidentialHvacSystemUvLightInstallationRoute:dw,ResidentialMoldInspectionRoute:fw,ResidentialMoldRemediationRoute:pw,ResidentialOdorRemovalRoute:mw,ResidentialWaterDamageRepairAndRestorationRoute:hw,ReviewsRoute:gw,ServingAreaRoute:_w,SpecialOffersRoute:vw,StructuralDamageRepairRoute:yw,TermsRoute:bw,WaterDamageRestorationRoute:xw,WhyCleanYourAirDuctsRoute:Sw,WhyItIsWorthHiringALocalDuctCleanerThisSummerRoute:Cw,WhyYourDiyBleachSprayCanTReplaceCertifiedMoldRemediationRoute:ww,AdminLeadsRoute:Tw,BlogSlugRoute:dC.update({id:`/blog/$slug`,path:`/blog/$slug`,getParentRoute:()=>Q}),ServiceAreaCityRoute:mC.update({id:`/service-area/$city`,path:`/service-area/$city`,getParentRoute:()=>Q}),BlogIndexRoute:Ew},Ow=Q._addFileChildren(Dw),kw=()=>Jc({routeTree:Ow,context:{queryClient:new dg},scrollRestoration:!0,defaultPreloadStaleTime:0});async function Aw(){let e=await kw(),t;if(fh){let n=await fh.getOptions();n.serializationAdapters=n.serializationAdapters??[],window.__TSS_START_OPTIONS__=n,t=n.serializationAdapters,e.options.defaultSsr=n.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};return t.push(Gs),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:``,serializationAdapters:t}),e.stores.ids.get().length||await Xn(e),e}var jw=Aw;function Mw(){return jw().finally(()=>window.$_TSR?.h())}var Nw;function Pw(){return Nw||=Mw(),(0,I.jsx)(Ys,{promise:Nw,children:e=>(0,I.jsx)(Zc,{router:e})})}var Fw=Te();(0,F.startTransition)(()=>{(0,Fw.hydrateRoot)(document,(0,I.jsx)(F.StrictMode,{children:(0,I.jsx)(Pw,{})}))});export{bg as $,J_ as A,e_ as B,Vx as C,Qv as D,Ax as E,D_ as F,Hg as G,Qg as H,d_ as I,Ag as J,Ng as K,c_ as L,V_ as M,N_ as N,dv as O,k_ as P,Tg as Q,r_ as R,qx as S,Mx as T,Zg as U,$g as V,Xg as W,Dg as X,Og as Y,Sg as Z,iS as _,lC as a,Mg as at,Zx as b,PS as c,Ae as ct,ES as d,xg as et,wS as f,sS as g,uS as h,dC as i,kg as it,U_ as j,rv as k,MS as l,Oe as lt,mS as m,fC as n,vg as nt,nC as o,gg as ot,yS as p,Pg as q,pC as r,yg as rt,$S as s,Ws as
63st,mC as t,Eg as tt,AS as u,tS as v,Lx as w,Yx as x,$x as y,n_ 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.