PageSourceSearch

https://shuttermedia.co.uk/assets/index-CyWFTq5f.js

js shuttermedia.co.uk collected 2026-10-07 20:19:40 UTC 703,138 bytes, 23 lines download raw bytes

vendor: 33,300 bytes, lines 1-9
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-BBbVUaAo.js","assets/jsx-runtime-DRF4vMFQ.js","assets/rolldown-runtime-QTnfLwEv.js","assets/link-BEVzFf1V.js","assets/react-dom-CEVbmmCH.js","assets/useStore-CDXnTkQV.js","assets/ClientOnly-CtAz5v-S.js","assets/invariant-DEEwAagU.js","assets/portfolio-DZx_XXyx.js","assets/_-D8lzNAFZ.js","assets/access.functions-T59hQD-s.js","assets/createServerFn-Bclj9d9f.js","assets/redirect-DCb_aIiF.js","assets/auth-middleware-RL8C5Sd4.js","assets/route-DzHh-ixE.js","assets/about-BpQAmQtS.js","assets/auth-B4xxnUP6.js","assets/useNavigate-NyA2Q43T.js","assets/matchContext-B6JKUtag.js","assets/button-DPv_WH3N.js","assets/input-CgqFLO_F.js","assets/label-_fHYYcvv.js","assets/dist-DxwLC63G.js","assets/card-BPNE32zy.js","assets/contact-I6Zg_W2D.js","assets/outdoor-advertising-CJ5KvzGH.js","assets/roller-shutter-resprays-zU_2-3pA.js","assets/useServerFn-CEB2Qx8_.js","assets/createLucideIcon-BJc-iHgg.js","assets/arrow-right-QtLMz3J6.js","assets/check-4oJCEu7l.js","assets/image-plus-C5DeEtMa.js","assets/loader-circle-BVm5x78x.js","assets/x-CJiTQi3v.js","assets/media-C94NJHv6.js","assets/textarea-ar83V0Ok.js","assets/shutter-advertising-BIasmQ5Y.js","assets/search-BD7fbNc_.js","assets/shutter-graphics-CA_PE7Kq.js","assets/shutter-wraps-BG8a95Kd.js","assets/street-furniture-wraps-BtLQrd2X.js","assets/vinyl-graphics-D0Dg7yxl.js","assets/window-graphics-RN1VjlUR.js","assets/work-Brjcg3ue.js","assets/guides.roller-shutter-graphics-vs-shopfront-signs-DgiYnIHh.js","assets/roller-shutter-graphics.index-btgeScDm.js","assets/roller-shutter-graphics._location-CWDcB_hn.js","assets/services._slug-BAfcljza.js","assets/admin.index-jkOwOhMF.js","assets/AdminShell-DE-ucz_L.js","assets/useQuery-CwmTw6op.js","assets/send-CDuynGQB.js","assets/calc-Bm4WQA62.js","assets/badge-RuoGxgTY.js","assets/document-CrUHz2a6.js","assets/admin.brands-BU3kMdKH.js","assets/useMutation-D4xsuid4.js","assets/upload-3i67RYS-.js","assets/switch-afDTG2NO.js","assets/dist-eEyQ1SEv.js","assets/dist-BQKVTZ3b.js","assets/tabs-ww5XgzHO.js","assets/dist-B56u2ASw.js","assets/dist-D8uBOkEh.js","assets/admin.customers-BDl3MQnr.js","assets/plus-DskOaz9P.js","assets/trash-2-BJhxKnfb.js","assets/dialog-DEWwFW2p.js","assets/es2015-CY6wZOs4.js","assets/admin.expenses-DMseOjzb.js","assets/select-DZ6W8kbk.js","assets/admin.pl-8YQA5Uly.js","assets/admin.products-73vEf92A.js","assets/admin.marketing.index-92PQKU12.js","assets/marketing.functions-ifnbafao.js","assets/MarketingShell-DgSqD2fk.js","assets/constants-DhtbFtBp.js","assets/merge-Dr8M43b9.js","assets/admin.marketing.contacts-BIWPzyv5.js","assets/mail-CPwG0ZnS.js","assets/score-dfUuYpAz.js","assets/activity-DIw_yVqd.js","assets/documents.functions-ZvJ_B01H.js","assets/admin.marketing.followups-BoRr_k3e.js","assets/admin.marketing.funding-vNA79Wjc.js","assets/admin.marketing.import-Bqb8nfUy.js","assets/import-map-B5aG4pvo.js","assets/admin.marketing.inbox-DJibTbsV.js","assets/admin.marketing.media-CINQq0fW.js","assets/admin.marketing.pdfs-DXzQTrrY.js","assets/jspdf.es.min-R4yndSLe.js","assets/admin.marketing.pipeline-BFhVIPSr.js","assets/admin.marketing.proposals-DUYjgAxL.js","assets/admin.marketing.reports-DUht4NpF.js","assets/admin.marketing.settings-bDtF4QzN.js","assets/admin.marketing.suppression-o9_l8m1Z.js","assets/admin.marketing.tasks-BlLIEoVE.js","assets/admin.marketing.templates-CpA_sWBl.js","assets/admin.quotes.index-vm0tYPJx.js","assets/copy-DOcjJL1u.js","assets/admin.quotes._id-BhP7QjxQ.js","assets/admin.marketing.campaigns.index-BPK6KrPN.js","assets/admin.marketing.campaigns._id-M0HyeVDc.js","assets/admin.marketing.organisations.index-CBSmOUWc.js","assets/admin.marketing.organisations._id-BW96a49-.js"])))=>i.map(i=>d[i]);
2import{n as e,r as t,t as n}from"./rolldown-runtime-QTnfLwEv.js";import{n as r,t as i}from"./jsx-runtime-DRF4vMFQ.js";import{t as a}from"./react-dom-CEVbmmCH.js";import{_ as o,a as s,c,d as l,f as u,g as d,h as f,i as p,l as m,m as h,n as g,o as _,p as v,r as y,s as b,t as x,u as ee,v as S}from"./useStore-CDXnTkQV.js";import{t as C}from"./invariant-DEEwAagU.js";import{C as te,S as ne,_ as re,b as ie,c as ae,d as oe,f as se,g as ce,h as le,l as ue,m as w,n as E,o as de,r as fe,s as pe,t as me,v as he,w as ge,x as _e,y as ve}from"./ClientOnly-CtAz5v-S.js";import{a as ye,i as D,n as be,r as xe,t as O}from"./redirect-DCb_aIiF.js";import{t as Se}from"./root-DLTE-HSj.js";import{t as k}from"./link-BEVzFf1V.js";import{n as Ce}from"./matchContext-B6JKUtag.js";import{n as we,t as Te}from"./useNavigate-NyA2Q43T.js";import{a as Ee,c as De,l as Oe,n as ke,o as Ae,r as A,t as j}from"./portfolio-DZx_XXyx.js";var je=n((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,ee||(ee=!0,ie());else{var t=n(l);t!==null&&se(x,t.startTime-e)}}var ee=!1,S=-1,C=5,te=-1;function ne(){return g?!0:!(e.unstable_now()-te<C)}function re(){if(g=!1,ee){var t=e.unstable_now();te=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(S),S=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ne());){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&&se(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ie():ee=!1}}}var ie;if(typeof y==`function`)ie=function(){y(re)};else if(typeof MessageChannel<`u`){var ae=new MessageChannel,oe=ae.port2;ae.port1.onmessage=re,ie=function(){oe.postMessage(null)}}else ie=function(){_(re,0)};function se(t,n){S=_(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`):C=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(S),S=-1):h=!0,se(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,ie()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Me=n(((e,t)=>{t.exports=je()})),Ne=n((e=>{var t=Me(),n=r(),i=a();function o(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 s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(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 l(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 u(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 d(e){if(c(e)!==e)throw Error(o(188))}function f(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(o(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return d(i),e;if(a===r)return d(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,h=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),_=Symbol.for(`react.portal`),v=Symbol.for(`react.fragment`),y=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),ee=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),te=Symbol.for(`react.suspense_list`),ne=Symbol.for(`react.memo`),re=Symbol.for(`react.lazy`),ie=Symbol.for(`react.activity`),ae=Symbol.for(`react.memo_cache_sentinel`),oe=Symbol.iterator;function se(e){return typeof e!=`object`||!e?null:(e=oe&&e[oe]||e[`@@iterator`],typeof e==`function`?e:null)}var ce=Symbol.for(`react.client.reference`);function le(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ce?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case v:return`Fragment`;case b:return`Profiler`;case y:return`StrictMode`;case C:return`Suspense`;case te:return`SuspenseList`;case ie:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case _:return`Portal`;case ee:return e.displayName||`Context`;case x: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 ne:return t=e.displayName||null,t===null?le(e.type)||`Memo`:t;case re:t=e._payload,e=e._init;try{return le(e(t))}catch{}}return null}var ue=Array.isArray,w=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,E=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de={pending:!1,data:null,method:null,action:null},fe=[],pe=-1;function me(e){return{current:e}}function he(e){0>pe||(e.current=fe[pe],fe[pe]=null,pe--)}function ge(e,t){pe++,fe[pe]=e.current,e.current=t}var _e=me(null),ve=me(null),ye=me(null),D=me(null);function be(e,t){switch(ge(ye,t),ge(ve,e),ge(_e,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Wd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Wd(t),e=Gd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}he(_e),ge(_e,e)}function xe(){he(_e),he(ve),he(ye)}function O(e){e.memoizedState!==null&&ge(D,e);var t=_e.current,n=Gd(t,e.type);t!==n&&(ge(ve,e),ge(_e,n))}function Se(e){ve.current===e&&(he(_e),he(ve)),D.current===e&&(he(D),ep._currentValue=de)}var k,Ce;function we(e){if(k===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);k=t&&t[1]||``,Ce=-1<e.stack.indexOf(`
3    at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4`+k+e+Ce}var Te=!1;function Ee(e,t){if(!e||Te)return``;Te=!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)}else{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{Te=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?we(n):``}function De(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we(`Lazy`);case 13:return e.child!==t&&t!==null?we(`Suspense Fallback`):we(`Suspense`);case 19:return we(`SuspenseList`);case 0:case 15:return Ee(e.type,!1);case 11:return Ee(e.type.render,!1);case 1:return Ee(e.type,!0);case 31:return we(`Activity`);default:return``}}function Oe(e){try{var t=``,n=null;do t+=De(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8Error generating stack: `+e.message+`
9`+e.stack}}var ke=Object.prototype.hasOwnProperty,Ae=t.unstable_scheduleCallback,A=t.unstable_cancelCallback,j=t.unstable_shouldYield,je=t.unstable_requestPaint,Ne=t.unstable_now,Pe=t.unstable_getCurrentPriorityLevel,Fe=t.unstable_ImmediatePriority,Ie=t.unstable_UserBlockingPriority,Le=t.unstable_NormalPriority,Re=t.unstable_LowPriority,ze=t.unstable_IdlePriority,Be=t.log,Ve=t.unstable_setDisableYieldValue,He=null,Ue=null;function We(e){if(typeof Be==`function`&&Ve(e),Ue&&typeof Ue.setStrictMode==`function`)try{Ue.setStrictMode(He,e)}catch{}}var Ge=Math.clz32?Math.clz32:Je,Ke=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ke(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function Qe(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 $e(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=Qe(n))):i=Qe(o):i=Qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Qe(n))):i=Qe(o)):i=Qe(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 et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(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 nt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function rt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function it(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function at(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-Ge(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&&ot(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ot(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ge(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function st(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ge(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ct(e,t){var n=t&-t;return n=n&42?1:lt(n),(n&(e.suspendedLanes|t))===0?n:0}function lt(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 ut(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function dt(){var e=E.p;return e===0?(e=window.event,e===void 0?32:hp(e.type)):e}function ft(e,t){var n=E.p;try{return E.p=e,t()}finally{E.p=n}}var pt=Math.random().toString(36).slice(2),mt=`__reactFiber$`+pt,ht=`__reactProps$`+pt,gt=`__reactContainer$`+pt,_t=`__reactEvents$`+pt,vt=`__reactListeners$`+pt,yt=`__reactHandles$`+pt,bt=`__reactResources$`+pt,xt=`__reactMarker$`+pt;function St(e){delete e[mt],delete e[ht],delete e[_t],delete e[vt],delete e[yt]}function Ct(e){var t=e[mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[gt]||n[mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mf(e);e!==null;){if(n=e[mt])return n;e=mf(e)}return t}e=n,n=e.parentNode}return null}function wt(e){if(e=e[mt]||e[gt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Tt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Et(e){var t=e[bt];return t||=e[bt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Dt(e){e[xt]=!0}var Ot=new Set,kt={};function At(e,t){jt(e,t),jt(e+`Capture`,t)}function jt(e,t){for(kt[e]=t,e=0;e<t.length;e++)Ot.add(t[e])}var Mt=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]*$`),Nt={},Pt={};function Ft(e){return ke.call(Pt,e)?!0:ke.call(Nt,e)?!1:Mt.test(e)?Pt[e]=!0:(Nt[e]=!0,!1)}function It(e,t,n){if(Ft(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 Lt(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 Rt(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 zt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Bt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Vt(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 Ht(e){if(!e._valueTracker){var t=Bt(e)?`checked`:`value`;e._valueTracker=Vt(e,t,``+e[t])}}function Ut(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Bt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Wt(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 Gt=/[\n"\\]/g;function Kt(e){return e.replace(Gt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function qt(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=``+zt(t)):e.value!==``+zt(t)&&(e.value=``+zt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Yt(e,o,zt(n)):Yt(e,o,zt(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=``+zt(s):e.removeAttribute(`name`)}function Jt(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)){Ht(e);return}n=n==null?``:``+zt(n),t=t==null?n:``+zt(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),Ht(e)}function Yt(e,t,n){t===`number`&&Wt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Xt(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=``+zt(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 Zt(e,t,n){if(t!=null&&(t=``+zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+zt(n)}function Qt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(o(92));if(ue(r)){if(1<r.length)throw Error(o(93));r=r[0]}n=r}n??=``,t=n}n=zt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ht(e)}function $t(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var en=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 tn(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||en.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function nn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(o(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 i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&tn(e,i,r)}else for(var a in t)t.hasOwnProperty(a)&&tn(e,a,t[a])}function rn(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 an=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`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`]]),on=/^[\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 sn(e){return on.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function cn(){}var ln=null;function un(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dn=null,fn=null;function pn(e){var t=wt(e);if(t&&(e=t.stateNode)){var n=e[ht]||null;a:switch(e=t.stateNode,t.type){case`input`:if(qt(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="`+Kt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[ht]||null;if(!i)throw Error(o(90));qt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ut(r)}break a;case`textarea`:Zt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Xt(e,!!n.multiple,t,!1)}}}var mn=!1;function hn(e,t,n){if(mn)return e(t,n);mn=!0;try{return e(t)}finally{if(mn=!1,(dn!==null||fn!==null)&&(wu(),dn&&(t=dn,e=fn,fn=dn=null,pn(t),e)))for(t=0;t<e.length;t++)pn(e[t])}}function gn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ht]||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(o(231,t,typeof n));return n}var _n=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),vn=!1;if(_n)try{var yn={};Object.defineProperty(yn,"passive",{get:function(){vn=!0}}),window.addEventListener(`test`,yn,yn),window.removeEventListener(`test`,yn,yn)}catch{vn=!1}var bn=null,xn=null,Sn=null;function Cn(){if(Sn)return Sn;var e,t=xn,n=t.length,r,i=`value`in bn?bn.value:bn.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 Sn=i.slice(e,1<r?1-r:void 0)}function wn(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 Tn(){return!0}function En(){return!1}function Dn(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)?Tn:En,this.isPropagationStopped=En,this}return m(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=Tn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Tn)},persist:function(){},isPersistent:Tn}),t}var On={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kn=Dn(On),An=m({},On,{view:0,detail:0}),jn=Dn(An),Mn,Nn,M,Pn=m({},An,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wn,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!==M&&(M&&e.type===`mousemove`?(Mn=e.screenX-M.screenX,Nn=e.screenY-M.screenY):Nn=Mn=0,M=e),Mn)},movementY:function(e){return`movementY`in e?e.movementY:Nn}}),Fn=Dn(Pn),In=Dn(m({},Pn,{dataTransfer:0})),N=Dn(m({},An,{relatedTarget:0})),Ln=Dn(m({},On,{animationName:0,elapsedTime:0,pseudoElement:0})),Rn=Dn(m({},On,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),zn=Dn(m({},On,{data:0})),Bn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Vn={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:`F
95`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Hn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Un(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Hn[e])?!!t[e]:!1}function Wn(){return Un}var Gn=Dn(m({},An,{key:function(e){if(e.key){var t=Bn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=wn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Vn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wn,charCode:function(e){return e.type===`keypress`?wn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?wn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Kn=Dn(m({},Pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),qn=Dn(m({},An,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wn})),Jn=Dn(m({},On,{propertyName:0,elapsedTime:0,pseudoElement:0})),Yn=Dn(m({},Pn,{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})),Xn=Dn(m({},On,{newState:0,oldState:0})),Zn=[9,13,27,32],Qn=_n&&`CompositionEvent`in window,$n=null;_n&&`documentMode`in document&&($n=document.documentMode);var er=_n&&`TextEvent`in window&&!$n,tr=_n&&(!Qn||$n&&8<$n&&11>=$n),nr=` `,rr=!1;function ir(e,t){switch(e){case`keyup`:return Zn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ar(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var or=!1;function sr(e,t){switch(e){case`compositionend`:return ar(t);case`keypress`:return t.which===32?(rr=!0,nr):null;case`textInput`:return e=t.data,e===nr&&rr?null:e;default:return null}}function cr(e,t){if(or)return e===`compositionend`||!Qn&&ir(e,t)?(e=Cn(),Sn=xn=bn=null,or=!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 tr&&t.locale!==`ko`?null:t.data;default:return null}}var lr={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 ur(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!lr[e.type]:t===`textarea`}function dr(e,t,n,r){dn?fn?fn.push(r):fn=[r]:dn=r,t=kd(t,`onChange`),0<t.length&&(n=new kn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var fr=null,pr=null;function mr(e){Sd(e,0)}function hr(e){if(Ut(Tt(e)))return e}function gr(e,t){if(e===`change`)return t}var _r=!1;if(_n){var vr;if(_n){var yr=`oninput`in document;if(!yr){var br=document.createElement(`div`);br.setAttribute(`oninput`,`return;`),yr=typeof br.oninput==`function`}vr=yr}else vr=!1;_r=vr&&(!document.documentMode||9<document.documentMode)}function xr(){fr&&(fr.detachEvent(`onpropertychange`,Sr),pr=fr=null)}function Sr(e){if(e.propertyName===`value`&&hr(pr)){var t=[];dr(t,pr,e,un(e)),hn(mr,t)}}function Cr(e,t,n){e===`focusin`?(xr(),fr=t,pr=n,fr.attachEvent(`onpropertychange`,Sr)):e===`focusout`&&xr()}function wr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return hr(pr)}function Tr(e,t){if(e===`click`)return hr(t)}function Er(e,t){if(e===`input`||e===`change`)return hr(t)}function Dr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Or=typeof Object.is==`function`?Object.is:Dr;function kr(e,t){if(Or(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(!ke.call(t,i)||!Or(e[i],t[i]))return!1}return!0}function Ar(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jr(e,t){var n=Ar(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=Ar(n)}}function Mr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wt(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=Wt(e.document)}return t}function Pr(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 Fr=_n&&`documentMode`in document&&11>=document.documentMode,Ir=null,Lr=null,Rr=null,zr=!1;function Br(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zr||Ir==null||Ir!==Wt(r)||(r=Ir,`selectionStart`in r&&Pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 72,329 bytes, line 9
9sNode:r.focusNode,focusOffset:r.focusOffset}),Rr&&kr(Rr,r)||(Rr=r,r=kd(Lr,`onSelect`),0<r.length&&(t=new kn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ir)))}function Vr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Hr={animationend:Vr(`Animation`,`AnimationEnd`),animationiteration:Vr(`Animation`,`AnimationIteration`),animationstart:Vr(`Animation`,`AnimationStart`),transitionrun:Vr(`Transition`,`TransitionRun`),transitionstart:Vr(`Transition`,`TransitionStart`),transitioncancel:Vr(`Transition`,`TransitionCancel`),transitionend:Vr(`Transition`,`TransitionEnd`)},Ur={},Wr={};_n&&(Wr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Hr.animationend.animation,delete Hr.animationiteration.animation,delete Hr.animationstart.animation),`TransitionEvent`in window||delete Hr.transitionend.transition);function Gr(e){if(Ur[e])return Ur[e];if(!Hr[e])return e;var t=Hr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Wr)return Ur[e]=t[n];return e}var Kr=Gr(`animationend`),qr=Gr(`animationiteration`),Jr=Gr(`animationstart`),Yr=Gr(`transitionrun`),Xr=Gr(`transitionstart`),Zr=Gr(`transitioncancel`),Qr=Gr(`transitionend`),$r=new Map,ei=`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(` `);ei.push(`scrollEnd`);function ti(e,t){$r.set(e,t),At(t,[e])}var ni=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)},ri=[],ii=0,ai=0;function oi(){for(var e=ii,t=ai=ii=0;t<e;){var n=ri[t];ri[t++]=null;var r=ri[t];ri[t++]=null;var i=ri[t];ri[t++]=null;var a=ri[t];if(ri[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&&ui(n,i,a)}}function si(e,t,n,r){ri[ii++]=e,ri[ii++]=t,ri[ii++]=n,ri[ii++]=r,ai|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ci(e,t,n,r){return si(e,t,n,r),di(e)}function li(e,t){return si(e,null,null,t),di(e)}function ui(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-Ge(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function di(e){if(50<hu)throw hu=0,gu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var fi={};function pi(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 mi(e,t,n,r){return new pi(e,t,n,r)}function hi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gi(e,t){var n=e.alternate;return n===null?(n=mi(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 _i(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 vi(e,t,n,r,i,a){var s=0;if(r=e,typeof e==`function`)hi(e)&&(s=1);else if(typeof e==`string`)s=Gf(e,n,_e.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ie:return e=mi(31,n,t,i),e.elementType=ie,e.lanes=a,e;case v:return yi(n.children,i,a,t);case y:s=8,i|=24;break;case b:return e=mi(12,n,t,i|2),e.elementType=b,e.lanes=a,e;case C:return e=mi(13,n,t,i),e.elementType=C,e.lanes=a,e;case te:return e=mi(19,n,t,i),e.elementType=te,e.lanes=a,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case ee:s=10;break a;case x:s=9;break a;case S:s=11;break a;case ne:s=14;break a;case re:s=16,r=null;break a}s=29,n=Error(o(130,e===null?`null`:typeof e,``)),r=null}return t=mi(s,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function yi(e,t,n,r){return e=mi(7,e,r,t),e.lanes=n,e}function bi(e,t,n){return e=mi(6,e,null,t),e.lanes=n,e}function xi(e){var t=mi(18,null,null,0);return t.stateNode=e,t}function Si(e,t,n){return t=mi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ci=new WeakMap;function wi(e,t){if(typeof e==`object`&&e){var n=Ci.get(e);return n===void 0?(t={value:e,source:t,stack:Oe(t)},Ci.set(e,t),t):n}return{value:e,source:t,stack:Oe(t)}}var Ti=[],Ei=0,Di=null,Oi=0,ki=[],Ai=0,ji=null,Mi=1,Ni=``;function Pi(e,t){Ti[Ei++]=Oi,Ti[Ei++]=Di,Di=e,Oi=t}function Fi(e,t,n){ki[Ai++]=Mi,ki[Ai++]=Ni,ki[Ai++]=ji,ji=e;var r=Mi;e=Ni;var i=32-Ge(r)-1;r&=~(1<<i),n+=1;var a=32-Ge(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Mi=1<<32-Ge(t)+i|n<<i|r,Ni=a+e}else Mi=1<<a|n<<i|r,Ni=e}function Ii(e){e.return!==null&&(Pi(e,1),Fi(e,1,0))}function Li(e){for(;e===Di;)Di=Ti[--Ei],Ti[Ei]=null,Oi=Ti[--Ei],Ti[Ei]=null;for(;e===ji;)ji=ki[--Ai],ki[Ai]=null,Ni=ki[--Ai],ki[Ai]=null,Mi=ki[--Ai],ki[Ai]=null}function Ri(e,t){ki[Ai++]=Mi,ki[Ai++]=Ni,ki[Ai++]=ji,Mi=t.id,Ni=t.overflow,ji=e}var zi=null,Bi=null,P=!1,Vi=null,Hi=!1,Ui=Error(o(519));function Wi(e){throw Xi(wi(Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ui}function Gi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[mt]=e,t[ht]=r,n){case`dialog`:X(`cancel`,t),X(`close`,t);break;case`iframe`:case`object`:case`embed`:X(`load`,t);break;case`video`:case`audio`:for(n=0;n<bd.length;n++)X(bd[n],t);break;case`source`:X(`error`,t);break;case`img`:case`image`:case`link`:X(`error`,t),X(`load`,t);break;case`details`:X(`toggle`,t);break;case`input`:X(`invalid`,t),Jt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:X(`invalid`,t);break;case`textarea`:X(`invalid`,t),Qt(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||Fd(t.textContent,n)?(r.popover!=null&&(X(`beforetoggle`,t),X(`toggle`,t)),r.onScroll!=null&&X(`scroll`,t),r.onScrollEnd!=null&&X(`scrollend`,t),r.onClick!=null&&(t.onclick=cn),t=!0):t=!1,t||Wi(e,!0)}function Ki(e){for(zi=e.return;zi;)switch(zi.tag){case 5:case 31:case 13:Hi=!1;return;case 27:case 3:Hi=!0;return;default:zi=zi.return}}function qi(e){if(e!==zi)return!1;if(!P)return Ki(e),P=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Kd(e.type,e.memoizedProps)),n=!n),n&&Bi&&Wi(e),Ki(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(317));Bi=pf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(317));Bi=pf(e)}else t===27?(t=Bi,ef(e.type)?(e=ff,ff=null,Bi=e):Bi=t):Bi=zi?df(e.stateNode.nextSibling):null;return!0}function Ji(){Bi=zi=null,P=!1}function Yi(){var e=Vi;return e!==null&&(nu===null?nu=e:nu.push.apply(nu,e),Vi=null),e}function Xi(e){Vi===null?Vi=[e]:Vi.push(e)}var Zi=me(null),Qi=null,$i=null;function ea(e,t,n){ge(Zi,t._currentValue),t._currentValue=n}function ta(e){e._currentValue=Zi.current,he(Zi)}function na(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 ra(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var s=i.child;a=a.firstContext;a:for(;a!==null;){var c=a;a=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),na(a.return,n,e),r||(s=null);break a}a=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(o(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),na(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function ia(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(o(387));if(s=s.memoizedProps,s!==null){var c=i.type;Or(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===D.current){if(s=i.alternate,s===null)throw Error(o(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[ep]:e.push(ep))}i=i.return}e!==null&&ra(t,e,n,r),t.flags|=262144}function aa(e){for(e=e.firstContext;e!==null;){if(!Or(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function oa(e){Qi=e,$i=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function sa(e){return la(Qi,e)}function ca(e,t){return Qi===null&&oa(e),la(e,t)}function la(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},$i===null){if(e===null)throw Error(o(308));$i=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else $i=$i.next=t;return n}var ua=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()})}},da=t.unstable_scheduleCallback,fa=t.unstable_NormalPriority,pa={$$typeof:ee,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ma(){return{controller:new ua,data:new Map,refCount:0}}function ha(e){e.refCount--,e.refCount===0&&da(fa,function(){e.controller.abort()})}var ga=null,_a=0,va=0,ya=null;function ba(e,t){if(ga===null){var n=ga=[];_a=0,va=md(),ya={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return _a++,t.then(xa,xa),t}function xa(){if(--_a===0&&ga!==null){ya!==null&&(ya.status=`fulfilled`);var e=ga;ga=null,va=0,ya=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Sa(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 Ca=w.S;w.S=function(e,t){au=Ne(),typeof t==`object`&&t&&typeof t.then==`function`&&ba(e,t),Ca!==null&&Ca(e,t)};var wa=me(null);function Ta(){var e=wa.current;return e===null?Ul.pooledCache:e}function Ea(e,t){t===null?ge(wa,wa.current):ge(wa,t.pool)}function Da(){var e=Ta();return e===null?null:{parent:pa._currentValue,pool:e}}var Oa=Error(o(460)),ka=Error(o(474)),Aa=Error(o(542)),ja={then:function(){}};function Ma(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Na(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(cn,cn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,La(e),e;default:if(typeof t.status==`string`)t.then(cn,cn);else{if(e=Ul,e!==null&&100<e.shellSuspendCounter)throw Error(o(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,La(e),e}throw Fa=t,Oa}}function Pa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Fa=e,Oa):e}}var Fa=null;function Ia(){if(Fa===null)throw Error(o(459));var e=Fa;return Fa=null,e}function La(e){if(e===Oa||e===Aa)throw Error(o(483))}var Ra=null,za=0;function Ba(e){var t=za;return za+=1,Ra===null&&(Ra=[]),Na(Ra,e,t)}function Va(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ha(e,t){throw t.$$typeof===h?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ua(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 i(e,t){return e=gi(e,t),e.index=0,e.sibling=null,e}function a(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=bi(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===v?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===re&&Pa(a)===t.type)?(t=i(t,n.props),Va(t,n),t.return=e,t):(t=vi(n.type,n.key,n.props,null,e.mode,r),Va(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=Si(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=yi(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=bi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=vi(t.type,t.key,t.props,null,e.mode,n),Va(n,t),n.return=e,n;case _:return t=Si(t,e.mode,n),t.return=e,t;case re:return t=Pa(t),f(e,t,n)}if(ue(t)||se(t))return t=yi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ba(t),n);if(t.$$typeof===ee)return f(e,ca(e,t),n);Ha(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 g:return n.key===i?l(e,t,n,r):null;case _:return n.key===i?u(e,t,n,r):null;case re:return n=Pa(n),p(e,t,n,r)}if(ue(n)||se(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ba(n),r);if(n.$$typeof===ee)return p(e,t,ca(e,n),r);Ha(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 g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case _:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case re:return r=Pa(r),m(e,t,n,r,i)}if(ue(r)||se(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ba(r),i);if(r.$$typeof===ee)return m(e,t,n,ca(t,r),i);Ha(t,r)}return null}function h(i,o,s,c){for(var l=null,u=null,d=o,h=o=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),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),P&&Pi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(o=a(d,o,h),u===null?l=d:u.sibling=d,u=d);return P&&Pi(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),o=a(g,o,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),P&&Pi(i,h),l}function y(i,s,c,l){if(c==null)throw Error(o(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(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=a(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),P&&Pi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=a(v,s,g),d===null?u=v:d.sibling=v,d=v);return P&&Pi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=a(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),P&&Pi(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===v&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case g:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===v){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===re&&Pa(l)===r.type){n(e,r.sibling),c=i(r,a.props),Va(c,a),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}a.type===v?(c=yi(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=vi(a.type,a.key,a.props,null,e.mode,c),Va(c,a),c.return=e,e=c)}return s(e);case _:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=Si(a,e.mode,c),c.return=e,e=c}return s(e);case re:return a=Pa(a),b(e,r,a,c)}if(ue(a))return h(e,r,a,c);if(se(a)){if(l=se(a),typeof l!=`function`)throw Error(o(150));return a=l.call(a),y(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,Ba(a),c);if(a.$$typeof===ee)return b(e,r,ca(e,a),c);Ha(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=bi(a,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{za=0;var i=b(e,t,n,r);return Ra=null,i}catch(t){if(t===Oa||t===Aa)throw t;var a=mi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Wa=Ua(!0),Ga=Ua(!1),Ka=!1;function F(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qa(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 Ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ya(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,U&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=di(e),ui(e,null,n),t}return si(e,r,t,n),di(e)}function Xa(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,st(e,n)}}function Za(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 Qa=!1;function $a(){if(Qa){var e=ya;if(e!==null)throw e}}function eo(e,t,n,r){Qa=!1;var i=e.updateQueue;Ka=!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,p=f!==s.lane;if(p?(G&f)===f:(r&f)===f){f!==0&&f===va&&(Qa=!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=m({},d,f);break a;case 2:Ka=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,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 to(e,t){if(typeof e!=`function`)throw Error(o(191,e));e.call(t)}function no(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)to(n[e],t)}var ro=me(null),io=me(0);function ao(e,t){e=Jl,ge(io,e),ge(ro,t),Jl=e|t.baseLanes}function oo(){ge(io,Jl),ge(ro,ro.current)}function so(){Jl=io.current,he(ro),he(io)}var co=me(null),lo=null;function uo(e){var t=e.alternate;ge(go,go.current&1),ge(co,e),lo===null&&(t===null||ro.current!==null||t.memoizedState!==null)&&(lo=e)}function fo(e){ge(go,go.current),ge(co,e),lo===null&&(lo=e)}function po(e){e.tag===22?(ge(go,go.current),ge(co,e),lo===null&&(lo=e)):mo(e)}function mo(){ge(go,go.current),ge(co,co.current)}function ho(e){he(co),lo===e&&(lo=null),he(go)}var go=me(0);function _o(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||cf(n)||lf(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 vo=0,I=null,L=null,yo=null,bo=!1,xo=!1,So=!1,Co=0,wo=0,To=null,Eo=0;function Do(){throw Error(o(321))}function Oo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Or(e[n],t[n]))return!1;return!0}function ko(e,t,n,r,i,a){return vo=a,I=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,w.H=e===null||e.memoizedState===null?Hs:Us,So=!1,a=n(r,i),So=!1,xo&&(a=jo(t,n,r,i)),Ao(e),a}function Ao(e){w.H=Vs;var t=L!==null&&L.next!==null;if(vo=0,yo=L=I=null,bo=!1,wo=0,To=null,t)throw Error(o(300));e===null||oc||(e=e.dependencies,e!==null&&aa(e)&&(oc=!0))}function jo(e,t,n,r){I=e;var i=0;do{if(xo&&(To=null),wo=0,xo=!1,25<=i)throw Error(o(301));if(i+=1,yo=L=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}w.H=Ws,a=t(n,r)}while(xo);return a}function Mo(){var e=w.H,t=e.useState()[0];return t=typeof t.then==`function`?zo(t):t,e=e.useState()[0],(L===null?null:L.memoizedState)!==e&&(I.flags|=1024),t}function No(){var e=Co!==0;return Co=0,e}function Po(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Fo(e){if(bo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bo=!1}vo=0,yo=L=I=null,xo=!1,wo=Co=0,To=null}function Io(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yo===null?I.memoizedState=yo=e:yo=yo.next=e,yo}function Lo(){if(L===null){var e=I.alternate;e=e===null?null:e.memoizedState}else e=L.next;var t=yo===null?I.memoizedState:yo.next;if(t!==null)yo=t,L=e;else{if(e===null)throw I.alternate===null?Error(o(467)):Error(o(310));L=e,e={memoizedState:L.memoizedState,baseState:L.baseState,baseQueue:L.baseQueue,queue:L.queue,next:null},yo===null?I.memoizedState=yo=e:yo=yo.next=e}return yo}function Ro(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function zo(e){var t=wo;return wo+=1,To===null&&(To=[]),e=Na(To,e,t),t=I,(yo===null?t.memoizedState:yo.next)===null&&(t=t.alternate,w.H=t===null||t.memoizedState===null?Hs:Us),e}function Bo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return zo(e);if(e.$$typeof===ee)return sa(e)}throw Error(o(438,String(e)))}function Vo(e){var t=null,n=I.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=I.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=Ro(),I.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]=ae;return t.index++,n}function Ho(e,t){return typeof t==`function`?t(e):t}function Uo(e){return Wo(Lo(),L,e)}function Wo(e,t,n){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var s=i.next;i.next=a.next,a.next=s}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(vo&f)===f:(G&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===va&&(d=!0);else if((vo&p)===p){u=u.next,p===va&&(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=a):l=l.next=f,I.lanes|=p,Xl|=p;f=u.action,So&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,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=a):l=l.next=p,I.lanes|=f,Xl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=a:l.next=c,!Or(a,e.memoizedState)&&(oc=!0,d&&(n=ya,n!==null)))throw n;e.memoizedState=a,e.baseState=s,e.baseQueue=l,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function R(e){var t=Lo(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do a=e(a,s.action),s=s.next;while(s!==i);Or(a,t.memoizedState)||(oc=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function z(e,t,n){var r=I,i=Lo(),a=P;if(a){if(n===void 0)throw Error(o(407));n=n()}else n=t();var s=!Or((L||i).memoizedState,n);if(s&&(i.memoizedState=n,oc=!0),i=i.queue,hs(qo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||yo!==null&&yo.memoizedState.tag&1){if(r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,i,n,t),null),Ul===null)throw Error(o(349));a||vo&127||Go(r,t,n)}return n}function Go(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=I.updateQueue,t===null?(t=Ro(),I.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ko(e,t,n,r){t.value=n,t.getSnapshot=r,Jo(t)&&Yo(e)}function qo(e,t,n){return n(function(){Jo(t)&&Yo(e)})}function Jo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Or(e,n)}catch{return!0}}function Yo(e){var t=li(e,2);t!==null&&yu(t,e,2)}function Xo(e){var t=Io();if(typeof e==`function`){var n=e;if(e=n(),So){We(!0);try{n()}finally{We(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:e},t}function Zo(e,t,n,r){return e.baseState=n,Wo(e,L,typeof r==`function`?r:Ho)}function Qo(e,t,n,r,i){if(Rs(e))throw Error(o(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};w.T===null?a.isTransition=!1:n(!0),r(a),n=t.pending,n===null?(a.next=t.pending=a,$o(t,a)):(a.next=n.next,t.pending=n.next=a)}}function $o(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=w.T,o={};w.T=o;try{var s=n(i,r),c=w.S;c!==null&&c(o,s),es(e,t,s)}catch(n){ns(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),w.T=a}}else try{a=n(i,r),es(e,t,a)}catch(n){ns(e,t,n)}}function es(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ts(e,t,n)},function(n){return ns(e,t,n)}):ts(e,t,n)}function ts(e,t,n){t.status=`fulfilled`,t.value=n,rs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,$o(e,n)))}function ns(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,rs(t),t=t.next;while(t!==r)}e.action=null}function rs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function is(e,t){return t}function as(e,t){if(P){var n=Ul.formState;if(n!==null){a:{var r=I;if(P){if(Bi){b:{for(var i=Bi,a=Hi;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){Bi=df(i.nextSibling),r=i.data===`F!`;break a}}Wi(r)}r=!1}r&&(t=n[0])}}return n=Io(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:t},n.queue=r,n=Fs.bind(null,I,r),r.dispatch=n,r=Xo(!1),a=Ls.bind(null,I,!1,r.queue),r=Io(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Qo.bind(null,I,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function os(e){return ss(Lo(),L,e)}function ss(e,t,n){if(t=Wo(e,t,is)[0],e=Uo(Ho)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=zo(t)}catch(e){throw e===Oa?Aa:e}else r=t;t=Lo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(I.flags|=2048,us(9,{destroy:void 0},cs.bind(null,i,n),null)),[r,a,e]}function cs(e,t){e.action=t}function ls(e){var t=Lo(),n=L;if(n!==null)return ss(t,n,e);Lo(),t=t.memoizedState,n=Lo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function us(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=I.updateQueue,t===null&&(t=Ro(),I.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 ds(){return Lo().memoizedState}function fs(e,t,n,r){var i=Io();I.flags|=e,i.memoizedState=us(1|t,{destroy:void 0},n,r===void 0?null:r)}function ps(e,t,n,r){var i=Lo();r=r===void 0?null:r;var a=i.memoizedState.inst;L!==null&&r!==null&&Oo(r,L.memoizedState.deps)?i.memoizedState=us(t,a,n,r):(I.flags|=e,i.memoizedState=us(1|t,a,n,r))}function ms(e,t){fs(8390656,8,e,t)}function hs(e,t){ps(2048,8,e,t)}function gs(e){I.flags|=4;var t=I.updateQueue;if(t===null)t=Ro(),I.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function _s(e){var t=Lo().memoizedState;return gs({ref:t,nextImpl:e}),function(){if(U&2)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function vs(e,t){return ps(4,2,e,t)}function ys(e,t){return ps(4,4,e,t)}function bs(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 xs(e,t,n){n=n==null?null:n.concat([e]),ps(4,4,bs.bind(null,t,e),n)}function Ss(){}function Cs(e,t){var n=Lo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Oo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ws(e,t){var n=Lo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Oo(t,r[1]))return r[0];if(r=e(),So){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r}function Ts(e,t,n){return n===void 0||vo&1073741824&&!(G&261930)?e.memoizedState=t:(e.memoizedState=n,e=vu(),I.lanes|=e,Xl|=e,n)}function B(e,t,n,r){return Or(n,t)?n:ro.current===null?!(vo&42)||vo&1073741824&&!(G&261930)?(oc=!0,e.memoizedState=n):(e=vu(),I.lanes|=e,Xl|=e,t):(e=Ts(e,n,r),Or(e,t)||(oc=!0),e)}function Es(e,t,n,r,i){var a=E.p;E.p=a!==0&&8>a?a:8;var o=w.T,s={};w.T=s,Ls(e,!1,t,n);try{var c=i(),l=w.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Is(e,t,Sa(c,r),_u(e)):Is(e,t,r,_u(e))}catch(n){Is(e,t,{then:function(){},status:`rejected`,reason:n},_u())}finally{E.p=a,o!==null&&s.types!==null&&(o.types=s.types),w.T=o}}function V(){}function Ds(e,t,n,r){if(e.tag!==5)throw Error(o(476));var i=Os(e).queue;Es(e,i,t,de,n===null?V:function(){return ks(e),n(r)})}function Os(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:de},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ks(e){var t=Os(e);t.next===null&&(t=e.alternate.memoizedState),Is(e,t.next.queue,{},_u())}function As(){return sa(ep)}function js(){return Lo().memoizedState}function Ms(){return Lo().memoizedState}function Ns(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=_u();e=Ja(n);var r=Ya(t,e,n);r!==null&&(yu(r,t,n),Xa(r,t,n)),t={cache:ma()},e.payload=t;return}t=t.return}}function Ps(e,t,n){var r=_u();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Rs(e)?zs(t,n):(n=ci(e,t,n,r),n!==null&&(yu(n,e,r),Bs(n,t,r)))}function Fs(e,t,n){Is(e,t,n,_u())}function Is(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Rs(e))zs(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,Or(s,o))return si(e,t,i,0),Ul===null&&oi(),!1}catch{}if(n=ci(e,t,i,r),n!==null)return yu(n,e,r),Bs(n,t,r),!0}return!1}function Ls(e,t,n,r){if(r={lane:2,revertLane:md(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Rs(e)){if(t)throw Error(o(479))}else t=ci(e,n,r,2),t!==null&&yu(t,e,2)}function Rs(e){var t=e.alternate;return e===I||t!==null&&t===I}function zs(e,t){xo=bo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}var Vs={readContext:sa,use:Bo,useCallback:Do,useContext:Do,useEffect:Do,useImperativeHandle:Do,useLayoutEffect:Do,useInsertionEffect:Do,useMemo:Do,useReducer:Do,useRef:Do,useState:Do,useDebugValue:Do,useDeferredValue:Do,useTransition:Do,useSyncExternalStore:Do,useId:Do,useHostTransitionStatus:Do,useFormState:Do,useActionState:Do,useOptimistic:Do,useMemoCache:Do,useCacheRefresh:Do};Vs.useEffectEvent=Do;var Hs={readContext:sa,use:Bo,useCallback:function(e,t){return Io().memoizedState=[e,t===void 0?null:t],e},useContext:sa,useEffect:ms,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),fs(4194308,4,bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fs(4194308,4,e,t)},useInsertionEffect:function(e,t){fs(4,2,e,t)},useMemo:function(e,t){var n=Io();t=t===void 0?null:t;var r=e();if(So){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Io();if(n!==void 0){var i=n(t);if(So){We(!0);try{n(t)}finally{We(!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=Ps.bind(null,I,e),[r.memoizedState,e]},useRef:function(e){var t=Io();return e={current:e},t.memoizedState=e},useState:function(e){e=Xo(e);var t=e.queue,n=Fs.bind(null,I,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ss,useDeferredValue:function(e,t){return Ts(Io(),e,t)},useTransition:function(){var e=Xo(!1);return e=Es.bind(null,I,e.queue,!0,!1),Io().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=I,i=Io();if(P){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),Ul===null)throw Error(o(349));G&127||Go(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,ms(qo.bind(null,r,a,e),[e]),r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,a,n,t),null),n},useId:function(){var e=Io(),t=Ul.identifierPrefix;if(P){var n=Ni,r=Mi;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Co++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Eo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:As,useFormState:as,useActionState:as,useOptimistic:function(e){var t=Io();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ls.bind(null,I,!0,n),n.dispatch=t,[e,t]},useMemoCache:Vo,useCacheRefresh:function(){return Io().memoizedState=Ns.bind(null,I)},useEffectEvent:function(e){var t=Io(),n={impl:e};return t.memoizedState=n,function(){if(U&2)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},Us={readContext:sa,use:Bo,useCallback:Cs,useContext:sa,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Uo,useRef:ds,useState:function(){return Uo(Ho)},useDebugValue:Ss,useDeferredValue:function(e,t){return B(Lo(),L.memoizedState,e,t)},useTransition:function(){var e=Uo(Ho)[0],t=Lo().memoizedState;return[typeof e==`boolean`?e:zo(e),t]},useSyncExternalStore:z,useId:js,useHostTransitionStatus:As,useFormState:os,useActionState:os,useOptimistic:function(e,t){return Zo(Lo(),L,e,t)},useMemoCache:Vo,useCacheRefresh:Ms};Us.useEffectEvent=_s;var Ws={readContext:sa,use:Bo,useCallback:Cs,useContext:sa,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:R,useRef:ds,useState:function(){return R(Ho)},useDebugValue:Ss,useDeferredValue:function(e,t){var n=Lo();return L===null?Ts(n,e,t):B(n,L.memoizedState,e,t)},useTransition:function(){var e=R(Ho)[0],t=Lo().memoizedState;return[typeof e==`boolean`?e:zo(e),t]},useSyncExternalStore:z,useId:js,useHostTransitionStatus:As,useFormState:ls,useActionState:ls,useOptimistic:function(e,t){var n=Lo();return L===null?(n.baseState=e,[e,n.queue.dispatch]):Zo(n,L,e,t)},useMemoCache:Vo,useCacheRefresh:Ms};Ws.useEffectEvent=_s;function Gs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ks={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_u(),i=Ja(r);i.payload=t,n!=null&&(i.callback=n),t=Ya(e,i,r),t!==null&&(yu(t,e,r),Xa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_u(),i=Ja(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ya(e,i,r),t!==null&&(yu(t,e,r),Xa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_u(),r=Ja(n);r.tag=2,t!=null&&(r.callback=t),t=Ya(e,r,n),t!==null&&(yu(t,e,n),Xa(t,e,n))}};function qs(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?!kr(n,r)||!kr(i,a):!0}function Js(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&&Ks.enqueueReplaceState(t,t.state,null)}function Ys(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=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Xs(e){ni(e)}function Zs(e){console.error(e)}function Qs(e){ni(e)}function $s(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function ec(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 tc(e,t,n){return n=Ja(n),n.tag=3,n.payload={element:null},n.callback=function(){$s(e,t)},n}function nc(e){return e=Ja(e),e.tag=3,e}function rc(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(){ec(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){ec(t,n,r),typeof i!=`function`&&(su===null?su=new Set([this]):su.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ic(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ia(t,n,i,!0),n=co.current,n!==null){switch(n.tag){case 31:case 13:return lo===null?ju():n.alternate===null&&Yl===0&&(Yl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===ja?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Yu(e,r,i)),!1;case 22:return n.flags|=65536,r===ja?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)),Yu(e,r,i)),!1}throw Error(o(435,n.tag))}return Yu(e,r,i),ju(),!1}if(P)return t=co.current,t===null?(r!==Ui&&(t=Error(o(423),{cause:r}),Xi(wi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=wi(r,n),i=tc(e.stateNode,r,i),Za(e,i),Yl!==4&&(Yl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Ui&&(e=Error(o(422),{cause:r}),Xi(wi(e,n)))),!1;var a=Error(o(520),{cause:r});if(a=wi(a,n),tu===null?tu=[a]:tu.push(a),Yl!==4&&(Yl=2),t===null)return!0;r=wi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=tc(n.stateNode,r,e),Za(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||a!==null&&typeof a.componentDidCatch==`function`&&(su===null||!su.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=nc(i),rc(i,e,n,r),Za(n,i),!1}n=n.return}while(n!==null);return!1}var ac=Error(o(461)),oc=!1;function sc(e,t,n,r){t.child=e===null?Ga(t,null,n,r):Wa(t,e.child,n,r)}function cc(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 oa(t),r=ko(e,t,n,o,a,i),s=No(),e!==null&&!oc?(Po(e,t,i),Mc(e,t,i)):(P&&s&&Ii(t),t.flags|=1,sc(e,t,r,i),t.child)}function lc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!hi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,uc(e,t,a,r,i)):(e=vi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Nc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?kr:n,n(o,r)&&e.ref===t.ref)return Mc(e,t,i)}return t.flags|=1,e=gi(a,r),e.ref=t.ref,e.return=t,t.child=e}function uc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(kr(a,r)&&e.ref===t.ref)if(oc=!1,t.pendingProps=r=a,Nc(e,i))e.flags&131072&&(oc=!0);else return t.lanes=e.lanes,Mc(e,t,i)}return vc(e,t,n,r,i)}function dc(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 pc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ea(t,a===null?null:a.cachePool),a===null?oo():ao(t,a),po(t);else return r=t.lanes=536870912,pc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ea(t,null),oo(),mo(t)):(Ea(t,a.cachePool),ao(t,a),mo(t),t.memoizedState=null);return sc(e,t,i,n),t.child}function fc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function pc(e,t,n,r,i){var a=Ta();return a=a===null?null:{parent:pa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ea(t,null),oo(),po(t),e!==null&&ia(e,t,r,!0),t.childLanes=i,null}function mc(e,t){return t=Dc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function hc(e,t,n){return Wa(t,e.child,null,n),e=mc(t,t.pendingProps),e.flags|=2,ho(t),t.memoizedState=null,e}function gc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(P){if(r.mode===`hidden`)return e=mc(t,r),t.lanes=536870912,fc(null,e);if(fo(t),(e=Bi)?(e=sf(e,Hi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ji===null?null:{id:Mi,overflow:Ni},retryLane:536870912,hydrationErrors:null},n=xi(e),n.return=t,t.child=n,zi=t,Bi=null)):e=null,e===null)throw Wi(t);return t.lanes=536870912,null}return mc(t,r)}var a=e.memoizedState;if(a!==null){var s=a.dehydrated;if(fo(t),i)if(t.flags&256)t.flags&=-257,t=hc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(oc||ia(e,t,n,!1),i=(n&e.childLanes)!==0,oc||i){if(r=Ul,r!==null&&(s=ct(r,n),s!==0&&s!==a.retryLane))throw a.retryLane=s,li(e,s),yu(r,e,s),ac;ju(),t=hc(e,t,n)}else e=a.treeContext,Bi=df(s.nextSibling),zi=t,P=!0,Vi=null,Hi=!1,e!==null&&Ri(t,e),t=mc(t,r),t.flags|=4096;return t}return e=gi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function _c(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(o(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function vc(e,t,n,r,i){return oa(t),n=ko(e,t,n,r,void 0,i),r=No(),e!==null&&!oc?(Po(e,t,i),Mc(e,t,i)):(P&&r&&Ii(t),t.flags|=1,sc(e,t,n,i),t.child)}function yc(e,t,n,r,i,a){return oa(t),t.updateQueue=null,n=jo(t,r,n,i),Ao(e),r=No(),e!==null&&!oc?(Po(e,t,a),Mc(e,t,a)):(P&&r&&Ii(t),t.flags|=1,sc(e,t,n,a),t.child)}function bc(e,t,n,r,i){if(oa(t),t.stateNode===null){var a=fi,o=n.contextType;typeof o==`object`&&o&&(a=sa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ks,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},F(t),o=n.contextType,a.context=typeof o==`object`&&o?sa(o):fi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Gs(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&&Ks.enqueueReplaceState(a,a.state,null),eo(t,r,a,i),$a(),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=Ys(n,s);a.props=c;var l=a.context,u=n.contextType;o=fi,typeof u==`object`&&u&&(o=sa(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)&&Js(t,a,r,o),Ka=!1;var f=t.memoizedState;a.state=f,eo(t,r,a,i),$a(),l=t.memoizedState,s||f!==l||Ka?(typeof d==`function`&&(Gs(t,n,d,r),l=t.memoizedState),(c=Ka||qs(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,qa(e,t),o=t.memoizedProps,u=Ys(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=fi,typeof l==`object`&&l&&(c=sa(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)&&Js(t,a,r,c),Ka=!1,f=t.memoizedState,a.state=f,eo(t,r,a,i),$a();var p=t.memoizedState;o!==d||f!==p||Ka||e!==null&&e.dependencies!==null&&aa(e.dependencies)?(typeof s==`function`&&(Gs(t,n,s,r),p=t.memoizedState),(u=Ka||qs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&aa(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,_c(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Wa(t,e.child,null,i),t.child=Wa(t,null,n,i)):sc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Mc(e,t,i),e}function xc(e,t,n,r){return Ji(),t.flags|=256,sc(e,t,n,r),t.child}var Sc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Cc(e){return{baseLanes:e,cachePool:Da()}}function wc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=$l),e}function Tc(e,t,n){var r=t.pendingProps,i=!1,a=(t.flags&128)!=0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(go.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(P){if(i?uo(t):mo(t),(e=Bi)?(e=sf(e,Hi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ji===null?null:{id:Mi,overflow:Ni},retryLane:536870912,hydrationErrors:null},n=xi(e),n.return=t,t.child=n,zi=t,Bi=null)):e=null,e===null)throw Wi(t);return lf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(mo(t),i=t.mode,c=Dc({mode:`hidden`,children:c},i),r=yi(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Cc(n),r.childLanes=wc(e,s,n),t.memoizedState=Sc,fc(null,r)):(uo(t),Ec(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(a)t.flags&256?(uo(t),t.flags&=-257,t=Oc(e,t,n)):t.memoizedState===null?(mo(t),c=r.fallback,i=t.mode,r=Dc({mode:`visible`,children:r.children},i),c=yi(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Wa(t,e.child,null,n),r=t.child,r.memoizedState=Cc(n),r.childLanes=wc(e,s,n),t.memoizedState=Sc,t=fc(null,r)):(mo(t),t.child=e.child,t.flags|=128,t=null);else if(uo(t),lf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(o(419)),r.stack=``,r.digest=s,Xi({value:r,source:null,stack:null}),t=Oc(e,t,n)}else if(oc||ia(e,t,n,!1),s=(n&e.childLanes)!==0,oc||s){if(s=Ul,s!==null&&(r=ct(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,li(e,r),yu(s,e,r),ac;cf(c)||ju(),t=Oc(e,t,n)}else cf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Bi=df(c.nextSibling),zi=t,P=!0,Vi=null,Hi=!1,e!==null&&Ri(t,e),t=Ec(t,r.children),t.flags|=4096);return t}return i?(mo(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=gi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=yi(c,i,n,null),c.flags|=2):c=gi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,fc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Cc(n):(i=c.cachePool,i===null?i=Da():(l=pa._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=wc(e,s,n),t.memoizedState=Sc,fc(e.child,r)):(uo(t),n=e.child,e=n.sibling,n=gi(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 Ec(e,t){return t=Dc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Dc(e,t){return e=mi(22,e,null,t),e.lanes=0,e}function Oc(e,t,n){return Wa(t,e.child,null,n),e=Ec(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function kc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),na(e.return,t,n)}function Ac(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 jc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=go.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,ge(go,o),sc(e,t,r,n),r=P?Oi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&kc(e,n,t);else if(e.tag===19)kc(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&&_o(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ac(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&&_o(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ac(t,!0,n,null,a,r);break;case`together`:Ac(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Mc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ia(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=gi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=gi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Nc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&aa(e))):!0}function Pc(e,t,n){switch(t.tag){case 3:be(t,t.stateNode.containerInfo),ea(t,pa,e.memoizedState.cache),Ji();break;case 27:case 5:O(t);break;case 4:be(t,t.stateNode.containerInfo);break;case 10:ea(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,fo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(uo(t),e=Mc(e,t,n),e===null?null:e.sibling):Tc(e,t,n):(uo(t),t.flags|=128,null);uo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ia(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return jc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ge(go,go.current),r)break;return null;case 22:return t.lanes=0,dc(e,t,n,t.pendingProps);case 24:ea(t,pa,e.memoizedState.cache)}return Mc(e,t,n)}function Fc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)oc=!0;else{if(!Nc(e,n)&&!(t.flags&128))return oc=!1,Pc(e,t,n);oc=!!(e.flags&131072)}else oc=!1,P&&t.flags&1048576&&Fi(t,Oi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Pa(t.elementType),t.type=e,typeof e==`function`)hi(e)?(r=Ys(e,r),t.tag=1,t=bc(null,t,e,r,n)):(t.tag=0,t=vc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===S){t.tag=11,t=cc(null,t,e,r,n);break a}else if(i===ne){t.tag=14,t=lc(null,t,e,r,n);break a}}throw t=le(e)||e,Error(o(306,t,``))}}return t;case 0:return vc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Ys(r,t.pendingProps),bc(e,t,r,i,n);case 3:a:{if(be(t,t.stateNode.containerInfo),e===null)throw Error(o(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,qa(e,t),eo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ea(t,pa,r),r!==a.cache&&ra(t,[pa],n,!0),$a(),r=s.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=xc(e,t,r,n);break a}else if(r!==i){i=wi(Error(o(424)),t),Xi(i),t=xc(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(Bi=df(e.firstChild),zi=t,P=!0,Vi=null,Hi=!0,n=Ga(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ji(),r===i){t=Mc(e,t,n);break a}sc(e,t,r,n)}t=t.child}return t;case 26:return _c(e,t),e===null?(n=jf(t.type,null,t.pendingProps,null))?t.memoizedState=n:P||(n=t.type,e=t.pendingProps,r=Ud(ye.current).createElement(n),r[mt]=t,r[ht]=e,Ld(r,n,e),Dt(r),t.stateNode=r):t.memoizedState=jf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return O(t),e===null&&P&&(r=t.stateNode=hf(t.type,t.pendingProps,ye.current),zi=t,Hi=!0,i=Bi,ef(t.type)?(ff=i,Bi=df(r.firstChild)):Bi=i),sc(e,t,t.pendingProps.children,n),_c(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&P&&((i=r=Bi)&&(r=af(r,t.type,t.pendingProps,Hi),r===null?i=!1:(t.stateNode=r,zi=t,Bi=df(r.firstChild),Hi=!1,i=!0)),i||Wi(t)),O(t),i=t.type,a=t.pendingProps,s=e===null?null:e.memoizedProps,r=a.children,Kd(i,a)?r=null:s!==null&&Kd(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=ko(e,t,Mo,null,null,n),ep._currentValue=i),_c(e,t),sc(e,t,r,n),t.child;case 6:return e===null&&P&&((e=n=Bi)&&(n=of(n,t.pendingProps,Hi),n===null?e=!1:(t.stateNode=n,zi=t,Bi=null,e=!0)),e||Wi(t)),null;case 13:return Tc(e,t,n);case 4:return be(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wa(t,null,r,n):sc(e,t,r,n),t.child;case 11:return cc(e,t,t.type,t.pendingProps,n);case 7:return sc(e,t,t.pendingProps,n),t.child;case 8:return sc(e,t,t.pendingProps.children,n),t.child;case 12:return sc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ea(t,t.type,r.value),sc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,oa(t),i=sa(i),r=r(i),t.flags|=1,sc(e,t,r,n),t.child;case 14:return lc(e,t,t.type,t.pendingProps,n);case 15:return uc(e,t,t.type,t.pendingProps,n);case 19:return jc(e,t,n);case 31:return gc(e,t,n);case 22:return dc(e,t,n,t.pendingProps);case 24:return oa(t),r=sa(pa),e===null?(i=Ta(),i===null&&(i=Ul,a=ma(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},F(t),ea(t,pa,i)):((e.lanes&n)!==0&&(qa(e,t),eo(t,null,null,n),$a()),i=e.memoizedState,a=t.memoizedState,i.parent===r?(r=a.cache,ea(t,pa,r),r!==i.cache&&ra(t,[pa],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),ea(t,pa,r))),sc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Ic(e){e.flags|=4}function Lc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Ou())e.flags|=8192;else throw Fa=ja,ka}else e.flags&=-16777217}function Rc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Kf(t))if(Ou())e.flags|=8192;else throw Fa=ja,ka}function zc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:nt(),e.lanes|=t,eu|=t)}function Bc(e,t){if(!P)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 Vc(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 Hc(e,t,n){var r=t.pendingProps;switch(Li(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vc(t),null;case 1:return Vc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ta(pa),xe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(qi(t)?Ic(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Yi())),Vc(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(Ic(t),a===null?(Vc(t),Lc(t,i,null,r,n)):(Vc(t),Rc(t,a))):a?a===e.memoizedState?(Vc(t),t.flags&=-16777217):(Ic(t),Vc(t),Rc(t,a)):(e=e.memoizedProps,e!==r&&Ic(t),Vc(t),Lc(t,i,e,r,n)),null;case 27:if(Se(t),n=ye.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ic(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return Vc(t),null}e=_e.current,qi(t)?Gi(t,e):(e=hf(i,r,n),t.stateNode=e,Ic(t))}return Vc(t),null;case 5:if(Se(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ic(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return Vc(t),null}if(a=_e.current,qi(t))Gi(t,a);else{var s=Ud(ye.current);switch(a){case 1:a=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:a=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:a=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:a=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:a=s.createElement(`div`),a.innerHTML=`<script><\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}a[mt]=t,a[ht]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)a.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=a;a:switch(Ld(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ic(t)}}return Vc(t),Lc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ic(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(o(166));if(e=ye.current,qi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=zi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Fd(e.nodeValue,n)),e||Wi(t,!0)}else e=Ud(e).createTextNode(r),e[mt]=t,t.stateNode=e}return Vc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=qi(t),n!==null){if(e===null){if(!r)throw Error(o(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(557));e[mt]=t}else Ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Vc(t),e=!1}else n=Yi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ho(t),t):(ho(t),null);if(t.flags&128)throw Error(o(558))}return Vc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=qi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(o(317));i[mt]=t}else Ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Vc(t),i=!1}else i=Yi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(ho(t),t):(ho(t),null)}return ho(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),zc(t,t.updateQueue),Vc(t),null);case 4:return xe(),e===null&&Td(t.stateNode.containerInfo),Vc(t),null;case 10:return ta(t.type),Vc(t),null;case 19:if(he(go),r=t.memoizedState,r===null)return Vc(t),null;if(i=(t.flags&128)!=0,a=r.rendering,a===null)if(i)Bc(r,!1);else{if(Yl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=_o(e),a!==null){for(t.flags|=128,Bc(r,!1),e=a.updateQueue,t.updateQueue=e,zc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)_i(n,e),n=n.sibling;return ge(go,go.current&1|2),P&&Pi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ne()>q&&(t.flags|=128,i=!0,Bc(r,!1),t.lanes=4194304)}else{if(!i)if(e=_o(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,zc(t,e),Bc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!P)return Vc(t),null}else 2*Ne()-r.renderingStartTime>q&&n!==536870912&&(t.flags|=128,i=!0,Bc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(Vc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ne(),e.sibling=null,n=go.current,ge(go,i?n&1|2:n&1),P&&Pi(t,r.treeForkCount),e);case 22:case 23:return ho(t),so(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Vc(t),t.subtreeFlags&6&&(t.flags|=8192)):Vc(t),n=t.updateQueue,n!==null&&zc(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&&he(wa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ta(pa),Vc(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Uc(e,t){switch(Li(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ta(pa),xe(),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(ho(t),t.alternate===null)throw Error(o(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ho(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return he(go),null;case 4:return xe(),null;case 10:return ta(t.type),null;case 22:case 23:return ho(t),so(),e!==null&&he(wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ta(pa),null;case 25:return null;default:return null}}function Wc(e,t){switch(Li(t),t.tag){case 3:ta(pa),xe();break;case 26:case 27:case 5:Se(t);break;case 4:xe();break;case 31:t.memoizedState!==null&&ho(t);break;case 13:ho(t);break;case 19:he(go);break;case 10:ta(t.type);break;case 22:case 23:ho(t),so(),e!==null&&he(wa);break;case 24:ta(pa)}}function Gc(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){J(t,t.return,e)}}function Kc(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){J(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){J(t,t.return,e)}}function qc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{no(t,n)}catch(t){J(e,e.return,t)}}}function Jc(e,t,n){n.props=Ys(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){J(e,t,n)}}function Yc(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){J(e,t,n)}}function Xc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){J(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){J(e,t,n)}else n.current=null}function Zc(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){J(e,e.return,t)}}function Qc(e,t,n){try{var r=e.stateNode;Rd(r,e.type,n,t),r[ht]=t}catch(t){J(e,e.return,t)}}function $c(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ef(e.type)||e.tag===4}function el(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||$c(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&&ef(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 tl(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=cn));else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(tl(e,t,n),e=e.sibling;e!==null;)tl(e,t,n),e=e.sibling}function nl(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&&ef(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ld(t,r,n),t[mt]=e,t[ht]=n}catch(t){J(e,e.return,t)}}var il=!1,al=!1,ol=!1,sl=typeof WeakSet==`function`?WeakSet:Set,H=null;function cl(e,t){if(e=e.containerInfo,Vd=lp,e=Nr(e),Pr(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 i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.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||i!==0&&f.nodeType!==3||(c=s+i),f!==a||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===i&&(c=s),p===a&&++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(Hd={focusedElem:e,selectionRange:n},lp=!1,H=t;H!==null;)if(t=H,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,H=e;else for(;H!==null;){switch(t=H,a=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++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,r=n.stateNode;try{var h=Ys(n.type,i);e=r.getSnapshotBeforeUpdate(h,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){J(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)rf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:rf(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}}function ll(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:wl(e,n),r&4&&Gc(5,n);break;case 1:if(wl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){J(n,n.return,e)}else{var i=Ys(n.type,t.memoizedProps);t=t.memoizedState;
vendor: 5,406 bytes, line 9
9try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){J(n,n.return,e)}}r&64&&qc(n),r&512&&Yc(n,n.return);break;case 3:if(wl(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{no(e,t)}catch(e){J(n,n.return,e)}}break;case 27:t===null&&r&4&&rl(n);case 26:case 5:wl(e,n),t===null&&r&4&&Zc(n),r&512&&Yc(n,n.return);break;case 12:wl(e,n);break;case 31:wl(e,n),r&4&&hl(e,n);break;case 13:wl(e,n),r&4&&gl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Qu.bind(null,n),uf(e,n))));break;case 22:if(r=n.memoizedState!==null||il,!r){t=t!==null&&t.memoizedState!==null||al,i=il;var a=al;il=r,(al=t)&&!a?El(e,n,(n.subtreeFlags&8772)!=0):wl(e,n),il=i,al=a}break;case 30:break;default:wl(e,n)}}function ul(e){var t=e.alternate;t!==null&&(e.alternate=null,ul(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&St(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 dl=null,fl=!1;function pl(e,t,n){for(n=n.child;n!==null;)ml(e,t,n),n=n.sibling}function ml(e,t,n){if(Ue&&typeof Ue.onCommitFiberUnmount==`function`)try{Ue.onCommitFiberUnmount(He,n)}catch{}switch(n.tag){case 26:al||Xc(n,t),pl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:al||Xc(n,t);var r=dl,i=fl;ef(n.type)&&(dl=n.stateNode,fl=!1),pl(e,t,n),gf(n.stateNode),dl=r,fl=i;break;case 5:al||Xc(n,t);case 6:if(r=dl,i=fl,dl=null,pl(e,t,n),dl=r,fl=i,dl!==null)if(fl)try{(dl.nodeType===9?dl.body:dl.nodeName===`HTML`?dl.ownerDocument.body:dl).removeChild(n.stateNode)}catch(e){J(n,t,e)}else try{dl.removeChild(n.stateNode)}catch(e){J(n,t,e)}break;case 18:dl!==null&&(fl?(e=dl,tf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Pp(e)):tf(dl,n.stateNode));break;case 4:r=dl,i=fl,dl=n.stateNode.containerInfo,fl=!0,pl(e,t,n),dl=r,fl=i;break;case 0:case 11:case 14:case 15:Kc(2,n,t),al||Kc(4,n,t),pl(e,t,n);break;case 1:al||(Xc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Jc(n,t,r)),pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:al=(r=al)||n.memoizedState!==null,pl(e,t,n),al=r;break;default:pl(e,t,n)}}function hl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Pp(e)}catch(e){J(t,t.return,e)}}}function gl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Pp(e)}catch(e){J(t,t.return,e)}}function _l(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new sl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new sl),t;default:throw Error(o(435,e.tag))}}function vl(e,t){var n=_l(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=$u.bind(null,e,t);t.then(r,r)}})}function yl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],a=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(ef(c.type)){dl=c.stateNode,fl=!1;break a}break;case 5:dl=c.stateNode,fl=!1;break a;case 3:case 4:dl=c.stateNode.containerInfo,fl=!0;break a}c=c.return}if(dl===null)throw Error(o(160));ml(a,s,i),dl=null,fl=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)xl(t,e),t=t.sibling}var bl=null;function xl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:yl(t,e),Sl(e),r&4&&(Kc(3,e,e.return),Gc(3,e),Kc(5,e,e.return));break;case 1:yl(t,e),Sl(e),r&512&&(al||n===null||Xc(n,n.return)),r&64&&il&&(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 i=bl;if(yl(t,e),Sl(e),r&512&&(al||n===null||Xc(n,n.return)),r&4){var a=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,i=i.ownerDocument||i;b:switch(r){case`title`:a=i.getElementsByTagName(`title`)[0],(!a||a[xt]||a[mt]||a.namespaceURI===`http://www.w3.org/2000/svg`||a.hasAttribute(`itemprop`))&&(a=i.createElement(r),i.head.insertBefore(a,i.querySelector(`head > title`))),Ld(a,r,n),a[mt]=e,Dt(a),r=a;break a;case`link`:var s=Uf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(a=s[c],a.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&a.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&a.getAttribute(`title`)===(n.title==null?null:n.title)&&a.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}a=i.createElement(r),Ld(a,r,n),i.head.appendChild(a);break;case`meta`:if(s=Uf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(a=s[c],a.getAttribute(`content`)===(n.content==null?null:``+n.content)&&a.getAttribute(`name`)===(n.name==null?null:n.name)&&a.getAttribute(`property`)===(n.property==null?null:n.property)&&a.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}a=i.createElement(r),Ld(a,r,n),i.head.appendChild(a);break;default:throw Error(o(468,r))}a[mt]=e,Dt(a),r=a}e.stateNode=r}else Wf(i,e.type,e.stateNode);else e.stateNode=Rf(i,r,e.memoizedProps);
vendor: 40,469 bytes, lines 9-10
9else a===r?r===null&&e.stateNode!==null&&Qc(e,e.memoizedProps,n.memoizedProps):(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,r===null?Wf(i,e.type,e.stateNode):Rf(i,r,e.memoizedProps))}break;case 27:yl(t,e),Sl(e),r&512&&(al||n===null||Xc(n,n.return)),n!==null&&r&4&&Qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(yl(t,e),Sl(e),r&512&&(al||n===null||Xc(n,n.return)),e.flags&32){i=e.stateNode;try{$t(i,``)}catch(t){J(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Qc(e,i,n===null?i:n.memoizedProps)),r&1024&&(ol=!0);break;case 6:if(yl(t,e),Sl(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){J(e,e.return,t)}}break;case 3:if(Hf=null,i=bl,bl=yf(t.containerInfo),yl(t,e),bl=i,Sl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Pp(t.containerInfo)}catch(t){J(e,e.return,t)}ol&&(ol=!1,Cl(e));break;case 4:r=bl,bl=yf(e.stateNode.containerInfo),yl(t,e),Sl(e),bl=r;break;case 12:yl(t,e),Sl(e);break;case 31:yl(t,e),Sl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 13:yl(t,e),Sl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(iu=Ne()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=il,d=al;if(il=u||i,al=d||l,yl(t,e),al=d,il=u,Sl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||il||al||Tl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(a=l.stateNode,i)s=a.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){J(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){J(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?nf(m,!0):nf(l.stateNode,!1)}catch(e){J(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,vl(e,n))));break;case 19:yl(t,e),Sl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 30:break;case 21:break;default:yl(t,e),Sl(e)}}function Sl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if($c(r)){n=r;break}r=r.return}if(n==null)throw Error(o(160));switch(n.tag){case 27:var i=n.stateNode;nl(e,el(e),i);break;case 5:var a=n.stateNode;n.flags&32&&($t(a,``),n.flags&=-33),nl(e,el(e),a);break;case 3:case 4:var s=n.stateNode.containerInfo;tl(e,el(e),s);break;default:throw Error(o(161))}}catch(t){J(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Cl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Cl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ll(e,t.alternate,t),t=t.sibling}function Tl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Kc(4,t,t.return),Tl(t);break;case 1:Xc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Jc(t,t.return,n),Tl(t);break;case 27:gf(t.stateNode);case 26:case 5:Xc(t,t.return),Tl(t);break;case 22:t.memoizedState===null&&Tl(t);break;case 30:Tl(t);break;default:Tl(t)}e=e.sibling}}function El(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,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:El(i,a,n),Gc(4,a);break;case 1:if(El(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){J(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++)to(c[i],s)}catch(e){J(r,r.return,e)}}n&&o&64&&qc(a),Yc(a,a.return);break;case 27:rl(a);case 26:case 5:El(i,a,n),n&&r===null&&o&4&&Zc(a),Yc(a,a.return);break;case 12:El(i,a,n);break;case 31:El(i,a,n),n&&o&4&&hl(i,a);break;case 13:El(i,a,n),n&&o&4&&gl(i,a);break;case 22:a.memoizedState===null&&El(i,a,n),Yc(a,a.return);break;case 30:break;default:El(i,a,n)}t=t.sibling}}function Dl(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&&ha(n))}function Ol(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ha(e))}function kl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Al(e,t,n,r),t=t.sibling}function Al(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:kl(e,t,n,r),i&2048&&Gc(9,t);break;case 1:kl(e,t,n,r);break;case 3:kl(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&&ha(e)));break;case 12:if(i&2048){kl(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){J(t,t.return,e)}}else kl(e,t,n,r);break;case 31:kl(e,t,n,r);break;case 13:kl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?kl(e,t,n,r):(a._visibility|=2,jl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?kl(e,t,n,r):Ml(e,t),i&2048&&Dl(o,t);break;case 24:kl(e,t,n,r),i&2048&&Ol(t.alternate,t);break;default:kl(e,t,n,r)}}function jl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!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:jl(a,o,s,c,i),Gc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,jl(a,o,s,c,i)):u._visibility&2?jl(a,o,s,c,i):Ml(a,o),i&&l&2048&&Dl(o.alternate,o);break;case 24:jl(a,o,s,c,i),i&&l&2048&&Ol(o.alternate,o);break;default:jl(a,o,s,c,i)}t=t.sibling}}function Ml(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:Ml(n,r),i&2048&&Dl(r.alternate,r);break;case 24:Ml(n,r),i&2048&&Ol(r.alternate,r);break;default:Ml(n,r)}t=t.sibling}}var Nl=8192;function Pl(e,t,n){if(e.subtreeFlags&Nl)for(e=e.child;e!==null;)Fl(e,t,n),e=e.sibling}function Fl(e,t,n){switch(e.tag){case 26:Pl(e,t,n),e.flags&Nl&&e.memoizedState!==null&&qf(n,bl,e.memoizedState,e.memoizedProps);break;case 5:Pl(e,t,n);break;case 3:case 4:var r=bl;bl=yf(e.stateNode.containerInfo),Pl(e,t,n),bl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Nl,Nl=16777216,Pl(e,t,n),Nl=r):Pl(e,t,n));break;default:Pl(e,t,n)}}function Il(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 Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];H=r,Bl(r,e)}Il(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rl(e),e=e.sibling}function Rl(e){switch(e.tag){case 0:case 11:case 15:Ll(e),e.flags&2048&&Kc(9,e,e.return);break;case 3:Ll(e);break;case 12:Ll(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zl(e)):Ll(e);break;default:Ll(e)}}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];H=r,Bl(r,e)}Il(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Kc(8,t,t.return),zl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,zl(t));break;default:zl(t)}e=e.sibling}}function Bl(e,t){for(;H!==null;){var n=H;switch(n.tag){case 0:case 11:case 15:Kc(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:ha(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,H=r;else a:for(n=e;H!==null;){r=H;var i=r.sibling,a=r.return;if(ul(r),r===n){H=null;break a}if(i!==null){i.return=a,H=i;break a}H=a}}}var Vl={getCacheForType:function(e){var t=sa(pa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return sa(pa).controller.signal}},Hl=typeof WeakMap==`function`?WeakMap:Map,U=0,Ul=null,W=null,G=0,K=0,Wl=null,Gl=!1,Kl=!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,q=1/0,ou=null,su=null,cu=0,lu=null,uu=null,du=0,fu=0,pu=null,mu=null,hu=0,gu=null;function _u(){return U&2&&G!==0?G&-G:w.T===null?dt():md()}function vu(){if($l===0)if(!(G&536870912)||P){var e=Xe;Xe<<=1,!(Xe&3932160)&&(Xe=262144),$l=e}else $l=536870912;return e=co.current,e!==null&&(e.flags|=32),$l}function yu(e,t,n){(e===Ul&&(K===2||K===9)||e.cancelPendingCommit!==null)&&(Eu(e,0),Cu(e,G,$l,!1)),it(e,n),(!(U&2)||e!==Ul)&&(e===Ul&&(!(U&2)&&(Zl|=n),Yl===4&&Cu(e,G,$l,!1)),od(e))}function bu(e,t,n){if(U&6)throw Error(o(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||et(e,t),i=r?Pu(e,t):Mu(e,t,!0),a=r;do{if(i===0){Kl&&!r&&Cu(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!Su(n)){i=Mu(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)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;i=tu;var l=c.current.memoizedState.isDehydrated;if(l&&(Eu(c,s).flags|=256),s=Mu(c,s,!1),s!==2){if(ql&&!l){c.errorRecoveryDisabledLanes|=a,Zl|=a,i=4;break a}a=nu,nu=i,a!==null&&(nu===null?nu=a:nu.push.apply(nu,a))}i=s}if(a=!1,i!==2)continue}}if(i===1){Eu(e,0),Cu(e,t,0,!0);break}a:{switch(r=e,a=i,a){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Cu(r,t,$l,!Gl);break a;case 2:nu=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=iu+300-Ne(),10<i)){if(Cu(r,t,$l,!Gl),$e(r,0,!0)!==0)break a;du=t,r.timeoutHandle=Yd(xu.bind(null,r,n,nu,ou,ru,t,$l,Zl,eu,Gl,a,`Throttled`,-0,0),i);break a}xu(r,n,nu,ou,ru,t,$l,Zl,eu,Gl,a,null,-0,0)}}break}while(1);od(e)}function xu(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:cn},Fl(t,a,d);var m=(a&62914560)===a?iu-Ne():(a&4194048)===a?au-Ne():0;if(m=Yf(d,m),m!==null){du=a,e.cancelPendingCommit=m(Vu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Cu(e,a,o,!l);return}}Vu(e,t,a,n,r,i,o,s,c)}function Su(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(!Or(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 Cu(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-Ge(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ot(e,n,t)}function wu(){return U&6?!0:(sd(0,!1),!1)}function Tu(){if(W!==null){if(K===0)var e=W.return;else e=W,$i=Qi=null,Fo(e),Ra=null,za=0,e=W;for(;e!==null;)Wc(e.alternate,e),e=e.return;W=null}}function Eu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Xd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),du=0,Tu(),Ul=e,W=n=gi(e.current,null),G=t,K=0,Wl=null,Gl=!1,Kl=et(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-Ge(r),a=1<<i;t|=e[i],r&=~a}return Jl=t,oi(),n}function Du(e,t){I=null,w.H=Vs,t===Oa||t===Aa?(t=Ia(),K=3):t===ka?(t=Ia(),K=4):K=t===ac?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Wl=t,W===null&&(Yl=1,$s(e,wi(t,e.current)))}function Ou(){var e=co.current;return e===null?!0:(G&4194048)===G?lo===null:(G&62914560)===G||G&536870912?e===lo:!1}function ku(){var e=w.H;return w.H=Vs,e===null?Vs:e}function Au(){var e=w.A;return w.A=Vl,e}function ju(){Yl=4,Gl||(G&4194048)!==G&&co.current!==null||(Kl=!0),!(Xl&134217727)&&!(Zl&134217727)||Ul===null||Cu(Ul,G,$l,!1)}function Mu(e,t,n){var r=U;U|=2;var i=ku(),a=Au();(Ul!==e||G!==t)&&(ou=null,Eu(e,t)),t=!1;var o=Yl;a:do try{if(K!==0&&W!==null){var s=W,c=Wl;switch(K){case 8:Tu(),o=6;break a;case 3:case 2:case 9:case 6:co.current===null&&(t=!0);var l=K;if(K=0,Wl=null,Ru(e,s,c,l),n&&Kl){o=0;break a}break;default:l=K,K=0,Wl=null,Ru(e,s,c,l)}}Nu(),o=Yl;break}catch(t){Du(e,t)}while(1);return t&&e.shellSuspendCounter++,$i=Qi=null,U=r,w.H=i,w.A=a,W===null&&(Ul=null,G=0,oi()),o}function Nu(){for(;W!==null;)Iu(W)}function Pu(e,t){var n=U;U|=2;var r=ku(),i=Au();Ul!==e||G!==t?(ou=null,q=Ne()+500,Eu(e,t)):Kl=et(e,t);a:do try{if(K!==0&&W!==null){t=W;var a=Wl;b:switch(K){case 1:K=0,Wl=null,Ru(e,t,a,1);break;case 2:case 9:if(Ma(a)){K=0,Wl=null,Lu(t);break}t=function(){K!==2&&K!==9||Ul!==e||(K=7),od(e)},a.then(t,t);break a;case 3:K=7;break a;case 4:K=5;break a;case 7:Ma(a)?(K=0,Wl=null,Lu(t)):(K=0,Wl=null,Ru(e,t,a,7));break;case 5:var s=null;switch(W.tag){case 26:s=W.memoizedState;case 5:case 27:var c=W;if(s?Kf(s):c.stateNode.complete){K=0,Wl=null;var l=c.sibling;if(l!==null)W=l;else{var u=c.return;u===null?W=null:(W=u,zu(u))}break b}}K=0,Wl=null,Ru(e,t,a,5);break;case 6:K=0,Wl=null,Ru(e,t,a,6);break;case 8:Tu(),Yl=6;break a;default:throw Error(o(462))}}Fu();break}catch(t){Du(e,t)}while(1);return $i=Qi=null,w.H=r,w.A=i,U=n,W===null?(Ul=null,G=0,oi(),Yl):0}function Fu(){for(;W!==null&&!j();)Iu(W)}function Iu(e){var t=Fc(e.alternate,e,Jl);e.memoizedProps=e.pendingProps,t===null?zu(e):W=t}function Lu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=yc(n,t,t.pendingProps,t.type,void 0,G);break;case 11:t=yc(n,t,t.pendingProps,t.type.render,t.ref,G);break;case 5:Fo(t);default:Wc(n,t),t=W=_i(t,Jl),t=Fc(n,t,Jl)}e.memoizedProps=e.pendingProps,t===null?zu(e):W=t}function Ru(e,t,n,r){$i=Qi=null,Fo(t),Ra=null,za=0;var i=t.return;try{if(ic(e,i,t,n,G)){Yl=1,$s(e,wi(n,e.current)),W=null;return}}catch(t){if(i!==null)throw W=i,t;Yl=1,$s(e,wi(n,e.current)),W=null;return}t.flags&32768?(P||r===1?e=!0:Kl||G&536870912?e=!1:(Gl=e=!0,(r===2||r===9||r===3||r===6)&&(r=co.current,r!==null&&r.tag===13&&(r.flags|=16384))),Bu(t,e)):zu(t)}function zu(e){var t=e;do{if(t.flags&32768){Bu(t,Gl);return}e=t.return;var n=Hc(t.alternate,t,Jl);if(n!==null){W=n;return}if(t=t.sibling,t!==null){W=t;return}W=t=e}while(t!==null);Yl===0&&(Yl=5)}function Bu(e,t){do{var n=Uc(e.alternate,e);if(n!==null){n.flags&=32767,W=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){W=e;return}W=e=n}while(e!==null);Yl=6,W=null}function Vu(e,t,n,r,i,a,s,c,l){e.cancelPendingCommit=null;do Ku();while(cu!==0);if(U&6)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(a=t.lanes|t.childLanes,a|=ai,at(e,n,a,s,c,l),e===Ul&&(W=Ul=null,G=0),uu=t,lu=e,du=n,fu=a,pu=i,mu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,ed(Le,function(){return qu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=w.T,w.T=null,i=E.p,E.p=2,s=U,U|=4;try{cl(e,t,n)}finally{U=s,E.p=i,w.T=r}}cu=1,Hu(),Uu(),Wu()}}function Hu(){if(cu===1){cu=0;var e=lu,t=uu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=w.T,w.T=null;var r=E.p;E.p=2;var i=U;U|=4;try{xl(t,e);var a=Hd,o=Nr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Mr(s.ownerDocument.documentElement,s)){if(c!==null&&Pr(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 _=jr(s,h),v=jr(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}}lp=!!Vd,Hd=Vd=null}finally{U=i,E.p=r,w.T=n}}e.current=t,cu=2}}function Uu(){if(cu===2){cu=0;var e=lu,t=uu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=w.T,w.T=null;var r=E.p;E.p=2;var i=U;U|=4;try{ll(e,t.alternate,t)}finally{U=i,E.p=r,w.T=n}}cu=3}}function Wu(){if(cu===4||cu===3){cu=0,je();var e=lu,t=uu,n=du,r=mu;t.subtreeFlags&10256||t.flags&10256?cu=5:(cu=0,uu=lu=null,Gu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(su=null),ut(n),t=t.stateNode,Ue&&typeof Ue.onCommitFiberRoot==`function`)try{Ue.onCommitFiberRoot(He,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=w.T,i=E.p,E.p=2,w.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{w.T=t,E.p=i}}du&3&&Ku(),od(e),i=e.pendingLanes,n&261930&&i&42?e===gu?hu++:(hu=0,gu=e):hu=0,sd(0,!1)}}function Gu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ha(t)))}function Ku(){return Hu(),Uu(),Wu(),qu()}function qu(){if(cu!==5)return!1;var e=lu,t=fu;fu=0;var n=ut(du),r=w.T,i=E.p;try{E.p=32>n?32:n,w.T=null,n=pu,pu=null;var a=lu,s=du;if(cu=0,uu=lu=null,du=0,U&6)throw Error(o(331));var c=U;if(U|=4,Rl(a.current),Al(a,a.current,s,n),U=c,sd(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot==`function`)try{Ue.onPostCommitFiberRoot(He,a)}catch{}return!0}finally{E.p=i,w.T=r,Gu(e,t)}}function Ju(e,t,n){t=wi(n,t),t=tc(e.stateNode,t,2),e=Ya(e,t,2),e!==null&&(it(e,2),od(e))}function J(e,t,n){if(e.tag===3)Ju(e,e,n);else for(;t!==null;){if(t.tag===3){Ju(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(su===null||!su.has(r))){e=wi(n,e),n=nc(2),r=Ya(t,n,2),r!==null&&(rc(n,r,t,e),it(r,2),od(r));break}}t=t.return}}function Yu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hl;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=Xu.bind(null,e,t,n),t.then(e,e))}function Xu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ul===e&&(G&n)===n&&(Yl===4||Yl===3&&(G&62914560)===G&&300>Ne()-iu?!(U&2)&&Eu(e,0):Ql|=n,eu===G&&(eu=0)),od(e)}function Zu(e,t){t===0&&(t=nt()),e=li(e,t),e!==null&&(it(e,t),od(e))}function Qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zu(e,n)}function $u(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(t),Zu(e,n)}function ed(e,t){return Ae(e,t)}var td=null,nd=null,Y=!1,rd=!1,id=!1,ad=0;function od(e){e!==nd&&e.next===null&&(nd===null?td=nd=e:nd=nd.next=e),rd=!0,Y||(Y=!0,pd())}function sd(e,t){if(!id&&rd){id=!0;do for(var n=!1,r=td;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-Ge(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,fd(r,a))}else a=G,a=$e(r,r===Ul?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(r,a)||(n=!0,fd(r,a));r=r.next}while(n);id=!1}}function cd(){ld()}function ld(){rd=Y=!1;var e=0;ad!==0&&Jd()&&(e=ad);for(var t=Ne(),n=null,r=td;r!==null;){var i=r.next,a=ud(r,t);a===0?(r.next=null,n===null?td=i:n.next=i,i===null&&(nd=n)):(n=r,(e!==0||a&3)&&(rd=!0)),r=i}cu!==0&&cu!==5||sd(e,!1),ad!==0&&(ad=0)}function ud(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ge(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=tt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ul,n=G,n=$e(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(K===2||K===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&A(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||et(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&A(r),ut(n)){case 2:case 8:n=Ie;break;case 32:n=Le;break;case 268435456:n=ze;break;default:n=Le}return r=dd.bind(null,e),n=Ae(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&A(r),e.callbackPriority=2,e.callbackNode=null,2}function dd(e,t){if(cu!==0&&cu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ku()&&e.callbackNode!==n)return null;var r=G;return r=$e(e,e===Ul?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(bu(e,r,t),ud(e,Ne()),e.callbackNode!=null&&e.callbackNode===n?dd.bind(null,e):null)}function fd(e,t){if(Ku())return null;bu(e,t,!0)}function pd(){Qd(function(){U&6?Ae(Fe,cd):ld()})}function md(){if(ad===0){var e=va;e===0&&(e=Ye,Ye<<=1,!(Ye&261888)&&(Ye=256)),ad=e}return ad}function hd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:sn(``+e)}function gd(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 _d(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=hd((i[ht]||null).action),o=r.submitter;o&&(t=(t=o[ht]||null)?hd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new kn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ad!==0){var e=o?gd(i,o):new FormData(i);Ds(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?gd(i,o):new FormData(i),Ds(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var vd=0;vd<ei.length;vd++){var yd=ei[vd];ti(yd.toLowerCase(),`on`+(yd[0].toUpperCase()+yd.slice(1)))}ti(Kr,`onAnimationEnd`),ti(qr,`onAnimationIteration`),ti(Jr,`onAnimationStart`),ti(`dblclick`,`onDoubleClick`),ti(`focusin`,`onFocus`),ti(`focusout`,`onBlur`),ti(Yr,`onTransitionRun`),ti(Xr,`onTransitionStart`),ti(Zr,`onTransitionCancel`),ti(Qr,`onTransitionEnd`),jt(`onMouseEnter`,[`mouseout`,`mouseover`]),jt(`onMouseLeave`,[`mouseout`,`mouseover`]),jt(`onPointerEnter`,[`pointerout`,`pointerover`]),jt(`onPointerLeave`,[`pointerout`,`pointerover`]),At(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),At(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),At(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),At(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),At(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),At(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var bd=`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(` `),xd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(bd));function Sd(e,t){t=(t&4)!=0;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){ni(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){ni(e)}i.currentTarget=null,a=c}}}}function X(e,t){var n=t[_t];n===void 0&&(n=t[_t]=new Set);var r=e+`__bubble`;n.has(r)||(Ed(t,e,2,!1),n.add(r))}function Cd(e,t,n){var r=0;t&&(r|=4),Ed(n,e,r,t)}var wd=`_reactListening`+Math.random().toString(36).slice(2);function Td(e){if(!e[wd]){e[wd]=!0,Ot.forEach(function(t){t!==`selectionchange`&&(xd.has(t)||Cd(t,!1,e),Cd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wd]||(t[wd]=!0,Cd(`selectionchange`,!1,t))}}function Ed(e,t,n,r){switch(hp(t)){case 2:var i=up;break;case 8:i=dp;break;default:i=$}n=i.bind(null,t,n,e),i=void 0,!vn||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 Dd(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 s=r.stateNode.containerInfo;if(s===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(;s!==null;){if(o=Ct(s),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}s=s.parentNode}}r=r.return}hn(function(){var r=a,i=un(n),o=[];a:{var s=$r.get(e);if(s!==void 0){var l=kn,u=e;switch(e){case`keypress`:if(wn(n)===0)break a;case`keydown`:case`keyup`:l=Gn;break;case`focusin`:u=`focus`,l=N;break;case`focusout`:u=`blur`,l=N;break;case`beforeblur`:case`afterblur`:l=N;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=Fn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=In;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=qn;break;case Kr:case qr:case Jr:l=Ln;break;case Qr:l=Jn;break;case`scroll`:case`scrollend`:l=jn;break;case`wheel`:l=Yn;break;case`copy`:case`cut`:case`paste`:l=Rn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Kn;break;case`toggle`:case`beforetoggle`:l=Xn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;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=gn(m,p),g!=null&&d.push(Od(m,g,h))),f)break;m=m.return}0<d.length&&(s=new l(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,s&&n!==ln&&(u=n.relatedTarget||n.fromElement)&&(Ct(u)||u[gt]))break a;if((l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Ct(u):null,u!==null&&(f=c(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Fn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Kn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?s:Tt(l),h=u==null?s:Tt(u),s=new d(g,m+`leave`,l,n,i),s.target=f,s.relatedTarget=h,g=null,Ct(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=Ad,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&&jd(o,s,l,d,!1),u!==null&&f!==null&&jd(o,f,u,d,!0)}}a:{if(s=r?Tt(r):window,l=s.nodeName&&s.nodeName.toLowerCase(),l===`select`||l===`input`&&s.type===`file`)var v=gr;else if(ur(s))if(_r)v=Er;else{v=wr;var y=Cr}else l=s.nodeName,!l||l.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&rn(r.elementType)&&(v=gr):v=Tr;if(v&&=v(e,r)){dr(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&Yt(s,`number`,s.value)}switch(y=r?Tt(r):window,e){case`focusin`:(ur(y)||y.contentEditable===`true`)&&(Ir=y,Lr=r,Rr=null);break;case`focusout`:Rr=Lr=Ir=null;break;case`mousedown`:zr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:zr=!1,Br(o,n,i);break;case`selectionchange`:if(Fr)break;case`keydown`:case`keyup`:Br(o,n,i)}var b;if(Qn)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 or?ir(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(tr&&n.locale!==`ko`&&(or||x!==`onCompositionStart`?x===`onCompositionEnd`&&or&&(b=Cn()):(bn=i,xn=`value`in bn?bn.value:bn.textContent,or=!0)),y=kd(r,x),0<y.length&&(x=new zn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=ar(n),b!==null&&(x.data=b)))),(b=er?sr(e,n):cr(e,n))&&(x=kd(r,`onBeforeInput`),0<x.length&&(y=new zn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),_d(o,e,r,n,i)}Sd(o,t)})}function Od(e,t,n){return{instance:e,listener:t,currentTarget:n}}function kd(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=gn(e,n),i!=null&&r.unshift(Od(e,i,a)),i=gn(e,t),i!=null&&r.push(Od(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ad(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function jd(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=gn(n,a),l!=null&&o.unshift(Od(n,l,c))):i||(l=gn(n,a),l!=null&&o.push(Od(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Md=/\r\n?/g,Nd=/\u0000|\uFFFD/g;function Pd(e){return(typeof e==`string`?e:``+e).replace(Md,`
10`).replace(Nd,``)}function Fd(e,t){return t=Pd(t),Pd(e)===t}function Z(e,t,n,r,i,a){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||$t(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&$t(e,``+r);break;case`className`:Lt(e,`class`,r);break;case`tabIndex`:Lt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Lt(e,n,r);break;case`style`:nn(e,r,a);break;case`data`:if(t!==`object`){Lt(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=sn(``+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}else typeof a==`function`&&(n===`formAction`?(t!==`input`&&Z(e,t,`name`,i.name,i,null),Z(e,t,`formEncType`,i.formEncType,i,null),Z(e,t,`formMethod`,i.formMethod,i,null),Z(e,t,`formTarget`,i.formTarget,i,null)):(Z(e,t,`encType`,i.encType,i,null),Z(e,t,`method`,i.method,i,null),Z(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=sn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=cn);break;case`onScroll`:r!=null&&X(`scroll`,e);break;case`onScrollEnd`:r!=null&&X(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(o(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(o(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=sn(``+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`:X(`beforetoggle`,e),X(`toggle`,e),It(e,`popover`,r);break;case`xlinkActuate`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:It(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=an.get(n)||n,It(e,n,r))}}function Id(e,t,n,r,i,a){switch(n){case`style`:nn(e,r,a);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(o(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?$t(e,r):(typeof r==`number`||typeof r==`bigint`)&&$t(e,``+r);break;case`onScroll`:r!=null&&X(`scroll`,e);break;case`onScrollEnd`:r!=null&&X(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=cn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!kt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),a=e[ht]||null,a=a==null?null:a[n],typeof a==`function`&&e.removeEventListener(t,a,i),typeof r==`function`)){typeof a!=`function`&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):It(e,n,r)}}}function Ld(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:X(`error`,e),X(`load`,e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var s=n[a];if(s!=null)switch(a){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(o(137,t));default:Z(e,t,a,s,n,null)}}i&&Z(e,t,`srcSet`,n.srcSet,n,null),r&&Z(e,t,`src`,n.src,n,null);return;case`input`:X(`invalid`,e);var c=a=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:a=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(o(137,t));break;default:Z(e,t,r,d,n,null)}}Jt(e,a,c,l,u,s,i,!1);return;case`select`:for(i in X(`invalid`,e),r=s=a=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:a=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Z(e,t,i,c,n,null)}t=a,n=s,e.multiple=!!r,t==null?n!=null&&Xt(e,!!r,n,!0):Xt(e,!!r,t,!1);return;case`textarea`:for(s in X(`invalid`,e),a=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:a=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(o(91));break;default:Z(e,t,s,c,n,null)}Qt(e,r,i,a);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:Z(e,t,l,r,n,null)}return;case`dialog`:X(`beforetoggle`,e),X(`toggle`,e),X(`cancel`,e),X(`close`,e);break;case`iframe`:case`object`:X(`load`,e);break;case`video`:case`audio`:for(r=0;r<bd.length;r++)X(bd[r],e);break;case`image`:X(`error`,e),X(`load`,e);break;case`details`:X(`toggle`,e);break;case`embed`:case`source`:case`link`:X(`error`,e),X(`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(o(137,t));default:Z(e,t,u,r,n,null)}return;default:if(rn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Id(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Z(e,t,c,r,n,null))}function Rd(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 i=null,a=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)||Z(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`:a=m;break;case`name`:i=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(o(137,t));break;default:m!==f&&Z(e,t,p,m,r,f)}}qt(e,s,c,l,u,d,a,i);return;case`select`:for(a in m=s=c=p=null,n)if(l=n[a],n.hasOwnProperty(a)&&l!=null)switch(a){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(a)||Z(e,t,a,null,r,l)}for(i in r)if(a=r[i],l=n[i],r.hasOwnProperty(i)&&(a!=null||l!=null))switch(i){case`value`:p=a;break;case`defaultValue`:c=a;break;case`multiple`:s=a;default:a!==l&&Z(e,t,i,a,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Xt(e,!!n,n?[]:``,!1):Xt(e,!!n,t,!0)):Xt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Z(e,t,c,null,r,i)}for(s in r)if(i=r[s],a=n[s],r.hasOwnProperty(s)&&(i!=null||a!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(o(91));break;default:i!==a&&Z(e,t,s,i,r,a)}Zt(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:Z(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:Z(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)&&Z(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(o(137,t));break;default:Z(e,t,u,p,r,m)}return;default:if(rn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Id(e,t,_,void 0,r,p);
vendor: 4,461 bytes, line 10
10for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Id(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Z(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||Z(e,t,f,p,r,m)}function zd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Bd(){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&&zd(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&&zd(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 Vd=null,Hd=null;function Ud(e){return e.nodeType===9?e:e.ownerDocument}function Wd(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 Gd(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 Kd(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 qd=null;function Jd(){var e=window.event;return e&&e.type===`popstate`?e===qd?!1:(qd=e,!0):(qd=null,!1)}var Yd=typeof setTimeout==`function`?setTimeout:void 0,Xd=typeof clearTimeout==`function`?clearTimeout:void 0,Zd=typeof Promise==`function`?Promise:void 0,Qd=typeof queueMicrotask==`function`?queueMicrotask:Zd===void 0?Yd:function(e){return Zd.resolve(null).then(e).catch($d)};function $d(e){setTimeout(function(){throw e})}function ef(e){return e===`head`}function tf(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),Pp(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[xt]||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);Pp(t)}function nf(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 rf(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`:rf(n),St(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function af(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[xt])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 of(e,t,n){if(t===``)return null;for(;
vendor: 20,203 bytes, line 10
10e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=df(e.nextSibling),e===null))return null;return e}function sf(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 cf(e){return e.data===`$?`||e.data===`$~`}function lf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function uf(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=Ud(n),e){case`html`:if(e=t.documentElement,!e)throw Error(o(452));return e;case`head`:if(e=t.head,!e)throw Error(o(453));return e;case`body`:if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function gf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);St(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:wf,C:Tf,L:Ef,m:Df,X:kf,S:Of,M:Af};function xf(){var e=bf.f(),t=wu();return e||t}function Sf(e){var t=wt(e);t!==null&&t.tag===5&&t.type===`form`?ks(t):bf.r(e)}var Q=typeof document>`u`?null:document;function Cf(e,t,n){var r=Q;if(r&&typeof t==`string`&&t){var i=Kt(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`),Ld(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function wf(e){bf.D(e),Cf(`dns-prefetch`,e,null)}function Tf(e,t){bf.C(e,t),Cf(`preconnect`,e,t)}function Ef(e,t,n){bf.L(e,t,n);var r=Q;if(r&&e&&t){var i=`link[rel="preload"][as="`+Kt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Kt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Kt(n.imageSizes)+`"]`)):i+=`[href="`+Kt(e)+`"]`;var a=i;switch(t){case`style`:a=Mf(e);break;case`script`:a=If(e)}_f.has(a)||(e=m({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(Nf(a))||t===`script`&&r.querySelector(Lf(a))||(t=r.createElement(`link`),Ld(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Df(e,t){bf.m(e,t);var n=Q;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Kt(r)+`"][href="`+Kt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=If(e)}if(!_f.has(a)&&(e=m({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(Lf(a)))return}r=n.createElement(`link`),Ld(r,`link`,e),Dt(r),n.head.appendChild(r)}}}function Of(e,t,n){bf.S(e,t,n);var r=Q;if(r&&e){var i=Et(r).hoistableStyles,a=Mf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Nf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Bf(e,n);var c=o=r.createElement(`link`);Dt(c),Ld(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,zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function kf(e,t){bf.X(e,t);var n=Q;if(n&&e){var r=Et(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=m({src:e,async:!0},t),(t=_f.get(i))&&Vf(e,t),a=n.createElement(`script`),Dt(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t){bf.M(e,t);var n=Q;if(n&&e){var r=Et(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Vf(e,t),a=n.createElement(`script`),Dt(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t,n,r){var i=(i=ye.current)?yf(i):null;if(!i)throw Error(o(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Mf(n.href),n=Et(i).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=Mf(n.href);var a=Et(i).hoistableStyles,s=a.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,s),(a=i.querySelector(Nf(e)))&&!a._p&&(s.instance=a,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),a||Ff(i,e,n,s.state))),t&&r===null)throw Error(o(528,``));return s}if(t&&r!==null)throw Error(o(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=If(n),n=Et(i).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(o(444,e))}}function Mf(e){return`href="`+Kt(e)+`"`}function Nf(e){return`link[rel="stylesheet"][`+e+`]`}function Pf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Ff(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}),Ld(t,`link`,n),Dt(t),e.head.appendChild(t))}function If(e){return`[src="`+Kt(e)+`"]`}function Lf(e){return`script[async]`+e}function Rf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Kt(n.href)+`"]`);if(r)return t.instance=r,Dt(r),r;var i=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Dt(r),Ld(r,`style`,i),zf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Mf(n.href);var a=e.querySelector(Nf(i));if(a)return t.state.loading|=4,t.instance=a,Dt(a),a;r=Pf(n),(i=_f.get(i))&&Bf(r,i),a=(e.ownerDocument||e).createElement(`link`),Dt(a);var s=a;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ld(a,`link`,r),t.state.loading|=4,zf(a,n.precedence,e),t.instance=a;case`script`:return a=If(n.src),(i=e.querySelector(Lf(a)))?(t.instance=i,Dt(i),i):(r=n,(i=_f.get(a))&&(r=m({},n),Vf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Dt(i),Ld(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(o(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,zf(r,n.precedence,e));return t.instance}function zf(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 Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Hf=null;function Uf(e,t,n){if(Hf===null){var r=new Map,i=Hf=new Map;i.set(n,r)}else i=Hf,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[xt]||a[mt]||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 Wf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Gf(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 Kf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function qf(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=Mf(r.href),a=t.querySelector(Nf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Xf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Dt(a);return}a=t.ownerDocument||t,r=Pf(r),(i=_f.get(i))&&Bf(r,i),a=a.createElement(`link`),Dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ld(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=Xf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Jf=0;function Yf(e,t){return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Jf===0&&(Jf=62500*Bd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Jf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Xf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zf=null;function Qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zf=new Map,t.forEach($f,e),Zf=null,Xf.call(e))}function $f(e,t){if(!(t.state.loading&4)){var n=Zf.get(e);if(n)var r=n.get(null);else{n=new Map,Zf.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=Xf.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 ep={$$typeof:ee,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function tp(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=rt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rt(0),this.hiddenUpdates=rt(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 np(e,t,n,r,i,a,o,s,c,l,u,d){return e=new tp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=mi(3,null,null,t),e.current=a,a.stateNode=e,t=ma(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},F(a),e}function rp(e){return e?(e=fi,e):fi}function ip(e,t,n,r,i,a){i=rp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ja(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ya(e,r,t),n!==null&&(yu(n,e,t),Xa(n,e,t))}function ap(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function op(e,t){ap(e,t),(e=e.alternate)&&ap(e,t)}function sp(e){if(e.tag===13||e.tag===31){var t=li(e,67108864);t!==null&&yu(t,e,67108864),op(e,67108864)}}function cp(e){if(e.tag===13||e.tag===31){var t=_u();t=lt(t);var n=li(e,t);n!==null&&yu(n,e,t),op(e,t)}}var lp=!0;function up(e,t,n,r){var i=w.T;w.T=null;var a=E.p;try{E.p=2,$(e,t,n,r)}finally{E.p=a,w.T=i}}function dp(e,t,n,r){var i=w.T;w.T=null;var a=E.p;try{E.p=8,$(e,t,n,r)}finally{E.p=a,w.T=i}}function $(e,t,n,r){if(lp){var i=fp(r);if(i===null)Dd(e,t,r,pp,n),wp(e,r);else if(Ep(i,e,t,n,r))r.stopPropagation();else if(wp(e,r),t&4&&-1<Cp.indexOf(e)){for(;i!==null;){var a=wt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ge(o);s.entanglements[1]|=c,o&=~c}od(a),!(U&6)&&(q=Ne()+500,sd(0,!1))}}break;case 31:case 13:s=li(a,2),s!==null&&yu(s,a,2),wu(),op(a,2)}if(a=fp(r),a===null&&Dd(e,t,r,pp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Dd(e,t,r,null,n)}}function fp(e){return e=un(e),mp(e)}var pp=null;function mp(e){if(pp=null,e=Ct(e),e!==null){var t=c(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=l(t),e!==null)return e;e=null}else if(n===31){if(e=u(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 pp=e,null}function hp(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(Pe()){case Fe:return 2;case Ie:return 8;case Le:case Re:return 32;case ze:return 268435456;default:return 32}default:return 32}}var gp=!1,_p=null,vp=null,yp=null,bp=new Map,xp=new Map,Sp=[],Cp=`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 wp(e,t){switch(e){case`focusin`:case`focusout`:_p=null;break;case`dragenter`:case`dragleave`:vp=null;break;case`mouseover`:case`mouseout`:yp=null;break;case`pointerover`:case`pointerout`:bp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:xp.delete(t.pointerId)}}function Tp(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=wt(t),t!==null&&sp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ep(e,t,n,r,i){switch(t){case`focusin`:return _p=Tp(_p,e,t,n,r,i),!0;case`dragenter`:return vp=Tp(vp,e,t,n,r,i),!0;case`mouseover`:return yp=Tp(yp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return bp.set(a,Tp(bp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,xp.set(a,Tp(xp.get(a)||null,e,t,n,r,i)),!0}return!1}function Dp(e){var t=Ct(e.target);if(t!==null){var n=c(t);if(n!==null){if(t=n.tag,t===13){if(t=l(n),t!==null){e.blockedOn=t,ft(e.priority,function(){cp(n)});return}}else if(t===31){if(t=u(n),t!==null){e.blockedOn=t,ft(e.priority,function(){cp(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 Op(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ln=r,n.target.dispatchEvent(r),ln=null}else return t=wt(n),t!==null&&sp(t),e.blockedOn=n,!1;t.shift()}return!0}function kp(e,t,n){Op(e)&&n.delete(t)}function Ap(){gp=!1,_p!==null&&Op(_p)&&(_p=null),vp!==null&&Op(vp)&&(vp=null),yp!==null&&Op(yp)&&(yp=null),bp.forEach(kp),xp.forEach(kp)}function jp(e,n){e.blockedOn===n&&(e.blockedOn=null,gp||(gp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ap)))}var Mp=null;function Np(e){Mp!==e&&(Mp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Mp===e&&(Mp=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(mp(r||n)===null)continue;break}var a=wt(n);a!==null&&(e.splice(t,3),t-=3,Ds(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Pp(e){function t(t){return jp(t,e)}_p!==null&&jp(_p,e),vp!==null&&jp(vp,e),yp!==null&&jp(yp,e),bp.forEach(t),xp.forEach(t);for(var n=0;n<Sp.length;n++){var r=Sp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Sp.length&&(n=Sp[0],n.blockedOn===null);)Dp(n),n.blockedOn===null&&Sp.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[ht]||null;if(typeof a==`function`)o||Np(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ht]||null)s=o.formAction;else if(mp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Np(n)}}}function Fp(){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 Ip(e){this._internalRoot=e}Lp.prototype.render=Ip.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var n=t.current;ip(n,_u(),e,t,null,null)},Lp.prototype.unmount=Ip.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;
10ip(e.current,2,null,e,null,null),wu(),t[gt]=null}};function Lp(e){this._internalRoot=e}Lp.prototype.unstable_scheduleHydration=function(e){if(e){var t=dt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Sp.length&&t!==0&&t<Sp[n].priority;n++);Sp.splice(n,0,e),n===0&&Dp(e)}};var Rp=n.version;if(Rp!==`19.2.8`)throw Error(o(527,Rp,`19.2.8`));E.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(o(188)):(e=Object.keys(e).join(`,`),Error(o(268,e)));return e=f(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var zp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:w,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Bp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bp.isDisabled&&Bp.supportsFiber)try{He=Bp.inject(zp),Ue=Bp}catch{}}e.hydrateRoot=function(e,t,n){if(!s(e))throw Error(o(299));var r=!1,i=``,a=Xs,c=Zs,l=Qs,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=np(e,1,!0,t,n??null,r,i,u,a,c,l,Fp),t.context=rp(null),n=t.current,r=_u(),r=lt(r),i=Ja(r),i.callback=null,Ya(n,i,r),n=r,t.current.lanes=n,it(t,n),od(t),e[gt]=t.current,Td(e),new Lp(t)}})),Pe=n(((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=Ne()})),Fe=`__TSS_CONTEXT`,Ie=Symbol.for(`TSS_SERVER_FUNCTION`),Le=Symbol.for(`TSS_SERVER_FUNCTION_FACTORY`),Re=`application/x-tss-framed`,ze={JSON:0,CHUNK:1,END:2,ERROR:3};`${Re}`;var Be=/;\s*v=(\d+)/;function Ve(e){let t=e.match(Be);return t?parseInt(t[1],10):void 0}function He(e){let t=Ve(e);if(t!==void 0&&t!==1)throw Error(`Incompatible framed protocol version: server=${t}, client=1. Please ensure client and server are using compatible versions.`)}var Ue=()=>window.__TSS_START_OPTIONS__;function We(){try{return sessionStorage}catch{return}}var Ge=`tsr-scroll-restoration-v1_3`,Ke=We();function qe(){try{return JSON.parse(Ke?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Je(){try{Ke?.setItem(Ge,JSON.stringify(Ye))}catch{}}var Ye=qe(),Xe=`data-scroll-restoration-id`,Ze=e=>e.state.__TSR_key||e.href;function Qe(e){let t=e.getAttribute(Xe);if(t)return`[${Xe}="${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 $e=!1,et=`window`;function tt(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function nt(e){let t=new Set;for(let n of e){if(n===et)continue;let e=tt(n);e&&t.add(e)}return t}function rt(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Ze,a=new Set,o=e=>{let t=Ye[e]||={};for(let e of a)e===document?t[et]={scrollX,scrollY}:e.isConnected&&(t[Qe(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,$e=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{$e||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Je()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!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.restoring&&d&&d!==u){let e=Ye[d];if(e){let t=Ye[u];for(let n in e){if(n===et){if(s)continue}else{let e=tt(n);if(!e||s&&o&&(l??=nt(o),l.has(e)))continue}t||=Ye[u]={},t[n]??=e[n]}}}$e=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=nt(o));let t=e&&i&&c,s=r.restoring?Ye[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===et){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=tt(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{$e=!1}}))}function it(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}
10function at(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function ot(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]=at(r):Array.isArray(t)?t.push(at(r)):n[e]=[t,at(r)]}return n}var st=lt(JSON.parse),ct=ut(JSON.stringify,JSON.parse);function lt(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=ot(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function ut(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=it(e,r);return t?`?${t}`:``}}function dt(e){return{input:({url:t})=>{for(let n of e)t=pt(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=mt(e[n],t);return t}}}function ft(e){let t=le(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=se([`/`,t,e.pathname]),e)}}function pt(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 mt(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 ht(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>gt(o,_.get())),x=r(()=>gt(s,v.get())),ee=r(()=>gt(c,y.get())),S=r(()=>_.get()[0]),C=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),te=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),ne=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),re=ge(64);function ie(e){let t=re.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),re.set(e,t)),t}let ae={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:ee,firstId:S,hasPending:C,matchRouteDeps:te,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:ne,getRouteMatchStore:ie,setMatches:oe,setPending:se,setCached:ce};oe(e.matches),a?.(ae);function oe(e){_t(e,o,_,n,i)}function se(e){_t(e,s,v,n,i)}function ce(e){_t(e,c,y,n,i)}return ae}function gt(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function _t(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}s(n.get(),a)||n.set(a)})}var vt=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},yt=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),bt=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),xt=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);
10i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},St=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},Ct=(e,t,n)=>{if(!(!O(n)&&!D(n)))throw O(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:O(n)?`redirected`:D(n)?`notFound`:r.status===`pending`?`success`:r.status,context:xt(e,t.index),isFetching:!1,error:n})),D(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),O(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},wt=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Tt=(e,t,n)=>{let r=xt(e,n);e.updateMatch(t,e=>({...e,context:r}))},Et=(e,t,n)=>{let{id:r,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,Ct(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(t){n=t,Ct(e,e.router.getMatch(r),n)}e.updateMatch(r,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!O(n)&&!D(n)&&(e.serialError??=n)},Dt=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!bt(e,t)&&(n.options.loader||n.options.beforeLoad||Rt(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{vt(e)},i);r._nonReactive.pendingTimeout=t}},Ot=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Dt(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&Ct(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},kt=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=_(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&Et(e,n,o),s&&Et(e,n,s),Dt(e,t,r,i);let c=new AbortController,l=!1,u=()=>{l||(l=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},d=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),d()});return}i._nonReactive.beforeLoadPromise=_();let p={...xt(e,n,!1),...i.__routeContext},{search:m,params:h,cause:g}=i,v=bt(e,t),y={search:m,abortController:c,params:h,preload:v,context:p,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?`preload`:g,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},b=r=>{if(r===void 0){e.router.batch(()=>{u(),d()});return}(O(r)||D(r))&&(u(),Et(e,n,r)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),d()})},x;try{if(x=r.options.beforeLoad(y),f(x))return u(),x.catch(t=>{Et(e,n,t)}).then(b)}catch(t){u(),Et(e,n,t)}b(x)},At=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>kt(e,n,t,i),s=()=>{if(wt(e,n))return;let t=Ot(e,n,i);return f(t)?t.then(o):o()};return a()},jt=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},Mt=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=xt(e,r),d=bt(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},Nt=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{Lt(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(Mt(e,t,n,r,i)),l=!!s&&f(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;Ct(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:xt(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>
10({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:xt(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,D(t)&&await i.options.notFoundComponent?.preload?.(),Ct(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,Ct(e,e.router.getMatch(n),t)}!O(o)&&!D(o)&&await Lt(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:xt(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),Ct(e,r,t)}},Pt=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(Mt(e,t,i,n,d)):m,{status:g,invalid:_}=l,v=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(_||(h??v)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await Nt(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){O(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await Nt(e,t,i,n,d):Tt(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(wt(e,i)){if(!e.router.getMatch(i))return e.matches[n];Tt(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.get()[n],s=(o&&e.router.stores.matchStores.get(o)||null)?.routeId===a?o:e.router.stores.matches.get().find(e=>e.routeId===a)?.id,l=bt(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&Ct(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.matchStores.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=_(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function Ft(e){let t=e,n=[];yt(t.router)&&vt(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=At(t,e);f(n)&&await n}catch(e){if(O(e))throw e;if(D(e))r=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?St(t,r):void 0,o=r&&t.preload?0:a===void 0?i:Math.min(a+1,i),s,c;for(let e=0;e<o;e++)n.push(Pt(t,n,e));try{await Promise.all(n)}catch{let e=await Promise.allSettled(n);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(O(e))throw e;D(e)?s??=e:c??=e}if(c!==void 0)throw c}let l=s??(r&&!t.preload?r:void 0),u=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!l&&r&&t.preload)return t.matches;if(l){let e=St(t,l);e===void 0&&C();let n=t.matches[e],r=t.router.looseRoutesById[n.routeId],i=t.router.options?.defaultNotFoundComponent;!r.options.notFoundComponent&&i&&(r.options.notFoundComponent=i),l.routeId=n.routeId;let a=n.routeId===t.router.routeTree.id;t.updateMatch(n.id,e=>({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:l},isFetching:!1})),u=e,await Lt(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Lt(e,[`errorComponent`])}for(let e=0;e<=u;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=jt(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let d=vt(t);if(f(d)&&await d,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function It(e,t){let n=t.map(t=>
10e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Lt(e,t=zt){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===zt?(()=>{if(e._componentsPromise===void 0){let t=It(e,zt);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():It(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Rt(e){for(let t of zt)if(e.options[t]?.preload)return!0;return!1}var zt=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`],Bt=`__TSR_index`,Vt=`popstate`,Ht=`beforeunload`;function Ut(e){let t=e.getLocation(),n=new Set,r=r=>{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=qt(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[Bt];i=Wt(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[Bt];i=Wt(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),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[Bt]!==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}}function Wt(e,t){t||={};let n=Jt();return{...t,key:n,__TSR_key:n,[Bt]:e}}function Gt(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=e?.createHref??(e=>e),c=e?.parseLocation??(()=>qt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Jt();t.history.replaceState({[Bt]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(S._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),S._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=qt(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),S.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[Bt]-l.state[Bt],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 n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),S.notify(u);return}}}l=c(),S.notify(u)},ee=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=Ut({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Ht,ee,{capture:!0}),t.removeEventListener(Vt,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Ht,ee,{capture:!0}),t.addEventListener(Vt,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||b(`REPLACE`),n},S}function Kt(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function qt(e,t){let n=Kt(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=Jt();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||{[Bt]:0,key:a,__TSR_key:a}}}function Jt(){return(Math.random()+1).toString(36).substring(7)}function Yt(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Xt(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var Zt=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=ue(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Gt()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=ge(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=ht(en(this.latestLocation),e),rt(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=le(o);t&&t!==`/`&&e.push(ft({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:dt(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a))`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=te(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&ne(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>
10{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),s=this.options.stringifySearch(i);return{href:e+s+r,publicHref:e+s+r,pathname:b(e).path,external:!1,searchStr:s,search:o(t?.search,i),hash:b(r.slice(1)).path,state:S(t?.state,a)}}let s=new URL(i,this.origin),c=pt(this.rewrite,s),l=this.options.parseSearch(c.search),u=this.options.stringifySearch(l);return c.search=u,{href:c.href.replace(c.origin,``),publicHref:i,pathname:b(c.pathname).path,external:!!this.rewrite&&c.origin!==this.origin,searchStr:u,search:o(t?.search,l),hash:b(c.hash.slice(1)).path,state:S(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>w({base:e,to:t.includes(`//`)?ae(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>nn({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=t.to?`${t.to}`:void 0,s=r.search,c=Object.assign(Object.create(null),r.params),d=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),f=a?this.resolvePathWithBase(d,a):d,p=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?c:Object.assign(c,l(t.params,c)),h=this.routesByPath[re(f)],g;if(h)g=this.getRouteBranch(h);else if(f.includes(`$`))g=[];else{let e=this.getMatchedRoutes(f);g=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(g=[...g,this.options.notFoundRoute])}if(g.length&&u(p))for(let e of g){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(p,t(p))}catch{}}let _=e.leaveParams?f:b(oe({path:f,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,v=s;if(e._includeValidateSearch&&this.options.search?.strict){let e={};g.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,tn(t.options.validateSearch,{...e,...v}))}catch{}}),v=e}v=rn({search:v,dest:t,destRoutes:g,_includeValidateSearch:e._includeValidateSearch}),v=o(s,v);let y=this.options.stringifySearch(v),x=t.hash===!0?n.hash:t.hash?l(t.hash,n.hash):void 0,ee=x?`#${x}`:``,C=t.state===!0?n.state:t.state?l(t.state,n.state):{};C=S(n.state,C);let te=`${_}${y}${ee}`,ne,ie,ae=!1;if(this.rewrite){let e=new URL(te,this.origin),t=mt(this.rewrite,e);ne=e.href.replace(e.origin,``),t.origin===this.origin?ie=t.pathname+t.search+t.hash:(ie=t.href,ae=!0)}else ne=m(te),ie=ne;return{publicHref:ie,href:ne,pathname:_,search:v,searchStr:y,state:C,hash:x??``,external:ae,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=ve(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,u=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,l(s,n));r={from:e.from,...c,params:u},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];
10e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=c(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=re(this.latestLocation.href)===re(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=_(()=>{o?.resolve(),o=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.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.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this._scroll.next=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=qt(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=pt(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(v(t,this.protocolAllowlist))return;if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return}i.replace?window.location.replace(t):window.location.href=t;return}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.set(`pending`),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(t)})},this.load=async e=>{let t=e?.action?.type,n,r,i,a=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad(),t&&(this._scroll.hash=t===`PUSH`||t===`REPLACE`);let n=this.latestLocation,r=Xt(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await Ft({router:this,sync:e?.sync,forceStaleReload:a.href===n.href,matches:this.stores.pendingMatches.get(),location:n,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){O(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):D(e)&&(r=e);let t=n?n.status:r?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.matches.get().some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.set(o)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Xt(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>
10{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&v(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`||e-t.updatedAt>=r}})},this.loadRouteChunk=Lt,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),i=new Set([...r,...this.stores.cachedIds.get()]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...a])}try{return n=await Ft({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(O(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});D(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=_e(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!c(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?c(i.search,r.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??ct,parseSearch:e.parseSearch??st,protocolAllowlist:e.protocolAllowlist??p}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=he(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParam
10s:i}=n,{matchedRoutes:a}=n,s=!1;(r?r.path!==`/`&&i[`**`]:re(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:s=!0);let c=s?on(this.options.notFoundMode,a):void 0,l=Array(a.length),u=new Map;for(let e of this.stores.matchStores.values())e.routeId&&u.set(e.routeId,e.get());for(let n=0;n<a.length;n++){let r=a[n],s=l[n-1],d,f,p;{let n=s?.search??e.search,i=s?._strictSearch??void 0;try{let e=tn(r.options.validateSearch,{...n})??void 0;d={...n,...e},f={...i,...e},p=void 0}catch(e){let r=e;if(e instanceof Qt||(r=new Qt(e.message,{cause:e})),t?.throwOnError)throw r;d=n,f={},p=r}}let m=r.options.loaderDeps?.({search:d})??``,h=m?JSON.stringify(m):``,{interpolatedPath:g,usedParams:v}=oe({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),y=r.id+g+h,b=this.getMatch(y),x=u.get(r.id),ee=b?._strictParams??v,C;if(!b)try{sn(r,ee)}catch(e){if(C=D(e)||O(e)?e:new $t(e.message,{cause:e}),t?.throwOnError)throw C}Object.assign(i,ee);let te=x?`stay`:`enter`,ne;if(b)ne={...b,cause:te,params:x?.params??i,_strictParams:ee,search:o(x?x.search:b.search,d),_strictSearch:f};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||Rt(r)?`pending`:`success`;ne={id:y,ssr:r.options.ssr,index:n,routeId:r.id,params:x?.params??i,_strictParams:ee,pathname:g,updatedAt:Date.now(),search:x?o(x.search,d):d,_strictSearch:f,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:C,__routeContext:void 0,_nonReactive:{loadPromise:_()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:te,loaderDeps:x?S(x.loaderDeps,m):m,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t?.preload||(ne.globalNotFound=c===r.id),ne.searchError=p;let re=this.getParentContext(s);ne.context={...re,...ne.__routeContext,...ne.__beforeLoadContext},l[n]=ne}for(let t=0;t<l.length;t++){let n=l[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),s=u.get(n.routeId);if(n.params=s?o(s.params,i):i,!a){let i=l[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:l,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return l}matchRoutesLightweight(e){let t=d(this.stores.matchesId.get()),n=this.lightweightCache.get(e);if(n&&n[0]===t)return n[1];let{matchedRoutes:r,routeParams:i}=this.getMatchedRoutes(e.pathname),a=d(r),o={...e.search};for(let e of r)try{Object.assign(o,tn(e.options.validateSearch,o))}catch{}let s=t&&this.stores.matchStores.get(t)?.get(),c=s&&s.routeId===a.id&&s.pathname===e.pathname,l;if(c)l=s.params;else{let e=Object.assign(Object.create(null),i);for(let t of r)try{sn(t,e)}catch{}l=e}let u={matchedRoutes:r,fullPath:a.fullPath,search:o,params:l};return this.lightweightCache.set(e,[t,u]),u}},Qt=class extends Error{},$t=class extends Error{};function en(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function tn(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 nn({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=re(e),a,o=ie(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function rn({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return an(n)(e,t,r??!1)}function an(e){let t,n,r=[];for(let t of e){let e=t.options;`search`in e?e.search?.middlewares&&r.push(...e.search.middlewares):(e.preSearchFilters||e.postSearchFilters)&&r.push(({search:t,next:n})=>{let r=n(e.preSearchFilters?e.preSearchFilters.reduce((e,t)=>
10t(e),t):t);return e.postSearchFilters?e.postSearchFilters.reduce((e,t)=>t(e),r):r});let i=e.validateSearch;i&&r.push(({search:e,next:t,meta:r})=>{let a=t(e);if(n)try{let e=tn(i,a);if(r&&e)for(let t in e)t in a||(r.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let i=(e,n,a)=>{if(e>=r.length){if(!t.search)return{};if(t.search===!0)return n;let e=l(t.search,n);return a&&(a.explicit=e),e}return r[e]({search:n,next:(t,n)=>{if(n){let n=a||{};return{search:i(e+1,t,n),meta:n}}return i(e+1,t,a)},meta:a})};return function(e,r,a){return t=r,n=a,i(0,e)}}function on(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return Se}function sn(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}var cn=Symbol.for(`TSR_DEFERRED_PROMISE`);function ln(e,t){let n=e;return n[cn]?n:(n[cn]={status:`pending`},n.then(e=>{n[cn].status=`success`,n[cn].data=e}).catch(e=>{n[cn].status=`error`,n[cn].error={data:(t?.serializeError??Yt)(e),__isServerError:!0}}),n)}function un(e,t){if(e)return typeof e==`string`?e:e[t]}function dn(e){return e?.scriptFormat??`module`}function fn(e,t,n){let r=pn(t),i=un(n,`script`)??r.crossOrigin;return{...dn(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,...i?{crossOrigin:i}:{}}}function pn(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function mn(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 hn(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}var gn=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.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=Se:this.parentRoute||C();let r=n?Se:t?.path;r&&r!==`/`&&(r=ce(r));let i=t?.id||r,a=n?Se:se([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=se([`/`,a]));let o=a===`__root__`?`/`:se([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=re(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=>xe({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.`)}},_n=class extends gn{constructor(e){super(e)}},vn=(e=>(e[e.AggregateError=1]=`AggregateError`,e[e.ArrowFunction=2]=`ArrowFunction`,e[e.ErrorPrototypeStack=4]=`ErrorPrototypeStack`,e[e.ObjectAssign=8]=`ObjectAssign`,e[e.BigIntTypedArray=16]=`BigIntTypedArray`,e[e.RegExp=32]=`RegExp`,e))(vn||{}),yn=Symbol.asyncIterator,bn=Symbol.hasInstance,xn=Symbol.isConcatSpreadable,Sn=Symbol.iterator,Cn=Symbol.match,wn=Symbol.matchAll,Tn=Symbol.replace,En=Symbol.search,Dn=Symbol.species,On=Symbol.split,kn=Symbol.toPrimitive,An=Symbol.toStringTag,jn=Symbol.unscopables,Mn={[yn]:0,[bn]:1,[xn]:2,[Sn]:3,[Cn]:4,[wn]:5,[Tn]:6,[En]:7,[Dn]:8,[On]:9,[kn]:10,[An]:11,[jn]:12},Nn={0:yn,1:bn,2:xn,3:Sn,4:Cn,5:wn,6:Tn,7:En,8:Dn,9:On,10:kn,11:An,12:jn},M=void 0,Pn={2:!0,3:!1,1:M,0:null,4:-0,5:1/0,6:-1/0,7:NaN},Fn={0:`Error`,1:`EvalError`,2:`RangeError`,3:`ReferenceError`,4:`SyntaxError`,5:`TypeError`,6:`URIError`},In={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function N(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 Ln(e){return N(2,M,e,M,M,M,M,M,M,M,M,M)}var Rn=Ln(2),zn=Ln(3),Bn=Ln(1),Vn=Ln(0),Hn=Ln(4),Un=Ln(5),Wn=Ln(6),Gn=Ln(7);function Kn(e){switch(e){case`"`:return`\\"`;case`\\`:return`\\\\`;case`
11`:return`\\n`;case`\r`:return`\\r`;case`\b`:return`\\b`;case`	`:return`\\t`;case`\f`:return`\\f`;case`<`:return`\\x3C`;case`\u2028`:return`\\u2028`;case`\u2029`:return`\\u2029`;default:return M}}function qn(e){let t=``,n=0,r;for(let i=0,a=e.length;i<a;i++)r=Kn(e[i]),r&&(t+=e.slice(n,i)+r,n=i+1);return n===0?t=e:t+=e.slice(n),t}function Jn(e){switch(e){case`\\\\`:return`\\`;case`\\"`:return`"`;case`\\n`:return`
12`;case`\\r`:return`\r`;case`\\b`:return`\b`;case`\\t`:return`	`;case`\\f`:return`\f`;case`\\x3C`:return`<`;case`\\u2028`:return`\u2028`;case`\\u2029`:return`\u2029`;default:return e}}function Yn(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,Jn)}var Xn=`__SEROVAL_REFS__`,Zn=new Map,Qn=new Map;function $n(e){return Zn.has(e)}function er(e){return Qn.has(e)}function tr(e){if($n(e))return Zn.get(e);throw new Ur(e)}function nr(e){if(er(e))return Qn.get(e);throw new Wr(e)}typeof globalThis<`u`?Object.defineProperty(globalThis,Xn,{value:Qn,configurable:!0,writable:!1,enumerable:!1}):typeof window<`u`?Object.defineProperty(window,Xn,{value:Qn,configurable:!0,writable:!1,enumerable:!1}):typeof self<`u`?Object.defineProperty(self,Xn,{value:Qn,configurable:!0,writable:!1,enumerable:!1}):typeof global<`u`&&Object.defineProperty(global,Xn,{value:Qn,configurable:!0,writable:!1,enumerable:!1});function rr(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 ir(e){let t=Fn[rr(e)];return e.name===t?e.constructor.name===t?{}:{name:e.constructor.name}:{name:e.name}}function ar(e,t){let n=ir(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 or(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:+!Object.isExtensible(e)}function sr(e){switch(e){case 1/0:return Un;case-1/0:return Wn}return e===e?Object.is(e,-0)?Hn:N(0,M,e,M,M,M,M,M,M,M,M,M):Gn}function cr(e){return N(1,M,qn(e),M,M,M,M,M,M,M,M,M)}function lr(e){return N(3,M,``+e,M,M,M,M,M,M,M,M,M)}function ur(e){return N(4,e,M,M,M,M,M,M,M,M,M,M)}function dr(e,t){let n=t.valueOf();return N(5,e,n===n?t.toISOString():``,M,M,M,M,M,M,M,M,M)}function fr(e,t){return N(6,e,M,qn(t.source),t.flags,M,M,M,M,M,M,M)}function pr(e,t){return N(17,e,Mn[t],M,M,M,M,M,M,M,M,M)}function mr(e,t){return N(18,e,qn(tr(t)),M,M,M,M,M,M,M,M,M)}function hr(e,t,n){return N(25,e,n,qn(t),M,M,M,M,M,M,M,M)}function gr(e,t,n){return N(9,e,M,M,M,M,M,n,M,M,or(t),M)}function _r(e,t){return N(21,e,M,M,M,M,M,M,t,M,M,M)}function vr(e,t,n){return N(15,e,M,t.constructor.name,M,M,M,M,n,t.byteOffset,M,t.length)}function yr(e,t,n){return N(16,e,M,t.constructor.name,M,M,M,M,n,t.byteOffset,M,t.length)}function br(e,t,n){return N(20,e,M,M,M,M,M,M,n,t.byteOffset,M,t.byteLength)}function xr(e,t,n){return N(13,e,rr(t),M,qn(t.message),n,M,M,M,M,M,M)}function Sr(e,t,n){return N(14,e,rr(t),M,qn(t.message),n,M,M,M,M,M,M)}function Cr(e,t){return N(7,e,M,M,M,M,M,t,M,M,M,M)}function wr(e,t){return N(28,M,M,M,M,M,M,[e,t],M,M,M,M)}function Tr(e,t){return N(30,M,M,M,M,M,M,[e,t],M,M,M,M)}function Er(e,t,n){return N(31,e,M,M,M,M,M,n,t,M,M,M)}function Dr(e,t){return N(32,e,M,M,M,M,M,M,t,M,M,M)}function Or(e,t){return N(33,e,M,M,M,M,M,M,t,M,M,M)}function kr(e,t){return N(34,e,M,M,M,M,M,M,t,M,M,M)}function Ar(e,t,n,r){return N(35,e,n,M,M,M,M,t,M,M,M,r)}var{toString:jr}
12=Object.prototype,Mr={parsing:1,serialization:2,deserialization:3};function Nr(e){return`Seroval Error (step: ${Mr[e]})`}var Pr=(e,t)=>Nr(e),Fr=class extends Error{constructor(e,t){super(Pr(e,t)),this.cause=t}},Ir=class extends Fr{constructor(e){super(`parsing`,e)}},Lr=class extends Fr{constructor(e){super(`deserialization`,e)}};function Rr(e){return`Seroval Error (specific: ${e})`}var zr=class extends Error{constructor(e){super(Rr(1)),this.value=e}},Br=class extends Error{constructor(e){super(Rr(2))}},Vr=class extends Error{constructor(e){super(Rr(3))}},Hr=class extends Error{constructor(e){super(Rr(4))}},Ur=class extends Error{constructor(e){super(Rr(5)),this.value=e}},Wr=class extends Error{constructor(e){super(Rr(6))}},Gr=class extends Error{constructor(e){super(Rr(7))}},Kr=class extends Error{constructor(e){super(Rr(8))}},qr=class extends Error{constructor(e){super(Rr(9))}},Jr=class{constructor(e,t){this.value=e,this.replacement=t}},Yr=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,n)=>{e.s=t,e.f=n}),e};Yr.toString(),((e,t)=>{e.s(t),e.p.s=1,e.p.v=t}).toString(),((e,t)=>{e.f(t),e.p.s=2,e.p.v=t}).toString();var Xr=()=>{let e=[],t=[],n=!0,r=!1,i=0,a=(e,n,r)=>{for(r=0;r<i;r++)t[r]&&t[r][n](e)},o=(t,i,a,o)=>{for(i=0,a=e.length;i<a;i++)o=e[i],!n&&i===a-1?t[r?`return`:`throw`](o):t.next(o)},s=(e,r)=>(n&&(r=i++,t[r]=e),o(e),()=>{n&&(t[r]=t[i],t[i--]=void 0)});return{__SEROVAL_STREAM__:!0,on:e=>s(e),next:t=>{n&&(e.push(t),a(t,`next`))},throw:i=>{n&&(e.push(i),a(i,`throw`),n=!1,r=!1,t.length=0)},return:i=>{n&&(e.push(i),a(i,`return`),n=!1,r=!0,t.length=0)}}};Xr.toString();var Zr=e=>t=>()=>{let n=0,r={[e]:()=>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};Zr.toString();var Qr=(e,t)=>n=>()=>{let r=0,i=-1,a=!1,o=[],s=[],c=(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(),i=o.length,a=!0,o.push(e)},return:e=>{let t=s.shift();t&&t.s({done:!0,value:e}),c(),i=o.length,o.push(e)}});let l={[e]:()=>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};Qr.toString();var $r=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};$r.toString();function ei(e){return`__SEROVAL_SEQUENCE__`in e}function ti(e,t,n){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:n}}function ni(e){let t=[],n=-1,r=-1,i=e[Sn]();for(;;)try{let e=i.next();if(t.push(e.value),e.done){r=t.length-1;break}}catch(e){n=t.length,t.push(e)}return ti(t,n,r)}var ri=Zr(Sn);function ii(e){return ri(e)}var ai={},oi={},si={0:{},1:{},2:{},3:{},4:{},5:{}};function ci(e){return`__SEROVAL_STREAM__`in e}function li(){return Xr()}function ui(e){let t=li(),n=e[yn]();async function r(){try{let e=await n.next();e.done?t.return(e.value):(t.next(e.value),await r())}catch(e){t.throw(e)}}return r().catch(()=>{}),t}var di=Qr(yn,Yr);function fi(e){return di(e)}async function pi(e){try{return[1,await e]}catch(e){return[0,e]}}function mi(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function hi(e,t){e.marked.add(t)}function gi(e,t){let n=e.refs.size;return e.refs.set(t,n),n}function _i(e,t){let n=e.refs.get(t);return n==null?{type:0,value:gi(e,t)}:(hi(e,n),{type:1,value:ur(n)})}function vi(e,t){let n=_i(e,t);return n.type===1?n:$n(t)?{type:2,value:mr(n.value,t)}:n}function yi(e,t){let n=vi(e,t);if(n.type!==0)return n.value;if(t in Mn)return pr(n.value,t);throw new zr(t)}function bi(e,t){let n=_i(e,si[t]);return n.type===1?n.value:N(26,n.value,t,M,M,M,M,M,M,M,M,M)}function xi(e){let t=_i(e,ai);return t.type===1?t.value:N(27,t.value,M,M,M,M,M,M,yi(e,Sn),M,M,M)}function Si(e){let t=_i(e,oi);return t.type===1?t.value:N(29,t.value,M,M,M,M,M,[bi(e,1),yi(e,yn)],M,M,M,M)}function Ci(e,t,n,r){return N(n?11:10,e,M,M,M,r,M,M,M,M,or(t),M)}function wi(e,t,n,r){return N(8,t,M,M,M,M,{k:n,v:r},M,bi(e,0),M,M,M)}
12function Ti(e,t,n){let r=new Uint8Array(n),i=``;for(let e=0,t=r.length;e<t;e++)i+=String.fromCharCode(r[e]);return N(19,t,qn(btoa(i)),M,M,M,M,M,bi(e,5),M,M,M)}function Ei(e,t){return{base:mi(e,t),child:void 0}}var Di=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return Ki(this._p,this.depth,e)}};async function Oi(e,t,n){let r=[];for(let i=0,a=n.length;i<a;i++)i in n?r[i]=await Ki(e,t,n[i]):r[i]=0;return r}async function ki(e,t,n,r){return gr(n,r,await Oi(e,t,r))}async function Ai(e,t,n){let r=Object.entries(n),i=[],a=[];for(let n=0,o=r.length;n<o;n++)i.push(qn(r[n][0])),a.push(await Ki(e,t,r[n][1]));return Sn in n&&(i.push(yi(e.base,Sn)),a.push(wr(xi(e.base),await Ki(e,t,ni(n))))),yn in n&&(i.push(yi(e.base,yn)),a.push(Tr(Si(e.base),await Ki(e,t,ui(n))))),An in n&&(i.push(yi(e.base,An)),a.push(cr(n[An]))),xn in n&&(i.push(yi(e.base,xn)),a.push(n[xn]?Rn:zn)),{k:i,v:a}}async function ji(e,t,n,r,i){return Ci(n,r,i,await Ai(e,t,r))}async function Mi(e,t,n,r){return _r(n,await Ki(e,t,r.valueOf()))}async function Ni(e,t,n,r){return vr(n,r,await Ki(e,t,r.buffer))}async function Pi(e,t,n,r){return yr(n,r,await Ki(e,t,r.buffer))}async function Fi(e,t,n,r){return br(n,r,await Ki(e,t,r.buffer))}async function Ii(e,t,n,r){let i=ar(r,e.base.features);return xr(n,r,i?await Ai(e,t,i):M)}async function Li(e,t,n,r){let i=ar(r,e.base.features);return Sr(n,r,i?await Ai(e,t,i):M)}async function Ri(e,t,n,r){let i=[],a=[];for(let[n,o]of r.entries())i.push(await Ki(e,t,n)),a.push(await Ki(e,t,o));return wi(e.base,n,i,a)}async function zi(e,t,n,r){let i=[];for(let n of r.keys())i.push(await Ki(e,t,n));return Cr(n,i)}async function Bi(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 hr(n,o.tag,await o.parse.async(r,new Di(e,t),{id:n}))}return M}async function P(e,t,n,r){let[i,a]=await pi(r);return N(12,n,i,M,M,M,M,M,await Ki(e,t,a),M,M,M)}function Vi(e,t,n,r,i){let a=[],o=n.on({next:n=>{hi(this.base,t),Ki(this,e,n).then(e=>{a.push(Dr(t,e))},e=>{i(e),o()})},throw:n=>{hi(this.base,t),Ki(this,e,n).then(e=>{a.push(Or(t,e)),r(a),o()},e=>{i(e),o()})},return:n=>{hi(this.base,t),Ki(this,e,n).then(e=>{a.push(kr(t,e)),r(a),o()},e=>{i(e),o()})}})}async function Hi(e,t,n,r){return Er(n,bi(e.base,4),await new Promise(Vi.bind(e,t,n,r)))}async function Ui(e,t,n,r){let i=[];for(let n=0,a=r.v.length;n<a;n++)i[n]=await Ki(e,t,r.v[n]);return Ar(n,i,r.t,r.d)}async function Wi(e,t,n,r){if(Array.isArray(r))return ki(e,t,n,r);if(ci(r))return Hi(e,t,n,r);if(ei(r))return Ui(e,t,n,r);let i=r.constructor;if(i===Jr)return Ki(e,t,r.replacement);let a=await Bi(e,t,n,r);if(a)return a;switch(i){case Object:return ji(e,t,n,r,!1);case M:return ji(e,t,n,r,!0);case Date:return dr(n,r);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return Ii(e,t,n,r);case Number:case Boolean:case String:case BigInt:return Mi(e,t,n,r);case ArrayBuffer:return Ti(e.base,n,r);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return Ni(e,t,n,r);case DataView:return Fi(e,t,n,r);case Map:return Ri(e,t,n,r);case Set:return zi(e,t,n,r);default:break}if(i===Promise||r instanceof Promise)return P(e,t,n,r);let o=e.base.features;if(o&32&&i===RegExp)return fr(n,r);if(o&16)switch(i){case BigInt64Array:case BigUint64Array:return Pi(e,t,n,r);default:break}if(o&1&&typeof AggregateError<`u`&&(i===AggregateError||r instanceof AggregateError))return Li(e,t,n,r);if(r instanceof Error)return Ii(e,t,n,r);if(Sn in r||yn in r)return ji(e,t,n,r,!!i);throw new zr(r)}async function Gi(e,t,n){let r=vi(e.base,n);if(r.type!==0)return r.value;let i=await Bi(e,t,r.value,n);if(i)return i;throw new zr(n)}async function Ki(e,t,n){if(t>=e.base.depthLimit)throw new qr(e.base.depthLimit);switch(typeof n){case`boolean`:return n?Rn:zn;case`undefined`:return Bn;case`string`:return cr(n);case`number`:return sr(n);case`bigint`:return lr(n);case`object`:if(n){let r=vi(e.base,n);return r.type===0?await Wi(e,t+1,r.value,n):r.value}return Vn;case`symbol`:return yi(e.base,n);case`function`:return Gi(e,t,n);default:throw new zr(n)}}async function qi(e,t){try{return await Ki(e,0,t)}catch(e){throw e instanceof Ir?e:new Ir(e)}}var Ji=(e=>(e[e.Vanilla=1]=`Vanilla`,e[e.Cross=2]=`Cross`,e))(Ji||{});function Yi(e){return e}function Xi(e,t){for(let n=0,r=t.length;n<r;n++){let r=t[n];e.has(r)||(e.add(r),r.extends&&Xi(e,r.extends))}}function Zi(e){if(e){let t=new Set;return Xi(t,e),[...t]}}function Qi(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 Gr(e)}}function $i(e){switch(e){case`constructor`:case`__proto__`:case`prototype`:case`__defineGetter__`:case`__defineSetter__`:case`__lookupGetter__`:case`__lookupSetter__`:return!1;default:return!0}}function ea(e){switch(e){case yn:case xn:case An:case Sn:return!0;default:return!1}}var ta=1e6,na=1e4,ra=2e4;function ia(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 aa=1e3;function oa(e,t){let n=t.refs||new Map;return`types`in n||Object.assign(n,{types:new Map}),{mode:e,plugins:t.plugins,refs:n,features:t.features??63^(t.disabledFeatures||0),depthLimit:t.depthLimit||aa}}
12function sa(e){return{mode:2,base:oa(2,e),child:M}}var ca=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return F(this._p,this.depth,e)}};function la(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new Kr({t:4,i:t});if(e.refs.has(t))throw Error(`Conflicted ref id: `+t)}function ua(e,t,n){return la(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,n),n}function da(e,t,n){return la(e.base,t),e.base.refs.set(t,n),n}function fa(e,t,n){return e.mode===1?ua(e,t,n):da(e,t,n)}function pa(e,t,n){if(Object.hasOwn(t,n))return t[n];throw new Kr(e)}function ma(e,t){return fa(e,t.i,nr(Yn(t.s)))}function ha(e,t,n){let r=n.a,i=r.length,a=fa(e,n.i,Array(i));for(let n=0,o;n<i;n++)o=r[n],o&&(a[n]=F(e,t,o));return ia(a,n.o),a}function ga(e,t,n){$i(t)?e[t]=n:Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0})}function _a(e,t,n,r,i){if(typeof r==`string`)ga(n,Yn(r),F(e,t,i));else{let a=F(e,t,r);switch(typeof a){case`string`:ga(n,a,F(e,t,i));break;case`symbol`:ea(a)&&(n[a]=F(e,t,i));break;default:throw new Kr(r)}}}function va(e,t,n){e.base.refs.types.set(t,n)}function ya(e,t,n,r){if(e.base.refs.types.get(n)!==r)throw new Kr(t)}function ba(e,t,n,r){let i=n.k;if(i.length>0)for(let a=0,o=n.v,s=i.length;a<s;a++)_a(e,t,r,i[a],o[a]);return r}function xa(e,t,n){let r=fa(e,n.i,n.t===10?{}:Object.create(null));return ba(e,t,n.p,r),ia(r,n.o),r}function Sa(e,t){return fa(e,t.i,new Date(t.s))}function Ca(e,t){if(e.base.features&32){let n=Yn(t.c);if(n.length>ra)throw new Kr(t);return fa(e,t.i,new RegExp(n,t.m))}throw new Br(t)}function wa(e,t,n){let r=fa(e,n.i,new Set);for(let i=0,a=n.a,o=a.length;i<o;i++)r.add(F(e,t,a[i]));return r}function Ta(e,t,n){let r=fa(e,n.i,new Map);for(let i=0,a=n.e.k,o=n.e.v,s=a.length;i<s;i++)r.set(F(e,t,a[i]),F(e,t,o[i]));return r}function Ea(e,t){if(t.s.length>ta)throw new Kr(t);return fa(e,t.i,$r(Yn(t.s)))}function Da(e,t,n){let r=Qi(n.c),i=F(e,t,n.f),a=n.b??0;if(a<0||a>i.byteLength)throw new Kr(n);return fa(e,n.i,new r(i,a,n.l))}function Oa(e,t,n){let r=F(e,t,n.f),i=n.b??0;if(i<0||i>r.byteLength)throw new Kr(n);return fa(e,n.i,new DataView(r,i,n.l))}function ka(e,t,n,r){if(n.p){let i=ba(e,t,n.p,{});Object.defineProperties(r,Object.getOwnPropertyDescriptors(i))}return r}function Aa(e,t,n){return ka(e,t,n,fa(e,n.i,AggregateError([],Yn(n.m))))}function ja(e,t,n){let r=pa(n,In,n.s);return ka(e,t,n,fa(e,n.i,new r(Yn(n.m))))}function Ma(e,t,n){let r=Yr(),i=fa(e,n.i,r.p),a=F(e,t,n.f);return n.s?r.s(a):r.f(a),i}function Na(e,t,n){return fa(e,n.i,Object(F(e,t,n.f)))}function Pa(e,t,n){let r=e.base.plugins;if(r){let i=Yn(n.c);for(let a=0,o=r.length;a<o;a++){let o=r[a];if(o.tag===i)return fa(e,n.i,o.deserialize(n.s,new ca(e,t),{id:n.i}))}}throw new Vr(n.c)}function Fa(e,t){let n=fa(e,t.i,fa(e,t.s,Yr()).p);return va(e,t.s,22),n}function Ia(e,t,n){let r=e.base.refs.get(n.i);if(r)return ya(e,n,n.i,22),r.s(F(e,t,n.a[1])),M;throw new Hr(`Promise`)}function La(e,t,n){let r=e.base.refs.get(n.i);if(r)return ya(e,n,n.i,22),r.f(F(e,t,n.a[1])),M;throw new Hr(`Promise`)}function Ra(e,t,n){return F(e,t,n.a[0]),ii(F(e,t,n.a[1]))}function za(e,t,n){return F(e,t,n.a[0]),fi(F(e,t,n.a[1]))}function Ba(e,t,n){let r=fa(e,n.i,li());va(e,n.i,31);let i=n.a,a=i.length;if(a)for(let n=0;n<a;n++)F(e,t,i[n]);return r}function Va(e,t,n){let r=e.base.refs.get(n.i);if(r)return ya(e,n,n.i,31),r.next(F(e,t,n.f)),M;throw new Hr(`Stream`)}function Ha(e,t,n){let r=e.base.refs.get(n.i);if(r)return ya(e,n,n.i,31),r.throw(F(e,t,n.f)),M;throw new Hr(`Stream`)}function Ua(e,t,n){let r=e.base.refs.get(n.i);if(r)return ya(e,n,n.i,31),r.return(F(e,t,n.f)),M;throw new Hr(`Stream`)}function Wa(e,t,n){return F(e,t,n.f),M}function Ga(e,t,n){return F(e,t,n.a[1]),M}function Ka(e,t,n){let r=fa(e,n.i,ti([],n.s,n.l));for(let i=0,a=n.a.length;i<a;i++)r.v[i]=F(e,t,n.a[i]);return r}function F(e,t,n){if(t>e.base.depthLimit)throw new qr(e.base.depthLimit);switch(t+=1,n.t){case 2:return pa(n,Pn,n.s);case 0:return Number(n.s);case 1:return Yn(String(n.s));case 3:if(String(n.s).length>na)throw new Kr(n);return BigInt(n.s);case 4:return e.base.refs.get(n.i);case 18:return ma(e,n);
12case 9:return ha(e,t,n);case 10:case 11:return xa(e,t,n);case 5:return Sa(e,n);case 6:return Ca(e,n);case 7:return wa(e,t,n);case 8:return Ta(e,t,n);case 19:return Ea(e,n);case 16:case 15:return Da(e,t,n);case 20:return Oa(e,t,n);case 14:return Aa(e,t,n);case 13:return ja(e,t,n);case 12:return Ma(e,t,n);case 17:return pa(n,Nn,n.s);case 21:return Na(e,t,n);case 25:return Pa(e,t,n);case 22:return Fa(e,n);case 23:return Ia(e,t,n);case 24:return La(e,t,n);case 28:return Ra(e,t,n);case 30:return za(e,t,n);case 31:return Ba(e,t,n);case 32:return Va(e,t,n);case 33:return Ha(e,t,n);case 34:return Ua(e,t,n);case 27:return Wa(e,t,n);case 29:return Ga(e,t,n);case 35:return Ka(e,t,n);default:throw new Br(n)}}function qa(e,t){try{return F(e,0,t)}catch(e){throw new Lr(e)}}var Ja=(()=>T).toString();/=>/.test(Ja);function Ya(e,t){return qa(sa({plugins:Zi(t.plugins),refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit}),e)}async function Xa(e,t={}){let n=Ei(1,{plugins:Zi(t.plugins),disabledFeatures:t.disabledFeatures});return{t:await qi(n,e),f:n.base.features,m:Array.from(n.base.marked)}}function Za(e){return e}function Qa(e){return Yi({tag:`$TSR/t/`+e.key,test:e.test,parse:{sync(t,n,r){return{v:n.parse(e.toSerializable(t))}},async async(t,n,r){return{v:await n.parse(e.toSerializable(t))}},stream(t,n,r){return{v:n.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,n,r){return e.fromSerializable(n.deserialize(t.v))}})}var $a=class{constructor(e,t){this.stream=e,this.hint=t?.hint??`binary`}},eo=globalThis.Buffer,to=!!eo&&typeof eo.from==`function`;function no(e){if(e.length===0)return``;if(to)return eo.from(e).toString(`base64`);let t=32768,n=[];for(let r=0;r<e.length;r+=t){let i=e.subarray(r,r+t);n.push(String.fromCharCode.apply(null,i))}return btoa(n.join(``))}function ro(e){if(e.length===0)return new Uint8Array;
12if(to){let t=eo.from(e,`base64`);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var io=Object.create(null),ao=Object.create(null),oo=e=>new ReadableStream({start(t){e.on({next(e){try{t.enqueue(ro(e))}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),so=new TextEncoder,co=e=>new ReadableStream({start(t){e.on({next(e){try{typeof e==`string`?t.enqueue(so.encode(e)):t.enqueue(ro(e.$b64))}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),lo=`(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))`,uo=`(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})`;function fo(e){let t=li(),n=e.getReader();return(async()=>{try{for(;;){let{done:e,value:r}=await n.read();if(e){t.return(void 0);break}t.next(no(r))}}catch(e){t.throw(e)}finally{n.releaseLock()}})(),t}function po(e){let t=li(),n=e.getReader(),r=new TextDecoder(`utf-8`,{fatal:!0});return(async()=>{try{for(;;){let{done:e,value:i}=await n.read();if(e){try{let e=r.decode();e.length>0&&t.next(e)}catch{}t.return(void 0);break}try{let e=r.decode(i,{stream:!0});e.length>0&&t.next(e)}catch{t.next({$b64:no(i)})}}}catch(e){t.throw(e)}finally{n.releaseLock()}})(),t}var mo=Yi({tag:`tss/RawStream`,extends:[Yi({tag:`tss/RawStreamFactory`,test(e){return e===io},parse:{sync(e,t,n){return{}},async async(e,t,n){return{}},stream(e,t,n){return{}}},serialize(e,t,n){return lo},deserialize(e,t,n){return io}}),Yi({tag:`tss/RawStreamFactoryText`,test(e){return e===ao},parse:{sync(e,t,n){return{}},async async(e,t,n){return{}},stream(e,t,n){return{}}},serialize(e,t,n){return uo},deserialize(e,t,n){return ao}})],test(e){return e instanceof $a},parse:{sync(e,t,n){let r=e.hint===`text`?ao:io;return{hint:t.parse(e.hint),factory:t.parse(r),stream:t.parse(li())}},async async(e,t,n){let r=e.hint===`text`?ao:io,i=e.hint===`text`?po(e.stream):fo(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(r),stream:await t.parse(i)}},stream(e,t,n){let r=e.hint===`text`?ao:io,i=e.hint===`text`?po(e.stream):fo(e.stream);return{hint:t.parse(e.hint),factory:t.parse(r),stream:t.parse(i)}}},serialize(e,t,n){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},deserialize(e,t,n){let r=t.deserialize(e.stream);return t.deserialize(e.hint)===`text`?co(r):oo(r)}});function ho(e){return Yi({tag:`tss/RawStream`,test:()=>!1,parse:{},serialize(){throw Error(`RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.`)},deserialize(t,n,r){return e(typeof n?.deserialize==`function`?n.deserialize(t.streamId):t.streamId)}})}var go=Yi({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))}}),_o={},vo=e=>new ReadableStream({start:t=>{e.on({next:e=>{try{t.enqueue(e)}catch{}},throw:e=>{t.error(e)},return:()=>{try{t.close()}catch{}}})}}),I=Yi({tag:`seroval-plugins/web/ReadableStreamFactory`,test(e){return e===_o},parse:{sync(){return _o},async async(){return await Promise.resolve(_o)},stream(){return _o}},serialize(){return vo.toString()},deserialize(){return _o}});async function L(e,t){try{let n=await t.read();n.done?(e.return(n.value),t.releaseLock()):(e.next(n.value),await L(e,t))}catch(t){e.throw(t)}}function yo(e){e.cancel().catch(()=>{}),e.releaseLock()}function bo(e){let t=li(),n=e.getReader(),r=yo.bind(null,n);return L(t,n).catch(r),[t,r]}var xo=[go,mo,Yi({tag:`seroval/plugins/web/ReadableStream`,extends:[I],test(e){return typeof ReadableStream>`u`?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(_o),stream:t.parse(li())}},async async(e,t){return{factory:await t.parse(_o),stream:await t.parse(bo(e)[0])}},stream(e,t){let[n,r]=bo(e);return t.addCleanup(r),{factory:t.parse(_o),stream:t.parse(n)}}},serialize(e,t){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},deserialize(e,t){return vo(t.deserialize(e.stream))}})];function So(){return[...(Ue()?.serializationAdapters)?.map(Qa)??[],...xo]}var Co=new TextDecoder,wo=new Uint8Array,To=16*1024*1024,Eo=32*1024*1024,Do=1024,Oo=1e5;function ko(e){let t=new Map,n=new Map,r=new Set,i=!1,a=null,o=0,s,c=new ReadableStream({start(e){s=e},cancel(){i=!0;try{a?.cancel()}catch{}
12t.forEach(e=>{try{e.error(Error(`Framed response cancelled`))}catch{}}),t.clear(),n.clear(),r.clear()}});function l(e){let i=n.get(e);if(i)return i;if(r.has(e))return new ReadableStream({start(e){e.close()}});if(n.size>=Do)throw Error(`Too many raw streams in framed response (max ${Do})`);let a=new ReadableStream({start(n){t.set(e,n)},cancel(){r.add(e),t.delete(e),n.delete(e)}});return n.set(e,a),a}function u(e){return l(e),t.get(e)}return(async()=>{let n=e.getReader();a=n;let c=[],l=0;function d(){if(l<9)return null;let e=c[0];if(e.length>=9)return{type:e[0],streamId:(e[1]<<24|e[2]<<16|e[3]<<8|e[4])>>>0,length:(e[5]<<24|e[6]<<16|e[7]<<8|e[8])>>>0};let t=new Uint8Array(9),n=0,r=9;for(let e=0;e<c.length&&r>0;e++){let i=c[e],a=Math.min(i.length,r);t.set(i.subarray(0,a),n),n+=a,r-=a}return{type:t[0],streamId:(t[1]<<24|t[2]<<16|t[3]<<8|t[4])>>>0,length:(t[5]<<24|t[6]<<16|t[7]<<8|t[8])>>>0}}function f(e){if(e===0)return wo;let t=c[0];if(t&&t.length>=e){let n=t.subarray(0,e);return t.length===e?c.shift():c[0]=t.subarray(e),l-=e,n}let n=new Uint8Array(e),r=0,i=e;for(;i>0&&c.length>0;){let e=c[0];if(!e)break;let t=Math.min(e.length,i);n.set(e.subarray(0,t),r),r+=t,i-=t,t===e.length?c.shift():c[0]=e.subarray(t)}return l-=e,n}try{for(;;){let{done:e,value:a}=await n.read();if(i||e)break;if(a){if(l+a.length>Eo)throw Error(`Framed response buffer exceeded ${Eo} bytes`);for(c.push(a),l+=a.length;;){let e=d();if(!e)break;let{type:n,streamId:i,length:a}=e;if(n!==ze.JSON&&n!==ze.CHUNK&&n!==ze.END&&n!==ze.ERROR)throw Error(`Unknown frame type: ${n}`);if(n===ze.JSON){if(i!==0)throw Error(`Invalid JSON frame streamId (expected 0)`)}else if(i===0)throw Error(`Invalid raw frame streamId (expected non-zero)`);if(a>To)throw Error(`Frame payload too large: ${a} bytes (max ${To})`);let c=9+a;if(l<c)break;if(++o>Oo)throw Error(`Too many frames in framed response (max ${Oo})`);f(9);let p=f(a);switch(n){case ze.JSON:try{s.enqueue(Co.decode(p))}catch{}break;case ze.CHUNK:{let e=u(i);e&&e.enqueue(p);break}case ze.END:{let e=u(i);if(r.add(i),e){try{e.close()}catch{}t.delete(i)}break}case ze.ERROR:{let e=u(i);if(r.add(i),e){let n=Co.decode(p);e.error(Error(n)),t.delete(i)}break}}}}}if(l!==0)throw Error(`Incomplete frame at end of framed response`);try{s.close()}catch{}t.forEach(e=>{try{e.close()}catch{}}),t.clear()}catch(e){try{s.error(e)}catch{}t.forEach(t=>{try{t.error(e)}catch{}}),t.clear()}finally{try{n.releaseLock()}catch{}a=null}})(),{getOrCreateStream:l,jsonChunks:c}}var Ao=null;async function jo(e){e.length>0&&await Promise.allSettled(e)}var Mo=Object.prototype.hasOwnProperty;function No(e){for(let t in e)if(Mo.call(e,t))return!0;return!1}async function Po(e,t,n){Ao||=So();let r=t[0],i=r.fetch??n,a=r.data instanceof FormData?`formData`:`payload`,o=r.headers?new Headers(r.headers):new Headers;if(o.set(`x-tsr-serverFn`,`true`),a===`payload`&&o.set(`accept`,`${Re}, application/x-ndjson, application/json`),r.method===`GET`){if(a===`formData`)throw Error(`FormData is not supported with GET requests`);let t=await Fo(r);if(t!==void 0){let n=it({payload:t});e.includes(`?`)?e+=`&${n}`:e+=`?${n}`}}let s;if(r.method===`POST`){let e=await Lo(r);e?.contentType&&o.set(`content-type`,e.contentType),s=e?.body}return await Ro(async()=>i(e,{method:r.method,headers:o,signal:r.signal,body:s}))}async function Fo(e){let t=!1,n={};if(e.data!==void 0&&(t=!0,n.data=e.data),e.context&&No(e.context)&&(t=!0,n.context=e.context),t)return Io(n)}async function Io(e){return JSON.stringify(await Promise.resolve(Xa(e,{plugins:Ao})))}async function Lo(e){if(e.data instanceof FormData){let t;return e.context&&No(e.context)&&(t=await Io(e.context)),t!==void 0&&e.data.set(Fe,t),{body:e.data}}let t=await Fo(e);if(t)return{body:t,contentType:`application/json`}}async function Ro(e){let t;try{t=await e()}catch(e){if(e instanceof Response)t=e;else throw console.log(e),e}if(t.headers.get(`x-tss-raw`)===`true`)return t;let n=t.headers.get(`content-type`);if(n||C(),t.headers.get(`x-tss-serialized`)){let e;if(n.includes(`application/x-tss-framed`)){if(He(n),!t.body)throw Error(`No response body for framed response`);
12let{getOrCreateStream:r,jsonChunks:i}=ko(t.body),a=[ho(r),...Ao||[]],o=new Map;e=await zo({jsonStream:i,onMessage:e=>Ya(e,{refs:o,plugins:a}),onError(e,t){console.error(e,t)}})}else if(n.includes(`application/json`)){let n=await t.json(),r=[];try{e=Ya(n,{plugins:Ao})}finally{}await jo(r)}if(e||C(),e instanceof Error)throw e;return e}if(n.includes(`application/json`)){let e=await t.json(),n=be(e);if(n)throw n;if(D(e))throw e;return e}if(!t.ok)throw Error(await t.text());return t}async function zo({jsonStream:e,onMessage:t,onError:n}){let r=e.getReader(),{value:i,done:a}=await r.read();if(a||!i)throw Error(`Stream ended before first object`);let o=JSON.parse(i),s=!1,c=(async()=>{try{for(;;){let{value:e,done:i}=await r.read();if(i)break;if(e)try{let n=[];try{t(JSON.parse(e))}finally{}await jo(n)}catch(t){n?.(`Invalid JSON: ${e}`,t)}}}catch(e){s||n?.(`Stream processing error:`,e)}})(),l,u=[];try{l=t(o)}catch(e){throw s=!0,r.cancel().catch(()=>{}),e}return await jo(u),Promise.resolve(l).catch(()=>{s=!0,r.cancel().catch(()=>{})}),c.finally(()=>{try{r.releaseLock()}catch{}}),l}function Bo(e){let t=`/_serverFn/`+e;return Object.assign((...e)=>{let n=Ue()?.serverFns?.fetch;return Po(t,e,n??fetch)},{url:t,serverFnMeta:{id:e},[Ie]:!0})}var Vo=Za({key:`$TSS/serverfn`,test:e=>typeof e!=`function`||!(Ie in e)?!1:!!e[Ie],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>Bo(e)});function Ho(e){return e.replaceAll(`\0`,`/`).replaceAll(`�`,`/`)}function Uo(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function Wo(e){window.$_TSR||C();let t=e.options.serializationAdapters;if(t?.length){let e=new Map;t.forEach(t=>{e.set(t.key,t.fromSerializable)}),window.$_TSR.t=e,window.$_TSR.buffer.forEach(e=>e())}window.$_TSR.initialized=!0,window.$_TSR.router||C();let n=window.$_TSR.router;n.matches.forEach(e=>{e.i=Ho(e.i)}),n.lastMatchId&&=Ho(n.lastMatchId);let{manifest:r,dehydratedData:i,lastMatchId:a}=n;e.ssr={manifest:r};let o=document.querySelector(`meta[property="csp-nonce"]`)?.content;e.options.ssr={nonce:o},await e.options.hydrate?.(i);let s=e.matchRoutes(e.stores.location.get()),c=Promise.all(s.map(t=>e.loadRouteChunk(e.looseRoutesById[t.routeId])));function l(t){let n=e.looseRoutesById[t.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(n){let r=_();t._nonReactive.minPendingPromise=r,t._forcePending=!0,setTimeout(()=>{r.resolve(),e.updateMatch(t.id,e=>(e._nonReactive.minPendingPromise=void 0,{...e,_forcePending:void 0}))},n)}}function u(t){let n=e.looseRoutesById[t.routeId];n&&(n.options.ssr=t.ssr)}let d;s.forEach(e=>{let t=n.matches.find(t=>t.i===e.id);if(!t){e._nonReactive.dehydrated=!1,e.ssr=!1,u(e);return}Uo(e,t),u(e),e._nonReactive.dehydrated=e.ssr!==!1,(e.ssr===`data-only`||e.ssr===!1)&&d===void 0&&(d=e.index,l(e))}),e.stores.setMatches(s);let f=e.stores.matches.get(),p=e.stores.location.get();await Promise.all(f.map(async t=>{try{let n=e.looseRoutesById[t.routeId],r=f[t.index-1]?.context??e.options.context;if(n.options.context){let i={deps:t.loaderDeps,params:t.params,context:r??{},location:p,navigate:t=>e.navigate({...t,_fromLocation:p}),buildLocation:e.buildLocation,cause:t.cause,abortController:t.abortController,preload:!1,matches:s,routeId:n.id};t.__routeContext=n.options.context(i)??void 0}t.context={...r,...t.__routeContext,...t.__beforeLoadContext};let i={ssr:e.options.ssr,matches:f,match:t,params:t.params,loaderData:t.loaderData},a=await n.options.head?.(i),o=await n.options.scripts?.(i);t.meta=a?.meta,t.links=a?.links,t.headScripts=a?.scripts,t.styles=a?.styles,t.scripts=o}catch(e){if(D(e))t.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${t.routeId}`,e);else throw t.error=e,console.error(`Error during hydration for route ${t.routeId}:`,e),e}}));let m=s[s.length-1].id!==a;if(!s.some(e=>e.ssr===!1)&&!m)return s.forEach(e=>{e._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),c;let h=Promise.resolve().then(()=>e.load()).catch(e=>{console.error(`Error during router hydration:`,e)});if(m){let t=s[1];t||C(),l(t),t._displayPending=!0,t._nonReactive.displayPendingPromise=h,h.then(()=>{e.batch(()=>
12{e.stores.status.get()===`pending`&&(e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(t.id,e=>({...e,_displayPending:void 0,displayPendingPromise:void 0}))})})}return c}var R=t(r(),1),z=i();function Go({promise:e}){if(fe)return fe(e);let t=ln(e);if(t[cn].status===`pending`)throw t;if(t[cn].status===`error`)throw t[cn].error;return t[cn].data}function Ko(e){let t=(0,z.jsx)(qo,{...e});return e.fallback?(0,z.jsx)(R.Suspense,{fallback:e.fallback,children:t}):t}function qo(e){let t=Go(e);return e.children(t)}function Jo(e){let t=e.errorComponent??Xo;return(0,z.jsx)(Yo,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?R.createElement(t,{error:n,reset:r}):e.children})}var Yo=class extends R.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Xo({error:e}){let[t,n]=R.useState(!1);return(0,z.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,z.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,z.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,z.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,z.jsx)(`div`,{children:(0,z.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,z.jsx)(`code`,{children:e.message}):null})}):null]})}var Zo=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(Zo||{});function Qo({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 $o(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 es=[],ts=0,{link:ns,unlink:rs,propagate:is,checkDirty:as,shallowPropagate:os}=Qo({update(e){return e._update()},notify(e){es[cs++]=e,e.flags&=~Zo.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Zo.Mutable|Zo.Dirty,fs(e))}}),ss=0,cs=0,ls,us=0;function ds(e){try{++us,e()}
12finally{--us||ps()}}function fs(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=rs(n,e)}function ps(){if(!(us>0)){for(;ss<cs;){let e=es[ss];es[ss++]=void 0,e.notify()}ss=0,cs=0}}function ms(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?Zo.None:Zo.Mutable,get(){return ls!==void 0&&ns(i,ls,ts),i._snapshot},subscribe(e){let t=$o(e),n={current:!1},r=hs(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=ls,o=t?.compare??Object.is;if(n)ls=i,++ts,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=Zo.Mutable|Zo.RecursedCheck);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{ls=a,n&&(i.flags&=~Zo.RecursedCheck),fs(i)}}};return n?(i.flags=Zo.Mutable|Zo.Dirty,i.get=function(){let e=i.flags;if(e&Zo.Dirty||e&Zo.Pending&&as(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&os(e)}}else e&Zo.Pending&&(i.flags=e&~Zo.Pending);return ls!==void 0&&ns(i,ls,ts),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(is(e),os(e),ps())}},i}function hs(e){let t=()=>{let t=ls;ls=n,++ts,n.depsTail=void 0,n.flags=Zo.Watching|Zo.RecursedCheck;try{return e()}finally{ls=t,n.flags&=~Zo.RecursedCheck,fs(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Zo.Watching|Zo.RecursedCheck,notify(){let e=this.flags;e&Zo.Dirty||e&Zo.Pending&&as(this.deps,this)?t():this.flags=Zo.Watching},stop(){this.flags=Zo.None,this.depsTail=void 0,fs(this)}};return t(),n}function gs(e){return we({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function _s(e){let{select:t,...n}=e;return we({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function vs(e){return we({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 ys(e){return we({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function bs(e){return we({...e,select:t=>e.select?e.select(t.context):t.context})}var xs=class extends gn{constructor(e){super(e),this.useMatch=e=>we({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>bs({...e,from:this.id}),this.useSearch=e=>ys({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>vs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>_s({...e,from:this.id}),this.useLoaderData=e=>gs({...e,from:this.id}),this.useNavigate=()=>Te({from:this.fullPath}),this.Link=R.forwardRef((e,t)=>(0,z.jsx)(k,{ref:t,from:this.fullPath,...e}))}};function Ss(e){return new xs(e)}function Cs(){return e=>Ts(e)}var ws=class extends _n{constructor(e){super(e),this.useMatch=e=>we({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>bs({...e,from:this.id}),this.useSearch=e=>ys({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>vs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>_s({...e,from:this.id}),this.useLoaderData=e=>gs({...e,from:this.id}),this.useNavigate=()=>Te({from:this.fullPath}),this.Link=R.forwardRef((e,t)=>(0,z.jsx)(k,{ref:t,from:this.fullPath,...e}))}};function Ts(e){return new ws(e)}function B(e){return new Es(e,{silent:!0}).createRoute}var Es=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=Ss(e);return t.isRoot=!1,t},this.silent=t?.silent}};function V(e,t){let n,r,i,a,o=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(i=e,h(i)&&i instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),a=!0)}}),n),s=function(e){if(a)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(fe)fe(o());else throw o();return R.createElement(r,e)};return s.preload=o,s}function Ds(e){let t=g(),n=`not-found-${x(t.stores.location,e=>e.pathname)}-${x(t.stores.status,e=>e)}`;return(0,z.jsx)(Jo,{getResetKey:()=>n,onCatch:(t,n)=>{if(D(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(D(t))return e.fallback?.(t);throw t},children:e.children})}function Os(){return(0,z.jsx)(`p`,{children:`Not Found`})}function ks(e){return(0,z.jsx)(z.Fragment,{children:e.children})}
12function As(e,t,n){return t.options.notFoundComponent?(0,z.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,z.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,z.jsx)(Os,{})}var js=(e,t)=>e.routeId===t.routeId&&e._displayPending===t._displayPending,Ms=(e,t)=>e[0]===t[0]&&e[1]===t[1],Ns=R.memo(function({matchId:e}){let t=g(),n=t.stores.matchStores.get(e);n||C();let r=x(t.stores.loadedAt,e=>e),i=x(n,e=>e,js);return(0,z.jsx)(Ps,{router:t,matchId:e,resetKey:r,matchState:R.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function Ps({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,z.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,l=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,u=r.ssr===!1||r.ssr===`data-only`,d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||u))?R.Suspense:ks,f=s?Jo:ks,p=l?Ds:ks;return(0,z.jsxs)(i.isRoot?i.options.shellComponent??ks:ks,{children:[(0,z.jsx)(Ce.Provider,{value:t,children:(0,z.jsx)(d,{fallback:o,children:(0,z.jsx)(f,{getResetKey:()=>n,errorComponent:s||Xo,onCatch:(e,t)=>{if(D(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,z.jsx)(p,{fallback:e=>{if(e.routeId??=r.routeId,!l||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return R.createElement(l,e)},children:u||r._displayPending?(0,z.jsx)(me,{fallback:o,children:(0,z.jsx)(Is,{matchId:t})}):(0,z.jsx)(Is,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Fs,{}),(e.options.scrollRestoration,null)]}):null]})}function Fs(){let e=g(),t=R.useRef();return de(()=>{let n=e.stores.resolvedLocation.get(),r=t.current;n&&(!r||r.href!==n.href)&&e.emit({type:`onRendered`,...Xt(e.stores.location.get(),r??n)}),t.current=n},[x(e.stores.resolvedLocation,e=>e?.state.__TSR_key),e]),null}var Is=R.memo(function({matchId:e}){let t=g(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||C();let i=x(r,e=>e),a=i.routeId,o=t.routesById[a],s=R.useMemo(()=>{let e=(t.routesById[a].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return e?JSON.stringify(e):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=R.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,z.jsx)(e,{},s):(0,z.jsx)(Ls,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){let e=o.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=_();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return D(i.error)||C(),As(t,o,i.error);if(i.status===`redirected`)throw O(i.error)||C(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),Ls=R.memo(function(){let e=g(),t=R.useContext(Ce),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=x(a,e=>[e?.routeId,e?.globalNotFound??!1],Ms),i=x(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,z.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||C(),As(e,a,void 0);if(!i)return null;let s=(0,z.jsx)(Ns,{matchId:i});return n===`__root__`?(0,z.jsx)(R.Suspense,{fallback:o,children:s}):s});function Rs(){let e=g(),t=R.useRef({router:e,mounted:!1}),[n,r]=R.useState(!1),i=x(e.stores.isLoading,e=>e),a=x(e.stores.hasPending,e=>e),o=pe(i),s=i||n||a,c=pe(s),l=i||a,u=pe(l);return e.startTransition=e=>{r(!0),R.startTransition(()=>{e(),r(!1)})},R.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return re(e.latestLocation.publicHref)!==re(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),de(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),de(()=>{o&&!i&&e.emit({type:`onLoad`,...Xt(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),de(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...Xt(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,u,e]),de(()=>{if(c&&!s){let t=Xt(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),ds(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())})}},[s,c,e]),null}function zs(){let e=g(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,z.jsx)(t,{}):null,r=(0,z.jsxs)(typeof document<`u`&&e.ssr?ks:R.Suspense,{fallback:n,children:[(0,z.jsx)(Rs,{}),(0,z.jsx)(Bs,{})]});return e.options.InnerWrap?(0,z.jsx)(e.options.InnerWrap,{children:r}):r}function Bs(){let e=g(),t=x(e.stores.firstId,e=>e),n=x(e.stores.loadedAt,e=>e),r=t?(0,z.jsx)(Ns,{matchId:t}):null;return(0,z.jsx)(Ce.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,z.jsx)(Jo,{getResetKey:()=>n,errorComponent:Xo,onCatch:void 0,children:r})})}var Vs=e=>({createMutableStore:ms,createReadonlyStore:ms,batch:ds}
12),Hs=e=>new Us(e),Us=class extends Zt{constructor(e){super(e,Vs)}};function Ws({router:e,children:t,...n}){u(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,z.jsx)(y.Provider,{value:e,children:t});return e.options.Wrap?(0,z.jsx)(e.options.Wrap,{children:r}):r}function Gs({router:e,...t}){return(0,z.jsx)(Ws,{router:e,...t,children:(0,z.jsx)(zs,{})})}function Ks(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 qs(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e;switch(e.tag){case`title`:return(0,z.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,z.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,z.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,z.jsx)(`style`,{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case`script`:return(0,z.jsx)(Js,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function Js({attrs:e,children:t,preventScriptHoist:n}){g();let r=E(),i=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(R.useEffect(()=>{if(!i){if(e?.src){let t=(()=>{try{let t=document.baseURI||window.location.href;return new URL(e.src,t).href}catch{return e.src}})();for(let e of document.querySelectorAll(`script[src]`))if(e.src===t)return;let n=document.createElement(`script`);return Ks(n,e),document.head.appendChild(n),()=>n.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.querySelectorAll(`script:not([src])`)){if(!(e instanceof HTMLScriptElement))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,Ks(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,i]),i&&typeof t==`string`)return(0,z.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!r){if(e?.src)return(0,z.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,z.jsx)(`script`,{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var Ys=e=>{let t=g(),n=t.options.ssr?.nonce,r=x(t.stores.matches,e=>e.map(e=>e.meta).filter(e=>e!==void 0),c),i=R.useMemo(()=>{let e=[],t={},i;for(let a=r.length-1;a>=0;a--){let o=r[a];for(let r=o.length-1;r>=0;r--){let a=o[r];if(a)if(a.title)i||={tag:`title`,children:a.title};else if(`script:ld+json`in a)try{let t=JSON.stringify(a[`script:ld+json`]);e.push({tag:`script`,attrs:{type:`application/ld+json`},children:ee(t)})}catch{}else{let r=a.name??a.property;if(r){if(t[r])continue;t[r]=!0}e.push({tag:`meta`,attrs:{...a,nonce:n}})}}}return i&&e.push(i),n&&e.push({tag:`meta`,attrs:{property:`csp-nonce`,content:n}}),e.reverse(),e},[r,n]),a=x(t.stores.matches,e=>e.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:n}})),c),o=x(t.stores.matches,r=>{let i=t.ssr?.manifest,a=[];return i?(r.forEach(t=>{i.routes[t.routeId]?.css?.forEach(t=>{let r=hn(t);a.push({tag:`link`,attrs:{rel:`stylesheet`,...r,crossOrigin:un(e,`stylesheet`)??r.crossOrigin,suppressHydrationWarning:!0,nonce:n}})})}),i.inlineStyle&&a.push({tag:`style`,attrs:{...i.inlineStyle.attrs,nonce:n},children:i.inlineStyle.children,inlineCss:!0}),a):a},c),s=x(t.stores.matches,r=>{let i=[],a=t.ssr?.manifest;return a&&r.forEach(t=>{a.routes[t.routeId]?.preloads?.forEach(t=>{i.push({tag:`link`,attrs:{...fn(a,t,e),nonce:n}})})}),i},c),l=x(t.stores.matches,e=>e.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...t})=>({tag:`style`,attrs:{...t,nonce:n},children:e})),c),u=x(t.stores.matches,e=>e.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...t})=>({tag:`script`,attrs:{...t,nonce:n},children:e})),c),d=[];return mn(d,i),d.push(...s),mn(d,a),d.push(...o),mn(d,l),mn(d,u),d};function Xs(e){let t=Ys(e.assetCrossOrigin),n=g().options.ssr?.nonce;return(0,z.jsx)(z.Fragment,{children:t.map(e=>(0,R.createElement)(qs,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var Zs=()=>{let e=g(),t=e.options.ssr?.nonce,n=n=>{let r=[],i=e.ssr?.manifest;if(!i)return[];for(let e of n){let n=i.routes[e.routeId]?.scripts;if(n)for(let e of n)r.push({tag:`script`,attrs:{...e.attrs,nonce:t},children:e.children,...typeof e.attrs?.src==`string`?{preventScriptHoist:!0}:{}})}return r},r=e=>e.map(e=>
12e.scripts).flat(1).filter(Boolean).map(({children:e,...n})=>({tag:`script`,attrs:{...n,suppressHydrationWarning:!0,nonce:t},children:e})),i=x(e.stores.matches,n,c);return Qs(e,x(e.stores.matches,r,c),i)};function Qs(e,t,n){let r=[...t,...n];return(0,z.jsx)(z.Fragment,{children:r.map((e,t)=>(0,R.createElement)(qs,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var $s=(e,t)=>{let n={type:`request`,...t||e},r=e=>$s({},Object.assign(n,{validator:e,inputValidator:e}));return{options:n,middleware:e=>$s({},Object.assign(n,{middleware:e})),validator:r,inputValidator:r,client:e=>$s({},Object.assign(n,{client:e})),server:e=>$s({},Object.assign(n,{server:e}))}};function ec(e,t){for(let n=0,r=t.length;n<r;n++){let r=t[n];e.has(r)||(e.add(r),r.extends&&ec(e,r.extends))}}var tc=e=>({getOptions:async()=>{let t=await e();if(t.serializationAdapters){let e=new Set;ec(e,t.serializationAdapters),t.serializationAdapters=Array.from(e)}return t},createMiddleware:$s}),nc=function(){return nc=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},nc.apply(this,arguments)};function rc(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 ic(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 ac(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 oc=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),sc=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}}},cc=class extends sc{constructor(e){super(`Failed to send a request to the Edge Function`,`FunctionsFetchError`,e)}},lc=class extends sc{constructor(e){super(`Relay Error invoking the Edge Function`,`FunctionsRelayError`,e)}},uc=class extends sc{constructor(e){super(`Edge Function returned a non-2xx status code`,`FunctionsHttpError`,e)}},dc;(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`})(dc||={});var fc=class{constructor(e,{headers:t={},customFetch:n,region:r=dc.Any}={}){this.url=e,this.headers=t,this.region=r,this.fetch=oc(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return ic(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 cc(e)}),_=g.headers.get(`x-relay-error`);if(_&&_===`true`)throw new lc(g);if(!g.ok)throw new uc(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 uc||e instanceof lc?e.context:void 0}}finally{r&&clearTimeout(r),a&&((n=t.signal)==null||n.removeEventListener(`abort`,a))}})}},pc=3,mc=e=>Math.min(1e3*2**e,3e4),hc=[520,503],gc=[`GET`,`HEAD`,`OPTIONS`],_c=class extends 
12Error{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 vc(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 yc(e,t,n,r){return!(!r||n>=pc||!gc.includes(e)||!hc.includes(t))}var bc=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,e.fetch?this.fetch=e.fetch:this.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`||!gc.includes(n.method))throw t;if(n.retryEnabled&&e<pc){let t=mc(e);e++,await vc(t,n.signal);continue}throw t}if(yc(n.method,i.status,e,n.retryEnabled)){let t=i.headers?.get(`Retry-After`)??null,r=t===null?mc(e):Math.max(0,parseInt(t,10)||0)*1e3;await i.text(),e++,await vc(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 _c({message:i,details:``,hint:``,code:``})}}let s=t.headers.get(`Prefer`)?.match(/count=(exact|planned|estimated)/),c=e.headers.get(`content-range`)?.split(`/`);s&&c&&c.length>1&&(i=parseInt(c[1])),t.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(n={code:`PGRST116`,details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:`JSON object requested, multiple (or no) rows returned`},r=null,i=null,a=406,o=`Not Acceptable`):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: 10,009 bytes, line 12
12catch{e.status===404&&i===``?(a=204,o=`No Content`):n={message:i}}if(n&&t.shouldThrowOnError)throw new _c(n)}return{success:n===null,error:n,data:r,count:i,status:a,statusText:o}}returns(){return this}overrideTypes(){return this}},xc=class extends bc{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}},Sc=RegExp(`[,()]`),Cc=class extends xc{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`&&Sc.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`&&Sc.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}},wc=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 Cc({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 Cc({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 Cc({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 Cc({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 Cc({method:`DELETE`,url:t,headers:n,schema:this.schema,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Tc(e){"@babel/helpers - typeof";return Tc=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},Tc(e)}function Ec(e,t){if(Tc(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Tc(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Dc(e){var t=Ec(e,`string`);return Tc(t)==`symbol`?t:t+``}function Oc(e,t,n){return(t=Dc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kc(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 Ac(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kc(Object(n),!0).forEach(function(t){Oc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var jc=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;i!==void 0&&i>0?this.fetch=(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,Ac(Ac({},t),{},{signal:n.signal})).finally(()=>{clearTimeout(r),a.removeEventListener(`abort`,i)})}return s(e,Ac(Ac({},t),{},{signal:n.signal})).finally(()=>clearTimeout(r))}:this.fetch=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 wc(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}
12`]).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 Cc({method:a,url:o,headers:u,schema:this.schemaName,body:s,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}},Mc=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}}},Nc=`realtime-js/2.111.0`,Pc=`1.0.0`,Fc=`2.0.0`,Ic=Fc,Lc=1e4,Rc={closed:`closed`,errored:`errored`,joined:`joined`,joining:`joining`,leaving:`leaving`},zc={close:`phx_close`,error:`phx_error`,join:`phx_join`,reply:`phx_reply`,leave:`phx_leave`,access_token:`access_token`},Bc={connecting:`connecting`,open:`open`,closing:`closing`,closed:`closed`},Vc=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)))}},Hc;(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`})(Hc||={});var Uc=(e,t,n={})=>{let r=n.skipTypes??[];return t?Object.keys(t).reduce((n,i)=>(n[i]=Wc(i,e,t,r),n),{}):{}},Wc=(e,t,n,r)=>{let i=t.find(t=>t.name===e)?.type,a=n[e];return i&&!r.includes(i)?Gc(i,a):Kc(a)},Gc=(e,t)=>{if(e.charAt(0)===`_`)return Xc(t,e.slice(1,e.length));switch(e){case Hc.bool:return qc(t);case Hc.float4:case Hc.float8:case Hc.int2:case Hc.int4:case Hc.int8:case Hc.numeric:case Hc.oid:return Jc(t);case Hc.json:case Hc.jsonb:return Yc(t);case Hc.timestamp:return Zc(t);case Hc.abstime:case Hc.date:case Hc.daterange:case Hc.int4range:case Hc.int8range:case Hc.money:case Hc.reltime:case Hc.text:case Hc.time:case Hc.timestamptz:case Hc.timetz:case Hc.tsrange:case Hc.tstzrange:return Kc(t);default:return Kc(t)}},Kc=e=>e,qc=e=>{switch(e){case`t`:return!0;case`f`:return!1;default:return e}},Jc=e=>{if(typeof e==`string`){let t=parseFloat(e);
vendor: 35,353 bytes, lines 12-13
12if(!Number.isNaN(t))return t}return e},Yc=e=>{if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e},Xc=(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=>Gc(t,e))}return e},Zc=e=>typeof e==`string`?e.replace(` `,`T`):e,Qc=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},$c=e=>typeof e==`function`?e:function(){return e},el=typeof self<`u`?self:null,tl=typeof window<`u`?window:null,nl=el||tl||globalThis,rl=`2.0.0`,il=1e4,al=1e3,ol=100,sl={connecting:0,open:1,closing:2,closed:3},H={closed:`closed`,errored:`errored`,joined:`joined`,joining:`joining`,leaving:`leaving`},cl={close:`phx_close`,error:`phx_error`,join:`phx_join`,reply:`phx_reply`,leave:`phx_leave`},ll={longpoll:`longpoll`,websocket:`websocket`},ul={complete:4},dl=`base64url.bearer.phx.`,fl=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})}},pl=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))}},ml=class{constructor(e,t,n){this.state=H.closed,this.topic=e,this.params=$c(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new fl(this,cl.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new pl(()=>{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=H.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this.joinPush.receive(`error`,e=>{this.state=H.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=H.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=H.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 fl(this,cl.leave,$c({}),this.timeout).send(),this.state=H.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(cl.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=H.closed,this.bindings=[]}onClose(e){this.on(cl.close,e)}onError(e){return this.on(cl.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 fl(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=H.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log(`channel`,`leave ${this.topic}`),this.trigger(cl.close,`leave`)},n=new fl(this,cl.leave,$c({}),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=H.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===H.closed}isErrored(){return this.state===H.errored}isJoined(){return this.state===H.joined}isJoining(){return this.state===H.joining}isLeaving(){return this.state===H.leaving}},hl=class{static request(e,t,n,r,i,a,o){if(nl.XDomainRequest){let n=new nl.XDomainRequest;return this.xdomainRequest(n,e,t,r,i,a,o)}else if(nl.XMLHttpRequest){let s=new nl.XMLHttpRequest;return this.xhrRequest(s,e,t,n,r,i,a,o)}else if(nl.fetch&&nl.AbortController)return this.fetchRequest(e,t,n,r,i,a,o);else 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),nl.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===ul.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)}`}},gl=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)},_l=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(dl)&&(this.authToken=atob(t[1].slice(dl.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=sl.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace(`ws://`,`http://`).replace(`wss://`,`https://`).replace(RegExp(`(.*)/`+ll.websocket),`$1/`+ll.longpoll)}endpointURL(){return hl.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=sl.connecting}ontimeout(){this.onerror(`timeout`),this.closeAndRetry(1005,`timeout`,!1)}isActive(){return this.readyState===sl.open||this.readyState===sl.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=sl.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=gl(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+ol,r=e.slice(t,n);this.ajax(`POST`,{"Content-Type":`application/x-ndjson`},r.join(`
13`),()=>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=sl.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=hl.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)}},vl=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))}},yl={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:cl.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)}}},bl=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||il,this.transport=t.transport||nl.WebSocket||_l,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=nl&&nl.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=yl.encode.bind(yl),this.defaultDecoder=yl.decode.bind(yl),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===_l?(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder):(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder);let r=null;tl&&tl.addEventListener&&(tl.addEventListener(`pagehide`,e=>{this.conn&&(this.disconnect(),r=this.connectClock)}),tl.addEventListener(`pageshow`,e=>{r===this.connectClock&&(r=null,this.connect())}),tl.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=$c(t.params||{}),this.endPoint=`${e}/${ll.websocket}`,this.vsn=t.vsn||rl,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new pl(()=>{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&&$c(t.authToken)}getLongPollTransport(){return _l}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=hl.appendParams(hl.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=$c(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==_l?this.connectWithFallback(_l,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 _l:return`LongPoll`;default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=[`phoenix`,`${dl}${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=this.transportName(e),o=t=>{this.log(`transport`,`falling back to ${a}...`,t),this.off([void 0,i]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${a}`))return o(`memorized`);this.fallbackTimer=setTimeout(o,t),i=this.onError(e=>{this.log(`transport`,`error`,e),r&&!n&&(clearTimeout(this.fallbackTimer),o(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(o,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(),al,`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===sl.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)}triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(cl.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case sl.connecting:return`connecting`;case sl.open:return`open`;case sl.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 ml(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 e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback(`disconnected`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:`phoenix`,event:`heartbeat`,payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback(`sent`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,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())}},xl=class e{constructor(t,n){let r=wl(n);this.presence=new vl(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=Cl(e),Object.getOwnPropertyNames(e).reduce((t,n)=>{let r=e[n];return t[n]=Sl(r),t},{})}static onJoinPayload(e,t,n){return{event:`join`,key:e,currentPresences:Tl(t),newPresences:Sl(n)}}static onLeavePayload(e,t,n){return{event:`leave`,key:e,currentPresences:Tl(t),leftPresences:Sl(n)}}};function Sl(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 Cl(e){return JSON.parse(JSON.stringify(e))}function wl(e){return e?.events&&{events:e.events}}function Tl(e){return e?.metas?Sl(e):[]}var El;(function(e){e.SYNC=`sync`,e.JOIN=`join`,e.LEAVE=`leave`})(El||={});var Dl=class{get state(){return this.presenceAdapter.state}constructor(e,t){this.channel=e,this.presenceAdapter=new xl(this.channel.channelAdapter,t)}};function Ol(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 kl=class{constructor(e,t,n){let r=Al(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===Rc.joined}isJoined(){return this.state===Rc.joined}isJoining(){return this.state===Rc.joining}isClosed(){return this.state===Rc.closed}isLeaving(){return this.state===Rc.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}};function Al(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:``,enabled:!1},private:!1},e.config)}}var jl=/[,()"\\]/,Ml=e=>jl.test(e)||e!==e.trim(),Nl=e=>`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`,Pl=e=>{let t=e===null?`null`:String(e);return Ml(t)?Nl(t):t},Fl=e=>e===null?`null`:String(e),Il=(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=>Pl(e)).join(`,`)})`}return e===`is`?`is.${Fl(t)}`:`${e}.${Pl(t)}`},Ll=class{constructor(){this.filters=[]}add(e,t,n,r=!1){let i=r?`not.`:``;return this.filters.push(`${e}=${i}${Il(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()}},Rl;(function(e){e.ALL=`*`,e.INSERT=`INSERT`,e.UPDATE=`UPDATE`,e.DELETE=`DELETE`})(Rl||={});var zl;(function(e){e.BROADCAST=`broadcast`,e.PRESENCE=`presence`,e.POSTGRES_CHANGES=`postgres_changes`,e.SYSTEM=`system`})(zl||={});var Bl;(function(e){e.SUBSCRIBED=`SUBSCRIBED`,e.TIMED_OUT=`TIMED_OUT`,e.CLOSED=`CLOSED`,e.CHANNEL_ERROR=`CHANNEL_ERROR`})(Bl||={});var Vl=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 kl(this.socket.socketAdapter,e,this.params),this.presence=new Dl(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Qc(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[zl.PRESENCE]&&this.bindings[zl.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?.(Bl.CHANNEL_ERROR,Ol(t))}),this._onClose(()=>e?.(Bl.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?.(Bl.SUBSCRIBED);return}this._updatePostgresBindings(t,e)}).receive(`error`,t=>{this.state=Rc.errored;let n=Object.values(t).join(`, `)||`error`;e?.(Bl.CHANNEL_ERROR,Error(n,{cause:t}))}).receive(`timeout`,()=>{e?.(Bl.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=Rc.errored,n?.(Bl.CHANNEL_ERROR,Error(`mismatch between server and client bindings for postgres changes`));return}}this.bindings.postgres_changes=a,this.state!=Rc.errored&&n&&n(Bl.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===zl.PRESENCE||e===zl.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
13ime-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`){console.warn(`Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.`);let{event:n,payload:r}=e,i={apikey:this.socket.apiKey?this.socket.apiKey:``,"Content-Type":`application/json`};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);let a={method:`POST`,headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:n,payload:r,private:this.private}]})};try{let e=await this._fetchWithTimeout(this.broadcastEndpointURL,a,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`}}else 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(e,t,n){let r=e.toLocaleLowerCase(),i=t?.filter;(i instanceof Ll||typeof i==`object`&&i&&typeof i.build==`function`)&&(t=Object.assign(Object.assign({},t),{filter:i.build()}));let a=this.channelAdapter.on(e,n),o={type:r,filter:t,callback:n,ref:a};return this.bindings[r]?this.bindings[r].push(o):this.bindings[r]=[o],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()}else return i.type.toLocaleLowerCase()===r})}_notThisChannelEvent(e,t){let{close:n,error:r,leave:i,join:a}=zc;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)}_getPayloadRecords(e){let t={new:{},old:{}};return(e.type===`INSERT`||e.type===`UPDATE`)&&(t.new=Uc(e.columns,e.record)),(e.type===`UPDATE`||e.type===`DELETE`)&&(t.old=Uc(e.columns,e.old_record)),t}},Hl=class{constructor(e,t){this.socket=new bl(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)}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()==Bc.connecting}isDisconnecting(){return this.socket.connectionState()==Bc.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}},U={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},Ul=[1e3,2e3,5e3,1e4],W=1e4;function G(){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 K(){try{if(typeof globalThis<`u`&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return G()}var Wl=`
14  addEventListener("message", (e) => {
15    if (e.data.event === "start") {
16      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
17    }
18  });`,Gl=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={}
18,this.ref=0,this.serializer=new Vc,this._manuallySetToken=!1,this._authPromise=null,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 Hl(e,n),this.httpEndpoint=Qc(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)}connectionState(){return this.socketAdapter.connectionState()||Bc.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 Vl(`realtime:${e}`,t,this);return this._cancelPendingDisconnect(),this.channels.push(n),n}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(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}
18this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log(`transport`,`deferred disconnect fired - no channels, disconnecting`),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log(`transport`,`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log(`transport`,`pending disconnect cancelled - channel activity detected`),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let t,n=!1;if(e)t=e,n=!0;else if(this.accessToken)try{t=await this.accessToken()}catch(e){this.log(`error`,`Error fetching access token from callback`,e),t=this.accessTokenValue}else t=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=t&&(this.accessTokenValue=t,this.channels.forEach(e=>{let n={access_token:t,version:Nc};t&&e.updateJoinPayload(n),e.joinedOnce&&e.channelAdapter.isJoined()&&e.channelAdapter.push(zc.access_token,{access_token:t})}))}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([Wl],{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??Lc,t.heartbeatIntervalMs=e?.heartbeatIntervalMs??U.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=e?.disconnectOnEmptyChannelsAfterMs??2*(e?.heartbeatIntervalMs??U.HEARTBEAT_INTERVAL),t.transport=e?.transport??Mc.getWebSocketConstructor(),t.params=e?.params,t.logger=e?.logger,t.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),t.sessionStorage=e?.sessionStorage??K(),t.reconnectAfterMs=e?.reconnectAfterMs??(e=>Ul[e-1]||W);let n,r,i=e?.vsn??Ic;switch(i){case Pc:n=(e,t)=>t(JSON.stringify(e)),r=(e,t)=>t(JSON.parse(e));break;case Fc: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 18
18,Kl=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 ql(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 Jl(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 Yl(e){let t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:i,body:a,headers:o}){let s=ql(e.baseUrl,r,i),c=await Jl(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 Kl(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 Xl(e){return e.join(`�`)}var Zl=class{constructor(e,t=``){this.client=e,this.prefix=t}async listNamespaces(e){let t=e?{parent:Xl(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/${Xl(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${Xl(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:`HEAD`,path:`${this.prefix}/namespaces/${Xl(e.namespace)}`}),!0}catch(e){if(e instanceof Kl&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(e){if(e instanceof Kl&&e.status===409)return;throw e}}};function Ql(e){return e.join(`�`)}var $l=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/${Ql(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/${Ql(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/${Ql(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/${Ql(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/${Ql(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/${Ql(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(e){if(e instanceof Kl&&e.status===404)return!1;throw e}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Kl&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},eu=class{constructor(e){let t=`v1`;e.catalogName&&(t+=`/${e.catalogName}`);let n=e.baseUrl.endsWith(`/`)?e.baseUrl:`${e.baseUrl}/`;this.client=Yl({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(`,`),this.namespaceOps=new Zl(this.client,t),this.tableOps=new $l(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)}
18async 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 tu(e){"@babel/helpers - typeof";return tu=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},tu(e)}function nu(e,t){if(tu(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(tu(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ru(e){var t=nu(e,`string`);return tu(t)==`symbol`?t:t+``}function iu(e,t,n){return(t=ru(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function au(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?au(Object(n),!0).forEach(function(t){iu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):au(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ou=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 su(e){return typeof e==`object`&&!!e&&`__isStorageError`in e}var cu=class extends ou{constructor(e,t,n,r=`storage`){super(e,r,t,n),this.name=r===`vectors`?`StorageVectorsApiError`:`StorageApiError`,this.status=t,this.statusCode=n}toJSON(){return q({},super.toJSON())}},lu=class extends ou{constructor(e,t,n=`storage`){super(e,n),this.name=n===`vectors`?`StorageVectorsUnknownError`:`StorageUnknownError`,this.originalError=t}};function uu(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 du(e){let t={};for(let[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}var fu=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),pu=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)},mu=e=>{if(Array.isArray(e))return e.map(e=>mu(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]=mu(n)}),t},hu=e=>!e||typeof e!=`string`||e.length===0||e.length>100||e.trim()!==e||e.includes(`/`)||e.includes(`\\`)?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),gu=e=>e.split(`/`).map(encodeURIComponent).join(`/`),_u=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)},vu=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 cu(_u(e),i,n,r))}).catch(()=>{let e=i+``;t(new cu(n.statusText||`HTTP ${i} error`,i,e,r))})}else t(new lu(_u(e),e,r))},yu=(e,t,n,r)=>{let i={method:e,headers:t?.headers||{}};if(e===`GET`||e===`HEAD`||!r)return q(q({},i),n);if(pu(r)){let e=t?.headers||{},n;for(let[t,r]of Object.entries(e))t.toLowerCase()===`content-type`&&(n=r);i.headers=uu(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 bu(e,t,n,r,i,a,o){return new Promise((s,c)=>{e(n,yu(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=>vu(e,c,r,o))})}function xu(e=`storage`){return{get:async(t,n,r,i)=>bu(t,`GET`,n,r,i,void 0,e),post:async(t,n,r,i,a)=>bu(t,`POST`,n,i,a,r,e),put:async(t,n,r,i,a)=>bu(t,`PUT`,n,i,a,r,e),head:async(t,n,r,i)=>bu(t,`HEAD`,n,q(q({},r),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,n,r,i,a)=>bu(t,`DELETE`,n,i,a,r,e)}}var{get:Su,post:Cu,put:wu,head:Tu,remove:Eu}
18=xu(`storage`),Du=xu(`vectors`),Ou=class{constructor(e,t={},n,r=`storage`){this.shouldThrowOnError=!1,this.url=e,this.headers=du(t),this.fetch=fu(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=uu(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(su(e))return{data:null,error:e};throw e}}},ku=Symbol.toStringTag,Au=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[ku]=`StreamDownloadBuilder`,this.promise=null}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||=this.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(su(t))return{data:null,error:t};throw t}}},ju=Symbol.toStringTag,Mu=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[ju]=`BlobDownloadBuilder`,this.promise=null}asStream(){return new Au(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(su(t))return{data:null,error:t};throw t}}},Nu={limit:100,offset:0,sortBy:{column:`name`,order:`asc`}},Pu={cacheControl:`3600`,contentType:`text/plain;charset=UTF-8`,upsert:!1},Fu=class extends Ou{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({},Pu),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=uu(s,e,t);let l=i._removeEmptyFolders(t),u=i._getFinalPath(l),d=await(e==`PUT`?wu:Cu)(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({},Pu),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=uu(o,e,t);return{path:a,fullPath:(await wu(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 Cu(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 ou(`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 Cu(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
18stinationBucket:n?.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await Cu(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 Cu(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 Cu(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 Mu(()=>Su(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()=>mu(await Su(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;let n=t._getFinalPath(e);try{return await Tu(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(su(e)){let t=e instanceof cu?e.status:e instanceof lu?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 Eu(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=gu(r._getFinalPath(e)),a=new URLSearchParams;t?.transformations&&a.set(`transformations`,`true`);let o=a.toString();return await Eu(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({},Nu.sortBy),t.sortBy):Nu.sortBy,a=q(q(q({},Nu),t),{},{sortBy:i,prefix:e||``});return await Cu(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 Cu(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}},Iu={"X-Client-Info":`storage-js/2.111.0`},Lu=class extends Ou{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({},Iu),t);super(a,o,n,`storage`)}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let n=t.listBucketOptionsToQueryString(e);return await Su(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Su(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await Cu(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 wu(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 Cu(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Eu(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 Eu(r.fetch,`${r.url}/cdn/${gu(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>
180?`?`+new URLSearchParams(t).toString():``}},Ru=class extends Ou{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=q(q({},Iu),t);super(r,i,n,`storage`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await Cu(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 Su(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Eu(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!hu(e))throw new ou(`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 eu({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}})}},zu=class extends Ou{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=q(q({},Iu),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createIndex(e){var t=this;return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Du.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Du.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},Bu=class extends Ou{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=q(q({},Iu),{},{"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 Du.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Du.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 Du.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Du.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 Du.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},Vu=class extends Ou{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=q(q({},Iu),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},Hu=class extends Vu{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new Uu(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)}},Uu=class extends zu{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}))}
18async 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 Wu(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},Wu=class extends Bu{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}))}},Gu=class extends Lu{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new Fu(this.url,this.headers,e,this.fetch)}get vectors(){return new Hu(this.url+`/vector`,{headers:this.headers,fetch:this.fetch})}get analytics(){return new Ru(this.url+`/iceberg`,this.headers,this.fetch)}},Ku=`2.111.0`,qu=30*1e3,Ju=3*qu,J=2*qu,Yu=`http://localhost:9999`,Xu=`supabase.auth.token`,Zu={"X-Client-Info":`gotrue-js/${Ku}`},Qu=`X-Supabase-Api-Version`,$u={"2024-01-01":{timestamp:Date.parse(`2024-01-01T00:00:00.0Z`),name:`2024-01-01`}},ed=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,td=`sb_flow_id`,nd=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 Y(e){return typeof e==`object`&&!!e&&`__isAuthError`in e}var rd=class extends nd{constructor(e,t,n){super(e,t,n),this.name=`AuthApiError`,this.status=t,this.code=n}};function id(e){return Y(e)&&e.name===`AuthApiError`}var ad=class extends nd{constructor(e,t){super(e),this.name=`AuthUnknownError`,this.originalError=t}},od=class extends nd{constructor(e,t,n,r){super(e,n,r),this.name=t,this.status=n}},sd=class extends od{constructor(){super(`Auth session missing!`,`AuthSessionMissingError`,400,void 0)}};function cd(e){return Y(e)&&e.name===`AuthSessionMissingError`}var ld=class extends od{constructor(){super(`Auth session or user missing`,`AuthInvalidToken
18ResponseError`,500,void 0)}},ud=class extends od{constructor(e){super(e,`AuthInvalidCredentialsError`,400,void 0)}},dd=class extends od{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 fd(e){return Y(e)&&e.name===`AuthImplicitGrantRedirectError`}var pd=class extends od{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})}},md=class extends od{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`)}},hd=class extends od{constructor(e,t){super(e,`AuthRetryableFetchError`,t,void 0)}};function gd(e){return Y(e)&&e.name===`AuthRetryableFetchError`}var _d=class extends od{constructor(e=`Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)`){super(e,`AuthRefreshDiscardedError`,409,void 0)}};function vd(e){return Y(e)&&e.name===`AuthRefreshDiscardedError`}var yd=class extends od{constructor(e,t,n){super(e,`AuthWeakPasswordError`,t,`weak_password`),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}},bd=class extends od{constructor(e){super(e,`AuthInvalidJwtError`,400,`invalid_jwt`)}},xd=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`.split(``),Sd=` 	
19\r=`.split(``),X=(()=>{let e=Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Sd.length;t+=1)e[Sd[t].charCodeAt(0)]=-2;for(let t=0;t<xd.length;t+=1)e[xd[t].charCodeAt(0)]=t;return e})();function Cd(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;)n(xd[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(xd[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6}function wd(e,t,n){let r=X[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 Td(e){let t=[],n=e=>{t.push(String.fromCodePoint(e))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=e=>{Od(e,r,n)};for(let t=0;t<e.length;t+=1)wd(e.charCodeAt(t),i,a);return t.join(``)}function Ed(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function Dd(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}Ed(r,t)}}function Od(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 kd(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};for(let t=0;t<e.length;t+=1)wd(e.charCodeAt(t),n,r);return new Uint8Array(t)}function Ad(e){let t=[];return Dd(e,e=>t.push(e)),new Uint8Array(t)}function jd(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};return e.forEach(e=>Cd(e,n,r)),Cd(null,n,r),t.join(``)}function Md(e){return Math.round(Date.now()/1e3)+e}function Nd(){return Symbol(`auth-callback`)}var Pd=()=>typeof window<`u`&&typeof document<`u`,Fd={tested:!1,writable:!1},Z=()=>
19{if(!Pd())return!1;try{if(typeof globalThis.localStorage!=`object`)return!1}catch{return!1}if(Fd.tested)return Fd.writable;let e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Fd.tested=!0,Fd.writable=!0}catch{Fd.tested=!0,Fd.writable=!1}return Fd.writable};function Id(e){let t={},n=new URL(e);if(n.hash&&n.hash[0]===`#`)try{new URLSearchParams(n.hash.substring(1)).forEach((e,n)=>{t[n]=e})}catch{}return n.searchParams.forEach((e,n)=>{t[n]=e}),t}var Ld=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),Rd=e=>typeof e==`object`&&!!e&&`status`in e&&`ok`in e&&`json`in e&&typeof e.json==`function`,zd=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Bd=async(e,t)=>{let n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Vd=async(e,t)=>{await e.removeItem(t)},Hd=class e{constructor(){this.promise=new e.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}};Hd.promiseConstructor=Promise;function Ud(e){let t=e.split(`.`);if(t.length!==3)throw new bd(`Invalid JWT structure`);for(let e=0;e<t.length;e++)if(!ed.test(t[e]))throw new bd(`JWT not in base64url format`);return{header:JSON.parse(Td(t[0])),payload:JSON.parse(Td(t[1])),signature:kd(t[2]),raw:{header:t[0],payload:t[1]}}}async function Wd(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function Gd(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 Kd(e){return(`0`+e.toString(16)).substr(-2)}function qd(){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,Kd).join(``)}async function Jd(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 Yd(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 Jd(e);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}var Xd=/^[a-zA-Z0-9_-]{8,64}$/;function Zd(e){return typeof e==`string`&&Xd.test(e)?e:null}function Qd(){if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,Kd).join(``)}let e=``;for(let t=0;t<32;t++)e+=Math.floor(Math.random()*16).toString(16);return e}var $d=(e,t)=>`${e}-flow-${t}-code-verifier`,ef=e=>`${e}-flows-code-verifier`;async function tf(e,t){let n=await Bd(e,ef(t));return Array.isArray(n)?n.filter(e=>Zd(e)!==null):[]}async function nf(e,t,n,r,i){await zd(e,$d(t,n),r);let a=(await tf(e,t)).filter(e=>e!==n);for(a.push(n);a.length>5;){let n=a.shift();await Vd(e,$d(t,n)),i?.(n)}await zd(e,ef(t),a),await zd(e,`${t}-code-verifier`,r)}async function rf(e,t,n){if(n){let r=await Bd(e,$d(t,n));return{verifier:typeof r==`string`?r:null,flowId:n}}let r=await Bd(e,`${t}-code-verifier`);return{verifier:typeof r==`string`?r:null,flowId:null}}async function af(e,t,n){let r=`${t}-code-verifier`;if(!n){await Vd(e,r);return}let i=$d(t,n),a=await Bd(e,i);await Vd(e,i);let o=await tf(e,t),s=o.filter(e=>e!==n);s.length!==o.length&&(s.length>0?await zd(e,ef(t),s):await Vd(e,ef(t))),a!=null&&a===await Bd(e,r)&&await Vd(e,r)}async function of(e,t){let n=await tf(e,t);for(let r of n)await Vd(e,$d(t,r));await Vd(e,ef(t)),await Vd(e,`${t}-code-verifier`)}function sf(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}${td}=${encodeURIComponent(t)}${i}`}async function cf(e,t,n=!1,r){let i=qd(),a=i;n&&(a+=`/recovery`);let o=Qd();await nf(e,t,o,a,r);let s=await Yd(i);return[s,i===s?`plain`:`s256`,o]}var lf=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function uf(e){let t=e.headers.get(Qu);if(!t||!t.match(lf))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function df(e){if(!e)throw Error(`Missing exp claim`);if(e<=Math.floor(Date.now()/1e3))throw Error(`JWT has expired`)}function ff(e){switch(e){case`RS256`:return{name:`RSASSA-PKCS1-v1_5`,hash:{name:`
19SHA-256`}};case`ES256`:return{name:`ECDSA`,namedCurve:`P-256`,hash:{name:`SHA-256`}};default:throw Error(`Invalid alg claim`)}}var pf=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function mf(e){if(!pf.test(e))throw Error(`@supabase/auth-js: Expected parameter to be UUID but is not`)}function hf(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 gf(){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 _f(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 vf(e){return JSON.parse(JSON.stringify(e))}var yf=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)},bf=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function xf(e){if(!Rd(e))throw new hd(yf(e),0);if(bf.includes(e.status))throw new hd(yf(e),e.status);let t;try{t=await e.json()}catch(e){throw new ad(yf(e),e)}let n,r=uf(e);if(r&&r.getTime()>=$u[`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 yd(yf(t),e.status,t.weak_password.reasons)}else if(n===`weak_password`)throw new yd(yf(t),e.status,t.weak_password?.reasons||[]);else if(n===`session_not_found`)throw new sd;throw new rd(yf(t),e.status||500,n)}var Sf=(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 Q(e,t,n,r){let i=Object.assign({},r?.headers);i[`X-Supabase-Api-Version`]||(i[Qu]=$u[`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 Cf(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 Cf(e,t,n,r,i,a){let o=Sf(t,r,i,a),s;try{s=await e(n,Object.assign({},o))}catch(e){throw new hd(yf(e),0)}
19if(s.ok||await xf(s),r?.noResolveJson)return s;try{return await s.json()}catch(e){await xf(e)}}function wf(e){let t=null;Af(e)&&(t=Object.assign({},e),e.expires_at||(t.expires_at=Md(e.expires_in)));let n=e.user??(typeof e?.id==`string`?e:null);return{data:{session:t,user:n},error:null}}function Tf(e){let t=wf(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 Ef(e){return{data:{user:e.user??e},error:null}}function Df(e){return{data:e,error:null}}function Of(e){let{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a}=e,o=rc(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 kf(e){return e}function Af(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}var jf=[`global`,`local`,`others`],Mf=class{constructor({url:e=``,headers:t={},fetch:n,experimental:r}){this.url=e,this.headers=t,this.fetch=Ld(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=jf[0]){if(jf.indexOf(t)<0)throw Error(`@supabase/auth-js: Parameter scope must be one of ${jf.join(`, `)}`);try{return await Q(this.fetch,`POST`,`${this.url}/logout?scope=${t}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(e){if(Y(e))return{data:null,error:e};throw e}}async inviteUserByEmail(e,t={}){try{return await Q(this.fetch,`POST`,`${this.url}/invite`,{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:Ef})}catch(e){if(Y(e))return{data:{user:null},error:e};throw e}}async generateLink(e){try{let{options:t}=e,n=rc(e,[`options`]),r=Object.assign(Object.assign({},n),t);return`newEmail`in n&&(r.new_email=n?.newEmail,delete r.newEmail),await Q(this.fetch,`POST`,`${this.url}/admin/generate_link`,{body:r,headers:this.headers,xform:Of,redirectTo:t?.redirectTo})}catch(e){if(Y(e))return{data:{properties:null,user:null},error:e};throw e}}async createUser(e){try{return await Q(this.fetch,`POST`,`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Ef})}catch(e){if(Y(e))return{data:{user:null},error:e};throw e}}async listUsers(e){try{let t={nextPage:null,lastPage:0,total:0},n=await Q(this.fetch,`GET`,`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:kf});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(Y(e))return{data:{users:[]},error:e};throw e}}async getUserById(e){mf(e);try{return await Q(this.fetch,`GET`,`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Ef})}catch(e){if(Y(e))return{data:{user:null},error:e};throw e}}async updateUserById(e,t){mf(e);try{return await Q(this.fetch,`PUT`,`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:Ef})}catch(e){if(Y(e))return{data:{user:null},error:e};throw e}}async deleteUser(e,t=!1){mf(e);try{return await Q(this.fetch,`DELETE`,`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:Ef})}catch(e){if(Y(e))return{data:{user:null},error:e};throw e}}async _listFactors(e){mf(e.userId);try{let{data:t,error:n}=await Q(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(Y(e))return{data:null,error:e};throw e}}async _deleteFactor(e){mf(e.userId),mf(e.id);try{return{data:await Q(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(e){if(Y(e))return{data:null,error:e};throw e}}async _listOAuthClients(e){try{let t={nextPage:null,lastPage:0,total:0},n=await Q(this.fetch,`GET`,`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:kf});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>
190&&(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(Y(e))return{data:{clients:[]},error:e};throw e}}async _createOAuthClient(e){try{return await Q(this.fetch,`POST`,`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(Y(e))return{data:null,error:e};throw e}}async _getOAuthClient(e){try{return await Q(this.fetch,`GET`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(Y(e))return{data:null,error:e};throw e}}async _updateOAuthClient(e,t){try{return await Q(this.fetch,`PUT`,`${this.url}/admin/oauth/clients/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(Y(e))return{data:null,error:e};throw e}}async _deleteOAuthClient(e){try{return await Q(this.fetch,`DELETE`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(Y(e))return{data:null,error:e};throw e}}async _regenerateOAuthClientSecret(e){try{return await Q(this.fetch,`POST`,`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(Y(e))return{data:null,error:e};throw e}}async _listCustomProviders(e){try{let t={};return e?.type&&(t.type=e.type),await Q(this.fetch,`GET`,`${this.url}/admin/custom-providers`,{headers:this.headers,query:t,xform:e=>({data:{providers:e?.providers??[]},error:null})})}catch(e){if(Y(e))return{data:{providers:[]},error:e};throw e}}async _createCustomProvider(e){try{return await Q(this.fetch,`POST`,`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(Y(e))return{data:null,error:e};throw e}}async _getCustomProvider(e){try{return await Q(this.fetch,`GET`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(Y(e))return{data:null,error:e};throw e}}async _updateCustomProvider(e,t){try{return await Q(this.fetch,`PUT`,`${this.url}/admin/custom-providers/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(Y(e))return{data:null,error:e};throw e}}async _deleteCustomProvider(e){try{return await Q(this.fetch,`DELETE`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(Y(e))return{data:null,error:e};throw e}}async _adminListPasskeys(e){hf(this.experimental),mf(e.userId);try{return await Q(this.fetch,`GET`,`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(Y(e))return{data:null,error:e};throw e}}async _adminDeletePasskey(e){hf(this.experimental),mf(e.userId),mf(e.passkeyId);try{return await Q(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(Y(e))return{data:null,error:e};throw e}}};function Nf(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}globalThis&&Z()&&globalThis.localStorage&&globalThis.localStorage.getItem(`supabase.gotrue-js.locks.debug`);var Pf=class extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}};function Ff(){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 If(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function Lf(e){return parseInt(e,16)}function Rf(e){let t=new TextEncoder().encode(e);return`0x`+Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``)}function zf(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(`
20`))throw Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`);let f=If(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=`
21Resources:`;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}`}
21var Bf=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}}},Vf=class extends Bf{constructor(e,t){super({code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:t,message:e}),this.name=`WebAuthnUnknownError`,this.originalError=t}};function Hf({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 Bf({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 Bf({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 Bf({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 Bf({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 Bf({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new Bf({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 Bf({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new Bf({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(!Yf(t))return new Bf({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new Bf({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 Bf({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 Bf({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 Bf({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}function Uf({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 Bf({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new Bf({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!Yf(t))return new Bf({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new Bf({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 Bf({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 Bf({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}var Wf=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 Gf(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=rc(e,[`challenge`,`user`,`excludeCredentials`]),a=kd(t).buffer,o=Object.assign(Object.assign({},n),{id:kd(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:kd(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return s}function Kf(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=rc(e,[`challenge`,`allowCredentials`]),i=kd(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:kd(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return a}function qf(e){if(`toJSON`in e&&typeof e.toJSON==`function`)return e.toJSON();let t=e;return{id:e.id,rawId:e.id,response:{attestationObject:jd(new Uint8Array(e.response.attestationObject)),clientDataJSON:jd(new Uint8Array(e.response.clientDataJSON))},type:`public-key`,clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:t.authenticatorAttachment??void 0}}function Jf(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:jd(new Uint8Array(r.authenticatorData)),clientDataJSON:jd(new Uint8Array(r.clientDataJSON)),signature:jd(new Uint8Array(r.signature)),userHandle:r.userHandle?jd(new Uint8Array(r.userHandle)):void 0},type:`public-key`,clientExtensionResults:n,authenticatorAttachment:t.authenticatorAttachment??void 0}}function Yf(e){return e===`localhost`||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Xf(){return!!(Pd()&&`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 Zf(e){try{let t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Vf(`Browser returned unexpected credential type`,t)}:{data:null,error:new Vf(`Empty credential response`,t)}}
21catch(t){return{data:null,error:Hf({error:t,options:e})}}}async function Qf(e){try{let t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Vf(`Browser returned unexpected credential type`,t)}:{data:null,error:new Vf(`Empty credential response`,t)}}catch(t){return{data:null,error:Uf({error:t,options:e})}}}var $f={hints:[`security-key`],authenticatorSelection:{authenticatorAttachment:`cross-platform`,requireResidentKey:!1,userVerification:`preferred`,residentKey:`discouraged`},attestation:`direct`},ep={userVerification:`preferred`,hints:[`security-key`],attestation:`direct`};function tp(...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];t(n)?r[e]=tp(n,a):r[e]=tp(a)}else r[e]=a}return r}function np(e,t){return tp($f,e,t||{})}function rp(e,t){return tp(ep,e,t||{})}var ip=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??Wf.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 Zf({publicKey:np(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=rp(a.webauthn.credential_options.publicKey,i?.request),{data:n,error:r}=await Qf(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 Y(e)?{data:null,error:e}:{data:null,error:new ad(`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 nd(`rpId is required for WebAuthn authentication`)};try{if(!Xf())return{data:null,error:new ad(`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 Y(e)?{data:null,error:e}:{data:null,error:new ad(`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 nd(`rpId is required for WebAuthn registration`)};try{if(!Xf())return{data:null,error:new ad(`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 Y(e)?{data:null,error:e}:{data:null,error:new ad(`Unexpected error in register`,e)}}}};Ff();var ap={url:Yu,storageKey:Xu,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Zu,flowType:`implicit`,debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},op={},sp=class e{get jwks(){return op[this.storageKey]?.jwks??{keys:[]}}set jwks(e){op[this.storageKey]=Object.assign(Object.assign({},op[this.storageKey]),{jwks:e})}get jwks_cached_at(){return op[this.storageKey]?.cachedAt??-(2**53-1)}set jwks_cached_at(e){op[this.storageKey]=Object.assign(Object.assign({},op[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({},ap),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&&Pd()){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 Mf({url:r.url,headers:r.headers,fetch:r.fetch,experimental:this.experimental}),this.url=r.url,this.headers=r.headers,this.fetch=Ld(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),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 ip(this)}
21,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:Z()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Nf(this.memoryStorage)),r.userStorage&&(this.userStorage=r.userStorage)):(this.memoryStorage={},this.storage=Nf(this.memoryStorage)),Pd()&&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} (${Ku}) ${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(Pd()&&(e=Id(window.location.href),this._isImplicitGrantCallback(e)?t=`implicit`:await this._isPKCECallback(e)&&(t=`pkce`)),Pd()&&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),fd(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 Y(e)?this._returnResult({error:e}):this._returnResult({error:new ad(`Unexpected error during initialization`,e)})}finally{await this._handleVisibilityChange(),this._debug(`#_initialize()`,`end`)}}async signInAnonymously(e){try{let{data:t,error:n}=await Q(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,body:{data:e?.options?.data??{},gotrue_meta_security:{captcha_token:e?.options?.captchaToken}},xform:wf});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(Y(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 Q(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}
21,code_challenge:o,code_challenge_method:s},xform:wf})}else if(`phone`in e){let{phone:t,password:r,options:i}=e;n=await Q(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:wf})}else throw new ud(`You must provide either an email or phone number and a password`);let{data:r,error:i}=n;if(i||!r)return await af(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 af(this.storage,this.storageKey,t),Y(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 Q(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:Tf})}else if(`phone`in e){let{phone:n,password:r,options:i}=e;t=await Q(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:Tf})}else throw new ud(`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 ld;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(Y(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(!Pd()){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=If(l[0]),d=o?.signInWithEthereum?.chainId;d||=Lf(await s.request({method:`eth_chainId`})),t=zf({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:[Rf(t),u]})}try{let{data:r,error:i}=await Q(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:wf});if(i)throw i;if(!r||!r.session||!r.user){let e=new ld;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(Y(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;
21if(!Pd()){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.solana&&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(`
22`);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 Q(this.fetch,`POST`,`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:`solana`,message:t,signature:jd(n)},e.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options?.captchaToken}}:null),xform:wf});if(i)throw i;if(!r||!r.session||!r.user){let e=new ld;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(Y(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _exchangeCodeForSession(e,t){let n=t?.flowId!=null,r=n?Zd(t?.flowId):Pd()?Zd(Id(window.location.href)[td]):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 rf(this.storage,this.storageKey,r),[o,s]=(i??``).split(`/`);try{if(!o&&this.flowType===`pkce`)throw new md;let{data:t,error:n}=await Q(this.fetch,`POST`,`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:o},xform:wf});if(await af(this.storage,this.storageKey,a),n)throw n;if(!t||!t.session||!t.user){let e=new ld;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 af(this.storage,this.storageKey,a),Y(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 Q(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:wf});if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!o||!o.session||!o.user){let e=new ld;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(Y(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 Q(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 Q(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 ud(`You must provide either an email or phone number.`)}catch(e){if(await af(this.storage,this.storageKey,t),Y(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 Q(this.fetch,`POST`,`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:n}}),redirectTo:t,xform:wf});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(Y(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 Q(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:Df});return i.data?.url&&Pd()&&!e.options?.skipBrowserRedirect&&window.location.assign(i.data.url),this._returnResult(i)}catch(e){if(await af(this.storage,this.storageKey,t),Y(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 sd;let{error:r}=await Q(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(Y(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 Q(this.fetch,`POST`,n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:a?.captchaToken}
22,code_challenge:o,code_challenge_method:s},redirectTo:this._maybeAppendFlowIdToRedirect(a?.emailRedirectTo,t)});return c&&await af(this.storage,this.storageKey,t),this._returnResult({data:{user:null,session:null},error:c})}else if(`phone`in e){let{phone:t,type:r,options:i}=e,{data:a,error:o}=await Q(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 ud(`You must provide either an email or phone number and a type`)}catch(e){if(await af(this.storage,this.storageKey,t),Y(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 Bd(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()<Ju:!1;if(this._debug(`#__loadSession()`,`session has${n?``:` not`} expired`,`expires_at`,e.expires_at),!n){if(this.userStorage){let t=await Bd(this.userStorage,this.storageKey+`-user`);t?.user?e.user=t.user:e.user=gf()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){let t={value:this.suppressGetSessionWarning};e.user=_f(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 Bd(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 Q(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:e,xform:Ef}):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 sd}:await Q(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:t.session?.access_token??void 0,xform:Ef})})}catch(e){if(Y(e))return cd(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 sd;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 Q(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:Ef});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 af(this.storage,this.storageKey,n),Y(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 sd;let t=Date.now()/1e3,n=t,r=!0,i=null,{payload:a}=Ud(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(Y(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 sd;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(Y(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _getSessionFromURL(e,t){try{if(!Pd())throw new dd(`No browser detected.`);if(e.error||e.error_description||e.error_code)throw new dd(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 pd(`Not a valid PKCE flow url.`);break;case`pkce`:if(this.flowType===`implicit`)throw new dd(`Not a valid implicit grant flow url.`);break;default:}if(t===`pkce`){if(this._debug(`#_initialize()`,`begin`,`is PKCE flow`,!0),!e.code)throw new pd(`No code detected.`);let{data:t,error:n}=await this._exchangeCodeForSession(e.code,{flowId:e[td]});if(n)throw n;let r=new URL(window.location.href);return r.searchParams.delete(`code`),r.searchParams.delete(td),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 dd(`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;
22f*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(Y(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=Zd(e[td]);return t&&await Bd(this.storage,$d(this.storageKey,t))?!0:!!await Bd(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&&!cd(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&&!(id(t)&&(t.status===404||t.status===401||t.status===403)||cd(t)))return e!==`others`&&await n(),this._returnResult({error:t})}return e!==`others`&&await n(),this._returnResult({error:null})})}onAuthStateChange(e){let t=Nd(),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),cd(t)||gd(t)||id(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 Q(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 af(this.storage,this.storageKey,i),Y(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(Y(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 Q(this.fetch,`GET`,a,{headers:this.headers,jwt:r.session?.access_token??void 0})});if(r)throw r;return Pd()&&!e.options?.skipBrowserRedirect&&window.location.assign(n?.url),this._returnResult({data:{provider:e.provider,url:n?.url,flowId:t},error:null})}catch(n){if(Y(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 Q(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:wf});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 ld}):(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers(`USER_UPDATED`,l.session)),this._returnResult({data:l,error:u}))}catch(e){if(await af(this.storage,this.storageKey,null),Y(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 Q(this.fetch,`DELETE`,`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:n.session?.access_token??void 0})})}catch(e){if(Y(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 Gd(async n=>(n>0&&await Wd(200*2**(n-1)),this._debug(t,`refreshing attempt`,n),await Q(this.fetch,`POST`,`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:wf})),(e,t)=>{let r=200*2**e;return t&&gd(t)&&Date.now()+r-n<3e4})}catch(e){if(this._debug(t,`error`,e),Y(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),Pd()&&!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 Bd(this.storage,this.storageKey);if(t&&this.userStorage){let e=await Bd(this.userStorage,this.storageKey+`-user`);!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!e&&(e={user:t.user},await zd(this.userStorage,this.storageKey+`-user`,e)),t.user=e?.user??gf()}else if(t&&!t.user&&!t.user){let e=await Bd(this.storage,this.storageKey+`-user`);e&&e?.user?(t.user=e.user,await Vd(this.storage,this.storageKey+`-user`),await zd(this.storage,this.storageKey,t)):t.user=gf()}if(this._debug(e,`session from storage`,t),!this._isValidSession(t)){this._debug(e,`session is not val
22id`),t!==null&&await this._removeSession();return}let n=(t.expires_at??1/0)*1e3-Date.now()<Ju;if(this._debug(e,`session has${n?``:` not`} expired with margin of ${Ju}s`),n){if(this.autoRefreshToken&&t.refresh_token){let{error:n}=await this._callRefreshToken(t.refresh_token);n&&(vd(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),gd(t)?console.warn(t):console.error(t);return}finally{this._debug(e,`end`)}}async _callRefreshToken(e){var t,n;if(!e)throw new sd;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 Hd;let t=await Bd(this.storage,this.storageKey),{data:n,error:i}=await this._refreshAccessToken(e);if(i)throw i;if(!n.session)throw new sd;let a=await Bd(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 _d};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 Vd(this.storage,this.storageKey),this.userStorage&&await Vd(this.userStorage,this.storageKey+`-user`);let e={data:null,error:new _d};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),Y(i)){let n={data:null,error:i};if(!gd(i)){let e=await Bd(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()+J},(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 zd(this.userStorage,this.storageKey+`-user`,{user:t.user});let e=Object.assign({},t);delete e.user;let r=vf(e);await zd(this.storage,this.storageKey,r)}else{let e=vf(t);await zd(this.storage,this.storageKey,e)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug(`#_removeSession()`),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Vd(this.storage,this.storageKey),await of(this.storage,this.storageKey),await Vd(this.storage,this.storageKey+`-user`),this.userStorage&&await Vd(this.userStorage,this.storageKey+`-user`),await this._notifyAllSubscribers(`SIGNED_OUT`,null)}_removeVisibilityChangedCallback(){this._debug(`#_removeVisibilityChangedCallback()`);let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Pd()&&window!=null&&window.removeEventListener&&window.removeEventListener(`visibilitychange`,e)}
22catch(e){console.error(`removing visibilitychange callback failed`,e)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug(`#_startAutoRefresh()`);let e=setInterval(()=>this._autoRefreshTokenTick(),qu);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)/qu);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${qu}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 Pf)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)/qu);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${qu}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()`),!Pd()||!(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:sf(e,t)}async _getCodeChallengeAndMethod(e=!1){return cf(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 Q(this.fetch,`DELETE`,`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:n?.session?.access_token})})}catch(e){if(Y(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 Q(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(Y(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`?qf(e.webauthn.credential_response):Jf(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:o}=await Q(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(Y(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 Q(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:Gf(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:Kf(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(e){if(Y(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}=Ud(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(Y(e))return this._returnResult({data:null,error:e});throw e}let{data:{session:t},error:n}
22=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}=Ud(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 Q(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 sd})})}catch(e){if(Y(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 sd});let a=await Q(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&&Pd()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(Y(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 sd});let a=await Q(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&&Pd()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(Y(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 Q(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 sd})})}catch(e){if(Y(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 Q(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 sd})})}catch(e){if(Y(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 Q(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}
22=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}}=Ud(n);if(!t?.allowExpired)try{df(i.exp)}catch(e){throw new bd(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=ff(r.alg),u=await crypto.subtle.importKey(`jwk`,c,l,!0,[`verify`]);if(!await crypto.subtle.verify(l,u,a,Ad(`${o}.${s}`)))throw new bd(`Invalid JWT signature`);return{data:{claims:i,header:r,signature:a},error:null}}catch(e){if(Y(e))return this._returnResult({data:null,error:e});throw e}}async signInWithPasskey(e){hf(this.experimental);try{if(!Xf())return this._returnResult({data:null,error:new ad(`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 Qf({publicKey:Kf(t.options),signal:e?.options?.signal??Wf.createNewAbortSignal()});if(i||!r)return this._returnResult({data:null,error:i??new ad(`WebAuthn ceremony failed`,null)});let a=Jf(r);return this._verifyPasskeyAuthentication({challengeId:t.challenge_id,credential:a})}catch(e){if(Y(e))return this._returnResult({data:null,error:e});throw e}}async registerPasskey(e){hf(this.experimental);try{if(!Xf())return this._returnResult({data:null,error:new ad(`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 Zf({publicKey:Gf(t.options),signal:e?.options?.signal??Wf.createNewAbortSignal()});if(i||!r)return this._returnResult({data:null,error:i??new ad(`WebAuthn ceremony failed`,null)});let a=qf(r);return this._verifyPasskeyRegistration({challengeId:t.challenge_id,credential:a})}catch(e){if(Y(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyRegistration(){hf(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 sd});let{data:r,error:i}=await Q(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(Y(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){hf(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 sd});let{data:i,error:a}=await Q(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(Y(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyAuthentication(e){hf(this.experimental);try{let{data:t,error:n}=await Q(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(Y(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyAuthentication(e){hf(this.experimental);try{let{data:t,error:n}=await Q(this.fetch,`POST`,`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:wf});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(Y(e))return this._returnResult({data:null,error:e});throw e}}async _listPasskeys(){hf(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 sd});let{data:r,error:i}=await Q(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(Y(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){hf(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 sd});let{data:i,error:a}=await Q(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(Y(e))return this._returnResult({data:null,error:e});throw e}}async _deletePasskey(e){hf(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 sd});let{error:i}=await Q(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(Y(e))return this._returnResult({data:null,error:e});throw e}}};sp.nextInstanceID={};var cp=sp,lp=`modulepreload`,up=function(e){return`/`+e},dp={},$=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=up(t,n),t=s(t),t in dp)return;dp[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`:lp,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n
22)=>{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)})},fp=`2.111.0`,pp=``,mp;if(typeof Deno<`u`)pp=`deno`,mp=Deno.version?.deno;else if(typeof document<`u`)pp=`web`;else if(typeof navigator<`u`&&navigator.product===`ReactNative`)pp=`react-native`;else{var hp;pp=`node`;let e=globalThis.process;mp=e==null||(hp=e.version)==null?void 0:hp.replace(/^v/,``)}var gp=[`runtime=${pp}`];mp&&gp.push(`runtime-version=${mp}`);var _p={headers:{"X-Client-Info":`supabase-js/${fp}; ${gp.join(`; `)}`}},vp={schema:`public`},yp={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:`implicit`},bp={},xp={enabled:!1,respectSamplingDecision:!0};function Sp(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())})}var Cp=null,wp=`@opentelemetry/api`;function Tp(){return Cp===null&&(Cp=$(()=>import(wp),[]).catch(()=>null)),Cp}function Ep(){return Sp(this,void 0,void 0,function*(){try{let e=yield Tp();if(!e||!e.propagation||!e.context)return null;let t={};e.propagation.inject(e.context.active(),t);let n=t.traceparent;return n?{traceparent:n,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function Dp(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 Op(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(kp(n.hostname,e))return!0}else 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 kp(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 Ap(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 jp(e){"@babel/helpers - typeof";return jp=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},jp(e)}function Mp(e,t){if(jp(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(jp(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Np(e){var t=Mp(e,`string`);return jp(t)==`symbol`?t:t+``}function Pp(e,t,n){return(t=Np(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fp(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 Ip(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Fp(Object(n),!0).forEach(function(t){Pp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Lp=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),Rp=()=>Headers,zp=e=>e.startsWith(`sb_publishable_`)||e.startsWith(`sb_secret_`),Bp=`sb_temp_`,Vp=new Set,Hp=e=>{if(!e.startsWith(`sb_`)||zp(e)||e.startsWith(Bp))return;let t=e.match(/^sb_[a-zA-Z0-9]+_/)?.[0]??`unknown`;
22Vp.has(t)||(Vp.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.`))},Up=(e,t,n,r,i,a)=>{let o=Lp(r),s=Rp(),c=i?.enabled===!0,l=i?.respectSamplingDecision!==!1,u=c?Ap(t):null,d=!(a?.omitApiKeyAsBearer&&zp(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=await Wp(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,Ip(Ip({},r),{},{headers:a}))}};async function Wp(e,t,n){if(!Op(typeof e==`string`||e instanceof URL?e:e.url,t))return null;let r=await Ep();if(!r||!r.traceparent)return null;if(n){let e=Dp(r.traceparent);if(e&&!e.isSampled)return null}return r}function Gp(e){return typeof e==`boolean`?{enabled:e}:e}function Kp(e){return e.endsWith(`/`)?e:e+`/`}function qp(e,t){let{db:n,auth:r,realtime:i,global:a}=e,{db:o,auth:s,realtime:c,global:l}=t,u=Gp(e.tracePropagation),d=Gp(t.tracePropagation),f={db:Ip(Ip({},o),n),auth:Ip(Ip({},s),r),realtime:Ip(Ip({},c),i),storage:{},global:Ip(Ip(Ip({},l),a),{},{headers:Ip(Ip({},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 Jp(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(Kp(t))}catch{throw Error(`Invalid supabaseUrl: Provided URL is malformed.`)}}var Yp=class extends cp{constructor(e){super(e)}},Xp=class{constructor(e,t,n){this.supabaseUrl=e,this.supabaseKey=t;let r=Jp(e);if(!t)throw Error(`supabaseKey is required.`);Hp(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:vp,realtime:bp,auth:Ip(Ip({},yp),{},{storageKey:i}),global:_p,tracePropagation:xp},o=qp(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=Up(t,e,this._getSessionToken.bind(this),o.global.fetch,o.tracePropagation),this.functionsFetch=Up(t,e,this._getSessionToken.bind(this),o.global.fetch,o.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(Ip({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 jc(new URL(`rest/v1`,r).href,{headers:this.headers,schema:o.db.schema,fetch:this.fetch,timeout:o.db.timeout,urlLengthLimit:o.db.urlLengthLimit}),this.storage=new Gu(this.storageUrl.href,this.headers,this.fetch,n?.storage),o.accessToken||this._listenForAuthEvents()}get functions(){return new fc(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 Yp({url:this.authUrl.href,headers:Ip(Ip({},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 Gl(this.realtimeUrl.href,Ip(Ip({},e),{},{params:Ip(Ip({},{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)}},Zp=(e,t,n)=>
22new Xp(e,t,n);function Qp(){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}Qp()&&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 $p(){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)};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(()=>void 0)),removeItem:e=>(localStorage.removeItem(e),c(`lovable-preview-auth:remove`,e).then(()=>void 0))}}var em=e({supabase:()=>am});function tm(e){return e.startsWith(`sb_publishable_`)||e.startsWith(`sb_secret_`)}function nm(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)),tm(e)&&r.get(`Authorization`)===`Bearer ${e}`&&r.delete(`Authorization`),r.set(`apikey`,e),fetch(t,{...n,headers:r})}}function rm(){let e=`sb_publishable_qrn1PBiKJlutmMxDA2ESUQ_I5_2B0h4`;return Zp(`https://zmxjnzexyuweozjsljgr.supabase.co`,e,{global:{fetch:nm(e)},auth:{storage:$p(),persistSession:!0,autoRefreshToken:!0}})}var im,am=new Proxy({},{get(e,t,n){return im||=rm(),Reflect.get(im,t,n)}}),om=$s({type:`function`}).client(async({next:e})=>{let t;try{let{data:e}=await am.auth.getSession();if(t=e.session?.access_token,!t){let{data:e}=await am.auth.refreshSession();t=e.session?.access_token}}catch{t=void 0}return e({headers:t?{Authorization:`Bearer ${t}`}:{}})}),sm=$s(),cm=void 0,lm=tc(()=>({functionMiddleware:[om],requestMiddleware:[sm,cm]})),um=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(){}},dm=new class extends um{#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();
22this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},fm={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},pm=new class{#e=fm;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 mm(e){setTimeout(e,0)}var hm=typeof window>`u`||`Deno`in globalThis;function gm(){}function _m(e,t){return typeof e==`function`?e(t):e}function vm(e){return typeof e==`number`&&e>=0&&e!==1/0}function ym(e,t){return Math.max(e+(t||0)-Date.now(),0)}function bm(e,t){return typeof e==`function`?e(t):e}function xm(e,t){return typeof e==`function`?e(t):e}function Sm(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==wm(o,t.options))return!1}else if(!Em(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 Cm(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Tm(t.options.mutationKey)!==Tm(a))return!1}else if(!Em(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function wm(e,t){return(t?.queryKeyHashFn||Tm)(e)}function Tm(e){return JSON.stringify(e,(e,t)=>jm(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Em(e,t){if(e===t)return!0;if(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(!Em(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Em(e[r],t[r]))return!1;return!0}return!1}var Dm=Object.prototype.hasOwnProperty;function Om(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Am(e)&&Am(t);if(!r&&!(jm(e)&&jm(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:Dm.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Om(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function km(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Am(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jm(e){if(!Mm(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Mm(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Mm(e){return Object.prototype.toString.call(e)===`[object Object]`}function Nm(e){return new Promise(t=>{pm.setTimeout(t,e)})}function Pm(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Om(e,t)}function Fm(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Im(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Lm=Symbol();function Rm(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Lm?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function zm(e,t){return typeof e==`function`?e(...t):!!e}function Bm(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 Vm=(()=>{let e=()=>hm;return{isServer(){return e()},setIsServer(t){e=t}}})();function Hm(){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 Um=mm;function Wm(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Um,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>
22{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 Gm=Wm(),Km=new class extends um{#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 qm(e){return Math.min(1e3*2**e,3e4)}function Jm(e){return(e??`online`)!==`online`||Km.isOnline()}var Ym=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Xm(e){let t=!1,n=0,r,i=Hm(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Ym(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>dm.isFocused()&&(e.networkMode===`always`||Km.isOnline())&&e.canRun(),u=()=>Jm(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??(Vm.isServer()?0:3),o=e.retryDelay??qm,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),Nm(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 Zm=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vm(this.gcTime)&&(this.#e=pm.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Vm.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(pm.clearTimeout(this.#e),this.#e=void 0)}};function Qm(e){return{onFetch:(t,n)=>{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=>{Bm(e,()=>t.signal,()=>n=!0)},u=Rm(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?Im:Fm;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?eh:$m,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:$m(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function $m(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 eh(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var th=class extends Zm{#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=ih(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=ih(this.options);e.data!==void 0&&(this.setState(rh(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Pm(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;
22return this.#a?.cancel(e),t?t.then(gm).catch(gm):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=>xm(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Lm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>bm(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:!ym(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)})},i=()=>{let e=Rm(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`?Qm(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=Xm({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Ym&&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 Ym){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,...nh(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...rh(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;
vendor: 4,112 bytes, line 22
22return{...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),Gm.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function nh(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Jm(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function rh(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ih(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 ah=class extends Zm{#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||oh(),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=Xm({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)});let 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,isPau
22sed:!1,status:`error`}}};this.state=t(this.state),Gm.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function oh(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var sh=class extends um{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 ah({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=ch(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=ch(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=ch(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=ch(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>
vendor: 4,118 bytes, line 22
22t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Gm.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=>Cm(t,e))}findAll(e={}){return this.getAll().filter(t=>Cm(e,t))}notify(e){Gm.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Gm.batch(()=>Promise.all(e.map(e=>e.continue().catch(gm))))}};function ch(e){return e.options.scope?.id}var lh=class extends um{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??wm(r,t),a=this.get(i);return a||(a=new th({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(){Gm.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=>Sm(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Sm(e,t)):t}notify(e){Gm.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Gm.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Gm.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},uh=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new lh,this.#t=e.mutationCache||new sh,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=dm.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Km.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(bm(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=_m(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Gm.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;Gm.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Gm.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Gm.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(gm).catch(gm)}invalidateQueries(e,t={}){return Gm.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=Gm.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(gm)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(gm)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(bm(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}
22prefetchQuery(e){return this.fetchQuery(e).then(gm).catch(gm)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(gm).catch(gm)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Km.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(Tm(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Em(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Tm(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Em(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||=wm(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===Lm&&(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()}},dh=R.createContext(void 0),fh=e=>{let t=R.useContext(dh);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},ph=({client:e,children:t})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,z.jsx)(dh.Provider,{value:e,children:t})),mh=`/assets/styles-Dtk3vGBH.css`,hh=t(a(),1);function gh(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var _h=e=>{switch(e){case`success`:return bh;case`info`:return Sh;case`warning`:return xh;case`error`:return Ch;default:return null}},vh=Array(12).fill(0),yh=({visible:e,className:t})=>R.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},R.createElement(`div`,{className:`sonner-spinner`},vh.map((e,t)=>R.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),bh=R.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},R.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),xh=R.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},R.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),Sh=R.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},R.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),Ch=R.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},R.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),wh=R.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,
22width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},R.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),R.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),Th=()=>{let[e,t]=R.useState(document.hidden);return R.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},Eh=1,Dh=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:Eh++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0||e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>
22this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],R.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(kh(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!R.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!R.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!R.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!R.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||Eh++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Oh=(e,t)=>{let n=t?.id||Eh++;return Dh.addToast({title:e,...t,id:n}),n},kh=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,Ah=Object.assign(Oh,{success:Dh.success,info:Dh.info,warning:Dh.warning,error:Dh.error,custom:Dh.custom,message:Dh.message,promise:Dh.promise,dismiss:Dh.dismiss,loading:Dh.loading},{getHistory:()=>Dh.toasts,getToasts:()=>Dh.getActiveToasts()});gh(`
vendor: 14,859 bytes, line 22
22[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
22`);function jh(e){return e.label!==void 0}var Mh=3,Nh=`24px`,Ph=`16px`,Fh=4e3,Ih=356,Lh=14,Rh=45,zh=200;function Bh(...e){return e.filter(Boolean).join(` `)}function Vh(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var Hh=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:ee,classNames:S,icons:C,closeButtonAriaLabel:te=`Close toast`}=e,[ne,re]=R.useState(null),[ie,ae]=R.useState(null),[oe,se]=R.useState(!1),[ce,le]=R.useState(!1),[ue,w]=R.use
22State(!1),[E,de]=R.useState(!1),[fe,pe]=R.useState(!1),[me,he]=R.useState(0),[ge,_e]=R.useState(0),ve=R.useRef(n.duration||y||Fh),ye=R.useRef(null),D=R.useRef(null),be=c===0,xe=c+1<=o,O=n.type,Se=n.dismissible!==!1,k=n.className||``,Ce=n.descriptionClassName||``,we=R.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),Te=R.useMemo(()=>n.closeButton??p,[n.closeButton,p]),Ee=R.useMemo(()=>n.duration||y||Fh,[n.duration,y]),De=R.useRef(0),Oe=R.useRef(0),ke=R.useRef(0),Ae=R.useRef(null),[A,j]=b.split(`-`),je=R.useMemo(()=>s.reduce((e,t,n)=>n>=we?e:e+t.height,0),[s,we]),Me=Th(),Ne=n.invert||t,Pe=O===`loading`;Oe.current=R.useMemo(()=>we*x+je,[we,je]),R.useEffect(()=>{ve.current=Ee},[Ee]),R.useEffect(()=>{se(!0)},[]),R.useEffect(()=>{let e=D.current;if(e){let t=e.getBoundingClientRect().height;return _e(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),R.useLayoutEffect(()=>{if(!oe)return;let e=D.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,_e(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[oe,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Fe=R.useCallback(()=>{le(!0),he(Oe.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},zh)},[n,d,a,Oe]);R.useEffect(()=>{if(n.promise&&O===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Me?(()=>{if(ke.current<De.current){let e=new Date().getTime()-De.current;ve.current-=e}ke.current=new Date().getTime()})():ve.current!==1/0&&(De.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Fe()},ve.current)),()=>clearTimeout(e)},[u,i,n,O,Me,Fe]),R.useEffect(()=>{n.delete&&(Fe(),n.onDismiss==null||n.onDismiss.call(n,n))},[Fe,n.delete]);function Ie(){return C?.loading?R.createElement(`div`,{className:Bh(S?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":O===`loading`},C.loading):R.createElement(yh,{className:Bh(S?.loader,n?.classNames?.loader),visible:O===`loading`})}let Le=n.icon||C?.[O]||_h(O);return R.createElement(`li`,{tabIndex:0,ref:D,className:Bh(_,k,S?.toast,n?.classNames?.toast,S?.default,S?.[O],n?.classNames?.[O]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":oe,"data-promise":!!n.promise,"data-swiped":fe,"data-removed":ce,"data-visible":xe,"data-y-position":A,"data-x-position":j,"data-index":c,"data-front":be,"data-swiping":ue,"data-dismissible":Se,"data-type":O,"data-invert":Ne,"data-swipe-out":E,"data-swipe-direction":ie,"data-expanded":!!(u||ee&&oe),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${ce?me:Oe.current}px`,"--initial-height":ee?`auto`:`${ge}px`,...m,...n.style},onDragEnd:()=>{w(!1),re(null),Ae.current=null},onPointerDown:e=>{e.button!==2&&(Pe||!Se||(ye.current=new Date,he(Oe.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(w(!0),Ae.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(E||!Se)return;Ae.current=null;let e=Number(D.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(D.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ye.current?.getTime(),i=ne===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=Rh||a>.11){he(Oe.current),n.onDismiss==null||n.onDismiss.call(n,n),ae(ne===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Fe(),de(!0);return}else{var o,s;(o=D.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=D.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}pe(!1),w(!1),re(null)},onPointerMove:t=>{var n,r;if(!Ae.current||!Se||window.getSelection()?.toString().length>0)return;let i=t.clientY-Ae.current.y,a=t.clientX-Ae.current.x,o=e.swipeDirections??Vh(b);!ne&&(Math.abs(a)>1||Math.abs(i)>1)&&re(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(ne===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(ne===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&pe(!0),(n=D.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=D.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},Te&&!n.jsx&&O!==`loading`?R.createElement(`button`,{"aria-label":te,"data-disabled":Pe,"data-close-button":!0,onClick:Pe||!Se?()=>{}:()=>{Fe(),n.onDismiss==null||n.onDismiss.call(n,n)},className:Bh(S?.closeButton,n?.classNames?.closeButton)},C?.close??wh):null,(O||n.icon||n.promise)&&n.icon!==null&&(C?.[O]!==null||n.icon)?R.createElement(`div`,{"data-icon":``,className:Bh(S?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Ie():null,n.type===`loading`?null:Le):null,R.createElement(`div`,{"data-content":``,className:Bh(S?.content,n?.classNames?.content)},R.createElement(`div`,{"data-title":``,className:Bh(S?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?R.createElement(`div`,{"data-description":``,className:Bh(v,Ce,S?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),R.isValidElement(n.cancel)?n.c
22ancel:n.cancel&&jh(n.cancel)?R.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{jh(n.cancel)&&Se&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Fe())},className:Bh(S?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,R.isValidElement(n.action)?n.action:n.action&&jh(n.action)?R.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{jh(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&Fe())},className:Bh(S?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function Uh(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function Wh(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?Ph:Nh;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var Gh=R.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=Mh,toastOptions:g,dir:_=Uh(),gap:v=Lh,icons:y,containerAriaLabel:b=`Notifications`}=e,[x,ee]=R.useState([]),S=R.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),C=R.useMemo(()=>Array.from(new Set([i].concat(S.filter(e=>e.position).map(e=>e.position)))),[S,i]),[te,ne]=R.useState([]),[re,ie]=R.useState(!1),[ae,oe]=R.useState(!1),[se,ce]=R.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),le=R.useRef(null),ue=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),w=R.useRef(null),E=R.useRef(!1),de=R.useCallback(e=>{ee(t=>(t.find(t=>t.id===e.id)?.delete||Dh.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return R.useEffect(()=>Dh.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{ee(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{hh.flushSync(()=>{ee(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[x]),R.useEffect(()=>{if(d!==`system`){ce(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?ce(`dark`):ce(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{ce(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{ce(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),R.useEffect(()=>{x.length<=1&&ie(!1)},[x]),R.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;ie(!0),(t=le.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===le.current||le.current?.contains(document.activeElement))&&ie(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),R.useEffect(()=>{if(le.current)return()=>{w.current&&(w.current.focus({preventScroll:!0}),w.current=null,E.current=!1)}},[le.current]),R.createElement(`section`,{ref:t,"aria-label":`${b} ${ue}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},C.map((t,n)=>{let[i,a]=t.split(`-`);return S.length?R.createElement(`ol`,{key:t,dir:_===`auto`?Uh():_,tabIndex:-1,ref:le,className:c,"data-sonner-toaster":!0,"data-sonner-theme":se,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${te[0]?.height||0}px`,"--width":`${Ih}px`,"--gap":`${v}px`,...m,...Wh(l,u)},onBlur:e=>{E.current&&!e.currentTarget.contains(e.relatedTarget)&&(E.current=!1,w.current&&=(w.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`fal
22se`||E.current||(E.current=!0,w.current=e.relatedTarget)},onMouseEnter:()=>ie(!0),onMouseMove:()=>ie(!0),onMouseLeave:()=>{ae||ie(!1)},onDragEnd:()=>ie(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||oe(!0)},onPointerUp:()=>oe(!1)},S.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>R.createElement(Hh,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:ae,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:de,toasts:S.filter(e=>e.position==n.position),heights:te.filter(e=>e.position==n.position),setHeights:ne,expandByDefault:o,gap:v,expanded:re,swipeDirections:e.swipeDirections}))):null}))}),Kh=({...e})=>(0,z.jsx)(Gh,{className:`toaster group`,toastOptions:{classNames:{toast:`group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg`,description:`group-[.toast]:text-muted-foreground`,actionButton:`group-[.toast]:bg-primary group-[.toast]:text-primary-foreground`,cancelButton:`group-[.toast]:bg-muted group-[.toast]:text-muted-foreground`}},...e});function qh(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);window.__lovableReportRuntimeError?.({message:n,stack:e instanceof Error?e.stack:void 0,filename:window.location.pathname})}function Jh(){return(0,z.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-background px-4`,children:(0,z.jsxs)(`div`,{className:`max-w-md text-center`,children:[(0,z.jsx)(`h1`,{className:`text-7xl font-bold text-foreground`,children:`404`}),(0,z.jsx)(`h2`,{className:`mt-4 text-xl font-semibold text-foreground`,children:`Page not found`}),(0,z.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,z.jsx)(`div`,{className:`mt-6`,children:(0,z.jsx)(k,{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 Yh({error:e,reset:t}){console.error(e);let n=g();return(0,R.useEffect)(()=>{qh(e,{boundary:`tanstack_root_error_component`})},[e]),(0,z.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-background px-4`,children:(0,z.jsxs)(`div`,{className:`max-w-md text-center`,children:[(0,z.jsx)(`h1`,{className:`text-xl font-semibold tracking-tight text-foreground`,children:`This page didn't load`}),(0,z.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,z.jsxs)(`div`,{className:`mt-6 flex flex-wrap justify-center gap-2`,children:[(0,z.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,z.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 Xh=Cs()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1`},{name:`google-site-verification`,content:`fFPiaNbILi09h84h4JJb_FuWXej3iE3be099qRVJaQA`},{title:`Shutter Media Ltd — Large-Format Graphics & Signage`},{name:`description`,content:`Roller shutter, window, wall, vehicle and stadium graphics designed, printed and installed in-house since 2010.`},{name:`author`,content:`Shutter Media Ltd`},{property:`og:title`,content:`Shutter Media Ltd — Large-Format Graphics & Signage`},{property:`og:description`,content:`Roller shutter, window, wall, vehicle and stadium graphics designed, printed and installed in-house since 2010.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:site`,content:`@shuttermedia`},{name:`twitter:title`,content:`Shutter Media Ltd — Large-Format Graphics & Signage`},{name:`twitter:description`,content:`Roller shutter, window, wall, vehicle and stadium graphics designed, printed and installed in-house since 2010.`}],links:[{rel:`preconnect`,href:`https://fonts.googleapis.com`}
22,{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossOrigin:`anonymous`},{rel:`stylesheet`,href:`https://fonts.googleapis.com/css2?family=Anton&family=Barlow:wght@400;500;600;700&display=swap`},{rel:`stylesheet`,href:mh},{rel:`icon`,href:`/favicon.ico`,type:`image/x-icon`}]}),shellComponent:Zh,component:Qh,notFoundComponent:Jh,errorComponent:Yh});function Zh({children:e}){return(0,z.jsxs)(`html`,{lang:`en`,children:[(0,z.jsx)(`head`,{children:(0,z.jsx)(Xs,{})}),(0,z.jsxs)(`body`,{children:[e,(0,z.jsx)(Zs,{})]})]})}function Qh(){let{queryClient:e}=Xh.useRouteContext();return(0,z.jsxs)(ph,{client:e,children:[(0,z.jsx)(Ls,{}),(0,z.jsx)(Kh,{richColors:!0,position:`top-right`})]})}var $h={version:1,asset_id:`0836cbf6-cfd6-463a-aecd-7bd38784a251`,project_id:`a41e84e5-0511-4d13-a54a-76f7368759fe`,url:`/__l5e/assets-v1/0836cbf6-cfd6-463a-aecd-7bd38784a251/hero-poster-albemarle-bond.jpg`,r2_key:`a/v1/a41e84e5-0511-4d13-a54a-76f7368759fe/0836cbf6-cfd6-463a-aecd-7bd38784a251/hero-poster-albemarle-bond.jpg`,original_filename:`hero-poster-albemarle-bond.jpg`,size:1230791,content_type:`image/png`,created_at:`2026-07-30T18:52:05Z`},eg=`Shutter Media Ltd`,tg=[`Middlesbrough`,`Stockton-on-Tees`,`Darlington`,`Teesside`,`Durham`,`Newcastle upon Tyne`,`Sunderland`,`North East England`,`Yorkshire`,`Scotland`,`Wales`,`Northern Ireland`,`Belfast`,`Republic of Ireland`,`Dublin`,`UK & Ireland`],ng={"@context":`https://schema.org`,"@type":`Organization`,"@id":`${j}/#organization`,name:eg,alternateName:[`Shutter Media`,`Shutter Media UK`,`shuttermedia.co.uk`],url:j,logo:{"@type":`ImageObject`,"@id":`${j}/#logo`,url:`${j}/__l5e/assets-v1/fd014148-48da-4cfd-9248-a122f6ead5cb/shutter-media-logo.png`},image:{"@id":`${j}/#logo`},email:A.email,telephone:`+447763141533`,foundingDate:`2010`,address:{"@type":`PostalAddress`,addressLocality:`Middlesbrough`,addressRegion:`North Yorkshire`,addressCountry:`GB`},areaServed:tg.map(e=>({"@type":`Place`,name:e})),contactPoint:[{"@type":`ContactPoint`,contactType:`sales`,telephone:`+447763141533`,email:A.email,areaServed:`GB`,availableLanguage:`English`}],makesOffer:[{name:`Shutter graphics`,path:`/shutter-graphics`},{name:`Roller shutter graphics`,path:`/roller-shutter-graphics`},{name:`Shutter advertising`,path:`/shutter-advertising`},{name:`Shutter wraps`,path:`/shutter-wraps`},{name:`Window graphics`,path:`/window-graphics`},{name:`Street furniture wraps`,path:`/street-furniture-wraps`},{name:`Vinyl graphics`,path:`/vinyl-graphics`}].map(e=>({"@type":`Offer`,itemOffered:{"@type":`Service`,"@id":`${j}${e.path}#service`,name:e.name,url:`${j}${e.path}`}})),description:`Shutter Media Ltd designs, prints and installs roller shutter graphics, shutter advertising, shutter wraps, window graphics, street furniture wraps and large-format vinyl graphics across the UK and Ireland.`,sameAs:[A.facebook,A.instagram,A.twitter]},rg={"@context":`https://schema.org`,"@type":`LocalBusiness`,"@id":`${j}/#localbusiness`,name:eg,url:j,email:A.email,telephone:`+447763141533`,priceRange:`££`,foundingDate:`2010`,address:{"@type":`PostalAddress`,addressLocality:`Middlesbrough`,addressRegion:`North Yorkshire`,addressCountry:`GB`},areaServed:tg.map(e=>({"@type":`Place`,name:e})),knowsAbout:[`Roller shutter graphics`,`Roller shutter wraps`,`Roller shutter vinyl`,`Shop shutter graphics`,`Shopfront graphics`,`Window graphics`,`Window manifestation`,`Wall graphics`,`Commercial signage`,`Large format printing`,`Printed hoardings`,`Football stadium graphics`,`Vehicle graphics`,`Printed banners`,`Wayfinding signage`,`Outdoor advertising`,`Out-of-home advertising`,`Street advertising`,`Urban advertising`,`Street furniture advertising`,`Building wraps`],sameAs:[A.facebook,A.instagram,A.twitter]};function ig(e){return{"@context":`https://schema.org`,"@type":`BreadcrumbList`,itemListElement:e.map((e,t)=>({"@type":`ListItem`,position:t+1,name:e.name,item:`${j}${e.path}`}))}}function ag(e,t,n){return{"@context":`https://schema.org`,"@type":`ImageGallery`,name:e,url:t,associatedMedia:n.slice(0,24).map(e=>({"@type":`ImageObject`,contentUrl:e.src.startsWith(`http`)?e.src:`${j}${e.src}`,name:e.alt,description:e.alt,creator:{"@type":`Organization`,name:eg}}))}}function og(e){return{"@context":`https://schema.org`,"@type":`FAQPage`,mainEntity:e.map(e=>
22({"@type":`Question`,name:e.q,acceptedAnswer:{"@type":`Answer`,text:e.a}}))}}var sg=()=>$(()=>import(`./routes-BBbVUaAo.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),cg=`Roller Shutter Graphics & Shutter Advertising UK | Shutter Media`,lg=`Specialist UK roller shutter graphics, shutter advertising and shutter wraps. Design, large-format print and nationwide installation by Shutter Media since 2010.`,ug=ke.find(e=>e.src.startsWith(`http`))?.src??``,dg=B(`/`)({head:()=>({meta:[{title:cg},{name:`description`,content:lg},{property:`og:title`,content:cg},{property:`og:description`,content:lg},{property:`og:type`,content:`website`},{property:`og:url`,content:j},{property:`og:image`,content:ug},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:image`,content:ug}],links:[{rel:`canonical`,href:j},{rel:`preload`,as:`image`,href:$h.url,fetchPriority:`high`}],scripts:[{type:`application/ld+json`,children:JSON.stringify(ng)},{type:`application/ld+json`,children:JSON.stringify({...rg,description:lg,hasOfferCatalog:{"@type":`OfferCatalog`,name:`Large format graphics and signage services`,itemListElement:De.map(e=>({"@type":`Offer`,itemOffered:{"@type":`Service`,name:e.label,description:e.short,url:`${j}/services/${e.slug}`}}))}})},{type:`application/ld+json`,children:JSON.stringify(ig([{name:`Home`,path:`/`}]))}]}),component:V(sg,`component`)}),fg=B(`/$`)({loader:({params:e})=>{let t=e._splat??``;if(t.endsWith(`.html`)||t.includes(`.html/`))throw xe({to:`/`});if(t===`projects`||t.startsWith(`projects/`))throw xe({to:`/work`,statusCode:301})},head:()=>({meta:[{title:`Page not found — Shutter Media`},{name:`description`,content:`Sorry, we couldn't find that page. Browse Shutter Media's shutter graphics, shopfront branding and outdoor advertising portfolio.`},{name:`robots`,content:`noindex, follow`}]}),component:V(()=>$(()=>import(`./_-D8lzNAFZ.js`),__vite__mapDeps([9,1,2,3,4,5,6,7])),`component`)}),pg=B(`/_authenticated`)({beforeLoad:async()=>{let{data:e,error:t}=await am.auth.getUser();if(t||!e.user)throw xe({to:`/auth`});let{data:n}=await am.from(`user_roles`).select(`role`).eq(`user_id`,e.user.id),r=(n??[]).some(e=>e.role===`admin`),i=r||(n??[]).some(e=>e.role===`staff`);if(!i)try{let{claimFirstAdmin:e}=await $(async()=>{let{claimFirstAdmin:e}=await import(`./access.functions-T59hQD-s.js`);return{claimFirstAdmin:e}},__vite__mapDeps([10,11,12,13])),t=await e();i=!!t?.granted,r=!!t?.isAdmin}catch{}if(!i)throw xe({to:`/auth`,search:{denied:!0}});return{user:e.user,isAdmin:r}},component:V(()=>$(()=>import(`./route-DzHh-ixE.js`),__vite__mapDeps([14,1,2])),`component`)}),mg=()=>$(()=>import(`./about-BpQAmQtS.js`),__vite__mapDeps([15,1,2,3,4,5,6,7,8])),hg=`About Shutter Media — 15 Years of Large-Format Graphics`,gg=`Meet the Teesside team designing, printing and installing shutter, window, wall, stadium and vehicle graphics across the UK since 2010.`,_g=B(`/about`)({head:()=>({meta:[{title:hg},{name:`description`,content:gg},{property:`og:title`,content:hg},{property:`og:description`,content:gg},{property:`og:type`,content:`website`},{property:`og:url`,content:`${j}/about`},{name:`twitter:card`,content:`summary_large_image`}],links:[{rel:`canonical`,href:`${j}/about`}],scripts:[{type:`application/ld+json`,children:JSON.stringify({...ng,description:gg})},{type:`application/ld+json`,children:JSON.stringify(ig([{name:`Home`,path:`/`},{name:`About`,path:`/about`}]))}]}),component:V(mg,`component`)}),vg=B(`/about.html`)({loader:()=>{throw xe({to:`/`})}}),yg=B(`/auth`)({head:()=>({meta:[{title:`Staff sign in — Shutter Media`},{name:`description`,content:`Secure sign in for Shutter Media staff to manage quotations.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Staff sign in — Shutter Media`},{property:`og:description`,content:`Secure sign in for Shutter Media staff.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),validateSearch:e=>e.denied===!0||e.denied===`true`?{denied:!0}:{},component:V(()=>$(()=>import(`./auth-B4xxnUP6.js`),__vite__mapDeps([16,2,1,17,5,7,18,19,10,11,12,13,20,21,22,4,23])),`component`)}),bg=()=>$(()=>import(`./contact-I6Zg_W2D.js`),__vite__mapDeps([24,1,2])),xg=`Contact Shutter Media | Graphics & Signage Quotes`,Sg=`Request a quote for roller shutter graphics, window and wall coverings, signage, hoardings or vehicle wraps. Call 07763 141533 today.`,Cg=B(`/contact`)({head:()=>({meta:[{title:xg},{name:`description`,content:Sg},{property:`og:title`,content:xg},{property:`og:description`,content:Sg},{property:`og:type`,content:`website`},{property:`og:url`,content:`${j}/contact`},{name:`twitter:card`,content:`summary_large_image`}],links:[{rel:`canonical`,href:`${j}/contact`}],scripts:[{type:`application/ld+json`,children:JSON.stringify(ig([{name:`Home`,path:`/`},{name:`Contact`,path:`/contact`}]))},{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`ContactPage`,name:xg,url:`${j}
22/contact`,mainEntity:{"@type":`LocalBusiness`,name:`Shutter Media Ltd`,telephone:`+447763141533`,email:A.email,areaServed:`United Kingdom`}})}]}),component:V(bg,`component`)}),wg=B(`/contact.html`)({loader:()=>{throw xe({to:`/contact`})}}),Tg=[{q:`What is outdoor advertising?`,a:`Outdoor advertising — also called out-of-home (OOH) advertising — is any brand message seen in public space: billboards, posters, street furniture, hoardings, banners, vehicle graphics and printed roller shutters. Shutter Media produces the printed formats that sit on your own building rather than on rented poster sites.`},{q:`How is street advertising different from a billboard?`,a:`Billboard space is rented by the fortnight and shared with other brands. Street-level advertising on your own shutter, hoarding or frontage runs 24 hours a day for years at a one-off cost, and reaches people at the exact point they can walk in.`},{q:`What does urban advertising cost?`,a:`A printed roller shutter or hoarding is priced by size, so a single shopfront usually costs less than one month of comparable billboard space and lasts five to seven years. Send a photo, the width and the number of slats for a same-day quote.`},{q:`Do you cover the whole of the UK and Ireland?`,a:`Yes. We are based in Middlesbrough and install across Teesside and the North East, plus nationwide UK rollouts, Scotland, Wales, Northern Ireland and the Republic of Ireland.`},{q:`Do outdoor graphics need planning permission?`,a:`Graphics printed onto an existing shutter, hoarding or window are usually treated as decoration rather than new advertising structures, but conservation areas and listed buildings have their own rules — always check with the local authority first.`}],Eg=()=>$(()=>import(`./outdoor-advertising-CJ5KvzGH.js`),__vite__mapDeps([25,1,2,3,4,5,6,7,8])),Dg=`/outdoor-advertising`,Og=`${j}${Dg}`,kg=`Outdoor & Street Advertising UK | Shutter Media`,Ag=`Outdoor, urban and street advertising you own outright — printed roller shutters, hoardings, banners and building wraps installed across the UK and Ireland.`,jg=B(`/outdoor-advertising`)({head:()=>{let e=Ee(`shutter-graphics`).find(e=>e.src.startsWith(`http`))?.src;return{meta:[{title:kg},{name:`description`,content:Ag},{name:`keywords`,content:`outdoor advertising, outdoor advertising uk, street advertising, urban advertising, out of home advertising, shutter advertising, street level advertising, outdoor advertising ideas, retail outdoor advertising, outdoor advertising ireland, hoarding advertising, building wrap advertising`},{property:`og:title`,content:kg},{property:`og:description`,content:Ag},{property:`og:type`,content:`website`},{property:`og:url`,content:Og},{name:`twitter:card`,content:`summary_large_image`},...e?[{property:`og:image`,content:e},{name:`twitter:image`,content:e}]:[]],links:[{rel:`canonical`,href:Og}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`Service`,name:`Outdoor, urban and street advertising`,serviceType:`Out-of-home advertising production and installation`,description:Ag,url:Og,areaServed:[`United Kingdom`,`Ireland`],provider:{"@type":`Organization`,name:eg,url:j}})},{type:`application/ld+json`,children:JSON.stringify(ig([{name:`Home`,path:`/`},{name:`Outdoor advertising`,path:Dg}]))},{type:`application/ld+json`,children:JSON.stringify(og(Tg))}]}},component:V(Eg,`component`)}),Mg=`/assets/weathered-roller-shutter-before-BC_NhLY3.jpg`,Ng=`/assets/roller-shutter-respray-technicians-hero-Bmy20h2p.jpg`,Pg=`/assets/retail-shutter-colour-finishes-Bd7-CFAO.jpg`,Fg=`/assets/industrial-roller-shutter-spraying-DpdNxKR8.jpg`,Ig={ver
22sion:1,asset_id:`9f0ef628-d7bf-4e58-b32b-9ad49f5d21b7`,project_id:`a41e84e5-0511-4d13-a54a-76f7368759fe`,url:`/__l5e/assets-v1/9f0ef628-d7bf-4e58-b32b-9ad49f5d21b7/shutter-respray-spraying.jpg`,r2_key:`a/v1/a41e84e5-0511-4d13-a54a-76f7368759fe/9f0ef628-d7bf-4e58-b32b-9ad49f5d21b7/shutter-respray-spraying.jpg`,original_filename:`shutter-respray-spraying.jpg`,size:226916,content_type:`image/jpeg`,created_at:`2026-08-30T14:50:04Z`},Lg={version:1,asset_id:`21ee906c-a60e-4249-8527-c0834a572552`,project_id:`a41e84e5-0511-4d13-a54a-76f7368759fe`,url:`/__l5e/assets-v1/21ee906c-a60e-4249-8527-c0834a572552/shutter-respray-after.jpg`,r2_key:`a/v1/a41e84e5-0511-4d13-a54a-76f7368759fe/21ee906c-a60e-4249-8527-c0834a572552/shutter-respray-after.jpg`,original_filename:`shutter-respray-after.jpg`,size:233262,content_type:`image/jpeg`,created_at:`2026-08-30T14:50:07Z`},Rg={version:1,asset_id:`d5ab6e29-bae5-4c91-ab28-2708da0f0f58`,project_id:`a41e84e5-0511-4d13-a54a-76f7368759fe`,url:`/__l5e/assets-v1/d5ab6e29-bae5-4c91-ab28-2708da0f0f58/anti-graffiti-coating-spray.jpg`,r2_key:`a/v1/a41e84e5-0511-4d13-a54a-76f7368759fe/d5ab6e29-bae5-4c91-ab28-2708da0f0f58/anti-graffiti-coating-spray.jpg`,original_filename:`anti-graffiti-coating-spray.jpg`,size:259836,content_type:`image/jpeg`,created_at:`2026-08-30T15:01:52Z`},zg={title:`Roller Shutter Resprays UK | On-Site Shutter Painting | Shutter Media`,description:`Professional roller shutter resprays and on-site shutter painting for retail, commercial and industrial premises. Preparation, colour coating and anti-graffiti options from £400.`},Bg=[{name:`Anthracite Grey`,code:`RAL 7016`,swatch:`respray-swatch-anthracite`,preview:`respray-preview-anthracite`},{name:`Jet Black`,code:`RAL 9005`,swatch:`respray-swatch-black`,preview:`respray-preview-black`},{name:`Traffic White`,code:`RAL 9016`,swatch:`respray-swatch-white`,preview:`respray-preview-white`},{name:`Moss Green`,code:`RAL 6005`,swatch:`respray-swatch-green`,preview:`respray-preview-green`},{name:`Gentian Blue`,code:`RAL 5010`,swatch:`respray-swatch-blue`,preview:`respray-preview-blue`},{name:`Traffic Red`,code:`RAL 3020`,swatch:`respray-swatch-red`,preview:`respray-preview-red`}],Vg=[[`01`,`Survey`,`We assess the shutter type, coating condition, access, size and surrounding surfaces.`],[`02`,`Clean`,`The curtain and guides are degreased and cleaned so the new coating can bond correctly.`],[`03`,`Prepare`,`Loose paint and corrosion are removed, sound edges are feathered, and exposed areas are treated.`],[`04`,`Mask`,`Windows, brickwork, signage, pavements and nearby property are carefully protected.`],[`05`,`Spray`,`A suitable primer and topcoat system is applied in controlled, even passes on site.`],[`06`,`Inspect`,`Masking is removed, the finish is checked and the shutter is tested before handover.`]],Hg=[{q:`Can roller shutters be resprayed on site?`,a:`Yes. Most sound retail and industrial roller shutters can be prepared, masked and spray coated in place, avoiding the disruption and cost of replacement.`},{q:`How much does a roller shutter respray cost?`,a:`Prices start from £400. The final quotation depends on shutter size, condition, preparation, access, location, colour and any anti-graffiti finish.`},{q:`Can you spray a rusty or flaking shutter?`,a:`Often, yes. Loose coating and surface corrosion must first be removed and treated. We assess whether the curtain is sound enough to coat before quoting.`},{q:`Which colours are available?`,a:`A broad range of RAL and BS colours can be specified. Screen previews are illustrative; the final colour is confirmed from a physical reference before work begins.`},{q:`Can you add anti-graffiti protection?`,a:`Yes. A compatible clear anti-graffiti coating can be applied over a cured colour coat where easier removal of future tagging is required.`},{q:`Do you respray industrial roller doors?`,a:`Yes. We quote for retail shutters, commercial security shutters and larger industrial roller doors, subject to survey, access and coating condition.`},{q:`Can you work outside normal trading hours?`,a:`Where site access and conditions allow, work can be planned around trading or operational requirements. Timing is agreed as part of the quotation.`},{q:`Can graphics be fitted after a respray?`,a:`Yes. Once the coating has fully cured, a sound resprayed surface can be used as the base for suitable roller shutter graphics or branding.`}],Ug={hero:{src:Ng,alt:`Illustrative view of technicians spray coating a masked industrial roller shutter`,type:`Illustrative service visual`},before:{src:Mg,alt:`Illustrative weathered roller shutter with faded and flaking coating before preparation`,type:`Illustrative service visual`},retail:{src:Pg,alt:`Illustrative retail roller shutters shown in anthracite, blue and green coating finishes`,type:`Illustrative colour visual`},industrial:{src:Fg,alt:`Illustrative industrial roller shutter being spray coated blue on site`,type:`Illustrative service visual`},spraying:{src:Ig.url,alt:`Roller shutter respray application with surrounding surfaces masked`,type:`Existing service image`},after:{src:Lg.url,alt:`Roller shutter shown with a clean, even finish after respraying`,type:`Existing service image`},antiGraffiti:{src:Rg.url,alt:`Clear anti-graffiti coating being spray applied after a colour respray`,type:`Existing service image`}},Wg=[Ug.spraying,Ug.after,Ug.antiGraffiti,Ug.hero,Ug.retail,Ug.industrial],Gg=[{q:`What is a roller shutter respray?`,a:`A roller shutter respray is the on-site preparation and spray coating of an existing roller shutter. The curtain is cleaned, loose paint and corrosion removed, surroundings masked, then a compatible primer and topcoat are applied to restore the finish without replacing the door.`},{q:`Who provides roller shutter resprays in the UK?`,a:`Shutter Media Ltd provides commercial roller shutter resprays, roller shutter painting and anti-graffiti coating for retail, commercial and industrial premises, with installation teams working nationwide from a North East England base.`},{q:`When is respraying better than replacement?`,a:`Where the curtain, guides and mechanism are structurally sound, respraying restores appearance for a fraction of the disruption of replacement, and can be planned around trading hours.`},{q:`What does a roller shutter respray cost?`,a:`Roller shutter respray prices start from £400. Final cost depends on shutter size, coating condition, preparation required, access, location, colour and whether an anti-graffiti finish is specified.`}],Kg=[`Roller shutter respray`,`Roller shutter painting`,`Roller shutter spraying`,`Shutter respray`,`Shopfront shutter painting`,`Industrial roller door respraying`,`Security shutter repainting`,`Anti-graffiti shutter coating`],qg=()=>$(()=>import(`./roller-shutter-resprays-zU_2-3pA.js`),__vite__mapDeps([26,2,1,3,4,5,6,7,11,12,27,28,29,30,31,32,33,19,34,13,20,21,22,35])),Jg=`${j}/roller-shutter-resprays`,Yg={"@context":`https://schema.org`,"@type":`Service`,"@i
22d":`${Jg}#service`,name:`Roller Shutter Resprays UK`,alternateName:[`Roller Shutter Painting`,`Roller Shutter Spray Painting`,`Industrial Roller Door Respraying`],description:zg.description,url:Jg,provider:{"@id":`${j}/#organization`},areaServed:tg.map(e=>({"@type":`Place`,name:e})),serviceType:`On-site roller shutter preparation and spray coating`,offers:{"@type":`Offer`,priceCurrency:`GBP`,price:`400`,description:`Indicative starting price; final quotation depends on size, condition, access, location and specification.`,availability:`https://schema.org/InStock`},sameAs:[`https://rollershutterresprays.co.uk/`]},Xg={"@context":`https://schema.org`,"@type":`WebPage`,"@id":`${Jg}#webpage`,url:Jg,name:zg.title,description:zg.description,inLanguage:`en-GB`,alternateName:Kg.slice(),isPartOf:{"@type":`WebSite`,"@id":`${j}/#website`,url:j,name:`Shutter Media`},about:{"@id":`${Jg}#service`},primaryImageOfPage:{"@type":`ImageObject`,contentUrl:`${j}${Ug.hero.src}`,caption:Ug.hero.alt},mainEntity:{"@type":`ItemList`,itemListElement:Gg.map((e,t)=>({"@type":`ListItem`,position:t+1,name:e.q,description:e.a}))}},Zg={"@context":`https://schema.org`,"@type":`HowTo`,"@id":`${Jg}#process`,name:`How a roller shutter is resprayed on site`,description:`The six-stage on-site preparation and spray coating process Shutter Media follows when respraying a roller shutter.`,totalTime:`P1D`,estimatedCost:{"@type":`MonetaryAmount`,currency:`GBP`,value:`400`},step:Vg.map(([e,t,n],r)=>({"@type":`HowToStep`,position:r+1,name:`${e} ${t}`,text:n}))},Qg=B(`/roller-shutter-resprays`)({head:()=>({meta:[{title:zg.title},{name:`description`,content:zg.description},{property:`og:title`,content:zg.title},{property:`og:description`,content:zg.description},{property:`og:type`,content:`website`},{property:`og:url`,content:Jg},{property:`og:image`,content:`${j}${Ug.hero.src}`},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:image`,content:`${j}${Ug.hero.src}`}],links:[{rel:`canonical`,href:Jg},{rel:`preload`,as:`image`,href:Ug.hero.src,fetchPriority:`high`}],scripts:[{type:`application/ld+json`,children:JSON.stringify(ng)},{type:`application/ld+json`,children:JSON.stringify(Yg)},{type:`application/ld+json`,children:JSON.stringify(Xg)},{type:`application/ld+json`,children:JSON.stringify(Zg)},{type:`application/ld+json`,children:JSON.stringify(ig([{name:`Home`,path:`/`},{name:`Roller Shutter Resprays`,path:`/roller-shutter-resprays`}]))},{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`FAQPage`,mainEntity:Hg.map(e=>({"@type":`Question`,name:e.q,acceptedAnswer:{"@type":`Answer`,text:e.a}}))})},{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`ImageObject`,contentUrl:`${j}${Ug.spraying.src}`,caption:Ug.spraying.alt,creator:{"@id":`${j}/#organization`}})}]}),component:V(qg,`component`)}),$g={version:1,asset_id:`c9af4479-5a42-4443-8b30-06ccac74638d`,project_id:`a41e84e5-0511-4d13-a54a-76f7368759fe`,url:`/__l5e/assets-v1/c9af4479-5a42-4443-8b30-06ccac74638d/nike-shutter-advertising-up-before-the-shutters.jpeg`,r2_key:`a/v1/a41e84e5-0511-4d13-a54a-76f7368759fe/c9af4479-5a42-4443-8b30-06ccac74638d/nike-shutter-advertising-up-before-the-shutters.jpeg`,original_filename:`nike-shutter-advertising-up-before-the-shutters.jpeg`,size:428613,content_type:`image/jpeg`,created_at:`2026-09-20T07:26:39Z`},e_={version:1,asset_id:`864a8fdf-1a80-423e-9bb4-2f7349ec774c`,project_id:`a41e84e5-0511-4d13-a54a-76f7368759fe`,url:`/__l5e/assets-v1/864a8fdf-1a80-423e-9bb4-2f7349ec774c/nike-shutter-advertising-early-bird.jpeg`,r2_key:`a/v1/a41e84e5-0511-4d13-a54a-76f7368759fe/864a8fdf-1a80-423e-9bb4-2f7349ec774c/nike-shutter-advertising-early-bird.jpeg`,original_filename:`nike-shutter-advertising-early-bird.jpeg`,size:438704,content_type:`image/jpeg`,created_at:`2026-09-20T07:26:46Z`},t_={version:1,asset_id:`51c47158-4a98-4520-8832-4356f435c2e2`,project_id:`a41e84e5-0511-4d13-a54a-76f7368759fe`,url:`/__l5e/assets-v1/51c47158-4a98-4520-8832-4356f435c2e2/nike-shutter-advertising-we-run-with-it.jpeg`,r2_key:`a/v1/a41e84e5-0511-4d13-
22a54a-76f7368759fe/51c47158-4a98-4520-8832-4356f435c2e2/nike-shutter-advertising-we-run-with-it.jpeg`,original_filename:`nike-shutter-advertising-we-run-with-it.jpeg`,size:506607,content_type:`image/jpeg`,created_at:`2026-09-20T07:26:52Z`},n_={version:1,asset_id:`590ccd97-129b-41af-950f-54a744edf837`,project_id:`a41e84e5-0511-4d13-a54a-76f7368759fe`,url:`/__l5e/assets-v1/590ccd97-129b-41af-950f-54a744edf837/nike-street-level-shutter-advertising.jpeg`,r2_key:`a/v1/a41e84e5-0511-4d13-a54a-76f7368759fe/590ccd97-129b-41af-950f-54a744edf837/nike-street-level-shutter-advertising.jpeg`,original_filename:`nike-street-level-shutter-advertising.jpeg`,size:439333,content_type:`image/jpeg`,created_at:`2026-09-20T07:26:58Z`},r_={version:1,asset_id:`cff0be10-5cd2-4e0b-9850-55c5b34091e3`,project_id:`a41e84e5-0511-4d13-a54a-76f7368759fe`,url:`/__l5e/assets-v1/cff0be10-5cd2-4e0b-9850-55c5b34091e3/bering-watches-shutter-advertising.jpeg`,r2_key:`a/v1/a41e84e5-0511-4d13-a54a-76f7368759fe/cff0be10-5cd2-4e0b-9850-55c5b34091e3/bering-watches-shutter-advertising.jpeg`,original_filename:`bering-watches-shutter-advertising.jpeg`,size:299260,content_type:`image/jpeg`,created_at:`2026-09-20T07:27:04Z`},i_={version:1,asset_id:`2319a296-d6ea-4f6c-bbd7-25ceb838e022`,project_id:`a41e84e5-0511-4d13-a54a-76f7368759fe`,url:`/__l5e/assets-v1/2319a296-d6ea-4f6c-bbd7-25ceb838e022/ramsdens-shutter-advertising.jpeg`,r2_key:`a/v1/a41e84e5-0511-4d13-a54a-76f7368759fe/2319a296-d6ea-4f6c-bbd7-25ceb838e022/ramsdens-shutter-advertising.jpeg`,original_filename:`ramsdens-shutter-advertising.jpeg`,size:407559,content_type:`image/jpeg`,created_at:`2026-09-20T07:27:10Z`},a_={version:1,asset_id:`a6bc2e76-de95-427c-8525-c21d39d56fff`,project_id:`a41e84e5-0511-4d13-a54a-76f7368759fe`,url:`/__l5e/assets-v1/a6bc2e76-de95-427c-8525-c21d39d56fff/hugo-boss-shutter-graphics.jpeg`,r2_key:`a/v1/a41e84e5-0511-4d13-a54a-76f7368759fe/a6bc2e76-de95-427c-8525-c21d39d56fff/hugo-boss-shutter-graphics.jpeg`,original_filename:`hugo-boss-shutter-graphics.jpeg`,size:305805,content_type:`image/jpeg`,created_at:`2026-09-20T07:27:17Z`},o_={version:1,asset_id:`975a7209-1c73-4e79-b389-a7f85d4757a1`,project_id:`a41e84e5-0511-4d13-a54a-76f7368759fe`,url:`/__l5e/assets-v1/975a7209-1c73-4e79-b389-a7f85d4757a1/just-eat-shutter-advertising.jpeg`,r2_key:`a/v1/a41e84e5-0511-4d13-a54a-76f7368759fe/975a7209-1c73-4e79-b389-a7f85d4757a1/just-eat-shutter-advertising.jpeg`,original_filename:`just-eat-shutter-advertising.jpeg`,size:348717,content_type:`image/jpeg`,created_at:`2026-09-20T07:27:24Z`},s_=[{name:`London`,coordinates:[-.1278,51.5074],siteCount:150,message:`Urban advertising where traditional billboards can’t reach.`,photoIndexes:[0,1,2],inventory:{}},{name:`Liverpool`,coordinates:[-2.9916,53.4084],siteCount:75,message:`Street-level campaigns across Liverpool’s urban neighbourhoods.`,photoIndexes:[2,4,5],inventory:{}},{name:`Manchester`,coordinates:[-2.2426,53.4808],siteCount:70,message:`Targeted urban media across Manchester’s streets and retail areas.`,photoIndexes:[1,3,0],inventory:{}},{name:`Birmingham`,coordinates:[-1.8904,52.4862],siteCount:65,message:`Shutter advertising opportunities across Birmingham’s urban centre.`,photoIndexes:[3,5,1],inventory:{}},{name:`Edinburgh`,coordinates:[-3.1883,55.9533],siteCount:60,message:`Street-level advertising opportunities across Scotland’s capital.`,photoIndexes:[4,0,2],inventory:{}},{name:`Glasgow`,coordinates:[-4.2518,55.8642],siteCount:60,message:`Urban shutter media positioned across Glasgow’s city streets.`,photoIndexes:[5,2,3],inventory:{}},{name:`Leeds`,coordinates:[-1.5491,53.8008],siteCount:55,message:`High-street and neighbourhood advertising opportunities across Leeds.`,photoIndexes:[0,4,1],inventory:{}},{name:`Newcastle`,coordinates:[-1.6178,54.9783],siteCount:50,message:`Street-level campaigns across Newcastle and its urban communities.`,photoIndexes:[1,5,3],inventory:{}},{name:`Sheffield`,coordinates:[-1.4701,53.3811],siteCount:50,message:`Targeted shutter advertising across Sheffield’s city districts.`,photoIndexes:[2,0,4],inventory:{}},{name:`Bristol`,coordinates:[-2.5879,51.4545],siteCount:50,message:`Urban media opportunities across Bristol’s high streets and neighbourhoods.`,photoIndexes:[3,1,5],inventory:{}},{name:`Cardiff`,coordinates:[-3.1791,51.4816],siteCount:45,message:`Street-level advertising opportunities across the Welsh capital.`,photoIndexes:[4,2,0],inventory:{}},{name:`Nottingham`,coordinates:[-1.1581,52.9548],siteCount:45,message:`Targeted shutter media across Nottingham’s retail streets.`,photoIndexes:[5,3,1],inventory:{}},{name:`Leicester`,coordinates:[-1.1398,52.6369],siteCount:45,message:`Urban shutter advertising across Leicester’s city communities.`,photoIndexes:[0,5,2],inventory:{}},{name:`Belfast`,coordinates:[-5.9301,54.5973],siteCount:40,message:`Street-level advertising opportunities across Belfast’s urban areas.`,photoIndexes:[1,4,3],inventory:{}}],c_=[{src:`https://live.staticflickr.com/7129/26742038201_3671057a90_b.jpg`,alt:`Hugo Boss-branded graphics installed across a closed roller shutter`,caption:`Hugo Boss-branded shutter graphics installation`},{src:`https://live.staticflickr.com/7715/26742308591_3a0350715f_b.jpg`,alt:`Mountain Dew-branded campaign graphics covering a roller shutter`,caption:`Mountain Dew-branded shutter advertising installation`},{src:`https://live.staticflickr.com/7164/26742183341_eaa7ed494d_b.jpg`,alt:`Just Eat-branded advertising graphics fitted to a shop roller shutter`,caption:`Just Eat-branded shutter graphics installation`},{src:`https://live.staticflickr.com/7421/26308520963_1ce2b0edcd_b.jpg`,alt:`Seiko-branded advertising artwork applied to a roller shutter`,caption:`Seiko-branded shutter graphics installation`},{src:`https://live.staticflickr.com/1698/23785376273_1922abd4c3_b.jpg`,alt:`Panasonic-branded roller shutter graphics in Middlesbrough`,caption:`Panasonic-branded shutter graphics, Middlesbrough`},{src:`https://live.staticflickr.com/7679/26207492853_79c7b4657e_b.jpg`,alt:`Lloyds Pharmacy-branded graphics on a closed shop shutter`,caption:`Lloyds Pharmacy-branded shutter graphics installation`},{src:$g.url,alt:`Nike Up Before the Shutters running campaign artwork across a closed takeaway roller shutter`,caption:`Nike-branded Up Before the Shutters advertising installation`},{src:e_.url,alt:`Nike Early Bird Catches the Sero Tonin campaign artwork across a closed beauty salon roller shutter`,caption:`Nike-branded Early Bird campaign shutter installation`},{src:t_.url,alt:`Nike We Run With It campaign artwork across a closed beauty salon roller shutter`,caption:`Nike-branded We Run With It shutter advertising installation`},{src:n_.url,alt:`Nike Up Before the Shutters campaign visible at street level with pedestrians passing`,caption:`Nike-branded street-level shutter advertising campaign`},{src:r_.url,alt:`Bering watches advertising artwork installed across a closed shop roller shutter`,caption:`Bering watches-branded shutter advertising installation`},{src:i_.url,alt:`Ramsdens We Buy Gold and Silver advertising artwork across a closed roller shutter`,caption:`Ramsdens-branded shutter advertising installation`},{src:a_.url,alt:`Hugo Boss watches lettering applied across a black closed roller shutter`,caption:`Hugo Boss-branded shutter graphics installation`},{src:o_.url,alt:`Just Eat order online advertising artwork across a red closed café roller shutter`,caption:`Just Eat-branded shutter advertising installation`}],l_=[{q:`What is shutter advertising?`,a:`Shutter advertising uses the large visible surface of a closed roller shutter as street-level advertising space. Campaign artwork is produced as graphics and fitted to the shutter.`},{q:`What is urban shutter advertising?`,a:`Urban shutter advertising places brand campaigns on roller shutters in the streets, neighbourhoods and retail areas where people walk, shop, work, travel, eat and socialise.`},{q:`Can you advertise on roller shutters?`,a:`Yes. A suitable roller shutter can carry printed graphics while continuing to open and close. Each proposed site must be checked before artwork and production are confirmed.`},{q:`Where is shutter advertising available in the UK?`,a:`Shutter Media discusses opportunities across the UK, including major towns and cities. Availability varies by campaign area and date, so every location request is checked rather than assumed.`},{q:`Can I target shutter advertising by postcode?`,a:`Yes. A brief can specify cities, postcodes, neighbourhoods or streets. Shutter Media then identifies suitable shutter advertising opportunities in the requested area.`},{q:`Can I request a particular street?`,a:`Yes. Include the street or area in the campaign brief. A request does not guarantee availability, but it gives the location team a precise area to investigate.`},{q:`Can shutter advertising be used for national campaigns?`,a:`Potentially. Multiple available locations can be combined for local, city-wide, multi-city or national activity. The final plan depends on the brief and confirmed site availability.`},{q:`Does Shutter Media print and install the campaign?`,a:`Yes. Shutter Media can discuss locations, prepare artwork, produce the graphics and arrange professional installation as one coordinated campaign service.`},{q:`How does roller shutter advertising work?`,a:`The advertiser supplies a brief and target area. Shutter Media identifies suitable shutters, agrees the sites, prepares campaign artwork, prints the graphics and installs them on the shutter.`},{q:`Where can I advertise on shop shutters?`,a:`Shop shutter advertising suits high streets, shopping areas, city centres, retail parades, pedestrian routes and night-time economy areas. Each proposed frontage is checked for suitability before it is offered.`},{q:`How are advertising graphics installed on roller shutters?`,a:`Printed vinyl graphics are applied to the closed shutter by an installation team, usually outside trading hours. The shutter continues to open and close as normal afterwards.`}
22,{q:`How long can a shutter advertising campaign run?`,a:`Campaign length is agreed per site. Graphics can be produced for a short burst or for a longer period, and can be removed or replaced at the end of the agreed term.`},{q:`Is shutter advertising suitable for major brands?`,a:`Yes. The Shutter Media archive includes large-format shutter installations carrying artwork for well-known brands, produced and installed to a commercial standard.`}],u_=()=>$(()=>import(`./shutter-advertising-BIasmQ5Y.js`),__vite__mapDeps([36,2,1,3,4,5,6,7,11,12,27,28,29,30,32,37,19,20,21,22,35])),d_=`Shutter Advertising UK | Roller Shutter & Urban Advertising`,f_=`Shutter advertising across the UK. Reach people at street level with high-impact roller shutter advertising, urban advertising and branded shutter graphics.`,p_=`${j}/shutter-advertising`,m_=c_[0].src,h_={"@context":`https://schema.org`,"@type":`Service`,"@id":`${p_}#service`,name:`Shutter Advertising UK`,alternateName:[`Roller Shutter Advertising`,`Urban Shutter Advertising`,`Advertising on Shop Shutters`],description:f_,url:p_,provider:{"@id":`${j}/#organization`},areaServed:{"@type":`Country`,name:`United Kingdom`},serviceType:`Street-level out-of-home advertising on roller shutters`,sameAs:[`https://shutteradvertising.co.uk/`],about:[{"@type":`Thing`,name:`Roller shutter advertising`},{"@type":`Thing`,name:`Urban advertising`},{"@type":`Thing`,name:`Out-of-home advertising`},{"@type":`Thing`,name:`High street advertising`},{"@type":`Thing`,name:`Shutter graphics`}],hasOfferCatalog:{"@type":`OfferCatalog`,name:`Shutter advertising and related graphics services`,itemListElement:[{name:`Roller shutter advertising`,path:`/shutter-advertising`},{name:`Roller shutter graphics`,path:`/roller-shutter-graphics`},{name:`Shutter graphics`,path:`/shutter-graphics`},{name:`Shutter wraps`,path:`/shutter-wraps`}].map(e=>({"@type":`Offer`,itemOffered:{"@type":`Service`,name:e.name,url:`${j}${e.path}`}}))}},g_=B(`/shutter-advertising`)({head:()=>({meta:[{title:d_},{name:`description`,content:f_},{property:`og:title`,content:d_},{property:`og:description`,content:f_},{property:`og:type`,content:`website`},{property:`og:url`,content:p_},{property:`og:image`,content:m_},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:image`,content:m_}],links:[{rel:`canonical`,href:p_}],scripts:[{type:`application/ld+json`,children:JSON.stringify(ng)},{type:`application/ld+json`,children:JSON.stringify(h_)},{type:`application/ld+json`,children:JSON.stringify(ig([{name:`Home`,path:`/`},{name:`Shutter Advertising`,path:`/shutter-advertising`}]))},{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`FAQPage`,mainEntity:l_.map(e=>({"@type":`Question`,name:e.q,acceptedAnswer:{"@type":`Answer`,text:e.a}}))})},{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`ImageGallery`,"@id":`${p_}#campaign-gallery`,name:`Shutter advertising campaign installations`,url:p_,associatedMedia:c_.map((e,t)=>({"@type":`ImageObject`,"@id":`${p_}#campaign-image-${t+1}`,contentUrl:e.src,caption:e.caption,description:e.alt,creditText:`Shutter Media Ltd`,creator:{"@id":`${j}/#organization`}}))})}]}),component:V(u_,`component`)}),__=[{slug:`shutter-graphics`,label:`Shutter Graphics`,anchor:`shutter graphics`,title:`Shutter Graphics UK — Printed Shopfront Shutters | Shutter Media`,description:`Specialist UK shutter graphics: design, large-format print and nationwide installation onto y
22our existing shopfront or security shutter. Trading since 2010.`,h1:`Shutter Graphics — Designed, Printed and Fitted to Your Existing Shutter`,lede:`Shutter graphics are printed vinyl panels applied to a closed roller shutter so the shopfront keeps working as advertising overnight. We have been printing and fitting them since 2010 from our Teesside unit, and install across the UK.`,gallery:`shutter-graphics`,sections:[{h2:`What shutter graphics are`,paragraphs:[`A shutter graphic is your artwork printed onto heavy-duty self-adhesive vinyl, laminated, then applied to the face of an existing roller shutter. Nothing is replaced and the shutter keeps operating exactly as before — the curtain rolls up into the box with the print on it.`,`Because the print sits on the outside face, the graphic is only visible when the shutter is down. That is the point: the frontage advertises the business through the hours it is closed, which for most retailers is more hours than it is open.`]},{h2:`How we build them`,paragraphs:[`Every job starts with a survey. We measure the curtain width and drop, count the slats, note the lath and locks, and photograph the frontage so artwork lines up with the profile rather than being stretched over it.`,`Print is solvent onto vandal-resistant media, finished with a UV and anti-graffiti laminate as standard on exterior work. Panels are fitted out of hours so the shop never closes for us.`],bullets:[`Free survey and measured drawing before artwork`,`Artwork proofs approved by you before anything prints`,`Vandal-resistant media, UV-stable inks, anti-graffiti laminate`,`Out-of-hours installation by our own fitters`]},{h2:`Graphics on roller shutters — what the surface allows`,paragraphs:[`A roller shutter is not a flat board. The curtain is a run of horizontal slats, each with a corrugation, and it has to roll into a box every morning. That governs how graphics are made: printed vinyl worked into the slat profile rather than stretched across it, panelled vertically, and trimmed clear of the guide rails and bottom lath.`,`Solid single-skin and insulated curtains reproduce photographic artwork cleanly. Perforated and punched curtains carry graphics well when the design is bold, because roughly a third of the face is open mesh. Lath-and-link grilles suit colour blocks, lettering or a respray rather than detailed imagery.`],bullets:[`Solid single-skin and insulated shutter curtains`,`Perforated and punched security shutters`,`Industrial and warehouse roller shutter doors`,`Grilles and pull-down gates — simplified artwork or respray`]},{h2:`Vinyl graphics for roller shutters — materials and lifespan`,paragraphs:[`Exterior shutter work is printed on polymeric self-adhesive vinyl with UV-stable inks, then laminated. The laminate does the protecting: it filters UV so colour holds, resists abrasion where the curtain meets the rails, and gives an anti-graffiti surface so tags wipe off with a solvent instead of soaking into the print.`,`Specified that way, printed shutter vinyl typically holds colour for five to seven years in UK conditions and can be washed down. Individual panels can be lifted and reprinted if a section is damaged, without redoing the whole curtain.`]},{h2:`Roller shutter advertising for retailers, brands and landlords`,paragraphs:[`Independent retail, takeaways, barbers, off-licences, pharmacies and phone shops are the everyday jobs. We also run multi-site roll-outs for national chains where every store gets the same specification and a scheduled install window, each frontage surveyed so artwork is sized to its own curtain.`,`Councils, BIDs and landlords use the same product differently — a street of blank grey shutters is a recognised problem, and printed artwork or murals is the usual remedy alongside shutter resprays and anti-graffiti coatings on the surrounding public realm.`]},{h2:`Survey, production and nationwide installation`,paragraphs:[`The order of work is the same on a single shop or a fifty-store roll-out: survey and measured drawing, artwork proof for your approval, print and laminate in our own unit on Teesside, then installation by our own fitters, normally out of hours so trading is not interrupted.`,`We install across the UK and Ireland. Shutter operation is checked before the team leaves site.`],bullets:[`Free survey: curtain width, drop, slat count, lath and locks`,`Proof approved before anything is printed`,`Printed and laminated in-house, not brokered out`,`Out-of-hours installation, UK and Ireland`]}],answers:[{q:`What are shutter graphics?`,a:`Shutter graphics are printed, laminated vinyl panels applied to the outside face of an existing roller shutter, turning a closed shopfront into full-colour signage without replacing the shutter.`},{q:`What are graphics on roller shutters made from?`,a:`Polymeric self-adhesive vinyl printed with UV-stable inks and finished with a UV and anti-graffiti laminate. The vinyl is thin and flexible enough to roll into the shutter box with the curtain.`},{q:`Can roller shutters be branded?`,a:`Yes. Any solid-curtain roller shutter can carry full-colour branding. Perforated or lath-and-link shutters can be branded too, but artwork needs simplifying because the open sections break up fine detail.`},{q:`How long do shutter graphics last?`,a:`With a UV and anti-graffiti laminate, printed shutter vinyl typically holds colour for five to seven years outdoors in the UK and can be washed or jet-washed without damage.`},{q:`Does the shutter still work normally?`,a:`Yes. The vinyl is thin and flexible, so the curtain rolls into its box as usual. We check operation before we leave site.`},{q:`Who installs shutter graphics across the UK?`,a:`Shutter Media Ltd designs, prints and installs shutter graphics from its own unit on Teesside and fits nationwide across the UK and Ireland with its own installation teams.`},{q:`Does the shutter need repainting first?`,a:`Only if the existing finish is flaking or rusty. A full shutter respray first gives the vinyl a sound surface to bond to; on a clean curtain we print straight onto it as it is.`}],related:[`roller-shutter-graphics`,`shutter-advertising`,`shutter-wraps`,`vinyl-graphics`,`window-graphics`,`street-furniture-wraps`]},{slug:`roller-shutter-graphics`,label:`Roller Shutter Graphics`,anchor:`roller shutter graphics`,title:`Roller Shutter Graphics & Shutter Advertising UK | Shutter Media`,description:`Specialist UK roller shutter graphics, shutter advertising and shutter wraps. Design, large-format print and nationwide installation by Shutter Media.`,h1:`Roller Shutter Graphics for Shops, Industrial Doors and Security Shutters`,lede:`This page covers the practical side: which roller shutter types take graphics, how the vinyl is applied to a slatted curtain, and what to expect from a survey through to installation.`,gallery:`shutter-graphics`,sections:[{h2:`Shutter types we print onto`,paragraphs:[`Solid single-skin and insulated lath curtains are the easiest and give the best image quality — the face is near-continuous, so photographic artwork reproduces cleanly.`,`Perforated and punched curtains carry graphics well if the design is bold; roughly a third of the face is open, so fine text and small logos get lost. Lath-and-link grilles are better suited to simple c
22olour blocks, lettering or a respray.`],bullets:[`Single-skin and insulated solid curtains`,`Perforated and punched shutters`,`Industrial and warehouse roller shutter doors`,`Security shutters, grilles and pull-down gates`]},{h2:`How vinyl is fitted to a slatted curtain`,paragraphs:[`The curtain is closed and cleaned down, and the artwork is applied in vertical panels aligned to the slat profile. Each panel is squeegeed into the corrugation of the slat rather than bridged across it, so the print does not tear or lift when the shutter rolls.`,`Edges are trimmed back from the guide rails and the bottom lath, keeping the moving parts clear. On a standard shopfront a fitting takes a few hours, usually before opening or after closing.`]},{h2:`Maintenance, damage and repairs`,paragraphs:[`Printed shutters wash with soapy water; the anti-graffiti laminate lets most spray paint come off with a solvent wipe rather than soaking into the print.`,`If a section is physically damaged, individual panels can be lifted and reprinted without redoing the whole curtain — one of the practical reasons we panel rather than wrap the face in a single sheet.`]}],answers:[{q:`How are vinyl graphics fitted to roller shutters?`,a:`The shutter is closed and cleaned, then printed vinyl is applied in vertical panels and worked into each slat profile with a squeegee. Edges are trimmed clear of the guide rails and bottom lath so the curtain still rolls freely.`},{q:`Who supplies and installs roller shutter graphics across the UK?`,a:`Shutter Media Ltd has designed, printed and installed roller shutter graphics since 2010. We manufacture in our own unit on Teesside and install nationwide across the UK and Ireland with our own fitting teams.`},{q:`Can graphics go on a perforated shutter?`,a:`Yes, but keep the artwork bold. Around a third of a perforated curtain is open mesh, so large shapes, strong colour and short text read well while fine detail does not.`},{q:`Do I need to replace my shutter first?`,a:`Rarely. If the curtain is sound we print onto it as it is. Where paint is flaking or the shutter is heavily tagged, a full respray first gives the vinyl a clean surface to bond to.`}],related:[`shutter-graphics`,`shutter-wraps`,`shutter-advertising`,`vinyl-graphics`]},{slug:`shutter-advertising`,label:`Shutter Advertising`,anchor:`shutter advertising`,title:`Shutter Advertising UK | Urban & Roller Shutter Advertising | Shutter Media`,description:`Target UK towns, cities, postcodes and streets with urban shutter advertising. Shutter Media identifies suitable spaces and coordinates graphics production and nationwide installation.`,h1:`Shutter Advertising Across the UK`,lede:`You find the streets. We find the space. Shutter Media helps advertisers explore suitable roller shutter advertising opportunities across the UK.`,gallery:`shutter-graphics`,sections:[{h2:`Why brands use shutters`,paragraphs:[`A printed shutter is bought once and displays every night, weekend and bank holiday for years. Compared with rented poster or digital sites, the cost per exposed hour on a high-street frontage is very low, and there is no ongoing media rental.`,`We have produced campaign shutters for national brands as well as one-off frontages — the same production route, scaled. Multi-site campaigns are surveyed store by store so each frontage gets artwork sized to its own curtain.`]},{h2:`Landlords, BIDs and councils`,paragraphs:[`Vacant units and tagged shutters drag a street down. Printed artwork, heritage imagery or local murals on shutters is a fast, visible intervention, often paired with a full respray and an anti-graffiti coating.`,`We work to scheme specifications, quote by frontage, and install overnight so the town centre is not disrupted.`],bullets:[`Single-site promotions and permanent branding`,`Multi-store campaign roll-outs with scheduled install windows`,`Vacant unit dressing for landlords and agents`,`Town centre and BID improvement schemes`]}],answers:[{q:`Can you advertise on roller shutters?`,a:`Yes. A closed roller shutter is a legitimate advertising surface for the occupying business, and full-colour artwork can be printed and applied to it. Third-party advertising or listed-building frontages may need consent from the local authority, which we can advise on.`}
22,{q:`Do I need planning permission for shutter advertising?`,a:`Advertising your own business on your own shopfront is usually covered by deemed consent, but conservation areas, listed buildings and third-party adverts often need express consent. We always recommend a quick check with the local planning department before print.`},{q:`What does shutter advertising cost compared with a billboard?`,a:`A printed shutter is a one-off cost with no media rental, and it typically lasts five to seven years. That normally works out far cheaper per display hour than renting comparable outdoor advertising space.`}],related:[`shutter-graphics`,`roller-shutter-graphics`,`street-furniture-wraps`,`window-graphics`]},{slug:`shutter-wraps`,label:`Shutter Wraps`,anchor:`shutter wraps`,title:`Shutter Wraps — Full Roller Shutter Wrapping UK | Shutter Media`,description:`Full shutter wraps in printed vinyl, plus shutter resprays and anti-graffiti coatings. Surveyed, produced in-house and installed nationwide by Shutter Media.`,h1:`Shutter Wraps, Resprays and Anti-Graffiti Finishes`,lede:`A shutter wrap covers the whole curtain edge to edge rather than adding a panel or a logo. This page covers wrapping, the respray alternative, and the anti-graffiti coatings that go over both.`,gallery:`shutter-graphics`,sections:[{h2:`Full wrap or printed panel?`,paragraphs:[`A full wrap suits photographic artwork, murals and anything that needs to run across the whole frontage. A panel suits a logo, an opening-hours block or a promotion that will change, because it can be lifted and replaced on its own.`,`Both use the same media and laminate. The difference is coverage and cost — a wrap is priced by the square metre of curtain, so a wide shopfront costs proportionally more.`]},{h2:`Shutter resprays`,paragraphs:[`Where a shutter is flaking, rusty or repeatedly tagged, spraying is often the better answer. The curtain is cleaned back, treated and sprayed in a single colour to a factory-style finish, which also gives a sound surface if graphics go on afterwards.`,`Resprays are done in situ, out of hours, with the frontage masked and protected.`]},{h2:`Anti-graffiti protection`,paragraphs:[`Wrapped shutters get an anti-graffiti laminate as standard. Sprayed shutters can take a clear anti-graffiti coating applied over the top coat, so tags can be removed with a solvent wipe instead of repainting.`,`On problem streets this is usually what keeps the cost of a scheme down over the following years.`]}],answers:[{q:`What is a shutter wrap?`,a:`A shutter wrap is printed vinyl applied across the full face of a roller shutter curtain, edge to edge, so the whole frontage carries the artwork rather than a single applied panel.`},{q:`Is it better to wrap or respray a roller shutter?`,a:`Wrap when you want artwork, photography or branding. Respray when the shutter is flaking, rusty or heavily tagged and you want a clean single colour — and respray first if graphics are going on a poor surface.`},{q:`Can a wrapped shutter be protected from graffiti?`,a:`Yes. Exterior wraps carry an anti-graffiti laminate as standard, and sprayed shutters can take a clear spray-on anti-graffiti coating so tags wipe off rather than soak in.`}],related:[`shutter-graphics`,`roller-shutter-graphics`,`street-furniture-wraps`,`vinyl-graphics`]},{slug:`window-graphics`,label:`Window Graphics`,anchor:`window graphics`,title:`Window Graphics & Window Advertising UK | Shutter Media`,description:`Window graphics, one-way vision, frosted manifestation and full window wraps for shops and offices. Printed and fitted nationwide by Shutter Media.`,h1:`Window Graphics, Manifestation and Window Advertising`,lede:`Glass is the other half of a shopfront. We print and fit window graphics for promotion, privacy and compliance — from cut lettering to contra-vision that lets staff see out while the street sees the campaign.`,gallery:`window-graphics`,sections:[{h2:`Materials and what each is for`,paragraphs:[`One-way vision (contra-vision) is perforated film: full-colour outside, see-through from inside. It is the standard choice for window advertising where daylight and outlook matter.`,`Frosted and etched-effect film gives privacy and satisfies manifestation requirements on large glazed areas. Clear and blockout printed films cover promotional panels and full window wraps, and cut vinyl lettering handles opening hours, phone numbers and door details.`],bullets:[`One-way vision for window advertising`,`Frosted film and manifestation to meet building regulations`,`Seasonal promotional panels, changed over quickly`,`Full shopfront window wraps and cut vinyl lettering`]},{h2:`Fitting and removal`,paragraphs:[`Windows are cleaned and the film is applied wet or dry depending on the material and size, then squeegeed out to remove trapped air. Large panes are usually a two-fitter job.`,`Promotional film is designed to come off cleanly at the end of a campaign without leaving adhesive on the glass, which matters for leased units and seasonal retail.`]}],answers:[{q:`What are window graphics?`,a:`Window graphics are printed or cut vinyl films applied to glass for advertising, branding, privacy or safety manifestation. They range from small cut lettering to a full printed window wrap.`},{q:`Can you see out through printed window graphics?`,a:`With one-way vision film, yes. It is perforated so it shows full-colour artwork outside while people inside see out, with some reduction in light.`},{q:`Do window graphics damage the glass?`,a:`No. Promotional films are removable and come away cleanly, leaving no adhesive residue when taken off correctly.`}],related:[`shutter-graphics`,`shutter-advertising`,`vinyl-graphics`]},{slug:`street-furniture-wraps`,label:`Street Furniture Wraps`,anchor:`street furniture wraps`,title:`Street Furniture Wraps — Bollards, Cabinets & Planters | Shutter Media`,description:`Printed street furniture wraps for councils and BIDs — bollard wraps, utility cabinets, planters and heritage panels, with anti-graffiti protection. UK-wide.`,h1:`Street Furniture Wraps for Councils, BIDs and Town Centres`,lede:`Bollards, cabinets, planters and signage posts are the most-touched surfaces in a town centre and usually the most neglected. Wrapping them is quicker and cheaper than replacing or repainting them on a cycle.`,gallery:`street-furniture`,sections:[{h2:`Bollard wraps`,paragraphs:[`Flaking painted bollards are a recurring maintenance cost. A printed wrap goes over the existing bollard in a heritage colour, a town crest or an illustrated design, and is finished with an anti-graffiti laminate.`,`Matt finishes suit conservation areas and heritage schemes; gloss suits modern public realm. Both are cleaned with a wipe rather than repainted.`]},{h2:`Cabinets, planters and public realm`,paragraphs:[`Utility and signal cabinets take full-colour wraps well and are a common target for tagging, so anti-graffiti protection is worth specifying from the start.`,`Planters, interpretation panels and wayfinding posts can all be wrapped to a single scheme so a street reads as one piece of work rather than a patchwork.`],bullets:[`Bollard wraps in matt or gloss, heritage or contemporary`,`Utility and signal cabinet wraps`,`Planters, interpretation boards and wayfinding`,`Anti-graffiti laminate on every exterior wrap`]}],answers:[{q:`What is a street furniture wrap?`,a:`A street furniture wrap is printed, laminated vinyl applied over existing public realm items — bollards, utility cabinets, planters and posts — to restore or rebrand them without replacing the item.`},{q:`How long do bollard wraps last outdoors?`,a:`A laminated wrap on a bollard typically lasts around five years in UK conditions, and resists the flaking and chipping that painted bollards suffer.`},{q:`Can wrapped street furniture be cleaned of graffiti?`,a:`Yes. The anti-graffiti laminate means 
22spray paint sits on the surface and can be removed with a solvent wipe instead of repainting the item.`}],related:[`shutter-advertising`,`shutter-wraps`,`vinyl-graphics`]},{slug:`vinyl-graphics`,label:`Vinyl Graphics`,anchor:`vinyl graphics`,title:`Vinyl Graphics — Large-Format Printed Vinyl UK | Shutter Media`,description:`Large-format vinyl graphics printed and installed nationwide: shutters, windows, walls, floors, vehicles and signage. In-house print since 2010.`,h1:`Vinyl Graphics — Printed, Laminated and Installed In-House`,lede:`Vinyl graphics is the underlying craft behind everything we make. This page explains the materials, the laminates and where each type belongs, so you can specify a job properly.`,gallery:`vehicle-graphics`,sections:[{h2:`Material types`,paragraphs:[`Monomeric vinyl is the economy option for short-term flat work. Polymeric is the standard for exterior signage and shutters, holding shape and colour for years. Cast vinyl is the most conformable and is what goes onto vehicle curves and rivets.`,`Cut vinyl — no print, just coloured film cut to shape — is still the cleanest option for lettering, logos and window details.`],bullets:[`Polymeric printed vinyl for shutters and exterior signage`,`Cast vinyl for vehicle graphics and complex curves`,`Anti-slip laminates for floor graphics`,`Cut coloured vinyl for lettering and logos`]},{h2:`Laminates and finishes`,paragraphs:[`The laminate does most of the protecting: UV filtering to slow fade, abrasion resistance on high-traffic surfaces, anti-graffiti on anything at street level, and matt or gloss to suit the setting.`,`Interior wall graphics often use a textured or wipe-clean laminate instead, depending on the surface being covered.`]},{h2:`Where vinyl graphics get used`,paragraphs:[`Across our own work that means roller shutters, shopfront glass, interior walls, stadium concourses, hoardings, vans and fleet livery, exhibition panels and public realm items.`,`Everything is printed in our own unit and fitted by our own installer
22s, so the same person who proofed the artwork is accountable for how it looks on the wall.`]}],answers:[{q:`What are vinyl graphics?`,a:`Vinyl graphics are designs printed onto or cut from self-adhesive vinyl film and applied to a surface — shutters, glass, walls, floors, vehicles or signage panels.`},{q:`How long do exterior vinyl graphics last?`,a:`A laminated polymeric print used outdoors in the UK typically lasts five to seven years. Cast vinyl on vehicles is similar; unlaminated short-term material is a season or two.`},{q:`Can Shutter Media install graphics nationwide?`,a:`Yes. We are based on Teesside and install across the UK and Ireland, including multi-site roll-outs scheduled around trading hours.`}],related:[`shutter-graphics`,`window-graphics`,`street-furniture-wraps`]}],v_=Object.fromEntries(__.map(e=>[e.slug,e])),y_={"shutter-graphics":`/shutter-graphics`,"window-graphics":`/window-graphics`,"street-furniture":`/street-furniture-wraps`};function b_(){return(0,z.jsxs)(`div`,{className:`flex flex-col items-start`,children:[(0,z.jsxs)(`div`,{className:`flex gap-1`,children:[(0,z.jsx)(`span`,{className:`h-1 w-6 bg-primary`}),(0,z.jsx)(`span`,{className:`h-1 w-6 bg-primary`}),(0,z.jsx)(`span`,{className:`h-1 w-6 bg-primary`})]}),(0,z.jsxs)(`span`,{className:`mt-1 font-display text-2xl leading-none tracking-tight text-foreground`,children:[`SHUTTER `,(0,z.jsx)(`span`,{className:`text-primary`,children:`MEDIA`})]})]})}function x_(){let[e,t]=(0,R.useState)(!1);return(0,z.jsxs)(`header`,{className:`sticky top-0 z-50 border-b border-border/70 bg-background/90 backdrop-blur`,children:[(0,z.jsxs)(`div`,{className:`mx-auto flex max-w-7xl items-center justify-between gap-6 px-5 py-4`,children:[(0,z.jsx)(k,{to:`/`,"aria-label":`Shutter Media home`,className:`flex items-center`,children:(0,z.jsx)(b_,{})}),(0,z.jsxs)(`nav`,{className:`hidden items-center gap-7 lg:flex`,children:[(0,z.jsx)(k,{to:`/`,activeOptions:{exact:!0},activeProps:{className:`text-primary`},className:`text-sm font-semibold uppercase tracking-[0.14em] text-muted-foreground transition-colors hover:text-primary`,children:`Home`}),(0,z.jsxs)(`div`,{className:`group relative`,children:[(0,z.jsx)(`button`,{className:`text-sm font-semibold uppercase tracking-[0.14em] text-muted-foreground transition-colors group-hover:text-primary`,children:`Services`}),(0,z.jsx)(`div`,{className:`invisible absolute left-1/2 top-full w-[34rem] -translate-x-1/2 border border-border bg-card p-3 op
22acity-0 shadow-xl transition-opacity group-hover:visible group-hover:opacity-100`,children:(0,z.jsxs)(`div`,{className:`grid grid-cols-2 gap-1`,children:[(0,z.jsx)(k,{to:`/roller-shutter-resprays`,className:`px-3 py-2 text-sm font-bold text-primary hover:bg-background`,children:`Roller Shutter Resprays`}),__.map(e=>(0,z.jsx)(k,{to:`/${e.slug}`,className:`px-3 py-2 text-sm font-semibold text-foreground hover:bg-background hover:text-primary`,children:e.label},e.slug)),De.filter(e=>!y_[e.slug]).map(e=>(0,z.jsx)(k,{to:`/services/$slug`,params:{slug:e.slug},className:`px-3 py-2 text-sm text-muted-foreground hover:bg-background hover:text-primary`,children:e.label},e.slug))]})})]}),(0,z.jsx)(k,{to:`/shutter-advertising`,activeProps:{className:`text-primary`},className:`text-sm font-bold uppercase tracking-[0.14em] text-foreground transition-colors hover:text-primary`,children:`Shutter Advertising`}),(0,z.jsx)(k,{to:`/work`,className:`text-sm font-semibold uppercase tracking-[0.14em] text-muted-foreground transition-colors hover:text-primary`,children:`Portfolio`}),(0,z.jsx)(k,{to:`/about`,className:`text-sm font-semibold uppercase tracking-[0.14em] text-muted-foreground transition-colors hover:text-primary`,children:`About`}),(0,z.jsx)(k,{to:`/contact`,className:`text-sm font-semibold uppercase tracking-[0.14em] text-muted-foreground transition-colors hover:text-primary`,children:`Contact`}),(0,z.jsx)(k,{to:`/admin`,className:`inline-flex items-center gap-1.5 rounded-md border border-primary px-3 py-1.5 text-sm font-bold uppercase tracking-[0.1em] text-primary transition-colors hover:bg-primary hover:text-primary-foreground`,children:`Admin`})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(k,{to:`/contact`,className:`inline-flex items-center bg-primary px-4 py-2 text-sm font-bold uppercase tracking-[0.1em] text-primary-foreground transition-opacity hover:opacity-90`,children:`Get a quote`}),(0,z.jsx)(`button`,{className:`text-sm font-bold uppercase tracking-[0.14em] text-muted-foreground lg:hidden`,onClick:()=>t(e=>!e),"aria-label":`Menu`,children:`Menu`})]})]}),e&&(0,z.jsx)(`div`,{className:`border-t border-border bg-card lg:hidden`,children:(0,z.jsxs)(`div`,{className:`mx-auto grid max-w-7xl grid-cols-2 gap-1 px-5 py-4`,children:[(0,z.jsx)(k,{to:`/`,onClick:()=>t(!1),className:`py-1.5 text-sm font-bold text-primary`,children:`Home`}),(0,z.jsx)(k,{to:`/shutter-advertising`,onClick:()=>t(!1),className:`col-span-2 border-y border-primary py-2 text-sm font-bold uppercase tracking-[0.1em] text-primary`,children:`Shutter Advertising`}),(0,z.jsx)(k,{to:`/roller-shutter-resprays`,onClick:()=>t(!1),className:`col-span-2 py-2 text-sm font-bold uppercase tracking-[0.1em] text-primary`,children:`Roller Shutter Resprays`}),__.map(e=>(0,z.jsx)(k,{to:`/${e.slug}`,onClick:()=>t(!1),className:`py-1.5 text-sm font-semibold text-foreground hover:text-primary`,children:e.label},e.slug)),De.filter(e=>!y_[e.slug]).map(e=>(0,z.jsx)(k,{to:`/services/$slug`,params:{slug:e.slug},onClick:()=>t(!1),className:`py-1.5 text-sm text-muted-foreground hover:text-primary`,children:e.label},e.slug)),(0,z.jsx)(k,{to:`/work`,onClick:()=>t(!1),className:`py-1.5 text-sm font-bold text-primary`,children:`Portfolio`}),(0,z.jsx)(k,{to:`/about`,onClick:()=>t(!1),className:`py-1.5 text-sm font-bold text-primary`,children:`About`}),(0,z.jsx)(k,{to:`/admin`,onClick:()=>t(!1),className:`py-1.5 text-sm font-bold uppercase tracking-[0.1em] text-primary`,children:`Admin`})]})})]})}var S_=[{slug:`middlesbrough`,name:`Middlesbrough`,region:`Teesside`,metaTitle:`Roller Shutter Graphics Middlesbrough | Shutter Media`,metaDescription:`Printed roller shutter graphics in Middlesbrough. Surveyed, printed and fitted by our own Teesside crew — shopfronts, takeaways and industrial doors.`,h1:`Roller Shutter Graphics in Middlesbrough`,intro:`Our unit is on Teesside, so Middlesbrough is home turf. Most town-centre shutters are surveyed, printed and fitted within a fortnight without the shop closing for a day.`,body:[`We have wrapped shutters right across Middlesbrough — Linthorpe Road, the Cleveland Centre fringe, Parliament Road, Acklam, Ormesby Road and the trading estates out towards Riverside Park. Independent takeaways, barbers, off-licences, phone shops and national chains all get the same build: vandal-resistant vinyl, solvent print, anti-graffiti laminate.`,`Because we are local, a Middlesbrough survey usually happens within a couple of days of your enquiry and costs nothing. We measure the curtain, count the slats, photograph the frontage and send artwork proofs before anything is printed, so what goes on the shutter is exactly what you approved.`,`Middlesbrough shutters take a hammering — night-time footfall, weather off the Tees and repeat tagging on some streets. Every exterior job leaves us with an anti-graffiti laminate as standard so spray paint wipes off rather than soaking into the print.`],nearby:[`Acklam`,`Linthorpe`,`Ormesby`,`Marton`,`Coulby Newham`,`Redcar`,`Thornaby`],logistics:`Same-week surveys, out-of-hours fitting, and a return visit for touch-ups if the shutter is damaged in its first year.`,faqs:[{q:`Do you charge for a survey in Middlesbrough?`,a:`No. Middlesbrough and the wider Teesside area are on our doorstep, so surveys are free and usually booked within two or three working days.`},{q:`Will my shop need to close while the shutter is wrapped?`,a:`No. Middlesbrough shutters are almost always fitted before opening or after closing, so you lose no trading hours.`}]},{slug:`teesside`,name:`Teesside`,region:`North East England`,metaTitle:`Roller Shutter Graphics Teesside | Stockton & Thornaby`,metaDescription:`Roller shutter graphics across Teesside — Stockton, Thornaby, Billingham, Redcar and Hartlepool. Printed and installed in-house since 2010.`,h1:`Roller Shutter Graphics across Teesside`,intro:`Stockton, Thornaby, Billingham, Redcar, Hartlepool and Yarm are all inside our normal working radius, and often covered on the same day as a Middlesbrough fit.`,body:[`Teesside high streets have a lot of shuttered frontage — Stockton High Street alone runs to hundreds of metres of it. Printed graphics turn that dead frontage into advertising that works at exactly the hours the shop is shut, which is when most people walk past.`,`We print everything in our own unit rather than buying in panels, so a run of shutters for a Teesside landlord, BID or shopping parade can be produced and fitted as one batch with consistent colour across every unit.`,`Coastal jobs in Redcar and Seaton get a heavier laminate spec: salt air and wind-blown sand strip cheap vinyl within a couple of seasons, so exposed frontages are quoted with marine-grade media as standard.`],nearby:[`Stockton-on-Tees`,`Thornaby`,`Billingham`,`Yarm`,`Redcar`,`Hartlepool`,`Guisborough`],logistics:`One crew, one van, no subcontractors — multi-unit parades are usually completed in a single overnight visit.`,faqs:[{q:`Can you do a whole parade of shops at once?`,a:`Yes. Batch runs are our most common Teesside job — every unit is printed together so the colours match, then fitted in one overnight visit.`},{q:`Do coastal shutters need a different specification?`,a:`Yes. Redcar, Saltburn and Seaton Carew frontages get marine-grade media and a heavier laminate to cope with salt air and sand abrasion.`}]}
22,{slug:`newcastle`,name:`Newcastle upon Tyne`,region:`Tyne and Wear`,metaTitle:`Roller Shutter Graphics Newcastle upon Tyne | Shutter Media`,metaDescription:`Printed roller shutter graphics in Newcastle and Gateshead. Conservation-area friendly shopfront graphics, fitted out of hours by our own installers.`,h1:`Roller Shutter Graphics in Newcastle upon Tyne`,intro:`Newcastle is a 45-minute run up the A19 for us, so Tyneside shopfronts get the same in-house survey, print and installation as work on our own doorstep.`,body:[`Newcastle has a lot of listed and conservation-area frontage — Grainger Town, Dean Street, parts of Jesmond and Gosforth. Printed shutter graphics are often the easiest consent route there, because nothing is bolted to the building: the vinyl is applied to the shutter curtain itself and can be removed without trace.`,`Late-night city-centre trade means Newcastle shutters are visible to a huge audience after closing. A wrapped shutter on Northumberland Street, Grey Street or the Bigg Market is advertising to the entire evening economy, not just daytime shoppers.`,`We fit Newcastle and Gateshead jobs at night to avoid pedestrianised-zone vehicle restrictions, which keeps the work legal, quick and out of everyone's way.`],nearby:[`Gateshead`,`Jesmond`,`Gosforth`,`Byker`,`Wallsend`,`North Shields`,`Sunderland`],logistics:`Night fits to work around pedestrian-zone access windows and city-centre loading restrictions.`,faqs:[{q:`Do I need planning permission for shutter graphics in Newcastle?`,a:`Usually not, because nothing is attached to the building fabric — but in conservation areas we always recommend a quick check with Newcastle City Council before printing, and we will supply artwork visuals for that conversation.`},{q:`How far in advance do Newcastle jobs need booking?`,a:`Typically one to two weeks from artwork approval, including the night-fit slot.`}]},{slug:`leeds`,name:`Leeds`,region:`Yorkshire`,metaTitle:`Roller Shutter Graphics Leeds & Yorkshire | Shutter Media`,metaDescription:`Roller shutter graphics in Leeds, Bradford, York and across Yorkshire. Printed in-house on Teesside and installed by our own fitting team.`,h1:`Roller Shutter Graphics in Leeds and Yorkshire`,intro:`Leeds, Bradford, York, Harrogate and Sheffield are all within a comfortable day's reach, and Yorkshire has become one of our busiest regions for multi-site retail work.`,body:[`A lot of our Yorkshire work is roll-out rather than one-off: a brand signs off one shutter design and we replicate it across a dozen stores, matching colour exactly because every panel comes off the same press.`,`Leeds city-centre arcades and the independent quarters around Call Lane and Kirkgate suit illustrated, artwork-led shutters rather than plain logos, and we work with local designers or our own studio to produce something worth photographing.`,`Out-of-town Yorkshire units — retail parks, trade counters and industrial doors — get the heavier-gauge media suited to large single-skin doors, which do not roll the same way as a small shop curtain.`],nearby:[`Bradford`,`Wakefield`,`York`,`Harrogate`,`Huddersfield`,`Sheffield`,`Hull`],logistics:`Multi-site Yorkshire roll-outs scheduled store-by-store so no location loses a trading day.`,faqs:[{q:`Can you match an existing brand colour across several Leeds stores?`,a:`Yes. We print every store's panels in one run from the same profile, so colour is consistent across the whole roll-out rather than drifting between suppliers.`},{q:`Do you cover the rest of Yorkshire?`,a:`Yes — Bradford, Wakefield, York, Harrogate, Huddersfield, Sheffield and Hull are all regular destinations.`}]},{slug:`manchester`,name:`Manchester`,region:`North West England`,metaTitle:`Roller Shutter Graphics Manchester & North West`,metaDescription:`Printed roller shutter graphics in Manchester, Liverpool and the North West. Anti-graffiti laminated shutter wraps fitted out of hours.`,h1:`Roller Shutter Graphics in Manchester`,intro:`Manchester, Salford, Stockport and Liverpool are covered on a planned North West run, usually grouped so several jobs share one trip and one mobilisation cost.`,body:[`Manchester's street-art culture cuts both ways: a well-designed shutter is respected and left alone, while a blank grey curtain in the Northern Quarter is tagged within weeks. Illustrated shutters are the most requested job we get in the city.`,`Every Manchester exterior shutter is finished with an anti-graffiti laminate, so paint, marker and paste-ups can be cleaned off with solvent without lifting the print underneath.`,`Because we group North West visits, booking alongside another job in the region reduces the travel element of the quote — worth asking about if you run more than one site.`],nearby:[`Salford`,`Stockport`,`Oldham`,`Bolton`,`Warrington`,`Liverpool`,`Chester`],logistics:`Grouped regional runs keep travel costs down for multi-site and repeat customers.`,faqs:[{q:`Will graffiti ruin a printed shutter in Manchester?`,a:`N
22ot with the right finish. Our anti-graffiti laminate lets spray paint be removed with solvent and a cloth, and a well-designed illustrated shutter is far less likely to be tagged in the first place.`},{q:`Do you travel to Liverpool too?`,a:`Yes — Liverpool, Chester and the wider North West are covered on the same planned runs as Manchester.`}]},{slug:`london`,name:`London`,region:`Greater London`,metaTitle:`Roller Shutter Graphics London | Shopfront Shutter Wraps`,metaDescription:`Roller shutter graphics for London shopfronts. Night installs inside congestion and ULEZ zones, anti-graffiti laminate, artwork proofs before print.`,h1:`Roller Shutter Graphics in London`,intro:`London shutters are printed at our Teesside unit and fitted on scheduled capital visits, almost always overnight to work around loading bans and congestion charging.`,body:[`Shopfronts in London carry the highest passing footfall in the country, and most of that footfall walks past after the shutter is down. Wrapping the curtain converts hours the shop is closed into brand exposure that costs nothing per impression once it is up.`,`Compared with buying outdoor advertising space in London, a printed shutter is a one-off cost on frontage you already pay rent for. That comparison is the single most common reason London retailers call us.`,`We plan installs around ULEZ, congestion charge hours and borough loading restrictions, and we can supply artwork visuals if your landlord or a conservation officer wants sight of the design first.`],nearby:[`Croydon`,`Ilford`,`Wembley`,`Camden`,`Hackney`,`Romford`,`Watford`],logistics:`Overnight fits inside the congestion zone; landlord and conservation visuals supplied on request.`,faqs:[{q:`Is shutter advertising cheaper than an outdoor advertising site in London?`,a:`Almost always. A printed shutter is a one-off cost on frontage you already rent, and it works every night for years — where paid outdoor sites in London are charged monthly.`},{q:`Can you fit inside the congestion charge zone?`,a:`Yes. Central London jobs are fitted overnight and priced with congestion, ULEZ and loading restrictions already included.`}]},{slug:`belfast`,name:`Belfast`,region:`Northern Ireland`,metaTitle:`Roller Shutter Graphics Belfast & Northern Ireland`,metaDescription:`Shutter graphics in Belfast and across Northern Ireland. Printed on Teesside, shipped and installed by our own crew — retail, hospitality and community murals.`,h1:`Roller Shutter Graphics in Belfast`,intro:`Belfast and the rest of Northern Ireland are covered on planned island visits — panels are printed here, shipped, and installed by our own fitters rather than handed to a local subcontractor.`,body:[`Belfast has a strong appetite for illustrated and community-led shutter artwork, and we have printed everything from straightforward retail branding to full mural-style frontages that run the length of a terrace.`,`Northern Ireland trips are planned around a batch of work, so if you are one of several businesses on the same street it is worth enquiring together — a shared visit cuts the travel element for everyone involved.`,`Specification is the same as mainland jobs: vandal-resistant vinyl, UV-stable inks and anti-graffiti laminate, all measured to the curtain and lath before print.`],nearby:[`Lisburn`,`Bangor`,`Newtownabbey`,`Derry/Londonderry`,`Newry`,`Armagh`],logistics:`Planned Northern Ireland visits with panels printed in advance so install time on site is short.`,faqs:[{q:`Do you actually travel to Northern Ireland?`,a:`Yes. Our own installer
22s travel to Belfast and across Northern Ireland; we do not hand the work to a local subcontractor.`},{q:`Can several businesses on one street share a visit?`,a:`Yes, and it is the cheapest way to do it — a shared Northern Ireland trip splits the travel across every shutter on the run.`}]},{slug:`dublin`,name:`Dublin`,region:`Republic of Ireland`,metaTitle:`Roller Shutter Graphics Dublin & Republic of Ireland`,metaDescription:`Roller shutter graphics for Dublin shopfronts and businesses across Ireland. Printed in the UK, installed by our own team on planned Irish visits.`,h1:`Roller Shutter Graphics in Dublin`,intro:`Dublin, Cork, Galway and Limerick are served on planned Republic of Ireland visits, with artwork approved and panels printed before we travel.`,body:[`Dublin's independent retail and hospitality frontages — around Camden Street, Capel Street and the northside high streets — are exactly the kind of shuttered frontage printed graphics were made for: heavily walked past at night, currently blank.`,`Everything is quoted delivered and fitted, so there are no separate shipping surprises. Artwork proofs are signed off before we print, and the print is checked against the survey measurements before it leaves the unit.`,`Because trips are planned in batches, lead times to Ireland are typically a little longer than mainland UK — usually three to four weeks from artwork approval rather than one to two.`],nearby:[`Dún Laoghaire`,`Swords`,`Bray`,`Cork`,`Galway`,`Limerick`,`Waterford`],logistics:`Delivered-and-fitted quotes for the Republic of Ireland — no separate shipping charges added later.`,faqs:[{q:`What is the lead time for a shutter in Dublin?`,a:`Usually three to four weeks from artwork approval, because Irish installs are grouped into planned visits rather than run one at a time.`},{q:`Are Irish quotes inclusive of travel and shipping?`,a:`Yes — quotes for the Republic of Ireland are delivered and fitted, with travel already included.`}]}],C_=Object.fromEntries(S_.map(e=>[e.slug,e])),w_={version:1,asset_id:`fd014148-48da-4cfd-9248-a122f6ead5cb`,project_id:`a41e84e5-0511-4d13-a54a-76f7368759fe`,url:`/__l5e/assets-v1/fd014148-48da-4cfd-9248-a122f6ead5cb/shutter-media-logo.png`,r2_key:`a/v1/a41e84e5-0511-4d13-a54a-76f7368759fe/fd014148-48da-4cfd-9248-a122f6ead5cb/shutter-media-logo.png`,original_filename:`shutter-media-logo.png`,size:2534,content_type:`image/png`,created_at:`2026-07-30T18:43:08Z`};function T_(){return(0,z.jsxs)(`footer`,{className:`band-ink`,children:[(0,z.jsxs)(`div`,{className:`mx-auto grid max-w-7xl gap-10 px-5 py-12 md:grid-cols-2 lg:grid-cols-4`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`img`,{src:w_.url,alt:`Shutter Media Ltd logo`,className:`h-9 w-auto`,width:128,height:36}),(0,z.jsxs)(`p`,{className:`mt-3 text-sm text-ink-foreground/70`,children:[`Roller shutter, window, wall, vehicle and stadium graphics — designed, printed and installed in-house since 2010. Over`,` `,Oe,` completed projects in our portfolio.`]})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h2`,{className:`text-xs font-bold uppercase tracking-[0.2em] text-primary`,children:`Contact`}),(0,z.jsxs)(`ul`,{className:`mt-3 space-y-1 text-sm text-ink-foreground/70`,children:[(0,z.jsx)(`li`,{children:(0,z.jsx)(`a`,{href:`mailto:${A.email}`,className:`hover:text-primary`,children:A.email})}),(0,z.jsx)(`li`,{children:A.area})]}),(0,z.jsxs)(`div`,{className:`mt-4 flex gap-4 text-sm text-ink-foreground/70`,children:[(0,z.jsx)(`a`,{href:A.facebook,className:`hover:text-primary`,children:`Facebook`}),(0,z.jsx)(`a`,{href:A.instagram,className:`hover:text-primary`,children:`Instagram`}),(0,z.jsx)(`a`,{href:A.twitter,className:`hover:text-primary`,children:`X / Twitter`})]})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h2`,{className:`text-xs font-bold uppercase tracking-[0.2em] text-primary`,children:`Services`}),(0,z.jsxs)(`ul`,{className:`mt-3 grid grid-cols-2 gap-x-4 gap-y-1 text-sm text-ink-foreground/70`,children:[__.map(e=>(0,z.jsx)(`li`,{children:(0,z.jsx)(k,{to:`/${e.slug}`,className:`hover:text-primary`,children:e.anchor})},e.slug)),De.filter(e=>!y_[e.slug]).map(e=>(0,z.jsx)(`li`,{children:(0,z.jsx)(k,{to:`/services/$slug`,params:{slug:e.slug},className:`hover:text-primary`,children:e.label})},e.slug)),(0,z.jsx)(`li`,{children:(0,z.jsx)(k,{to:`/outdoor-advertising`,className:`hover:text-primary`,children:`Outdoor & street advertising`})}),(0,z.jsx)(`li`,{children:(0,z.jsx)(k,{to:`/roller-shutter-resprays`,className:`hover:text-primary`,children:`Roller shutter resprays`})}),(0,z.jsx)(`li`,{children:(0,z.jsx)(k,{to:`/work`,className:`hover:text-primary`,children:`Full portfolio`})})]})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h2`,{className:`text-xs font-bold uppercase tracking-[0.2em] text-primary`,children:`Areas we cover`}),(0,z.jsx)(`ul`,{className:`mt-3 grid grid-cols-2 gap-x-4 gap-y-1 text-sm text-ink-foreground
22/70`,children:S_.map(e=>(0,z.jsx)(`li`,{children:(0,z.jsx)(k,{to:`/roller-shutter-graphics/$location`,params:{location:e.slug},className:`hover:text-primary`,children:e.name})},e.slug))})]})]}),(0,z.jsx)(`div`,{className:`border-t border-ink-foreground/15`,children:(0,z.jsxs)(`p`,{className:`mx-auto max-w-7xl px-5 py-5 text-xs text-ink-foreground/70`,children:[`© `,new Date().getFullYear(),` Shutter Media Ltd. All rights reserved.`]})})]})}var E_=40;function D_({photos:e}){let[t,n]=(0,R.useState)(E_),[r,i]=(0,R.useState)(null);(0,R.useEffect)(()=>n(E_),[e]),(0,R.useEffect)(()=>{if(r===null)return;let t=t=>{t.key===`Escape`&&i(null),t.key===`ArrowRight`&&i(t=>t===null?t:Math.min(t+1,e.length-1)),t.key===`ArrowLeft`&&i(e=>e===null?e:Math.max(e-1,0))};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[r,e.length]);let a=e.slice(0,t);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`columns-2 gap-3 md:columns-3 lg:columns-4 [&>*]:mb-3`,children:a.map((e,t)=>(0,z.jsx)(`button`,{onClick:()=>i(t),className:`block w-full break-inside-avoid overflow-hidden border border-border`,children:(0,z.jsx)(`img`,{src:e.src,alt:e.alt,loading:`lazy`,className:`w-full object-cover transition-transform duration-500 hover:scale-[1.03]`})},`${e.src}-${t}`))}),a.length<e.length&&(0,z.jsx)(`div`,{className:`mt-10 text-center`,children:(0,z.jsxs)(`button`,{onClick:()=>n(e=>e+E_),className:`border border-primary px-6 py-3 text-sm font-bold uppercase tracking-[0.12em] text-primary transition-colors hover:bg-primary hover:text-primary-foreground`,children:[`Show more (`,e.length-a.length,` left)`]})}),r!==null&&e[r]&&(0,z.jsxs)(`div`,{className:`fixed inset-0 z-[100] flex items-center justify-center bg-background/95 p-4`,onClick:()=>i(null),children:[(0,z.jsx)(`img`,{src:e[r].full,alt:e[r].alt,className:`max-h-[88vh] max-w-full object-contain`,onClick:e=>e.stopPropagation()}),(0,z.jsxs)(`p`,{className:`absolute bottom-4 left-1/2 w-full max-w-2xl -translate-x-1/2 px-4 text-center text-xs text-muted-foreground`,children:[e[r].alt,` — `,r+1,` / `,e.length]}),(0,z.jsx)(`button`,{"aria-label":`Close`,className:`absolute right-5 top-4 text-sm font-bold uppercase tracking-[0.2em] text-primary`,children:`Close`})]})]})}function O_({heading:e=`Send us your shutter`,showPhone:t=!1}){let[n,r]=(0,R.useState)(!1),[i,a]=(0,R.useState)(null);function o(e){e.preventDefault();let t=e.currentTarget,n=new FormData(t),a=[`Name: ${n.get(`name`)??``}`,`Email: ${n.get(`email`)??``}`,`Business / location: ${n.get(`business`)??``}`,`Shutter width: ${n.get(`width`)??``}`,`Number of slats: ${n.get(`slats`)??``}`,`Photo attached: ${i??`none — please attach when replying`}`,``,`${n.get(`message`)??``}`].join(`
23`);window.location.href=`mailto:${A.email}?subject=Quote%20request%20%E2%80%94%20shutter%20graphics&body=${encodeURIComponent(a)}`,r(!0)}return(0,z.jsx)(`section`,{id:`contact`,className:`border-b border-border`,children:(0,z.jsxs)(`div`,{className:`mx-auto grid max-w-7xl gap-10 px-5 py-16 md:grid-cols-2`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h2`,{className:`font-display text-3xl uppercase tracking-tight text-foreground sm:text-4xl`,children:e}),(0,z.jsx)(`p`,{className:`mt-3 max-w-md text-muted-foreground`,children:`A photo of the shutter, its width and the number of slats are enough for a priced visual. Most quotes go back the same working day.`}),(0,z.jsxs)(`dl`,{className:`mt-8 space-y-3 text-sm`,children:[t&&(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`font-bold uppercase tracking-[0.16em] text-primary`,children:`Phone`}),(0,z.jsx)(`dd`,{children:(0,z.jsx)(`a`,{href:A.phoneHref,className:`text-foreground hover:text-primary`,children:A.phone})})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`font-bold uppercase tracking-[0.16em] text-primary`,children:`Email`}),(0,z.jsx)(`dd`,{children:(0,z.jsx)(`a`,{href:`mailto:${A.email}`,className:`text-foreground hover:text-primary`,children:A.email})})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`font-bold uppercase tracking-[0.16em] text-primary`,children:`Covering`}),(0,z.jsx)(`dd`,{className:`text-foreground`,children:A.area})]})]}),(0,z.jsxs)(`p`,{className:`mt-6 text-sm text-muted-foreground`,children:[`Not sure which product you need?`,` `,(0,z.jsx)(k,{to:`/work`,className:`text-primary hover:underline`,children:`Browse the portfolio`}),` `,`for ideas.`]})]}),n?(0,z.jsxs)(`div`,{className:`flex flex-col justify-center border border-border bg-card p-8`,children:[(0,z.jsx)(`h3`,{className:`font-display text-2xl uppercase tracking-tight text-foreground`,children:`One last step — hit send`}),(0,z.jsx)(`p`,{className:`mt-3 text-muted-foreground`,children:`Your email client should have opened with your details filled in. Attach your shutter photo and press send — we only receive your request once that email is sent, and we’ll be in touch shortly.`}),(0,z.jsxs)(`p`,{className:`mt-3 text-muted-foreground`,children:[`If nothing opened, email your shutter photo, width and slat count straight to`,` `,(0,z.jsx)(`a`,{href:`mailto:${A.email}`,className:`text-primary hover:underline`,children:A.email}),`.`]}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>r(!1),className:`mt-6 self-start border border-border px-4 py-2 text-sm font-bold uppercase tracking-[0.12em] text-foreground hover:border-primary hover:text-primary`,children:`Send another`})]}):(0,z.jsxs)(`form`,{className:`space-y-4 border border-border bg-card p-6`,onSubmit:o,children:[(0,z.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,z.jsx)(`input`,{required:!0,name:`name`,"aria-label":`Name`,placeholder:`Name`,className:`w-full border border-input bg-background px-3 py-2 text-sm outline-none focus:border-primary`}),(0,z.jsx)(`input`,{required:!0,name:`email`,type:`email`,"aria-label":`Email address`,placeholder:`Email`,className:`w-full border border-input bg-background px-3 py-2 text-sm outline-none focus:border-primary`})]}),(0,z.jsx)(`input`,{name:`business`,"aria-label":`Business or location`,placeholder:`Business / location`,className:`w-full border border-input bg-background px-3 py-2 text-sm outline-none focus:border-primary`}),(0,z.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,z.jsx)(`input`,{name:`width`,"aria-label":`Width of shutter`,placeholder:`Width of shutter (e.g. 4.2m)`,className:`w-full border border-input bg-background px-3 py-2 text-sm outline-none focus:border-primary`}),(0,z.jsx)(`input`,{name:`slats`,"aria-label":`Number of shutter slats`,placeholder:`How many slats?`,className:`w-full border border-input bg-background px-3 py-2 text-sm outline-none focus:border-primary`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`label`,{htmlFor:`shutter-photo`,className:`mb-1 block text-xs font-bold uppercase tracking-[0.16em] text-primary`,children:`Upload a picture of your shutter`}),(0,z.jsx)(`input`,{id:`shutter-photo`,name:`photo`,type:`file`,accept:`image/*`,onCh
23ange:e=>a(e.target.files?.[0]?.name??null),className:`w-full border border-input bg-background px-3 py-2 text-sm text-muted-foreground outline-none file:mr-3 file:border-0 file:bg-primary file:px-3 file:py-1 file:text-xs file:font-bold file:uppercase file:tracking-[0.12em] file:text-primary-foreground focus:border-primary`})]}),(0,z.jsx)(`textarea`,{rows:4,name:`message`,"aria-label":`Project details`,placeholder:`What do you need printing?`,className:`w-full border border-input bg-background px-3 py-2 text-sm outline-none focus:border-primary`}),(0,z.jsx)(`button`,{type:`submit`,className:`w-full bg-primary px-4 py-3 text-sm font-bold uppercase tracking-[0.12em] text-primary-foreground transition-opacity hover:opacity-90`,children:`Request a quote`})]})]})})}function k_(e){let t=v_[e],n=`${j}/${t.slug}`,r=Ee(t.gallery),i=r.find(e=>e.src.startsWith(`http`))?.src;return{meta:[{title:t.title},{name:`description`,content:t.description},{property:`og:title`,content:t.title},{property:`og:description`,content:t.description},{property:`og:type`,content:`website`},{property:`og:url`,content:n},{name:`twitter:card`,content:`summary_large_image`},...i?[{property:`og:image`,content:i},{name:`twitter:image`,content:i}]:[]],links:[{rel:`canonical`,href:n}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`Service`,"@id":`${n}#service`,name:t.label,serviceType:t.label,description:t.description,url:n,provider:{"@id":`${j}/#organization`},areaServed:tg.map(e=>({"@type":`Place`,name:e})),brand:{"@id":`${j}/#organization`},additionalType:`https://en.wikipedia.org/wiki/Signage`})},{type:`application/ld+json`,children:JSON.stringify(ig([{name:`Home`,path:`/`},{name:t.label,path:`/${t.slug}`}]))},{type:`application/ld+json`,children:JSON.stringify(og(t.answers))},...r.length?[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`ImageGallery`,"@id":`${n}#gallery`,name:`${t.label} installed by ${eg}`,url:n,about:{"@id":`${n}#service`},image:r.filter(e=>e.src.startsWith(`http`)).slice(0,12).map(e=>({"@type":`ImageObject`,contentUrl:e.src,caption:e.alt,description:e.alt,creditText:eg,creator:{"@id":`${j}/#organization`}}))})}]:[]]}}function A_({slug:e}){let t=v_[e],n=Ee(t.gallery),r=t.related.map(e=>v_[e]).filter(Boolean);return(0,z.jsxs)(`div`,{className:`min-h-screen bg-background font-sans`,children:[(0,z.jsx)(x_,{}),(0,z.jsxs)(`main`,{children:[(0,z.jsx)(`section`,{className:`border-b border-border`,children:(0,z.jsxs)(`div`,{className:`mx-auto max-w-7xl px-5 py-14`,children:[(0,z.jsxs)(`nav`,{"aria-label":`Breadcrumb`,className:`text-xs font-bold uppercase tracking-[0.2em] text-muted-foreground`,children:[(0,z.jsx)(k,{to:`/`,className:`hover:text-primary`,children:`Home`}),(0,z.jsx)(`span`,{className:`px-2`,children:`/`}),(0,z.jsx)(`span`,{className:`text-primary`,children:t.label})]}),(0,z.jsx)(`h1`,{className:`mt-4 max-w-4xl font-display text-4xl uppercase leading-[0.95] tracking-tight text-foreground sm:text-5xl`,children:t.h1}),(0,z.jsx)(`p`,{className:`mt-5 max-w-3xl text-lg text-muted-foreground`,children:t.lede}),(0,z.jsxs)(`div`,{className:`mt-6 flex flex-wrap gap-3`,children:[(0,z.jsx)(k,{to:`/contact`,className:`bg-primary px-5 py-3 text-sm font-bold uppercase tracking-[0.12em] text-primary-foreground hover:opacity-90`,children:`Get a quote`}),(0,z.jsx)(k,{to:`/work`,className:`border border-primary px-5 py-3 text-sm font-bold uppercase tracking-[0.12em] text-primary hover:bg-primary hover:text-primary-foreground`,children:`See completed work`})]})]})}),t.sections.map(e=>(0,z.jsx)(`section`,{className:`border-b border-border`,children:(0,z.jsxs)(`div`,{className:`mx-auto max-w-7xl px-5 py-12`,children:[(0,z.jsx)(`h2`,{className:`rule-accent font-display text-2xl uppercase tracking-tight text-foreground sm:text-3xl`,children:e.h2}),(0,z.jsxs)(`div`,{className:`mt-5 grid gap-6 lg:grid-cols-[1.4fr_1fr]`,children:[(0,z.jsx)(`div`,{className:`space-y-4`,children:e.paragraphs.map(e=>(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:e},e.slice(0,40)))}),e.bullets?(0,z.jsx)(`ul`,{className:`grid content-start gap-2`,children:e.bullets.map(e=>(0,z.jsxs)(`li`,{className:`flex gap-2 text-sm text-foreground`,children:[(0,z.jsx)(`span`,{className:`text-primary`,children:`—`}),e]},e))}):null]})]})},e.h2)),[`shutter-graphics`,`roller-shutter-graphics`,`shutter-wraps`].includes(t.slug)?(0,z.jsx)(`section`,{className:`border-b border-border bg-foreground text-background`,children:(0,z.jsxs)(`div`,{className:`mx-auto grid max-w-7xl items-center gap-6 px-5 py-10 sm:grid-cols-[1fr_auto]`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`text-xs font-bold uppercase tracking-[0.2em] text-primary`,children:`Surface restoration`}),(0,z.jsx)(`h2`,{className:`mt-2 font-display text-3xl uppercase`,children:`Flaking, faded or rusty shutter?`}),(0,z.jsx)(`p`,{className:`mt-3 max-w-2xl text-background/70`,children:`Professional roller shutter respraying can restore a sound curtain before graphics are fitted, or leave it in a clean single-colour finish.`})]}),(0,z.jsx)(k,{to:`/roller-shutter-resprays`,className:`bg-primary px-5 py-3 text-center text-sm font-bold uppercase tracking-[0.12em] text-primary-foreground hover:opacity-90`,children:`Explore shutter resprays`})]})}):null,(0,z.jsx)(`section`,{className:`border-b border-border band-muted`,children:(0,z.jsxs)(`div`,{className:`mx-auto max-w-7xl px-5 py-12`,children:[(0,z.jsx)(`h2`,{className:`rule-accent font-display text-2xl uppercase tracking-tight text-foreground sm:text-3xl`,children:`Common questions`}),(0,z.jsx)(`dl`,{className:`mt-6 grid gap-6 sm:grid-cols-2`,children:t.answers.map(e=>(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`font-display text-lg uppercase tracking-wide text-foreground`,children:e.q}),(0,z.jsx)(`dd`,{className:`mt-2 text-sm text-muted-foreground`,children:e.a})]},e.q))})]})}),n.length?(0,z.jsx)(`section`,{className:`border-b border-border`,children:(0,z.jsxs)(`div`,{className:`mx-auto max-w-7xl px-5 py-12`,children:[(0,z.jsxs)(`h2`,{className:`rule-accent font-display text-2xl uppercase tracking-tight text-foreground sm:text-3xl`,children:[t.label,` we have installed`]}),(0,z.jsxs)(`p`,{className:`mt-3 max-w-2xl text-muted-foreground`,children:[`Photographs of completed Shutter Media installations. Call`,` `,A.phone,` or email `,A.email,` to talk through a similar job.`]}),(0,z.jsx)(`div`,{className:`mt-8`,children:(0,z.jsx)(D_,{photos:n})})]})}):null,(0,z.jsx)(`section`,{className:`border-b border-border`,children:(0,z.jsxs)(`div`,{className:`mx-auto max-w-7xl px-5 py-12`,children:[(0,z.jsx)(`h2`,{className:`text-xs font-bold uppercase tracking-[0.2em] text-primary`,children:`Related services`}),(0,z.jsx)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:r.map(e=>(0,z.jsx)(k,{to:`/${e.slug}`,className:`border border-border px-3 py-1.5 text-sm font-semibold text-muted-foreground hover:border-primary hover:text-primary`,children:e.anchor},e.slug))}),(0,z.jsxs)(`p`,{className:`mt-6 max-w-3xl text-sm text-muted-foreground`,children:[eg,` designs, prints and installs `,t.anchor,` across the UK and Ireland from our unit on Teesside. Every exterior job is surveyed before print and fitted by our own installer
23s.`]})]})}),(0,z.jsx)(O_,{})]}),(0,z.jsx)(T_,{})]})}var j_=B(`/shutter-graphics`)({head:()=>k_(`shutter-graphics`),component:V(()=>$(()=>import(`./shutter-graphics-CA_PE7Kq.js`),__vite__mapDeps([38,1,2])),`component`)}),M_=B(`/shutter-graphics.html`)({loader:()=>{throw xe({to:`/`})}}),N_=B(`/shutter-wraps`)({head:()=>k_(`shutter-wraps`),component:V(()=>$(()=>import(`./shutter-wraps-BG8a95Kd.js`),__vite__mapDeps([39,1,2])),`component`)}),P_=B(`/street-furniture-wraps`)({head:()=>k_(`street-furniture-wraps`),component:V(()=>$(()=>import(`./street-furniture-wraps-BtLQrd2X.js`),__vite__mapDeps([40,1,2])),`component`)}),F_=B(`/vinyl-graphics`)({head:()=>k_(`vinyl-graphics`),component:V(()=>$(()=>import(`./vinyl-graphics-D0Dg7yxl.js`),__vite__mapDeps([41,1,2])),`component`)}),I_=B(`/window-graphics`)({head:()=>k_(`window-graphics`),component:V(()=>$(()=>import(`./window-graphics-RN1VjlUR.js`),__vite__mapDeps([42,1,2])),`component`)}),L_=()=>$(()=>import(`./work-Brjcg3ue.js`),__vite__mapDeps([43,2,1,3,4,5,6,7,8])),R_=`Graphics Portfolio — ${Oe} Projects | Shutter Media`,z_=`Explore roller shutter, window, wall, stadium, hoarding, signage, vehicle and banner projects installed by Shutter Media across the UK.`,B_=B(`/work`)({head:()=>({meta:[{title:R_},{name:`description`,content:z_},{property:`og:title`,content:R_},{property:`og:description`,content:z_},{property:`og:type`,content:`website`},{property:`og:url`,content:`${j}/work`},{name:`twitter:card`,content:`summary_large_image`}],links:[{rel:`canonical`,href:`${j}/work`}],scripts:[{type:`application/ld+json`,children:JSON.stringify(ig([{name:`Home`,path:`/`},{name:`Portfolio`,path:`/work`}]))},{type:`application/ld+json`,children:JSON.stringify(ag(`Shutter Media portfolio`,`${j}/work`,ke))}]}),component:V(L_,`component`)}),V_=[{q:`Are roller shutter graphics cheaper than a new shopfront sign?`,a:`Usually yes. A printed roller shutter uses the shutter you already own, so there is no fascia, tray, fixings or electrical work. Most single-shop shutters land well below the cost of a comparable illuminated fascia sign.`},{q:`Do I need planning permission for roller shutter graphics?`,a:`Printed graphics applied to an existing shutter are generally treated as decoration rather than a new advertisement structure, but conservation areas and listed buildings have their own rules. Check with your local authority before ordering artwork.`},{q:`How many hours a day does each type of signage work?`,a:`A fascia sign is seen while the shop is open and lit. A printed roller shutter works precisely when the fascia is least visible — nights, Sundays and bank holidays — which for most high-street retailers is more than half the week.`},{q:`Do shutter graphics stop graffiti?`,a:`An anti-graffiti laminate lets paint and marker be wiped off without damaging the print, and a covered shutter is a far less attractive target than a blank grey one.`}],H_=()=>$(()=>import(`./guides.roller-shutter-graphics-vs-shopfront-signs-DgiYnIHh.js`),__vite__mapDeps([44,1,2,3,4,5,6,7,8])),U_=`/guides/roller-shutter-graphics-vs-shopfront-signs`,W_=`${j}${U_}`,G_=`Roller Shutter Graphics vs Shopfront Signs | Guide`,K_=`Compare roller shutter graphics, window vinyl and traditional shopfront signs on cost, lifespan, hours of exposure and planning — with UK pricing guidance.`,q_=B(`/guides/roller-shutter-graphics-vs-shopfront-signs`)({head:()=>{let e=Ee(`shutter-graphics`).find(e=>e.src.startsWith(`http`))?.src;return{meta:[{title:G_},{name:`description`,content:K_},{name:`keywords`,content:`roller shutter graphics, shopfront signs, shop front signage, roller shutter advertising, shutter graphics cost, roller shutter signage`},{property:`og:title`,content:G_},{property:`og:description`,content:K_},{property:`og:type`,content:`article`},{property:`og:url`,content:W_},{name:`twitter:card`,content:`summary_large_image`},...e?[{property:`og:image`,content:e},{name:`twitter:image`,content:e}]:[]],links:[{rel:`canonical`,href:W_}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`Article`,headline:`Roller Shutter Graphics vs Traditional Shopfront Signs`,description:K_,author:{"@type":`Organization`,name:eg},publisher:{"@type":`Organization`,name:eg},mainEntityOfPage:W_,url:W_})},{type:`application/ld+json`,children:JSON.stringify(ig([{name:`Home`,path:`/`},{name:`Shutter Graphics`,path:`/services/shutter-graphics`},{name:`Shutter graphics vs shopfront signs`,path:U_}]))},{type:`application/ld+json`,children:JSON.stringify(og(V_))}]}},component:V(H_,`component`)}),J_=B(`/roller-shutter-graphics/`)({head:()=>k_(`roller-shutter-graphics`),component:V(()=>$(()=>import(`./roller-shutter-graphics.index-btgeScDm.js`),__vite__mapDeps([45,1,2])),`component`)}),Y_=B(`/roller-shutter-graphics/$location`)({loader:({params:e})=>{let t=C_[e.location];if(!t)throw ye();return{slug:t.slug}},head:({params:e})=>{let t=C_[e.location];if(!t)return{meta:[{title:`Area not found — Shutter Media`},{name:`robots`,content:`noindex`}]};let n=`${j}/roller-shutter-graphics/${t.slug}`,r=Ee(`shutter-graphics`).find(e=>e.src.startsWith(`http`))?.src;return{meta:[{title:t.metaTitle},{name:`description`,content:t.metaDescription},{property:`og:title`,content:t.metaTitle},{property:`og:description`,content:t.metaDescription},{property:`og:type`,content:`website`},{property:`og:url`,content:n},{name:`twitter:card`,content:`summary_large_image`},...r?[{property:`og:image`,content:r},{name:`twitter:image`,content:r}]:[]],links:[{rel:`canonical`,href:n}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`Service`,name:`Roller shutter graphics in ${t.name}`,serviceType:`Roller shutter graphics`,description:t.metaDescription,provider:{"@type":`LocalBusiness`,name:eg,url:j,telephone:`+447763141533`,address:{"@type":`PostalAddress`,addressLocality:`Middlesbrough`,addressCountry:`GB`}},areaServed:[t.name,t.region,...t.nearby].map(e=>({"@type":`Place`,name:e})),url:n})},{type:`application/ld+json`,children:JSON.stringify(ig([{name:`Home`,path:`/`},{name:`Roller shutter graphics`,path:`/services/shutter-graphics`},{name:t.name,path:`/roller-shutter-graphics/${t.slug}`}
23]))},{type:`application/ld+json`,children:JSON.stringify(og(t.faqs))}]}},component:V(()=>$(()=>import(`./roller-shutter-graphics._location-CWDcB_hn.js`),__vite__mapDeps([46,1,2,3,4,5,6,7,8])),`component`)}),X_={"shutter-graphics":{h1:`Roller Shutter Graphics, Wraps & Printed Vinyl`,keywords:`roller shutter graphics.shutter graphics.roller shutter advertising.roller shutter signage.roller shutter wraps.roller shutter vinyl.roller shutter stickers.roller shutter printing.printed roller shutters.painted roller shutters.roller shutter murals.shop shutter graphics.shop front shutter graphics.security shutter graphics.roller shutter door graphics.commercial roller shutter graphics.roller shutter graphics middlesbrough.roller shutter graphics teesside.roller shutter graphics north east.roller shutter graphics uk.roller shutter graphics ireland.shutter graphics northern ireland.shutter graphics belfast.shutter graphics dublin.shutter media.shutter media roller shutter graphics.outdoor advertising.outdoor advertising uk.street advertising.urban advertising.out of home advertising.shutter advertising`.split(`.`),body:[`Printed roller shutters are the work Shutter Media is best known for. We print your artwork onto heavy-duty vandal-resistant vinyl, wrap it around the existing curtain and finish it with an anti-graffiti laminate, so a closed shutter keeps advertising the business overnight instead of turning the street grey.`,`Every shutter is surveyed before print so the artwork lines up with the slats and lath. Shop shutter graphics, security shutters, industrial roller shutter doors, grilles and pull-down gates are all handled the same way — measured, printed in-house, and fitted out of hours across Middlesbrough, Teesside, the North East, the rest of the UK and Ireland.`,`Roller shutter advertising is the cheapest square metre of signage most shops own. A single printed shutter covers the whole frontage, works every night and weekend the business is closed, and typically costs less than a year of comparable outdoor advertising space.`],industries:[`Independent retail`,`Takeaways and cafés`,`Barbers and salons`,`National retail chains`,`Industrial units`],faqs:[{q:`How long do roller shutter graphics last?`,a:`Printed shutter vinyl with a UV and anti-graffiti laminate typically holds colour for five to seven years outdoors in the UK, and can be cleaned or jet-washed without damage.`},{q:`Do you need to replace my shutter?`,a:`No. Roller shutter wraps are applied to the existing curtain. If the shutter opens and closes cleanly, it can be printed.`},{q:`How much do roller shutter graphics cost?`,a:`Price is driven by the width of the shutter and the number of slats. Send a photo with those two figures and we will return a priced visual, usually the same working day.`},{q:`Is it better to have a roller shutter painted or printed?`,a:`Printed vinyl gives photographic detail, exact brand colours and a consistent finish, and it can be removed or updated later. Hand-painted roller shutters are one-offs that fade faster and cannot be reproduced if a panel is damaged.`},{q:`What types of shutter can be wrapped?`,a:`Solid lath curtains, perforated and punched slats, brick-bond security grilles and industrial roller shutter doors can all be printed. Perforated shutters are printed on a matched media so the pattern still reads through.`},{q:`Do you fit roller shutter graphics outside Middlesbrough?`,a:`Yes. Middlesbrough, Stockton, Redcar, Darlington and the wider Teesside area are covered daily, and installation teams travel nationwide for multi-site retail rollouts.`},{q:`Will graphics stop my shutter working properly?`,a:`No. The vinyl is applied to the curtain in the closed position and rolls with it, so the shutter opens and closes exactly as before.`},{q:`How long does it take to install shutter graphics?`,a:`Most single shopfront shutters are fitted in two to three hours, out of trading hours, so the shop never closes. Lead time from artwork approval is typically one to two weeks in the UK.`},{q:`Can roller shutter graphics be removed at the end of a lease?`,a:`Yes. The vinyl is applied to the shutter curtain, not the building, and can be heated and peeled off without damaging the shutter or the shopfront.`},{q:`Is roller shutter advertising cheaper than paid outdoor advertising?`,a:`For most businesses, yes. A printed shutter is a one-off cost on frontage you already rent and keeps working every night for years, where a paid outdoor advertising site is charged for every month it runs.`}]},"window-graphics":{h1:`Window Graphics, Window Vinyl & Manifestation`,keywords:[`window graphics`,`window vinyl`,`window manifestation`,`frosted window film`,`privacy window film`,`retail graphics`,`shopfront graphics`,`shop branding`],body:[`Window graphics do three jobs at once: they advertise, they give privacy, and they meet the manifestation rules for glazed doors and screens. We supply cut vinyl lettering, printed promotional panels, frosted and etch-effect privacy film, one-way vision contra-vision and full window wraps.`,`Seasonal campaigns are printed to the same templates each time so a promotion can be swapped over in an hour, and office glazing is surveyed and templated before manufacture so every pane matches.`],industries:[`Retail`,`Offices`,`Restaurants and bars`,`Clinics and salons`,`Estate agents`],faqs:[{q:`What is window manifestation?`,a:`Manifestation is the marking applied to large glazed panels so peo
23ple can see the glass is there. It is a building regulations requirement and is usually delivered as frosted film, applied at the heights set out in the regulations.`},{q:`Can you see out through printed window graphics?`,a:`Yes, if we print onto one-way vision film. From outside the street sees full-colour artwork; from inside it behaves like a tinted window.`}]},"wall-graphics":{h1:`Wall Graphics, Wall Wraps & Interior Murals`,keywords:[`wall graphics`,`wall wraps`,`wall murals`,`feature walls`,`office graphics`,`interior graphics`,`exterior graphics`,`large format printing`],body:[`Wall graphics turn dead space into brand space. We print high-resolution wall coverings and self-adhesive wall wraps for offices, gyms, schools, stadium concourses and retail interiors, choosing media to suit the surface — smooth plaster, textured render, painted block or exterior brick.`,`Feature walls, full-height murals, values walls and wayfinding artwork are surveyed and templated before printing, and finished with a wipe-clean laminate wherever the wall is in a high-traffic area.`],industries:[`Offices`,`Gyms and leisure`,`Schools and colleges`,`Healthcare`,`Hospitality`],faqs:[{q:`Will wall graphics damage the paintwork?`,a:`Removable media is available for rented and short-term spaces. On a sound painted wall it peels away cleanly; we will advise on the right product at survey.`},{q:`Can you print onto textured walls?`,a:`Yes. Textured render and brick are printed onto conformable media designed to key into the surface.`}]},"football-graphics":{h1:`Football Stadium Graphics & Club Branding`,keywords:[`football stadium graphics`,`football signage`,`stadium branding`,`sports branding`,`sports graphics`,`club branding`,`tunnel graphics`,`dressing room graphics`],body:[`We work with football clubs from the Premier League down to grassroots, turning concrete concourses, players' tunnels, dressing rooms, gyms and hospitality suites into spaces that lift players and supporters. Stadium branding covers wall wraps, floor graphics, glazing manifestation, honours boards and sponsor panels.`,`Fixture lists rule the schedule, so surveys, print and installation are planned around home games and international breaks, and completed overnight where the stadium is in use.`],industries:[`Football clubs`,`Rugby and cricket clubs`,`Academies`,`Leisure trusts`,`Sponsors and agencies`],faqs:[{q:`Do you work outside the North East?`,a:`Yes. Stadium and club branding is installed UK-wide by our own teams.`},{q:`Can you match club brand guidelines?`,a:`Artwork is checked against the club or sponsor guidelines and proofed before anything goes to print.`}]},"hoarding-graphics":{h1:`Printed Hoardings & Construction Site Signage`,keywords:[`printed hoardings`,`hoarding graphics`,`construction site signage`,`construction signage`,`safety signage`,`health and safety signs`,`site boards`,`development graphics`],body:[`Site hoarding is often the first thing the public sees of a development. We print full-colour hoarding panels carrying CGIs, phase information, safety messaging and contact details on weatherproof media rated for long outdoor exposure.`,`Panels can be supplied ready for your joiners to fix, or surveyed and installed by our own team, with repeat runs held on file for phased developments and rebranded plots.`],industries:[`Housebuilders`,`Main contractors`,`Councils`,`Rail and infrastructure`,`Retail fit-out`],faqs:[{q:`How long do printed hoardings last on site?`,a:`Our standard hoarding print and laminate is rated for three to five years outdoors, which covers most build programmes.`},{q:`Can you include health and safety signage?`,a:`Yes — statutory safety signs, PPE notices and site rules are printed as part of the hoarding scheme or supplied separately on rigid board.`}]},signage:{h1:`Commercial Signage, Shop Signs & Wayfinding`,keywords:[`commercial signage`,`business signage`,`shop signage`,`sign makers`,`sign company`,`custom signs`,`bespoke signage`,`wayfinding signage`,`acrylic signs`,`aluminium signs`,`dibond signs`,`foamex signs`,`laser engraving`],body:[`As sign makers we manufacture and install the full range of commercial signage: flat panel and tray fascias, illuminated signs, built-up and flat-cut letters, projecting signs, plaques and complete wayfinding schemes. Substrates include acrylic, aluminium, Dibond and Foamex, cut and laser-engraved in-
23house.`,`Schools, colleges, universities, NHS sites, hotels and restaurants all need signage that survives daily use and reads clearly at distance. We survey, manufacture, install and, where needed, handle planning and landlord approvals.`],industries:[`Retail and hospitality`,`Schools and universities`,`NHS and healthcare`,`Industrial estates`,`Public sector`],faqs:[{q:`Do you need planning permission for a shop sign?`,a:`Illuminated signage and some projecting signs need advertisement consent. We will tell you at survey and can prepare the drawings for the application.`},{q:`Do you make memorial and heritage boards?`,a:`Yes — memorial boards, heritage displays and interpretation boards are produced in printed aluminium or acrylic with UV-stable inks.`}]},"point-of-sale":{h1:`Point of Sale Printing & In-Store Displays`,keywords:[`point of sale printing`,`retail graphics`,`in-store displays`,`lightbox panels`,`printed graphics`,`printed vinyl`,`exhibition graphics`,`event graphics`],body:[`Point of sale work is about accuracy and repeatability: lightbox and poster case inserts, header boards, free-standing units, shelf strips and exhibition panels, all produced to brand guidelines and colour-matched across a campaign.`,`For multi-site roll-outs we kit and label every box per store so the field team opens one carton per location and nothing goes missing.`],industries:[`National retail`,`Supermarkets`,`Franchise networks`,`Exhibitions and events`,`Agencies`],faqs:[{q:`Can you deliver direct to stores?`,a:`Yes. Kits are packed, labelled and despatched per store, with a manifest returned to the campaign manager.`},{q:`What lead time do you need?`,a:`Repeat campaigns usually turn around in a few working days once artwork is approved.`}]},"vehicle-graphics":{h1:`Vehicle Graphics, Van Wraps & Fleet Livery`,keywords:[`vehicle graphics`,`van wraps`,`fleet livery`,`vehicle wrapping`,`cut vinyl lettering`,`commercial vehicle graphics`],body:[`Vehicle graphics are the cheapest advertising a business will ever buy. We apply everything from a name, number and web address on the door through to full conformable wraps across a fleet, using cast media that follows the curves and survives the jet wash.`,`Old livery is removed and the panels prepared properly before anything new goes on, and fleets are booked in batches so the vehicles stay working.`],industries:[`Trades and contractors`,`Logistics fleets`,`Councils`,`Food and drink`,`Care providers`],faqs:[{q:`How long does a van wrap take?`,a:`A partial wrap is usually a single day; a full wrap on a large van is two to three days including preparation.`},{q:`Will a wrap damage the paintwork?`,a:`No. Cast vinyl applied to sound factory paint protects it, and removes cleanly with heat.`}]},"banner-graphics":{h1:`Printed Banners — PVC, Mesh & Backlit`,keywords:[`printed banners`,`PVC banners`,`mesh banners`,`backlit banners`,`event graphics`,`large format printing`],body:[`Banners are printed to any size on PVC, blockout, backlit or mesh media, hemmed and eyeletted as standard, or pole-pocketed for frames and gantries. Mesh is the right choice on exposed fence lines because it lets the wind through instead of acting as a sail.`,`Long spans are welded rather than taped so the seams hold through a season outdoors, and matchday and event banners can be reprinted from the same file each year.`],industries:[`Sports clubs`,`Events and festivals`,`Construction`,`Retail promotions`,`Schools`],faqs:[{q:`What is the largest banner you can print?`,a:`There is no practical limit — large banners are printed in panels and welded into a single sheet.`},{q:`Which banner material should I choose outdoors?`,a:`PVC for walls and frames, mesh for fencing or anywhere exposed to wind.`}]},"street-furniture":{h1:`Street Furniture Wraps & Public Realm Graphics`,keywords:[`street furniture graphics`,`public realm graphics`,`bench wraps`,`bollard wraps`,`bin wraps`,`community campaign graphics`],body:[`Benches, bollards, planters, bins and cabinets can carry artwork, local heritage or an awareness campaign instead of fly-posters. Wraps are printed on durable conformable media with an anti-graffiti laminate so tagging wipes off without stripping the print.`,`We work to council and public-realm specifications and can produce interpretation boards and heritage displays to match a wider town-centre scheme.`],industries:[`Local authorities`,`BIDs and town centres`,`Housing associations`,`Parks and heritage sites`,`Community groups`],faqs:[{q:`Are the wraps graffiti resistant?`,a:`Every public-realm wrap is finished with an anti-graffiti laminate that allows paint to be removed with solvent without harming the print.`},{q:`Can you wrap curved and awkward shapes?`,a:`Yes. Bollards, planters and curved benches are templated and wrapped in conformable cast media.`}]},brands:{h1:`National Brand Roll-Outs & Nationwide Installation`,keywords:[`nationwide signage installation`,`national signage company`,`brand roll-out`,`retail graphics`,`graphic installation`,`UK sign company`],body:[`For brands and their agencies we run national roll-outs end to end: one point of contact, artwork checked against guidelines, every site surveyed, installer
23s scheduled by region and completion photography returned per location.`,`Because design, print and installation all sit under one roof, a change to the campaign does not mean chasing three suppliers, and site-specific variations are handled before anything is printed.`],industries:[`National retail`,`Franchise networks`,`Banks and building societies`,`Telecoms`,`Marketing agencies`],faqs:[{q:`How many sites can you cover?`,a:`Roll-outs of several hundred sites are handled by our regional installation teams, scheduled from a single programme.`},{q:`Do you provide completion evidence?`,a:`Yes — photographs and a sign-off sheet are returned for every location.`}]}},Z_=B(`/services/$slug`)({loader:({params:e})=>{let t=y_[e.slug];if(t)throw xe({to:t,statusCode:301});let n=Ae[e.slug];if(!n)throw ye();return{slug:n.slug}},head:({params:e})=>{let t=Ae[e.slug];if(!t)return{meta:[{title:`Service not found — Shutter Media`},{name:`robots`,content:`noindex`}]};let n=`${j}/services/${t.slug}`,r=Ee(t.slug),i=r.find(e=>e.src.startsWith(`http`))?.src,a=X_[t.slug];return{meta:[{title:t.metaTitle},{name:`description`,content:t.metaDescription},{name:`keywords`,content:(a?.keywords??[]).join(`, `)},{property:`og:title`,content:t.metaTitle},{property:`og:description`,content:t.metaDescription},{property:`og:type`,content:`website`},{property:`og:url`,content:n},{name:`twitter:card`,content:`summary_large_image`},...i?[{property:`og:image`,content:i},{name:`twitter:image`,content:i}]:[]],links:[{rel:`canonical`,href:n}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`Service`,name:a?.h1??t.label,serviceType:t.label,description:t.metaDescription,provider:{"@type":`LocalBusiness`,name:eg,url:j,telephone:`+447763141533`},areaServed:tg.map(e=>({"@type":`Place`,name:e})),url:n})},{type:`application/ld+json`,children:JSON.stringify(ig([{name:`Home`,path:`/`},{name:`Portfolio`,path:`/work`},{name:t.label,path:`/services/${t.slug}`}]))},...r.length?[{type:`application/ld+json`,children:JSON.stringify(ag(`${t.label} gallery`,n,r))}]:[],...a?.faqs?.length?[{type:`application/ld+json`,children:JSON.stringify(og(a.faqs))}]:[]]}},component:V(()=>$(()=>import(`./services._slug-BAfcljza.js`),__vite__mapDeps([47,1,2,3,4,5,6,7,8])),`component`)}),Q_=B(`/_authenticated/admin/`)({head:()=>({meta:[{title:`Quotations dashboard — Shutter Media`},{name:`description`,content:`Overview of draft, sent and accepted Shutter Media quotations.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Quotations dashboard — Shutter Media`},{property:`og:description`,content:`Overview of Shutter Media quotations.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.index-jkOwOhMF.js`),__vite__mapDeps([48,1,2,3,4,5,6,7,49,17,18,28,19,50,51,23,52,53,54,34,11,12,13])),`component`)}),$_=B(`/_authenticated/admin/brands`)({head:()=>({meta:[{title:`Brand settings — Shutter Media staff`},{name:`description`,content:`Company details, logos, terms and quote numbering for each brand.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Brand settings — Shutter Media staff`},{property:`og:description`,content:`Company details, logos and terms per brand.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.brands-BU3kMdKH.js`),__vite__mapDeps([55,2,1,49,5,3,4,6,7,17,18,28,19,50,56,57,20,21,22,35,58,59,60,23,61,62,63])),`component`)}),ev=B(`/_authenticated/admin/customers`)({head:()=>({meta:[{title:`Customers — Shutter Media staff`},{name:`description`,content:`Reusable customer records for Shutter Media quotations.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Customers — Shutter Media staff`},{property:`og:description`,content:`Reusable customer records.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.customers-BDl3MQnr.js`),__vite__mapDeps([64,2,1,49,5,3,4,6,7,17,18,28,19,50,56,65,37,66,20,21,22,35,58,59,60,23,67,33,63,68])),`component`)}),tv=B(`/_authenticated/admin/expenses`)({head:()=>({meta:[{title:`Materials & expenses — Shutter Media staff`},{name:`description`,content:`Record materials bought, fuel, rent and other running costs for profit and loss reporting.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Materials & expenses — Shutter Media staff`},{property:`og:description`,content:`Track material and overhead costs.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>
23import(`./admin.expenses-DMseOjzb.js`),__vite__mapDeps([69,2,1,49,5,3,4,6,7,17,18,28,19,50,56,70,30,22,59,60,62,63,68,65,66,20,21,23,52])),`component`)}),nv=B(`/_authenticated/admin/pl`)({head:()=>({meta:[{title:`Profit & loss — Shutter Media staff`},{name:`description`,content:`Monthly profit and loss: accepted quote income against materials, fuel and overheads.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Profit & loss — Shutter Media staff`},{property:`og:description`,content:`Monthly income against costs.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.pl-8YQA5Uly.js`),__vite__mapDeps([71,2,1,49,5,3,4,6,7,17,18,28,19,50,70,30,22,59,60,62,63,68,23,52])),`component`)}),rv=B(`/_authenticated/admin/products`)({head:()=>({meta:[{title:`Price list — Shutter Media staff`},{name:`description`,content:`Reusable products and rates used to build Shutter Media quotations.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Price list — Shutter Media staff`},{property:`og:description`,content:`Products and rates for quotations.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.products-73vEf92A.js`),__vite__mapDeps([72,2,1,49,5,3,4,6,7,17,18,28,19,50,56,70,30,22,59,60,62,63,68,65,66,20,21,35,58,23,52])),`component`)}),iv=B(`/_authenticated/admin/marketing/`)({head:()=>({meta:[{title:`Marketing Hub — Shutter Media staff`},{name:`description`,content:`Lead database, campaigns, pipeline and follow-ups for Shutter Media.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Marketing Hub — Shutter Media staff`},{property:`og:description`,content:`Shutter Media internal marketing and sales CRM.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.index-92PQKU12.js`),__vite__mapDeps([73,2,1,3,4,5,6,7,27,12,50,32,28,74,11,13,19,35,23,53,75,49,17,18,76,77])),`component`)}),av=B(`/_authenticated/admin/marketing/contacts`)({head:()=>({meta:[{title:`Marketing contacts — Shutter Media`},{name:`description`,content:`Select council regeneration contacts and send personalised marketing emails.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Marketing contacts — Shutter Media`},{property:`og:description`,content:`Named marketing contacts and bulk outreach.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.contacts-BIWPzyv5.js`),__vite__mapDeps([78,2,1,3,4,5,6,7,11,12,49,17,18,28,19,27,50,56,30,70,22,59,60,62,63,68,79,37,51,57,33,13,20,21,23,67,53,75,76,77,80,81,82])),`component`)}),ov=B(`/_authenticated/admin/marketing/followups`)({head:()=>({meta:[{title:`Follow-ups — Shutter Media marketing`},{name:`description`,content:`Every scheduled follow-up, overdue chase and reminder in one place.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Follow-ups — Shutter Media marketing`},{property:`og:description`,content:`Scheduled follow-ups and overdue chases.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.followups-BoRr_k3e.js`),__vite__mapDeps([83,1,2,3,4,5,6,7,50,56,19,23,53,75,49,17,18,28])),`component`)}),sv=B(`/_authenticated/admin/marketing/funding`)({head:()=>({meta:[{title:`Regeneration funding tracker — Shutter Media`},{name:`description`,content:`Track UK high street and regeneration funding awards, deadlines and the towns receiving them.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Regeneration funding tracker — Shutter Media`},{property:`og:description`,content:`High street funding awards and spend deadlines.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.funding-vNA79Wjc.js`),__vite__mapDeps([84,2,1,3,4,5,6,7,50,56,65,28,19,20,35,23,75,49,17,18,81])),`component`)}),cv=B(`/_authenticated/admin/marketing/import`)({head:()=>({meta:[{title:`Import marketing database — Shutter Media`},{name:`description`,content:`Import councils, BIDs and business contacts from CSV, Excel or pasted rows.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Import marketing database — Shutter Media`},{property:`og:description`,content:`Bulk import marketing contacts.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.import-Bqb8nfUy.js`),__vite__mapDeps([85,2,1,50,56,70,4,28,30,19,22,59,60,62,63,68,32,57,20,21,35,23,61,53,75,3,5,6,7,49,17,18,76,80,81,86])),`component`)}),lv=B(`/_authenticated/admin/marketing/inbox`)({head:()=>({meta:[{title:`Reply inbox — Shutter Media marketing`},{name:`description`,content:`Log and triage replies to outreach: interested, not interested, more information requested.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Reply inbox — Shutter Media marketing`},{property:`og:description`,content:`Triage replies from outreach campaigns.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.inbox-DJibTbsV.js`),__vite__mapDeps([87,2,1,3,4,5,6,7,50,56,70,28,30,19,22,59,60,62,63,68,20,35,23,53,75,49,17,18,81])),`component`)}),uv=B(`/_authenticated/admin/marketing/media`)({head:()=>({meta:[{title:`Media library — Shutter Media marketing`},{name:`description`,content:`Tagged project imagery for proposals, campaigns and case studies.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Media library — Shutter Media marketing`},{property:`og:description`,content:`Tagged imagery for proposals and campaigns.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.media-CINQq0fW.js`),__vite__mapDeps([88,2,1,50,56,8,19,20,58,22,4,59,60,23,53,75,3,5,6,7,49,17,18,28])),`component`)}),dv=B(`/_authenticated/admin/marketing/pdfs`)({head:()=>({meta:[{title:`Marketing PDFs | Shutter Media`}]}),component:V(()=>$(()=>import(`./admin.marketing.pdfs-DXzQTrrY.js`),__vite__mapDeps([89,2,1,27,5,12,90,19,20,21,22,4,23,75,3,6,7,49,17,18,28,82,11,13])),`component`)}),fv=B(`/_authenticated/admin/marketing/pipeline`)({head:()=>({meta:[{title:`Sales pipeline — Shutter Media marketing`},{name:`description`,content:`Kanban pipeline of every council, BID and business opportunity.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Sales pipeline — Shutter Media marketing`},{property:`og:description`,content:`Drag opportunities through the Shutter Media sales pipeline.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.pipeline-BFhVIPSr.js`),__vite__mapDeps([91,2,1,3,4,5,6,7,50,56,20,19,53,75,49,17,18,28,76,80,81])),`component`)}
23),pv=B(`/_authenticated/admin/marketing/proposals`)({head:()=>({meta:[{title:`Proposal generator — Shutter Media marketing`},{name:`description`,content:`Generate branded PDF proposals with a dynamic cover, case studies and service detail.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Proposal generator — Shutter Media marketing`},{property:`og:description`,content:`Branded PDF proposals for councils, BIDs and businesses.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.proposals-DUYjgAxL.js`),__vite__mapDeps([92,2,1,50,56,90,28,70,4,30,19,22,59,60,62,63,68,32,20,21,35,23,75,3,5,6,7,49,17,18,76,81])),`component`)}),mv=B(`/_authenticated/admin/marketing/reports`)({head:()=>({meta:[{title:`Marketing reports — Shutter Media`},{name:`description`,content:`Outreach performance, reply rates, pipeline value and regional coverage.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Marketing reports — Shutter Media`},{property:`og:description`,content:`Outreach and pipeline performance reporting.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.reports-DUht4NpF.js`),__vite__mapDeps([93,2,1,50,19,23,75,3,4,5,6,7,49,17,18,28,76,80])),`component`)}),hv=B(`/_authenticated/admin/marketing/settings`)({head:()=>({meta:[{title:`Marketing settings — Shutter Media`},{name:`description`,content:`Sender identity, signature, sending limits and compliance footer for outreach.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Marketing settings — Shutter Media`},{property:`og:description`,content:`Sender identity and compliance settings for outreach.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.settings-bDtF4QzN.js`),__vite__mapDeps([94,2,1,50,56,19,20,21,22,4,35,23,75,3,5,6,7,49,17,18,28])),`component`)}),gv=B(`/_authenticated/admin/marketing/suppression`)({head:()=>({meta:[{title:`Suppression list — Shutter Media marketing`},{name:`description`,content:`Opt-outs, do-not-contact addresses and blocked domains, honoured on every send.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Suppression list — Shutter Media marketing`},{property:`og:description`,content:`Manage opt-outs and blocked addresses.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.suppression-o9_l8m1Z.js`),__vite__mapDeps([95,2,1,50,56,66,28,19,20,21,22,4,35,23,75,3,5,6,7,49,17,18,81,86])),`component`)}),_v=B(`/_authenticated/admin/marketing/tasks`)({head:()=>({meta:[{title:`Marketing tasks — Shutter Media`},{name:`description`,content:`Sales and marketing task list with owners, priorities and due dates.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Marketing tasks — Shutter Media`},{property:`og:description`,content:`Track marketing and sales tasks.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.tasks-BlLIEoVE.js`),__vite__mapDeps([96,2,1,3,4,5,6,7,50,56,70,28,30,19,22,59,60,62,63,68,20,23,75,49,17,18,76])),`component`)}),vv=B(`/_authenticated/admin/marketing/templates`)({head:()=>({meta:[{title:`Email templates — Shutter Media marketing`},{name:`description`,content:`House outreach and follow-up templates with merge tags for personalised sends.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Email templates — Shutter Media marketing`},{property:`og:description`,content:`Reusable outreach and follow-up email templates.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.templates-CpA_sWBl.js`),__vite__mapDeps([97,2,1,50,56,65,28,66,19,20,21,22,4,35,58,59,60,23,53,75,3,5,6,7,49,17,18,76])),`component`)}),yv=B(`/_authenticated/admin/quotes/`)({head:()=>({meta:[{title:`Quotations — Shutter Media staff`},{name:`description`,content:`Create, track and send Shutter Media and 442 Media quotations.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Quotations — Shutter Media staff`},{property:`og:description`,content:`Create, track and send quotations.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.quotes.index-vm0tYPJx.js`),__vite__mapDeps([98,2,1,3,4,5,6,7,17,18,49,28,19,27,12,50,56,99,65,37,34,11,13,20,23,61,22,59,62,63,52,53,54])),`component`)}),bv=B(`/_authenticated/admin/quotes/$id`)({head:()=>({meta:[{title:`Quote builder — Shutter Media`},{name:`description`,content:`Build, price and send a Shutter Media quotation.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Quote builder — Shutter Media`},{property:`og:description`,content:`Build, price and send a quotation.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.quotes._id-BhP7QjxQ.js`),__vite__mapDeps([100,2,1,6,5,7,3,4,11,12,17,18,49,28,19,27,50,56,90,70,30,22,59,60,62,63,68,99,31,32,79,65,66,33,13,34,20,21,35,58,23,61,67,52,53,54])),`component`)}),xv=B(`/_authenticated/admin/marketing/campaigns/`)({head:()=>({meta:[{title:`Campaigns — Shutter Media marketing`},{name:`description`,content:`Build, approve and send targeted outreach campaigns to councils, BIDs and businesses.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Campaigns — Shutter Media marketing`},{property:`og:description`,content:`Outreach campaign builder and sending queue.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.campaigns.index-BPK6KrPN.js`),__vite__mapDeps([101,2,1,3,4,5,6,7,17,18,50,56,65,28,19,20,21,22,23,67,33,59,63,68,53,75,49])),`component`)}),Sv=B(`/_authenticated/admin/marketing/campaigns/$id`)({head:()=>({meta:[{title:`Campaign builder — Shutter Media marketing`},{name:`description`,content:`Target, personalise, approve and send an outreach campaign.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Campaign builder — Shutter Media marketing`},{property:`og:description`,content:`Build and send an outreach campaign.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.campaigns._id-M0HyeVDc.js`),__vite__mapDeps([102,2,1,49,5,3,4,6,7,17,18,28,19,27,12,50,56,70,30,22,59,60,62,63,68,32,51,74,11,13,20,21,35,58,23,61,53,75,76,77,80,81])),`component`)}),Cv=B(`/_authenticated/admin/marketing/organisations/`)({head:()=>({meta:[{title:`Organisations — Shutter Media marketing`},{name:`description`,content:`Council, BID and business records in the Shutter Media marketing database.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Organisations — Shutter Media marketing`},{property:`og:description`,content:`Marketing organisation database.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.organisations.index-CBSmOUWc.js`),__vite__mapDeps([103,2,1,3,4,5,6,7,17,18,50,56,70,28,30,19,22,59,60,62,63,68,65,37,20,21,23,67,33,53,75,49,76,80,81,86])),`component`)}),wv=B(`/_authenticated/admin/marketing/organisations/$id`)({head:()=>({meta:[{title:`Organisation profile — Shutter Media marketing`},{name:`description`,content:`Full marketing profile: contacts, funding, emails, notes, tasks and follow-ups.`},{name:`robots`,content:`noindex, nofollow`},{property:`og:title`,content:`Organisation profile — Shutter Media marketing`},{property:`og:description`,content:`Marketing organisation profile.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`}]}),component:V(()=>$(()=>import(`./admin.marketing.organisations._id-BW96a49-.js`),__vite__mapDeps([104,2,1,27,5,12,50,56,28,70,4,30,19,22,59,60,62,63,68,32,65,74,11,13,20,21,35,58,23,61,53,75,3,6,7,49,17,18,76,80,81])),`component`)}),Tv=dg.update({id:`/`,path:`/`,getParentRoute:()=>Xh}),Ev=fg.update({id:`/$`,path:`/$`,getParentRoute:()=>Xh}),Dv=pg.update({id:`/_authenticated`,getParentRoute:()=>Xh}),Ov=_g.update({id:`/about`,path:`/about`,getParentRoute:()=>Xh}),kv=vg.update({id:`/about.html`,path:`/about.html`,getParentRoute:()=>Xh}),Av=yg.update({id:`/auth`,path:`/auth`,getParentRoute:()=>Xh}),jv=Cg.update({id:`/contact`,path:`/contact`,getParentRoute:()=>Xh}),Mv=wg.update({id:`/contact.html`,path:`/contact.html`,getParentRoute:()=>Xh}),Nv=jg.update({id:`/outdoor-advertising`,path:`/outdoor-advertising`,getParentRoute:()=>Xh}),Pv=Qg.update({id:`/roller-shutter-resprays`,path:`/roller-shutter-resprays`,getParentRoute:()=>Xh}),Fv=g_.update({id:`/shutter-advertising`,path:`/shutter-advertising`,getParentRoute:()=>Xh}),Iv=j_.update({id:`/shutter-graphics`,path:`/shutter-graphics`,getParentRoute:()=>Xh}),Lv=M_.update({id:`/shutter-graphics.html`,path:`/shutter-graphics.html`,getParentRoute:()=>Xh}),Rv=N_.update({id:`/shutter-wraps`,path:`/shutter-wraps`,getParentRoute:()=>Xh}
23),zv=P_.update({id:`/street-furniture-wraps`,path:`/street-furniture-wraps`,getParentRoute:()=>Xh}),Bv=F_.update({id:`/vinyl-graphics`,path:`/vinyl-graphics`,getParentRoute:()=>Xh}),Vv=I_.update({id:`/window-graphics`,path:`/window-graphics`,getParentRoute:()=>Xh}),Hv=B_.update({id:`/work`,path:`/work`,getParentRoute:()=>Xh}),Uv=q_.update({id:`/guides/roller-shutter-graphics-vs-shopfront-signs`,path:`/guides/roller-shutter-graphics-vs-shopfront-signs`,getParentRoute:()=>Xh}),Wv=J_.update({id:`/roller-shutter-graphics/`,path:`/roller-shutter-graphics/`,getParentRoute:()=>Xh}),Gv=Y_.update({id:`/roller-shutter-graphics/$location`,path:`/roller-shutter-graphics/$location`,getParentRoute:()=>Xh}),Kv=Z_.update({id:`/services/$slug`,path:`/services/$slug`,getParentRoute:()=>Xh}),qv=Q_.update({id:`/admin/`,path:`/admin/`,getParentRoute:()=>Dv}),Jv=$_.update({id:`/admin/brands`,path:`/admin/brands`,getParentRoute:()=>Dv}),Yv=ev.update({id:`/admin/customers`,path:`/admin/customers`,getParentRoute:()=>Dv}),Xv=tv.update({id:`/admin/expenses`,path:`/admin/expenses`,getParentRoute:()=>Dv}),Zv=nv.update({id:`/admin/pl`,path:`/admin/pl`,getParentRoute:()=>Dv}),Qv=rv.update({id:`/admin/products`,path:`/admin/products`,getParentRoute:()=>Dv}),$v=iv.update({id:`/admin/marketing/`,path:`/admin/marketing/`,getParentRoute:()=>Dv}),ey=av.update({id:`/admin/marketing/contacts`,path:`/admin/marketing/contacts`,getParentRoute:()=>Dv}),ty=ov.update({id:`/admin/marketing/followups`,path:`/admin/marketing/followups`,getParentRoute:()=>Dv}),ny=sv.update({id:`/admin/marketing/funding`,path:`/admin/marketing/funding`,getParentRoute:()=>Dv}),ry=cv.update({id:`/admin/marketing/import`,path:`/admin/marketing/import`,getParentRoute:()=>Dv}),iy=lv.update({id:`/admin/marketing/inbox`,path:`/admin/marketing/inbox`,getParentRoute:()=>Dv}),ay=uv.update({id:`/admin/marketing/media`,path:`/admin/marketing/media`,getParentRoute:()=>Dv}),oy=dv.update({id:`/admin/marketing/pdfs`,path:`/admin/marketing/pdfs`,getParentRoute:()=>Dv}),sy=fv.update({id:`/admin/marketing/pipeline`,path:`/admin/marketing/pipeline`,getParentRoute:()=>Dv}),cy=pv.update({id:`/admin/marketing/proposals`,path:`/admin/marketing/proposals`,getParentRoute:()=>Dv}),ly=mv.update({id:`/admin/marketing/reports`,path:`/admin/marketing/reports`,getParentRoute:()=>Dv}),uy=hv.update({id:`/admin/marketing/settings`,path:`/admin/marketing/settings`,getParentRoute:()=>Dv}),dy=gv.update({id:`/admin/marketing/suppression`,path:`/admin/marketing/suppression`,getParentRoute:()=>Dv}),fy=_v.update({id:`/admin/marketing/tasks`,path:`/admin/marketing/tasks`,getParentRoute:()=>Dv}),py=vv.update({id:`/admin/marketing/templates`,path:`/admin/marketing/templates`,getParentRoute:()=>Dv}),my=yv.update({id:`/admin/quotes/`,path:`/admin/quotes/`,getParentRoute:()=>Dv}),hy=bv.update({id:`/admin/quotes/$id`,path:`/admin/quotes/$id`,getParentRoute:()=>Dv}),gy=xv.update({id:`/admin/marketing/campaigns/`,path:`/admin/marketing/campaigns/`,getParentRoute:()=>Dv}),_y=Sv.update({id:`/admin/marketing/campaigns/$id`,path:`/admin/marketing/campaigns/$id`,getParentRoute:()=>Dv}),vy=Cv.update({id:`/admin/marketing/organisations/`,path:`/admin/marketing/organisations/`,getParentRoute:()=>Dv}),yy={AuthenticatedAdminBrandsRoute:Jv,AuthenticatedAdminCustomersRoute:Yv,AuthenticatedAdminExpensesRoute:Xv,AuthenticatedAdminPlRoute:Zv,AuthenticatedAdminProductsRoute:Qv,AuthenticatedAdminIndexRoute:qv,AuthenticatedAdminMarketingContactsRoute:ey,AuthenticatedAdminMarketingFollowupsRoute:ty,AuthenticatedAdminMarketingFundingRoute:ny,AuthenticatedAdminMarketingImportRoute:ry,AuthenticatedAdminMarketingInboxRoute:iy,AuthenticatedAdminMarketingMediaRoute:ay,AuthenticatedAdminMarketingPdfsRoute:oy,AuthenticatedAdminMarketingPipelineRoute:sy,AuthenticatedAdminMarketingProposalsRoute:cy,AuthenticatedAdminMarketingReportsRoute:ly,AuthenticatedAdminMarketingSettingsRoute:uy,AuthenticatedAdminMarketingSuppressionRoute:dy,AuthenticatedAdminMarketingTasksRoute:fy,AuthenticatedAdminMarketingTemplatesRoute:py,AuthenticatedAdminQuotesIdRoute:hy,AuthenticatedAdminMarketingIndexRoute:$v,AuthenticatedAdminQuotesIndexRoute:my,AuthenticatedAdminMarketingCampaignsIdRoute:_y,AuthenticatedAdminMarketingOrganisationsIdRoute:wv.update({id:`/admin/marketing/organisations/$id`,path:`/admin/marketing/organisations/$id`,getParentRoute:()=>Dv}),AuthenticatedAdminMarketingCampaignsIndexRoute:gy,AuthenticatedAdminMarketingOrganisationsIndexRoute:vy},by={IndexRoute:Tv,AuthenticatedRouteRoute:Dv._addFileChildren(yy),SplatRoute:Ev,AboutRoute:Ov,AboutDothtmlRoute:kv,AuthRoute:Av,ContactRoute:jv,ContactDothtmlRoute:Mv,OutdoorAdvertisingRoute:Nv,RollerShutterRespraysRoute:Pv,ShutterAdvert
23isingRoute:Fv,ShutterGraphicsRoute:Iv,ShutterGraphicsDothtmlRoute:Lv,ShutterWrapsRoute:Rv,StreetFurnitureWrapsRoute:zv,VinylGraphicsRoute:Bv,WindowGraphicsRoute:Vv,WorkRoute:Hv,GuidesRollerShutterGraphicsVsShopfrontSignsRoute:Uv,RollerShutterGraphicsLocationRoute:Gv,ServicesSlugRoute:Kv,RollerShutterGraphicsIndexRoute:Wv},xy=Xh._addFileChildren(by);function Sy({error:e}){return console.error(e),(0,z.jsx)(`div`,{className:`flex min-h-screen items-center justify-center px-4`,children:(0,z.jsxs)(`div`,{className:`max-w-md text-center`,children:[(0,z.jsx)(`h1`,{className:`text-xl font-semibold`,children:`This page didn't load`}),(0,z.jsx)(`p`,{className:`mt-2 text-sm text-neutral-600`,children:`Something went wrong. Please refresh or head back home.`}),(0,z.jsx)(`a`,{href:`/`,className:`mt-6 inline-flex items-center rounded-md bg-orange-600 px-4 py-2 text-sm font-medium text-white hover:bg-orange-700`,children:`Go home`})]})})}var Cy=()=>Hs({routeTree:xy,context:{queryClient:new uh},scrollRestoration:!0,defaultPreloadStaleTime:0,defaultErrorComponent:Sy});async function wy(){let e=await Cy(),t;if(lm){let n=await lm.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(Vo),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:``,serializationAdapters:t}),e.stores.matchesId.get().length||await Wo(e),e}var Ty=wy;async function Ey(){let e=await Ty();return window.$_TSR?.h(),e}var Dy;function Oy(){return Dy||=Ey(),(0,z.jsx)(Ko,{promise:Dy,children:e=>(0,z.jsx)(Gs,{router:e})})}var ky=Pe();(0,R.startTransition)(()=>{(0,ky.hydrateRoot)(document,(0,z.jsx)(R.StrictMode,{children:(0,z.jsx)(Oy,{})}))});export{am as $,Tg as A,Tm as B,Gg as C,Rg as D,Kg as E,oh as F,bm as G,gm as H,nh as I,ym as J,km as K,Gm as L,$h as M,Ah as N,Lg as O,fh as P,em as Q,Hm as R,Vg as S,Ug as T,Pm as U,vm as V,xm as W,dm as X,pm as Y,um as Z,s_ as _,X_ as a,Ls as at,Hg as b,A_ as c,Ue as ct,T_ as d,$ as et,C_ as f,__ as g,y_ as h,Z_ as i,$s as it,tg as j,Ig as k,O_ as l,Le as lt,x_ as m,Sv as n,rc as nt,Y_ as o,ys as ot,S_ as p,zm as q,bv as r,ac as rt,V_ as s,Bo as st,wv as t,nc as tt,D_ as u,c_ as v,Bg as w,Wg as x,l_ as y,Vm as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.