PageSourceSearch

https://royalcoatingeg.com/assets/index-sqEvBVY5.js

js royalcoatingeg.com collected 2026-10-09 22:03:24 UTC 821,311 bytes, 332 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Products-CjWOe7xL.js","assets/systemCategories-xoct-Wl5.js","assets/ProductDetail-rlQb3AVW.js","assets/arrow-left-CYsrfXWp.js","assets/check-CF5CHj-K.js","assets/shield-C9juA-eU.js","assets/AutomotiveRefinish-DhWzNnOS.js","assets/SectorPage-BMvN-b88.js","assets/CarCare-BtEqJFaA.js","assets/WoodCoatings-guhJ3R-A.js","assets/Industrial-C1dodmUO.js","assets/AeroplaneCoating-DctIPITG.js","assets/RailwayCoating-CSFOK81r.js","assets/RoyalLab-CThjizlq.js","assets/clipboard-check-Bx0MaHca.js","assets/building-2-CNmJYVfQ.js","assets/globe-W8s-tQ9T.js","assets/About-CtfFeRqm.js","assets/useCertifications-20yrGC5w.js","assets/useTeam-obWV6wLM.js","assets/layers-Dn9ZiETI.js","assets/Contact-sTwrIJeI.js","assets/skeleton-HkqAHaBQ.js","assets/leadNotify-CU9F6qR7.js","assets/Events-w2sbi24o.js","assets/useEvents-BYnkldbE.js","assets/calendar-days-DBTvr_6Q.js","assets/ticket-Ce8Odgbv.js","assets/EventDetail-8Hit7ygY.js","assets/Careers-CEEnCSZY.js","assets/useCareers-CsqSHw_6.js","assets/clock-BeyDkJFq.js","assets/users-CFU1d3KV.js","assets/CareerDetail-DxbeVQwe.js","assets/label-CAxzfuKh.js","assets/circle-check-9s3f6E1Z.js","assets/upload-CqG0Oeah.js","assets/Partners-Ch0ZNLfG.js","assets/usePartners-BomEgkEQ.js","assets/Certifications-BhwQ1aQv.js","assets/Projects-yceiEbF8.js","assets/sectorMeta-BarXcxhB.js","assets/ProjectDetail-CZeH7jmG.js","assets/calendar-CV_aEgIN.js","assets/Quote-S3doRriI.js","assets/plus-DKeQAi5x.js","assets/trash-2-C_yPVhl1.js","assets/Insights-BL39952H.js","assets/InsightDetail-CGfZAywI.js","assets/Resources-DHkQ69FC.js","assets/Training-Cy4zd0jn.js","assets/ColorSupport-DUMXW1sR.js","assets/Ar-DGMNg1DB.js","assets/WhereToBuy-DZN1B1SP.js","assets/ExportMarkets-CE4Va7rO.js","assets/handshake-DEZNeHcl.js","assets/Auth-UO17RvE_.js","assets/BrandLayout-B218Hedi.js","assets/BrandUI-Cbg5Kto8.js","assets/BrandOverview-DjD8
vendor: 5,128 bytes, lines 1-10
1-LRD.js","assets/BrandDna-Ky1GVaaj.js","assets/BrandLogo-DGGi4Rg2.js","assets/BrandColor-vxpdIYtT.js","assets/TokenExportBar-AjxaYnEV.js","assets/BrandTypography-74J3a5Hu.js","assets/BrandVoice-UrukUxsG.js","assets/BrandImagery-ee7iRxWA.js","assets/BrandAssets-BrLjoJdS.js","assets/AdminLayout-BUJUSSs2.js","assets/inbox-BoXpRnoC.js","assets/AdminPages-DcTaM3-C.js","assets/productDocSync-DObCCK6S.js","assets/AdminProducts-BkMMjgqT.js","assets/accordion-7ZlNEebw.js","assets/pdfMeta-Bvhq86UR.js","assets/AdminFooter-CWX1eHvd.js","assets/AdminContent-DNAH4TfU.js","assets/AdminResources-B6xi3sbd.js","assets/AdminTraining-Bx_UR4X7.js","assets/AdminInbox-DLnIUpEy.js","assets/AdminTeam-BtFd9OMr.js","assets/AdminEvents-B-2S684-.js","assets/AdminCareers-DzZgsMAo.js","assets/AdminDistributors-Cz1GlICs.js"])))=>i.map(i=>d[i]);
2var cA=Object.defineProperty;var Gy=e=>{throw TypeError(e)};var uA=(e,t,n)=>t in e?cA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Gn=(e,t,n)=>uA(e,typeof t!="symbol"?t+"":t,n),rh=(e,t,n)=>t.has(e)||Gy("Cannot "+n);var k=(e,t,n)=>(rh(e,t,"read from private field"),n?n.call(e):t.get(e)),ne=(e,t,n)=>t.has(e)?Gy("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),q=(e,t,n,r)=>(rh(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ce=(e,t,n)=>(rh(e,t,"access private method"),n);var ql=(e,t,n,r)=>({set _(s){q(e,t,s,n)},get _(){return k(e,t,r)}});function dA(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function kl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wx={exports:{}},ld={},bx={exports:{}},ae={};/**
3 * @license React
4 * react.production.min.js
5 *
6 * Copyright (c) Facebook, Inc. and its affiliates.
7 *
8 * This source code is licensed under the MIT license found in the
9 * LICENSE file in the root directory of this source tree.
10 */var Cl=Symbol.for("react.element"),hA=Symbol.for("react.portal"),fA=Symbol.for("react.fragment"),pA=Symbol.for("react.strict_mode"),mA=Symbol.for("react.profiler"),gA=Symbol.for("react.provider"),yA=Symbol.for("react.context"),vA=Symbol.for("react.forward_ref"),wA=Symbol.for("react.suspense"),bA=Symbol.for("react.memo"),xA=Symbol.for("react.lazy"),Qy=Symbol.iterator;function SA(e){return e===null||typeof e!="object"?null:(e=Qy&&e[Qy]||e["@@iterator"],typeof e=="function"?e:null)}var xx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Sx=Object.assign,_x={};function jo(e,t,n){this.props=e,this.context=t,this.refs=_x,this.updater=n||xx}jo.prototype.isReactComponent={};jo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};jo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ex(){}Ex.prototype=jo.prototype;function $m(e,t,n){this.props=e,this.context=t,this.refs=_x,this.updater=n||xx}var Fm=$m.prototype=new Ex;Fm.constructor=$m;Sx(Fm,jo.prototype);Fm.isPureReactComponent=!0;var Yy=Array.isArray,Tx=Object.prototype.hasOwnProperty,Um={current:null},kx={key:!0,ref:!0,__self:!0,__source:!0};function Cx(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Tx.call(t,r)&&!kx.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:Cl,type:e,key:i,ref:o,props:s,_owner:Um.current}}function _A(e,t){return{$$typeof:Cl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Vm(e){return typeof e=="object"&&e!==null&&e.$$typeof===Cl}function EA(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Jy=/\/+/g;function sh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?EA(""+e.key):t.toString(36)}
vendor: 4,786 bytes, lines 10-18
10function Ic(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Cl:case hA:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+sh(o,0):r,Yy(s)?(n="",e!=null&&(n=e.replace(Jy,"$&/")+"/"),Ic(s,t,n,"",function(c){return c})):s!=null&&(Vm(s)&&(s=_A(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Jy,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Yy(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+sh(i,a);o+=Ic(i,t,n,l,s)}else if(l=SA(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+sh(i,a++),o+=Ic(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Kl(e,t,n){if(e==null)return e;var r=[],s=0;return Ic(e,r,"","",function(i){return t.call(n,i,s++)}),r}function TA(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var gt={current:null},Lc={transition:null},kA={ReactCurrentDispatcher:gt,ReactCurrentBatchConfig:Lc,ReactCurrentOwner:Um};function Ax(){throw Error("act(...) is not supported in production builds of React.")}ae.Children={map:Kl,forEach:function(e,t,n){Kl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Kl(e,function(){t++}),t},toArray:function(e){return Kl(e,function(t){return t})||[]},only:function(e){if(!Vm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ae.Component=jo;ae.Fragment=fA;ae.Profiler=mA;ae.PureComponent=$m;ae.StrictMode=pA;ae.Suspense=wA;ae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kA;ae.act=Ax;ae.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Sx({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Um.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Tx.call(t,l)&&!kx.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Cl,type:e.type,key:s,ref:i,props:r,_owner:o}};ae.createContext=function(e){return e={$$typeof:yA,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:gA,_context:e},e.Consumer=e};ae.createElement=Cx;ae.createFactory=function(e){var t=Cx.bind(null,e);return t.type=e,t};ae.createRef=function(){return{current:null}};ae.forwardRef=function(e){return{$$typeof:vA,render:e}};ae.isValidElement=Vm;ae.lazy=function(e){return{$$typeof:xA,_payload:{_status:-1,_result:e},_init:TA}};ae.memo=function(e,t){return{$$typeof:bA,type:e,compare:t===void 0?null:t}};ae.startTransition=function(e){var t=Lc.transition;Lc.transition={};try{e()}finally{Lc.transition=t}};ae.unstable_act=Ax;ae.useCallback=function(e,t){return gt.current.useCallback(e,t)};ae.useContext=function(e){return gt.current.useContext(e)};ae.useDebugValue=function(){};ae.useDeferredValue=function(e){return gt.current.useDeferredValue(e)};ae.useEffect=function(e,t){return gt.current.useEffect(e,t)};ae.useId=function(){return gt.current.useId()};ae.useImperativeHandle=function(e,t,n){return gt.current.useImperativeHandle(e,t,n)};ae.useInsertionEffect=function(e,t){return gt.current.useInsertionEffect(e,t)};ae.useLayoutEffect=function(e,t){return gt.current.useLayoutEffect(e,t)};ae.useMemo=function(e,t){return gt.current.useMemo(e,t)};ae.useReducer=function(e,t,n){return gt.current.useReducer(e,t,n)};ae.useRef=function(e){return gt.current.useRef(e)};ae.useState=function(e){return gt.current.useState(e)};ae.useSyncExternalStore=function(e,t,n){return gt.current.useSyncExternalStore(e,t,n)};ae.useTransition=function(){return gt.current.useTransition()};ae.version="18.3.1";bx.exports=ae;var m=bx.exports;const N=kl(m),Bm=dA({__proto__:null,default:N},[m]);/**
11 * @license React
12 * react-jsx-runtime.production.min.js
13 *
14 * Copyright (c) Facebook, Inc. and its affiliates.
15 *
16 * This source code is licensed under the MIT license found in the
17 * LICENSE file in the root directory of this source tree.
18 */var CA=m,AA=Symbol.for("react.element"),RA=Symbol.for("react.fragment"),PA=Object.prototype.hasOwnProperty,jA=CA.__SECRET_INT
vendor: 11,400 bytes, lines 18-35
18ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,OA={key:!0,ref:!0,__self:!0,__source:!0};function Rx(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)PA.call(t,r)&&!OA.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:AA,type:e,key:i,ref:o,props:s,_owner:jA.current}}ld.Fragment=RA;ld.jsx=Rx;ld.jsxs=Rx;wx.exports=ld;var f=wx.exports,Px={exports:{}},Mt={},jx={exports:{}},Ox={};/**
19 * @license React
20 * scheduler.production.min.js
21 *
22 * Copyright (c) Facebook, Inc. and its affiliates.
23 *
24 * This source code is licensed under the MIT license found in the
25 * LICENSE file in the root directory of this source tree.
26 */(function(e){function t(P,j){var $=P.length;P.push(j);e:for(;0<$;){var Z=$-1>>>1,R=P[Z];if(0<s(R,j))P[Z]=j,P[$]=R,$=Z;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var j=P[0],$=P.pop();if($!==j){P[0]=$;e:for(var Z=0,R=P.length,F=R>>>1;Z<F;){var z=2*(Z+1)-1,B=P[z],se=z+1,J=P[se];if(0>s(B,$))se<R&&0>s(J,B)?(P[Z]=J,P[se]=$,Z=se):(P[Z]=B,P[z]=$,Z=z);else if(se<R&&0>s(J,$))P[Z]=J,P[se]=$,Z=se;else break e}}return j}function s(P,j){var $=P.sortIndex-j.sortIndex;return $!==0?$:P.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,p=3,h=!1,v=!1,g=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(P){for(var j=n(c);j!==null;){if(j.callback===null)r(c);else if(j.startTime<=P)r(c),j.sortIndex=j.expirationTime,t(l,j);else break;j=n(c)}}function S(P){if(g=!1,w(P),!v)if(n(l)!==null)v=!0,H(_);else{var j=n(c);j!==null&&re(S,j.startTime-P)}}function _(P,j){v=!1,g&&(g=!1,y(C),C=-1),h=!0;var $=p;try{for(w(j),d=n(l);d!==null&&(!(d.expirationTime>j)||P&&!M());){var Z=d.callback;if(typeof Z=="function"){d.callback=null,p=d.priorityLevel;var R=Z(d.expirationTime<=j);j=e.unstable_now(),typeof R=="function"?d.callback=R:d===n(l)&&r(l),w(j)}else r(l);d=n(l)}if(d!==null)var F=!0;else{var z=n(c);z!==null&&re(S,z.startTime-j),F=!1}return F}finally{d=null,p=$,h=!1}}var E=!1,T=null,C=-1,O=5,A=-1;function M(){return!(e.unstable_now()-A<O)}function I(){if(T!==null){var P=e.unstable_now();A=P;var j=!0;try{j=T(!0,P)}finally{j?Q():(E=!1,T=null)}}else E=!1}var Q;if(typeof b=="function")Q=function(){b(I)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,Y=D.port2;D.port1.onmessage=I,Q=function(){Y.postMessage(null)}}else Q=function(){x(I,0)};function H(P){T=P,E||(E=!0,Q())}function re(P,j){C=x(function(){P(e.unstable_now())},j)}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(P){P.callback=null},e.unstable_continueExecution=function(){v||h||(v=!0,H(_))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(P){switch(p){case 1:case 2:case 3:var j=3;break;default:j=p}var $=p;p=j;try{return P()}finally{p=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,j){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var $=p;p=P;try{return j()}finally{p=$}},e.unstable_scheduleCallback=function(P,j,$){var Z=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?Z+$:Z):$=Z,P){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=$+R,P={id:u++,callback:j,priorityLevel:P,startTime:$,expirationTime:R,sortIndex:-1},$>Z?(P.sortIndex=$,t(c,P),n(l)===null&&P===n(c)&&(g?(y(C),C=-1):g=!0,re(S,$-Z))):(P.sortIndex=R,t(l,P),v||h||(v=!0,H(_))),P},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(P){var j=p;return function(){var $=p;p=j;try{return P.apply(this,arguments)}finally{p=$}}}})(Ox);jx.exports=Ox;var NA=jx.exports;/**
27 * @license React
28 * react-dom.production.min.js
29 *
30 * Copyright (c) Facebook, Inc. and its affiliates.
31 *
32 * This source code is licensed under the MIT license found in the
33 * LICENSE file in the root directory of this source tree.
34 */var IA=m,Dt=NA;function L(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Nx=new Set,$a={};function ri(e,t){go(e,t),go(e+"Capture",t)}function go(e,t){for($a[e]=t,e=0;e<t.length;e++)Nx.add(t[e])}var or=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sf=Object.prototype.hasOwnProperty,LA=/^[: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]*$/,Xy={},Zy={};function DA(e){return Sf.call(Zy,e)?!0:Sf.call(Xy,e)?!1:LA.test(e)?Zy[e]=!0:(Xy[e]=!0,!1)}function MA(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $A(e,t,n,r){if(t===null||typeof t>"u"||MA(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function yt(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var st={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){st[e]=new yt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];st[t]=new yt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){st[e]=new yt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){st[e]=new yt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){st[e]=new yt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){st[e]=new yt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){st[e]=new yt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){st[e]=new yt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){st[e]=new yt(e,5,!1,e.toLowerCase(),null,!1,!1)});var zm=/[\-:]([a-z])/g;function Hm(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(zm,Hm);st[t]=new yt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(zm,Hm);st[t]=new yt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(zm,Hm);st[t]=new yt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){st[e]=new yt(e,1,!1,e.toLowerCase(),null,!1,!1)});st.xlinkHref=new yt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){st[e]=new yt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Wm(e,t,n,r){var s=st.hasOwnProperty(t)?st[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&($A(t,n,s,r)&&(n=null),r||s===null?DA(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var fr=IA.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Gl=Symbol.for("react.element"),Ri=Symbol.for("react.portal"),Pi=Symbol.for("react.fragment"),qm=Symbol.for("react.strict_mode"),_f=Symbol.for("react.profiler"),Ix=Symbol.for("react.provider"),Lx=Symbol.for("react.context"),Km=Symbol.for("react.forward_ref"),Ef=Symbol.for("react.suspense"),Tf=Symbol.for("react.suspense_list"),Gm=Symbol.for("react.memo"),Ar=Symbol.for("react.lazy"),Dx=Symbol.for("react.offscreen"),ev=Symbol.iterator;function Go(e){return e===null||typeof e!="object"?null:(e=ev&&e[ev]||e["@@iterator"],typeof e=="function"?e:null)}var Oe=Object.assign,ih;function ua(e){if(ih===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ih=t&&t[1]||""}return`
35`+ih+e}var oh=!1;function ah(e,t){if(!e||oh)return"";oh=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}
vendor: 15,597 bytes, lines 35-38
35catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
36`),i=r.stack.split(`
37`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
38`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{oh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ua(e):""}function FA(e){switch(e.tag){case 5:return ua(e.type);case 16:return ua("Lazy");case 13:return ua("Suspense");case 19:return ua("SuspenseList");case 0:case 2:case 15:return e=ah(e.type,!1),e;case 11:return e=ah(e.type.render,!1),e;case 1:return e=ah(e.type,!0),e;default:return""}}function kf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Pi:return"Fragment";case Ri:return"Portal";case _f:return"Profiler";case qm:return"StrictMode";case Ef:return"Suspense";case Tf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Lx:return(e.displayName||"Context")+".Consumer";case Ix:return(e._context.displayName||"Context")+".Provider";case Km:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gm:return t=e.displayName||null,t!==null?t:kf(e.type)||"Memo";case Ar:t=e._payload,e=e._init;try{return kf(e(t))}catch{}}return null}function UA(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return kf(t);case 8:return t===qm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function rs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Mx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function VA(e){var t=Mx(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ql(e){e._valueTracker||(e._valueTracker=VA(e))}function $x(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Mx(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function uu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Cf(e,t){var n=t.checked;return Oe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function tv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=rs(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Fx(e,t){t=t.checked,t!=null&&Wm(e,"checked",t,!1)}function Af(e,t){Fx(e,t);var n=rs(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Rf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Rf(e,t.type,rs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function nv(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Rf(e,t,n){(t!=="number"||uu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var da=Array.isArray;function Wi(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+rs(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Pf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(L(91));return Oe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function rv(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(L(92));if(da(n)){if(1<n.length)throw Error(L(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:rs(n)}}function Ux(e,t){var n=rs(t.value),r=rs(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function sv(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Vx(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function jf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Vx(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Yl,Bx=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Yl=Yl||document.createElement("div"),Yl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Yl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var xa={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},BA=["Webkit","ms","Moz","O"];Object.keys(xa).forEach(function(e){BA.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xa[t]=xa[e]})});function zx(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||xa.hasOwnProperty(e)&&xa[e]?(""+t).trim():t+"px"}function Hx(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=zx(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var zA=Oe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Of(e,t){if(t){if(zA[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function Nf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var If=null;function Qm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Lf=null,qi=null,Ki=null;function iv(e){if(e=Pl(e)){if(typeof Lf!="function")throw Error(L(280));var t=e.stateNode;t&&(t=fd(t),Lf(e.stateNode,e.type,t))}}function Wx(e){qi?Ki?Ki.push(e):Ki=[e]:qi=e}function qx(){if(qi){var e=qi,t=Ki;if(Ki=qi=null,iv(e),t)for(e=0;e<t.length;e++)iv(t[e])}}function Kx(e,t){return e(t)}function Gx(){}var lh=!1;function Qx(e,t,n){if(lh)return e(t,n);lh=!0;try{return Kx(e,t,n)}finally{lh=!1,(qi!==null||Ki!==null)&&(Gx(),qx())}}function Ua(e,t){var n=e.stateNode;if(n===null)return null;var r=fd(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(L(231,t,typeof n));return n}var Df=!1;if(or)try{var Qo={};Object.defineProperty(Qo,"passive",{get:function(){Df=!0}}),window.addEventListener("test",Qo,Qo),window.removeEventListener("test",Qo,Qo)}catch{Df=!1}function HA(e,t,n,r,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Sa=!1,du=null,hu=!1,Mf=null,WA={onError:function(e){Sa=!0,du=e}};function qA(e,t,n,r,s,i,o,a,l){Sa=!1,du=null,HA.apply(WA,arguments)}function KA(e,t,n,r,s,i,o,a,l){if(qA.apply(this,arguments),Sa){if(Sa){var c=du;Sa=!1,du=null}else throw Error(L(198));hu||(hu=!0,Mf=c)}}function si(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 Yx(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 ov(e){if(si(e)!==e)throw Error(L(188))}function GA(e){var t=e.alternate;if(!t){if(t=si(e),t===null)throw Error(L(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return ov(s),e;if(i===r)return ov(s),t;i=i.sibling}throw Error(L(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(L(189))}}if(n.alternate!==r)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?e:t}function Jx(e){return e=GA(e),e!==null?Xx(e):null}function Xx(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Xx(e);if(t!==null)return t;e=e.sibling}return null}var Zx=Dt.unstable_scheduleCallback,av=Dt.unstable_cancelCallback,QA=Dt.unstable_shouldYield,YA=Dt.unstable_requestPaint,Me=Dt.unstable_now,JA=Dt.unstable_getCurrentPriorityLevel,Ym=Dt.unstable_ImmediatePriority,e1=Dt.unstable_UserBlockingPriority,fu=Dt.unstable_NormalPriority,XA=Dt.unstable_LowPriority,t1=Dt.unstable_IdlePriority,cd=null,Fn=null;function ZA(e){if(Fn&&typeof Fn.onCommitFiberRoot=="function")try{Fn.onCommitFiberRoot(cd,e,void 0,(e.current.flags&128)===128)}catch{}}var wn=Math.clz32?Math.clz32:nR,eR=Math.log,tR=Math.LN2;function nR(e){return e>>>=0,e===0?32:31-(eR(e)/tR|0)|0}var Jl=64,Xl=4194304;function ha(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=ha(a):(i&=o,i!==0&&(r=ha(i)))}else o=n&~s,o!==0?r=ha(o):i!==0&&(r=ha(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-wn(t),s=1<<n,r|=e[n],t&=~s;return r}function rR(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function sR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-wn(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=rR(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function $f(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function n1(){var e=Jl;return Jl<<=1,!(Jl&4194240)&&(Jl=64),e}function ch(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Al(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-wn(t),e[t]=n}function iR(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-wn(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function Jm(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-wn(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var me=0;function r1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var s1,Xm,i1,o1,a1,Ff=!1,Zl=[],Kr=null,Gr=null,Qr=null,Va=new Map,Ba=new Map,Pr=[],oR="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function lv(e,t){switch(e){case"focusin":case"focusout":Kr=null;break;case"dragenter":case"dragleave":Gr=null;break;case"mouseover":case"mouseout":Qr=null;break;case"pointerover":case"pointerout":Va.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ba.delete(t.pointerId)}}function Yo(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Pl(t),t!==null&&Xm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}
vendor: 11,707 bytes, line 38
38function aR(e,t,n,r,s){switch(t){case"focusin":return Kr=Yo(Kr,e,t,n,r,s),!0;case"dragenter":return Gr=Yo(Gr,e,t,n,r,s),!0;case"mouseover":return Qr=Yo(Qr,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Va.set(i,Yo(Va.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Ba.set(i,Yo(Ba.get(i)||null,e,t,n,r,s)),!0}return!1}function l1(e){var t=Cs(e.target);if(t!==null){var n=si(t);if(n!==null){if(t=n.tag,t===13){if(t=Yx(n),t!==null){e.blockedOn=t,a1(e.priority,function(){i1(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 Dc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Uf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);If=r,n.target.dispatchEvent(r),If=null}else return t=Pl(n),t!==null&&Xm(t),e.blockedOn=n,!1;t.shift()}return!0}function cv(e,t,n){Dc(e)&&n.delete(t)}function lR(){Ff=!1,Kr!==null&&Dc(Kr)&&(Kr=null),Gr!==null&&Dc(Gr)&&(Gr=null),Qr!==null&&Dc(Qr)&&(Qr=null),Va.forEach(cv),Ba.forEach(cv)}function Jo(e,t){e.blockedOn===t&&(e.blockedOn=null,Ff||(Ff=!0,Dt.unstable_scheduleCallback(Dt.unstable_NormalPriority,lR)))}function za(e){function t(s){return Jo(s,e)}if(0<Zl.length){Jo(Zl[0],e);for(var n=1;n<Zl.length;n++){var r=Zl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Kr!==null&&Jo(Kr,e),Gr!==null&&Jo(Gr,e),Qr!==null&&Jo(Qr,e),Va.forEach(t),Ba.forEach(t),n=0;n<Pr.length;n++)r=Pr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Pr.length&&(n=Pr[0],n.blockedOn===null);)l1(n),n.blockedOn===null&&Pr.shift()}var Gi=fr.ReactCurrentBatchConfig,mu=!0;function cR(e,t,n,r){var s=me,i=Gi.transition;Gi.transition=null;try{me=1,Zm(e,t,n,r)}finally{me=s,Gi.transition=i}}function uR(e,t,n,r){var s=me,i=Gi.transition;Gi.transition=null;try{me=4,Zm(e,t,n,r)}finally{me=s,Gi.transition=i}}function Zm(e,t,n,r){if(mu){var s=Uf(e,t,n,r);if(s===null)wh(e,t,r,gu,n),lv(e,r);else if(aR(s,e,t,n,r))r.stopPropagation();else if(lv(e,r),t&4&&-1<oR.indexOf(e)){for(;s!==null;){var i=Pl(s);if(i!==null&&s1(i),i=Uf(e,t,n,r),i===null&&wh(e,t,r,gu,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else wh(e,t,r,null,n)}}var gu=null;function Uf(e,t,n,r){if(gu=null,e=Qm(r),e=Cs(e),e!==null)if(t=si(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Yx(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 gu=e,null}function c1(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(JA()){case Ym:return 1;case e1:return 4;case fu:case XA:return 16;case t1:return 536870912;default:return 16}default:return 16}}var zr=null,eg=null,Mc=null;function u1(){if(Mc)return Mc;var e,t=eg,n=t.length,r,s="value"in zr?zr.value:zr.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return Mc=s.slice(e,1<r?1-r:void 0)}function $c(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 ec(){return!0}function uv(){return!1}function $t(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ec:uv,this.isPropagationStopped=uv,this}return Oe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ec)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ec)},persist:function(){},isPersistent:ec}),t}var Oo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tg=$t(Oo),Rl=Oe({},Oo,{view:0,detail:0}),dR=$t(Rl),uh,dh,Xo,ud=Oe({},Rl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ng,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!==Xo&&(Xo&&e.type==="mousemove"?(uh=e.screenX-Xo.screenX,dh=e.screenY-Xo.screenY):dh=uh=0,Xo=e),uh)},movementY:function(e){return"movementY"in e?e.movementY:dh}}),dv=$t(ud),hR=Oe({},ud,{dataTransfer:0}),fR=$t(hR),pR=Oe({},Rl,{relatedTarget:0}),hh=$t(pR),mR=Oe({},Oo,{animationName:0,elapsedTime:0,pseudoElement:0}),gR=$t(mR),yR=Oe({},Oo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vR=$t(yR),wR=Oe({},Oo,{data:0}),hv=$t(wR),bR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xR={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},SR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _R(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=SR[e])?!!t[e]:!1}function ng(){return _R}var ER=Oe({},Rl,{key:function(e){if(e.key){var t=bR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=$c(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ng,charCode:function(e){return e.type==="keypress"?$c(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$c(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),TR=$t(ER),kR=Oe({},ud,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fv=$t(kR),CR=Oe({},Rl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ng}),AR=$t(CR),RR=Oe({},Oo,{propertyName:0,elapsedTime:0,pseudoElement:0}),PR=$t(RR),jR=Oe({},ud,{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}),OR=$t(jR),NR=[9,13,27,32],rg=or&&"CompositionEvent"in window,_a=null;or&&"documentMode"in document&&(_a=document.documentMode);var IR=or&&"TextEvent"in window&&!_a,d1=or&&(!rg||_a&&8<_a&&11>=_a),pv=" ",mv=!1;function h1(e,t){switch(e){case"keyup":return NR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ji=!1;function LR(e,t){switch(e){case"compositionend":return f1(t);case"keypress":return t.which!==32?null:(mv=!0,pv);case"textInput":return e=t.data,e===pv&&mv?null:e;default:return null}}function DR(e,t){if(ji)return e==="compositionend"||!rg&&h1(e,t)?(e=u1(),Mc=eg=zr=null,ji=!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 d1&&t.locale!=="ko"?null:t.data;default:return null}}var MR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function gv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!MR[e.type]:t==="textarea"}function p1(e,t,n,r){Wx(r),t=yu(t,"onChange"),0<t.length&&(n=new tg("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ea=null,Ha=null;function $R(e){T1(e,0)}function dd(e){var t=Ii(e);if($x(t))return e}function FR(e,t){if(e==="change")return t}var m1=!1;if(or){var fh;if(or){var ph="oninput"in document;if(!ph){var yv=document.createElement("div");yv.setAttribute("oninput","return;"),ph=typeof yv.oninput=="function"}fh=ph}else fh=!1;m1=fh&&(!document.documentMode||9<document.documentMode)}function vv(){Ea&&(Ea.detachEvent("onpropertychange",g1),Ha=Ea=null)}function g1(e){if(e.propertyName==="value"&&dd(Ha)){var t=[];p1(t,Ha,e,Qm(e)),Qx($R,t)}}function UR(e,t,n){e==="focusin"?(vv(),Ea=t,Ha=n,Ea.attachEvent("onpropertychange",g1)):e==="focusout"&&vv()}function VR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return dd(Ha)}function BR(e,t){if(e==="click")return dd(t)}function zR(e,t){if(e==="input"||e==="change")return dd(t)}function HR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sn=typeof Object.is=="function"?Object.is:HR;function Wa(e,t){if(Sn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Sf.call(t,s)||!Sn(e[s],t[s]))return!1}return!0}function wv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function bv(e,t){var n=wv(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=wv(n)}}function y1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?y1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function v1(){for(var e=window,t=uu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=uu(e.document)}return t}function sg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function WR(e){var t=v1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&y1(n.ownerDocument.documentElement,n)){if(r!==null&&sg(n)){if
vendor: 4,424 bytes, line 38
38(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=bv(n,i);var o=bv(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var qR=or&&"documentMode"in document&&11>=document.documentMode,Oi=null,Vf=null,Ta=null,Bf=!1;function xv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Bf||Oi==null||Oi!==uu(r)||(r=Oi,"selectionStart"in r&&sg(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ta&&Wa(Ta,r)||(Ta=r,r=yu(Vf,"onSelect"),0<r.length&&(t=new tg("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Oi)))}function tc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ni={animationend:tc("Animation","AnimationEnd"),animationiteration:tc("Animation","AnimationIteration"),animationstart:tc("Animation","AnimationStart"),transitionend:tc("Transition","TransitionEnd")},mh={},w1={};or&&(w1=document.createElement("div").style,"AnimationEvent"in window||(delete Ni.animationend.animation,delete Ni.animationiteration.animation,delete Ni.animationstart.animation),"TransitionEvent"in window||delete Ni.transitionend.transition);function hd(e){if(mh[e])return mh[e];if(!Ni[e])return e;var t=Ni[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in w1)return mh[e]=t[n];return e}var b1=hd("animationend"),x1=hd("animationiteration"),S1=hd("animationstart"),_1=hd("transitionend"),E1=new Map,Sv="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function us(e,t){E1.set(e,t),ri(t,[e])}for(var gh=0;gh<Sv.length;gh++){var yh=Sv[gh],KR=yh.toLowerCase(),GR=yh[0].toUpperCase()+yh.slice(1);us(KR,"on"+GR)}us(b1,"onAnimationEnd");us(x1,"onAnimationIteration");us(S1,"onAnimationStart");us("dblclick","onDoubleClick");us("focusin","onFocus");us("focusout","onBlur");us(_1,"onTransitionEnd");go("onMouseEnter",["mouseout","mouseover"]);go("onMouseLeave",["mouseout","mouseover"]);go("onPointerEnter",["pointerout","pointerover"]);go("onPointerLeave",["pointerout","pointerover"]);ri("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ri("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ri("onBeforeInput",["compositionend","keypress","textInput","paste"]);ri("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ri("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ri("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fa="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(" "),QR=new Set("cancel close invalid load scroll toggle".split(" ").concat(fa));function _v(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,KA(r,t,void 0,e),e.currentTarget=null}
vendor: 3,878 bytes, line 38
38function T1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;_v(s,a,c),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;_v(s,a,c),i=l}}}if(hu)throw e=Mf,hu=!1,Mf=null,e}function xe(e,t){var n=t[Kf];n===void 0&&(n=t[Kf]=new Set);var r=e+"__bubble";n.has(r)||(k1(t,e,2,!1),n.add(r))}function vh(e,t,n){var r=0;t&&(r|=4),k1(n,e,r,t)}var nc="_reactListening"+Math.random().toString(36).slice(2);function qa(e){if(!e[nc]){e[nc]=!0,Nx.forEach(function(n){n!=="selectionchange"&&(QR.has(n)||vh(n,!1,e),vh(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[nc]||(t[nc]=!0,vh("selectionchange",!1,t))}}function k1(e,t,n,r){switch(c1(t)){case 1:var s=cR;break;case 4:s=uR;break;default:s=Zm}n=s.bind(null,t,n,e),s=void 0,!Df||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function wh(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=Cs(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}Qx(function(){var c=i,u=Qm(n),d=[];e:{var p=E1.get(e);if(p!==void 0){var h=tg,v=e;switch(e){case"keypress":if($c(n)===0)break e;case"keydown":case"keyup":h=TR;break;case"focusin":v="focus",h=hh;break;case"focusout":v="blur",h=hh;break;case"beforeblur":case"afterblur":h=hh;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=dv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=fR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=AR;break;case b1:case x1:case S1:h=gR;break;case _1:h=PR;break;case"scroll":h=dR;break;case"wheel":h=OR;break;case"copy":case"cut":case"paste":h=vR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=fv}var g=(t&4)!==0,x=!g&&e==="scroll",y=g?p!==null?p+"Capture":null:p;g=[];for(var b=c,w;b!==null;){w=b;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,y!==null&&(S=Ua(b,y),S!=null&&g.push(Ka(b,S,w)))),x)break;b=b.return}0<g.length&&(p=new h(p,v,null,n,u),d.push({event:p,listeners:g}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==If&&(v=n.relatedTarget||n.fromElement)&&(Cs(v)||v[ar]))break e;if((h||p)&&(p=u.window===u?u:(p=u.ownerDocument)?p.defaultView||p.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=c,v=v?Cs(v):null,v!==null&&(x=si(v),v!==x||v.tag!==5&&v.tag!==6)&&(v=null)):(h=null,v=c),h!==v)){if(g=dv,S="onMouseLeave",y="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(g=fv,S="onPointerLeave",y="onPointerEnter",b="pointer"),x=h==null?p:Ii(h),w=v==null?p:Ii(v),p=new g(S,b+"leave",h,n,u),p.target=x,p.relatedTarget=w,S=null,Cs(u)===c&&(g=new g(y,b+"enter",v,n,u),g.target=w,g.relatedTarget=x,S=g),x=S,h&&v)t:{for(g=h,y=v,b=0,w=g;w;w=di(w))b++;for(w=0,S=y;S;S=di(S))w++;for(;0<b-w;)g=di(g),b--;for(;0<w-b;)y=di(y),w--;for(;b--;){if(g===y||y!==null&&g===y.alternate)break t;g=di(g),y=di(y)}g=null}else g=null;h!==null&&Ev(d,p,h,g,!1),v!==null&&x!==null&&Ev(d,x,v,g,!0)}}
vendor: 4,716 bytes, lines 38-39
38e:{if(p=c?Ii(c):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var _=FR;else if(gv(p))if(m1)_=zR;else{_=VR;var E=UR}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(_=BR);if(_&&(_=_(e,c))){p1(d,_,n,u);break e}E&&E(e,p,c),e==="focusout"&&(E=p._wrapperState)&&E.controlled&&p.type==="number"&&Rf(p,"number",p.value)}switch(E=c?Ii(c):window,e){case"focusin":(gv(E)||E.contentEditable==="true")&&(Oi=E,Vf=c,Ta=null);break;case"focusout":Ta=Vf=Oi=null;break;case"mousedown":Bf=!0;break;case"contextmenu":case"mouseup":case"dragend":Bf=!1,xv(d,n,u);break;case"selectionchange":if(qR)break;case"keydown":case"keyup":xv(d,n,u)}var T;if(rg)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else ji?h1(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(d1&&n.locale!=="ko"&&(ji||C!=="onCompositionStart"?C==="onCompositionEnd"&&ji&&(T=u1()):(zr=u,eg="value"in zr?zr.value:zr.textContent,ji=!0)),E=yu(c,C),0<E.length&&(C=new hv(C,e,null,n,u),d.push({event:C,listeners:E}),T?C.data=T:(T=f1(n),T!==null&&(C.data=T)))),(T=IR?LR(e,n):DR(e,n))&&(c=yu(c,"onBeforeInput"),0<c.length&&(u=new hv("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=T))}T1(d,t)})}function Ka(e,t,n){return{instance:e,listener:t,currentTarget:n}}function yu(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Ua(e,n),i!=null&&r.unshift(Ka(e,i,s)),i=Ua(e,t),i!=null&&r.push(Ka(e,i,s))),e=e.return}return r}function di(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ev(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=Ua(n,i),l!=null&&o.unshift(Ka(n,l,a))):s||(l=Ua(n,i),l!=null&&o.push(Ka(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var YR=/\r\n?/g,JR=/\u0000|\uFFFD/g;function Tv(e){return(typeof e=="string"?e:""+e).replace(YR,`
39`).replace(JR,"")}function rc(e,t,n){if(t=Tv(t),Tv(e)!==t&&n)throw Error(L(425))}function vu(){}var zf=null,Hf=null;function Wf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qf=typeof setTimeout=="function"?setTimeout:void 0,XR=typeof clearTimeout=="function"?clearTimeout:void 0,kv=typeof Promise=="function"?Promise:void 0,ZR=typeof queueMicrotask=="function"?queueMicrotask:typeof kv<"u"?function(e){return kv.resolve(null).then(e).catch(eP)}:qf;function eP(e){setTimeout(function(){throw e})}function bh(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),za(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);za(t)}function Yr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Cv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var No=Math.random().toString(36).slice(2),Mn="__reactFiber$"+No,Ga="__reactProps$"+No,ar="__reactContainer$"+No,Kf="__reactEvents$"+No,tP="__reactListeners$"+No,nP="__reactHandles$"+No;function Cs(e){var t=e[Mn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ar]||n[Mn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Cv(e);e!==null;){if(n=e[Mn])return n;e=Cv(e)}return t}e=n,n=e.parentNode}return null}function Pl(e){return e=e[Mn]||e[ar],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ii(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(L(33))}function fd(e){return e[Ga]||null}var Gf=[],Li=-1;function ds(e){return{current:e}}function _e(e){0>Li||(e.current=Gf[Li],Gf[Li]=null,Li--)}function we(e,t){Li++,Gf[Li]=e.current,e.current=t}var ss={},ct=ds(ss),Tt=ds(!1),Ks=ss;function yo(e,t){var n=e.type.contextTypes;if(!n)return ss;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function kt(e){return e=e.childContextTypes,e!=null}function wu(){_e(Tt),_e(ct)}function Av(e,t,n){if(ct.current!==ss)throw Error(L(168));
vendor: 25,486 bytes, lines 39-41
39we(ct,t),we(Tt,n)}function C1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(L(108,UA(e)||"Unknown",s));return Oe({},n,r)}function bu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ss,Ks=ct.current,we(ct,e),we(Tt,Tt.current),!0}function Rv(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=C1(e,t,Ks),r.__reactInternalMemoizedMergedChildContext=e,_e(Tt),_e(ct),we(ct,e)):_e(Tt),we(Tt,n)}var tr=null,pd=!1,xh=!1;function A1(e){tr===null?tr=[e]:tr.push(e)}function rP(e){pd=!0,A1(e)}function hs(){if(!xh&&tr!==null){xh=!0;var e=0,t=me;try{var n=tr;for(me=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}tr=null,pd=!1}catch(s){throw tr!==null&&(tr=tr.slice(e+1)),Zx(Ym,hs),s}finally{me=t,xh=!1}}return null}var Di=[],Mi=0,xu=null,Su=0,qt=[],Kt=0,Gs=null,rr=1,sr="";function xs(e,t){Di[Mi++]=Su,Di[Mi++]=xu,xu=e,Su=t}function R1(e,t,n){qt[Kt++]=rr,qt[Kt++]=sr,qt[Kt++]=Gs,Gs=e;var r=rr;e=sr;var s=32-wn(r)-1;r&=~(1<<s),n+=1;var i=32-wn(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,rr=1<<32-wn(t)+s|n<<s|r,sr=i+e}else rr=1<<i|n<<s|r,sr=e}function ig(e){e.return!==null&&(xs(e,1),R1(e,1,0))}function og(e){for(;e===xu;)xu=Di[--Mi],Di[Mi]=null,Su=Di[--Mi],Di[Mi]=null;for(;e===Gs;)Gs=qt[--Kt],qt[Kt]=null,sr=qt[--Kt],qt[Kt]=null,rr=qt[--Kt],qt[Kt]=null}var It=null,Nt=null,ke=!1,gn=null;function P1(e,t){var n=Gt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Pv(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,It=e,Nt=Yr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,It=e,Nt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Gs!==null?{id:rr,overflow:sr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Gt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,It=e,Nt=null,!0):!1;default:return!1}}function Qf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Yf(e){if(ke){var t=Nt;if(t){var n=t;if(!Pv(e,t)){if(Qf(e))throw Error(L(418));t=Yr(n.nextSibling);var r=It;t&&Pv(e,t)?P1(r,n):(e.flags=e.flags&-4097|2,ke=!1,It=e)}}else{if(Qf(e))throw Error(L(418));e.flags=e.flags&-4097|2,ke=!1,It=e}}}function jv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;It=e}function sc(e){if(e!==It)return!1;if(!ke)return jv(e),ke=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Wf(e.type,e.memoizedProps)),t&&(t=Nt)){if(Qf(e))throw j1(),Error(L(418));for(;t;)P1(e,t),t=Yr(t.nextSibling)}if(jv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Nt=Yr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Nt=null}}else Nt=It?Yr(e.stateNode.nextSibling):null;return!0}function j1(){for(var e=Nt;e;)e=Yr(e.nextSibling)}function vo(){Nt=It=null,ke=!1}function ag(e){gn===null?gn=[e]:gn.push(e)}var sP=fr.ReactCurrentBatchConfig;function Zo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(L(309));var r=n.stateNode}if(!r)throw Error(L(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(L(284));if(!n._owner)throw Error(L(290,e))}return e}function ic(e,t){throw e=Object.prototype.toString.call(t),Error(L(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ov(e){var t=e._init;return t(e._payload)}function O1(e){function t(y,b){if(e){var w=y.deletions;w===null?(y.deletions=[b],y.flags|=16):w.push(b)}}function n(y,b){if(!e)return null;for(;b!==null;)t(y,b),b=b.sibling;return null}function r(y,b){for(y=new Map;b!==null;)b.key!==null?y.set(b.key,b):y.set(b.index,b),b=b.sibling;return y}function s(y,b){return y=es(y,b),y.index=0,y.sibling=null,y}function i(y,b,w){return y.index=w,e?(w=y.alternate,w!==null?(w=w.index,w<b?(y.flags|=2,b):w):(y.flags|=2,b)):(y.flags|=1048576,b)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,b,w,S){return b===null||b.tag!==6?(b=Ah(w,y.mode,S),b.return=y,b):(b=s(b,w),b.return=y,b)}function l(y,b,w,S){var _=w.type;return _===Pi?u(y,b,w.props.children,S,w.key):b!==null&&(b.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Ar&&Ov(_)===b.type)?(S=s(b,w.props),S.ref=Zo(y,b,w),S.return=y,S):(S=Wc(w.type,w.key,w.props,null,y.mode,S),S.ref=Zo(y,b,w),S.return=y,S)}function c(y,b,w,S){return b===null||b.tag!==4||b.stateNode.containerInfo!==w.containerInfo||b.stateNode.implementation!==w.implementation?(b=Rh(w,y.mode,S),b.return=y,b):(b=s(b,w.children||[]),b.return=y,b)}function u(y,b,w,S,_){return b===null||b.tag!==7?(b=Hs(w,y.mode,S,_),b.return=y,b):(b=s(b,w),b.return=y,b)}function d(y,b,w){if(typeof b=="string"&&b!==""||typeof b=="number")return b=Ah(""+b,y.mode,w),b.return=y,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Gl:return w=Wc(b.type,b.key,b.props,null,y.mode,w),w.ref=Zo(y,null,b),w.return=y,w;case Ri:return b=Rh(b,y.mode,w),b.return=y,b;case Ar:var S=b._init;return d(y,S(b._payload),w)}if(da(b)||Go(b))return b=Hs(b,y.mode,w,null),b.return=y,b;ic(y,b)}return null}function p(y,b,w,S){var _=b!==null?b.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return _!==null?null:a(y,b,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Gl:return w.key===_?l(y,b,w,S):null;case Ri:return w.key===_?c(y,b,w,S):null;case Ar:return _=w._init,p(y,b,_(w._payload),S)}if(da(w)||Go(w))return _!==null?null:u(y,b,w,S,null);ic(y,w)}return null}function h(y,b,w,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(w)||null,a(b,y,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Gl:return y=y.get(S.key===null?w:S.key)||null,l(b,y,S,_);case Ri:return y=y.get(S.key===null?w:S.key)||null,c(b,y,S,_);case Ar:var E=S._init;return h(y,b,w,E(S._payload),_)}if(da(S)||Go(S))return y=y.get(w)||null,u(b,y,S,_,null);ic(b,S)}return null}function v(y,b,w,S){for(var _=null,E=null,T=b,C=b=0,O=null;T!==null&&C<w.length;C++){T.index>C?(O=T,T=null):O=T.sibling;var A=p(y,T,w[C],S);if(A===null){T===null&&(T=O);break}e&&T&&A.alternate===null&&t(y,T),b=i(A,b,C),E===null?_=A:E.sibling=A,E=A,T=O}if(C===w.length)return n(y,T),ke&&xs(y,C),_;if(T===null){for(;C<w.length;C++)T=d(y,w[C],S),T!==null&&(b=i(T,b,C),E===null?_=T:E.sibling=T,E=T);return ke&&xs(y,C),_}for(T=r(y,T);C<w.length;C++)O=h(T,y,C,w[C],S),O!==null&&(e&&O.alternate!==null&&T.delete(O.key===null?C:O.key),b=i(O,b,C),E===null?_=O:E.sibling=O,E=O);return e&&T.forEach(function(M){return t(y,M)}),ke&&xs(y,C),_}function g(y,b,w,S){var _=Go(w);if(typeof _!="function")throw Error(L(150));if(w=_.call(w),w==null)throw Error(L(151));for(var E=_=null,T=b,C=b=0,O=null,A=w.next();T!==null&&!A.done;C++,A=w.next()){T.index>C?(O=T,T=null):O=T.sibling;var M=p(y,T,A.value,S);if(M===null){T===null&&(T=O);break}e&&T&&M.alternate===null&&t(y,T),b=i(M,b,C),E===null?_=M:E.sibling=M,E=M,T=O}if(A.done)return n(y,T),ke&&xs(y,C),_;if(T===null){for(;!A.done;C++,A=w.next())A=d(y,A.value,S),A!==null&&(b=i(A,b,C),E===null?_=A:E.sibling=A,E=A);return ke&&xs(y,C),_}for(T=r(y,T);!A.done;C++,A=w.next())A=h(T,y,C,A.value,S),A!==null&&(e&&A.alternate!==null&&T.delete(A.key===null?C:A.key),b=i(A,b,C),E===null?_=A:E.sibling=A,E=A);return e&&T.forEach(function(I){return t(y,I)}),ke&&xs(y,C),_}function x(y,b,w,S){if(typeof w=="object"&&w!==null&&w.type===Pi&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Gl:e:{for(var _=w.key,E=b;E!==null;){if(E.key===_){if(_=w.type,_===Pi){if(E.tag===7){n(y,E.sibling),b=s(E,w.props.children),b.return=y,y=b;break e}}else if(E.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Ar&&Ov(_)===E.type){n(y,E.sibling),b=s(E,w.props),b.ref=Zo(y,E,w),b.return=y,y=b;break e}n(y,E);break}else t(y,E);E=E.sibling}w.type===Pi?(b=Hs(w.props.children,y.mode,S,w.key),b.return=y,y=b):(S=Wc(w.type,w.key,w.props,null,y.mode,S),S.ref=Zo(y,b,w),S.return=y,y=S)}return o(y);case Ri:e:{for(E=w.key;b!==null;){if(b.key===E)if(b.tag===4&&b.stateNode.containerInfo===w.containerInfo&&b.stateNode.implementation===w.implementation){n(y,b.sibling),b=s(b,w.children||[]),b.return=y,y=b;break e}else{n(y,b);break}else t(y,b);b=b.sibling}b=Rh(w,y.mode,S),b.return=y,y=b}return o(y);case Ar:return E=w._init,x(y,b,E(w._payload),S)}if(da(w))return v(y,b,w,S);if(Go(w))return g(y,b,w,S);ic(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,b!==null&&b.tag===6?(n(y,b.sibling),b=s(b,w),b.return=y,y=b):(n(y,b),b=Ah(w,y.mode,S),b.return=y,y=b),o(y)):n(y,b)}return x}var wo=O1(!0),N1=O1(!1),_u=ds(null),Eu=null,$i=null,lg=null;function cg(){lg=$i=Eu=null}function ug(e){var t=_u.current;_e(_u),e._currentValue=t}function Jf(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Qi(e,t){Eu=e,lg=$i=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Et=!0),e.firstContext=null)}function Zt(e){var t=e._currentValue;if(lg!==e)if(e={context:e,memoizedValue:t,next:null},$i===null){if(Eu===null)throw Error(L(308));$i=e,Eu.dependencies={lanes:0,firstContext:e}}else $i=$i.next=e;return t}var As=null;function dg(e){As===null?As=[e]:As.push(e)}function I1(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,dg(t)):(n.next=s.next,s.next=n),t.interleaved=n,lr(e,r)}function lr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Rr=!1;function hg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function L1(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ir(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,he&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,lr(e,n)}return s=r.interleaved,s===null?(t.next=t,dg(r)):(t.next=s.next,s.next=t),r.interleaved=t,lr(e,n)}function Fc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jm(e,n)}}function Nv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Tu(e,t,n,r){var s=e.updateQueue;Rr=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,u=c=l=null,a=i;do{var p=a.lane,h=a.eventTime;if((r&p)===p){u!==null&&(u=u.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,g=a;switch(p=t,h=n,g.tag){case 1:if(v=g.payload,typeof v=="function"){d=v.call(h,d,p);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=g.payload,p=typeof v=="function"?v.call(h,d,p):v,p==null)break e;d=Oe({},d,p);break e;case 2:Rr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else h={eventTime:h,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=h,l=d):u=u.next=h,o|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(u===null&&(l=d),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Ys|=o,e.lanes=o,e.memoizedState=d}}function Iv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(L(191,s));s.call(r)}}}var jl={},Un=ds(jl),Qa=ds(jl),Ya=ds(jl);function Rs(e){if(e===jl)throw Error(L(174));return e}function fg(e,t){switch(we(Ya,t),we(Qa,e),we(Un,jl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:jf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=jf(t,e)}_e(Un),we(Un,t)}function bo(){_e(Un),_e(Qa),_e(Ya)}function D1(e){Rs(Ya.current);var t=Rs(Un.current),n=jf(t,e.type);t!==n&&(we(Qa,e),we(Un,n))}function pg(e){Qa.current===e&&(_e(Un),_e(Qa))}var Re=ds(0);function ku(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Sh=[];function mg(){for(var e=0;e<Sh.length;e++)Sh[e]._workInProgressVersionPrimary=null;Sh.length=0}var Uc=fr.ReactCurrentDispatcher,_h=fr.ReactCurrentBatchConfig,Qs=0,Pe=null,ze=null,Ge=null,Cu=!1,ka=!1,Ja=0,iP=0;function it(){throw Error(L(321))}function gg(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sn(e[n],t[n]))return!1;return!0}function yg(e,t,n,r,s,i){if(Qs=i,Pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Uc.current=e===null||e.memoizedState===null?cP:uP,e=n(r,s),ka){i=0;do{if(ka=!1,Ja=0,25<=i)throw Error(L(301));i+=1,Ge=ze=null,t.updateQueue=null,Uc.current=dP,e=n(r,s)}while(ka)}if(Uc.current=Au,t=ze!==null&&ze.next!==null,Qs=0,Ge=ze=Pe=null,Cu=!1,t)throw Error(L(300));return e}function vg(){var e=Ja!==0;return Ja=0,e}function Rn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?Pe.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function en(){if(ze===null){var e=Pe.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=Ge===null?Pe.memoizedState:Ge.next;if(t!==null)Ge=t,ze=e;else{if(e===null)throw Error(L(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Ge===null?Pe.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function Xa(e,t){return typeof t=="function"?t(e):t}function Eh(e){var t=en(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=ze,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,c=i;do{var u=c.lane;if((Qs&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,Pe.lanes|=u,Ys|=u}c=c.next}while(c!==null&&c!==i);l===null?o=r:l.next=a,Sn(r,t.memoizedState)||(Et=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,Pe.lanes|=i,Ys|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Th(e){var t=en(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);Sn(i,t.memoizedState)||(Et=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function M1(){}function $1(e,t){var n=Pe,r=en(),s=t(),i=!Sn(r.memoizedState,s);if(i&&(r.memoizedState=s,Et=!0),r=r.queue,wg(V1.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ge!==null&&Ge.memoizedState.tag&1){if(n.flags|=2048,Za(9,U1.bind(null,n,r,s,t),void 0,null),Qe===null)throw Error(L(349));Qs&30||F1(n,t,s)}return s}function F1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Pe.updateQueue,t===null?(t={lastEffect:null,stores:null},Pe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function U1(e,t,n,r){t.value=n,t.getSnapshot=r,B1(t)&&z1(e)}function V1(e,t,n){return n(function(){B1(t)&&z1(e)})}function B1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sn(e,n)}catch{return!0}}function z1(e){var t=lr(e,1);t!==null&&bn(t,e,1,-1)}function Lv(e){var t=Rn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Xa,lastRenderedState:e},t.queue=e,e=e.dispatch=lP.bind(null,Pe,e),[t.memoizedState,e]}function Za(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Pe.updateQueue,t===null?(t={lastEffect:null,stores:null},Pe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function H1(){return en().memoizedState}function Vc(e,t,n,r){var s=Rn();Pe.flags|=e,s.memoizedState=Za(1|t,n,void 0,r===void 0?null:r)}function md(e,t,n,r){var s=en();r=r===void 0?null:r;var i=void 0;if(ze!==null){var o=ze.memoizedState;if(i=o.destroy,r!==null&&gg(r,o.deps)){s.memoizedState=Za(t,n,i,r);return}}Pe.flags|=e,s.memoizedState=Za(1|t,n,i,r)}function Dv(e,t){return Vc(8390656,8,e,t)}function wg(e,t){return md(2048,8,e,t)}function W1(e,t){return md(4,2,e,t)}function q1(e,t){return md(4,4,e,t)}function K1(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function G1(e,t,n){return n=n!=null?n.concat([e]):null,md(4,4,K1.bind(null,t,e),n)}function bg(){}function Q1(e,t){var n=en();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&gg(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Y1(e,t){var n=en();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&gg(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function J1(e,t,n){return Qs&21?(Sn(n,t)||(n=n1(),Pe.lanes|=n,Ys|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Et=!0),e.memoizedState=n)}function oP(e,t){var n=me;me=n!==0&&4>n?n:4,e(!0);var r=_h.transition;_h.transition={};try{e(!1),t()}finally{me=n,_h.transition=r}}function X1(){return en().memoizedState}function aP(e,t,n){var r=Zr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Z1(e))eS(t,n);else if(n=I1(e,t,n,r),n!==null){var s=mt();bn(n,e,r,s),tS(n,t,r)}}function lP(e,t,n){var r=Zr(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Z1(e))eS(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,Sn(a,o)){var l=t.interleaved;l===null?(s.next=s,dg(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=I1(e,t,s,r),n!==null&&(s=mt(),bn(n,e,r,s),tS(n,t,r))}}function Z1(e){var t=e.alternate;return e===Pe||t!==null&&t===Pe}function eS(e,t){ka=Cu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tS(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jm(e,n)}}var Au={readContext:Zt,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useInsertionEffect:it,useLayoutEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useMutableSource:it,useSyncExternalStore:it,useId:it,unstable_isNewReconciler:!1},cP={readContext:Zt,useCallback:function(e,t){return Rn().memoizedState=[e,t===void 0?null:t],e},useContext:Zt,useEffect:Dv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Vc(4194308,4,K1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Vc(4,2,e,t)},useMemo:function(e,t){var n=Rn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Rn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=aP.bind(null,Pe,e),[r.memoizedState,e]},useRef:function(e){var t=Rn();return e={current:e},t.memoizedState=e},useState:Lv,useDebugValue:bg,useDeferredValue:function(e){return Rn().memoizedState=e},useTransition:function(){var e=Lv(!1),t=e[0];return e=oP.bind(null,e[1]),Rn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Pe,s=Rn();if(ke){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),Qe===null)throw Error(L(349));Qs&30||F1(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Dv(V1.bind(null,r,i,e),[e]),r.flags|=2048,Za(9,U1.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Rn(),t=Qe.identifierPrefix;if(ke){var n=sr,r=rr;n=(r&~(1<<32-wn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ja++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=iP++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},uP={readContext:Zt,useCallback:Q1,useContext:Zt,useEffect:wg,useImperativeHandle:G1,useInsertionEffect:W1,useLayoutEffect:q1,useMemo:Y1,useReducer:Eh,useRef:H1,useState:function(){return Eh(Xa)},useDebugValue:bg,useDeferredValue:function(e){var t=en();return J1(t,ze.memoizedState,e)},useTransition:function(){var e=Eh(Xa)[0],t=en().memoizedState;return[e,t]},useMutableSource:M1,useSyncExternalStore:$1,useId:X1,unstable_isNewReconciler:!1},dP={readContext:Zt,useCallback:Q1,useContext:Zt,useEffect:wg,useImperativeHandle:G1,useInsertionEffect:W1,useLayoutEffect:q1,useMemo:Y1,useReducer:Th,useRef:H1,useState:function(){return Th(Xa)},useDebugValue:bg,useDeferredValue:function(e){var t=en();return ze===null?t.memoizedState=e:J1(t,ze.memoizedState,e)},useTransition:function(){var e=Th(Xa)[0],t=en().memoizedState;return[e,t]},useMutableSource:M1,useSyncExternalStore:$1,useId:X1,unstable_isNewReconciler:!1};function dn(e,t){if(e&&e.defaultProps){t=Oe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Xf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Oe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var gd={isMounted:function(e){return(e=e._reactInternals)?si(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=mt(),s=Zr(e),i=ir(r,s);i.payload=t,n!=null&&(i.callback=n),t=Jr(e,i,s),t!==null&&(bn(t,e,s,r),Fc(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=mt(),s=Zr(e),i=ir(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Jr(e,i,s),t!==null&&(bn(t,e,s,r),Fc(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mt(),r=Zr(e),s=ir(n,r);s.tag=2,t!=null&&(s.callback=t),t=Jr(e,s,r),t!==null&&(bn(t,e,r,n),Fc(t,e,r))}};function Mv(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Wa(n,r)||!Wa(s,i):!0}function nS(e,t,n){var r=!1,s=ss,i=t.contextType;return typeof i=="object"&&i!==null?i=Zt(i):(s=kt(t)?Ks:ct.current,r=t.contextTypes,i=(r=r!=null)?yo(e,s):ss),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=gd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function $v(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&&gd.enqueueReplaceState(t,t.state,null)}function Zf(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},hg(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Zt(i):(i=kt(t)?Ks:ct.current,s.context=yo(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Xf(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&gd.enqueueReplaceState(s,s.state,null),Tu(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function xo(e,t){try{var n="",r=t;do n+=FA(r),r=r.return;while(r);var s=n}catch(i){s=`
40Error generating stack: `+i.message+`
41`+i.stack}return{value:e,source:t,stack:s,digest:null}}
vendor: 11,813 bytes, line 41
41function kh(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ep(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var hP=typeof WeakMap=="function"?WeakMap:Map;function rS(e,t,n){n=ir(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Pu||(Pu=!0,up=r),ep(e,t)},n}function sS(e,t,n){n=ir(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){ep(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){ep(e,t),typeof r!="function"&&(Xr===null?Xr=new Set([this]):Xr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Fv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new hP;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=kP.bind(null,e,t,n),t.then(e,e))}function Uv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Vv(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ir(-1,1),t.tag=2,Jr(n,t,1))),n.lanes|=1),e)}var fP=fr.ReactCurrentOwner,Et=!1;function ht(e,t,n,r){t.child=e===null?N1(t,null,n,r):wo(t,e.child,n,r)}function Bv(e,t,n,r,s){n=n.render;var i=t.ref;return Qi(t,s),r=yg(e,t,n,r,i,s),n=vg(),e!==null&&!Et?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,cr(e,t,s)):(ke&&n&&ig(t),t.flags|=1,ht(e,t,r,s),t.child)}function zv(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Ag(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,iS(e,t,i,r,s)):(e=Wc(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Wa,n(o,r)&&e.ref===t.ref)return cr(e,t,s)}return t.flags|=1,e=es(i,r),e.ref=t.ref,e.return=t,t.child=e}function iS(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Wa(i,r)&&e.ref===t.ref)if(Et=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Et=!0);else return t.lanes=e.lanes,cr(e,t,s)}return tp(e,t,n,r,s)}function oS(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},we(Ui,Pt),Pt|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,we(Ui,Pt),Pt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,we(Ui,Pt),Pt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,we(Ui,Pt),Pt|=r;return ht(e,t,s,n),t.child}function aS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function tp(e,t,n,r,s){var i=kt(n)?Ks:ct.current;return i=yo(t,i),Qi(t,s),n=yg(e,t,n,r,i,s),r=vg(),e!==null&&!Et?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,cr(e,t,s)):(ke&&r&&ig(t),t.flags|=1,ht(e,t,n,s),t.child)}function Hv(e,t,n,r,s){if(kt(n)){var i=!0;bu(t)}else i=!1;if(Qi(t,s),t.stateNode===null)Bc(e,t),nS(t,n,r),Zf(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Zt(c):(c=kt(n)?Ks:ct.current,c=yo(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&$v(t,o,r,c),Rr=!1;var p=t.memoizedState;o.state=p,Tu(t,r,o,s),l=t.memoizedState,a!==r||p!==l||Tt.current||Rr?(typeof u=="function"&&(Xf(t,n,u,r),l=t.memoizedState),(a=Rr||Mv(t,n,a,r,p,l,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,L1(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:dn(t.type,a),o.props=c,d=t.pendingProps,p=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Zt(l):(l=kt(n)?Ks:ct.current,l=yo(t,l));var h=n.getDerivedStateFromProps;(u=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||p!==l)&&$v(t,o,r,l),Rr=!1,p=t.memoizedState,o.state=p,Tu(t,r,o,s);var v=t.memoizedState;a!==d||p!==v||Tt.current||Rr?(typeof h=="function"&&(Xf(t,n,h,r),v=t.memoizedState),(c=Rr||Mv(t,n,c,r,p,v,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),o.props=r,o.state=v,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return np(e,t,n,r,i,s)}function np(e,t,n,r,s,i){aS(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&Rv(t,n,!1),cr(e,t,i);r=t.stateNode,fP.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=wo(t,e.child,null,i),t.child=wo(t,null,a,i)):ht(e,t,a,i),t.memoizedState=r.state,s&&Rv(t,n,!0),t.child}function lS(e){var t=e.stateNode;t.pendingContext?Av(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Av(e,t.context,!1),fg(e,t.containerInfo)}function Wv(e,t,n,r,s){return vo(),ag(s),t.flags|=256,ht(e,t,n,r),t.child}var rp={dehydrated:null,treeContext:null,retryLane:0};function sp(e){return{baseLanes:e,cachePool:null,transitions:null}}function cS(e,t,n){var r=t.pendingProps,s=Re.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),we(Re,s&1),e===null)return Yf(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=wd(o,r,0,null),e=Hs(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=sp(n),t.memoizedState=rp,e):xg(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return pP(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=es(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=es(a,i):(i=Hs(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?sp(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=rp,r}return i=e.child,e=i.sibling,r=es(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function xg(e,t){return t=wd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function oc(e,t,n,r){return r!==null&&ag(r),wo(t,e.child,null,n),e=xg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pP(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=kh(Error(L(422))),oc(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=wd({mode:"visible",children:r.children},s,0,null),i=Hs(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&wo(t,e.child,null,o),t.child.memoizedState=sp(o),t.memoizedState=rp,i);if(!(t.mode&1))return oc(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(L(419)),r=kh(i,r,void 0),oc(e,t,o,r)}if(a=(o&e.childLanes)!==0,Et||a){if(r=Qe,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,lr(e,s),bn(r,e,s,-1))}return Cg(),r=kh(Error(L(421))),oc(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=CP.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Nt=Yr(s.nextSibling),It=t,ke=!0,gn=null,e!==null&&(qt[Kt++]=rr,qt[Kt++]=sr,qt[Kt++]=Gs,rr=e.id,sr=e.overflow,Gs=t),t=xg(t,r.children),t.flags|=4096,t)}function qv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Jf(e.return,t,n)}function Ch(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function uS(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(ht(e,t,r.children,n),r=Re.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&qv(e,n,t);else if(e.tag===19)qv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(we(Re,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&ku(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Ch(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&ku(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Ch(t,!0,n,null,i);break;case"together":Ch(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Bc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function cr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ys|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,n=es(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=es(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mP(e,t,n){switch(t.tag){case 3:lS(t),vo();break;case 5:D1(t);break;case 1:kt(t.type)&&bu(t);break;case 4:fg(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;we(_u,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(we(Re,Re.current&1),t.flags|=128,null):n&t.child.childLanes?cS(e,t,n):(we(Re,Re.current&1),e=cr(e,t,n),e!==null?e.sibling:null);
vendor: 4,118 bytes, line 41
41we(Re,Re.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return uS(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),we(Re,Re.current),r)break;return null;case 22:case 23:return t.lanes=0,oS(e,t,n)}return cr(e,t,n)}var dS,ip,hS,fS;dS=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ip=function(){};hS=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Rs(Un.current);var i=null;switch(n){case"input":s=Cf(e,s),r=Cf(e,r),i=[];break;case"select":s=Oe({},s,{value:void 0}),r=Oe({},r,{value:void 0}),i=[];break;case"textarea":s=Pf(e,s),r=Pf(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=vu)}Of(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&($a.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&($a.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&xe("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};fS=function(e,t,n,r){n!==r&&(t.flags|=4)};function ea(e,t){if(!ke)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 ot(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function gP(e,t,n){var r=t.pendingProps;switch(og(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(t),null;case 1:return kt(t.type)&&wu(),ot(t),null;case 3:return r=t.stateNode,bo(),_e(Tt),_e(ct),mg(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(sc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,gn!==null&&(fp(gn),gn=null))),ip(e,t),ot(t),null;case 5:pg(t);var s=Rs(Ya.current);if(n=t.type,e!==null&&t.stateNode!=null)hS(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(L(166));return ot(t),null}if(e=Rs(Un.current),sc(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Mn]=t,r[Ga]=i,e=(t.mode&1)!==0,n){case"dialog":xe("cancel",r),xe("close",r);break;case"iframe":case"object":case"embed":xe("load",r);break;case"video":case"audio":for(s=0;s<fa.length;s++)xe(fa[s],r);break;case"source":xe("error",r);break;case"img":case"image":case"link":xe("error",r),xe("load",r);break;case"details":xe("toggle",r);break;case"input":tv(r,i),xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},xe("invalid",r);break;case"textarea":rv(r,i),xe("invalid",r)}Of(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 32,436 bytes, line 41
41o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&rc(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&rc(r.textContent,a,e),s=["children",""+a]):$a.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&xe("scroll",r)}switch(n){case"input":Ql(r),nv(r,i,!0);break;case"textarea":Ql(r),sv(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=vu)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Vx(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Mn]=t,e[Ga]=r,dS(e,t,!1,!1),t.stateNode=e;e:{switch(o=Nf(n,r),n){case"dialog":xe("cancel",e),xe("close",e),s=r;break;case"iframe":case"object":case"embed":xe("load",e),s=r;break;case"video":case"audio":for(s=0;s<fa.length;s++)xe(fa[s],e);s=r;break;case"source":xe("error",e),s=r;break;case"img":case"image":case"link":xe("error",e),xe("load",e),s=r;break;case"details":xe("toggle",e),s=r;break;case"input":tv(e,r),s=Cf(e,r),xe("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Oe({},r,{value:void 0}),xe("invalid",e);break;case"textarea":rv(e,r),s=Pf(e,r),xe("invalid",e);break;default:s=r}Of(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Hx(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Bx(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Fa(e,l):typeof l=="number"&&Fa(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&($a.hasOwnProperty(i)?l!=null&&i==="onScroll"&&xe("scroll",e):l!=null&&Wm(e,i,l,o))}switch(n){case"input":Ql(e),nv(e,r,!1);break;case"textarea":Ql(e),sv(e);break;case"option":r.value!=null&&e.setAttribute("value",""+rs(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Wi(e,!!r.multiple,i,!1):r.defaultValue!=null&&Wi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=vu)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ot(t),null;case 6:if(e&&t.stateNode!=null)fS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(L(166));if(n=Rs(Ya.current),Rs(Un.current),sc(t)){if(r=t.stateNode,n=t.memoizedProps,r[Mn]=t,(i=r.nodeValue!==n)&&(e=It,e!==null))switch(e.tag){case 3:rc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&rc(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Mn]=t,t.stateNode=r}return ot(t),null;case 13:if(_e(Re),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ke&&Nt!==null&&t.mode&1&&!(t.flags&128))j1(),vo(),t.flags|=98560,i=!1;else if(i=sc(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(L(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(L(317));i[Mn]=t}else vo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ot(t),i=!1}else gn!==null&&(fp(gn),gn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Re.current&1?He===0&&(He=3):Cg())),t.updateQueue!==null&&(t.flags|=4),ot(t),null);case 4:return bo(),ip(e,t),e===null&&qa(t.stateNode.containerInfo),ot(t),null;case 10:return ug(t.type._context),ot(t),null;case 17:return kt(t.type)&&wu(),ot(t),null;case 19:if(_e(Re),i=t.memoizedState,i===null)return ot(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)ea(i,!1);else{if(He!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ku(e),o!==null){for(t.flags|=128,ea(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return we(Re,Re.current&1|2),t.child}e=e.sibling}i.tail!==null&&Me()>So&&(t.flags|=128,r=!0,ea(i,!1),t.lanes=4194304)}else{if(!r)if(e=ku(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ea(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ke)return ot(t),null}else 2*Me()-i.renderingStartTime>So&&n!==1073741824&&(t.flags|=128,r=!0,ea(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Me(),t.sibling=null,n=Re.current,we(Re,r?n&1|2:n&1),t):(ot(t),null);case 22:case 23:return kg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Pt&1073741824&&(ot(t),t.subtreeFlags&6&&(t.flags|=8192)):ot(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function yP(e,t){switch(og(t),t.tag){case 1:return kt(t.type)&&wu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bo(),_e(Tt),_e(ct),mg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return pg(t),null;case 13:if(_e(Re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));vo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(Re),null;case 4:return bo(),null;case 10:return ug(t.type._context),null;case 22:case 23:return kg(),null;case 24:return null;default:return null}}var ac=!1,lt=!1,vP=typeof WeakSet=="function"?WeakSet:Set,W=null;function Fi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Le(e,t,r)}else n.current=null}function op(e,t,n){try{n()}catch(r){Le(e,t,r)}}var Kv=!1;function wP(e,t){if(zf=mu,e=v1(),sg(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,d=e,p=null;t:for(;;){for(var h;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)p=d,d=h;for(;;){if(d===e)break t;if(p===n&&++c===s&&(a=o),p===i&&++u===r&&(l=o),(h=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Hf={focusedElem:e,selectionRange:n},mu=!1,W=t;W!==null;)if(t=W,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,W=e;else for(;W!==null;){t=W;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var g=v.memoizedProps,x=v.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:dn(t.type,g),x);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(S){Le(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return v=Kv,Kv=!1,v}function Ca(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&op(t,n,i)}s=s.next}while(s!==r)}}function yd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ap(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function pS(e){var t=e.alternate;t!==null&&(e.alternate=null,pS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mn],delete t[Ga],delete t[Kf],delete t[tP],delete t[nP])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function mS(e){return e.tag===5||e.tag===3||e.tag===4}function Gv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mS(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function lp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=vu));else if(r!==4&&(e=e.child,e!==null))for(lp(e,t,n),e=e.sibling;e!==null;)lp(e,t,n),e=e.sibling}function cp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(cp(e,t,n),e=e.sibling;e!==null;)cp(e,t,n),e=e.sibling}var Ze=null,mn=!1;function xr(e,t,n){for(n=n.child;n!==null;)gS(e,t,n),n=n.sibling}function gS(e,t,n){if(Fn&&typeof Fn.onCommitFiberUnmount=="function")try{Fn.onCommitFiberUnmount(cd,n)}catch{}switch(n.tag){case 5:lt||Fi(n,t);case 6:var r=Ze,s=mn;Ze=null,xr(e,t,n),Ze=r,mn=s,Ze!==null&&(mn?(e=Ze,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ze.removeChild(n.stateNode));break;case 18:Ze!==null&&(mn?(e=Ze,n=n.stateNode,e.nodeType===8?bh(e.parentNode,n):e.nodeType===1&&bh(e,n),za(e)):bh(Ze,n.stateNode));break;case 4:r=Ze,s=mn,Ze=n.stateNode.containerInfo,mn=!0,xr(e,t,n),Ze=r,mn=s;break;case 0:case 11:case 14:case 15:if(!lt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&op(n,t,o),s=s.next}while(s!==r)}xr(e,t,n);break;case 1:if(!lt&&(Fi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Le(n,t,a)}xr(e,t,n);break;case 21:xr(e,t,n);break;case 22:n.mode&1?(lt=(r=lt)||n.memoizedState!==null,xr(e,t,n),lt=r):xr(e,t,n);break;default:xr(e,t,n)}}function Qv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new vP),t.forEach(function(r){var s=AP.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function sn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ze=a.stateNode,mn=!1;break e;case 3:Ze=a.stateNode.containerInfo,mn=!0;break e;case 4:Ze=a.stateNode.containerInfo,mn=!0;break e}a=a.return}if(Ze===null)throw Error(L(160));gS(i,o,s),Ze=null,mn=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){Le(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)yS(t,e),t=t.sibling}function yS(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(sn(t,e),Cn(e),r&4){try{Ca(3,e,e.return),yd(3,e)}catch(g){Le(e,e.return,g)}try{Ca(5,e,e.return)}catch(g){Le(e,e.return,g)}}break;case 1:sn(t,e),Cn(e),r&512&&n!==null&&Fi(n,n.return);break;case 5:if(sn(t,e),Cn(e),r&512&&n!==null&&Fi(n,n.return),e.flags&32){var s=e.stateNode;try{Fa(s,"")}catch(g){Le(e,e.return,g)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Fx(s,i),Nf(a,o);var c=Nf(a,i);for(o=0;o<l.length;o+=2){var u=l[o],d=l[o+1];u==="style"?Hx(s,d):u==="dangerouslySetInnerHTML"?Bx(s,d):u==="children"?Fa(s,d):Wm(s,u,d,c)}switch(a){case"input":Af(s,i);break;case"textarea":Ux(s,i);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?Wi(s,!!i.multiple,h,!1):p!==!!i.multiple&&(i.defaultValue!=null?Wi(s,!!i.multiple,i.defaultValue,!0):Wi(s,!!i.multiple,i.multiple?[]:"",!1))}s[Ga]=i}catch(g){Le(e,e.return,g)}}break;case 6:if(sn(t,e),Cn(e),r&4){if(e.stateNode===null)throw Error(L(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(g){Le(e,e.return,g)}}break;case 3:if(sn(t,e),Cn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{za(t.containerInfo)}catch(g){Le(e,e.return,g)}break;case 4:sn(t,e),Cn(e);break;case 13:sn(t,e),Cn(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Eg=Me())),r&4&&Qv(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(lt=(c=lt)||u,sn(t,e),lt=c):sn(t,e),Cn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(W=e,u=e.child;u!==null;){for(d=W=u;W!==null;){switch(p=W,h=p.child,p.tag){case 0:case 11:case 14:case 15:Ca(4,p,p.return);break;case 1:Fi(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(g){Le(r,n,g)}}break;case 5:Fi(p,p.return);break;case 22:if(p.memoizedState!==null){Jv(d);continue}}h!==null?(h.return=p,W=h):Jv(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{s=d.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=zx("display",o))}catch(g){Le(e,e.return,g)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(g){Le(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:sn(t,e),Cn(e),r&4&&Qv(e);break;case 21:break;default:sn(t,e),Cn(e)}}function Cn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(mS(n)){var r=n;break e}n=n.return}throw Error(L(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Fa(s,""),r.flags&=-33);var i=Gv(e);cp(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Gv(e);lp(e,a,o);break;default:throw Error(L(161))}}catch(l){Le(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bP(e,t,n){W=e,vS(e)}function vS(e,t,n){for(var r=(e.mode&1)!==0;W!==null;){var s=W,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||ac;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||lt;a=ac;var c=lt;if(ac=o,(lt=l)&&!c)for(W=s;W!==null;)o=W,l=o.child,o.tag===22&&o.memoizedState!==null?Xv(s):l!==null?(l.return=o,W=l):Xv(s);for(;i!==null;)W=i,vS(i),i=i.sibling;W=s,ac=a,lt=c}Yv(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,W=i):Yv(e)}}function Yv(e){for(;W!==null;){var t=W;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:lt||yd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!lt)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:dn(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Iv(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Iv(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&za(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}lt||t.flags&512&&ap(t)}catch(p){Le(t,t.return,p)}}if(t===e){W=null;break}if(n=t.sibling,n!==null){n.return=t.return,W=n;break}W=t.return}}function Jv(e){for(;W!==null;){var t=W;if(t===e){W=null;break}var n=t.sibling;if(n!==null){n.return=t.return,W=n;break}W=t.return}}function Xv(e){for(;W!==null;){var t=W;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{yd(4,t)}catch(l){Le(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){Le(t,s,l)}}var i=t.return;try{ap(t)}catch(l){Le(t,i,l)}break;case 5:var o=t.return;try{ap(t)}catch(l){Le(t,o,l)}}}catch(l){Le(t,t.return,l)}if(t===e){W=null;break}var a=t.sibling;if(a!==null){a.return=t.return,W=a;break}W=t.return}}var xP=Math.ceil,Ru=fr.ReactCurrentDispatcher,Sg=fr.ReactCurrentOwner,Yt=fr.ReactCurrentBatchConfig,he=0,Qe=null,Ve=null,rt=0,Pt=0,Ui=ds(0),He=0,el=null,Ys=0,vd=0,_g=0,Aa=null,_t=null,Eg=0,So=1/0,Xn=null,Pu=!1,up=null,Xr=null,lc=!1,Hr=null,ju=0,Ra=0,dp=null,zc=-1,Hc=0;function mt(){return he&6?Me():zc!==-1?zc:zc=Me()}function Zr(e){return e.mode&1?he&2&&rt!==0?rt&-rt:sP.transition!==null?(Hc===0&&(Hc=n1()),Hc):(e=me,e!==0||(e=window.event,e=e===void 0?16:c1(e.type)),e):1}function bn(e,t,n,r){if(50<Ra)throw Ra=0,dp=null,Error(L(185));Al(e,n,r),(!(he&2)||e!==Qe)&&(e===Qe&&(!(he&2)&&(vd|=n),He===4&&jr(e,rt)),Ct(e,r),n===1&&he===0&&!(t.mode&1)&&(So=Me()+500,pd&&hs()))}function Ct(e,t){var n=e.callbackNode;sR(e,t);var r=pu(e,e===Qe?rt:0);if(r===0)n!==null&&av(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&av(n),t===1)e.tag===0?rP(Zv.bind(null,e)):A1(Zv.bind(null,e)),ZR(function(){!(he&6)&&hs()}),n=null;else{switch(r1(r)){case 1:n=Ym;break;case 4:n=e1;break;case 16:n=fu;break;case 536870912:n=t1;break;default:n=fu}n=kS(n,wS.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function wS(e,t){if(zc=-1,Hc=0,he&6)throw Error(L(327));var n=e.callbackNode;if(Yi()&&e.callbackNode!==n)return null;var r=pu(e,e===Qe?rt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ou(e,r);else{t=r;var s=he;he|=2;var i=xS();(Qe!==e||rt!==t)&&(Xn=null,So=Me()+500,zs(e,t));do try{EP();break}catch(a){bS(e,a)}while(!0);cg(),Ru.current=i,he=s,Ve!==null?t=0:(Qe=null,rt=0,t=He)}if(t!==0){if(t===2&&(s=$f(e),s!==0&&(r=s,t=hp(e,s))),t===1)throw n=el,zs(e,0),jr(e,r),Ct(e,Me()),n;if(t===6)jr(e,r);else{if(s=e.current.alternate,!(r&30)&&!SP(s)&&(t=Ou(e,r),t===2&&(i=$f(e),i!==0&&(r=i,t=hp(e,i))),t===1))throw n=el,zs(e,0),jr(e,r),Ct(e,Me()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(L(345));case 2:Ss(e,_t,Xn);break;case 3:if(jr(e,r),(r&130023424)===r&&(t=Eg+500-Me(),10<t)){if(pu(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){mt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=qf(Ss.bind(null,e,_t,Xn),t);break}Ss(e,_t,Xn);break;case 4:if(jr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-wn(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xP(r/1960))-r,10<r){e.timeoutHandle=qf(Ss.bind(null,e,_t,Xn),r);break}Ss(e,_t,Xn);break;case 5:Ss(e,_t,Xn);break;default:throw Error(L(329))}}}return Ct(e,Me()),e.callbackNode===n?wS.bind(null,e):null}function hp(e,t){var n=Aa;return e.current.memoizedState.isDehydrated&&(zs(e,t).flags|=256),e=Ou(e,t),e!==2&&(t=_t,_t=n,t!==null&&fp(t)),e}function fp(e){_t===null?_t=e:_t.push.apply(_t,e)}function SP(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!Sn(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function jr(e,t){for(t&=~_g,t&=~vd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-wn(t),r=1<<n;e[n]=-1,t&=~r}}function Zv(e){if(he&6)throw Error(L(327));Yi();var t=pu(e,0);if(!(t&1))return Ct(e,Me()),null;var n=Ou(e,t);if(e.tag!==0&&n===2){var r=$f(e);r!==0&&(t=r,n=hp(e,r))}if(n===1)throw n=el,zs(e,0),jr(e,t),Ct(e,Me()),n;if(n===6)throw Error(L(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ss(e,_t,Xn),Ct(e,Me()),null}function Tg(e,t){var n=he;he|=1;try{return e(t)}finally{he=n,he===0&&(So=Me()+500,pd&&hs())}}function Js(e){Hr!==null&&Hr.tag===0&&!(he&6)&&Yi();var t=he;he|=1;var n=Yt.transition,r=me;try{if(Yt.transition=null,me=1,e)return e()}finally{me=r,Yt.transition=n,he=t,!(he&6)&&hs()}}function kg(){Pt=Ui.current,_e(Ui)}function zs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,XR(n)),Ve!==null)for(n=Ve.return;n!==null;){var r=n;switch(og(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&wu();break;case 3:bo(),_e(Tt),_e(ct),mg();break;case 5:pg(r);break;case 4:bo();break;case 13:_e(Re);break;case 19:_e(Re);break;case 10:ug(r.type._context);break;case 22:case 23:kg()}n=n.return}if(Qe=e,Ve=e=es(e.current,null),rt=Pt=t,He=0,el=null,_g=vd=Ys=0,_t=Aa=null,As!==null){for(t=0;t<As.length;t++)if(n=As[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}As=null}return e}function bS(e,t){do{var n=Ve;try{if(cg(),Uc.current=Au,Cu){for(var r=Pe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Cu=!1}if(Qs=0,Ge=ze=Pe=null,ka=!1,Ja=0,Sg.current=null,n===null||n.return===null){He=1,el=t,Ve=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=rt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=Uv(o);if(h!==null){h.flags&=-257,Vv(h,o,a,i,t),h.mode&1&&Fv(i,c,t),t=h,l=c;var v=t.updateQueue;if(v===null){var g=new Set;g.add(l),t.updateQueue=g}else v.add(l);break e}else{if(!(t&1)){Fv(i,c,t),Cg();break e}l=Error(L(426))}}else if(ke&&a.mode&1){var x=Uv(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Vv(x,o,a,i,t),ag(xo(l,a));break e}}i=l=xo(l,a),He!==4&&(He=2),Aa===null?Aa=[i]:Aa.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var y=rS(i,l,t);Nv(i,y);break e;case 1:a=l;var b=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof b.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Xr===null||!Xr.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=sS(i,a,t);Nv(i,S);break e}}i=i.return}while(i!==null)}_S(n)}catch(_){t=_,Ve===n&&n!==null&&(Ve=n=n.return);continue}break}while(!0)}function xS(){var e=Ru.current;return Ru.current=Au,e===null?Au:e}function Cg(){(He===0||He===3||He===2)&&(He=4),Qe===null||!(Ys&268435455)&&!(vd&268435455)||jr(Qe,rt)}function Ou(e,t){var n=he;he|=2;var r=xS();(Qe!==e||rt!==t)&&(Xn=null,zs(e,t));do try{_P();break}catch(s){bS(e,s)}while(!0);if(cg(),he=n,Ru.current=r,Ve!==null)throw Error(L(261));return Qe=null,rt=0,He}function _P(){for(;Ve!==null;)SS(Ve)}function EP(){for(;Ve!==null&&!QA();)SS(Ve)}function SS(e){var t=TS(e.alternate,e,Pt);e.memoizedProps=e.pendingProps,t===null?_S(e):Ve=t,Sg.current=null}function _S(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=yP(n,t),n!==null){n.flags&=32767,Ve=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{He=6,Ve=null;return}}else if(n=gP(n,t,Pt),n!==null){Ve=n;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);He===0&&(He=5)}function Ss(e,t,n){var r=me,s=Yt.transition;try{Yt.transition=null,me=1,TP(e,t,n,r)}finally{Yt.transition=s,me=r}return null}function TP(e,t,n,r){do Yi();while(Hr!==null);if(he&6)throw Error(L(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(L(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(iR(e,i),e===Qe&&(Ve=Qe=null,rt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||lc||(lc=!0,kS(fu,function(){return Yi(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Yt.transition,Yt.transition=null;var o=me;me=1;var a=he;he|=4,Sg.current=null,wP(e,n),yS(n,e),WR(Hf),mu=!!zf,Hf=zf=null,e.current=n,bP(n),YA(),he=a,me=o,Yt.transition=i}else e.current=n;if(lc&&(lc=!1,Hr=e,ju=s),i=e.pendingLanes,i===0&&(Xr=null),ZA(n.stateNode),Ct(e,Me()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Pu)throw Pu=!1,e=up,up=null,e;return ju&1&&e.tag!==0&&Yi(),i=e.pendingLanes,i&1?e===dp?Ra++:(Ra=0,dp=e):Ra=0,hs(),null}function Yi(){if(Hr!==null){var e=r1(ju),t=Yt.transition,n=me;try{if(Yt.transition=null,me=16>e?16:e,Hr===null)var r=!1;else{if(e=Hr,Hr=null,ju=0,he&6)throw Error(L(331));var s=he;for(he|=4,W=e.current;W!==null;){var i=W,o=i.child;if(W.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(W=c;W!==null;){var u=W;switch(u.tag){case 0:case 11:case 15:Ca(8,u,i)}var d=u.child;if(d!==null)d.return=u,W=d;else for(;W!==null;){u=W;var p=u.sibling,h=u.return;if(pS(u),u===c){W=null;break}if(p!==null){p.return=h,W=p;break}W=h}}}var v=i.alternate;if(v!==null){var g=v.child;if(g!==null){v.child=null;do{var x=g.sibling;g.sibling=null,g=x}while(g!==null)}}W=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,W=o;else e:for(;W!==null;){if(i=W,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Ca(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,W=y;break e}W=i.return}}var b=e.current;for(W=b;W!==null;){o=W;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,W=w;else e:for(o=b;W!==null;){if(a=W,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:yd(9,a)}}catch(_){Le(a,a.return,_)}if(a===o){W=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,W=S;break e}W=a.return}}if(he=s,hs(),Fn&&typeof Fn.onPostCommitFiberRoot=="function")try{Fn.onPostCommitFiberRoot(cd,e)}catch{}r=!0}return r}finally{me=n,Yt.transition=t}}return!1}function e0(e,t,n){t=xo(n,t),t=rS(e,t,1),e=Jr(e,t,1),t=mt(),e!==null&&(Al(e,1,t),Ct(e,t))}function Le(e,t,n){if(e.tag===3)e0(e,e,n);else for(;t!==null;){if(t.tag===3){e0(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Xr===null||!Xr.has(r))){e=xo(n,e),e=sS(t,e,1),t=Jr(t,e,1),e=mt(),t!==null&&(Al(t,1,e),Ct(t,e));break}}t=t.return}}function kP(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=mt(),e.pingedLanes|=e.suspendedLanes&n,Qe===e&&(rt&n)===n&&(He===4||He===3&&(rt&130023424)===rt&&500>Me()-Eg?zs(e,0):_g|=n),Ct(e,t)}function ES(e,t){t===0&&(e.mode&1?(t=Xl,Xl<<=1,!(Xl&130023424)&&(Xl=4194304)):t=1);var n=mt();e=lr(e,t),e!==null&&(Al(e,t,n),Ct(e,n))}function CP(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ES(e,n)}function AP(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),ES(e,n)}var TS;TS=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tt.current)Et=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Et=!1,mP(e,t,n);Et=!!(e.flags&131072)}else Et=!1,ke&&t.flags&1048576&&R1(t,Su,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Bc(e,t),e=t.pendingProps;var s=yo(t,ct.current);Qi(t,n),s=yg(null,t,r,e,s,n);var i=vg();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,kt(r)?(i=!0,bu(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,hg(t),s.updater=gd,t.stateNode=s,s._reactInternals=t,Zf(t,r,e,n),t=np(null,t,r,!0,i,n)):(t.tag=0,ke&&i&&ig(t),ht(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Bc(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=PP(r),e=dn(r,e),s){case 0:t=tp(null,t,r,e,n);break e;case 1:t=Hv(null,t,r,e,n);break e;case 11:t=Bv(null,t,r,e,n);break e;case 14:t=zv(null,t,r,dn(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:dn(r,s),tp(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:dn(r,s),Hv(e,t,r,s,n);case 3:e:{if(lS(t),e===null)throw Error(L(387));r=t.pendingProps,i=t.memoizedState,s=i.element,L1(e,t),Tu(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=xo(Error(L(423)),t),t=Wv(e,t,r,n,s);break e}else if(r!==s){s=xo(Error(L(424)),t),t=Wv(e,t,r,n,s);break e}else for(Nt=Yr(t.stateNode.containerInfo.firstChild),It=t,ke=!0,gn=null,n=N1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vo(),r===s){t=cr(e,t,n);break e}ht(e,t,r,n)}t=t.child}return t;case 5:return D1(t),e===null&&Yf(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Wf(r,s)?o=null:i!==null&&Wf(r,i)&&(t.flags|=32),aS(e,t),ht(e,t,o,n),t.child;case 6:return e===null&&Yf(t),null;case 13:return cS(e,t,n);case 4:return fg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=wo(t,null,r,n):ht(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:dn(r,s),Bv(e,t,r,s,n);case 7:return ht(e,t,t.pendingProps,n),t.child;case 8:return ht(e,t,t.pendingProps.children,n),t.child;case 12:return ht(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,we(_u,r._currentValue),r._currentValue=o,i!==null)if(Sn(i.value,o)){if(i.children===s.children&&!Tt.current){t=cr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=ir(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Jf(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(L(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Jf(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}ht(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Qi(t,n),s=Zt(s),r=r(s),t.flags|=1,ht(e,t,r,n),t.child;case 14:return r=t.type,s=dn(r,t.pendingProps),s=dn(r.type,s),zv(e,t,r,s,n);case 15:return iS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:dn(r,s),Bc(e,t),t.tag=1,kt(r)?(e=!0,bu(t)):e=!1,Qi(t,n),nS(t,r,s),Zf(t,r,s,n),np(null,t,r,!0,e,n);case 19:return uS(e,t,n);case 22:return oS(e,t,n)}throw Error(L(156,t.tag))};function kS(e,t){return Zx(e,t)}function RP(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gt(e,t,n,r){return new RP(e,t,n,r)}function Ag(e){return e=e.prototype,!(!e||!e.isReactComponent)}function PP(e){if(typeof e=="function")return Ag(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Km)return 11;if(e===Gm)return 14}return 2}function es(e,t){var n=e.alternate;return n===null?(n=Gt(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.deleti
vendor: 4,322 bytes, line 41
41ons=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Wc(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Ag(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Pi:return Hs(n.children,s,i,t);case qm:o=8,s|=8;break;case _f:return e=Gt(12,n,t,s|2),e.elementType=_f,e.lanes=i,e;case Ef:return e=Gt(13,n,t,s),e.elementType=Ef,e.lanes=i,e;case Tf:return e=Gt(19,n,t,s),e.elementType=Tf,e.lanes=i,e;case Dx:return wd(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ix:o=10;break e;case Lx:o=9;break e;case Km:o=11;break e;case Gm:o=14;break e;case Ar:o=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=Gt(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Hs(e,t,n,r){return e=Gt(7,e,r,t),e.lanes=n,e}function wd(e,t,n,r){return e=Gt(22,e,r,t),e.elementType=Dx,e.lanes=n,e.stateNode={isHidden:!1},e}function Ah(e,t,n){return e=Gt(6,e,null,t),e.lanes=n,e}function Rh(e,t,n){return t=Gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jP(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ch(0),this.expirationTimes=ch(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ch(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Rg(e,t,n,r,s,i,o,a,l){return e=new jP(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Gt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},hg(i),e}function OP(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ri,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function CS(e){if(!e)return ss;e=e._reactInternals;e:{if(si(e)!==e||e.tag!==1)throw Error(L(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(kt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(L(171))}if(e.tag===1){var n=e.type;if(kt(n))return C1(e,n,t)}return t}function AS(e,t,n,r,s,i,o,a,l){return e=Rg(n,r,!0,e,s,i,o,a,l),e.context=CS(null),n=e.current,r=mt(),s=Zr(n),i=ir(r,s),i.callback=t??null,Jr(n,i,s),e.current.lanes=s,Al(e,s,r),Ct(e,r),e}function bd(e,t,n,r){var s=t.current,i=mt(),o=Zr(s);return n=CS(n),t.context===null?t.context=n:t.pendingContext=n,t=ir(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Jr(s,t,o),e!==null&&(bn(e,s,o,i),Fc(e,s,o)),o}function Nu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function t0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Pg(e,t){t0(e,t),(e=e.alternate)&&t0(e,t)}function NP(){return null}var RS=typeof reportError=="function"?reportError:function(e){console.error(e)};function jg(e){this._internalRoot=e}xd.prototype.render=jg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));bd(e,t,null,null)};xd.prototype.unmount=jg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Js(function(){bd(null,e,null,null)}),t[ar]=null}};function xd(e){this._internalRoot=e}xd.prototype.unstable_scheduleHydration=function(e){if(e){var t=o1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pr.length&&t!==0&&t<Pr[n].priority;n++);Pr.splice(n,0,e),n===0&&l1(e)}};function Og(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Sd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function n0(){}
vendor: 4,882 bytes, line 41
41function IP(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=Nu(o);i.call(c)}}var o=AS(t,r,e,0,null,!1,!1,"",n0);return e._reactRootContainer=o,e[ar]=o.current,qa(e.nodeType===8?e.parentNode:e),Js(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=Nu(l);a.call(c)}}var l=Rg(e,0,!1,null,null,!1,!1,"",n0);return e._reactRootContainer=l,e[ar]=l.current,qa(e.nodeType===8?e.parentNode:e),Js(function(){bd(t,l,n,r)}),l}function _d(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Nu(o);a.call(l)}}bd(t,o,e,s)}else o=IP(n,t,e,s,r);return Nu(o)}s1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ha(t.pendingLanes);n!==0&&(Jm(t,n|1),Ct(t,Me()),!(he&6)&&(So=Me()+500,hs()))}break;case 13:Js(function(){var r=lr(e,1);if(r!==null){var s=mt();bn(r,e,1,s)}}),Pg(e,1)}};Xm=function(e){if(e.tag===13){var t=lr(e,134217728);if(t!==null){var n=mt();bn(t,e,134217728,n)}Pg(e,134217728)}};i1=function(e){if(e.tag===13){var t=Zr(e),n=lr(e,t);if(n!==null){var r=mt();bn(n,e,t,r)}Pg(e,t)}};o1=function(){return me};a1=function(e,t){var n=me;try{return me=e,t()}finally{me=n}};Lf=function(e,t,n){switch(t){case"input":if(Af(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=fd(r);if(!s)throw Error(L(90));$x(r),Af(r,s)}}}break;case"textarea":Ux(e,n);break;case"select":t=n.value,t!=null&&Wi(e,!!n.multiple,t,!1)}};Kx=Tg;Gx=Js;var LP={usingClientEntryPoint:!1,Events:[Pl,Ii,fd,Wx,qx,Tg]},ta={findFiberByHostInstance:Cs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},DP={bundleType:ta.bundleType,version:ta.version,rendererPackageName:ta.rendererPackageName,rendererConfig:ta.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:fr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Jx(e),e===null?null:e.stateNode},findFiberByHostInstance:ta.findFiberByHostInstance||NP,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cc.isDisabled&&cc.supportsFiber)try{cd=cc.inject(DP),Fn=cc}catch{}}Mt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=LP;Mt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Og(t))throw Error(L(200));return OP(e,t,null,n)};Mt.createRoot=function(e,t){if(!Og(e))throw Error(L(299));var n=!1,r="",s=RS;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Rg(e,1,!1,null,null,n,!1,r,s),e[ar]=t.current,qa(e.nodeType===8?e.parentNode:e),new jg(t)};Mt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=Jx(t),e=e===null?null:e.stateNode,e};Mt.flushSync=function(e){return Js(e)};Mt.hydrate=function(e,t,n){if(!Sd(t))throw Error(L(200));return _d(null,e,t,!0,n)};Mt.hydrateRoot=function(e,t,n){if(!Og(e))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=RS;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=AS(t,null,e,1,n??null,s,!1,i,o),e[ar]=t.current,qa(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new xd(t)};Mt.render=function(e,t,n){if(!Sd(t))throw Error(L(200));return _d(null,e,t,!1,n)};Mt.unmountComponentAtNode=function(e){if(!Sd(e))throw Error(L(40));return e._reactRootContainer?(Js(function(){_d(null,null,e,!1,function(){e._reactRootContainer=null,e[ar]=null})}),!0):!1};Mt.unstable_batchedUpdates=Tg;Mt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Sd(n))throw Error(L(200));if(e==null||e._reactInternals===void 0)throw Error(L(38));return _d(e,t,n,!1,r)};Mt.version="18.3.1-next-f1338f8080-20240426";function PS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(PS)}catch(e){console.error(e)}}PS(),Px.exports=Mt;var Ol=Px.exports;const jS=kl(Ol);var OS,r0=Ol;
41OS=r0.createRoot,r0.hydrateRoot;const MP="modulepreload",$P=function(e){return"/"+e},s0={},X=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=$P(l),l in s0)return;s0[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":MP,c||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((p,h)=>{d.addEventListener("load",p),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};var Nl=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(){}},Xs=typeof window>"u"||"Deno"in globalThis;function St(){}function FP(e,t){return typeof e=="function"?e(t):e}function pp(e){return typeof e=="number"&&e>=0&&e!==1/0}function NS(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ts(e,t){return typeof e=="function"?e(t):e}function Wt(e,t){return typeof e=="function"?e(t):e}function i0(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Ng(o,t.options))return!1}else if(!nl(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function o0(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(tl(t.options.mutationKey)!==tl(i))return!1}else if(!nl(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Ng(e,t){return((t==null?void 0:t.queryKeyHashFn)||tl)(e)}function tl(e){return JSON.stringify(e,(t,n)=>gp(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function nl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>nl(e[n],t[n])):!1}function IS(e,t){if(e===t)return e;const n=a0(e)&&a0(t);if(n||gp(e)&&gp(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<o;u++){const d=n?u:i[u];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,c++):(a[d]=IS(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&c++)}return s===o&&c===s?e:a}return t}function mp(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function a0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function gp(e){if(!l0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!l0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function l0(e){return Object.prototype.toString.call(e)==="[object Object]"}function UP(e){return new Promise(t=>{setTimeout(t,e)})}function yp(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?IS(e,t):t}function VP(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function BP(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ig=Symbol();function LS(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ig?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function zP(e,t){return typeof e=="function"?e(...t):!!e}var Ns,Lr,ro,ux,HP=(ux=class extends Nl{constructor(){super();ne(this,Ns);ne(this,Lr);ne(this,ro);q(this,ro,t=>{if(!Xs&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){k(this,Lr)||this.setEventListener(k(this,ro))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,Lr))==null||t.call(this),q(this,Lr,void 0))}setEventListener(t){var n;q(this,ro,t),(n=k(this,Lr))==null||n.call(this),q(this,Lr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){k(this,Ns)!==t&&(q(this,Ns,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 4,517 bytes, line 41
41this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof k(this,Ns)=="boolean"?k(this,Ns):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ns=new WeakMap,Lr=new WeakMap,ro=new WeakMap,ux),Lg=new HP,so,Dr,io,dx,WP=(dx=class extends Nl{constructor(){super();ne(this,so,!0);ne(this,Dr);ne(this,io);q(this,io,t=>{if(!Xs&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){k(this,Dr)||this.setEventListener(k(this,io))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,Dr))==null||t.call(this),q(this,Dr,void 0))}setEventListener(t){var n;q(this,io,t),(n=k(this,Dr))==null||n.call(this),q(this,Dr,t(this.setOnline.bind(this)))}setOnline(t){k(this,so)!==t&&(q(this,so,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return k(this,so)}},so=new WeakMap,Dr=new WeakMap,io=new WeakMap,dx),Iu=new WP;function vp(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function qP(e){return Math.min(1e3*2**e,3e4)}function DS(e){return(e??"online")==="online"?Iu.isOnline():!0}var MS=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ph(e){return e instanceof MS}function $S(e){let t=!1,n=0,r=!1,s;const i=vp(),o=g=>{var x;r||(p(new MS(g)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>Lg.isFocused()&&(e.networkMode==="always"||Iu.isOnline())&&e.canRun(),u=()=>DS(e.networkMode)&&e.canRun(),d=g=>{var x;r||(r=!0,(x=e.onSuccess)==null||x.call(e,g),s==null||s(),i.resolve(g))},p=g=>{var x;r||(r=!0,(x=e.onError)==null||x.call(e,g),s==null||s(),i.reject(g))},h=()=>new Promise(g=>{var x;s=y=>{(r||c())&&g(y)},(x=e.onPause)==null||x.call(e)}).then(()=>{var g;s=void 0,r||(g=e.onContinue)==null||g.call(e)}),v=()=>{if(r)return;let g;const x=n===0?e.initialPromise:void 0;try{g=x??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(d).catch(y=>{var E;if(r)return;const b=e.retry??(Xs?0:3),w=e.retryDelay??qP,S=typeof w=="function"?w(n,y):w,_=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,y);if(t||!_){p(y);return}n++,(E=e.onFail)==null||E.call(e,n,y),UP(S).then(()=>c()?void 0:h()).then(()=>{t?p(y):v()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?v():h().then(v),i)}}var KP=e=>setTimeout(e,0);function GP(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=KP;const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var tt=GP(),Is,hx,FS=(hx=class{constructor(){ne(this,Is)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pp(this.gcTime)&&q(this,Is,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xs?1/0:5*60*1e3))}clearGcTimeout(){k(this,Is)&&(clearTimeout(k(this,Is)),q(this,Is,void 0))}},Is=new WeakMap,hx),oo,Ls,Ht,Ds,at,Sl,Ms,fn,Jn,fx,QP=(fx=class extends FS{constructor(t){super();ne(this,fn);ne(this,oo);ne(this,Ls);ne(this,Ht);ne(this,Ds);ne(this,at);ne(this,Sl);ne(this,Ms);q(this,Ms,!1),q(this,Sl,t.defaultOptions),this.setOptions(t.options),this.observers=[],q(this,Ds,t.client),q(this,Ht,k(this,Ds).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,q(this,oo,YP(this.options)),this.state=t.state??k(this,oo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=k(this,at))==null?void 0:t.promise}setOptions(t){this.options={...k(this,Sl),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,Ht).remove(this)}setData(t,n){const r=yp(this.state.data,t,this.options);return ce(this,fn,Jn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ce(this,fn,Jn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=k(this,at))==null?void 0:r.promise;
vendor: 1,669 bytes, line 41
41return(s=k(this,at))==null||s.cancel(t),n?n.then(St).catch(St):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(k(this,oo))}isActive(){return this.observers.some(t=>Wt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ig||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ts(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!NS(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=k(this,at))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=k(this,at))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),k(this,Ht).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(k(this,at)&&(k(this,Ms)?k(this,at).cancel({revert:!0}):k(this,at).cancelRetry()),this.scheduleGc()),k(this,Ht).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ce(this,fn,Jn).call(this,{type:"invalidate"})}
vendor: 6,523 bytes, line 41
41fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(k(this,at))return k(this,at).continueRetry(),k(this,at).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(h=>h.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(q(this,Ms,!0),r.signal)})},i=()=>{const p=LS(this.options,n),v=(()=>{const g={client:k(this,Ds),queryKey:this.queryKey,meta:this.meta};return s(g),g})();return q(this,Ms,!1),this.options.persister?this.options.persister(p,v,this):p(v)},a=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:k(this,Ds),state:this.state,fetchFn:i};return s(p),p})();(c=this.options.behavior)==null||c.onFetch(a,this),q(this,Ls,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&ce(this,fn,Jn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=p=>{var h,v,g,x;Ph(p)&&p.silent||ce(this,fn,Jn).call(this,{type:"error",error:p}),Ph(p)||((v=(h=k(this,Ht).config).onError)==null||v.call(h,p,this),(x=(g=k(this,Ht).config).onSettled)==null||x.call(g,this.state.data,p,this)),this.scheduleGc()};return q(this,at,$S({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:p=>{var h,v,g,x;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(y){l(y);return}(v=(h=k(this,Ht).config).onSuccess)==null||v.call(h,p,this),(x=(g=k(this,Ht).config).onSettled)==null||x.call(g,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,h)=>{ce(this,fn,Jn).call(this,{type:"failed",failureCount:p,error:h})},onPause:()=>{ce(this,fn,Jn).call(this,{type:"pause"})},onContinue:()=>{ce(this,fn,Jn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),k(this,at).start()}},oo=new WeakMap,Ls=new WeakMap,Ht=new WeakMap,Ds=new WeakMap,at=new WeakMap,Sl=new WeakMap,Ms=new WeakMap,fn=new WeakSet,Jn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...US(r.data,this.options),fetchMeta:t.meta??null};case"success":return q(this,Ls,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Ph(s)&&s.revert&&k(this,Ls)?{...k(this,Ls),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),tt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),k(this,Ht).notify({query:this,type:"updated",action:t})})},fx);function US(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:DS(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function YP(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var On,px,JP=(px=class extends Nl{constructor(t={}){super();ne(this,On);this.config=t,q(this,On,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??Ng(s,n);let o=this.get(i);return o||(o=new QP({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){k(this,On).has(t.queryHash)||(k(this,On).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=k(this,On).get(t.queryHash);n&&(t.destroy(),n===t&&k(this,On).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){tt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return k(this,On).get(t)}getAll(){return[...k(this,On).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>i0(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>i0(t,r)):n}notify(t){tt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){tt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){tt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},On=new WeakMap,px),Nn,ut,$s,In,Er,mx,XP=(mx=class extends FS{constructor(t){super();ne(this,In);ne(this,Nn);ne(this,ut);ne(this,$s);this.mutationId=t.mutationId,q(this,ut,t.mutationCache),q(this,Nn,[]),this.state=t.state||ZP(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){k(this,Nn).includes(t)||(k(this,Nn).push(t),this.clearGcTimeout(),k(this,ut).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){q(this,Nn,k(this,Nn).filter(n=>n!==t)),this.scheduleGc(),k(this,ut).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){k(this,Nn).length||(this.state.status==="pending"?this.scheduleGc():k(this,ut).remove(this))}continue(){var t;return((t=k(this,$s))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,c,u,d,p,h,v,g,x,y,b,w,S,_,E,T,C;const n=()=>{ce(this,In,Er).call(this,{type:"continue"})};q(this,$s,$S({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(O,A)=>{ce(this,In,Er).call(this,{type:"failed",failureCount:O,error:A})},onPause:()=>{ce(this,In,Er).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,ut).canRun(this)}));const r=this.state.status==="pending",s=!k(this,$s).canStart();try{if(r)n();else{ce(this,In,Er).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=k(this,ut).config).onMutate)==null?void 0:o.call(i,t,this));
41const A=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));A!==this.state.context&&ce(this,In,Er).call(this,{type:"pending",context:A,variables:t,isPaused:s})}const O=await k(this,$s).start();return await((u=(c=k(this,ut).config).onSuccess)==null?void 0:u.call(c,O,t,this.state.context,this)),await((p=(d=this.options).onSuccess)==null?void 0:p.call(d,O,t,this.state.context)),await((v=(h=k(this,ut).config).onSettled)==null?void 0:v.call(h,O,null,this.state.variables,this.state.context,this)),await((x=(g=this.options).onSettled)==null?void 0:x.call(g,O,null,t,this.state.context)),ce(this,In,Er).call(this,{type:"success",data:O}),O}catch(O){try{throw await((b=(y=k(this,ut).config).onError)==null?void 0:b.call(y,O,t,this.state.context,this)),await((S=(w=this.options).onError)==null?void 0:S.call(w,O,t,this.state.context)),await((E=(_=k(this,ut).config).onSettled)==null?void 0:E.call(_,void 0,O,this.state.variables,this.state.context,this)),await((C=(T=this.options).onSettled)==null?void 0:C.call(T,void 0,O,t,this.state.context)),O}finally{ce(this,In,Er).call(this,{type:"error",error:O})}}finally{k(this,ut).runNext(this)}}},Nn=new WeakMap,ut=new WeakMap,$s=new WeakMap,In=new WeakSet,Er=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),tt.batch(()=>{k(this,Nn).forEach(r=>{r.onMutationUpdate(t)}),k(this,ut).notify({mutation:this,type:"updated",action:t})})},mx);function ZP(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var nr,pn,_l,gx,ej=(gx=class extends Nl{constructor(t={}){super();ne(this,nr);ne(this,pn);ne(this,_l);this.config=t,q(this,nr,new Set),q(this,pn,new Map),q(this,_l,0)}build(t,n,r){const s=new XP({mutationCache:this,mutationId:++ql(this,_l)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){k(this,nr).add(t);const n=uc(t);if(typeof n=="string"){const r=k(this,pn).get(n);r?r.push(t):k(this,pn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(k(this,nr).delete(t)){const n=uc(t);if(typeof n=="string"){const r=k(this,pn).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&k(this,pn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=uc(t);if(typeof n=="string"){const r=k(this,pn).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=uc(t);if(typeof n=="string"){const s=(r=k(this,pn).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){tt.batch(()=>{k(this,nr).forEach(t=>{this.notify({type:"removed",mutation:t})}),k(this,nr).clear(),k(this,pn).clear()})}getAll(){return Array.from(k(this,nr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>o0(n,r))}findAll(t={}){return this.getAll().filter(n=>o0(t,n))}notify(t){tt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return tt.batch(()=>Promise.all(t.map(n=>n.continue().catch(St))))}},nr=new WeakMap,pn=new WeakMap,_l=new WeakMap,gx);function uc(e){var t;return(t=e.options.scope)==null?void 0:t.id}function c0(e){return{onFetch:(t,n)=>{var u,d,p,h,v;const r=t.options,s=(p=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,i=((h=t.state.data)==null?void 0:h.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const x=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)}
41)},y=LS(t.options,t.fetchOptions),b=async(w,S,_)=>{if(g)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const T=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:S,direction:_?"backward":"forward",meta:t.options.meta};return x(M),M})(),C=await y(T),{maxPages:O}=t.options,A=_?BP:VP;return{pages:A(w.pages,C,O),pageParams:A(w.pageParams,S,O)}};if(s&&i.length){const w=s==="backward",S=w?tj:u0,_={pages:i,pageParams:o},E=S(r,_);a=await b(_,E,w)}else{const w=e??i.length;do{const S=l===0?o[0]??r.initialPageParam:u0(r,a);if(l>0&&S==null)break;a=await b(a,S),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var g,x;return(x=(g=t.options).persister)==null?void 0:x.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function u0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function tj(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ne,Mr,$r,ao,lo,Fr,co,uo,yx,nj=(yx=class{constructor(e={}){ne(this,Ne);ne(this,Mr);ne(this,$r);ne(this,ao);ne(this,lo);ne(this,Fr);ne(this,co);ne(this,uo);q(this,Ne,e.queryCache||new JP),q(this,Mr,e.mutationCache||new ej),q(this,$r,e.defaultOptions||{}),q(this,ao,new Map),q(this,lo,new Map),q(this,Fr,0)}mount(){ql(this,Fr)._++,k(this,Fr)===1&&(q(this,co,Lg.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,Ne).onFocus())})),q(this,uo,Iu.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,Ne).onOnline())})))}unmount(){var e,t;ql(this,Fr)._--,k(this,Fr)===0&&((e=k(this,co))==null||e.call(this),q(this,co,void 0),(t=k(this,uo))==null||t.call(this),q(this,uo,void 0))}isFetching(e){return k(this,Ne).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return k(this,Mr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=k(this,Ne).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=k(this,Ne).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ts(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return k(this,Ne).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=k(this,Ne).get(r.queryHash),i=s==null?void 0:s.state.data,o=FP(t,i);if(o!==void 0)return k(this,Ne).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return tt.batch(()=>k(this,Ne).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=k(this,Ne).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=k(this,Ne);tt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=k(this,Ne);return tt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=tt.batch(()=>k(this,Ne).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(St).catch(St)}invalidateQueries(e,t={}){return tt.batch(()=>(k(this,Ne).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=tt.batch(()=>k(this,Ne).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(St)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(St)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=k(this,Ne).build(this,t);return n.isStaleByTime(ts(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(St).catch(St)}fetchInfiniteQuery(e){return e.behavior=c0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(St).cat
vendor: 4,542 bytes, line 41
41ch(St)}ensureInfiniteQueryData(e){return e.behavior=c0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Iu.isOnline()?k(this,Mr).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,Ne)}getMutationCache(){return k(this,Mr)}getDefaultOptions(){return k(this,$r)}setDefaultOptions(e){q(this,$r,e)}setQueryDefaults(e,t){k(this,ao).set(tl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...k(this,ao).values()],n={};return t.forEach(r=>{nl(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){k(this,lo).set(tl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...k(this,lo).values()],n={};return t.forEach(r=>{nl(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...k(this,$r).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ng(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===Ig&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...k(this,$r).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){k(this,Ne).clear(),k(this,Mr).clear()}},Ne=new WeakMap,Mr=new WeakMap,$r=new WeakMap,ao=new WeakMap,lo=new WeakMap,Fr=new WeakMap,co=new WeakMap,uo=new WeakMap,yx),bt,ue,El,dt,Fs,ho,Ur,Vr,Tl,fo,po,Us,Vs,Br,mo,pe,pa,wp,bp,xp,Sp,_p,Ep,Tp,VS,vx,rj=(vx=class extends Nl{constructor(t,n){super();ne(this,pe);ne(this,bt);ne(this,ue);ne(this,El);ne(this,dt);ne(this,Fs);ne(this,ho);ne(this,Ur);ne(this,Vr);ne(this,Tl);ne(this,fo);ne(this,po);ne(this,Us);ne(this,Vs);ne(this,Br);ne(this,mo,new Set);this.options=n,q(this,bt,t),q(this,Vr,null),q(this,Ur,vp()),this.options.experimental_prefetchInRender||k(this,Ur).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,ue).addObserver(this),d0(k(this,ue),this.options)?ce(this,pe,pa).call(this):this.updateResult(),ce(this,pe,Sp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return kp(k(this,ue),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return kp(k(this,ue),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ce(this,pe,_p).call(this),ce(this,pe,Ep).call(this),k(this,ue).removeObserver(this)}setOptions(t){const n=this.options,r=k(this,ue);if(this.options=k(this,bt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Wt(this.options.enabled,k(this,ue))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ce(this,pe,Tp).call(this),k(this,ue).setOptions(this.options),n._defaulted&&!mp(this.options,n)&&k(this,bt).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,ue),observer:this});const s=this.hasListeners();s&&h0(k(this,ue),r,this.options,n)&&ce(this,pe,pa).call(this),this.updateResult(),s&&(k(this,ue)!==r||Wt(this.options.enabled,k(this,ue))!==Wt(n.enabled,k(this,ue))||ts(this.options.staleTime,k(this,ue))!==ts(n.staleTime,k(this,ue)))&&ce(this,pe,wp).call(this);const i=ce(this,pe,bp).call(this);s&&(k(this,ue)!==r||Wt(this.options.enabled,k(this,ue))!==Wt(n.enabled,k(this,ue))||i!==k(this,Br))&&ce(this,pe,xp).call(this,i)}getOptimisticResult(t){const n=k(this,bt).getQueryCache().build(k(this,bt),t),r=this.createResult(n,t);return ij(this,r)&&(q(this,dt,r),q(this,ho,this.options),q(this,Fs,k(this,ue).state)),r}getCurrentResult(){return k(this,dt)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),Reflect.get(r,s))})}trackProp(t){k(this,mo).add(t)}getCurrentQuery(){return k(this,ue)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=k(this,bt).defaultQueryOptions(t),r=k(this,bt).getQueryCache().build(k(this,bt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ce(this,pe,pa).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,dt)))}createResult(t,n){var O;const r=k(this,ue),s=this.options,i=k(this,dt),o=k(this,Fs),a=k(this,ho),c=t!==r?t.state:k(this,El),{state:u}=t;let d={...u},p=!1,h;
41if(n._optimisticResults){const A=this.hasListeners(),M=!A&&d0(t,n),I=A&&h0(t,r,n,s);(M||I)&&(d={...d,...US(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:v,errorUpdatedAt:g,status:x}=d;h=d.data;let y=!1;if(n.placeholderData!==void 0&&h===void 0&&x==="pending"){let A;i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(A=i.data,y=!0):A=typeof n.placeholderData=="function"?n.placeholderData((O=k(this,po))==null?void 0:O.state.data,k(this,po)):n.placeholderData,A!==void 0&&(x="success",h=yp(i==null?void 0:i.data,A,n),p=!0)}if(n.select&&h!==void 0&&!y)if(i&&h===(o==null?void 0:o.data)&&n.select===k(this,Tl))h=k(this,fo);else try{q(this,Tl,n.select),h=n.select(h),h=yp(i==null?void 0:i.data,h,n),q(this,fo,h),q(this,Vr,null)}catch(A){q(this,Vr,A)}k(this,Vr)&&(v=k(this,Vr),h=k(this,fo),g=Date.now(),x="error");const b=d.fetchStatus==="fetching",w=x==="pending",S=x==="error",_=w&&b,E=h!==void 0,C={status:x,fetchStatus:d.fetchStatus,isPending:w,isSuccess:x==="success",isError:S,isInitialLoading:_,isLoading:_,data:h,dataUpdatedAt:d.dataUpdatedAt,error:v,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:S&&!E,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:S&&E,isStale:Dg(t,n),refetch:this.refetch,promise:k(this,Ur),isEnabled:Wt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const A=Q=>{C.status==="error"?Q.reject(C.error):C.data!==void 0&&Q.resolve(C.data)},M=()=>{const Q=q(this,Ur,C.promise=vp());A(Q)},I=k(this,Ur);switch(I.status){case"pending":t.queryHash===r.queryHash&&A(I);break;case"fulfilled":(C.status==="error"||C.data!==I.value)&&M();break;case"rejected":(C.status!=="error"||C.error!==I.reason)&&M();break}}return C}updateResult(){const t=k(this,dt),n=this.createResult(k(this,ue),this.options);if(q(this,Fs,k(this,ue).state),q(this,ho,this.options),k(this,Fs).data!==void 0&&q(this,po,k(this,ue)),mp(n,t))return;q(this,dt,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!k(this,mo).size)return!0;const o=new Set(i??k(this,mo));return this.options.throwOnError&&o.add("error"),Object.keys(k(this,dt)).some(a=>{const l=a;return k(this,dt)[l]!==t[l]&&o.has(l)})};ce(this,pe,VS).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ce(this,pe,Sp).call(this)}},bt=new WeakMap,ue=new WeakMap,El=new WeakMap,dt=new WeakMap,Fs=new WeakMap,ho=new WeakMap,Ur=new WeakMap,Vr=new WeakMap,Tl=new WeakMap,fo=new WeakMap,po=new WeakMap,Us=new WeakMap,Vs=new WeakMap,Br=new WeakMap,mo=new WeakMap,pe=new WeakSet,pa=function(t){ce(this,pe,Tp).call(this);let n=k(this,ue).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(St)),n},wp=function(){ce(this,pe,_p).call(this);const t=ts(this.options.staleTime,k(this,ue));if(Xs||k(this,dt).isStale||!pp(t))return;const r=NS(k(this,dt).dataUpdatedAt,t)+1;q(this,Us,setTimeout(()=>{k(this,dt).isStale||this.updateResult()},r))},bp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,ue)):this.options.refetchInterval)??!1},xp=function(t){ce(this,pe,Ep).call(this),q(this,Br,t),!(Xs||Wt(this.options.enabled,k(this,ue))===!1||!pp(k(this,Br))||k(this,Br)===0)&&q(this,Vs,setInterval(()=>{(this.options.refetchIntervalInBackground||Lg.isFocused())&&ce(this,pe,pa).call(this)},k(this,Br)))},Sp=function(){ce(this,pe,wp).call(this),ce(this,pe,xp).call(this,ce(this,pe,bp).call(this))},_p=function(){k(this,Us)&&(clearTimeout(k(this,Us)),q(this,Us,void 0))},Ep=function(){k(this,Vs)&&(clearInterval(k(this,Vs)),q(this,Vs,void 0))},Tp=function(){const t=k(this,bt).getQueryCache().build(k(this,bt),this.options);if(t===k(this,ue))return;const n=k(this,ue);q(this,ue,t),q(this,El,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},VS=function(t){tt.batch(()=>
41{t.listeners&&this.listeners.forEach(n=>{n(k(this,dt))}),k(this,bt).getQueryCache().notify({query:k(this,ue),type:"observerResultsUpdated"})})},vx);function sj(e,t){return Wt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function d0(e,t){return sj(e,t)||e.state.data!==void 0&&kp(e,t,t.refetchOnMount)}function kp(e,t,n){if(Wt(t.enabled,e)!==!1&&ts(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Dg(e,t)}return!1}function h0(e,t,n,r){return(e!==t||Wt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Dg(e,n)}function Dg(e,t){return Wt(t.enabled,e)!==!1&&e.isStaleByTime(ts(t.staleTime,e))}function ij(e,t){return!mp(e.getCurrentResult(),t)}var BS=m.createContext(void 0),oj=e=>{const t=m.useContext(BS);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},aj=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(BS.Provider,{value:e,children:t})),zS=m.createContext(!1),lj=()=>m.useContext(zS);zS.Provider;function cj(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var uj=m.createContext(cj()),dj=()=>m.useContext(uj),hj=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},fj=e=>{m.useEffect(()=>{e.clearReset()},[e])},pj=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||zP(n,[e.error,r])),mj=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},gj=(e,t)=>e.isLoading&&e.isFetching&&!t,yj=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,f0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});
41function vj(e,t,n){var d,p,h,v,g;const r=lj(),s=dj(),i=oj(),o=i.defaultQueryOptions(e);(p=(d=i.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||p.call(d,o),o._optimisticResults=r?"isRestoring":"optimistic",mj(o),hj(o,s),fj(s);const a=!i.getQueryCache().get(o.queryHash),[l]=m.useState(()=>new t(i,o)),c=l.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(x=>{const y=u?l.subscribe(tt.batchCalls(x)):St;return l.updateResult(),y},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),m.useEffect(()=>{l.setOptions(o)},[o,l]),yj(o,c))throw f0(o,l,s);if(pj({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw c.error;if((v=(h=i.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||v.call(h,o,c),o.experimental_prefetchInRender&&!Xs&&gj(c,r)){const x=a?f0(o,l,s):(g=i.getQueryCache().get(o.queryHash))==null?void 0:g.promise;x==null||x.catch(St).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function qe(e,t){return vj(e,rj)}/**
42 * @remix-run/router v1.23.0
43 *
44 * Copyright (c) Remix Software Inc.
45 *
46 * This source code is licensed under the MIT license found in the
47 * LICENSE.md file in the root directory of this source tree.
48 *
49 * @license MIT
50 */function rl(){return rl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rl.apply(this,arguments)}var Wr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Wr||(Wr={}));const p0="popstate";function wj(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return Cp("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Lu(s)}return xj(t,n,null,e)}function je(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function HS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function bj(){return Math.random().toString(36).substr(2,8)}function m0(e,t){return{usr:e.state,key:e.key,idx:t}}function Cp(e,t,n,r){return n===void 0&&(n=null),rl({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Io(t):t,{state:n,key:t&&t.key||r||bj()})}function Lu(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Io(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function xj(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Wr.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(rl({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function d(){a=Wr.Pop;let x=u(),y=x==null?null:x-c;c=x,l&&l({action:a,location:g.location,delta:y})}function p(x,y){a=Wr.Push;let b=Cp(g.location,x,y);c=u()+1;let w=m0(b,c),S=g.createHref(b);try{o.pushState(w,"",S)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;s.location.assign(S)}i&&l&&l({action:a,location:g.location,delta:1})}function h(x,y){a=Wr.Replace;let b=Cp(g.location,x,y);c=u();let w=m0(b,c),S=g.createHref(b);o.replaceState(w,"",S),i&&l&&l({action:a,location:g.location,delta:0})}function v(x){let y=s.location.origin!=="null"?s.location.origin:s.location.href,b=typeof x=="string"?x:Lu(x);return b=b.replace(/ $/,"%20"),je(y,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,y)}let g={get action(){return a},get location(){return e(s,o)}
vendor: 2,728 bytes, line 50
50,listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(p0,d),l=x,()=>{s.removeEventListener(p0,d),l=null}},createHref(x){return t(s,x)},createURL:v,encodeLocation(x){let y=v(x);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:p,replace:h,go(x){return o.go(x)}};return g}var g0;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(g0||(g0={}));function Sj(e,t,n){return n===void 0&&(n="/"),_j(e,t,n,!1)}function _j(e,t,n,r){let s=typeof t=="string"?Io(t):t,i=_o(s.pathname||"/",n);if(i==null)return null;let o=WS(e);Ej(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=Lj(i);a=Nj(o[l],c,r)}return a}function WS(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(je(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=ns([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(je(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),WS(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:jj(c,i.index),routesMeta:u})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of qS(i.path))s(i,o,l)}),t}function qS(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=qS(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function Ej(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Oj(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Tj=/^:[\w-]+$/,kj=3,Cj=2,Aj=1,Rj=10,Pj=-2,y0=e=>e==="*";function jj(e,t){let n=e.split("/"),r=n.length;return n.some(y0)&&(r+=Pj),t&&(r+=Cj),n.filter(s=>!y0(s)).reduce((s,i)=>s+(Tj.test(i)?kj:i===""?Aj:Rj),r)}function Oj(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function Nj(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=i==="/"?t:t.slice(i.length)||"/",d=Du({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),p=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Du({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;
vendor: 9,390 bytes, lines 50-59
50Object.assign(s,d.params),o.push({params:s,pathname:ns([i,d.pathname]),pathnameBase:Fj(ns([i,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(i=ns([i,d.pathnameBase]))}return o}function Du(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ij(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:p,isOptional:h}=u;if(p==="*"){let g=a[d]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const v=a[d];return h&&!v?c[p]=void 0:c[p]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function Ij(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),HS(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function Lj(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return HS(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function _o(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Dj(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Io(e):e;return{pathname:n?n.startsWith("/")?n:Mj(n,t):t,search:Uj(r),hash:Vj(s)}}function Mj(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function jh(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function $j(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Mg(e,t){let n=$j(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function $g(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Io(e):(s=rl({},e),je(!s.pathname||!s.pathname.includes("?"),jh("?","pathname","search",s)),je(!s.pathname||!s.pathname.includes("#"),jh("#","pathname","hash",s)),je(!s.search||!s.search.includes("#"),jh("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),d-=1;s.pathname=p.join("/")}a=d>=0?t[d]:"/"}let l=Dj(s,a),c=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const ns=e=>e.join("/").replace(/\/\/+/g,"/"),Fj=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Uj=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Vj=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Bj(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const KS=["post","put","patch","delete"];new Set(KS);const zj=["get",...KS];new Set(zj);/**
51 * React Router v6.30.1
52 *
53 * Copyright (c) Remix Software Inc.
54 *
55 * This source code is licensed under the MIT license found in the
56 * LICENSE.md file in the root directory of this source tree.
57 *
58 * @license MIT
59 */function sl(){return sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sl.apply(this,arguments)}const Ed=m.createContext(null),GS=m.createContext(null),pr=m.createContext(null),Td=m.createContext(null),qn=m.createContext({outlet:null,matches:[],isDataRoute:!1}),QS=m.createContext(null);function Hj(e,t){let{relative:n}=t===void 0?{}:t;Lo()||je(!1);let{basename:r,navigator:s}=m.useContext(pr),{hash:i,pathname:o,search:a}=Cd(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:ns([r,o])),s.createHref({pathname:l,search:a,hash:i})}function Lo(){return m.useContext(Td)!=null}function Ft(){return Lo()||je(!1),m.useContext(Td).location}function YS(e){m.useContext(pr).static||m.useLayoutEffect(e)}function kd(){let{isDataRoute:e}=m.useContext(qn);return e?iO():Wj()}function Wj(){Lo()||je(!1);let e=m.useContext(Ed),{basename:t,future:n,navigator:r}=m.useContext(pr),{matches:s}=m.useContext(qn),{pathname:i}=Ft(),o=JSON.stringify(Mg(s,n.v7_relativeSplatPath)),a=m.useRef(!1);return YS(()=>{a.current=!0}),m.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=$g(c,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:ns([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,o,i,e])}const qj=m.createContext(null);function Kj(e){let t=m.useContext(qn).outlet;return t&&m.createElement(qj.Provider,{value:e},t)}function q6(){let{matches:e}=m.useContext(qn),t=e[e.length-1];return t?t.params:{}}function Cd(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=m.useContext(pr),{matches:s}=m.useContext(qn),{pathname:i}=Ft(),o=JSON.stringify(Mg(s,r.v7_relativeSplatPath));return m.useMemo(()=>$g(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function Gj(e,t){return Qj(e,t)}function Qj(e,t,n,r){Lo()||je(!1);let{navigator:s}=m.useContext(pr),{matches:i}=m.useContext(qn),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Ft(),u;if(t){var d;let x=typeof t=="string"?Io(t):t;l==="/"||(d=x.pathname)!=null&&d.startsWith(l)||je(!1),u=x}else u=c;let p=u.pathname||"/",h=p;if(l!=="/"){let x=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let v=Sj(e,{pathname:h}),g=eO(v&&v.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:ns([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:ns([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return t&&g?m.createElement(Td.Provider,{value:{location:sl({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Wr.Pop}},g):g}function Yj(){let e=sO(),t=Bj(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:s},n):null,null)}const Jj=m.createElement(Yj,null);class Xj extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?m.createElement(qn.Provider,{value:this.props.routeContext},m.createElement(QS.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Zj(e){let{routeContext:t,match:n,children:r}=e,s=m.useContext(Ed);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),m.createElement(qn.Provider,{value:t},r)}function eO(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||je(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<o.length;u++){let d=o[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:p,errors:h}=n,v=d.route.loader&&p[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||v){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,d,p)=>{let h,v=!1,g=null,x=null;n&&(h=a&&d.route.id?a[d.route.id]:void 0,g=d.route.errorElement||Jj,l&&(c<0&&p===0?(v=!0,x=null):c===p&&(v=!0,x=d.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,p+1)),b=()=>{let w;return h?w=g:v?w=x:d.route.Component?w=m.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=u,m.createElement(Zj,{match:d,routeC
59ontext:{outlet:u,matches:y,isDataRoute:n!=null},children:w})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?m.createElement(Xj,{location:n.location,revalidation:n.revalidation,component:g,error:h,children:b(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):b()},null)}var JS=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(JS||{}),Mu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Mu||{});function tO(e){let t=m.useContext(Ed);return t||je(!1),t}function nO(e){let t=m.useContext(GS);return t||je(!1),t}function rO(e){let t=m.useContext(qn);return t||je(!1),t}function XS(e){let t=rO(),n=t.matches[t.matches.length-1];return n.route.id||je(!1),n.route.id}function sO(){var e;let t=m.useContext(QS),n=nO(Mu.UseRouteError),r=XS(Mu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function iO(){let{router:e}=tO(JS.UseNavigateStable),t=XS(Mu.UseNavigateStable),n=m.useRef(!1);return YS(()=>{n.current=!0}),m.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,sl({fromRouteId:t},i)))},[e,t])}function oO(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function aO(e){let{to:t,replace:n,state:r,relative:s}=e;Lo()||je(!1);let{future:i,static:o}=m.useContext(pr),{matches:a}=m.useContext(qn),{pathname:l}=Ft(),c=kd(),u=$g(t,Mg(a,i.v7_relativeSplatPath),l,s==="path"),d=JSON.stringify(u);return m.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:s}),[c,d,s,n,r]),null}function lO(e){return Kj(e.context)}function V(e){je(!1)}function cO(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Wr.Pop,navigator:i,static:o=!1,future:a}=e;Lo()&&je(!1);let l=t.replace(/^\/*/,"/"),c=m.useMemo(()=>({basename:l,navigator:i,static:o,future:sl({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=Io(r));let{pathname:u="/",search:d="",hash:p="",state:h=null,key:v="default"}=r,g=m.useMemo(()=>{let x=_o(u,l);return x==null?null:{location:{pathname:x,search:d,hash:p,state:h,key:v},navigationType:s}},[l,u,d,p,h,v,s]);return g==null?null:m.createElement(pr.Provider,{value:c},m.createElement(Td.Provider,{children:n,value:g}))}function uO(e){let{children:t,location:n}=e;return Gj(Ap(t),n)}new Promise(()=>{});function Ap(e,t){t===void 0&&(t=[]);let n=[];return m.Children.forEach(e,(r,s)=>{if(!m.isValidElement(r))return;let i=[...t,s];if(r.type===m.Fragment){n.push.apply(n,Ap(r.props.children,i));return}r.type!==V&&je(!1),!r.props.index||!r.props.children||je(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Ap(r.props.children,i)),n.push(o)}),n}/**
60 * React Router DOM v6.30.1
61 *
62 * Copyright (c) Remix Software Inc.
63 *
64 * This source code is licensed under the MIT license found in the
65 * LICENSE.md file in the root directory of this source tree.
66 *
67 * @license MIT
68 */function $u(){return $u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$u.apply(this,arguments)}function ZS(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function dO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function hO(e,t){return e.button===0&&(!t||t==="_self")&&!dO(e)}function Rp(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function fO(e,t){let n=Rp(e);return t&&t.forEach((r,s)=>
68{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const pO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],mO=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],gO="6";try{window.__reactRouterVersion=gO}catch{}const yO=m.createContext({isTransitioning:!1}),vO="startTransition",v0=Bm[vO];function wO(e){let{basename:t,children:n,future:r,window:s}=e,i=m.useRef();i.current==null&&(i.current=wj({window:s,v5Compat:!0}));let o=i.current,[a,l]=m.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=m.useCallback(d=>{c&&v0?v0(()=>l(d)):l(d)},[l,c]);return m.useLayoutEffect(()=>o.listen(u),[o,u]),m.useEffect(()=>oO(r),[r]),m.createElement(cO,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const bO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",xO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ce=m.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,p=ZS(t,pO),{basename:h}=m.useContext(pr),v,g=!1;if(typeof c=="string"&&xO.test(c)&&(v=c,bO))try{let w=new URL(window.location.href),S=c.startsWith("//")?new URL(w.protocol+c):new URL(c),_=_o(S.pathname,h);S.origin===w.origin&&_!=null?c=_+S.search+S.hash:g=!0}catch{}let x=Hj(c,{relative:s}),y=_O(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:d});function b(w){r&&r(w),w.defaultPrevented||y(w)}return m.createElement("a",$u({},p,{href:v||x,onClick:g||i?r:b,ref:n,target:l}))}),K6=m.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:o=!1,style:a,to:l,viewTransition:c,children:u}=t,d=ZS(t,mO),p=Cd(l,{relative:d.relative}),h=Ft(),v=m.useContext(GS),{navigator:g,basename:x}=m.useContext(pr),y=v!=null&&EO(p)&&c===!0,b=g.encodeLocation?g.encodeLocation(p).pathname:p.pathname,w=h.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;s||(w=w.toLowerCase(),S=S?S.toLowerCase():null,b=b.toLowerCase()),S&&x&&(S=_o(S,x)||S);const _=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let E=w===b||!o&&w.startsWith(b)&&w.charAt(_)==="/",T=S!=null&&(S===b||!o&&S.startsWith(b)&&S.charAt(b.length)==="/"),C={isActive:E,isPending:T,isTransitioning:y},O=E?r:void 0,A;typeof i=="function"?A=i(C):A=[i,E?"active":null,T?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let M=typeof a=="function"?a(C):a;return m.createElement(Ce,$u({},d,{"aria-current":O,className:A,ref:n,style:M,to:l,viewTransition:c}),typeof u=="function"?u(C):u)});var Pp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Pp||(Pp={}));var w0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(w0||(w0={}));function SO(e){let t=m.useContext(Ed);return t||je(!1),t}function _O(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=kd(),c=Ft(),u=Cd(e,{relative:o});return m.useCallback(d=>{if(hO(d,n)){d.preventDefault();let p=r!==void 0?r:Lu(c)===Lu(u);l(e,{replace:p,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,u,r,s,n,e,i,o,a])}function G6(e){let t=m.useRef(Rp(e)),n=m.useRef(!1),r=Ft(),s=m.useMemo(()=>fO(r.search,n.current?null:t.current),[r.search]),i=kd(),o=m.useCallback((a,l)=>{const c=Rp(typeof a=="function"?a(s):a);n.current=!0,i("?"+c,l)},[i,s]);return[s,o]}function EO(e,t){t===void 0&&(t={});let n=m.useContext(yO);n==null&&je(!1);let{basename:r}=SO(Pp.useViewTransitionState),s=Cd(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=_o(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=_o(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Du(s.pathname,o)!=null||Du(s.pathname,i)!=null}var TO=typeof Element<"u",kO=typeof Map=="function",CO=typeof Set=="function",AO=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function qc(e,t){if(e===t)return!0;
68if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!qc(e[r],t[r]))return!1;return!0}var i;if(kO&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!qc(r.value[1],t.get(r.value[0])))return!1;return!0}if(CO&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(AO&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[r]))return!1;if(TO&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&e.$$typeof)&&!qc(e[s[r]],t[s[r]]))return!1;return!0}return e!==e&&t!==t}var RO=function(t,n){try{return qc(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const PO=kl(RO);var jO=function(e,t,n,r,s,i,o,a){if(!e){var l;if(t===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,s,i,o,a],u=0;l=new Error(t.replace(/%s/g,function(){return c[u++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},OO=jO;const b0=kl(OO);var NO=function(t,n,r,s){var i=r?r.call(s,t,n):void 0;if(i!==void 0)return!!i;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var o=Object.keys(t),a=Object.keys(n);if(o.length!==a.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(n),c=0;c<o.length;c++){var u=o[c];if(!l(u))return!1;var d=t[u],p=n[u];if(i=r?r.call(s,d,p,u):void 0,i===!1||i===void 0&&d!==p)return!1}return!0};const IO=kl(NO);var e_=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(e_||{}),Oh={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},x0=Object.values(e_),Ad={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},t_=Object.entries(Ad).reduce((e,[t,n])=>(e[n]=t,e),{}),vn="data-rh",Ji={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Xi=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},LO=e=>{let t=Xi(e,"title");const n=Xi(e,Ji.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=Xi(e,Ji.DEFAULT_TITLE);return t||r||void 0},DO=e=>Xi(e,Ji.ON_CHANGE_CLIENT_STATE)||(()=>{}),Nh=(e,t)=>t.filter(n=>typeof n[e]<"u").map(n=>n[e]).reduce((n,r)=>({...n,...r}),{}),MO=(e,t)=>t.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const s=Object.keys(r);for(let i=0;i<s.length;i+=1){const a=s[i].toLowerCase();if(e.indexOf(a)!==-1&&r[a])return n.concat(r)}}return n},[]),$O=e=>console&&typeof console.warn=="function"&&console.warn(e),na=(e,t,n)=>{const r={};return n.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&$O(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,i)=>{const o={};i.filter(l=>{let c;const u=Object.keys(l);for(let p=0;p<u.length;p+=1){const h=u[p],v=h.toLowerCase();t.indexOf(v)!==-1&&!(c==="rel"&&l[c].toLowerCase()==="canonical")&&!(v==="rel"&&l[v].toLowerCase()==="stylesheet")&&(c=v),t.indexOf(h)!==-1&&(h==="innerHTML"||h==="cssText"||h==="itemprop")&&(c=h)}if(!c||!l[c])return!1;const d=l[c].toLowerCase();return r[c]||(r[c]={}),o[c]||(o[c]={}),r[c][d]?!1:(o[c][d]=!0,!0)}
68).reverse().forEach(l=>s.push(l));const a=Object.keys(o);for(let l=0;l<a.length;l+=1){const c=a[l],u={...r[c],...o[c]};r[c]=u}return s},[]).reverse()},FO=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},UO=e=>({baseTag:MO(["href"],e),bodyAttributes:Nh("bodyAttributes",e),defer:Xi(e,Ji.DEFER),encode:Xi(e,Ji.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Nh("htmlAttributes",e),linkTags:na("link",["rel","href"],e),metaTags:na("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:na("noscript",["innerHTML"],e),onChangeClientState:DO(e),scriptTags:na("script",["src","innerHTML"],e),styleTags:na("style",["cssText"],e),title:LO(e),titleAttributes:Nh("titleAttributes",e),prioritizeSeoTags:FO(e,Ji.PRIORITIZE_SEO_TAGS)}),n_=e=>Array.isArray(e)?e.join(""):e,VO=(e,t)=>{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},Ih=(e,t)=>Array.isArray(e)?e.reduce((n,r)=>(VO(r,t)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:e,priority:[]},S0=(e,t)=>({...e,[t]:void 0}),BO=["noscript","script","style"],jp=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),r_=e=>Object.keys(e).reduce((t,n)=>{const r=typeof e[n]<"u"?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r},""),zO=(e,t,n,r)=>{const s=r_(n),i=n_(t);return s?`<${e} ${vn}="true" ${s}>${jp(i,r)}</${e}>`:`<${e} ${vn}="true">${jp(i,r)}</${e}>`},HO=(e,t,n=!0)=>t.reduce((r,s)=>{const i=s,o=Object.keys(i).filter(c=>!(c==="innerHTML"||c==="cssText")).reduce((c,u)=>{const d=typeof i[u]>"u"?u:`${u}="${jp(i[u],n)}"`;return c?`${c} ${d}`:d},""),a=i.innerHTML||i.cssText||"",l=BO.indexOf(e)===-1;return`${r}<${e} ${vn}="true" ${o}${l?"/>":`>${a}</${e}>`}`},""),s_=(e,t={})=>Object.keys(e).reduce((n,r)=>{const s=Ad[r];return n[s||r]=e[r],n},t),WO=(e,t,n)=>{const r={key:t,[vn]:!0},s=s_(n,r);return[N.createElement("title",s,t)]},Kc=(e,t)=>t.map((n,r)=>{const s={key:r,[vn]:!0};return Object.keys(n).forEach(i=>{const a=Ad[i]||i;if(a==="innerHTML"||a==="cssText"){const l=n.innerHTML||n.cssText;s.dangerouslySetInnerHTML={__html:l}}else s[a]=n[i]}),N.createElement(e,s)}),zt=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>WO(e,t.title,t.titleAttributes),toString:()=>zO(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>s_(t),toString:()=>r_(t)}
68;default:return{toComponent:()=>Kc(e,t),toString:()=>HO(e,t,n)}}},qO=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const s=Ih(e,Oh.meta),i=Ih(t,Oh.link),o=Ih(n,Oh.script);return{priorityMethods:{toComponent:()=>[...Kc("meta",s.priority),...Kc("link",i.priority),...Kc("script",o.priority)],toString:()=>`${zt("meta",s.priority,r)} ${zt("link",i.priority,r)} ${zt("script",o.priority,r)}`},metaTags:s.default,linkTags:i.default,scriptTags:o.default}},KO=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:s,noscriptTags:i,styleTags:o,title:a="",titleAttributes:l,prioritizeSeoTags:c}=e;let{linkTags:u,metaTags:d,scriptTags:p}=e,h={toComponent:()=>[],toString:()=>""};return c&&({priorityMethods:h,linkTags:u,metaTags:d,scriptTags:p}=qO(e)),{priority:h,base:zt("base",t,r),bodyAttributes:zt("bodyAttributes",n,r),htmlAttributes:zt("htmlAttributes",s,r),link:zt("link",u,r),meta:zt("meta",d,r),noscript:zt("noscript",i,r),script:zt("script",p,r),style:zt("style",o,r),title:zt("title",{title:a,titleAttributes:l},r)}},Op=KO,dc=[],Fg=!!(typeof window<"u"&&window.document&&window.document.createElement),Np=class{constructor(e,t){Gn(this,"instances",[]);Gn(this,"canUseDOM",Fg);Gn(this,"context");Gn(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?dc:this.instances,add:e=>{(this.canUseDOM?dc:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?dc:this.instances).indexOf(e);(this.canUseDOM?dc:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Op({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},GO=parseInt(N.version.split(".")[0],10),Ip=GO>=19,QO={},i_=N.createContext(QO),Bs,o_=(Bs=class extends m.Component{constructor(n){super(n);Gn(this,"helmetData");Ip?this.helmetData=null:this.helmetData=new Np(this.props.context||{},Bs.canUseDOM)}render(){return Ip?N.createElement(N.Fragment,null,this.props.children):N.createElement(i_.Provider,{value:this.helmetData.value},this.props.children)}},Gn(Bs,"canUseDOM",Fg),Bs),hi=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${vn}]`),s=[].slice.call(r),i=[];let o;return t&&t.length&&t.forEach(a=>{const l=document.createElement(e);for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c))if(c==="innerHTML")l.innerHTML=a.innerHTML;else if(c==="cssText"){const u=a.cssText;l.appendChild(document.createTextNode(u))}else{const u=c,d=typeof a[u]>
68"u"?"":a[u];l.setAttribute(c,d)}l.setAttribute(vn,"true"),s.some((c,u)=>(o=u,l.isEqualNode(c)))?s.splice(o,1):i.push(l)}),s.forEach(a=>{var l;return(l=a.parentNode)==null?void 0:l.removeChild(a)}),i.forEach(a=>n.appendChild(a)),{oldTags:s,newTags:i}},Lp=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(vn),s=r?r.split(","):[],i=[...s],o=Object.keys(t);for(const a of o){const l=t[a]||"";n.getAttribute(a)!==l&&n.setAttribute(a,l),s.indexOf(a)===-1&&s.push(a);const c=i.indexOf(a);c!==-1&&i.splice(c,1)}for(let a=i.length-1;a>=0;a-=1)n.removeAttribute(i[a]);s.length===i.length?n.removeAttribute(vn):n.getAttribute(vn)!==o.join(",")&&n.setAttribute(vn,o.join(","))},YO=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=n_(e)),Lp("title",t)},_0=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:s,linkTags:i,metaTags:o,noscriptTags:a,onChangeClientState:l,scriptTags:c,styleTags:u,title:d,titleAttributes:p}=e;Lp("body",r),Lp("html",s),YO(d,p);const h={baseTag:hi("base",n),linkTags:hi("link",i),metaTags:hi("meta",o),noscriptTags:hi("noscript",a),scriptTags:hi("script",c),styleTags:hi("style",u)},v={},g={};Object.keys(h).forEach(x=>{const{newTags:y,oldTags:b}=h[x];y.length&&(v[x]=y),b.length&&(g[x]=h[x].oldTags)}),t&&t(),l(e,v,g)},ra=null,JO=e=>{ra&&cancelAnimationFrame(ra),e.defer?ra=requestAnimationFrame(()=>{_0(e,()=>{ra=null})}):(_0(e),ra=null)},XO=JO,E0=class extends m.Component{constructor(){super(...arguments);Gn(this,"rendered",!1)}shouldComponentUpdate(t){return!IO(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:n}=this.props.context;let r=null;const s=UO(t.get().map(i=>{const{context:o,...a}=i.props;return a}));o_.canUseDOM?XO(s):Op&&(r=Op(s)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},Gc=[],T0=e=>{const t={};for(const n of Object.keys(e))t[t_[n]||n]=e[n];return t},ys=e=>{const t={};for(const n of Object.keys(e)){const r=Ad[n];t[r||n]=e[n]}return t},k0=(e,t)=>{if(!Fg)return;const n=document.getElementsByTagName(e)[0];if(!n)return;const r="data-rh-managed",s=n.getAttribute(r),i=s?s.split(","):[],o=Object.keys(t);for(const a of i)o.includes(a)||n.removeAttribute(a);for(const a of o){const l=t[a];l==null||l===!1?n.removeAttribute(a):l===!0?n.setAttribute(a,""):n.setAttribute(a,String(l))}o.length>0?n.setAttribute(r,o.join(",")):n.removeAttribute(r)},Lh=()=>{const e={},t={};for(const n of Gc){const{htmlAttributes:r,bodyAttributes:s}=n.props;r&&Object.assign(e,T0(r)),s&&Object.assign(t,T0(s))}k0("html",e),k0("body",t)},ZO=class extends m.Component{componentDidMount(){Gc.push(this),Lh()}componentDidUpdate(){Lh()}componentWillUnmount(){const e=Gc.indexOf(this);e!==-1&&Gc.splice(e,1),Lh()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:n}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||n||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return N.createElement("title",ys(t),e)}renderBase(){const{base:e}=this.props;return e?N.createElement("base",ys(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>N.createElement("meta",{key:n,...ys(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>N.createElement("link",{key:n,...ys(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...s}=t,i=ys(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),N.createElement("script",{key:n,...i})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{cssText:r,...s}=t,i=ys(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),N.createElement("style",{key:n,...i})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...s}=t,i=ys(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),N.createElement("noscript",{key:n,...i})})}render(){return N.createElement(N.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},xf,eN=(xf=class extends m.Component{shouldComponentUpdate(e){return!PO(S0(this.props,"helmetData"),S0(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(r=>{n={...n,[r]:e[r]}}),n}
68warnOnInvalidChildren(e,t){return b0(x0.some(n=>e.type===n),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${x0.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),b0(!t||typeof t=="string"||Array.isArray(t)&&!t.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return N.Children.forEach(e,r=>{if(!r||!r.props)return;const{children:s,...i}=r.props,o=Object.keys(i).reduce((l,c)=>(l[t_[c]||c]=i[c],l),{});let{type:a}=r;switch(typeof a=="symbol"?a=a.toString():this.warnOnInvalidChildren(r,s),a){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,o,s);break;default:t=this.mapObjectTypeChildren(r,t,o,s);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof Np)){const s=r;r=new Np(s.context,!0),delete n.helmetData}return Ip?N.createElement(ZO,{...n}):r?N.createElement(E0,{...n,context:r.value}):N.createElement(i_.Consumer,null,s=>N.createElement(E0,{...n,context:s}))}},Gn(xf,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),xf),C0=["light","dark"],tN="(prefers-color-scheme: dark)",nN=m.createContext(void 0),rN={setTheme:e=>{},themes:[]},sN=()=>{var e;return(e=m.useContext(nN))!=null?e:rN};m.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",u=n==="class"?`var d=document.documentElement,c=d.classList;
68${`c.remove(${a.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=s?C0.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(v,g=!1,x=!0)=>{let y=o?o[v]:v,b=g?v+"|| ''":`'${y}'`,w="";return s&&x&&!g&&C0.includes(v)&&(w+=`d.style.colorScheme = '${v}';`),n==="class"?g||y?w+=`c.add(${b})`:w+="null":y&&(w+=`d[s](n,${b})`),w},h=e?`!function(){${u}${p(e)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${tN}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}${c?"":"else{"+p(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}else{${p(i,!1,!1)};}${d}}catch(t){}}();`;return m.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var iN=e=>{switch(e){case"success":return lN;case"info":return uN;case"warning":return cN;case"error":return dN;default:return null}},oN=Array(12).fill(0),aN=({visible:e,className:t})=>N.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},N.createElement("div",{className:"sonner-spinner"},oN.map((n,r)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),lN=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"}
68)),cN=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},N.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"})),uN=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),dN=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),hN=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},N.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),N.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),fN=()=>{let[e,t]=N.useState(document.hidden);return N.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Dp=1,pN=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Dp++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:n}),{...a,...e,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
68this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,i,o=r.then(async l=>{if(i=["resolve",l],N.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(gN(l)&&!l.ok){s=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:c,description:u})}else if(t.success!==void 0){s=!1;let c=typeof t.success=="function"?await t.success(l):t.success,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let c=typeof t.error=="function"?await t.error(l):t.error,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Dp++;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}},xt=new pN,mN=(e,t)=>{let n=(t==null?void 0:t.id)||Dp++;return xt.addToast({title:e,...t,id:n}),n},gN=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",yN=mN,vN=()=>xt.toasts,wN=()=>xt.getActiveToasts(),Q6=Object.assign(yN,{success:xt.success,info:xt.info,warning:xt.warning,error:xt.error,custom:xt.custom,message:xt.message,promise:xt.promise,dismiss:xt.dismiss,loading:xt.loading},{getHistory:vN,getToasts:wN});function bN(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}bN(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
68left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
68:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
68--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
69`);function hc(e){return e.label!==void 0}var xN=3,SN="32px",_N="16px",A0=4e3,EN=356,TN=14,kN=20,CN=200;function on(...e){return e.filter(Boolean).join(" ")}function AN(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var RN=e=>{var t,n,r,s,i,o,a,l,c,u,d;let{invert:p,toast:h,unstyled:v,interacting:g,setHeights:x,visibleToasts:y,heights:b,index:w,toasts:S,expanded:_,removeToast:E,defaultRichColors:T,closeButton:C,style:O,cancelButtonStyle:A,actionButtonStyle:M,className:I="",descriptionClassName:Q="",duration:D,position:Y,gap:H,loadingIcon:re,expandByDefault:P,classNames:j,icons:$,closeButtonAriaLabel:Z="Close toast",pauseWhenPageIsHidden:R}=e,[F,z]=N.useState(null),[B,se]=N.useState(null),[J,$e]=N.useState(!1),[Ee,Ut]=N.useState(!1),[gr,oi]=N.useState(!1),[yr,zl]=N.useState(!1),[Zd,Hl]=N.useState(!1),[eh,qo]=N.useState(0),[ai,By]=N.useState(0),Ko=N.useRef(h.duration||D||A0),zy=N.useRef(null),ms=N.useRef(null),eA=w===0,tA=w+1<=y,Vt=h.type,li=h.dismissible!==!1,nA=h.className||"",rA=h.descriptionClassName||"",Wl=N.useMemo(()=>b.findIndex(ie=>ie.toastId===h.id)||0,[b,h.id]),sA=N.useMemo(()=>{var ie;return(ie=h.closeButton)!=null?ie:C},[h.closeButton,C]),Hy=N.useMemo(()=>h.duration||D||A0,[h.duration,D]),th=N.useRef(0),ci=N.useRef(0),Wy=N.useRef(0),ui=N.useRef(null),[iA,oA]=Y.split("-"),qy=N.useMemo(()=>b.reduce((ie,ge,Te)=>Te>=Wl?ie:ie+ge.height,0),[b,Wl]),Ky=fN(),aA=h.invert||p,nh=Vt==="loading";ci.current=N.useMemo(()=>Wl*H+qy,[Wl,qy]),N.useEffect(()=>{Ko.current=Hy},[Hy]),N.useEffect(()=>{$e(!0)},[]),N.useEffect(()=>{let ie=ms.current;if(ie){let ge=ie.getBoundingClientRect().height;return By(ge),x(Te=>[{toastId:h.id,height:ge,position:h.position},...Te]),()=>x(Te=>Te.filter(tn=>tn.toastId!==h.id))}},[x,h.id]),N.useLayoutEffect(()=>{if(!J)return;let ie=ms.current,ge=ie.style.height;ie.style.height="auto";let Te=ie.getBoundingClientRect().height;ie.style.height=ge,By(Te),x(tn=>tn.find(nn=>nn.toastId===h.id)?tn.map(nn=>nn.toastId===h.id?{...nn,height:Te}:nn):[{toastId:h.id,height:Te,position:h.position},...tn])},[J,h.title,h.description,x,h.id]);let vr=N.useCallback(()=>{Ut(!0),qo(ci.current),x(ie=>ie.filter(ge=>ge.toastId!==h.id)),setTimeout(()=>{E(h)},CN)},[h,E,x,ci]);N.useEffect(()=>{if(h.promise&&Vt==="loading"||h.duration===1/0||h.type==="loading")return;let ie;return _||g||R&&Ky?(()=>{if(Wy.current<th.current){let ge=new Date().getTime()-th.current;Ko.current=Ko.current-ge}
69Wy.current=new Date().getTime()})():Ko.current!==1/0&&(th.current=new Date().getTime(),ie=setTimeout(()=>{var ge;(ge=h.onAutoClose)==null||ge.call(h,h),vr()},Ko.current)),()=>clearTimeout(ie)},[_,g,h,Vt,R,Ky,vr]),N.useEffect(()=>{h.delete&&vr()},[vr,h.delete]);function lA(){var ie,ge,Te;return $!=null&&$.loading?N.createElement("div",{className:on(j==null?void 0:j.loader,(ie=h==null?void 0:h.classNames)==null?void 0:ie.loader,"sonner-loader"),"data-visible":Vt==="loading"},$.loading):re?N.createElement("div",{className:on(j==null?void 0:j.loader,(ge=h==null?void 0:h.classNames)==null?void 0:ge.loader,"sonner-loader"),"data-visible":Vt==="loading"},re):N.createElement(aN,{className:on(j==null?void 0:j.loader,(Te=h==null?void 0:h.classNames)==null?void 0:Te.loader),visible:Vt==="loading"})}return N.createElement("li",{tabIndex:0,ref:ms,className:on(I,nA,j==null?void 0:j.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,j==null?void 0:j.default,j==null?void 0:j[Vt],(n=h==null?void 0:h.classNames)==null?void 0:n[Vt]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:T,"data-styled":!(h.jsx||h.unstyled||v),"data-mounted":J,"data-promise":!!h.promise,"data-swiped":Zd,"data-removed":Ee,"data-visible":tA,"data-y-position":iA,"data-x-position":oA,"data-index":w,"data-front":eA,"data-swiping":gr,"data-dismissible":li,"data-type":Vt,"data-invert":aA,"data-swipe-out":yr,"data-swipe-direction":B,"data-expanded":!!(_||P&&J),style:{"--index":w,"--toasts-before":w,"--z-index":S.length-w,"--offset":`${Ee?eh:ci.current}px`,"--initial-height":P?"auto":`${ai}px`,...O,...h.style},onDragEnd:()=>{oi(!1),z(null),ui.current=null},onPointerDown:ie=>{nh||!li||(zy.current=new Date,qo(ci.current),ie.target.setPointerCapture(ie.pointerId),ie.target.tagName!=="BUTTON"&&(oi(!0),ui.current={x:ie.clientX,y:ie.clientY}))},onPointerUp:()=>{var ie,ge,Te,tn;if(yr||!li)return;ui.current=null;let nn=Number(((ie=ms.current)==null?void 0:ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),wr=Number(((ge=ms.current)==null?void 0:ge.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),gs=new Date().getTime()-((Te=zy.current)==null?void 0:Te.getTime()),rn=F==="x"?nn:wr,br=Math.abs(rn)/gs;if(Math.abs(rn)>=kN||br>.11){qo(ci.current),(tn=h.onDismiss)==null||tn.call(h,h),se(F==="x"?nn>0?"right":"left":wr>0?"down":"up"),vr(),zl(!0),Hl(!1);return}oi(!1),z(null)},onPointerMove:ie=>{var ge,Te,tn,nn;if(!ui.current||!li||((ge=window.getSelection())==null?void 0:ge.toString().length)>0)return;let wr=ie.clientY-ui.current.y,gs=ie.clientX-ui.current.x,rn=(Te=e.swipeDirections)!=null?Te:AN(Y);!F&&(Math.abs(gs)>1||Math.abs(wr)>1)&&z(Math.abs(gs)>Math.abs(wr)?"x":"y");let br={x:0,y:0};F==="y"?(rn.includes("top")||rn.includes("bottom"))&&(rn.includes("top")&&wr<0||rn.includes("bottom")&&wr>0)&&(br.y=wr):F==="x"&&(rn.includes("left")||rn.includes("right"))&&(rn.includes("left")&&gs<0||rn.includes("right")&&gs>0)&&(br.x=gs),(Math.abs(br.x)>0||Math.abs(br.y)>0)&&Hl(!0),(tn=ms.current)==null||tn.style.setProperty("--swipe-amount-x",`${br.x}px`),(nn=ms.current)==null||nn.style.setProperty("--swipe-amount-y",`${br.y}px`)}},sA&&!h.jsx?N.createElement("button",{"aria-label":Z,"data-disabled":nh,"data-close-button":!0,onClick:nh||!li?()=>{}:()=>{var ie;vr(),(ie=h.onDismiss)==null||ie.call(h,h)},className:on(j==null?void 0:j.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(i=$==null?void 0:$.close)!=null?i:hN):null,h.jsx||m.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:N.createElement(N.Fragment,null,Vt||h.icon||h.promise?N.createElement("div",{"data-icon":"",className:on(j==null?void 0:j.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||lA():null,h.type!=="loading"?h.icon||($==null?void 0:$[Vt])||iN(Vt):null):null,N.createElement("div",{"data-content":"",className:on(j==null?void 0:j.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},N.createElement("div",{"data-title":"",className:on(j==null?void 0:j.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?N.createElement("div",{"data-description":"",className:on(Q,rA,j==null?void 0:j.description,(c=h==null?void 0:h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),m.isValidElement(h.cancel)?h.cancel:h.cancel&&hc(h.cancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||A,onClick:ie=>{var ge,Te;hc(h.cancel)&&li&&((Te=(ge=h.cancel).onClick)==null||Te.call(ge,ie),vr())},className:on(j==null?void 0:j.cancelButton,(u=h==null?void 0:h.classNames)==null?void 0:u.cancelButton)},h.cancel.label):null,m.isValidElement(h.action)?h.action:h.action&&hc(h.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||M,onClick:ie=>{var ge,Te;hc(h.action)&&((Te=(ge=h.action).onClick)==null||Te.call(ge,ie),!ie.defaultPrevented&&vr())},className:on(j==null?void 0:j.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function R0(){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 PN(e,t){let n={};return[e,t].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?_N:SN;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var jN=m.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:p,style:h,visibleToasts:v=xN,toastOptions:g,dir:x=R0(),gap:y=TN,loadingIcon:b,icons:w,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:_}=e,[E,T]=N.useState([]),C=N.useMemo(()=>Array.from(new Set([r].concat(E.filter(R=>R.position).map(R=>R.position)))),[E,r]),[O,A]=N.useState([]),[M,I]=N.useState(!1),[Q,D]=N.useState(!1),[Y,H]=N.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
69k":"light"),re=N.useRef(null),P=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=N.useRef(null),$=N.useRef(!1),Z=N.useCallback(R=>{T(F=>{var z;return(z=F.find(B=>B.id===R.id))!=null&&z.delete||xt.dismiss(R.id),F.filter(({id:B})=>B!==R.id)})},[]);return N.useEffect(()=>xt.subscribe(R=>{if(R.dismiss){T(F=>F.map(z=>z.id===R.id?{...z,delete:!0}:z));return}setTimeout(()=>{jS.flushSync(()=>{T(F=>{let z=F.findIndex(B=>B.id===R.id);return z!==-1?[...F.slice(0,z),{...F[z],...R},...F.slice(z+1)]:[R,...F]})})})}),[]),N.useEffect(()=>{if(u!=="system"){H(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;let R=window.matchMedia("(prefers-color-scheme: dark)");try{R.addEventListener("change",({matches:F})=>{H(F?"dark":"light")})}catch{R.addListener(({matches:z})=>{try{H(z?"dark":"light")}catch(B){console.error(B)}})}},[u]),N.useEffect(()=>{E.length<=1&&I(!1)},[E]),N.useEffect(()=>{let R=F=>{var z,B;s.every(se=>F[se]||F.code===se)&&(I(!0),(z=re.current)==null||z.focus()),F.code==="Escape"&&(document.activeElement===re.current||(B=re.current)!=null&&B.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[s]),N.useEffect(()=>{if(re.current)return()=>{j.current&&(j.current.focus({preventScroll:!0}),j.current=null,$.current=!1)}},[re.current]),N.createElement("section",{ref:t,"aria-label":`${S} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((R,F)=>{var z;let[B,se]=R.split("-");return E.length?N.createElement("ol",{key:R,dir:x==="auto"?R0():x,tabIndex:-1,ref:re,className:a,"data-sonner-toaster":!0,"data-theme":Y,"data-y-position":B,"data-lifted":M&&E.length>1&&!i,"data-x-position":se,style:{"--front-toast-height":`${((z=O[0])==null?void 0:z.height)||0}px`,"--width":`${EN}px`,"--gap":`${y}px`,...h,...PN(l,c)},onBlur:J=>{$.current&&!J.currentTarget.contains(J.relatedTarget)&&($.current=!1,j.current&&(j.current.focus({preventScroll:!0}),j.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||$.current||($.current=!0,j.current=J.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{Q||I(!1)},onDragEnd:()=>I(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||D(!0)},onPointerUp:()=>D(!1)},E.filter(J=>!J.position&&F===0||J.position===R).map((J,$e)=>{var Ee,Ut;return N.createElement(RN,{key:J.id,icons:w,index:$e,toast:J,defaultRichColors:d,duration:(Ee=g==null?void 0:g.duration)!=null?Ee:p,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:v,closeButton:(Ut=g==null?void 0:g.closeButton)!=null?Ut:o,interacting:Q,position:R,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:Z,toasts:E.filter(gr=>gr.position==J.position),heights:O.filter(gr=>gr.position==J.position),setHeights:A,expandByDefault:i,gap:y,loadingIcon:b,expanded:M,pauseWhenPageIsHidden:_,swipeDirections:e.swipeDirections})})):null}))});const ON=({...e})=>{const{theme:t="system"}=sN();return f.jsx(jN,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},NN=1,IN=1e6;let Dh=0;function LN(){return Dh=(Dh+1)%Number.MAX_SAFE_INTEGER,Dh.toString()}const Mh=new Map,P0=e=>{if(Mh.has(e))return;const t=setTimeout(()=>{Mh.delete(e),Pa({type:"REMOVE_TOAST",toastId:e})},IN);Mh.set(e,t)},DN=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,NN)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;
69return n?P0(n):e.toasts.forEach(r=>{P0(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Qc=[];let Yc={toasts:[]};function Pa(e){Yc=DN(Yc,e),Qc.forEach(t=>{t(Yc)})}function MN({...e}){const t=LN(),n=s=>Pa({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Pa({type:"DISMISS_TOAST",toastId:t});return Pa({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function a_(){const[e,t]=m.useState(Yc);return m.useEffect(()=>(Qc.push(t),()=>{const n=Qc.indexOf(t);n>-1&&Qc.splice(n,1)}),[e]),{...e,toast:MN,dismiss:n=>Pa({type:"DISMISS_TOAST",toastId:n})}}function de(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function j0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zs(...e){return t=>{let n=!1;const r=e.map(s=>{const i=j0(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():j0(e[s],null)}}}}function Ye(...e){return m.useCallback(Zs(...e),e)}function $N(e,t){const n=m.createContext(t),r=i=>{const{children:o,...a}=i,l=m.useMemo(()=>a,Object.values(a));return f.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function s(i){const o=m.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,s]}function fs(e,t=[]){let n=[];function r(i,o){const a=m.createContext(o),l=n.length;n=[...n,o];const c=d=>{var y;const{scope:p,children:h,...v}=d,g=((y=p==null?void 0:p[e])==null?void 0:y[l])||a,x=m.useMemo(()=>v,Object.values(v));return f.jsx(g.Provider,{value:x,children:h})};c.displayName=i+"Provider";function u(d,p){var g;const h=((g=p==null?void 0:p[e])==null?void 0:g[l])||a,v=m.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const s=()=>{const i=n.map(o=>m.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return m.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,FN(s,...t)]}function FN(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function il(e){const t=VN(e),n=m.forwardRef((r,s)=>{const{children:i,...o}=r,a=m.Children.toArray(i),l=a.find(zN);if(l){const c=l.props.children,u=a.map(d=>d===l?m.Children.count(c)>1?m.Children.only(null):m.isValidElement(c)?c.props.children:null:d);return f.jsx(t,{...o,ref:s,children:m.isValidElement(c)?m.cloneElement(c,void 0,u):null})}return f.jsx(t,{...o,ref:s,children:i})});return n.displayName=`${e}.Slot`,n}var UN=il("Slot");function VN(e){const t=m.forwardRef((n,r)=>{const{children:s,...i}=n;if(m.isValidElement(s)){const o=WN(s),a=HN(i,s.props);return s.type!==m.Fragment&&(a.ref=r?Zs(r,o):o),m.cloneElement(s,a)}return m.Children.count(s)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var l_=Symbol("radix.slottable");function BN(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=l_,t}function zN(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===l_}function HN(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function WN(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function c_(e){const t=e+"CollectionProvider",[n,r]=fs(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:x,children:y}=g,b=N.useRef(null),w=N.useRef(new Map).current;return f.jsx(s,{scope:x,itemMap:w,collectionRef:b,children:y})};o.displayName=t;const a=e+"CollectionSlot",l=il(a),c=N.forwardRef((g,x)=>{const{scope:y,children:b}=g,w=i(a,y),S=Ye(x,w.collectionRef);return f.jsx(l,{ref:S,children:b})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=il(u),h=N.forwardRef((g,x)=>{const{scope:y,children:b,...w}=g,S=N.useRef(null),_=Ye(x,S),E=i(u,y);return N.useEffect(()=>(E.itemMap.set(S,{ref:S,...w}),()=>void E.itemMap.delete(S))),f.jsx(p,{[d]:"",ref:_,children:b})});h.displayName=u;function v(g){const x=i(e+"CollectionConsumer",g);return N.useCallback(()=>{const b=x.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((E,T)=>w.indexOf(E.ref.current)-w.indexOf(T.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:c,ItemSlot:h},v,r]}var qN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],le=qN.reduce((e,t)=>
vendor: 8,608 bytes, line 69
69{const n=il(`Primitive.${t}`),r=m.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function u_(e,t){e&&Ol.flushSync(()=>e.dispatchEvent(t))}function _n(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function KN(e,t=globalThis==null?void 0:globalThis.document){const n=_n(e);m.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var GN="DismissableLayer",Mp="dismissableLayer.update",QN="dismissableLayer.pointerDownOutside",YN="dismissableLayer.focusOutside",O0,d_=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rd=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,c=m.useContext(d_),[u,d]=m.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=m.useState({}),v=Ye(t,T=>d(T)),g=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(x),b=u?g.indexOf(u):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,_=XN(T=>{const C=T.target,O=[...c.branches].some(A=>A.contains(C));!S||O||(s==null||s(T),o==null||o(T),T.defaultPrevented||a==null||a())},p),E=ZN(T=>{const C=T.target;[...c.branches].some(A=>A.contains(C))||(i==null||i(T),o==null||o(T),T.defaultPrevented||a==null||a())},p);return KN(T=>{b===c.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},p),m.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(O0=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),N0(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=O0)}},[u,p,n,c]),m.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),N0())},[u,c]),m.useEffect(()=>{const T=()=>h({});return document.addEventListener(Mp,T),()=>document.removeEventListener(Mp,T)},[]),f.jsx(le.div,{...l,ref:v,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:de(e.onFocusCapture,E.onFocusCapture),onBlurCapture:de(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:de(e.onPointerDownCapture,_.onPointerDownCapture)})});Rd.displayName=GN;var JN="DismissableLayerBranch",h_=m.forwardRef((e,t)=>{const n=m.useContext(d_),r=m.useRef(null),s=Ye(t,r);return m.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),f.jsx(le.div,{...e,ref:s})});h_.displayName=JN;function XN(e,t=globalThis==null?void 0:globalThis.document){const n=_n(e),r=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){f_(QN,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ZN(e,t=globalThis==null?void 0:globalThis.document){const n=_n(e),r=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!r.current&&f_(YN,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function N0(){const e=new CustomEvent(Mp);document.dispatchEvent(e)}function f_(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?u_(s,i):s.dispatchEvent(i)}var eI=Rd,tI=h_,ur=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},nI="Portal",Ug=m.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,i]=m.useState(!1);ur(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?jS.createPortal(f.jsx(le.div,{...r,ref:t}),o):null});Ug.displayName=nI;function rI(e,t){return m.useReducer((n,r)=>t[n][r]??n,e)}var ii=e=>{const{present:t,children:n}=e,r=sI(t),s=typeof n=="function"?n({present:r.isPresent}):m.Children.only(n),i=Ye(r.ref,iI(s));return typeof n=="function"||r.isPresent?m.cloneElement(s,{ref:i}):null};ii.displayName="Presence";function sI(e){const[t,n]=m.useState(),r=m.useRef(null),s=m.useRef(e),i=m.useRef("none"),o=e?"mounted":"unmounted",[a,l]=rI(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=fc(r.current);i.current=a==="mounted"?c:"none"},[a]),ur(()=>{const c=r.current,u=s.current;if(u!==e){const p=i.current,h=fc(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),ur(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=h=>{const g=fc(r.current).includes(h.animationName);if(h.target===t&&g&&(l("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=h=>{h.target===t&&(i.current=fc(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function fc(e){return(e==null?void 0:e.animationName)||"none"}function iI(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var oI=Bm[" useInsertionEffect ".trim().toString()]||ur;function Do({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,i,o]=aI({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:s;{const u=m.useRef(e!==void 0);m.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const c=m.useCallback(u=>{var d;if(a){const p=lI(u)?u(e):u;p!==e&&((d=o.current)==null||d.call(o,p))}else i(u)},[a,e,i,o]);return[l,c]}function aI({defaultProp:e,onChange:t}){const[n,r]=m.useState(e),s=m.useRef(n),i=m.useRef(t);return oI(()=>{i.current=t},[t]),m.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function lI(e){return typeof e=="function"}var cI=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),uI="VisuallyHidden",Pd=m.forwardRef((e,t)=>f.jsx(le.span,{...e,ref:t,style:{...cI,...e.style}}));Pd.displayName=uI;var dI=Pd,Vg="ToastProvider",[Bg,hI,fI]=c_("Toast"),[p_,Y6]=fs("Toast",[fI]),[pI,jd]=p_(Vg),m_=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=m.useState(null),[c,u]=m.useState(0),d=m.useRef(!1),p=m.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Vg}\`. Expected non-empty \`string\`.`),f.jsx(Bg.Provider,{scope:t,children:f.jsx(pI,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:m.useCallback(()=>u(h=>h+1),[]),onToastRemove:m.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:o})})};m_.displayName=Vg;var g_="ToastViewport",mI=["F8"],$p="toast.viewportPause",Fp="toast.viewportResume",y_=m.forwardRef((e,t)=>
69{const{__scopeToast:n,hotkey:r=mI,label:s="Notifications ({hotkey})",...i}=e,o=jd(g_,n),a=hI(n),l=m.useRef(null),c=m.useRef(null),u=m.useRef(null),d=m.useRef(null),p=Ye(t,d,o.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=o.toastCount>0;m.useEffect(()=>{const x=y=>{var w;r.length!==0&&r.every(S=>y[S]||y.code===S)&&((w=d.current)==null||w.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),m.useEffect(()=>{const x=l.current,y=d.current;if(v&&x&&y){const b=()=>{if(!o.isClosePausedRef.current){const E=new CustomEvent($p);y.dispatchEvent(E),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const E=new CustomEvent(Fp);y.dispatchEvent(E),o.isClosePausedRef.current=!1}},S=E=>{!x.contains(E.relatedTarget)&&w()},_=()=>{x.contains(document.activeElement)||w()};return x.addEventListener("focusin",b),x.addEventListener("focusout",S),x.addEventListener("pointermove",b),x.addEventListener("pointerleave",_),window.addEventListener("blur",b),window.addEventListener("focus",w),()=>{x.removeEventListener("focusin",b),x.removeEventListener("focusout",S),x.removeEventListener("pointermove",b),x.removeEventListener("pointerleave",_),window.removeEventListener("blur",b),window.removeEventListener("focus",w)}}},[v,o.isClosePausedRef]);const g=m.useCallback(({tabbingDirection:x})=>{const b=a().map(w=>{const S=w.ref.current,_=[S,...AI(S)];return x==="forwards"?_:_.reverse()});return(x==="forwards"?b.reverse():b).flat()},[a]);return m.useEffect(()=>{const x=d.current;if(x){const y=b=>{var _,E,T;const w=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!w){const C=document.activeElement,O=b.shiftKey;if(b.target===x&&O){(_=c.current)==null||_.focus();return}const I=g({tabbingDirection:O?"backwards":"forwards"}),Q=I.findIndex(D=>D===C);$h(I.slice(Q+1))?b.preventDefault():O?(E=c.current)==null||E.focus():(T=u.current)==null||T.focus()}};return x.addEventListener("keydown",y),()=>x.removeEventListener("keydown",y)}},[a,g]),f.jsxs(tI,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&f.jsx(Up,{ref:c,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"forwards"});$h(x)}}),f.jsx(Bg.Slot,{scope:n,children:f.jsx(le.ol,{tabIndex:-1,...i,ref:p})}),v&&f.jsx(Up,{ref:u,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"backwards"});$h(x)}})]})});y_.displayName=g_;var v_="ToastFocusProxy",Up=m.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=jd(v_,n);return f.jsx(Pd,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&r()}})});Up.displayName=v_;var Il="Toast",gI="toast.swipeStart",yI="toast.swipeMove",vI="toast.swipeCancel",wI="toast.swipeEnd",w_=m.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=e,[a,l]=Do({prop:r,defaultProp:s??!0,onChange:i,caller:Il});return f.jsx(ii,{present:n||a,children:f.jsx(SI,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:_n(e.onPause),onResume:_n(e.onResume),onSwipeStart:de(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:de(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:de(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:de(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});
69w_.displayName=Il;var[bI,xI]=p_(Il,{onClose(){}}),SI=m.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:h,...v}=e,g=jd(Il,n),[x,y]=m.useState(null),b=Ye(t,D=>y(D)),w=m.useRef(null),S=m.useRef(null),_=s||g.duration,E=m.useRef(0),T=m.useRef(_),C=m.useRef(0),{onToastAdd:O,onToastRemove:A}=g,M=_n(()=>{var Y;(x==null?void 0:x.contains(document.activeElement))&&((Y=g.viewport)==null||Y.focus()),o()}),I=m.useCallback(D=>{!D||D===1/0||(window.clearTimeout(C.current),E.current=new Date().getTime(),C.current=window.setTimeout(M,D))},[M]);m.useEffect(()=>{const D=g.viewport;if(D){const Y=()=>{I(T.current),c==null||c()},H=()=>{const re=new Date().getTime()-E.current;T.current=T.current-re,window.clearTimeout(C.current),l==null||l()};return D.addEventListener($p,H),D.addEventListener(Fp,Y),()=>{D.removeEventListener($p,H),D.removeEventListener(Fp,Y)}}},[g.viewport,_,l,c,I]),m.useEffect(()=>{i&&!g.isClosePausedRef.current&&I(_)},[i,_,g.isClosePausedRef,I]),m.useEffect(()=>(O(),()=>A()),[O,A]);const Q=m.useMemo(()=>x?k_(x):null,[x]);return g.viewport?f.jsxs(f.Fragment,{children:[Q&&f.jsx(_I,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:Q}),f.jsx(bI,{scope:n,onClose:M,children:Ol.createPortal(f.jsx(Bg.ItemSlot,{scope:n,children:f.jsx(eI,{asChild:!0,onEscapeKeyDown:de(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||M(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:f.jsx(le.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...v,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:de(e.onKeyDown,D=>{D.key==="Escape"&&(a==null||a(D.nativeEvent),D.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:de(e.onPointerDown,D=>{D.button===0&&(w.current={x:D.clientX,y:D.clientY})}),onPointerMove:de(e.onPointerMove,D=>{if(!w.current)return;const Y=D.clientX-w.current.x,H=D.clientY-w.current.y,re=!!S.current,P=["left","right"].includes(g.swipeDirection),j=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,$=P?j(0,Y):0,Z=P?0:j(0,H),R=D.pointerType==="touch"?10:2,F={x:$,y:Z},z={originalEvent:D,delta:F};re?(S.current=F,pc(yI,d,z,{discrete:!1})):I0(F,g.swipeDirection,R)?(S.current=F,pc(gI,u,z,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(Y)>R||Math.abs(H)>R)&&(w.current=null)}),onPointerUp:de(e.onPointerUp,D=>{const Y=S.current,H=D.target;if(H.hasPointerCapture(D.pointerId)&&H.releasePointerCapture(D.pointerId),S.current=null,w.current=null,Y){const re=D.currentTarget,P={originalEvent:D,delta:Y};I0(Y,g.swipeDirection,g.swipeThreshold)?pc(wI,h,P,{discrete:!0}):pc(vI,p,P,{discrete:!0}),re.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),_I=e=>{const{__scopeToast:t,children:n,...r}=e,s=jd(Il,t),[i,o]=m.useState(!1),[a,l]=m.useState(!1);return kI(()=>o(!0)),m.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:f.jsx(Ug,{asChild:!0,children:f.jsx(Pd,{...r,children:i&&f.jsxs(f.Fragment,{children:[s.label," ",n]})})})},EI="ToastTitle",b_=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return f.jsx(le.div,{...r,ref:t})});b_.displayName=EI;var TI="ToastDescription",x_=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return f.jsx(le.div,{...r,ref:t})});x_.displayName=TI;var S_="ToastAction",__=m.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?f.jsx(T_,{altText:n,asChild:!0,children:f.jsx(zg,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${S_}\`. Expected non-empty \`string\`.`),null)});__.displayName=S_;var E_="ToastClose",zg=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=xI(E_,n);return f.jsx(T_,{asChild:!0,children:f.jsx(le.button,{type:"button",...r,ref:t,onClick:de(e.onClick,s.onClose)})})});zg.displayName=E_;var T_=m.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return f.jsx(le.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function k_(e){const t=[];
vendor: 6,553 bytes, lines 69-134
69return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),CI(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...k_(r))}}),t}function pc(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?u_(s,i):s.dispatchEvent(i)}var I0=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),i=r>s;return t==="left"||t==="right"?i&&r>n:!i&&s>n};function kI(e=()=>{}){const t=_n(e);ur(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function CI(e){return e.nodeType===e.ELEMENT_NODE}function AI(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function $h(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var RI=m_,C_=y_,A_=w_,R_=b_,P_=x_,j_=__,O_=zg;function N_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=N_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function I_(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=N_(e))&&(r&&(r+=" "),r+=t);return r}const L0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,D0=I_,Hg=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return D0(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=L0(u)||L0(d);return s[c][p]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...h}=u;return Object.entries(h).every(v=>{let[g,x]=v;return Array.isArray(x)?x.includes({...i,...a}[g]):{...i,...a}[g]===x})?[...c,d,p]:c},[]);return D0(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
70 * @license lucide-react v0.462.0 - ISC
71 *
72 * This source code is licensed under the ISC license.
73 * See the LICENSE file in the root directory of this source tree.
74 */const PI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),L_=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
75 * @license lucide-react v0.462.0 - ISC
76 *
77 * This source code is licensed under the ISC license.
78 * See the LICENSE file in the root directory of this source tree.
79 */var jI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
80 * @license lucide-react v0.462.0 - ISC
81 *
82 * This source code is licensed under the ISC license.
83 * See the LICENSE file in the root directory of this source tree.
84 */const OI=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>m.createElement("svg",{ref:l,...jI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:L_("lucide",s),...a},[...o.map(([c,u])=>m.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
85 * @license lucide-react v0.462.0 - ISC
86 *
87 * This source code is licensed under the ISC license.
88 * See the LICENSE file in the root directory of this source tree.
89 */const fe=(e,t)=>{const n=m.forwardRef(({className:r,...s},i)=>m.createElement(OI,{ref:i,iconNode:t,className:L_(`lucide-${PI(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
90 * @license lucide-react v0.462.0 - ISC
91 *
92 * This source code is licensed under the ISC license.
93 * See the LICENSE file in the root directory of this source tree.
94 */const NI=fe("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
95 * @license lucide-react v0.462.0 - ISC
96 *
97 * This source code is licensed under the ISC license.
98 * See the LICENSE file in the root directory of this source tree.
99 */const Fu=fe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
100 * @license lucide-react v0.462.0 - ISC
101 *
102 * This source code is licensed under the ISC license.
103 * See the LICENSE file in the root directory of this source tree.
104 */const M0=fe("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
105 * @license lucide-react v0.462.0 - ISC
106 *
107 * This source code is licensed under the ISC license.
108 * See the LICENSE file in the root directory of this source tree.
109 */const II=fe("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
110 * @license lucide-react v0.462.0 - ISC
111 *
112 * This source code is licensed under the ISC license.
113 * See the LICENSE file in the root directory of this source tree.
114 */const D_=fe("Beaker",[["path",{d:"M4.5 3h15",key:"c7n0jr"}],["path",{d:"M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3",key:"m1uhx7"}],["path",{d:"M6 14h12",key:"4cwo0f"}]]);/**
115 * @license lucide-react v0.462.0 - ISC
116 *
117 * This source code is licensed under the ISC license.
118 * See the LICENSE file in the root directory of this source tree.
119 */const LI=fe("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
120 * @license lucide-react v0.462.0 - ISC
121 *
122 * This source code is licensed under the ISC license.
123 * See the LICENSE file in the root directory of this source tree.
124 */const Fh=fe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
125 * @license lucide-react v0.462.0 - ISC
126 *
127 * This source code is licensed under the ISC license.
128 * See the LICENSE file in the root directory of this source tree.
129 */const DI=fe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
130 * @license lucide-react v0.462.0 - ISC
131 *
132 * This source code is licensed under the ISC license.
133 * See the LICENSE file in the root directory of this source tree.
134 */const Vp=fe("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",ke
134y:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
135 * @license lucide-react v0.462.0 - ISC
136 *
137 * This source code is licensed under the ISC license.
138 * See the LICENSE file in the root directory of this source tree.
139 */const $0=fe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
140 * @license lucide-react v0.462.0 - ISC
141 *
142 * This source code is licensed under the ISC license.
143 * See the LICENSE file in the root directory of this source tree.
144 */const MI=fe("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
145 * @license lucide-react v0.462.0 - ISC
146 *
147 * This source code is licensed under the ISC license.
148 * See the LICENSE file in the root directory of this source tree.
149 */const $I=fe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
150 * @license lucide-react v0.462.0 - ISC
151 *
152 * This source code is licensed under the ISC license.
153 * See the LICENSE file in the root directory of this source tree.
154 */const FI=fe("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
155 * @license lucide-react v0.462.0 - ISC
156 *
157 * This source code is licensed under the ISC license.
158 * See the LICENSE file in the root directory of this source tree.
159 */const UI=fe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
160 * @license lucide-react v0.462.0 - ISC
161 *
162 * This source code is licensed under the ISC license.
163 * See the LICENSE file in the root directory of this source tree.
164 */const VI=fe("Factory",[["path",{d:"M2 20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8l-7 5V8l-7 5V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"159hny"}],["path",{d:"M17 18h1",key:"uldtlt"}],["path",{d:"M12 18h1",key:"s9uhes"}],["path",{d:"M7 18h1",key:"1neino"}]]);/**
165 * @license lucide-react v0.462.0 - ISC
166 *
167 * This source code is licensed under the ISC license.
168 * See the LICENSE file in the root directory of this source tree.
169 */const Bp=fe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
170 * @license lucide-react v0.462.0 - ISC
171 *
172 * This source code is licensed under the ISC license.
173 * See the LICENSE file in the root directory of this source tree.
174 */const BI=fe("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/**
175 * @license lucide-react v0.462.0 - ISC
176 *
177 * This source code is licensed under the ISC license.
178 * See the LICENSE file in the root directory of this source tree.
179 */const zI=fe("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
180 * @license lucide-react v0.462.0 - ISC
181 *
182 * This source code is licensed under the ISC license.
183 * See the LICENSE file in the root directory of this source tree.
184 */const HI=fe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
185 * @license lucide-react v0.462.0 - ISC
186 *
187 * This source code is licensed under the ISC license.
188 * See the LICENSE file in the root directory of this source tree.
189 */const WI=fe("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}
189],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);/**
190 * @license lucide-react v0.462.0 - ISC
191 *
192 * This source code is licensed under the ISC license.
193 * See the LICENSE file in the root directory of this source tree.
194 */const zp=fe("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
195 * @license lucide-react v0.462.0 - ISC
196 *
197 * This source code is licensed under the ISC license.
198 * See the LICENSE file in the root directory of this source tree.
199 */const qI=fe("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
200 * @license lucide-react v0.462.0 - ISC
201 *
202 * This source code is licensed under the ISC license.
203 * See the LICENSE file in the root directory of this source tree.
204 */const KI=fe("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
205 * @license lucide-react v0.462.0 - ISC
206 *
207 * This source code is licensed under the ISC license.
208 * See the LICENSE file in the root directory of this source tree.
209 */const Eo=fe("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
210 * @license lucide-react v0.462.0 - ISC
211 *
212 * This source code is licensed under the ISC license.
213 * See the LICENSE file in the root directory of this source tree.
214 */const GI=fe("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
215 * @license lucide-react v0.462.0 - ISC
216 *
217 * This source code is licensed under the ISC license.
218 * See the LICENSE file in the root directory of this source tree.
219 */const ol=fe("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
220 * @license lucide-react v0.462.0 - ISC
221 *
222 * This source code is licensed under the ISC license.
223 * See the LICENSE file in the root directory of this source tree.
224 */const QI=fe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
225 * @license lucide-react v0.462.0 - ISC
226 *
227 * This source code is licensed under the ISC license.
228 * See the LICENSE file in the root directory of this source tree.
229 */const YI=fe("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
230 * @license lucide-react v0.462.0 - ISC
231 *
232 * This source code is licensed under the ISC license.
233 * See the LICENSE file in the root directory of this source tree.
234 */const Hp=fe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
235 * @license lucide-react v0.462.0 - ISC
236 *
237 * This source code is licensed under the ISC license.
238 * See the LICENSE file in the root directory of this source tree.
239 */const JI=fe("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
240 * @license lucide-react v0.462.0 - ISC
241 *
242 * This source code is licensed under the ISC license.
243 * See the LICENSE file in the root directory of this source tree.
244 */const Wg=fe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 12,257 bytes, line 244
244],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),qg="-",XI=e=>{const t=e2(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(qg);return a[0]===""&&a.length!==1&&a.shift(),M_(a,t)||ZI(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},M_=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?M_(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(qg);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},F0=/^\[(.+)\]$/,ZI=e=>{if(F0.test(e)){const t=F0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},e2=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return n2(Object.entries(e.classGroups),n).forEach(([i,o])=>{Wp(o,r,i,t)}),r},Wp=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:U0(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(t2(s)){Wp(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{Wp(o,U0(t,i),n,r)})})},U0=(e,t)=>{let n=e;return t.split(qg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},t2=e=>e.isThemeGetter,n2=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[n,s]}):e,r2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},$_="!",s2=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let c=0,u=0,d;for(let x=0;x<a.length;x++){let y=a[x];if(c===0){if(y===s&&(r||a.slice(x,x+i)===t)){l.push(a.slice(u,x)),u=x+i;continue}if(y==="/"){d=x;continue}}y==="["?c++:y==="]"&&c--}const p=l.length===0?a:a.substring(u),h=p.startsWith($_),v=h?p.substring(1):p,g=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:o}):o},i2=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},o2=e=>({cache:r2(e.cacheSize),parseClassName:s2(e),...XI(e)}),a2=/\s+/,l2=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(a2);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:h}=n(c);let v=!!h,g=r(v?p.substring(0,h):p);if(!g){if(!v){a=c+(a.length>0?" "+a:a);continue}if(g=r(p),!g){a=c+(a.length>0?" "+a:a);continue}v=!1}const x=i2(u).join(":"),y=d?x+$_:x,b=y+g;if(i.includes(b))continue;i.push(b);const w=s(g,v);for(let S=0;S<w.length;++S){const _=w[S];i.push(y+_)}a=c+(a.length>0?" "+a:a)}return a};function c2(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=F_(t))&&(r&&(r+=" "),r+=n);return r}const F_=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=F_(e[r]))&&(n&&(n+=" "),n+=t);return n};function u2(e,...t){let n,r,s,i=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=o2(c),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=l2(l,n);return s(l,u),u}return function(){return i(c2.apply(null,arguments))}}const be=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},U_=/^\[(?:([a-z-]+):)?(.+)\]$/i,d2=/^\d+\/\d+$/,h2=new Set(["px","full","screen"]),f2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,p2=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,m2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,g2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,y2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qn=e=>Zi(e)||h2.has(e)||d2.test(e),Sr=e=>Mo(e,"length",T2),Zi=e=>!!e&&!Number.isNaN(Number(e)),Uh=e=>Mo(e,"number",Zi),sa=e=>!!e&&Number.isInteger(Number(e)),v2=e=>e.endsWith("%")&&Zi(e.slice(0,-1)),oe=e=>U_.test(e),_r=e=>f2.test(e),w2=new Set(["length","size","percentage"]),b2=e=>Mo(e,w2,V_),x2=e=>Mo(e,"position",V_),S2=new Set(["image","url"]),_2=e=>Mo(e,S2,C2),E2=e=>Mo(e,"",k2),ia=()=>!0,Mo=(e,t,n)=>{const r=U_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},T2=e=>p2.test(e)&&!m2.test(e),V_=()=>!1,k2=e=>g2.test(e),C2=e=>y2.test(e),A2=()=>{const e=be("colors"),t=be("spacing"),n=be("blur"),r=be("brightness"),s=be("borderColor"),i=be("borderRadius"),o=be("borderSpacing"),a=be("borderWidth"),l=be("contrast"),c=be("grayscale"),u=be("hueRotate"),d=be("invert"),p=be("gap"),h=be("gradientColorStops"),v=be("gradientColorStopPositions"),g=be("inset"),x=be("margin"),y=be("opacity"),b=be("padding"),w=be("saturate"),S=be("scale"),_=be("sepia"),E=be("skew"),T=be("space"),C=be("translate"),O=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",oe,t],I=()=>[oe,t],Q=()=>["",Qn,Sr],D=()=>["auto",Zi,oe],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",oe],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>[Zi,oe];return{cacheSize:500,separator:":",theme:{colors:[ia],spacing:[Qn,Sr],blur:["none","",_r,oe],brightness:Z(),borderColor:[e],borderRadius:["none","","full",_r,oe],borderSpacing:I(),borderWidth:Q(),contrast:Z(),grayscale:j(),hueRotate:Z(),invert:j(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[v2,Sr],inset:M(),margin:M(),opacity:Z(),padding:I(),saturate:Z(),scale:Z(),sepia:j(),skew:Z(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",oe]}],container:["container"],columns:[{columns:[_r]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),oe]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",sa,oe]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",oe]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",sa,oe]}],"grid-cols":[{"grid-cols":[ia]}],"col-start-end":[{col:["auto",{span:["full",sa,oe]},oe]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[ia]}],"row-start-end":[{row:["auto",{span:[sa,oe]},oe]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",oe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",oe]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",oe,t]}],"min-w":[{"min-w":[oe,t,"min","max","fit"]}],"max-w":[{"max-w":[oe,t,"none","full","min","max","fit","prose",{screen:[_r]},_r]}],h:[{h:[oe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[oe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[oe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[oe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",_r,Sr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Uh]}],"font-family":[{font:[ia]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",oe]}],"line-clamp":[{"line-clamp":["none",Zi,Uh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Qn,oe]}],"list-image":[{"list-image":["none",oe]}],"list-style-type":[{list:["none","disc","decimal",oe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Qn,Sr]}],"underline-offset":[{"underline-offset":["auto",Qn,oe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),x2]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",b2]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},_2]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}
244],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}
vendor: 4,469 bytes, line 244
244],"divide-style":[{divide:H()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[Qn,oe]}],"outline-w":[{outline:[Qn,Sr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Qn,Sr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",_r,E2]}],"shadow-color":[{shadow:[ia]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...re(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":re()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",_r,oe]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",oe]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",oe]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",oe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[sa,oe]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",oe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",oe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",oe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Qn,Sr,Uh]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","
244none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},R2=u2(A2);function ee(...e){return R2(I_(e))}const P2=RI,B_=m.forwardRef(({className:e,...t},n)=>f.jsx(C_,{ref:n,className:ee("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));B_.displayName=C_.displayName;const j2=Hg("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),z_=m.forwardRef(({className:e,variant:t,...n},r)=>f.jsx(A_,{ref:r,className:ee(j2({variant:t}),e),...n}));z_.displayName=A_.displayName;const O2=m.forwardRef(({className:e,...t},n)=>f.jsx(j_,{ref:n,className:ee("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));O2.displayName=j_.displayName;const H_=m.forwardRef(({className:e,...t},n)=>f.jsx(O_,{ref:n,className:ee("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 20,556 bytes, line 244
244/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:f.jsx(Wg,{className:"h-4 w-4"})}));H_.displayName=O_.displayName;const W_=m.forwardRef(({className:e,...t},n)=>f.jsx(R_,{ref:n,className:ee("text-sm font-semibold",e),...t}));W_.displayName=R_.displayName;const q_=m.forwardRef(({className:e,...t},n)=>f.jsx(P_,{ref:n,className:ee("text-sm opacity-90",e),...t}));q_.displayName=P_.displayName;function N2(){const{toasts:e}=a_();return f.jsxs(P2,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return f.jsxs(z_,{...i,children:[f.jsxs("div",{className:"grid gap-1",children:[n&&f.jsx(W_,{children:n}),r&&f.jsx(q_,{children:r})]}),s,f.jsx(H_,{})]},t)}),f.jsx(B_,{})]})}var I2=Bm[" useId ".trim().toString()]||(()=>{}),L2=0;function Jt(e){const[t,n]=m.useState(I2());return ur(()=>{n(r=>r??String(L2++))},[e]),t?`radix-${t}`:""}const D2=["top","right","bottom","left"],is=Math.min,jt=Math.max,Uu=Math.round,mc=Math.floor,Vn=e=>({x:e,y:e}),M2={left:"right",right:"left",bottom:"top",top:"bottom"},$2={start:"end",end:"start"};function qp(e,t,n){return jt(e,is(t,n))}function dr(e,t){return typeof e=="function"?e(t):e}function hr(e){return e.split("-")[0]}function $o(e){return e.split("-")[1]}function Kg(e){return e==="x"?"y":"x"}function Gg(e){return e==="y"?"height":"width"}const F2=new Set(["top","bottom"]);function $n(e){return F2.has(hr(e))?"y":"x"}function Qg(e){return Kg($n(e))}function U2(e,t,n){n===void 0&&(n=!1);const r=$o(e),s=Qg(e),i=Gg(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Vu(o)),[o,Vu(o)]}function V2(e){const t=Vu(e);return[Kp(e),t,Kp(t)]}function Kp(e){return e.replace(/start|end/g,t=>$2[t])}const V0=["left","right"],B0=["right","left"],B2=["top","bottom"],z2=["bottom","top"];function H2(e,t,n){switch(e){case"top":case"bottom":return n?t?B0:V0:t?V0:B0;case"left":case"right":return t?B2:z2;default:return[]}}function W2(e,t,n,r){const s=$o(e);let i=H2(hr(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Kp)))),i}function Vu(e){return e.replace(/left|right|bottom|top/g,t=>M2[t])}function q2(e){return{top:0,right:0,bottom:0,left:0,...e}}function K_(e){return typeof e!="number"?q2(e):{top:e,right:e,bottom:e,left:e}}function Bu(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function z0(e,t,n){let{reference:r,floating:s}=e;const i=$n(t),o=Qg(t),a=Gg(o),l=hr(t),c=i==="y",u=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,p=r[a]/2-s[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-s.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-s.width,y:d};break;default:h={x:r.x,y:r.y}}switch($o(t)){case"start":h[o]-=p*(n&&c?-1:1);break;case"end":h[o]+=p*(n&&c?-1:1);break}return h}const K2=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=z0(c,r,l),p=r,h={},v=0;for(let g=0;g<a.length;g++){const{name:x,fn:y}=a[g],{x:b,y:w,data:S,reset:_}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:s,middlewareData:h,rects:c,platform:o,elements:{reference:e,floating:t}});u=b??u,d=w??d,h={...h,[x]:{...h[x],...S}},_&&v<=50&&(v++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(c=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:u,y:d}=z0(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:s,middlewareData:h}};async function al(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=dr(t,e),v=K_(h),x=a[p?d==="floating"?"reference":"floating":d],y=Bu(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},_=Bu(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:w,strategy:l}):b);return{top:(y.top-_.top+v.top)/S.y,bottom:(_.bottom-y.bottom+v.bottom)/S.y,left:(y.left-_.left+v.left)/S.x,right:(_.right-y.right+v.right)/S.x}}const G2=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=dr(e,t)||{};if(c==null)return{};const d=K_(u),p={x:n,y:r},h=Qg(s),v=Gg(h),g=await o.getDimensions(c),x=h==="y",y=x?"top":"left",b=x?"bottom":"right",w=x?"clientHeight":"clientWidth",S=i.reference[v]+i.reference[h]-p[h]-i.floating[v],_=p[h]-i.reference[h],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let T=E?E[w]:0;(!T||!await(o.isElement==null?void 0:o.isElement(E)))&&(T=a.floating[w]||i.floating[v]);const C=S/2-_/2,O=T/2-g[v]/2-1,A=is(d[y],O),M=is(d[b],O),I=A,Q=T-g[v]-M,D=T/2-g[v]/2+C,Y=qp(I,D,Q),H=!l.arrow&&$o(s)!=null&&D!==Y&&i.reference[v]/2-(D<I?A:M)-g[v]/2<0,re=H?D<I?D-I:D-Q:0;return{[h]:p[h]+re,data:{[h]:Y,centerOffset:D-Y-re,...H&&{alignmentOffset:re}},reset:H}}}),Q2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...x}=dr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=hr(s),b=$n(a),w=hr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=p||(w||!g?[Vu(a)]:V2(a)),E=v!=="none";!p&&E&&_.push(...W2(a,g,v,S));const T=[a,..._],C=await al(t,x),O=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&O.push(C[y]),d){const D=U2(s,o,S);O.push(C[D[0]],C[D[1]])}if(A=[...A,{placement:s,overflows:O}],!O.every(D=>D<=0)){var M,I;const D=(((M=i.flip)==null?void 0:M.index)||0)+1,Y=T[D];if(Y&&(!(d==="alignment"?b!==$n(Y):!1)||A.every(P=>P.overflows[0]>0&&$n(P.placement)===b)))return{data:{index:D,overflows:A},reset:{placement:Y}};let H=(I=A.filter(re=>re.overflows[0]<=0).sort((re,P)=>re.overflows[1]-P.overflows[1])[0])==null?void 0:I.placement;if(!H)switch(h){case"bestFit":{var Q;const re=(Q=A.filter(P=>{if(E){const j=$n(P.placement);return j===b||j==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(j=>j>0).reduce((j,$)=>j+$,0)]).sort((P,j)=>P[1]-j[1])[0])==null?void 0:Q[0];re&&(H=re);break}case"initialPlacement":H=a;break}if(s!==H)return{reset:{placement:H}}}return{}}}};function H0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function W0(e){return D2.some(t=>e[t]>=0)}const Y2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=dr(e,t);switch(r){case"referenceHidden":{const i=await al(t,{...s,elementContext:"reference"}),o=H0(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:W0(o)}}}case"escaped":{const i=await al(t,{...s,altBoundary:!0}),o=H0(i,n.floating);return{data:{escapedOffsets:o,escaped:W0(o)}}}default:return{}}}}},G_=new Set(["left","top"]);async function J2(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=hr(n),a=$o(n),l=$n(n)==="y",c=G_.has(o)?-1:1,u=i&&l?-1:1,d=dr(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}const X2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await J2(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},Z2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...l}=dr(e,t),c={x:n,y:r},u=await al(t,l),d=$n(hr(s)),p=Kg(d);let h=c[p],v=c[d];if(i){const x=p==="y"?"top":"left",y=p==="y"?"bottom":"right",b=h+u[x],w=h-u[y];h=qp(b,h,w)}if(o){const x=d==="y"?"top":"left",y=d==="y"?"bottom":"right",b=v+u[x],w=v-u[y];v=qp(b,v,w)}const g=a.fn({...t,[p]:h,[d]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[d]:o}}}}}},eL=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=dr(e,t),u={x:n,y:r},d=$n(s),p=Kg(d);let h=u[p],v=u[d];const g=dr(a,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const w=p==="y"?"height":"width",S=i.reference[p]-i.floating[w]+x.mainAxis,_=i.reference[p]+i.reference[w]-x.mainAxis;h<S?h=S:h>_&&(h=_)}if(c){var y,b;const w=p==="y"?"width":"height",S=G_.has(hr(s)),_=i.reference[d]-i.floating[w]+(S&&((y=o.offset)==null?void 0:y[d])||0)+(S?0:x.crossAxis),E=i.reference[d]+i.reference[w]+(S?0:((b=o.offset)==null?void 0:b[d])||0)-(S?x.crossAxis:0);v<_?v=_:v>E&&(v=E)}return{[p]:h,[d]:v}}}},tL=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...c}=dr(e,t),u=await al(t,c),d=hr(s),p=$o(s),h=$n(s)==="y",{width:v,height:g}=i.floating;let x,y;d==="top"||d==="bottom"?(x=d,y=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,x=p==="end"?"top":"bottom");const b=g-u.top-u.bottom,w=v-u.left-u.right,S=is(g-u[x],b),_=is(v-u[y],w),E=!t.middlewareData.shift;let T=S,C=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=b),E&&!p){const A=jt(u.left,0),M=jt(u.right,0),I=jt(u.top,0),Q=jt(u.bottom,0);h?C=v-2*(A!==0||M!==0?A+M:jt(u.left,u.right)):T=g-2*(I!==0||Q!==0?I+Q:jt(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:T});const O=await o.getDimensions(a.floating);return v!==O.width||g!==O.height?{reset:{rects:!0}}:{}}}};function Od(){return typeof window<"u"}function Fo(e){return Q_(e)?(e.nodeName||"").toLowerCase():"#document"}function Lt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kn(e){var t;return(t=(Q_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Q_(e){return Od()?e instanceof Node||e instanceof Lt(e).Node:!1}function En(e){return Od()?e instanceof Element||e instanceof Lt(e).Element:!1}function Hn(e){return Od()?e instanceof HTMLElement||e instanceof Lt(e).HTMLElement:!1}function q0(e){return!Od()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Lt(e).ShadowRoot}const nL=new Set(["inline","contents"]);function Ll(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Tn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!nL.has(s)}const rL=new Set(["table","td","th"]);function sL(e){return rL.has(Fo(e))}const iL=[":popover-open",":modal"];function Nd(e){return iL.some(t=>{try{return e.matches(t)}catch{return!1}})}const oL=["transform","translate","scale","rotate","perspective"],aL=["transform","translate","scale","rotate","perspective","filter"],lL=["paint","layout","strict","content"];function Yg(e){const t=Jg(),n=En(e)?Tn(e):e;return oL.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||aL.some(r=>(n.willChange||"").includes(r))||lL.some(r=>(n.contain||"").includes(r))}function cL(e){let t=os(e);for(;Hn(t)&&!To(t);){if(Yg(t))return t;if(Nd(t))return null;t=os(t)}return null}function Jg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const uL=new Set(["html","body","#document"]);function To(e){return uL.has(Fo(e))}function Tn(e){return Lt(e).getComputedStyle(e)}function Id(e){return En(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function os(e){if(Fo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||q0(e)&&e.host||Kn(e);return q0(t)?t.host:t}function Y_(e){const t=os(e);return To(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hn(t)&&Ll(t)?t:Y_(t)}function ll(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Y_(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=Lt(s);if(i){const a=Gp(o);return t.concat(o,o.visualViewport||[],Ll(s)?s:[],a&&n?ll(a):[])}return t.concat(s,ll(s,[],n))}function Gp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function J_(e){const t=Tn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Hn(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=Uu(n)!==i||Uu(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function Xg(e){return En(e)?e:e.contextElement}function eo(e){const t=Xg(e);if(!Hn(t))return Vn(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=J_(t);let o=(i?Uu(n.width):n.width)/r,a=(i?Uu(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const dL=Vn(0);function X_(e){const t=Lt(e);return!Jg()||!t.visualViewport?dL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Lt(e)?!1:t}function ei(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=Xg(e);let o=Vn(1);t&&(r?En(r)&&(o=eo(r)):o=eo(e));const a=hL(i,n,r)?X_(i):Vn(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(i){const p=Lt(i),h=r&&En(r)?Lt(r):r;let v=p,g=Gp(v);for(;g&&r&&h!==v;){const x=eo(g),y=g.getBoundingClientRect(),b=Tn(g),w=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*x.x,S=y.top+(g.clientTop+parseFloat(b.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=w,c+=S,v=Lt(g),g=Gp(v)}}return Bu({width:u,height:d,x:l,y:c})}function Zg(e,t){const n=Id(e).scrollLeft;return t?t.left+n:ei(Kn(e)).left+n}function Z_(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:Zg(e,r)),i=r.top+t.scrollTop;return{x:s,y:i}}function fL(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=Kn(r),a=t?Nd(t.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Vn(1);const u=Vn(0),d=Hn(r);if((d||!d&&!i)&&((Fo(r)!=="body"||Ll(o))&&(l=Id(r)),Hn(r))){const h=ei(r);c=eo(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const p=o&&!d&&!i?Z_(o,l,!0):Vn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}}function pL(e){return Array.from(e.getClientRects())}function mL(e){const t=Kn(e),n=Id(e),r=e.ownerDocument.body,s=jt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=jt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Zg(e);const a=-n.scrollTop;return Tn(r).direction==="rtl"&&(o+=jt(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function gL(e,t){const n=Lt(e),r=Kn(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=Jg();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const yL=new Set(["absolute","fixed"]);function vL(e,t){const n=ei(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=Hn(e)?eo(e):Vn(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,c=r*i.y;return{width:o,height:a,x:l,y:c}}function K0(e,t,n){let r;if(t==="viewport")r=gL(e,n);else if(t==="document")r=mL(Kn(e));else if(En(t))r=vL(t,n);else{const s=X_(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Bu(r)}function eE(e,t){const n=os(e);return n===t||!En(n)||To(n)?!1:Tn(n).position==="fixed"||eE(n,t)}function wL(e,t){const n=t.get(e);if(n)return n;let r=ll(e,[],!1).filter(a=>En(a)&&Fo(a)!=="body"),s=null;const i=Tn(e).position==="fixed";let o=i?os(e):e;for(;En(o)&&!To(o);){const a=Tn(o),l=Yg(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&yL.has(s.position)||Ll(o)&&!l&&eE(e,o))?r=r.filter(u=>u!==o):s=a,o=os(o)}return t.set(e,r),r}function bL(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?Nd(t)?[]:wL(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const d=K0(t,u,s);return c.top=jt(d.top,c.top),c.right=is(d.right,c.right),c.bottom=is(d.bottom,c.bottom),c.left=jt(d.left,c.left),c},K0(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function xL(e){const{width:t,height:n}=J_(e);return{width:t,height:n}}function SL(e,t,n){const r=Hn(t),s=Kn(t),i=n==="fixed",o=ei(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Vn(0);function c(){l.x=Zg(s)}if(r||!r&&!i)if((Fo(t)!=="body"||Ll(s))&&(a=Id(t)),r){const h=ei(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else s&&c();i&&!r&&s&&c();const u=s&&!r&&!i?Z_(s,a):Vn(0),d=o.left+a.scrollLeft-l.x-u.x,p=o.top+a.scrollTop-l.y-u.y;return{x:d,y:p,width:o.width,height:o.height}}function Vh(e){return Tn(e).position==="static"}function G0(e,t){if(!Hn(e)||Tn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Kn(e)===n&&(n=n.ownerDocument.body),n}function tE(e,t){const n=Lt(e);if(Nd(e))return n;if(!Hn(e)){let s=os(e);for(;s&&!To(s);){if(En(s)&&!Vh(s))return s;s=os(s)}return n}let r=G0(e,t);for(;r&&sL(r)&&Vh(r);)r=G0(r,t);return r&&To(r)&&Vh(r)&&!Yg(r)?n:r||cL(e)||n}const _L=async function(e){const t=this.getOffsetParent||tE,n=this.getDimensions,r=await n(e.floating);return{reference:SL(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function EL(e){return Tn(e).direction==="rtl"}const TL={convertOffsetParentRelativeRectToViewportRelativeRect:fL,getDocumentElement:Kn,getClippingRect:bL,getOffsetParent:tE,getElementRects:_L,getClientRects:pL,getDimensions:xL,getScale:eo,isElement:En,isRTL:EL};function nE(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kL(e,t){let n=null,r;const s=Kn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:h}=c;if(a||t(),!p||!h)return;const v=mc(d),g=mc(s.clientWidth-(u+p)),x=mc(s.clientHeight-(d+h)),y=mc(u),w={rootMargin:-v+"px "+-g+"px "+-x+"px "+-y+"px",threshold:jt(0,is(1,l))||1};let S=!0;function _(E){const T=E[0].intersectionRatio;if(T!==l){if(!S)return o();T?o(!1,T):r=setTimeout(()=>{o(!1,1e-7)},1e3)}T===1&&!nE(c,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(_,{...w,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,w)}n.observe(e)}return o(!0),i}function CL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Xg(e),u=s||i?[...c?ll(c):[],...ll(t)]:[];u.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&a?kL(c,n):null;let p=-1,h=null;o&&(h=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let v,g=l?ei(e):null;l&&x();function x(){const y=ei(e);g&&!nE(g,y)&&n(),g=y,v=requestAnimationFrame(x)}return n(),()=>{var y;u.forEach(b=>{s&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d==null||d(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const AL=X2,RL=Z2,PL=Q2,jL=tL,OL=Y2,Q0=G2,NL=eL,IL=(e,t,n)=>{const r=new Map,s={platform:TL,...n},i={...s.platform,_c:r};return K2(e,t,{...s,platform:i})};var LL=typeof document<"u",DL=function(){},Jc=LL?m.useLayoutEffect:DL;function zu(e,t){if(e===t)return!0;
vendor: 3,627 bytes, line 244
244if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!zu(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!zu(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function rE(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Y0(e,t){const n=rE(e);return Math.round(t*n)/n}function Bh(e){const t=m.useRef(e);return Jc(()=>{t.current=e}),t}function ML(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=m.useState(r);zu(p,r)||h(r);const[v,g]=m.useState(null),[x,y]=m.useState(null),b=m.useCallback(P=>{P!==E.current&&(E.current=P,g(P))},[]),w=m.useCallback(P=>{P!==T.current&&(T.current=P,y(P))},[]),S=i||v,_=o||x,E=m.useRef(null),T=m.useRef(null),C=m.useRef(u),O=l!=null,A=Bh(l),M=Bh(s),I=Bh(c),Q=m.useCallback(()=>{if(!E.current||!T.current)return;const P={placement:t,strategy:n,middleware:p};M.current&&(P.platform=M.current),IL(E.current,T.current,P).then(j=>{const $={...j,isPositioned:I.current!==!1};D.current&&!zu(C.current,$)&&(C.current=$,Ol.flushSync(()=>{d($)}))})},[p,t,n,M,I]);Jc(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[c]);const D=m.useRef(!1);Jc(()=>(D.current=!0,()=>{D.current=!1}),[]),Jc(()=>{if(S&&(E.current=S),_&&(T.current=_),S&&_){if(A.current)return A.current(S,_,Q);Q()}},[S,_,Q,A,O]);const Y=m.useMemo(()=>({reference:E,floating:T,setReference:b,setFloating:w}),[b,w]),H=m.useMemo(()=>({reference:S,floating:_}),[S,_]),re=m.useMemo(()=>{const P={position:n,left:0,top:0};if(!H.floating)return P;const j=Y0(H.floating,u.x),$=Y0(H.floating,u.y);return a?{...P,transform:"translate("+j+"px, "+$+"px)",...rE(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:$}},[n,a,H.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:Q,refs:Y,elements:H,floatingStyles:re}),[u,Q,Y,H,re])}const $L=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Q0({element:r.current,padding:s}).fn(n):{}:r?Q0({element:r,padding:s}).fn(n):{}}}},FL=(e,t)=>({...AL(e),options:[e,t]}),UL=(e,t)=>({...RL(e),options:[e,t]}),VL=(e,t)=>({...NL(e),options:[e,t]}),BL=(e,t)=>({...PL(e),options:[e,t]}),zL=(e,t)=>({...jL(e),options:[e,t]}),HL=(e,t)=>({...OL(e),options:[e,t]}),WL=(e,t)=>({...$L(e),options:[e,t]});var qL="Arrow",sE=m.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return f.jsx(le.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});sE.displayName=qL;var KL=sE;function iE(e){const[t,n]=m.useState(void 0);return ur(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}
vendor: 4,151 bytes, line 244
244var ey="Popper",[oE,aE]=fs(ey),[GL,lE]=oE(ey),cE=e=>{const{__scopePopper:t,children:n}=e,[r,s]=m.useState(null);return f.jsx(GL,{scope:t,anchor:r,onAnchorChange:s,children:n})};cE.displayName=ey;var uE="PopperAnchor",dE=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=lE(uE,n),o=m.useRef(null),a=Ye(t,o);return m.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:f.jsx(le.div,{...s,ref:a})});dE.displayName=uE;var ty="PopperContent",[QL,YL]=oE(ty),hE=m.forwardRef((e,t)=>{var J,$e,Ee,Ut,gr,oi;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:v,...g}=e,x=lE(ty,n),[y,b]=m.useState(null),w=Ye(t,yr=>b(yr)),[S,_]=m.useState(null),E=iE(S),T=(E==null?void 0:E.width)??0,C=(E==null?void 0:E.height)??0,O=r+(i!=="center"?"-"+i:""),A=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},M=Array.isArray(c)?c:[c],I=M.length>0,Q={padding:A,boundary:M.filter(XL),altBoundary:I},{refs:D,floatingStyles:Y,placement:H,isPositioned:re,middlewareData:P}=ML({strategy:"fixed",placement:O,whileElementsMounted:(...yr)=>CL(...yr,{animationFrame:h==="always"}),elements:{reference:x.anchor},middleware:[FL({mainAxis:s+C,alignmentAxis:o}),l&&UL({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?VL():void 0,...Q}),l&&BL({...Q}),zL({...Q,apply:({elements:yr,rects:zl,availableWidth:Zd,availableHeight:Hl})=>{const{width:eh,height:qo}=zl.reference,ai=yr.floating.style;ai.setProperty("--radix-popper-available-width",`${Zd}px`),ai.setProperty("--radix-popper-available-height",`${Hl}px`),ai.setProperty("--radix-popper-anchor-width",`${eh}px`),ai.setProperty("--radix-popper-anchor-height",`${qo}px`)}}),S&&WL({element:S,padding:a}),ZL({arrowWidth:T,arrowHeight:C}),p&&HL({strategy:"referenceHidden",...Q})]}),[j,$]=mE(H),Z=_n(v);ur(()=>{re&&(Z==null||Z())},[re,Z]);const R=(J=P.arrow)==null?void 0:J.x,F=($e=P.arrow)==null?void 0:$e.y,z=((Ee=P.arrow)==null?void 0:Ee.centerOffset)!==0,[B,se]=m.useState();return ur(()=>{y&&se(window.getComputedStyle(y).zIndex)},[y]),f.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:re?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B,"--radix-popper-transform-origin":[(Ut=P.transformOrigin)==null?void 0:Ut.x,(gr=P.transformOrigin)==null?void 0:gr.y].join(" "),...((oi=P.hide)==null?void 0:oi.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(QL,{scope:n,placedSide:j,onArrowChange:_,arrowX:R,arrowY:F,shouldHideArrow:z,children:f.jsx(le.div,{"data-side":j,"data-align":$,...g,ref:w,style:{...g.style,animation:re?void 0:"none"}})})})});hE.displayName=ty;var fE="PopperArrow",JL={top:"bottom",right:"left",bottom:"top",left:"right"},pE=m.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=YL(fE,r),o=JL[i.placedSide];return f.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:f.jsx(KL,{...s,ref:n,style:{...s.style,display:"block"}})})});pE.displayName=fE;function XL(e){return e!==null}var ZL=e=>({name:"transformOrigin",options:e,fn(t){var x,y,b;const{placement:n,rects:r,middlewareData:s}=t,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,u]=mE(n),d={start:"0%",center:"50%",end:"100%"}[u],p=(((y=s.arrow)==null?void 0:y.x)??0)+a/2,h=(((b=s.arrow)==null?void 0:b.y)??0)+l/2;let v="",g="";return c==="bottom"?(v=o?d:`${p}px`,g=`${-l}px`):c==="top"?(v=o?d:`${p}px`,g=`${r.floating.height+l}px`):c==="right"?(v=`${-l}px`,g=o?d:`${h}px`):c==="left"&&(v=`${r.floating.width+l}px`,g=o?d:`${h}px`),{data:{x:v,y:g}}}});function mE(e){const[t,n="center"]=e.split("-");return[t,n]}
vendor: 3,961 bytes, line 244
244var eD=cE,tD=dE,nD=hE,rD=pE,[Ld,J6]=fs("Tooltip",[aE]),Dd=aE(),gE="TooltipProvider",sD=700,Qp="tooltip.open",[iD,ny]=Ld(gE),yE=e=>{const{__scopeTooltip:t,delayDuration:n=sD,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,o=m.useRef(!0),a=m.useRef(!1),l=m.useRef(0);return m.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),f.jsx(iD,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:m.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:m.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:i})};yE.displayName=gE;var cl="Tooltip",[oD,Md]=Ld(cl),vE=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=e,l=ny(cl,e.__scopeTooltip),c=Dd(t),[u,d]=m.useState(null),p=Jt(),h=m.useRef(0),v=o??l.disableHoverableContent,g=a??l.delayDuration,x=m.useRef(!1),[y,b]=Do({prop:r,defaultProp:s??!1,onChange:T=>{T?(l.onOpen(),document.dispatchEvent(new CustomEvent(Qp))):l.onClose(),i==null||i(T)},caller:cl}),w=m.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),S=m.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x.current=!1,b(!0)},[b]),_=m.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),E=m.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{x.current=!0,b(!0),h.current=0},g)},[g,b]);return m.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),f.jsx(eD,{...c,children:f.jsx(oD,{scope:t,contentId:p,open:y,stateAttribute:w,trigger:u,onTriggerChange:d,onTriggerEnter:m.useCallback(()=>{l.isOpenDelayedRef.current?E():S()},[l.isOpenDelayedRef,E,S]),onTriggerLeave:m.useCallback(()=>{v?_():(window.clearTimeout(h.current),h.current=0)},[_,v]),onOpen:S,onClose:_,disableHoverableContent:v,children:n})})};vE.displayName=cl;var Yp="TooltipTrigger",wE=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Md(Yp,n),i=ny(Yp,n),o=Dd(n),a=m.useRef(null),l=Ye(t,a,s.onTriggerChange),c=m.useRef(!1),u=m.useRef(!1),d=m.useCallback(()=>c.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),f.jsx(tD,{asChild:!0,...o,children:f.jsx(le.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:de(e.onPointerMove,p=>{p.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:de(e.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:de(e.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:de(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:de(e.onBlur,s.onClose),onClick:de(e.onClick,s.onClose)})})});wE.displayName=Yp;var aD="TooltipPortal",[X6,lD]=Ld(aD,{forceMount:void 0}),ko="TooltipContent",bE=m.forwardRef((e,t)=>{const n=lD(ko,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=Md(ko,e.__scopeTooltip);return f.jsx(ii,{present:r||o.open,children:o.disableHoverableContent?f.jsx(xE,{side:s,...i,ref:t}):f.jsx(cD,{side:s,...i,ref:t})})}),cD=m.forwardRef((e,t)=>{const n=Md(ko,e.__scopeTooltip),r=ny(ko,e.__scopeTooltip),s=m.useRef(null),i=Ye(t,s),[o,a]=m.useState(null),{trigger:l,onClose:c}=n,u=s.current,{onPointerInTransitChange:d}=r,p=m.useCallback(()=>{a(null),d(!1)},[d]),h=m.useCallback((v,g)=>{const x=v.currentTarget,y={x:v.clientX,y:v.clientY},b=pD(y,x.getBoundingClientRect()),w=mD(y,b),S=gD(g.getBoundingClientRect()),_=vD([...w,...S]);a(_),d(!0)},[d]);return m.useEffect(()=>()=>p(),[p]),m.useEffect(()=>{if(l&&u){const v=x=>h(x,u),g=x=>h(x,l);return l.addEventListener("pointerleave",v),u.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",g)}}}
vendor: 4,242 bytes, line 244
244,[l,u,h,p]),m.useEffect(()=>{if(o){const v=g=>{const x=g.target,y={x:g.clientX,y:g.clientY},b=(l==null?void 0:l.contains(x))||(u==null?void 0:u.contains(x)),w=!yD(y,o);b?p():w&&(p(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,u,o,c,p]),f.jsx(xE,{...e,ref:i})}),[uD,dD]=Ld(cl,{isInside:!1}),hD=BN("TooltipContent"),xE=m.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=Md(ko,n),c=Dd(n),{onClose:u}=l;return m.useEffect(()=>(document.addEventListener(Qp,u),()=>document.removeEventListener(Qp,u)),[u]),m.useEffect(()=>{if(l.trigger){const d=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),f.jsx(Rd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:f.jsxs(nD,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(hD,{children:r}),f.jsx(uD,{scope:n,isInside:!0,children:f.jsx(dI,{id:l.contentId,role:"tooltip",children:s||r})})]})})});bE.displayName=ko;var SE="TooltipArrow",fD=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Dd(n);return dD(SE,n).isInside?null:f.jsx(rD,{...s,...r,ref:t})});fD.displayName=SE;function pD(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function mD(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function gD(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function yD(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i],l=t[o],c=a.x,u=a.y,d=l.x,p=l.y;u>r!=p>r&&n<(d-c)*(r-u)/(p-u)+c&&(s=!s)}return s}function vD(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),wD(t)}function wD(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var bD=yE,xD=vE,SD=wE,_E=bE;const _D=bD,Z6=xD,eH=SD,ED=m.forwardRef(({className:e,sideOffset:t=4,...n},r)=>f.jsx(_E,{ref:r,sideOffset:t,className:ee("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));ED.displayName=_E.displayName;function $d(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function TD(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}
244return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}const kD=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class ry extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class CD extends ry{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class J0 extends ry{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class X0 extends ry{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Jp;(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"})(Jp||(Jp={}));class AD{constructor(t,{headers:n={},customFetch:r,region:s=Jp.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=kD(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return TD(this,arguments,void 0,function*(n,r={}){var s;let i,o;try{const{headers:a,method:l,body:c,signal:u,timeout:d}=r;let p={},{region:h}=r;h||(h=this.region);const v=new URL(`${this.url}/${n}`);h&&h!=="any"&&(p["x-region"]=h,v.searchParams.set("forceFunctionRegion",h));let g;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",g=c):typeof c=="string"?(p["Content-Type"]="text/plain",g=c):typeof FormData<"u"&&c instanceof FormData?g=c:(p["Content-Type"]="application/json",g=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?g=JSON.stringify(c):g=c;let x=u;d&&(o=new AbortController,i=setTimeout(()=>o.abort(),d),u?(x=o.signal,u.addEventListener("abort",()=>o.abort())):x=o.signal);const y=yield this.fetch(v.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),a),body:g,signal:x}).catch(_=>{throw new CD(_)}),b=y.headers.get("x-relay-error");if(b&&b==="true")throw new J0(y);if(!y.ok)throw new X0(y);let w=((s=y.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),S;return w==="application/json"?S=yield y.json():w==="application/octet-stream"||w==="application/pdf"?S=yield y.blob():w==="text/event-stream"?S=y:w==="multipart/form-data"?S=yield y.formData():S=yield y.text(),{data:S,error:null,response:y}}catch(a){return{data:null,error:a,response:a instanceof X0||a instanceof J0?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const EE=3,Z0=e=>Math.min(1e3*2**e,3e4),RD=[520,503],TE=["GET","HEAD","OPTIONS"];var PD=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
244de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function ew(e,t){return new Promise(n=>{if(t!=null&&t.aborted){n();return}const r=setTimeout(()=>{t==null||t.removeEventListener("abort",s),n()},e);function s(){clearTimeout(r),n()}t==null||t.addEventListener("abort",s)})}function jD(e,t,n,r){return!(!r||n>=EE||!TE.includes(e)||!RD.includes(t))}var OD=class{constructor(e){var t,n,r,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=e.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(s=e.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=e.retry)!==null&&i!==void 0?i:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let i=(async()=>{let o=0;for(;;){const c=new Headers(n.headers);o>0&&c.set("X-Retry-Count",String(o));let u;try{u=await r(n.url.toString(),{method:n.method,headers:c,body:JSON.stringify(n.body,(d,p)=>typeof p=="bigint"?p.toString():p),signal:n.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!TE.includes(n.method))throw d;if(n.retryEnabled&&o<EE){const p=Z0(o);o++,await ew(p,n.signal);continue}throw d}if(jD(n.method,u.status,o,n.retryEnabled)){var a,l;const d=(a=(l=u.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,p=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:Z0(o);await u.text(),o++,await ew(p,n.signal);continue}return await n.processResponse(u)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",c="",u="";const d=o==null?void 0:o.cause;if(d){var p,h,v,g;const b=(p=d==null?void 0:d.message)!==null&&p!==void 0?p:"",w=(h=d==null?void 0:d.code)!==null&&h!==void 0?h:"";l=`${(v=o==null?void 0:o.name)!==null&&v!==void 0?v:"FetchError"}: ${o==null?void 0:o.message}`,l+=`
245
246Caused by: ${(g=d==null?void 0:d.name)!==null&&g!==void 0?g:"Error"}: ${b}`,w&&(l+=` (${w})`),d!=null&&d.stack&&(l+=`
247${d.stack}`)}else{var x;l=(x=o==null?void 0:o.stack)!==null&&x!==void 0?x:""}const y=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",y>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${y} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",y>this.urlLengthLimit&&(c+=`. Your request URL is ${y} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}}
247)),i.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,s=null,i=e.status,o=e.statusText;if(e.ok){var a,l;if(t.method!=="HEAD"){var c;const p=await e.text();p===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((c=t.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text"))?r=p:r=JSON.parse(p))}const u=(a=t.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),d=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");u&&d&&d.length>1&&(s=parseInt(d[1])),t.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(n={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,s=null,i=406,o="Not Acceptable"):r.length===1?r=r[0]:r=null)}else{const u=await e.text();try{n=JSON.parse(u),Array.isArray(n)&&e.status===404&&(r=[],n=null,i=200,o="OK")}catch{e.status===404&&u===""?(i=204,o="No Content"):n={message:u}}if(n&&t.shouldThrowOnError)throw new PD(n)}return{success:n===null,error:n,data:r,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},ND=class extends OD{select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const tw=new RegExp("[,()]");var xi=class extends ND{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&tw.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&tw.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>
247n!==void 0).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},ID=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:s=8e3,retry:i}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},s=n?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),r&&l.append("Prefer",`count=${r}`),new xi({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),n||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>
2470){const l=[...new Set(a)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new xi({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),r&&l.append("Prefer",`count=${r}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const c=e.reduce((u,d)=>u.concat(Object.keys(d)),[]);if(c.length>0){const u=[...new Set(c)].map(d=>`"${d}"`);a.searchParams.set("columns",u.join(","))}}return new xi({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new xi({method:r,url:s,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new xi({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function ul(e){"@babel/helpers - typeof";return ul=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ul(e)}function LD(e,t){if(ul(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ul(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function DD(e){var t=LD(e,"string");return ul(t)=="symbol"?t:t+""}function MD(e,t,n){return(t=DD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function gc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nw(Object(n),!0).forEach(function(r){MD(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var $D=class kE{constructor(t,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(c,u)=>{const d=new AbortController,p=setTimeout(()=>d.abort(),i),h=u==null?void 0:u.signal;if(h){if(h.aborted)return clearTimeout(p),l(c,u);const v=()=>{clearTimeout(p),d.abort()};return h.addEventListener("abort",v,{once:!0}),l(c,gc(gc({},u),{},{signal:d.signal})).finally(()=>{clearTimeout(p),h.removeEventListener("abort",v)})}return l(c,gc(gc({},u),{},{signal:d.signal})).finally(()=>clearTimeout(p))}:this.fetch=l,this.retry=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new ID(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new kE(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let c;const u=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(u)),d=r&&Object.values(n).some(u);d?(a="POST",c=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([h,v])=>v!==void 0).map(([h,v])=>[h,Array.isArray(v)?`{${v.join(",")}}`:`${v}
247`]).forEach(([h,v])=>{l.searchParams.append(h,v)})):(a="POST",c=n);const p=new Headers(this.headers);return d?p.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&p.set("Prefer",`count=${i}`),new xi({method:a,url:l,headers:p,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class FD{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const r=typeof global<"u"?global:void 0;if(r&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};if(typeof globalThis<"u"&&typeof n.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&n.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const s=globalThis.process;if(s){const i=s.versions;if(i&&i.node){const o=i.node,a=parseInt(o.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
248import ws from "ws"
249new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
250
251Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const UD="2.105.4",VD=`realtime-js/${UD}`,BD="1.0.0",CE="2.0.0",zD=CE,HD=1e4,WD=100,Or={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},AE={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Xp={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class qD{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,n,r){var s,i;const o=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",c=t.payload.event,u=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(u).length===0?"":JSON.stringify(u);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const p=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+c.length+d.length,h=new ArrayBuffer(this.HEADER_LENGTH+p);
251let v=new DataView(h),g=0;v.setUint8(g++,this.KINDS.userBroadcastPush),v.setUint8(g++,l.length),v.setUint8(g++,a.length),v.setUint8(g++,o.length),v.setUint8(g++,c.length),v.setUint8(g++,d.length),v.setUint8(g++,n),Array.from(l,y=>v.setUint8(g++,y.charCodeAt(0))),Array.from(a,y=>v.setUint8(g++,y.charCodeAt(0))),Array.from(o,y=>v.setUint8(g++,y.charCodeAt(0))),Array.from(c,y=>v.setUint8(g++,y.charCodeAt(0))),Array.from(d,y=>v.setUint8(g++,y.charCodeAt(0)));var x=new Uint8Array(h.byteLength+r.byteLength);return x.set(new Uint8Array(h),0),x.set(new Uint8Array(r),h.byteLength),x.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[s,i,o,a,l]=r;return n({join_ref:s,ref:i,topic:o,event:a,payload:l})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,s)}}_decodeUserBroadcast(t,n,r){const s=n.getUint8(1),i=n.getUint8(2),o=n.getUint8(3),a=n.getUint8(4);let l=this.HEADER_LENGTH+4;const c=r.decode(t.slice(l,l+s));l=l+s;const u=r.decode(t.slice(l,l+i));l=l+i;const d=r.decode(t.slice(l,l+o));l=l+o;const p=t.slice(l,t.byteLength),h=a===this.JSON_ENCODING?JSON.parse(r.decode(p)):p,v={type:this.BROADCAST_EVENT,event:u,payload:h};return o>0&&(v.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:v}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}var ve;(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"})(ve||(ve={}));const rw=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=KD(o,e,t,s),i),{}):{}},KD=(e,t,n,r)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=n[e];return i&&!r.includes(i)?RE(i,o):Zp(o)},RE=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return JD(t,n)}switch(e){case ve.bool:return GD(t);
vendor: 5,328 bytes, line 251
251case ve.float4:case ve.float8:case ve.int2:case ve.int4:case ve.int8:case ve.numeric:case ve.oid:return QD(t);case ve.json:case ve.jsonb:return YD(t);case ve.timestamp:return XD(t);case ve.abstime:case ve.date:case ve.daterange:case ve.int4range:case ve.int8range:case ve.money:case ve.reltime:case ve.text:case ve.time:case ve.timestamptz:case ve.timetz:case ve.tsrange:case ve.tstzrange:return Zp(t);default:return Zp(t)}},Zp=e=>e,GD=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},QD=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},YD=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},JD=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let i;const o=e.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>RE(t,a))}return e},XD=e=>typeof e=="string"?e.replace(" ","T"):e,PE=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var ja=e=>typeof e=="function"?e:function(){return e},ZD=typeof self<"u"?self:null,Si=typeof window<"u"?window:null,jn=ZD||Si||globalThis,eM="2.0.0",tM=1e4,nM=1e3,Ln={connecting:0,open:1,closing:2,closed:3},wt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Zn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},em={longpoll:"longpoll",websocket:"websocket"},rM={complete:4},tm="base64url.bearer.phx.",yc=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(r=>r.status===e).forEach(r=>r.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},jE=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},sM=class{constructor(e,t,n){this.state=wt.closed,this.topic=e,this.params=ja(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new yc(this,Zn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new jE(()=>{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=wt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=wt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=wt.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=wt.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 yc(this,Zn.leave,ja({}),this.timeout).send(),this.state=wt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Zn.reply,(r,s)=>{this.trigger(this.replyEventName(s),r)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}
vendor: 5,263 bytes, line 251
251teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=wt.closed,this.bindings=[]}onClose(e){this.on(Zn.close,e)}onError(e){return this.on(Zn.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new yc(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=wt.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Zn.close,"leave")},n=new yc(this,Zn.leave,ja({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic!==e?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=wt.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let s=this.onMessage(e,t,n,r);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,n));for(let o=0;o<i.length;o++)i[o].callback(s,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===wt.closed}isErrored(){return this.state===wt.errored}isJoined(){return this.state===wt.joined}isJoining(){return this.state===wt.joining}isLeaving(){return this.state===wt.leaving}},Hu=class{static request(e,t,n,r,s,i,o){if(jn.XDomainRequest){let a=new jn.XDomainRequest;return this.xdomainRequest(a,e,t,r,s,i,o)}else if(jn.XMLHttpRequest){let a=new jn.XMLHttpRequest;return this.xhrRequest(a,e,t,n,r,s,i,o)}else{if(jn.fetch&&jn.AbortController)return this.fetchRequest(e,t,n,r,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,r,s,i,o){let a={method:e,headers:n,body:r},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),jn.fetch(t,a).then(c=>c.text()).then(c=>this.parseJSON(c)).then(c=>o&&o(c)).catch(c=>{c.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(e,t,n,r,s,i,o){return e.timeout=s,e.open(t,n),e.onload=()=>{let a=this.parseJSON(e.responseText);o&&o(a)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,s,i,o,a){e.open(t,n,!0),e.timeout=i;for(let[l,c]of Object.entries(r))e.setRequestHeader(l,c);return e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===rM.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},o&&(e.ontimeout=o),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let s=t?`${t}[${r}]`:r,i=e[r];typeof i=="object"?n.push(this.serialize(i,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},iM=e=>{let t="",n=new Uint8Array(e),r=n.byteLength;for(let s=0;s<r;s++)t+=String.fromCharCode(n[s]);return btoa(t)},fi=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(tm)&&(this.authToken=atob(t[1].slice(tm.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=Ln.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+em.websocket),"$1/"+em.longpoll)}endpointURL(){return Hu.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=Ln.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Ln.open||this.readyState===Ln.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:n,token:r,messages:s}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Ln.open,this.onopen({}),this.poll();break;
251case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(e){typeof e!="string"&&(e=iM(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(`
252`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,n){for(let s of this.reqs)s.abort();this.readyState=Ln.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r,s){let i,o=()=>{this.reqs.delete(i),r()};i=Hu.request(e,this.endpointURL(),t,n,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},oM=class ma{constructor(t,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=ma.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=ma.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(r.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=ma.syncDiff(this.state,s,i,o),a())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return ma.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,r,s){let i=this.clone(t),o={},a={};return this.map(i,(l,c)=>{n[l]||(a[l]=c)}),this.map(n,(l,c)=>{let u=i[l];if(u){let d=c.metas.map(g=>g.phx_ref),p=u.metas.map(g=>g.phx_ref),h=c.metas.filter(g=>p.indexOf(g.phx_ref)<0),v=u.metas.filter(g=>d.indexOf(g.phx_ref)<0);h.length>0&&(o[l]=c,o[l].metas=h),v.length>0&&(a[l]=this.clone(u),a[l].metas=v)}else o[l]=c}),this.syncDiff(i,{joins:o,leaves:a},r,s)}static syncDiff(t,n,r,s){let{joins:i,leaves:o}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let c=t[a];if(t[a]=this.clone(l),c){let u=t[a].metas.map(p=>p.phx_ref),d=c.metas.filter(p=>u.indexOf(p.phx_ref)<0);t[a].metas.unshift(...d)}r(a,c,l)}),this.map(o,(a,l)=>{let c=t[a];if(!c)return;let u=l.metas.map(d=>d.phx_ref);c.metas=c.metas.filter(d=>u.indexOf(d.phx_ref)<0),s(a,c,l),c.metas.length===0&&delete t[a]}),t}static list(t,n){return n||(n=function(r,s){return s}),this.map(t,(r,s)=>n(r,s))}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static clone(t){return JSON.parse(JSON.stringify(t))}},vc={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,s,i,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:s,event:i,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:s,payload:i}=e,o=this.META_LENGTH+t.length+n.length+s.length+r.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,t.length),l.setUint8(c++,n.length),l.setUint8(c++,s.length),l.setUint8(c++,r.length),Array.from(t,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(s,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(c++,d.charCodeAt(0)));var u=new Uint8Array(a.byteLength+i.byteLength);return u.set(new Uint8Array(a),0),u.set(new Uint8Array(i),a.byteLength),u.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}}
252,decodePush(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=n.decode(e.slice(o,o+r));o=o+r;let l=n.decode(e.slice(o,o+s));o=o+s;let c=n.decode(e.slice(o,o+i));o=o+i;let u=e.slice(o,e.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:u}},decodeReply(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(e.slice(a,a+r));a=a+r;let c=n.decode(e.slice(a,a+s));a=a+s;let u=n.decode(e.slice(a,a+i));a=a+i;let d=n.decode(e.slice(a,a+o));a=a+o;let p=e.slice(a,e.byteLength),h={status:d,response:p};return{join_ref:l,ref:c,topic:u,event:Zn.reply,payload:h}},decodeBroadcast(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=this.HEADER_LENGTH+2,o=n.decode(e.slice(i,i+r));i=i+r;let a=n.decode(e.slice(i,i+s));i=i+s;let l=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},aM=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||tM,this.transport=t.transport||jn.WebSocket||fi,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=jn&&jn.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=vc.encode.bind(vc),this.defaultDecoder=vc.decode.bind(vc),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!==fi?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;Si&&Si.addEventListener&&(Si.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),r=this.connectClock)}),Si.addEventListener("pageshow",s=>{r===this.connectClock&&(r=null,this.connect())}),Si.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=s=>t.rejoinAfterMs?t.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>t.reconnectAfterMs?t.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(s,i,o)=>{console.log(`${s}: ${i}`,o)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=ja(t.params||{}),this.endPoint=`${e}/${em.websocket}`,this.vsn=t.vsn||eM,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new jE(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return fi}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Hu.appendParams(Hu.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ja(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==fi?this.connectWithF
vendor: 4,379 bytes, line 252
252allback(fi,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage(s=>{s.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case fi:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${tm}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,s,i,o=this.transportName(e),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,t),i=this.onError(l=>{this.log("transport","error",l),r&&!n&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,t),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),nM,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===Ln.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)}
252triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Zn.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Ln.connecting:return"connecting";case Ln.open:return"open";case Ln.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new sM(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:s,join_ref:i}=e;this.log("push",`${t} ${n} (${i}, ${s})`,r)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:n,event:r,payload:s,ref:i,join_ref:o}=t;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${n} ${r} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(n,r,s,o)&&l.trigger(r,s,i,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class Oa{constructor(t,n){const r=cM(n);this.presence=new oM(t.getChannel(),r),this.presence.onJoin((s,i,o)=>{const a=Oa.onJoinPayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=Oa.onLeavePayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Oa.transformState(this.presence.state)}static transformState(t){return t=lM(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return n[r]=Xc(s),n},{})}static onJoinPayload(t,n,r){const s=sw(n),i=Xc(r);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,n,r){const s=sw(n),i=Xc(r);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function Xc(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function lM(e){return JSON.parse(JSON.stringify(e))}function cM(e){return(e==null?void 0:e.events)&&{events:e.events}}function sw(e){return e!=null&&e.metas?Xc(e):[]}var iw;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(iw||(iw={}));class uM{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new Oa(this.channel.channelAdapter,n)}}function dM(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
252if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const n=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${n}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class hM{constructor(t,n,r){const s=fM(r);this.channel=t.getSocket().channel(n,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,n,r){let s;try{s=this.channel.push(t,n,r)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>WD){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===Or.joined}isJoined(){return this.state===Or.joined}isJoining(){return this.state===Or.joining}isClosed(){return this.state===Or.closed}isLeaving(){return this.state===Or.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function fM(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var ow;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(ow||(ow={}));var Vi;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Vi||(Vi={}));var er;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(er||(er={}));class Na{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,n={config:{}},r){var s,i;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new hM(this.socket.socketAdapter,t,this.params),this.presence=new uM(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=PE(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,c=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(h=>h.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[Vi.PRESENCE]&&this.bindings[Vi.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,d={},p={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(h=>{t==null||t(er.CHANNEL_ERROR,dM(h))}),this._onClose(()=>t==null?void 0:t(er.CLOSED)),this.updateJoinPayload(Object.assign({config:p},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:h})=>{if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){t==null||t(er.SUBSCRIBED);return}this._updatePostgresBindings(h,t)}
252).receive("error",h=>{this.state=Or.errored;const v=Object.values(h).join(", ")||"error";t==null||t(er.CHANNEL_ERROR,new Error(v,{cause:h}))}).receive("timeout",()=>{t==null||t(er.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var r;const s=this.bindings.postgres_changes,i=(r=s==null?void 0:s.length)!==null&&r!==void 0?r:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:c,schema:u,table:d,filter:p}}=l,h=t&&t[a];if(h&&h.event===c&&Na.isFilterValueEqual(h.schema,u)&&Na.isFilterValueEqual(h.table,d)&&Na.isFilterValueEqual(h.filter,p))o.push(Object.assign(Object.assign({},l),{id:h.id}));else{this.unsubscribe(),this.state=Or.errored,n==null||n(er.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Or.errored&&n&&n(er.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=t===Vi.PRESENCE||t===Vi.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,n,r)}async httpSend(t,n,r={}){var s;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;try{const c=await a.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(t,n={}){var r,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
252in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c instanceof Error&&c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_on(t,n,r){const s=t.toLocaleLowerCase(),i=this.channelAdapter.on(t,r),o={type:s,filter:n,callback:r,ref:i};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,r)=>{var s,i,o,a,l,c,u;const d=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,r))return!1;const p=(s=this.bindings[d])===null||s===void 0?void 0:s.find(h=>h.ref===t.ref);if(!p)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in p){const h=p.id,v=(i=p.filter)===null||i===void 0?void 0:i.event;return h&&((o=n.ids)===null||o===void 0?void 0:o.includes(h))&&(v==="*"||(v==null?void 0:v.toLocaleLowerCase())===((a=n.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const h=(c=(l=p==null?void 0:p.filter)===null||l===void 0?void 0:l.event)===null||c===void 0?void 0:c.toLocaleLowerCase();return h==="*"||h===((u=n==null?void 0:n.event)===null||u===void 0?void 0:u.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===d})}_notThisChannelEvent(t,n){const{close:r,error:s,leave:i,join:o}=AE;return n&&[r,s,i,o].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,r)=>{if(typeof n=="object"&&"ids"in n){const s=n.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:c}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:c}),this._getPayloadRecords(s))}return n})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const r of t.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=rw(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=rw(t.columns,t.old_record)),n}}class pM{constructor(t,n){this.socket=new aM(t,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,n,r,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{t(),i("ok")},n,r)})}push(t){this.socket.push(t)}log(t,n,r){this.socket.log(t,n,r)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Xp.connecting}isDisconnecting(){return this.socket.connectionState()==Xp.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const aw={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},mM=[1e3,2e3,5e3,1e4],gM=1e4;function yM(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var n;return(n=Array.from(e.keys())[t])!==null&&n!==void 0?n:null},removeItem(t){e.delete(t)},setItem(t,n){e.set(t,String(n))}}}function vM(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return yM()}const wM=`
253  addEventListener("message", (e) => {
254    if (e.data.event === "start") {
255      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
256    }
257  });`;class bM{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
257,this.ref=0,this.serializer=new qD,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const s=this._initializeOptions(n);this.socketAdapter=new pM(t,s),this.httpEndpoint=PE(t),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const n=t.message;throw n.includes("Node.js")?new Error(`${n}
258
259To use Realtime in Node.js, you need to provide a WebSocket implementation:
260
261Option 1: Use Node.js 22+ which has native WebSocket support
262Option 2: Install and provide the "ws" package:
263
264  npm install ws
265
266  import ws from "ws"
267  const client = new RealtimeClient(url, {
268    ...options,
269    transport: ws
270  })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),n}async removeAllChannels(){const t=this.channels.map(async r=>{const s=await r.unsubscribe();return r.teardown(),s}),n=await Promise.all(t);return await this.disconnect(),n}log(t,n,r){this.socketAdapter.log(t,n,r)}connectionState(){return this.socketAdapter.connectionState()||Xp.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new Na(`realtime:${t}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic),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}
270this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const i={access_token:n,version:VD};n&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(AE.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(n,r)=>{n=="sent"&&this._setAuthSafely(),t&&t(n,r)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([wM],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(t){var n,r,s,i,o,a,l,c,u,d,p,h;this.worker=(n=t==null?void 0:t.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=t==null?void 0:t.accessToken)!==null&&r!==void 0?r:null;const v={};v.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:HD,v.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:aw.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=t==null?void 0:t.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((a=t==null?void 0:t.heartbeatIntervalMs)!==null&&a!==void 0?a:aw.HEARTBEAT_INTERVAL),v.transport=(l=t==null?void 0:t.transport)!==null&&l!==void 0?l:FD.getWebSocketConstructor(),v.params=t==null?void 0:t.params,v.logger=t==null?void 0:t.logger,v.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),v.sessionStorage=(c=t==null?void 0:t.sessionStorage)!==null&&c!==void 0?c:vM(),v.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:b=>mM[b-1]||gM;let g,x;const y=(d=t==null?void 0:t.vsn)!==null&&d!==void 0?d:zD;switch(y){case BD:g=(b,w)=>w(JSON.stringify(b)),x=(b,w)=>w(JSON.parse(b));break;case CE:g=this.serializer.encode.bind(this.serializer),x=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${v.vsn}`)}if(v.vsn=y,v.encode=(p=t==null?void 0:t.encode)!==null&&p!==void 0?p:g,v.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:x,v.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,v.params=Object.assign(Object.assign({},v.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,v.autoSendHeartbeat=!this.worker}return v}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
270var dl=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function xM(e,t,n){const r=new URL(t,e);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function SM(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 _M(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const a=xM(e.baseUrl,r,s),l=await SM(e.auth),c=await t(a,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),u=await c.text(),d=(c.headers.get("content-type")||"").includes("application/json"),p=d&&u?JSON.parse(u):u;if(!c.ok){const h=d?p:void 0,v=h==null?void 0:h.error;throw new dl((v==null?void 0:v.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:v==null?void 0:v.type,icebergCode:v==null?void 0:v.code,details:h})}return{status:c.status,headers:c.headers,data:p}}}}function wc(e){return e.join("�")}var EM=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:wc(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${wc(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${wc(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${wc(e.namespace)}`}),!0}catch(t){if(t instanceof dl&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof dl&&n.status===409)return;throw n}}};function pi(e){return e.join("�")}var TM=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/${pi(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${pi(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${pi(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/${pi(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${pi(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${pi(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof dl&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof dl&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},kM=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=_M({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new EM(this.client,t),this.tableOps=new TM(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)}
270async 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 hl(e){"@babel/helpers - typeof";return hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hl(e)}function CM(e,t){if(hl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(hl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function AM(e){var t=CM(e,"string");return hl(t)=="symbol"?t:t+""}function RM(e,t,n){return(t=AM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lw(Object(n),!0).forEach(function(r){RM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Fd=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 Ud(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var nm=class extends Fd{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 te({},super.toJSON())}},OE=class extends Fd{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Wu(e,t,n){const r=te({},e),s=t.toLowerCase();for(const i of Object.keys(r))i.toLowerCase()===s&&delete r[i];return r[s]=n,r}function PM(e){const t={};for(const[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}const jM=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),OM=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},rm=e=>{if(Array.isArray(e))return e.map(n=>rm(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=rm(r)}),t},NM=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),cw=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const n=t.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(e)},IM=async(e,t,n,r)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const s=e;let i=parseInt(String(s.status),10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new nm(cw(o),i,a,r))}).catch(()=>{const o=i+"";t(new nm(s.statusText||`HTTP ${i} error`,i,o,r))})}else t(new OE(cw(e),e,r))},LM=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!r)return te(te({},s),n);if(OM(r)){var i;const o=(t==null?void 0:t.headers)||{};let a;for(const[l,c]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=c);s.headers=Wu(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(r)}else s.body=r;return t!=null&&t.duplex&&(s.duplex=t.duplex),te(te({},s),n)};async function oa(e,t,n,r,s,i,o){return new Promise((a,l)=>{e(n,LM(t,r,s,i)).then(c=>{if(!c.ok)throw c;if(r!=null&&r.noResolveJson)return c;if(o==="vectors"){const u=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!u||!u.includes("application/json"))return{}}return c.json()}).then(c=>a(c)).catch(c=>IM(c,l,r,o))})}function NE(e="storage"){return{get:async(t,n,r,s)=>oa(t,"GET",n,r,s,void 0,e),post:async(t,n,r,s,i)=>oa(t,"POST",n,s,i,r,e),put:async(t,n,r,s,i)=>oa(t,"PUT",n,s,i,r,e),head:async(t,n,r,s)=>oa(t,"HEAD",n,te(te({},r),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,n,r,s,i)=>oa(t,"DELETE",n,s,i,r,e)}}const DM=NE("storage"),{get:fl,post:hn,put:sm,head:MM,remove:sy}=DM,Ot=NE("vectors");var Uo=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=PM(t),this.fetch=jM(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Wu(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ud(n))return{data:null,error:n};throw n}}},$M=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Ud(t))return{data:null,error:t};throw t}}};let IE;IE=Symbol.toStringTag;var FM=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[IE]="BlobDownloadBuilder",this.promise=null}asStream(){return new $M(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Ud(t))return{data:null,error:t};throw t}}};const UM={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},uw={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var VM=class extends Uo{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var s=this;return s.handleOperation(async()=>{let i;const o=te(te({},uw),r);let a=te(te({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers)for(const[p,h]of Object.entries(r.headers))a=Wu(a,p,h);const c=s._removeEmptyFolders(t),u=s._getFinalPath(c),d=await(e=="PUT"?sm:hn)(s.fetch,`${s.url}/object/${u}`,i,te({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:c,id:d.Id,fullPath:d.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const c=te(te({},uw),r);let u=te(te({},s.headers),{"x-upsert":String(c.upsert)});const d=c.metadata;if(typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),d&&l.append("metadata",s.encodeMetadata(d)),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.has("cacheControl")||l.append("cacheControl",c.cacheControl),d&&!l.has("metadata")&&l.a
270ppend("metadata",s.encodeMetadata(d))):(l=n,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType,d&&(u["x-metadata"]=s.toBase64(s.encodeMetadata(d))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!c.duplex&&(c.duplex="half")),r!=null&&r.headers)for(const[p,h]of Object.entries(r.headers))u=Wu(u,p,h);return{path:i,fullPath:(await sm(s.fetch,a.toString(),l,te({headers:u},c!=null&&c.duplex?{duplex:c.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const s=te({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await hn(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(n.url+i.url),a=o.searchParams.get("token");if(!a)throw new Fd("No token returned by API");return{signedUrl:o.toString(),path:e,token:a}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await hn(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
270stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await hn(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(e);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await hn(r.fetch,`${r.url}/object/sign/${s}`,te({expiresIn:t},i?{transform:n.transform}:{}),{headers:r.headers});const a=new URLSearchParams;n!=null&&n.download&&a.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&a.set("cacheNonce",String(n.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const s=await hn(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),i=new URLSearchParams;n!=null&&n.download&&i.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&i.set("cacheNonce",String(n.cacheNonce));const o=i.toString();return s.map(a=>te(te({},a),{},{signedUrl:a.signedURL?encodeURI(`${r.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(s,t.transform),(t==null?void 0:t.cacheNonce)!=null&&s.set("cacheNonce",String(t.cacheNonce));const i=s.toString(),o=this._getFinalPath(e),a=()=>fl(this.fetch,`${this.url}/${r}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new FM(a,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>rm(await fl(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await MM(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(Ud(s)){var r;const i=s instanceof nm?s.status:s instanceof OE?(r=s.originalError)===null||r===void 0?void 0:r.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=new URLSearchParams;t!=null&&t.download&&r.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(r,t.transform),(t==null?void 0:t.cacheNonce)!=null&&r.set("cacheNonce",String(t.cacheNonce));const s=r.toString(),i=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}`)+(s?`?${s}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await sy(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const s=te(te(te({},UM),t),{},{prefix:e||""});return await hn(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=te({},e);return await hn(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const BM="2.105.4",Dl={"X-Client-Info":`storage-js/${BM}`};var zM=class extends Uo{constructor(e,t={},n,r){const s=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=te(te({},Dl),t);super(i,o,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await fl(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await fl(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await hn(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 sm(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 hn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await sy(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},HM=class extends Uo{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=te(te({},Dl),t);super(r,s,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await hn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),s=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await fl(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await sy(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!NM(e))throw new Fd("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new kM({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
270),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},WM=class extends Uo{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=te(te({},Dl),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Ot.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Ot.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Ot.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Ot.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},qM=class extends Uo{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=te(te({},Dl),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Ot.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Ot.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Ot.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Ot.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Ot.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},KM=class extends Uo{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=te(te({},Dl),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Ot.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Ot.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Ot.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Ot.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},GM=class extends KM{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new QM(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)}},QM=class extends WM{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,te(te({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,te(te({},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 YM(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}
270,YM=class extends qM{constructor(e,t,n,r,s){super(e,t,s),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,te(te({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,te(te({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,te(te({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,te(te({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,te(te({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},JM=class extends zM{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new VM(this.url,this.headers,e,this.fetch)}get vectors(){return new GM(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new HM(this.url+"/iceberg",this.headers,this.fetch)}};const LE="2.105.4",_i=30*1e3,im=3,zh=im*_i,XM="http://localhost:9999",ZM="supabase.auth.token",e$={"X-Client-Info":`gotrue-js/${LE}`},om="X-Supabase-Api-Version",DE={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},t$=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,n$=10*60*1e3;class pl extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function U(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class r$ extends pl{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function s$(e){return U(e)&&e.name==="AuthApiError"}class yn extends pl{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class mr extends pl{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class Ke extends mr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function bc(e){return U(e)&&e.name==="AuthSessionMissingError"}class mi extends mr{constructor(){super("Auth session or user missing","AuthInvalidToken
270ResponseError",500,void 0)}}class xc extends mr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Sc extends mr{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function i$(e){return U(e)&&e.name==="AuthImplicitGrantRedirectError"}class dw extends mr{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class o$ extends mr{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class am extends mr{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Hh(e){return U(e)&&e.name==="AuthRetryableFetchError"}class hw extends mr{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class lm extends mr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const qu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),fw=` 	
271\r=`.split(""),a$=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<fw.length;t+=1)e[fw[t].charCodeAt(0)]=-2;for(let t=0;t<qu.length;t+=1)e[qu[t].charCodeAt(0)]=t;return e})();function pw(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(qu[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(qu[r]),t.queuedBits-=6}}function ME(e,t,n){const r=a$[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function mw(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{u$(o,r,n)};for(let o=0;o<e.length;o+=1)ME(e.charCodeAt(o),s,i);return t.join("")}function l$(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function c$(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}l$(r,t)}}function u$(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function to(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)ME(e.charCodeAt(s),n,r);return new Uint8Array(t)}function d$(e){const t=[];return c$(e,n=>t.push(n)),new Uint8Array(t)}function Ps(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>pw(s,n,r)),pw(null,n,r),t.join("")}function h$(e){return Math.round(Date.now()/1e3)+e}function f$(){return Symbol("auth-callback")}const Xe=()=>typeof window<"u"&&typeof document<"u",vs={tested:!1,writable:!1},$E=()=>{if(!Xe())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(vs.tested)return vs.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),vs.tested=!0,vs.writable=!0}catch{vs.tested=!0,vs.writable=!1}return vs.writable};function p$(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
271h((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const FE=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),m$=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Ei=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},ws=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Je=async(e,t)=>{await e.removeItem(t)};class Vd{constructor(){this.promise=new Vd.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Vd.promiseConstructor=Promise;function _c(e){const t=e.split(".");if(t.length!==3)throw new lm("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!t$.test(t[r]))throw new lm("JWT not in base64url format");return{header:JSON.parse(mw(t[0])),payload:JSON.parse(mw(t[1])),signature:to(t[2]),raw:{header:t[0],payload:t[1]}}}async function g$(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function y$(e,t){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){r(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function v$(e){return("0"+e.toString(16)).substr(-2)}function w$(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,v$).join("")}async function b$(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function x$(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await b$(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function gi(e,t,n=!1){const r=w$();let s=r;n&&(s+="/recovery"),await Ei(e,`${t}-code-verifier`,s);const i=await x$(r);return[i,r===i?"plain":"s256"]}const S$=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function _$(e){const t=e.headers.get(om);if(!t||!t.match(S$))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function E$(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function T$(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const k$=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Yn(e){if(!k$.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function cn(e){if(!e.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Wh(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function C$(e,t){return new Proxy(e,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;
271if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,s)}})}function gw(e){return JSON.parse(JSON.stringify(e))}const _s=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},A$=[502,503,504,520,521,522,523,524,530];async function yw(e){var t;if(!m$(e))throw new am(_s(e),0);if(A$.includes(e.status))throw new am(_s(e),e.status);let n;try{n=await e.json()}catch(i){throw new yn(_s(i),i)}let r;const s=_$(e);if(s&&s.getTime()>=DE["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new hw(_s(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new Ke}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new hw(_s(n),e.status,n.weak_password.reasons);throw new r$(_s(n),e.status||500,r)}const R$=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function G(e,t,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[om]||(i[om]=DE["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await P$(e,t,n+a,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function P$(e,t,n,r,s,i){const o=R$(t,r,s,i);let a;try{a=await e(n,Object.assign({},o))}catch(l){throw console.error(l),new am(_s(l),0)}if(a.ok||await yw(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await yw(l)}}function Bt(e){var t;let n=null;N$(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=h$(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function vw(e){const t=Bt(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Nr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function j$(e){return{data:e,error:null}}function O$(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,o=$d(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function ww(e){return e}function N$(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const qh=["global","local","others"];class I${constructor({url:t="",headers:n={},fetch:r,experimental:s}){this.url=t,this.headers=n,this.fetch=FE(r),this.experimental=s??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(t,n=qh[0]){if(qh.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${qh.join(", ")}`);try{return await G(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(U(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await G(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Nr})}catch(r){if(U(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=$d(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await G(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:O$,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(U(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await G(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Nr})}catch(n){if(U(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await G(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:ww});if(u.error)throw u.error;const d=await u.json(),p=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>
2710&&(h.forEach(v=>{const g=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(v.split(";")[1].split("=")[1]);c[`${x}Page`]=g}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(U(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){Yn(t);try{return await G(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Nr})}catch(n){if(U(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){Yn(t);try{return await G(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Nr})}catch(r){if(U(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){Yn(t);try{return await G(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Nr})}catch(r){if(U(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){Yn(t.userId);try{const{data:n,error:r}=await G(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(U(n))return{data:null,error:n};throw n}}async _deleteFactor(t){Yn(t.userId),Yn(t.id);try{return{data:await G(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(U(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await G(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:ww});if(u.error)throw u.error;const d=await u.json(),p=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(v=>{const g=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(v.split(";")[1].split("=")[1]);c[`${x}Page`]=g}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(U(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(t){try{return await G(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await G(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await G(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(U(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await G(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(U(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await G(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t!=null&&t.type&&(n.type=t.type),await G(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var s;return{data:{providers:(s=r==null?void 0:r.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(n){if(U(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await G(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await G(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await G(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(U(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(t){try{return await G(this.fetch,"DELET
271E",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(U(n))return{data:null,error:n};throw n}}async _adminListPasskeys(t){cn(this.experimental),Yn(t.userId);try{return await G(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(t){cn(this.experimental),Yn(t.userId),Yn(t.passkeyId);try{return await G(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(U(n))return{data:null,error:n};throw n}}}function bw(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const An={debug:!!(globalThis&&$E()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class UE extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class xw extends UE{}async function L$(e,t,n){An.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{r.abort(),An.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){clearTimeout(s),An.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{An.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw An.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new xw(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(An.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(s),await n()}})}catch(i){if(t>0&&clearTimeout(s),i!==null&&typeof i=="object"&&"name"in i&&i.name==="AbortError"&&t>0){if(r.signal.aborted)return An.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async o=>{if(o){An.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await n()}finally{An.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw An.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new xw(`Lock "${e}" was released because another request stole it`)}throw i}}function D$(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function VE(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function M$(e){return parseInt(e,16)}function $$(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function F$(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:c,scheme:u,uri:d,version:p}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(p!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${p}`);
271if(!((t=e.statement)===null||t===void 0)&&t.includes(`
272`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=VE(e.address),v=u?`${u}://${r}`:r,g=e.statement?`${e.statement}
273`:"",x=`${v} wants you to sign in with your Ethereum account:
274${h}
275
276${g}`;let y=`URI: ${d}
277Version: ${p}
278Chain ID: ${n}${o?`
279Nonce: ${o}`:""}
280Issued At: ${i.toISOString()}`;if(s&&(y+=`
281Expiration Time: ${s.toISOString()}`),a&&(y+=`
282Not Before: ${a.toISOString()}`),l&&(y+=`
283Request ID: ${l}`),c){let b=`
284Resources:`;for(const w of c){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);b+=`
285- ${w}`}y+=b}return`${x}
286${y}`}class Fe extends Error{constructor({message:t,code:n,cause:r,name:s}){var i;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Ku extends Fe{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function U$({error:e,options:t}){var n,r,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Fe({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Fe({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Fe({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Fe({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 Fe({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Fe({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Fe({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Fe({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(BE(o)){if(i.rp.id!==o)return new Fe({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Fe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Fe({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 Fe({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 Fe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function V$({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Fe({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Fe({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(BE(r)){if(n.rpId!==r)return new Fe({message:`The RP ID "${n.rpId}
286" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Fe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Fe({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 Fe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class B${createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const cm=new B$;function Sw(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,s=$d(e,["challenge","user","excludeCredentials"]),i=to(t).buffer,o=Object.assign(Object.assign({},n),{id:to(n.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(r&&r.length>0){a.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const c=r[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:to(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function _w(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=$d(e,["challenge","allowCredentials"]),s=to(t).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const a=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:to(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function Ew(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:Ps(new Uint8Array(e.response.attestationObject)),clientDataJSON:Ps(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Tw(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Ps(new Uint8Array(s.authenticatorData)),clientDataJSON:Ps(new Uint8Array(s.clientDataJSON)),signature:Ps(new Uint8Array(s.signature)),userHandle:s.userHandle?Ps(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function BE(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Gu(){var e,t;return!!(Xe()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function zE(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Ku("Browser returned unexpected credential type",t)}:{data:null,error:new Ku("Empty credential response",t)}}catch(t){return{data:null,error:U$({error:t,options:e})}}}async function HE(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Ku("Browser returned unexpected credential type",t)}:{data:null,error:new Ku("Empty credential response",t)}}
286catch(t){return{data:null,error:V$({error:t,options:e})}}}const z$={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},H$={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Qu(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(t(o)){const a=r[i];t(a)?r[i]=Qu(a,o):r[i]=Qu(o)}else r[i]=o}return r}function W$(e,t){return Qu(z$,e,t||{})}function q$(e,t){return Qu(H$,e,t||{})}class K${constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!a)return{data:null,error:l};const c=s??cm.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;if(!u.name){const d=r;if(d)u.name=`${u.id}:${d}`;else{const h=(await this.client.getUser()).data.user,v=((o=h==null?void 0:h.user_metadata)===null||o===void 0?void 0:o.name)||(h==null?void 0:h.email)||(h==null?void 0:h.id)||"User";u.name=`${u.id}:${v}`}}u.displayName||(u.displayName=u.name)}switch(a.webauthn.type){case"create":{const u=W$(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:p}=await zE({publicKey:u,signal:c});return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:p}}case"request":{const u=q$(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:p}=await HE(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:p}}}}catch(a){return U(a)?{data:null,error:a}:{data:null,error:new yn("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new pl("rpId is required for WebAuthn authentication")};try{if(!Gu())return{data:null,error:new yn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(o){return U(o)?{data:null,error:o}:{data:null,error:new yn("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new pl("rpId is required for WebAuthn registration")};try{if(!Gu())return{data:null,error:new yn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(u=>{var d;return(d=u.data)===null||d===void 0?void 0:d.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===t&&p.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(o){return U(o)?{data:null,error:o}:{data:null,error:new yn("Unexpected error in register",o)}}}}D$();const G$={url:XM,storageKey:ZM,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:e$,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function kw(e,t,n){return await n()}const yi={};class ml{get jwks(){var t,n;return(n=(t=yi[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){yi[this.storageKey]=Object.assign(Object.assign({},yi[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=yi[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){yi[this.storageKey]=Object.assign(Object.assign({},yi[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,s,i;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},G$),t);if(this.storageKey=o.storageKey,this.instanceID=(n=ml.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,ml.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>
2860&&Xe()){const a=`${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(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.experimental=(r=o.experimental)!==null&&r!==void 0?r:{},this.admin=new I$({url:o.url,headers:o.headers,fetch:o.fetch,experimental:this.experimental}),this.url=o.url,this.headers=o.headers,this.fetch=FE(o.fetch),this.lock=o.lock||kw,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&Xe()&&(!((s=globalThis==null?void 0:globalThis.navigator)===null||s===void 0)&&s.locks)?this.lock=L$:this.lock=kw,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new K$(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.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?(o.storage?this.storage=o.storage:$E()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=bw(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=bw(this.memoryStorage)),Xe()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a);try{await this._notifyAllSubscribers(a.data.event,a.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}o.skipAutoInitialize||this.initialize().catch(a=>{this._debug("#initialize()","error",a)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${LE}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(Xe()&&(n=p$(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),Xe()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),i$(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return U(n)?this._returnResult({error:n}):this._returnResult({error:new yn("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const i=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Bt}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(U(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var n,r,s;try{let i;if("email"in t){const{email:u,password:d,options:p}=t;let h=null,v=null;this.flowType==="pkce"&&([h,v]=await gi(this.storage,this.storageKey)),i=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:u,password:d,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:h,code_challenge_method:v},xform:Bt})}else if("phone"in t){const{phone:u,password:d,options:p}=t;i=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:d,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},channel:(s=p==null?void 0:p.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:Bt})}else throw new xc("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await Je(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(await Je(this.storage,`${this.storageKey}-code-verifier`),U(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let n;if("email"in t){const{email:i,password:o,options:a}=t;n=await G(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:vw})}else if("phone"in t){const{phone:i,password:o,options:a}=t;n=await G(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:vw})}else throw new xc("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const i=new mi;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(U(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,s,i,o,a,l,c,u,d,p;let h,v;if("message"in t)h=t.message,v=t.signature;else{const{chain:g,wallet:x,statement:y,options:b}=t;let w;if(Xe())if(typeof x=="object")w=x;else{const O=window;if("ethereum"in O&&typeof O.ethereum=="object"&&"request"in O.ethereum&&typeof O.ethereum.request=="function")w=O.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=x}const S=new URL((n=b==null?void 0:b.url)!==null&&n!==void 0?n:window.location.href),_=await w.request({method:"eth_requestAccounts"}).then(O=>O).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!_||_.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const E=VE(_[0]);let T=(r=b==null?void 0:b.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!T){const O=await w.request({method:"eth_chainId"});T=M$(O)}const C={domain:S.host,address:E,statement:y,uri:S.href,version:"1",chainId:T,nonce:(s=b==null?void 0:b.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=b==null?void 0:b.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=b==null?void 0:b.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=b==null?void 0:b.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=b==null?void 0:b.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=b==null?void 0:b.signInWithEthereum)===null||u===void 0?void 0:u.resources};h=F$(C),v=await w.request({method:"personal_sign",params:[$$(h),E]})}try{const{data:g,error:x}=await G(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:v},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Bt});if(x)throw x;if(!g||!g.session||!g.user){const y=new mi;return this._returnResult({data:{user:null,session:null},error:y})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:x})}catch(g){if(U(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async signInWithSolana(t){var n,r,s,i,o,a,l,c,u,d,p,h;let v,g;if("message"in t)v=t.message,g=t.signature;else{const{chain:x,wallet:y,statement:b,options:w}=t;let S;if(Xe())if(typeof y=="object")S=y;else{const 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 new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=y}const _=new URL((n=w==null?void 0:w.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const E=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:_.host,uri:_.href}),b?{statement:b}:null));let T;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")T=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)T=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in T&&"signature"in T&&(typeof T.signedMessage=="string"||T.signedMessage instanceof Uint8Array)&&T.signature instanceof Uint8Array)v=typeof T.signedMessage=="string"?T.signedMessage:new TextDecoder().decode(T.signedMessage),g=T.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");v=[`${_.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...b?["",b,""]:[""],"Version: 1",`URI: ${_.href}`,`Issued At: ${(s=(r=w==null?void 0:w.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((d=(u=w==null?void 0:w.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||d===void 0)&&d.length?["Resources",...w.sign
286InWithSolana.resources.map(T=>`- ${T}`)]:[]].join(`
287`);const E=await S.signMessage(new TextEncoder().encode(v),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");g=E}}try{const{data:x,error:y}=await G(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:v,signature:Ps(g)},!((p=t.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Bt});if(y)throw y;if(!x||!x.session||!x.user){const b=new mi;return this._returnResult({data:{user:null,session:null},error:b})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:y})}catch(x){if(U(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(t){const n=await ws(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new o$;const{data:i,error:o}=await G(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Bt});if(await Je(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new mi;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers(s==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await Je(this.storage,`${this.storageKey}-code-verifier`),U(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=t,a=await G(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Bt}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new mi;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(n){if(U(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,i,o;try{if("email"in t){const{email:a,options:l}=t;let c=null,u=null;this.flowType==="pkce"&&([c,u]=await gi(this.storage,this.storageKey));const{error:d}=await G(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:a,options:l}=t,{data:c,error:u}=await G(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new xc("You must provide either an email or phone number.")}catch(a){if(await Je(this.storage,`${this.storageKey}-code-verifier`),U(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var n,r;try{let s,i;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,i=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await G(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Bt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(U(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await gi(this.storage,this.storageKey));const c=await G(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:j$});return!((i=c.data)===null||i===void 0)&&i.url&&Xe()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await Je(this.storage,`${this.storageKey}-code-verifier`),U(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new Ke;const{error:s}=await G(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(U(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:i}=t,{error:o}=await G(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:r,type:s,options:i}=t,{data:o,error:a}=await G(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new xc("You must provide either an email or phone number and a type")}catch(n){if(U(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await ws(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
287id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<zh:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await ws(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Wh()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=C$(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await G(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Nr}):await this._useSession(async n=>{var r,s,i;const{data:o,error:a}=n;if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Ke}:await G(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:Nr})})}catch(n){if(U(n))return bc(n)&&(await this._removeSession(),await Je(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new Ke;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await gi(this.storage,this.storageKey));const{data:c,error:u}=await G(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:Nr});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(r){if(await Je(this.storage,`${this.storageKey}-code-verifier`),U(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Ke;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=_c(t.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if(U(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:a}=n;if(a)throw a;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new Ke;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(U(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){var r;try{if(!Xe())throw new Sc("No browser detected.");
287if(t.error||t.error_description||t.error_code)throw new Sc(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new dw("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Sc("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new dw("No code detected.");const{data:w,error:S}=await this._exchangeCodeForSession(t.code);if(S)throw S;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:w.session,redirectType:(r=w.redirectType)!==null&&r!==void 0?r:null},error:null}}const{provider_token:s,provider_refresh_token:i,access_token:o,refresh_token:a,expires_in:l,expires_at:c,token_type:u}=t;if(!o||!l||!a||!u)throw new Sc("No session defined in URL");const d=Math.round(Date.now()/1e3),p=parseInt(l);let h=d+p;c&&(h=parseInt(c));const v=h-d;v*1e3<=_i&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${v}s, should have been closer to ${p}s`);const g=h-p;d-g>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",g,h,d):d-g<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",g,h,d);const{data:x,error:y}=await this._getUser(o);if(y)throw y;const b={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:p,expires_at:h,refresh_token:a,token_type:u,user:x.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:b,redirectType:t.type},error:null})}catch(s){if(U(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await ws(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i&&!bc(i))return this._returnResult({error:i});const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(s$(a)&&(a.status===404||a.status===401||a.status===403)||bc(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Je(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=f$(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),bc(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await gi(this.storage,this.storageKey,!0));try{return await G(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(await Je(this.storage,`${this.storageKey}-code-verifier`),U(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,a,l,c,u;const{data:d,error:p}=i;if(p)throw p;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await G(this.fetch,"GET",h,{headers:this.headers,jwt:(u=(c=d.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return Xe()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(U(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;
287if(s)throw s;const{options:o,provider:a,token:l,access_token:c,nonce:u}=t,d=await G(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:a,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Bt}),{data:p,error:h}=d;return h?this._returnResult({data:{user:null,session:null},error:h}):!p||!p.session||!p.user?this._returnResult({data:{user:null,session:null},error:new mi}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:h}))}catch(s){if(await Je(this.storage,`${this.storageKey}-code-verifier`),U(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await G(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await y$(async s=>(s>0&&await g$(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await G(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Bt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Hh(i)&&Date.now()+o-r<_i})}catch(r){if(this._debug(n,"error",r),U(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),Xe()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await ws(this.storage,this.storageKey);if(s&&this.userStorage){let o=await ws(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Ei(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Wh()}else if(s&&!s.user&&!s.user){const o=await ws(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Je(this.storage,this.storageKey+"-user"),await Ei(this.storage,this.storageKey,s)):s.user=Wh()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<zh;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${zh}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Hh(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new Ke;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Vd;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new Ke;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),U(i)){const o={data:null,error:i};return Hh(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,n)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Je(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await Ei(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=gw(s);await Ei(this.storage,this.storageKey,i)}else{const s=gw(n);await Ei(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Je(this.storage,this.storageKey),await Je(this.storage,this.storageKey+"-code-verifier"),await Je(this.storage,this.storageKey+"-user"),this.userStorage&&await Je(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Xe()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
287catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),_i);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/_i);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${_i}ms, refresh threshold is ${im} ticks`),s<=im&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof UE)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Xe()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,o]=await gi(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await G(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:c}=await G(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?Ew(t.webauthn.credential_response):Tw(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await G(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=await G(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Sw(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:_w(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,s,i;if(t)try{const{payload:h}=_c(t);let v=null;h.aal&&(v=h.aal);let g=v;const{data:{user:x},error:y}=await this.getUser(t);if(y)return this._returnResult({data:null,error:y});((r=(n=x==null?void 0:x.factors)===null||n===void 0?void 0:n.filter(S=>S.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(g="aal2");const w=h.amr||[];return{data:{currentLevel:v,nextLevel:g,currentAuthenticationMethods:w},error:null}}catch(h){if(U(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:o},error:a}
287=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=_c(o.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(h=>h.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(u="aal2");const p=l.amr||[];return{data:{currentLevel:c,nextLevel:u,currentAuthenticationMethods:p},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await G(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Ke})})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Ke});const o=await G(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Xe()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Ke});const o=await G(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Xe()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await G(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Ke})})}catch(t){if(U(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await G(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Ke})})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(a=>a.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===t),r&&this.jwks_cached_at+n$>s)return r;const{data:i,error:o}=await G(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(a=>a.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:h,error:v}
287=await this.getSession();if(v||!h.session)return this._returnResult({data:null,error:v});r=h.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=_c(r);n!=null&&n.allowExpired||E$(i.exp);const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!c){const{error:h}=await this.getUser(r);if(h)throw h;return{data:{claims:i,header:s,signature:o},error:null}}const u=T$(s.alg),d=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,d,o,d$(`${a}.${l}`)))throw new lm("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async signInWithPasskey(t){var n,r,s;cn(this.experimental);try{if(!Gu())return this._returnResult({data:null,error:new yn("Browser does not support WebAuthn",null)});const{data:i,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.captchaToken}});if(o||!i)return this._returnResult({data:null,error:o});const a=_w(i.options),l=(s=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.signal)!==null&&s!==void 0?s:cm.createNewAbortSignal(),{data:c,error:u}=await HE({publicKey:a,signal:l});if(u||!c)return this._returnResult({data:null,error:u??new yn("WebAuthn ceremony failed",null)});const d=Tw(c);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:d})}catch(i){if(U(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(t){var n,r;cn(this.experimental);try{if(!Gu())return this._returnResult({data:null,error:new yn("Browser does not support WebAuthn",null)});const{data:s,error:i}=await this._startPasskeyRegistration();if(i||!s)return this._returnResult({data:null,error:i});const o=Sw(s.options),a=(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.signal)!==null&&r!==void 0?r:cm.createNewAbortSignal(),{data:l,error:c}=await zE({publicKey:o,signal:a});if(c||!l)return this._returnResult({data:null,error:c??new yn("WebAuthn ceremony failed",null)});const u=Ew(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:u})}catch(s){if(U(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){cn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new Ke});const{data:s,error:i}=await G(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if(U(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){cn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new Ke});const{data:i,error:o}=await G(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:r.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(t){var n;cn(this.experimental);try{const{data:r,error:s}=await G(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:r,error:null})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async _verifyPasskeyAuthentication(t){cn(this.experimental);try{const{data:n,error:r}=await G(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:Bt});return r?this._returnResult({data:null,error:r}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){cn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new Ke});const{data:s,error:i}=await G(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if(U(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){cn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new Ke});const{data:i,error:o}=await G(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:r.access_token,body:{friendly_name:t.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(t){cn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new Ke});const{error:i}
287=await G(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:r.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}}ml.nextInstanceID={};const Q$=ml,Y$="2.105.4";let ga="";typeof Deno<"u"?ga="deno":typeof document<"u"?ga="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ga="react-native":ga="node";const J$={"X-Client-Info":`supabase-js-${ga}/${Y$}`},X$={headers:J$},Z$={schema:"public"},eF={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},tF={};function gl(e){"@babel/helpers - typeof";return gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gl(e)}function nF(e,t){if(gl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(gl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rF(e){var t=nF(e,"string");return gl(t)=="symbol"?t:t+""}function sF(e,t,n){return(t=rF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ie(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cw(Object(n),!0).forEach(function(r){sF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const iF=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),oF=()=>Headers,aF=(e,t,n)=>{const r=iF(n),s=oF();return async(i,o)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let c=new s(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),r(i,Ie(Ie({},o),{},{headers:c}))}};function lF(e){return e.endsWith("/")?e:e+"/"}function cF(e,t){var n,r;const{db:s,auth:i,realtime:o,global:a}=e,{db:l,auth:c,realtime:u,global:d}=t,p={db:Ie(Ie({},l),s),auth:Ie(Ie({},c),i),realtime:Ie(Ie({},u),o),storage:{},global:Ie(Ie(Ie({},d),a),{},{headers:Ie(Ie({},(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?p.accessToken=e.accessToken:delete p.accessToken,p}function uF(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(lF(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var dF=class extends Q${constructor(e){super(e)}},hF=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const i=uF(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:Z$,realtime:tF,auth:Ie(Ie({},eF),{},{storageKey:o}),global:X$},l=cF(n??{},a);if(this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(u,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=aF(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Ie({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new $D(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new JM(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new AD(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
287channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:c,experimental:u,lockAcquireTimeout:d,skipAutoInitialize:p},h,v){const g={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new dF({url:this.authUrl.href,headers:Ie(Ie({},g),h),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,experimental:u,fetch:v,lockAcquireTimeout:d,skipAutoInitialize:p,hasCustomAuthorizationHeader:Object.keys(this.headers).some(x=>x.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new bM(this.realtimeUrl.href,Ie(Ie({},e),{},{params:Ie(Ie({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const fF=(e,t,n)=>new hF(e,t,n);function pF(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}pF()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function mF(){var x,y;if(typeof window>"u")return;const e=location.hostname,n=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(b=>e===b||e.endsWith("."+b)),r="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=n?((x=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+r+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:x[1])??((y=e.match(new RegExp("^("+r+")(?=[.-])","i")))==null?void 0:y[1]):void 0,i=window.parent&&window.parent!==window;if(!s||!i)return localStorage;const o=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),a=o?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),c=l&&a.test(l)?[l]:o?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],u="lovable-preview-auth:result",d=2e3,p=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),h=(b,w,S)=>new Promise(_=>{const E=p();let T=!1,C;const O=I=>{T||(T=!0,clearTimeout(C),window.removeEventListener("message",A),_(I))},A=I=>{if(c.indexOf(I.origin)<0)return;const Q=I.data;Q&&Q.type===u&&Q.requestId===E&&O(Q)};window.addEventListener("message",A);const M={type:b,requestId:E,projectId:s,key:w};S!==void 0&&(M.value=S);for(const I of c)window.parent.postMessage(M,I);C=setTimeout(()=>O(null),d)});let v=!0;const g=250;return{getItem:async b=>{let w=await h("lovable-preview-auth:get",b);return!w&&v&&(await new Promise(S=>setTimeout(S,g)),w=await h("lovable-preview-auth:get",b)),v=!1,w&&w.ok&&typeof w.value=="string"?w.value===""?(localStorage.removeItem(b),null):w.value:localStorage.getItem(b)},setItem:(b,w)=>(localStorage.setItem(b,w),h("lovable-preview-auth:set",b,w).then(()=>{})),removeItem:b=>(localStorage.removeItem(b),h("lovable-preview-auth:remove",b).then(()=>{}))}}const gF="https://fwjeqhywrglihflwhsta.supabase.co",yF="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZ3amVxaHl3cmdsaWhmbHdoc3RhIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzg1NjY5NjcsImV4cCI6MjA5NDE0Mjk2N30.TGXg7qxrDvfSXisGDYeiuzfE64kDF_2jSiSdjThmosw",De=fF(gF,yF,{auth:{storage:mF(),persistSession:!0,autoRefreshToken:!0}}),vF={id:1,brand_name:"Royal Coating Egypt",tagline:"Engineered to Last. Made to Lead.",logo_url:null,favicon_url:null,phone:"+20 100 700 7550",phone_tel:"+201007007550",email:"[email protected]",whatsapp_number:"201007007550",address_line1:"6th Industrial Zone, Plot 73",address_line2:"October City, Giza, Egypt",address_full:"Extension of sixth, 6th of October City (2), Giza Governorate 3222205, Egypt",map_embed_url:null,map_link:null,business_hours:"Sun–Thu, 9:00–17:00 (GMT+2)",facebook_url:null,instagram_url:null,linkedin_url:null,youtube_url:null,banner_enabled:!1,banner_text:null,banner_link:null,banner_bg_color:"#c8102e",banner_text_color:"#ffffff"},Bd=()=>qe({queryKey:["site_settings"],queryFn:async()=>{const{data:e,error:t}=await De.from("site_settings").select("*").eq("id",1).maybeSingle();if(t)throw t;return e??vF},staleTime:6e4});var Aw=1,wF=.9,bF=.8,xF=.17,Kh=.1,Gh=.999,SF=.9999,_F=.99,EF=/[\\\/_+.#"@\[\(\{&]/,TF=/[\\\/_+.#"@\[\(\{&]/g,kF=/[\s-]/,WE=/[\s-]/g;function um(e,t,n,r,s,i,o){if(i===t.length)return s===e.length?Aw:_F;var a=`${s},${i}`;if(o[a]!==void 0)return o[a];for(var l=r.charAt(i),c=n.indexOf(l,s),u=0,d,p,h,v;c>=0;)d=um(e,t,n,r,c+1,i+1,o),d>u&&(c===s?d*=Aw:EF.test(e.charAt(c-1))?(d*=bF,h=e.slice(s,c-1).match(TF),h&&s>0&&(d*=Math.pow(Gh,h.length))):kF.test(e.charAt(c-1))?(d*=wF,v=e.slice(s,c-1).match(WE),v&&s>0&&(d*=Math.pow(Gh,v.length))):(d*=xF,s>0&&(d*=Math.pow(Gh,c-s))),e.charAt(c)!==t.charAt(i)&&(d*=SF)),(d<Kh&&n.charAt(c-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(c-1)!==r.charAt(i))&&(p=um(e,t,n,r,c+1,i+2,o),p*Kh>d&&(d=p*Kh)),d>u&&(u=d),c=n.indexOf(l,c+1);return o[a]=u,u}function Rw(e){return e.toLowerCase().replace(WE," ")}
vendor: 5,239 bytes, line 287
287function CF(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,um(e,t,Rw(e),Rw(t),0,0,{})}var Qh="focusScope.autoFocusOnMount",Yh="focusScope.autoFocusOnUnmount",Pw={bubbles:!1,cancelable:!0},AF="FocusScope",qE=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,l]=m.useState(null),c=_n(s),u=_n(i),d=m.useRef(null),p=Ye(t,g=>l(g)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let g=function(w){if(h.paused||!a)return;const S=w.target;a.contains(S)?d.current=S:Tr(d.current,{select:!0})},x=function(w){if(h.paused||!a)return;const S=w.relatedTarget;S!==null&&(a.contains(S)||Tr(d.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const _ of w)_.removedNodes.length>0&&Tr(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const b=new MutationObserver(y);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),b.disconnect()}}},[r,a,h.paused]),m.useEffect(()=>{if(a){Ow.add(h);const g=document.activeElement;if(!a.contains(g)){const y=new CustomEvent(Qh,Pw);a.addEventListener(Qh,c),a.dispatchEvent(y),y.defaultPrevented||(RF(IF(KE(a)),{select:!0}),document.activeElement===g&&Tr(a))}return()=>{a.removeEventListener(Qh,c),setTimeout(()=>{const y=new CustomEvent(Yh,Pw);a.addEventListener(Yh,u),a.dispatchEvent(y),y.defaultPrevented||Tr(g??document.body,{select:!0}),a.removeEventListener(Yh,u),Ow.remove(h)},0)}}},[a,c,u,h]);const v=m.useCallback(g=>{if(!n&&!r||h.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(x&&y){const b=g.currentTarget,[w,S]=PF(b);w&&S?!g.shiftKey&&y===S?(g.preventDefault(),n&&Tr(w,{select:!0})):g.shiftKey&&y===w&&(g.preventDefault(),n&&Tr(S,{select:!0})):y===b&&g.preventDefault()}},[n,r,h.paused]);return f.jsx(le.div,{tabIndex:-1,...o,ref:p,onKeyDown:v})});qE.displayName=AF;function RF(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Tr(r,{select:t}),document.activeElement!==n)return}function PF(e){const t=KE(e),n=jw(t,e),r=jw(t.reverse(),e);return[n,r]}function KE(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function jw(e,t){for(const n of e)if(!jF(n,{upTo:t}))return n}function jF(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function OF(e){return e instanceof HTMLInputElement&&"select"in e}function Tr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&OF(e)&&t&&e.select()}}var Ow=NF();function NF(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Nw(e,t),e.unshift(t)},remove(t){var n;e=Nw(e,t),(n=e[0])==null||n.resume()}}}function Nw(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function IF(e){return e.filter(t=>t.tagName!=="A")}var Jh=0;function LF(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Iw()),document.body.insertAdjacentElement("beforeend",e[1]??Iw()),Jh++,()=>{Jh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Jh--}},[])}function Iw(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ir=function(){return Ir=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ir.apply(this,arguments)};function DF(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function MF(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Zc="right-scroll-bar-position",eu="width-before-scroll-bar",$F="with-scroll-bars-hidden",FF="--removed-body-scroll-bar-size";function Xh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function UF(e,t){var n=m.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var VF=typeof window<"u"?m.useLayoutEffect:m.useEffect,Lw=new WeakMap;function BF(e,t){var n=UF(null,function(r){return e.forEach(function(s){return Xh(s,r)})});return VF(function(){var r=Lw.get(n);if(r){var s=new Set(r),i=new Set(e),o=n.current;
vendor: 4,745 bytes, lines 287-302
287s.forEach(function(a){i.has(a)||Xh(a,null)}),i.forEach(function(a){s.has(a)||Xh(a,o)})}Lw.set(n,e)},[e]),n}var Yu=function(){return Yu=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Yu.apply(this,arguments)};function zF(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function HF(e){return e}function WF(e,t){t===void 0&&(t=HF);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var o=t(i,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(i),o=n}var l=function(){var u=o;o=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),n}}}};return s}function qF(e){e===void 0&&(e={});var t=WF(null);return t.options=Yu({async:!0,ssr:!1},e),t}var GE=function(e){var t=e.sideCar,n=zF(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return m.createElement(r,Yu({},n))};GE.isSideCarExport=!0;function KF(e,t){return e.useMedium(t),GE}var QE=qF(),Zh=function(){},zd=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:Zh,onWheelCapture:Zh,onTouchMoveCapture:Zh}),s=r[0],i=r[1],o=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,p=e.sideCar,h=e.noRelative,v=e.noIsolation,g=e.inert,x=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,w=e.gapMode,S=DF(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=p,E=BF([n,t]),T=Ir(Ir({},S),s);return m.createElement(m.Fragment,null,u&&m.createElement(_,{sideCar:QE,removeScrollBar:c,shards:d,noRelative:h,noIsolation:v,inert:g,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:w}),o?m.cloneElement(m.Children.only(a),Ir(Ir({},T),{ref:E})):m.createElement(b,Ir({},T,{className:l,ref:E}),a))});zd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};zd.classNames={fullWidth:eu,zeroRight:Zc};var GF=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function QF(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=GF();return t&&e.setAttribute("nonce",t),e}function YF(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function JF(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var XF=function(){var e=0,t=null;return{add:function(n){e==0&&(t=QF())&&(YF(t,n),JF(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ZF=function(){var e=XF();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},YE=function(){var e=ZF(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},eU={left:0,top:0,right:0,gap:0},ef=function(e){return parseInt(e||"",10)||0},tU=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[ef(n),ef(r),ef(s)]},nU=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return eU;var t=tU(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},rU=YE(),no="data-scroll-locked",sU=function(e,t,n,r){var s=e.left,i=e.top,o=e.right,a=e.gap;return n===void 0&&(n="margin"),`
288  .`.concat($F,` {
289   overflow: hidden `).concat(r,`;
290   padding-right: `).concat(a,"px ").concat(r,`;
291  }
292  body[`).concat(no,`] {
293    overflow: hidden `).concat(r,`;
294    overscroll-behavior: contain;
295    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
296    padding-left: `.concat(s,`px;
297    padding-top: `).concat(i,`px;
298    padding-right: `).concat(o,`px;
299    margin-left:0;
300    margin-top:0;
301    margin-right: `).concat(a,"px ").concat(r,`;
302    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";
302")].filter(Boolean).join(""),`
303  }
304  
305  .`).concat(Zc,` {
306    right: `).concat(a,"px ").concat(r,`;
307  }
308  
309  .`).concat(eu,` {
310    margin-right: `).concat(a,"px ").concat(r,`;
311  }
312  
313  .`).concat(Zc," .").concat(Zc,` {
314    right: 0 `).concat(r,`;
315  }
316  
317  .`).concat(eu," .").concat(eu,` {
318    margin-right: 0 `).concat(r,`;
319  }
320  
321  body[`).concat(no,`] {
322    `).concat(FF,": ").concat(a,`px;
323  }
324`)},Dw=function(){var e=parseInt(document.body.getAttribute(no)||"0",10);return isFinite(e)?e:0},iU=function(){m.useEffect(function(){return document.body.setAttribute(no,(Dw()+1).toString()),function(){var e=Dw()-1;e<=0?document.body.removeAttribute(no):document.body.setAttribute(no,e.toString())}},[])},oU=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;iU();var i=m.useMemo(function(){return nU(s)},[s]);return m.createElement(rU,{styles:sU(i,!t,s,n?"":"!important")})},dm=!1;if(typeof window<"u")try{var Ec=Object.defineProperty({},"passive",{get:function(){return dm=!0,!0}});window.addEventListener("test",Ec,Ec),window.removeEventListener("test",Ec,Ec)}catch{dm=!1}var vi=dm?{passive:!1}:!1,aU=function(e){return e.tagName==="TEXTAREA"},JE=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!aU(e)&&n[t]==="visible")},lU=function(e){return JE(e,"overflowY")},cU=function(e){return JE(e,"overflowX")},Mw=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=XE(e,r);if(s){var i=ZE(e,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},uU=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},dU=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},XE=function(e,t){return e==="v"?lU(t):cU(t)},ZE=function(e,t){return e==="v"?uU(t):dU(t)},hU=function(e,t){return e==="h"&&t==="rtl"?-1:1},fU=function(e,t,n,r,s){var i=hU(e,window.getComputedStyle(t).direction),o=i*r,a=n.target,l=t.contains(a),c=!1,u=o>0,d=0,p=0;do{if(!a)break;var h=ZE(e,a),v=h[0],g=h[1],x=h[2],y=g-x-i*v;(v||y)&&XE(e,a)&&(d+=y,p+=v);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&(Math.abs(d)<1||!s)||!u&&(Math.abs(p)<1||!s))&&(c=!0),c},Tc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$w=function(e){return[e.deltaX,e.deltaY]},Fw=function(e){return e&&"current"in e?e.current:e},pU=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mU=function(e){return`
325  .block-interactivity-`.concat(e,` {pointer-events: none;}
326  .allow-interactivity-`).concat(e,` {pointer-events: all;}
327`)},gU=0,wi=[];function yU(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),s=m.useState(gU++)[0],i=m.useState(YE)[0],o=m.useRef(e);m.useEffect(function(){o.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=MF([e.lockRef.current],(e.shards||[]).map(Fw),!0).filter(Boolean);return g.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=m.useCallback(function(g,x){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var y=Tc(g),b=n.current,w="deltaX"in g?g.deltaX:b[0]-y[0],S="deltaY"in g?g.deltaY:b[1]-y[1],_,E=g.target,T=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in g&&T==="h"&&E.type==="range")return!1;var C=Mw(T,E);if(!C)return!0;if(C?_=T:(_=T==="v"?"h":"v",C=Mw(T,E)),!C)return!1;if(!r.current&&"changedTouches"in g&&(w||S)&&(r.current=_),!_)return!0;var O=r.current||_;return fU(O,x,g,O==="h"?w:S,!0)},[]),l=m.useCallback(function(g){var x=g;if(!(!wi.length||wi[wi.length-1]!==i)){var y="deltaY"in x?$w(x):Tc(x),b=t.current.filter(function(_){return _.name===x.type&&(_.target===x.target||x.target===_.shadowParent)&&pU(_.delta,y)})[0];if(b&&b.should){x.cancelable&&x.preventDefault();return}
vendor: 4,333 bytes, line 327
327if(!b){var w=(o.current.shards||[]).map(Fw).filter(Boolean).filter(function(_){return _.contains(x.target)}),S=w.length>0?a(x,w[0]):!o.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),c=m.useCallback(function(g,x,y,b){var w={name:g,delta:x,target:y,should:b,shadowParent:vU(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),u=m.useCallback(function(g){n.current=Tc(g),r.current=void 0},[]),d=m.useCallback(function(g){c(g.type,$w(g),g.target,a(g,e.lockRef.current))},[]),p=m.useCallback(function(g){c(g.type,Tc(g),g.target,a(g,e.lockRef.current))},[]);m.useEffect(function(){return wi.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,vi),document.addEventListener("touchmove",l,vi),document.addEventListener("touchstart",u,vi),function(){wi=wi.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,vi),document.removeEventListener("touchmove",l,vi),document.removeEventListener("touchstart",u,vi)}},[]);var h=e.removeScrollBar,v=e.inert;return m.createElement(m.Fragment,null,v?m.createElement(i,{styles:mU(s)}):null,h?m.createElement(oU,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function vU(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wU=KF(QE,yU);var eT=m.forwardRef(function(e,t){return m.createElement(zd,Ir({},e,{ref:t,sideCar:wU}))});eT.classNames=zd.classNames;var bU=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bi=new WeakMap,kc=new WeakMap,Cc={},tf=0,tT=function(e){return e&&(e.host||tT(e.parentNode))},xU=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=tT(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},SU=function(e,t,n,r){var s=xU(t,Array.isArray(e)?e:[e]);Cc[n]||(Cc[n]=new WeakMap);var i=Cc[n],o=[],a=new Set,l=new Set(s),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};s.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(a.has(p))u(p);else try{var h=p.getAttribute(r),v=h!==null&&h!=="false",g=(bi.get(p)||0)+1,x=(i.get(p)||0)+1;bi.set(p,g),i.set(p,x),o.push(p),g===1&&v&&kc.set(p,!0),x===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return u(t),a.clear(),tf++,function(){o.forEach(function(d){var p=bi.get(d)-1,h=i.get(d)-1;bi.set(d,p),i.set(d,h),p||(kc.has(d)||d.removeAttribute(r),kc.delete(d)),h||d.removeAttribute(n)}),tf--,tf||(bi=new WeakMap,bi=new WeakMap,kc=new WeakMap,Cc={})}},_U=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=bU(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),SU(r,s,n,"aria-hidden")):function(){return null}},Hd="Dialog",[nT,tH]=fs(Hd),[EU,kn]=nT(Hd),rT=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,a=m.useRef(null),l=m.useRef(null),[c,u]=Do({prop:r,defaultProp:s??!1,onChange:i,caller:Hd});return f.jsx(EU,{scope:t,triggerRef:a,contentRef:l,contentId:Jt(),titleId:Jt(),descriptionId:Jt(),open:c,onOpenChange:u,onOpenToggle:m.useCallback(()=>u(d=>!d),[u]),modal:o,children:n})};rT.displayName=Hd;var sT="DialogTrigger",TU=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=kn(sT,n),i=Ye(t,s.triggerRef);return f.jsx(le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":ay(s.open),...r,ref:i,onClick:de(e.onClick,s.onOpenToggle)})});TU.displayName=sT;var iy="DialogPortal",[kU,iT]=nT(iy,{forceMount:void 0}),oT=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,i=kn(iy,t);return f.jsx(kU,{scope:t,forceMount:n,children:m.Children.map(r,o=>f.jsx(ii,{present:n||i.open,children:f.jsx(Ug,{asChild:!0,container:s,children:o})}))})};oT.displayName=iy;var Ju="DialogOverlay",aT=m.forwardRef((e,t)=>{const n=iT(Ju,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=kn(Ju,e.__scopeDialog);return i.modal?f.jsx(ii,{present:r||i.open,children:f.jsx(AU,{...s,ref:t})}):null});aT.displayName=Ju;var CU=il("DialogOverlay.RemoveScroll"),AU=m.forwardRef((e,t)=>
vendor: 14,167 bytes, lines 327-331
327{const{__scopeDialog:n,...r}=e,s=kn(Ju,n);return f.jsx(eT,{as:CU,allowPinchZoom:!0,shards:[s.contentRef],children:f.jsx(le.div,{"data-state":ay(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ti="DialogContent",lT=m.forwardRef((e,t)=>{const n=iT(ti,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=kn(ti,e.__scopeDialog);return f.jsx(ii,{present:r||i.open,children:i.modal?f.jsx(RU,{...s,ref:t}):f.jsx(PU,{...s,ref:t})})});lT.displayName=ti;var RU=m.forwardRef((e,t)=>{const n=kn(ti,e.__scopeDialog),r=m.useRef(null),s=Ye(t,n.contentRef,r);return m.useEffect(()=>{const i=r.current;if(i)return _U(i)},[]),f.jsx(cT,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:de(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:de(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:de(e.onFocusOutside,i=>i.preventDefault())})}),PU=m.forwardRef((e,t)=>{const n=kn(ti,e.__scopeDialog),r=m.useRef(!1),s=m.useRef(!1);return f.jsx(cT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),cT=m.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,a=kn(ti,n),l=m.useRef(null),c=Ye(t,l);return LF(),f.jsxs(f.Fragment,{children:[f.jsx(qE,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:f.jsx(Rd,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":ay(a.open),...o,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),f.jsxs(f.Fragment,{children:[f.jsx(jU,{titleId:a.titleId}),f.jsx(NU,{contentRef:l,descriptionId:a.descriptionId})]})]})}),oy="DialogTitle",uT=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=kn(oy,n);return f.jsx(le.h2,{id:s.titleId,...r,ref:t})});uT.displayName=oy;var dT="DialogDescription",hT=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=kn(dT,n);return f.jsx(le.p,{id:s.descriptionId,...r,ref:t})});hT.displayName=dT;var fT="DialogClose",pT=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=kn(fT,n);return f.jsx(le.button,{type:"button",...r,ref:t,onClick:de(e.onClick,()=>s.onOpenChange(!1))})});pT.displayName=fT;function ay(e){return e?"open":"closed"}var mT="DialogTitleWarning",[nH,gT]=$N(mT,{contentName:ti,titleName:oy,docsSlug:"dialog"}),jU=({titleId:e})=>{const t=gT(mT),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
328
329If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
330
331For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return m.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},OU="DialogDescriptionWarning",NU=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gT(OU).contentName}}.`;return m.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},yT=rT,vT=oT,ly=aT,cy=lT,wT=uT,bT=hT,IU=pT,aa='[cmdk-group=""]',nf='[cmdk-group-items=""]',LU='[cmdk-group-heading=""]',xT='[cmdk-item=""]',Uw=`${xT}:not([aria-disabled="true"])`,hm="cmdk-item-select",Ti="data-value",DU=(e,t,n)=>CF(e,t,n),ST=m.createContext(void 0),Ml=()=>m.useContext(ST),_T=m.createContext(void 0),uy=()=>m.useContext(_T),ET=m.createContext(void 0),TT=m.forwardRef((e,t)=>{let n=ki(()=>{var R,F;return{search:"",value:(F=(R=e.value)!=null?R:e.defaultValue)!=null?F:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=ki(()=>new Set),s=ki(()=>new Map),i=ki(()=>new Map),o=ki(()=>new Set),a=kT(e),{label:l,children:c,value:u,onValueChange:d,filter:p,shouldFilter:h,loop:v,disablePointerSelection:g=!1,vimBindings:x=!0,...y}=e,b=Jt(),w=Jt(),S=Jt(),_=m.useRef(null),E=KU();ni(()=>{if(u!==void 0){let R=u.trim();n.current.value=R,T.emit()}},[u]),ni(()=>{E(6,Q)},[]);let T=m.useMemo(()=>({subscribe:R=>(o.current.add(R),()=>o.current.delete(R)),snapshot:()=>n.current,setState:(R,F,z)=>{var B,se,J,$e;if(!Object.is(n.current[R],F)){if(n.current[R]=F,R==="search")I(),A(),E(1,M);else if(R==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Ee=document.getElementById(S);Ee?Ee.focus():(B=document.getElementById(b))==null||B.focus()}if(E(7,()=>{var Ee;n.current.selectedItemId=(Ee=D())==null?void 0:Ee.id,T.emit()}),z||E(5,Q),((se=a.current)==null?void 0:se.value)!==void 0){let Ee=F??"";($e=(J=a.current).onValueChange)==null||$e.call(J,Ee);return}}T.emit()}},emit:()=>{o.current.forEach(R=>R())}}),[]),C=m.useMemo(()=>({value:(R,F,z)=>{var B;F!==((B=i.current.get(R))==null?void 0:B.value)&&(i.current.set(R,{value:F,keywords:z}),n.current.filtered.items.set(R,O(F,z)),E(2,()=>{A(),T.emit()}))},item:(R,F)=>(r.current.add(R),F&&(s.current.has(F)?s.current.get(F).add(R):s.current.set(F,new Set([R]))),E(3,()=>{I(),A(),n.current.value||M(),T.emit()}),()=>{i.current.delete(R),r.current.delete(R),n.current.filtered.items.delete(R);let z=D();E(4,()=>{I(),(z==null?void 0:z.getAttribute("id"))===R&&M(),T.emit()})}),group:R=>(s.current.has(R)||s.current.set(R,new Set),()=>{i.current.delete(R),s.current.delete(R)}),filter:()=>a.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:b,inputId:S,labelId:w,listInnerRef:_}),[]);function O(R,F){var z,B;let se=(B=(z=a.current)==null?void 0:z.filter)!=null?B:DU;return R?se(R,n.current.search,F):0}function A(){if(!n.current.search||a.current.shouldFilter===!1)return;let R=n.current.filtered.items,F=[];n.current.filtered.groups.forEach(B=>{let se=s.current.get(B),J=0;se.forEach($e=>{let Ee=R.get($e);J=Math.max(Ee,J)}),F.push([B,J])});let z=_.current;Y().sort((B,se)=>{var J,$e;let Ee=B.getAttribute("id"),Ut=se.getAttribute("id");return((J=R.get(Ut))!=null?J:0)-(($e=R.get(Ee))!=null?$e:0)}).forEach(B=>{let se=B.closest(nf);se?se.appendChild(B.parentElement===se?B:B.closest(`${nf} > *`)):z.appendChild(B.parentElement===z?B:B.closest(`${nf} > *`))}),F.sort((B,se)=>se[1]-B[1]).forEach(B=>{var se;let J=(se=_.current)==null?void 0:se.querySelector(`${aa}[${Ti}="${encodeURIComponent(B[0])}"]`);J==null||J.parentElement.appendChild(J)})}function M(){let R=Y().find(z=>z.getAttribute("aria-disabled")!=="true"),F=R==null?void 0:R.getAttribute(Ti);T.setState("value",F||void 0)}function I(){var R,F,z,B;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let se=0;for(let J of r.current){let $e=(F=(R=i.current.get(J))==null?void 0:R.value)!=null?F:"",Ee=(B=(z=i.current.get(J))==null?void 0:z.keywords)!=null?B:[],Ut=O($e,Ee);n.current.filtered.items.set(J,Ut),Ut>0&&se++}for(let[J,$e]of s.current)for(let Ee of $e)if(n.current.filtered.items.get(Ee)>0){n.current.filtered.groups.add(J);break}n.current.filtered.count=se}function Q(){var R,F,z;let B=D();B&&(((R=B.parentElement)==null?void 0:R.firstChild)===B&&((z=(F=B.closest(aa))==null?void 0:F.querySelector(LU))==null||z.scrollIntoView({block:"nearest"})),B.scrollIntoView({block:"nearest"}))}function D(){var R;return(R=_.current)==null?void 0:R.querySelector(`${xT}[aria-selected="true"]`)}function Y(){var R;return Array.from(((R=_.current)==null?void 0:R.querySelectorAll(Uw))||[])}function H(R){let F=Y()[R];F&&T.setState("value",F.getAttribute(Ti))}function re(R){var F;let z=D(),B=Y(),se=B.findIndex($e=>$e===z),J=B[se+R];(F=a.current)!=null&&F.loop&&(J=se+R<0?B[B.length-1]:se+R===B.length?B[0]:B[se+R]),J&&T.setState("value",J.getAttribute(Ti))}function P(R){let F=D(),z=F==null?void 0:F.closest(aa),B;for(;z&&!B;)z=R>0?WU(z,aa):qU(z,aa),B=z==null?void 0:z.querySelector(Uw);B?T.setState("value",B.getAttribute(Ti)):re(R)}let j=()=>H(Y().length-1),$=R=>{R.preventDefault(),R.metaKey?j():R.altKey?P(1):re(1)},Z=R=>{R.preventDefault(),R.metaKey?H(0):R.altKey?P(-1):re(-1)};return m.createElement(le.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:R=>{var F;(F=y.onKeyDown)==null||F.call(y,R);let z=R.nativeEvent.isComposing||R.keyCode===229;if(!(R.defaultPrevented||z))switch(R.key){case"n":case"j":{x&&R.ctrlKey&&$(R);break}case"ArrowDown":{$(R);break}case"p":case"k":{x&&R.ctrlKey&&Z(R);break}case"ArrowUp":{Z(R);break}case"Home":{R.preventDefault(),H(0);break}case"End":{R.preventDefault(),j();break}case"Enter":{R.preventDefault();let B=D();if(B){let se=new Event(hm);B.dispatchEvent(se)}}}}},m.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:QU},l),Wd(e,R=>m.createElement(_T.Provider,{value:T},m.createElement(ST.Provider,{value:C},R))))}),MU=m.forwardRef((e,t)=>{var n,r;let s=Jt(),i=m.useRef(null),o=m.useContext(ET),a=Ml(),l=kT(e),c=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:o==null?void 0:o.forceMount;ni(()=>{if(!c)return a.item(s,o==null?void 0:o.id)},[c]);let u=CT(s,i,[e.value,e.children,i],e.keywords),d=uy(),p=as(E=>E.value&&E.value===u.current),h=as(E=>c||a.filter()===!1?!0:E.search?E.filtered.items.get(s)>0:!0);m.useEffect(()=>{let E=i.current;if(!(!E||e.disabled))return E.addEventListener(hm,v),()=>E.removeEventListener(hm,v)},[h,e.onSelect,e.disabled]);function v(){var E,T;g(),(T=(E=l.current).onSelect)==null||T.call(E,u.current)}function g(){d.setState("value",u.current,!0)}if(!h)return null;let{disabled:x,value:y,onSelect:b,forceMount:w,keywords:S,..._}=e;return m.createElement(le.div,{ref:Zs(i,t),..._,id:s,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!p,"data-disabled":!!x,"data-selected":!!p,onPointerMove:x||a.getDisablePointerSelection()?void 0:g,onClick:x?void 0:v},e.children)}),$U=m.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:s,...i}=e,o=Jt(),a=m.useRef(null),l=m.useRef(null),c=Jt(),u=Ml(),d=as(h=>s||u.filter()===!1?!0:h.search?h.filtered.groups.has(o):!0);ni(()=>u.group(o),[]),CT(o,a,[e.value,e.heading,l]);let p=m.useMemo(()=>({id:o,forceMount:s}),[s]);return m.createElement(le.div,{ref:Zs(a,t),...i,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&m.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),Wd(e,h=>m.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},m.createElement(ET.Provider,{value:p},h))))}),FU=m.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,s=m.useRef(null),i=as(o=>!o.search);return!n&&!i?null:m.createElement(le.div,{ref:Zs(s,t),...r,"cmdk-separator":"",role:"separator"})}),UU=m.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,s=e.value!=null,i=uy(),o=as(c=>c.search),a=as(c=>c.selectedItemId),l=Ml();return m.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),m.createElement(le.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":a,id:l.inputId,type:"text",value:s?e.value:o,onChange:c=>{s||i.setState("search",c.target.value),n==null||n(c.target.value)}})}),VU=m.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...s}=e,i=m.useRef(null),o=m.useRef(null),a=as(c=>c.selectedItemId),l=Ml();return m.useEffect(()=>{if(o.current&&i.current){let c=o.current,u=i.current,d,p=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let h=c.offsetHeight;u.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(c),()=>{cancelAnimationFrame(d),p.unobserve(c)}}},[]),m.createElement(le.div,{ref:Zs(i,t),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:l.listId},Wd(e,c=>m.createElement("div",{ref:Zs(o,l.listInnerRef),"cmdk-list-sizer":""},c)))}),BU=m.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:s,contentClassName:i,container:o,...a}=e;return m.createElement(yT,{open:n,onOpenChange:r},m.createElement(vT,{container:o},m.createElement(ly,{"cmdk-overlay":"",className:s}),m.createElement(cy,{"aria-label":e.label,"cmdk-dialog":"",className:i},m.createElement(TT,{ref:t,...a}))))}),zU=m.forwardRef((e,t)=>as(n=>n.filtered.count===0)?m.createElement(le.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),HU=m.forwardRef((e,t)=>{let{progress:n,children:r,label:s="Loading...",...i}=e;return m.createElement(le.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},Wd(e,o=>m.createElement("div",{"aria-hidden":!0},o)))}),Rt=Object.assign(TT,{List:VU,Item:MU,Input:UU,Group:$U,Separator:FU,Dialog:BU,Empty:zU,Loading:HU});function WU(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function qU(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function kT(e){let t=m.useRef(e);return ni(()=>{t.current=e}),t}var ni=typeof window>"u"?m.useEffect:m.useLayoutEffect;function ki(e){let t=m.useRef();return t.current===void 0&&(t.current=e()),t}function as(e){let t=uy(),n=()=>e(t.snapshot());return m.useSyncExternalStore(t.subscribe,n,n)}function CT(e,t,n,r=[]){let s=m.useRef(),i=Ml();return ni(()=>{var o;let a=(()=>{var c;for(let u of n){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(c=u.current.textContent)==null?void 0:c.trim():s.current}})(),l=r.map(c=>c.trim());i.value(e,a,l),(o=t.current)==null||o.setAttribute(Ti,a),s.current=a}),s}var KU=()=>{let[e,t]=m.useState(),n=ki(()=>new Map);return ni(()=>{n.current.forEach(r=>
331r()),n.current=new Map},[e]),(r,s)=>{n.current.set(r,s),t({})}};function GU(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Wd({asChild:e,children:t},n){return e&&m.isValidElement(t)?m.cloneElement(GU(t),{ref:t.ref},n(t.props.children)):n(t)}var QU={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const YU=yT,JU=vT,AT=m.forwardRef(({className:e,...t},n)=>f.jsx(ly,{ref:n,className:ee("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));AT.displayName=ly.displayName;const RT=m.forwardRef(({className:e,children:t,...n},r)=>f.jsxs(JU,{children:[f.jsx(AT,{}),f.jsxs(cy,{ref:r,className:ee("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,f.jsxs(IU,{className:"absolute right-4 top-4 roun
331ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[f.jsx(Wg,{className:"h-4 w-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));RT.displayName=cy.displayName;const XU=m.forwardRef(({className:e,...t},n)=>f.jsx(wT,{ref:n,className:ee("text-lg font-semibold leading-none tracking-tight",e),...t}));XU.displayName=wT.displayName;const ZU=m.forwardRef(({className:e,...t},n)=>f.jsx(bT,{ref:n,className:ee("text-sm text-muted-foreground",e),...t}));ZU.displayName=bT.displayName;const PT=m.forwardRef(({className:e,...t},n)=>f.jsx(Rt,{ref:n,className:ee("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));PT.displayName=Rt.displayName;const eV=({children:e,...t})=>f.jsx(YU,{...t,children:f.jsx(RT,{className:"overflow-hidden p-0 shadow-lg",children:f.jsx(PT,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),jT=m.forwardRef(({className:e,...t},n)=>f.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[f.jsx(Hp,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),f.jsx(Rt.Input,{ref:n,className:ee("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));jT.displayName=Rt.Input.displayName;const OT=m.forwardRef(({className:e,...t},n)=>f.jsx(Rt.List,{ref:n,className:ee("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));OT.displayName=Rt.List.displayName;const NT=m.forwardRef((e,t)=>f.jsx(Rt.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));NT.displayName=Rt.Empty.displayName;const Es=m.forwardRef(({className:e,...t},n)=>f.jsx(Rt.Group,{ref:n,className:ee("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Es.displayName=Rt.Group.displayName;const IT=m.forwardRef(({className:e,...t},n)=>f.jsx(Rt.Separator,{ref:n,className:ee("-mx-1 h-px bg-border",e),...t}));IT.displayName=Rt.Separator.displayName;const ln=m.forwardRef(({className:e,...t},n)=>f.jsx(Rt.Item,{ref:n,className:ee("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...t}));ln.displayName=Rt.Item.displayName;const dy=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),Vw=e=>`/products/${dy(e)}`,tV=[{id:"automotive",name:"Automotive Refinish",color:"hsl(var(--sector-automotive))",path:"/sectors/automotive-refinish"},{id:"carcare",name:"Car Care",color:"hsl(var(--sector-carcare))",path:"/sectors/car-care"},{id:"wood",name:"Wood Coatings",color:"hsl(var(--sector-wood))",path:"/sectors/wood-coatings"},{id:"industrial",name:"Industrial Coatings",color:"hsl(var(--sector-industrial))",path:"/sectors/industrial"},{id:"aeroplane-coating",name:"Aeroplane Coating",color:"#4C6A80",path:"/sectors/aeroplane-coating"},{id:"railway-coating",name:"Railway Coating",color:"#4A4A4A",path:"/sectors/railway-coating"},{id:"royallab",name:"Royal Lab",color:"hsl(var(--sector-royallab))",path:"/royal-lab"}],rH=e=>tV.find(t=>t.id===e)??{id:e,name:e,color:"hsl(var(--primary))",path:"/products"},hy=e=>({...e,benefits:Array.isArray(e.benefits)?e.benefits:[],specs:Array.isArray(e.specs)?e.specs:[],workflow_steps:Array.isArray(e.workflow_steps)?e.workflow_steps:[],compatible_products:Array.isArray(e.compatible_products)?e.compatible_products:[],climate_notes:e.climate_notes&&typeof e.climate_notes=="object"?e.climate_notes:{}}),nV=()=>qe({queryKey:["products"],queryFn:async()=>{const{data:e,error:t}=await De.from("products").select("*").order("sort_order",{ascending:!0});if(t)throw t;return(e??[]).map(hy)}}),rV=e=>{var t,n,r,s;return!!e&&typeof e.id=="string"&&!!((t=e.sku)!=null&&t.trim())&&!!((n=e.name)!=null&&n.trim())&&!!((r=e.description)!=null&&r.trim())&&!!((s=e.image_url)!=null&&s.trim())},sV=()=>qe({queryKey:["products","featured"],queryFn:async()=>{const{data:e,error:t}=await De.from("products").select("*").eq("is_featured",!0).order("sort_order",{ascending:!0});if(t)throw t;return(e??[]).map(hy).filter(rV)}}),sH=e=>qe({queryKey:["products","slug",e],enabled:!!e,queryFn:async()=>{const{data:t,error:n}=await De.from("products").select("*");if(n)throw n;const r=(t??[]).map(hy);return r.find(s=>
331s.slug===e)??r.find(s=>dy(s.sku)===e)??null}}),iV=[{id:"tds",label:"Technical Datasheet"},{id:"sds",label:"Safety Datasheet"},{id:"guide",label:"Application Guide"},{id:"best-practice",label:"Best Practices"},{id:"training",label:"Training"},{id:"download",label:"Download"}],oV=e=>{var t;return((t=iV.find(n=>n.id===e))==null?void 0:t.label)??e},aV=()=>qe({queryKey:["resources"],queryFn:async()=>{const{data:e,error:t}=await De.from("resources").select("*").eq("is_visible",!0).order("sort_order",{ascending:!0}).order("created_at",{ascending:!1});if(t)throw t;return e??[]}}),iH=()=>qe({queryKey:["resources","all"],queryFn:async()=>{const{data:e,error:t}=await De.from("resources").select("*").order("sort_order",{ascending:!0}).order("created_at",{ascending:!1});if(t)throw t;return e??[]}}),oH=[{id:"foundation",label:"Foundation"},{id:"advanced",label:"Advanced"},{id:"master",label:"Master Class"}],aH=[{id:"refinisher",label:"Refinishers"},{id:"distributor",label:"Distributors"},{id:"industrial",label:"Industrial Applicators"},{id:"wood",label:"Wood Finishers"},{id:"general",label:"General"}],lH=[{id:"in-person",label:"In-person"},{id:"hybrid",label:"Hybrid"},{id:"online",label:"Online"}],LT=e=>({...e,outcomes:Array.isArray(e.outcomes)?e.outcomes:[],modules:Array.isArray(e.modules)?e.modules:[]}),lV=()=>qe({queryKey:["training"],queryFn:async()=>{const{data:e,error:t}=await De.from("training_programs").select("*").eq("is_visible",!0).order("sort_order",{ascending:!0}).order("created_at",{ascending:!1});if(t)throw t;return(e??[]).map(LT)}}),cH=()=>qe({queryKey:["training","all"],queryFn:async()=>{const{data:e,error:t}=await De.from("training_programs").select("*").order("sort_order",{ascending:!0}).order("created_at",{ascending:!1});if(t)throw t;return(e??[]).map(LT)}}),fy=e=>({...e,gallery:Array.isArray(e.gallery)?e.gallery:[],products_used:Array.isArray(e.products_used)?e.products_used:[]}),cV=()=>qe({queryKey:["projects"],queryFn:async()=>{const{data:e,error:t}=await De.from("projects").select("*").order("sort_order",{ascending:!0}).order("year",{ascending:!1});if(t)throw t;return(e??[]).map(n=>fy(n))}}),uH=()=>qe({queryKey:["projects","all"],queryFn:async()=>{const{data:e,error:t}=await De.from("projects").select("*").order("sort_order",{ascending:!0});if(t)throw t;return(e??[]).map(n=>fy(n))}}),dH=e=>qe({queryKey:["projects","slug",e],enabled:!!e,queryFn:async()=>{const{data:t,error:n}=await De.from("projects").select("*").eq("slug",e).maybeSingle();if(n)throw n;return t?fy(t):null}}),hH=["news","technical","case-study","industry"],uV=()=>qe({queryKey:["insights","public"],queryFn:async()=>{const{data:e,error:t}=await De.from("insights").select("*").eq("is_published",!0).order("published_at",{ascending:!1,nullsFirst:!1}).order("created_at",{ascending:!1});if(t)throw t;return e??[]}}),fH=()=>qe({queryKey:["insights","all"],queryFn:async()=>{const{data:e,error:t}=await De.from("insights").select("*").order("sort_order",{ascending:!0}).order("created_at",{ascending:!1});if(t)throw t;return e??[]}}),pH=e=>qe({queryKey:["insights","slug",e],enabled:!!e,queryFn:async()=>{const{data:t,error:n}=await De.from("insights").select("*").eq("slug",e).eq("is_published",!0).maybeSingle();if(n)throw n;return t??null}}),dV={automotive:"#E85D24","car-care":"#1a7a52",wood:"#BA7517",industrial:"#1a4a7a",royal_lab:"#C9A84C"};function DT({open:e,onOpenChange:t,initialFilter:n="all"}){const r=kd(),[s,i]=m.useState(""),{data:o=[]}=nV(),{data:a=[]}=aV(),{data:l=[]}=lV(),{data:c=[]}=cV(),{data:u=[]}=uV();m.useEffect(()=>{e&&i("")},[e,n]);const d=S=>{t(!1),r(S)},p=s.trim().toLowerCase(),h=S=>!!S&&S.toLowerCase().includes(p),v=m.useMemo(()=>(n==="resources"?[]:o.filter(S=>!p||h(S.name)||h(S.sku)||h(S.description)||h(S.sector))).slice(0,8),[o,p,n]),g=m.useMemo(()=>a.filter(S=>!p||h(S.title)||h(S.description)||h(S.type)||h(S.category)).slice(0,8),[a,p]),x=m.useMemo(()=>(n==="resources"?[]:l.filter(S=>!p||h(S.title)||h(S.summary)||h(S.level))).slice(0,5),[l,p,n]),y=m.useMemo(()=>(n==="resources"?[]:c.filter(S=>!p||h(S.title)||h(S.client)||h(S.sector)||h(S.summary))).slice(0,5),[c,p,n]),b=m.useMemo(()=>n==="resources"?[]:u.filter(S=>!p||h(S.title)||h(S.excerpt)||h(S.category)).slice(0,5),[u,p,n]),w=!p;return f.jsxs(eV,{open:e,onOpenChange:t,children:[f.jsx(jT,{placeholder:n==="resources"?"Search TDS, SDS, guides…":"Search products, resources, training, projects…",value:s,onValueChange:i}),f.jsxs(OT,{className:"max-h-[60vh]",children:[f.jsx(NT,{children:"No results found."}),w&&f.jsxs(f.Fragment,{children:[f.jsxs(Es,{heading:"Quick actions",children:[f.jsxs(ln,{onSelect:()=>d("/quote"),children:[f.jsx(Vp,{className:"mr-2 h-4 w-4 text-primary"})," Request a quote"]}),f.jsxs(ln,{onSelect:()=>d("/resources"),children:[f.jsx(Bp,{className:"mr-2 h-4 w-4 text-primary"})," Browse TDS / SDS library"]}),f.jsxs(ln,{onSelect:()=>d("/color-support"),children:[f.jsx(D_,{className:"mr-2 h-4 w-4 text-primary"})," Colour support"]}),f.jsxs(ln,{onSelect:()=>d("/contact"),children:[f.jsx(ol,{className:"mr-2 h-4 w-4 text-primary"})," Contact technical team"]}),f.jsxs(ln,{onSelect:()=>{t(!1),window.open("https://wa.me/201007007550","_blank")},children:[f.jsx(Eo,{className:"mr-2 h-4 w-4 text-[#25D366]"})," WhatsApp"]})]}),f.jsx(IT,{})]}),v.length>0&&f.jsx(Es,{heading:"Products",children:v.map(S=>f.jsxs(ln,{value:`product-${S.id}-${S.name}-${S.sku}`,onSelect:()=>d(`/products/${S.slug||dy(S.sku)}`),children:[f.jsx("span",{className:"mr-2 inline-block h-2 w-2 flex-shrink-0",style:{backgroundColor:dV[S.sector]??"#999"}}),f.jsx(GI,{className:"mr-2 h-4 w-4 opacity-60"}),f.jsxs("div",{className:"flex-1 truncate",children:[f.jsx("span",{className:"font-medium",children:S.name}),f.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:S.sku})]}),f.jsx("span",{className:"ml-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:"Product"})]},S.id))}),g.length>0&&f.jsx(Es,{heading:"Resources",children:g.map(S=>f.jsxs(ln,{value:`resource-${S.id}-${S.title}`,onSelect:()=>{const _=S.file_url||S.external_url;_?(t(!1),window.open(_,"_blank")):d("/resources")},children:[f.jsx(Bp,{className:"mr-2 h-4 w-4 opacity-60"}),f.jsxs("div",{className:"flex-1 truncate",children:[f.jsx("span",{className:"font-medium",children:S.title}),S.category&&f.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:S.category})]}),f.jsx("span",{className:"ml-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:oV(S.type)})]},S.id))}),x.length>0&&f.jsx(Es,{heading:"Training",children:x.map(S=>f.jsxs(ln,{value:`training-${S.id}-${S.title}`,onSelect:()=>d("/training"),children:[f.jsx(zI,{className:"mr-2 h-4 w-4 opacity-60"}),f.jsxs("div",{className:"flex-1 truncate",children:[f.jsx("span",{className:"font-medium",children:S.title}),f.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:S.level})]}),f.jsx("span",{className:"ml-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:"Training"})]},S.id))}),y.length>0&&f.jsx(Es,{heading:"Projects",children:y.map(S=>f.jsxs(ln,{value:`project-${S.id}-${S.title}`,onSelect:()=>d(`/projects/${S.slug}`),children:[f.jsx(LI,{className:"mr-2 h-4 w-4 opacity-60"}),f.jsxs("div",{className:"flex-1 truncate",children:[f.jsx("span",{className:"font-medium",children:S.title}),S.client&&f.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:S.client})]}),f.jsx("span",{className:"ml-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:"Project"})]},S.id))}),b.length>0&&f.jsx(Es,{heading:"Insights",children:b.map(S=>f.jsxs(ln,{value:`insight-${S.id}-${S.title}`,onSelect:()=>d(`/insights/${S.slug}`),children:[f.jsx(YI,{className:"mr-2 h-4 w-4 opacity-60"}),f.jsxs("div",{className:"flex-1 truncate",children:[f.jsx("span",{className:"font-medium",children:S.title}),f.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:S.category})]}),f.jsx("span",{className:"ml-2 text-[10px] uppercase tracking-wider text-muted-foreground",children:"Insight"})]},S.id))})]})]})}const hV="/royal-logo.webp",Bw=[{label:"Products",groups:[{heading:"By Division",items:[{label:"All Products",path:"/products"},{label:"Automotive Refinish",path:"/products?sector=automotive",color:"#E85D24"},{label:"Car Care",path:"/products?sector=carcare",color:"#1a7a52"},{label:"Industrial Coatings",path:"/products?sector=industrial",color:"#1a4a7a"},{label:"Aeroplane Coating",path:"/sectors/aeroplane-coating",color:"#4C6A80"},{label:"Railway Coating",path:"/sectors/railway-coating",color:"#4A4A4A"},{label:"Wood Coatings",path:"/products?sector=wood",color:"#BA7517"},{label:"Royal Lab",path:"/products?sector=royallab",color:"#C9A84C"}]},{heading:"By System",items:[{label:"Primers & Surfacers",path:"/products?category=primer"},{label:"Basecoats",path:"/products?category=basecoat"},{label:"Clearcoats",path:"/products?category=clearcoat"},{label:"Hardeners",path:"/products?category=hardener"},{label:"Thinners",path:"/products?category=thinner"}]}]},{label:"Royal Lab",children:[{label:"Custom Formulation",path:"/royal-lab#formulation"},{label:"Private Label",path:"/royal-lab#private-label"},{label:"Consultation",path:"/royal-lab#consultation"},{label:"Development Workflow",path:"/royal-lab#workflow"}]},{label:"Resources",children:[{label:"All Downloads",path:"/resources"},{label:"Training Academy",path:"/training"},{label:"Colour Support",path:"/color-support"}]},{label:"Company",children:[{label:"About",path:"/about"},{label:"Certifications",path:"/certifications"},{label:"Partners",path:"/partners"},{label:"Where to Buy",path:"/where-to-buy"},{label:"Export Markets",path:"/export"},{label:"Events & Trade Fairs",path:"/events"},{label:"Careers",path:"/careers"},{label:"Contact",path:"/contact"}]}],fV=()=>{const[e,t]=m.useState(!1),[n,r]=m.useState(null),[s,i]=m.useState(!1),[o,a]=m.useState(!1),[l,c]=m.useState(!1),u=Ft(),{data:d}=Bd(),p=(d==null?void 0:d.phone)??"+20 100 700 7550",h=(d==null?void 0:d.phone_tel)??"+201007007550",v=(d==null?void 0:d.email)??"[email protected]",g=(d==null?void 0:d.whatsapp_number)??"201007007550",x=(d==null?void 0:d.logo_url)||hV,y=(d==null?void 0:d.brand_name)??"Royal Coating Egypt",b=w=>u.pathname===w.split("?")[0].split("#")[0];return m.useEffect(()=>{t(!1),r(null)},[u.pathname]),m.useEffect(()=>{let w=window.scrollY;const S=()=>{const _=window.scrollY;i(_>8),a(_>80&&_>w),w=_};return window.addEventListener("scroll",S,{passive:!0}),()=>window.removeEventListener("scroll",S)},[]),m.useEffect(()=>{const w=S=>{(S.metaKey||S.ctrlKey)&&S.key.toLowerCase()==="k"&&(S.preventDefault(),c(_=>!_))};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[]),f.jsxs("header",{className:"relative",children:[f.jsx(DT,{open:l,onOpenChange:c}),f.jsx("div",{className:ee("hidden lg:block bg-[hsl(var(--ink))] overflow-hidden transition-[max-height,opacity] duration-500 ease-out",o?"max-h-0 opacity-0":"max-h-10 opacity-100"),children:f.jsxs("div",{className:"container-wide flex items-center justify-between py-2.5",children:[f.jsxs("div",{className:"flex items-center gap-8 text-eyebrow text-[hsl(0,0%,70%)]",children:[f.jsxs("a",{href:`tel:${h}`,className:"inline-flex items-center gap-2 hover:text-[hsl(var(--metallic))] transition-colors",children:[f.jsx(ol,{size:11,className:"text-primary"}),p]}),f.jsxs("a",{href:`mailto:${v}`,className:"inline-flex items-center gap-2 hover:text-[hsl(var(--metallic))] transition-colors",children:[f.jsx(zp,{size:11,className:"text-primary"}),v]}),f.jsxs("a",{href:`https://wa.me/${g}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 hover:text-[hsl(var(--metallic))] transition-colors",children:[f.jsx(Eo,{size:11,className:"text-[#25D366]"}),"WhatsApp"]})]}),f.jsxs(Ce,{to:"/events",className:"inline-flex items-center gap-2 text-eyebrow text-[hsl(0,0%,88%)] hover:text-primary transition-colors",children:["Events & Trade Fairs",f.jsx(Fu,{size:11})]})]})}),f.jsx("nav",{className:ee("bg-background border-b border-hairline transition-[height,box-shadow] duration-500 ease-out",s&&"shadow-hairline"),children:f.jsxs("div",{className:ee("container-wide flex items-center justify-between gap-6 transition-[height] duration-500 ease-out",s?"h-16 lg:h-[68px]":"h-16 lg:h-[88px]"),children:[f.jsxs(Ce,{to:"/",className:"flex items-center gap-3 flex-shrink-0",children:[f.jsx("img",{src:x,alt:`${y} logo`,width:67,height:44,fetchpriority:"high",decoding:"async",className:"h-10 lg:h-11 w-auto"}),f.jsxs("span",{className:"font-heading text-xl lg:text-2xl font-semibold text-foreground tracking-tight",children:["ROYAL",f.jsx("span",{className:"text-primary",children:" COATING"})]})]}),f.jsx("div",{className:"hidden lg:flex items-center gap-4 xl:gap-6 flex-1 justify-center min-w-0",children:Bw.map(w=>w.groups?f.jsxs("div",{className:"relative group py-2",children:[f.jsxs("button",{className:ee("inline-flex items-center gap-1 text-meta font-medium transition-colors duration-300 pb-1 border-b border-transparent hover:text-primary"),children:[w.label,f.jsx(Fh,{size:12,className:"transition-transform group-hover:rotate-180"})]}),f.jsx("div",{className:ee("absolute top-full left-1/2 -translate-x-1/2 pt-3 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-300 z-50","w-[640px]"),children:f.jsx("div",{className:"bg-card border border-hairline shadow-editorial grid grid-cols-2",children:w.groups.map(S=>f.jsxs("div",{className:"p-6 border-r border-hairline last:border-0",children:[f.jsx("div",{className:"text-eyebrow text-muted-foreground mb-4",children:S.heading}),f.jsx("ul",{className:"space-y-2.5",children:S.items.map(_=>f.jsx("li",{children:f.jsxs(Ce,{to:_.path,className:ee("flex items-center gap-3 text-sm font-body text-foreground hover:text-primary transition-colors"),children:[_.color?f.jsx("span",{className:"w-2 h-2 flex-shrink-0",style:{backgroundColor:_.color}}):f.jsx("span",{className:"w-2 h-px flex-shrink-0 bg-primary"}),_.label]})},_.path))})]},S.heading))})})]},w.label):w.children?f.jsxs("div",{className:"relative group py-2",children:[f.jsxs("button",{className:ee("inline-flex items-center gap-1 text-meta font-medium transition-colors duration-300 pb-1 border-b border-transparent hover:text-primary",w.highlight&&"text-[hsl(var(--metallic))] hover:text-[hsl(var(--metallic)/80)]"),children:[w.label,f.jsx(Fh,{size:12,className:"transition-transform group-hover:rotate-180"})]}),f.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 pt-3 w-64 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-300 z-50",children:f.jsx("div",{className:"bg-card border border-hairline shadow-editorial overflow-hidden",children:w.
331children.map(S=>f.jsxs(Ce,{to:S.path,className:ee("flex items-center gap-3 px-5 py-3 text-sm font-body transition-colors duration-200 border-b border-hairline last:border-0",b(S.path)?"bg-surface-2 text-primary":"text-foreground hover:bg-surface-2"),children:[S.color?f.jsx("span",{className:"w-2 h-2 flex-shrink-0",style:{backgroundColor:S.color}}):f.jsx("span",{className:"w-2 h-px flex-shrink-0 bg-primary"}),S.label]},S.path))})})]},w.label):f.jsx(Ce,{to:w.path,className:ee("text-meta font-medium transition-colors duration-300 pb-1 border-b",b(w.path)?"text-primary border-primary":"text-foreground border-transparent hover:text-primary"),children:w.label},w.path))}),f.jsxs("div",{className:"hidden lg:flex items-center gap-3 flex-shrink-0",children:[f.jsxs("button",{onClick:()=>c(!0),"aria-label":"Search the site",className:"inline-flex items-center gap-2 px-3 py-2 rounded-none border border-hairline text-muted-foreground hover:text-foreground hover:border-foreground/30 transition-colors",children:[f.jsx(Hp,{size:14}),f.jsx("span",{className:"hidden 2xl:inline text-eyebrow font-body",children:"Search"}),f.jsx("kbd",{className:"hidden 2xl:inline text-[10px] font-mono border border-hairline rounded px-1.5 py-0.5 text-muted-foreground",children:"⌘K"})]}),f.jsxs(Ce,{to:"/quote",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-none bg-primary text-primary-foreground font-body font-semibold text-eyebrow hover:bg-[hsl(var(--primary-hover))] transition-colors",children:["Request Quote",f.jsx(Fu,{size:12})]})]}),f.jsxs("div",{className:"flex items-center gap-2 lg:hidden",children:[f.jsx("button",{onClick:()=>c(!0),"aria-label":"Search",className:"p-2 text-foreground",children:f.jsx(Hp,{size:20})}),f.jsx("button",{className:"text-foreground",onClick:()=>t(!e),"aria-label":"Toggle menu",children:e?f.jsx(Wg,{size:24}):f.jsx(KI,{size:24})})]})]})}),e&&f.jsx("div",{className:"lg:hidden fixed inset-x-0 bottom-0 bg-[hsl(var(--ink))] overflow-y-auto overscroll-contain animate-fade-in",style:{to
331p:"var(--header-h, 64px)"},children:f.jsxs("div",{className:"container mx-auto px-4 py-8 pb-32",children:[Bw.map(w=>{if(!(w.groups||w.children))return f.jsx(Ce,{to:w.path,onClick:()=>t(!1),className:"block py-4 text-base font-body font-medium border-b border-[hsl(0,0%,18%)] text-primary-foreground",children:w.label},w.path);const _=n===w.label;return f.jsxs("div",{className:"border-b border-[hsl(0,0%,18%)]",children:[f.jsxs("button",{onClick:()=>r(_?null:w.label),className:ee("flex items-center justify-between w-full py-4 text-base font-body font-medium",w.highlight?"text-[hsl(var(--metallic))]":"text-primary-foreground"),children:[w.label,f.jsx(Fh,{size:18,className:ee("transition-transform",_&&"rotate-180")})]}),_&&f.jsx("div",{className:"pb-3 space-y-1",children:w.groups?w.groups.flatMap(E=>E.items).map(E=>f.jsxs(Ce,{to:E.path,onClick:()=>t(!1),className:"flex items-center gap-3 py-2.5 pl-4 text-sm text-[hsl(0,0%,75%)] hover:text-primary-foreground",children:[E.color?f.jsx("span",{className:"w-2 h-2 flex-shrink-0",style:{backgroundColor:E.color}}):f.jsx("span",{className:"w-2 h-px flex-shrink-0 bg-primary"}),E.label]},E.path)):w.children.map(E=>f.jsxs(Ce,{to:E.path,onClick:()=>t(!1),className:"flex items-center gap-3 py-2.5 pl-4 text-sm text-[hsl(0,0%,75%)] hover:text-primary-foreground",children:[E.color?f.jsx("span",{className:"w-2 h-2 flex-shrink-0",style:{backgroundColor:E.color}}):f.jsx("span",{className:"w-2 h-px flex-shrink-0 bg-primary"}),E.label]},E.path))})]},w.label)}),f.jsx(Ce,{to:"/quote",onClick:()=>t(!1),className:"mt-8 inline-flex items-center justify-center w-full px-4 py-3.5 rounded-none bg-primary text-primary-foreground font-body font-semibold text-eyebrow",children:"Request Quote"}),f.jsx(Ce,{to:"/events",onClick:()=>t(!1),className:"mt-3 inline-flex items-center justify-center w-full px-4 py-3 rounded-none border border-[hsl(0,0%,35%)] text-[hsl(0,0%,92%)] font-body font-semibold text-eyebrow",children:"Events & Trade Fairs"}),f.jsxs("div",{className:"mt-10 pt-8 border-t border-[hsl(0,0%,18%)] space-y-4 text-sm font-body text-[hsl(0,0%,70%)]",children:[f.jsxs("a",{href:`tel:${h}`,className:"flex items-center gap-3",children:[f.jsx(ol,{size:14,className:"text-primary"}),p]}),f.jsxs("a",{href:`mailto:${v}`,className:"flex items-center gap-3",children:[f.jsx(zp,{size:14,className:"text-primary"}),v]}),f.jsxs("a",{href:`https://wa.me/${g}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 text-[#25D366]",children:[f.jsx(Eo,{size:14}),"Chat on WhatsApp"]})]})]})})]})};function pV(){return qe({queryKey:["footer_content"],queryFn:async()=>{const{data:e,error:t}=await De.from("footer_content").select("*").eq("id",1).maybeSingle();if(t)throw t;return e?{tagline:e.tagline??"",about_text:e.about_text??"",bottom_text:e.bottom_text??"",columns:Array.isArray(e.columns)?e.columns:[]}:null},staleTime:6e4})}const mV="/royal-logo.webp",gV={"/sectors/automotive-refinish":"#E85D24","/sectors/car-care":"#1a7a52","/sectors/wood-coatings":"#BA7517","/sectors/industrial":"#1a4a7a","/royal-lab":"#C9A84C"},yV=()=>{const{data:e}=Bd(),{data:t}=pV(),n=(e==null?void 0:e.phone)??"+20 100 700 7550",r=(e==null?void 0:e.phone_tel)??"+201007007550",s=(e==null?void 0:e.email)??"[email protected]",i=(e==null?void 0:e.whatsapp_number)??"201007007550",o=(e==null?void 0:e.address_line1)??"6th Industrial Zone, Plot 73",a=(e==null?void 0:e.address_line2)??"October City, Giza, Egypt",l=(e==null?void 0:e.brand_name)??"Royal Coating Egypt",c=(t==null?void 0:t.tagline)||(e==null?void 0:e.tagline)||"Engineered to Last. Made to Lead.",u=(t==null?void 0:t.about_text)||"Full-spectrum coatings manufacturer producing 31 formulations across 5 divisions in 6th October City, Egypt. Built for industrial scale and export-grade quality.",d=(t==null?void 0:t.bottom_text)||"Manufacturing Excellence · Global Standards",p=(t==null?void 0:t.columns)??[],h=(e==null?void 0:e.logo_url)||mV,v="inline-flex items-center gap-2 text-[hsl(0,0%,68%)] hover:text-[hsl(var(--metallic))] transition-colors duration-300";return f.jsxs("footer",{className:"bg-[hsl(var(--ink))] text-[hsl(0,0%,68%)]",children:[f.jsx("div",{className:"h-px w-full",style:{background:"linear-gradient(90deg, transparent, #c8102e 30%, #C9A84C 70%, transparent)"}}),f.jsxs("div",{className:"container-wide py-20 lg:py-24",children:[f.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10 lg:gap-12 pb-14 border-b border-[hsl(0,0%,15%)]",children:[f.jsxs("div",{className:"lg:col-span-5",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("img",{src:h,alt:`${l} logo`,width:67,height:44,loading:"lazy",decoding:"async",className:"h-11 w-auto"}),f.jsxs("h3",{className:"font-heading text-2xl font-semibold text-[hsl(0,0%,98%)] tracking-tight",children:["ROYAL",f.jsx("span",{className:"text-primary",children:" COATING"})]})]}),f.jsx("p",{className:"mt-6 font-heading text-xl lg:text-2xl leading-snug text-[hsl(0,0%,92%)] max-w-md",children:c}),f.jsx("p",{className:"mt-5 font-body text-sm leading-relaxed text-[hsl(0,0%,60%)] max-w-md whitespace-pre-line",children:u})]}),f.jsxs("div",{className:"lg:col-span-7 lg:pl-12 lg:border-l lg:border-[hsl(0,0%,15%)]",children:[f.jsx("span",{className:"text-eyebrow text-[hsl(var(--metallic))]",children:"Headquarters"}),f.jsxs("p",{className:"mt-4 font-body text-base text-[hsl(0,0%,88%)] leading-relaxed",children:[o,f.jsx("br",{}),a]}),f.jsxs("div",{className:"mt-6 flex flex-wrap gap-x-8 gap-y-3 text-sm font-body",children:[f.jsxs("a",{href:`tel:${r}`,className:v,children:[f.jsx(ol,{size:14,className:"text-primary"}),n]}),f.jsxs("a",{href:`mailto:${s}`,className:v,children:[f.jsx(zp,{size:14,className:"text-primary"}),s]}),f.jsxs("a",{href:`https://wa.me/${i}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-[#25D366] hover:text-[#5cf09a] transition-colors",children:[f.jsx(Eo,{size:14}),"WhatsApp"]})]})]})]}),f.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-10 lg:gap-12 py-14",children:p.map((g,x)=>f.jsxs("div",{children:[f.jsx("h4",{className:"text-eyebrow text-[hsl(var(--metallic))] mb-6",children:g.heading}),f.jsx("ul",{className:"space-y-3 font-body text-sm",children:g.links.map((y,b)=>{const w=gV[y.url],S=/^https?:\/\//i.test(y.url),_=f.jsxs("span",{className:w?"inline-flex items-center gap-3 text-[hsl(0,0%,68%)] hover:text-[hsl(0,0%,98%)] transition-colors duration-300":v,children:[w&&f.jsx("span",{className:"w-2 h-2 flex-shrink-0",style:{backgroundColor:w}}),y.label]});return f.jsx("li",{children:S?f.jsx("a",{href:y.url,target:"_blank",rel:"noopener noreferrer",children:_}):f.jsx(Ce,{to:y.url,children:_})},b)})})]},x))}),f.jsxs("div",{className:"pt-8 border-t border-[hsl(0,0%,15%)] flex flex-col lg:flex-row items-start lg:items-center justify-between gap-4 text-xs font-body text-[hsl(0,0%,45%)]",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(qI,{size:12,className:"text-primary"}),"© ",new Date().getFullYear()," ",l,". All rights reserved."]}),f.jsx("div",{className:"text-eyebrow text-[hsl(0,0%,55%)]",children:d})]})]})]})},vV=()=>{const{pathname:e}=Ft(),{data:t}=Bd(),[n,r]=m.useState(!1),[s,i]=m.useState("all");
331if(e.startsWith("/admin")||e==="/auth")return null;const o=(t==null?void 0:t.whatsapp_number)||"201007007550",a=(t==null?void 0:t.phone_tel)||"+201007007550",l=()=>{i("resources"),r(!0)};return f.jsxs(f.Fragment,{children:[f.jsx(DT,{open:n,onOpenChange:r,initialFilter:s}),f.jsxs("div",{className:"hidden lg:flex fixed bottom-6 right-6 z-40 flex-col gap-2",children:[f.jsxs(Ce,{to:"/quote",className:"group inline-flex items-center gap-2 bg-primary text-primary-foreground rounded-none px-4 py-3 shadow-editorial hover:bg-[hsl(var(--primary-hover))] transition-colors","aria-label":"Request quote",children:[f.jsx(Vp,{size:16}),f.jsx("span",{className:"font-body text-eyebrow font-semibold",children:"Request Quote"})]}),f.jsxs("button",{onClick:l,className:"group inline-flex items-center gap-2 bg-[hsl(var(--ink))] text-primary-foreground rounded-none px-4 py-3 shadow-editorial hover:bg-[hsl(0,0%,18%)] transition-colors","aria-label":"Search TDS",children:[f.jsx(Bp,{size:16,className:"text-[hsl(var(--metallic))]"}),f.jsx("span",{className:"font-body text-eyebrow font-semibold",children:"TDS Search"})]}),f.jsxs(Ce,{to:"/color-support",className:"group inline-flex items-center gap-2 bg-card border border-hairline text-foreground rounded-none px-4 py-3 shadow-editorial hover:bg-surface-2 transition-colors","aria-label":"Colour support",children:[f.jsx(D_,{size:16,className:"text-primary"}),f.jsx("span",{className:"font-body text-eyebrow font-semibold",children:"Colour Support"})]}),f.jsxs("a",{href:`https://wa.me/${o}`,target:"_blank",rel:"noopener noreferrer","aria-label":"Chat on WhatsApp",className:"inline-flex items-center justify-center gap-2 bg-[#25D366] text-white rounded-none px-4 py-3 shadow-editorial hover:bg-[#1ebe57] transition-colors",children:[f.jsx(Eo,{size:16}),f.jsx("span",{className:"font-body text-eyebrow font-semibold",children:"WhatsApp"})]})]}),f.jsxs("div",{className:"lg:hidden fixed bottom-0 left-0 right-0 z-40 bg-[hsl(var(--ink))] border-t border-[hsl(0,0%,18%)] grid grid-cols-4 pb-[env(safe-area-inset-bottom)]",children:[f.jsxs("a",{href:`tel:${a}`,className:"flex flex-col items-center justify-center gap-1 py-2.5 text-[hsl(0,0%,80%)] active:bg-[hsl(0,0%,12%)]","aria-label":"Call",children:[f.jsx(ol,{size:18,className:"text-primary"}),f.jsx("span",{className:"text-[10px] font-body uppercase tracking-wider",children:"Call"})]}),f.jsxs("a",{href:`https://wa.me/${o}`,target:"_blank",rel:"noopener noreferrer",className:"flex flex-col items-center justify-center gap-1 py-2.5 text-[hsl(0,0%,80%)] active:bg-[hsl(0,0%,12%)]","aria-label":"WhatsApp",children:[f.jsx(Eo,{size:18,className:"text-[#25D366]"}),f.jsx("span",{className:"text-[10px] font-body uppercase tracking-wider",children:"WhatsApp"})]}),f.jsxs(Ce,{to:"/quote",className:ee("flex flex-col items-center justify-center gap-1 py-2.5 text-primary-foreground bg-primary"),"aria-label":"Request quote",children:[f.jsx(Vp,{size:18}),f.jsx("span",{className:"text-[10px] font-body uppercase tracking-wider font-semibold",children:"Quote"})]}),f.jsxs(Ce,{to:"/resources",className:"flex flex-col items-center justify-center gap-1 py-2.5 text-[hsl(0,0%,80%)] active:bg-[hsl(0,0%,12%)]","aria-label":"Resources",children:[f.jsx(WI,{size:18,className:"text-[hsl(var(--metallic))]"}),f.jsx("span",{className:"text-[10px] font-body uppercase tracking-wider",children:"Resources"})]})]}),f.jsx("div",{className:"lg:hidden h-[calc(3.75rem+env(safe-area-inset-bottom))]","aria-hidden":!0})]})},wV=()=>{const[e,t]=m.useState(!1);return m.useEffect(()=>{const n=()=>t(window.scrollY>400);return window.addEventListener("scroll",n,{passive:!0}),n(),()=>window.removeEventListener("scroll",n)},[]),e?f.jsx("button",{onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),"aria-label":"Scroll to top",className:"fixed bottom-6 left-6 z-50 bg-primary text-primary-foreground rounded-none p-3 shadow-xl hover:bg-[hsl(var(--primary-hover))] hover:scale-110 transition-all duration-200 animate-fade-in",children:f.jsx(DI,{size:22})}):null},bV=()=>{const{data:e}=Bd();if(!(e!=null&&e.banner_enabled)||!e.banner_text)return null;const t=e.banner_bg_color||"#c8102e",n=e.banner_text_color||"#ffffff",r=f.jsx("div",{className:"container mx-auto px-4 py-2 text-center font-body text-xs lg:text-sm",children:e.banner_text});return f.jsx("div",{style:{backgroundColor:t,color:n},className:"w-full",children:e.banner_link?f.jsx("a",{href:e.banner_link,target:"_blank",rel:"noopener noreferrer",className:"block hover:opacity-90 transition-opacity",children:r}):r})},xV=()=>{const e=Ft(),t=m.useRef(null),[n,r]=m.useState(64);return m.useEffect(()=>{const s=t.current;if(!s)return;const i=()=>{const a=s.getBoundingClientRect().height;
331r(a),document.documentElement.style.setProperty("--header-h",`${a}px`)};i();const o=new ResizeObserver(i);return o.observe(s),window.addEventListener("resize",i),()=>{o.disconnect(),window.removeEventListener("resize",i)}},[]),f.jsxs("div",{className:"min-h-screen flex flex-col",children:[f.jsx("a",{href:"#main",className:"sr-only focus:not-sr-only focus:fixed focus:top-3 focus:left-3 focus:z-[100] focus:px-4 focus:py-2 focus:bg-primary focus:text-primary-foreground focus:rounded-none focus:font-body focus:text-sm focus:font-semibold",children:"Skip to content"}),f.jsxs("div",{ref:t,className:"fixed top-0 left-0 right-0 z-50",children:[f.jsx(bV,{}),f.jsx(fV,{})]}),f.jsx("main",{id:"main",className:"flex-1 animate-fade-in",style:{paddingTop:n},children:f.jsx(lO,{})},e.pathname),f.jsx(yV,{}),f.jsx(vV,{}),f.jsx(wV,{})]})},SV=()=>{const e=Ft();return m.useState(null),m.useEffect(()=>{},[e.pathname]),null},zw="royalcoatingeg.com,www.royalcoatingeg.com".split(",").map(e=>e.trim().toLowerCase()).filter(Boolean),Hw=()=>{if(typeof window>"u")return!1;const e=window.location.hostname.toLowerCase();return!(!e||e==="localhost"||e==="127.0.0.1"||e.endsWith(".lovable.app")||e.endsWith(".lovable.dev")||zw.length&&!zw.includes(e)||navigator.doNotTrack==="1"||window.doNotTrack==="1")},_V=()=>{const e=Ft();return m.useEffect(()=>{Hw()},[]),m.useEffect(()=>{Hw()&&e.pathname+e.search},[e.pathname,e.search]),null},MT=m.createContext({});function EV(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const TV=typeof window<"u",kV=TV?m.useLayoutEffect:m.useEffect,py=m.createContext(null);function my(e,t){e.indexOf(t)===-1&&e.push(t)}function Xu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Wn=(e,t,n)=>n>t?t:n<e?e:n;let qd=()=>{},Co=()=>{};const ls={},$T=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),FT=e=>typeof e=="object"&&e!==null,UT=e=>/^0[^.\s]+$/u.test(e);function VT(e){let t;return()=>(t===void 0&&(t=e()),t)}const Xt=e=>e,$l=(...e)=>e.reduce((t,n)=>r=>n(t(r))),yl=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class gy{constructor(){this.subscriptions=[]}add(t){return my(this.subscriptions,t),()=>Xu(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const At=e=>e*1e3,Qt=e=>e/1e3,BT=(e,t)=>
vendor: 8,535 bytes, line 331
331t?e*(1e3/t):0,zT=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,CV=1e-7,AV=12;function RV(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=zT(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>CV&&++a<AV);return o}function Fl(e,t,n,r){if(e===t&&n===r)return Xt;const s=i=>RV(i,0,1,e,n);return i=>i===0||i===1?i:zT(s(i),t,r)}const HT=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,WT=e=>t=>1-e(1-t),qT=Fl(.33,1.53,.69,.99),yy=WT(qT),KT=HT(yy),GT=e=>e>=1?1:(e*=2)<1?.5*yy(e):.5*(2-Math.pow(2,-10*(e-1))),vy=e=>1-Math.sin(Math.acos(e)),QT=WT(vy),YT=HT(vy),PV=Fl(.42,0,1,1),jV=Fl(0,0,.58,1),JT=Fl(.42,0,.58,1),OV=e=>Array.isArray(e)&&typeof e[0]!="number",XT=e=>Array.isArray(e)&&typeof e[0]=="number",Ww={linear:Xt,easeIn:PV,easeInOut:JT,easeOut:jV,circIn:vy,circInOut:YT,circOut:QT,backIn:yy,backInOut:KT,backOut:qT,anticipate:GT},NV=e=>typeof e=="string",qw=e=>{if(XT(e)){Co(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return Fl(t,n,r,s)}else if(NV(e))return Co(Ww[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Ww[e];return e},Ac=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Kw={value:null,addProjectionMetrics:null};function IV(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){o.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,p=!1,h=!1)=>{const g=h&&s?n:r;return p&&o.add(d),g.add(d),d},cancel:d=>{r.delete(d),o.delete(d)},process:d=>{if(a=d,s){i=!0;return}s=!0;const p=n;n=r,r=p,n.forEach(c),t&&Kw.value&&Kw.value.frameloop[t].push(l),l=0,n.clear(),s=!1,i&&(i=!1,u.process(d))}};return u}const LV=40;function ZT(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Ac.reduce((w,S)=>(w[S]=IV(i,t?S:void 0),w),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:p,render:h,postRender:v}=o,g=()=>{const w=ls.useManualTiming,S=w?s.timestamp:performance.now();n=!1,w||(s.delta=r?1e3/60:Math.max(Math.min(S-s.timestamp,LV),1)),s.timestamp=S,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),p.process(s),h.process(s),v.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(g))},x=()=>{n=!0,r=!0,s.isProcessing||e(g)};return{schedule:Ac.reduce((w,S)=>{const _=o[S];return w[S]=(E,T=!1,C=!1)=>(n||x(),_.schedule(E,T,C)),w},{}),cancel:w=>{for(let S=0;S<Ac.length;S++)o[Ac[S]].cancel(w)},state:s,steps:o}}const{schedule:ye,cancel:cs,state:et,steps:rf}=ZT(typeof requestAnimationFrame<"u"?requestAnimationFrame:Xt,!0);let tu;function DV(){tu=void 0}const ft={now:()=>(tu===void 0&&ft.set(et.isProcessing||ls.useManualTiming?et.timestamp:performance.now()),tu),set:e=>{tu=e,queueMicrotask(DV)}},ek=e=>t=>typeof t=="string"&&t.startsWith(e),tk=ek("--"),MV=ek("var(--"),wy=e=>MV(e)?$V.test(e.split("/*")[0].trim()):!1,$V=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Gw(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Vo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},vl={...Vo,transform:e=>Wn(0,1,e)},Rc={...Vo,default:1},Ia=e=>Math.round(e*1e5)/1e5,by=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function FV(e){return e==null}const UV=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,xy=(e,t)=>n=>!!(typeof n=="string"&&UV.test(n)&&n.startsWith(e)||t&&!FV(n)&&Object.prototype.hasOwnProperty.call(n,t)),nk=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(by);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},VV=e=>Wn(0,255,e),sf={...Vo,transform:e=>Math.round(VV(e))},js={test:xy("rgb","red"),parse:nk("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+sf.transform(e)+", "+sf.transform(t)+", "+sf.transform(n)+", "+Ia(vl.transform(r))+")"};function BV(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const fm={test:xy("#"),parse:BV,transform:js.transform},Ul=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),kr=Ul("deg"),Bn=Ul("%"),K=Ul("px"),zV=Ul("vh"),HV=Ul("vw"),Qw={...Bn,parse:e=>Bn.parse(e)/100,transform:e=>Bn.transform(e*100)},Bi={test:xy("hsl","hue"),parse:nk("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Bn.transform(Ia(t))+", "+Bn.transform(Ia(n))+", "+Ia(vl.transform(r))+")"},Ue={test:e=>js.test(e)||fm.test(e)||Bi.test(e),parse:e=>js.test(e)?js.parse(e):Bi.test(e)?Bi.parse(e):fm.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?js.transform(e):Bi.transform(e),getAnimatableNone:e=>{const t=Ue.parse(e);return t.alpha=0,Ue.transform(t)}},WV=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qV(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(by))==null?void 0:t.length)||0)+(((n=e.match(WV))==null?void 0:n.length)||0)>0}const rk="number",sk="color",KV="var",GV="var(",Yw="${}",QV=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ao(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(QV,l=>(Ue.test(l)?(r.color.push(i),s.push(sk),n.push(Ue.parse(l))):l.startsWith(GV)?(r.var.push(i),s.push(KV),n.push(l)):(r.number.push(i),s.push(rk),n.push(parseFloat(l))),++i,Yw)).split(Yw);return{values:n,split:a,indexes:r,types:s}}function YV(e){return Ao(e).values}function ik({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=e[i],r[i]!==void 0){const o=t[i];o===rk?s+=Ia(r[i]):o===sk?s+=Ue.transform(r[i]):s+=r[i]}return s}}function JV(e){return ik(Ao(e))}const XV=e=>typeof e=="number"?0:Ue.test(e)?Ue.getAnimatableNone(e):e,ZV=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:XV(e);function e4(e){const t=Ao(e);return ik(t)(t.values.map((r,s)=>ZV(r,t.split[s])))}const xn={test:qV,parse:YV,createTransformer:JV,getAnimatableNone:e4};function of(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function t4({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=of(l,a,e+1/3),i=of(l,a,e),o=of(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Zu(e,t){return n=>n>0?t:e}const Se=(e,t,n)=>e+(t-e)*n,af=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},n4=[fm,js,Bi],r4=e=>n4.find(t=>t.test(e));function Jw(e){const t=r4(e);if(qd(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Bi&&(n=t4(n)),n}const Xw=(e,t)=>{const n=Jw(e),r=Jw(t);if(!n||!r)return Zu(e,t);const s={...n};return i=>(s.red=af(n.red,r.red,i),s.green=af(n.green,r.green,i),s.blue=af(n.blue,r.blue,i),s.alpha=Se(n.alpha,r.alpha,i),js.transform(s))},pm=new Set(["none","hidden"]);function s4(e,t){return pm.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function i4(e,t){return n=>Se(e,t,n)}function Sy(e){return typeof e=="number"?i4:typeof e=="string"?wy(e)?Zu:Ue.test(e)?Xw:l4:Array.isArray(e)?ok:typeof e=="object"?Ue.test(e)?Xw:o4:Zu}function ok(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>Sy(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function o4(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Sy(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function a4(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],o=e.indexes[i][r[i]],a=e.values[o]??0;n[s]=a,r[i]++}return n}const l4=(e,t)=>{const n=xn.createTransformer(t),r=Ao(e),s=Ao(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?pm.has(e)&&!s.values.length||pm.has(t)&&!r.values.length?s4(e,t):$l(ok(a4(r,s),s.values),n):(qd(!0,`Complex values '${e}' and '${t}
331' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Zu(e,t))};function ak(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Se(e,t,n):Sy(e)(e,t)}const c4=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ye.update(t,n),stop:()=>cs(t),now:()=>et.isProcessing?et.timestamp:ft.now()}},lk=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},ed=2e4;function _y(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ed;)t+=n,r=e.next(t);return t>=ed?1/0:t}function u4(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(_y(r),ed);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:Qt(s)}}const Ae={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function mm(e,t){return e*Math.sqrt(1-t*t)}const d4=12;function h4(e,t,n){let r=n;for(let s=1;s<d4;s++)r=r-e(r)/t(r);return r}const lf=.001;function f4({duration:e=Ae.duration,bounce:t=Ae.bounce,velocity:n=Ae.velocity,mass:r=Ae.mass}){let s,i;qd(e<=At(Ae.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Wn(Ae.minDamping,Ae.maxDamping,o),e=Wn(Ae.minDuration,Ae.maxDuration,Qt(e)),o<1?(s=c=>{const u=c*o,d=u*e,p=u-n,h=mm(c,o),v=Math.exp(-d);return lf-p/h*v},i=c=>{const d=c*o*e,p=d*n+n,h=Math.pow(o,2)*Math.pow(c,2)*e,v=Math.exp(-d),g=mm(Math.pow(c,2),o);return(-s(c)+lf>0?-1:1)*((p-h)*v)/g}):(s=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-lf+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=h4(s,i,a);if(e=At(e),isNaN(l))return{stiffness:Ae.stiffness,damping:Ae.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const p4=["duration","bounce"],m4=["stiffness","damping","mass"];function Zw(e,t){return t.some(n=>e[n]!==void 0)}function g4(e){let t={velocity:Ae.velocity,stiffness:Ae.stiffness,damping:Ae.damping,mass:Ae.mass,isResolvedFromDuration:!1,...e};if(!Zw(e,m4)&&Zw(e,p4))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Wn(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Ae.mass,stiffness:s,damping:i}}else{const n=f4({...e,velocity:0});t={...t,...n,mass:Ae.mass},t.isResolvedFromDuration=!0}return t}function td(e=Ae.visualDuration,t=Ae.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:h}=g4({...n,velocity:-Qt(n.velocity||0)}),v=p||0,g=c/(2*Math.sqrt(l*u)),x=o-i,y=Qt(Math.sqrt(l/u)),b=Math.abs(x)<5;r||(r=b?Ae.restSpeed.granular:Ae.restSpeed.default),s||(s=b?Ae.restDelta.granular:Ae.restDelta.default);let w,S,_,E,T,C;if(g<1)_=mm(y,g),E=(v+g*y*x)/_,w=A=>{const M=Math.exp(-g*y*A);return o-M*(E*Math.sin(_*A)+x*Math.cos(_*A))},T=g*y*E+x*_,C=g*y*x-E*_,S=A=>Math.exp(-g*y*A)*(T*Math.sin(_*A)+C*Math.cos(_*A));else if(g===1){w=M=>o-Math.exp(-y*M)*(x+(v+y*x)*M);const A=v+y*x;S=M=>Math.exp(-y*M)*(y*A*M-v)}else{const A=y*Math.sqrt(g*g-1);w=D=>{const Y=Math.exp(-g*y*D),H=Math.min(A*D,300);return o-Y*((v+g*y*x)*Math.sinh(H)+A*x*Math.cosh(H))/A};const M=(v+g*y*x)/A,I=g*y*M-x*A,Q=g*y*x-M*A;S=D=>{const Y=Math.exp(-g*y*D),H=Math.min(A*D,300);return Y*(I*Math.sinh(H)+Q*Math.cosh(H))}}const O={calculatedDuration:h&&d||null,velocity:A=>At(S(A)),next:A=>{if(!h&&g<1){const I=Math.exp(-g*y*A),Q=Math.sin(_*A),D=Math.cos(_*A),Y=o-I*(E*Q+x*D),H=At(I*(T*Q+C*D));return a.done=Math.abs(H)<=r&&Math.abs(o-Y)<=s,a.value=a.done?o:Y,a}const M=w(A);if(h)a.done=A>=d;else{const I=At(S(A));a.done=Math.abs(I)<=r&&Math.abs(o-M)<=s}return a.value=a.done?o:M,a},toString:()=>{const A=Math.min(_y(O),ed),M=lk(I=>O.next(A*I).value,A,30);return A+"ms "+M},toTransition:()=>{}};return O}td.applyToOptions=e=>{const t=u4(e,100,td);return e.ease=t.ease,e.duration=At(t.duration),e.type="keyframes",e};const y4=5;function ck(e,t,n){const r=Math.max(t-y4,0);return BT(n-e(r),t-r)}function gm({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},h=C=>a!==void 0&&C<a||l!==void 0&&C>l,v=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let g=n*t;const x=d+g,y=o===void 0?x:o(x);y!==x&&(g=y-d);const b=C=>-g*Math.exp(-C/r),w=C=>y+b(C),S=C=>{const O=b(C),A=w(C);p.done=Math.abs(O)<=c,p.value=p.done?y:A};let _,E;const T=C=>{h(p.value)&&(_=C,E=td({keyframes:[p.value,v(p.value)],velocity:ck(w,C,p.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:C=>{let O=!1;return!E&&_===void 0&&(O=!0,S(C),T(C)),_!==void 0&&C>=_?E.next(C-_):(!O&&S(C),p)}}}function v4(e,t,n){const r=[],s=n||ls.mix||ak,i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Xt:t;a=$l(l,a)}r.push(a)}return r}function w4(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(Co(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=v4(t,r,s),l=a.length,c=u=>{if(o&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const p=yl(e[d],e[d+1],u);return a[d](p)};return n?u=>c(Wn(e[0],e[i-1],u)):c}function b4(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=yl(0,t,r);e.push(Se(n,1,s))}}function x4(e){const t=[0];return b4(t,e.length-1),t}function S4(e,t){return e.map(n=>n*t)}function _4(e,t){return e.map(()=>t||JT).splice(0,e.length-1)}function La({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=OV(r)?r.map(qw):qw(r),i={done:!1,value:t[0]},o=S4(n&&n.length===t.length?n:x4(t),e),a=w4(o,t,{ease:Array.isArray(s)?s:_4(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const E4=e=>e!==null;function Kd(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(E4),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const T4={decay:gm,inertia:gm,tween:La,keyframes:La,spring:td};function uk(e){typeof e.type=="string"&&(e.type=T4[e.type])}class Ey{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const k4=e=>e/100;
vendor: 7,143 bytes, line 331
331class nd extends Ey{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==ft.now()&&this.tick(ft.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;uk(t);const{type:n=La,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const l=n||La;l!==La&&typeof a[0]!="number"&&(this.mixKeyframes=$l(k4,ak(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=_y(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:p,repeatDelay:h,type:v,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?y<0:y>s;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let w=this.currentTime,S=r;if(d){const C=Math.min(this.currentTime,s)/a;let O=Math.floor(C),A=C%1;!A&&C>=1&&(A=1),A===1&&O--,O=Math.min(O,d+1),!!(O%2)&&(p==="reverse"?(A=1-A,h&&(A-=h/a)):p==="mirror"&&(S=o)),w=Wn(0,1,A)*a}let _;b?(this.delayState.value=u[0],_=this.delayState):_=S.next(w),i&&!b&&(_.value=i(_.value));let{done:E}=_;!b&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return T&&v!==gm&&(_.value=Kd(u,this.options,x,this.speed)),g&&g(_.value),T&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return Qt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Qt(t)}get time(){return Qt(this.currentTime)}set time(t){t=At(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return ck(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(ft.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=Qt(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=c4,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ft.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function C4(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Os=e=>e*180/Math.PI,ym=e=>{const t=Os(Math.atan2(e[1],e[0]));return vm(t)},A4={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ym,rotateZ:ym,skewX:e=>Os(Math.atan(e[1])),skewY:e=>Os(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},vm=e=>(e=e%360,e<0&&(e+=360),e),eb=ym,tb=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),nb=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),R4={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tb,scaleY:nb,scale:e=>(tb(e)+nb(e))/2,rotateX:e=>vm(Os(Math.atan2(e[6],e[5]))),rotateY:e=>vm(Os(Math.atan2(-e[2],e[0]))),rotateZ:eb,rotate:eb,skewX:e=>Os(Math.atan(e[4])),skewY:e=>Os(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function wm(e){return e.includes("scale")?1:0}function bm(e,t){if(!e||e==="none")return wm(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=R4,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=A4,s=a}if(!s)return wm(t);const i=r[t],o=s[1].split(",").map(j4);return typeof i=="function"?i(o):o[i]}const P4=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return bm(n,t)};function j4(e){return parseFloat(e.trim())}const Bo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],zo=new Set(Bo),rb=e=>e===Vo||e===K,O4=new Set(["x","y","z"]),N4=Bo.filter(e=>!O4.has(e));function I4(e){const t=[];return N4.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const qr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>bm(t,"x"),y:(e,{transform:t})=>bm(t,"y")};qr.translateX=qr.x;qr.translateY=qr.y;const Ws=new Set;let xm=!1,Sm=!1,_m=!1;function dk(){if(Sm){const e=Array.from(Ws).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=I4(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);
331s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Sm=!1,xm=!1,Ws.forEach(e=>e.complete(_m)),Ws.clear()}function hk(){Ws.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Sm=!0)})}function L4(){_m=!0,hk(),dk(),_m=!1}class Ty{constructor(t,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ws.add(this),xm||(xm=!0,ye.read(hk),ye.resolveKeyframes(dk))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}C4(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ws.delete(this)}cancel(){this.state==="scheduled"&&(Ws.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const D4=e=>e.startsWith("--");function fk(e,t,n){D4(t)?e.style.setProperty(t,n):e.style[t]=n}const M4={};function pk(e,t){const n=VT(e);return()=>M4[t]??n()}const $4=pk(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),mk=pk(()=>{try{document.createElement("div").animate({opacity:0}
331,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ya=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,sb={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ya([0,.65,.55,1]),circOut:ya([.55,0,1,.45]),backIn:ya([.31,.01,.66,-.59]),backOut:ya([.33,1.53,.69,.99])};function gk(e,t){if(e)return typeof e=="function"?mk()?lk(e,t):"ease-out":XT(e)?ya(e):Array.isArray(e)?e.map(n=>gk(n,t)||sb.easeOut):sb[e]}function F4(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=gk(a,s);Array.isArray(d)&&(u.easing=d);const p={delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return c&&(p.pseudoElement=c),e.animate(u,p)}function yk(e){return typeof e=="function"&&"applyToOptions"in e}function U4({type:e,...t}){return yk(e)&&mk()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class vk extends Ey{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,Co(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=U4(t);this.animation=F4(n,r,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Kd(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),fk(n,r,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Qt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Qt(t)}get time(){return Qt(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=At(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&$4()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),Xt):s(this)}}const wk={anticipate:GT,backInOut:KT,circInOut:YT};function V4(e){return e in wk}function B4(e){typeof e.ease=="string"&&V4(e.ease)&&(e.ease=wk[e.ease])}const cf=10;class z4 extends vk{constructor(t){B4(t),uk(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new nd({...o,autoplay:!1}),l=Math.max(cf,ft.now()-this.startTime),c=Wn(0,cf,l-cf),u=a.sample(l).value,{name:d}=this.options;i&&d&&fk(i,d,u),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const ib=(e,t)=>
331t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(xn.test(e)||e==="0")&&!e.startsWith("url("));function H4(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function W4(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=ib(s,t),a=ib(i,t);return qd(o===a,`You are trying to animate ${t} from "${s}" to "${i}". "${o?i:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:H4(e)||(n==="spring"||yk(n))&&r}function Em(e){e.duration=0,e.type="keyframes"}const bk=new Set(["opacity","clipPath","filter","transform"]),q4=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function K4(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&q4.test(e[t]))return!0;return!1}const G4=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Q4=VT(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Y4(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:a}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return Q4()&&n&&(bk.has(n)||G4.has(n)&&K4(a))&&(n!=="transform"||!u)&&!c&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const J4=40;class X4 extends Ey{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var v;super(),this.stop=()=>{var g,x;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=ft.now();const p={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:l,motionValue:c,element:u,...d},h=(u==null?void 0:u.KeyframeResolver)||Ty;this.keyframeResolver=new h(a,(g,x,y)=>this.onKeyframesResolved(g,x,p,!y),l,c,u),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,n,r,s){var y,b;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=ft.now();let d=!0;W4(t,i,o,a)||(d=!1,(ls.instantAnimations||!l)&&(u==null||u(Kd(t,r,n))),t[0]=t[t.length-1],Em(r),r.repeat=0);const h={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>J4?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},v=d&&!c&&Y4(h),g=(b=(y=h.motionValue)==null?void 0:y.owner)==null?void 0:b.current;let x;if(v)try{x=new z4({...h,element:g})}catch{x=new nd(h)}else x=new nd(h);x.finished.then(()=>{this.notifyFinished()}).catch(Xt),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),L4()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function xk(e,t,n,r=0,s=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const Z4=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function eB(e){const t=Z4.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const tB=4;function Sk(e,t,n=1){Co(n<=tB,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=eB(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return $T(o)?parseFloat(o):o}return wy(s)?Sk(s,t,n+1):s}const nB={type:"spring",stiffness:500,damping:25,restSpeed:10},rB=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),sB={type:"keyframes",duration:.8},iB={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},oB=(e,{keyframes:t})=>t.length>2?sB:zo.has(e)?e.startsWith("scale")?rB(t[1]):nB:iB;function _k(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function ky(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?_k(n,e):n}const aB=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function lB(e){for(const t in e)if(!aB.has(t))return!0;return!1}const Cy=(e,t,n,r={},s,i)=>o=>{const a=ky(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-At(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};lB(a)||Object.assign(u,oB(e,u)),u.duration&&(u.duration=At(u.duration)),u.repeatDelay&&(u.repeatDelay=At(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Em(u),u.delay===0&&(
331d=!0)),(ls.instantAnimations||ls.skipAnimations||s!=null&&s.shouldSkipAnimations||a.skipAnimations)&&(d=!0,Em(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const p=Kd(u.keyframes,a);if(p!==void 0){ye.update(()=>{u.onUpdate(p),u.onComplete()});return}}return a.isSync?new nd(u):new X4(u)};function ob(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ay(e,t,n,r){if(typeof t=="function"){const[s,i]=ob(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=ob(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function qs(e,t,n){const r=e.getProps();return Ay(r,t,n!==void 0?n:r.custom,e)}const Ek=new Set(["width","height","top","left","right","bottom",...Bo]),ab=30,cB=e=>!isNaN(parseFloat(e));class uB{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=ft.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ft.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=cB(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new gy);const r=this.events[t].add(n);return t==="change"?()=>{r(),ye.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ft.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ab)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ab);return BT(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ro(e,t){return new uB(e,t)}const Tm=e=>Array.isArray(e);function dB(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ro(n))}function hB(e){return Tm(e)?e[e.length-1]||0:e}function fB(e,t){const n=qs(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=hB(i[o]);dB(e,o,a)}}const nt=e=>!!(e&&e.getVelocity);function pB(e){return!!(nt(e)&&e.add)}function km(e,t){const n=e.getValue("willChange");if(pB(n))return n.add(t);if(!n&&ls.WillChange){const r=new ls.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Ry(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const mB="framerAppearId",Tk="data-"+Ry(mB);function kk(e){return e.props[Tk]}function gB({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ck(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();i=i?_k(i,l):l;const c=i==null?void 0:i.reduceMotion,u=i==null?void 0:i.skipAnimations;r&&(i=r);const d=[],p=s&&e.animationState&&e.animationState.getState()[s];for(const h in a){const v=e.getValue(h,e.latestValues[h]??null),g=
vendor: 4,314 bytes, line 331
331a[h];if(g===void 0||p&&gB(p,h))continue;const x={delay:n,...ky(i||{},h)};u&&(x.skipAnimations=!0);const y=v.get();if(y!==void 0&&!v.isAnimating()&&!Array.isArray(g)&&g===y&&!x.velocity){ye.update(()=>v.set(g));continue}let b=!1;if(window.MotionHandoffAnimation){const _=kk(e);if(_){const E=window.MotionHandoffAnimation(_,h,ye);E!==null&&(x.startTime=E,b=!0)}}km(e,h);const w=c??e.shouldReduceMotion;v.start(Cy(h,v,g,w&&Ek.has(h)?{type:!1}:x,e,b));const S=v.animation;S&&d.push(S)}if(o){const h=()=>ye.update(()=>{o&&fB(e,o)});d.length?Promise.all(d).then(h):h()}return d}function Cm(e,t,n={}){var l;const r=qs(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(Ck(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=s;return yB(e,t,c,u,d,p,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,u]=a==="beforeChildren"?[i,o]:[o,i];return c().then(()=>u())}else return Promise.all([i(),o(n.delay)])}function yB(e,t,n=0,r=0,s=0,i=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Cm(l,t,{...o,delay:n+(typeof r=="function"?0:r)+xk(e.variantChildren,l,r,s,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function vB(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Cm(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Cm(e,t,n);else{const s=typeof t=="function"?qs(e,t,n.custom):t;r=Promise.all(Ck(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const wB={test:e=>e==="auto",parse:e=>e},Ak=e=>t=>t.test(e),Rk=[Vo,K,Bn,kr,HV,zV,wB],lb=e=>Rk.find(Ak(e));function bB(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||UT(e):!0}const xB=new Set(["brightness","contrast","saturate","opacity"]);function SB(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(by)||[];if(!r)return e;const s=n.replace(r,"");let i=xB.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const _B=/\b([a-z-]*)\(.*?\)/gu,Am={...xn,getAnimatableNone:e=>{const t=e.match(_B);return t?t.map(SB).join(" "):e}},Rm={...xn,getAnimatableNone:e=>{const t=xn.parse(e);return xn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},cb={...Vo,transform:Math.round},EB={rotate:kr,rotateX:kr,rotateY:kr,rotateZ:kr,scale:Rc,scaleX:Rc,scaleY:Rc,scaleZ:Rc,skew:kr,skewX:kr,skewY:kr,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:vl,originX:Qw,originY:Qw,originZ:K},Py={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,inset:K,insetBlock:K,insetBlockStart:K,insetBlockEnd:K,insetInline:K,insetInlineStart:K,insetInlineEnd:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,paddingBlock:K,paddingBlockStart:K,paddingBlockEnd:K,paddingInline:K,paddingInlineStart:K,paddingInlineEnd:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,marginBlock:K,marginBlockStart:K,marginBlockEnd:K,marginInline:K,marginInlineStart:K,marginInlineEnd:K,fontSize:K,backgroundPositionX:K,backgroundPositionY:K,...EB,zIndex:cb,fillOpacity:vl,strokeOpacity:vl,numOctaves:cb},TB={...Py,color:Ue,backgroundColor:Ue,outlineColor:Ue,fill:Ue,stroke:Ue,borderColor:Ue,borderTopColor:Ue,borderRightColor:Ue,borderBottomColor:Ue,borderLeftColor:Ue,filter:Am,WebkitFilter:Am,mask:Rm,WebkitMask:Rm},Pk=e=>TB[e],kB=new Set([Am,Rm]);function jk(e,t){let n=Pk(e);return kB.has(n)||(n=xn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const CB=new Set(["auto","none","0"]);function AB(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!CB.has(i)&&Ao(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=jk(n,s)}class RB extends Ty{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];
vendor: 1,295 bytes, line 331
331if(typeof d=="string"&&(d=d.trim(),wy(d))){const p=Sk(d,n.current);p!==void 0&&(t[u]=p),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Ek.has(r)||t.length!==2)return;const[s,i]=t,o=lb(s),a=lb(i),l=Gw(s),c=Gw(i);if(l!==c&&qr[r]){this.needsMeasurement=!0;return}if(o!==a)if(rb(o)&&rb(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else qr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||bB(t[s]))&&r.push(s);r.length&&AB(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=qr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=qr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEac
vendor: 26,335 bytes, line 331
331h(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Ok(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const Nk=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function PB(e){return FT(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:jy,cancel:mH}=ZT(queueMicrotask,!1),un={x:!1,y:!1};function Ik(){return un.x||un.y}function jB(e){return e==="x"||e==="y"?un[e]?null:(un[e]=!0,()=>{un[e]=!1}):un.x||un.y?null:(un.x=un.y=!0,()=>{un.x=un.y=!1})}function Lk(e,t){const n=Ok(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function OB(e){return!(e.pointerType==="touch"||Ik())}function NB(e,t,n={}){const[r,s,i]=Lk(e,n);return r.forEach(o=>{let a=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",v)},d=x=>{c&&(c(x),c=void 0),u()},p=x=>{a=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),l&&(l=!1,d(x))},h=()=>{a=!0,window.addEventListener("pointerup",p,s),window.addEventListener("pointercancel",p,s)},v=x=>{if(x.pointerType!=="touch"){if(a){l=!0;return}d(x)}},g=x=>{if(!OB(x))return;l=!1;const y=t(o,x);typeof y=="function"&&(c=y,o.addEventListener("pointerleave",v,s))};o.addEventListener("pointerenter",g,s),o.addEventListener("pointerdown",h,s)}),i}const Dk=(e,t)=>t?e===t?!0:Dk(e,t.parentElement):!1,Oy=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,IB=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function LB(e){return IB.has(e.tagName)||e.isContentEditable===!0}const DB=new Set(["INPUT","SELECT","TEXTAREA"]);function MB(e){return DB.has(e.tagName)||e.isContentEditable===!0}const nu=new WeakSet;function ub(e){return t=>{t.key==="Enter"&&e(t)}}function uf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const $B=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ub(()=>{if(nu.has(n))return;uf(n,"down");const s=ub(()=>{uf(n,"up")}),i=()=>uf(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function db(e){return Oy(e)&&!Ik()}const hb=new WeakSet;function FB(e,t,n={}){const[r,s,i]=Lk(e,n),o=a=>{const l=a.currentTarget;if(!db(a)||hb.has(a))return;nu.add(l),n.stopPropagation&&hb.add(a);const c=t(l,a),u=(h,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),nu.has(l)&&nu.delete(l),db(h)&&typeof c=="function"&&c(h,{success:v})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||Dk(l,h.target))},p=h=>{u(h,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",p,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),PB(a)&&(a.addEventListener("focus",c=>$B(c,s)),!LB(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Ny(e){return FT(e)&&"ownerSVGElement"in e}const ru=new WeakMap;let Cr;const Mk=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:Ny(r)&&"getBBox"in r?r.getBBox()[t]:r[n],UB=Mk("inline","width","offsetWidth"),VB=Mk("block","height","offsetHeight");function BB({target:e,borderBoxSize:t}){var n;(n=ru.get(e))==null||n.forEach(r=>{r(e,{get width(){return UB(e,t)},get height(){return VB(e,t)}})})}function zB(e){e.forEach(BB)}function HB(){typeof ResizeObserver>"u"||(Cr=new ResizeObserver(zB))}function WB(e,t){Cr||HB();const n=Ok(e);return n.forEach(r=>{let s=ru.get(r);s||(s=new Set,ru.set(r,s)),s.add(t),Cr==null||Cr.observe(r)}),()=>{n.forEach(r=>{const s=ru.get(r);s==null||s.delete(t),s!=null&&s.size||Cr==null||Cr.unobserve(r)})}}const su=new Set;let zi;function qB(){zi=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};su.forEach(t=>t(e))},window.addEventListener("resize",zi)}function KB(e){return su.add(e),zi||qB(),()=>{su.delete(e),!su.size&&typeof zi=="function"&&(window.removeEventListener("resize",zi),zi=void 0)}}function fb(e,t){return typeof e=="function"?KB(e):WB(e,t)}function GB(e){return Ny(e)&&e.tagName==="svg"}const QB=[...Rk,Ue,xn],YB=e=>QB.find(Ak(e)),pb=()=>({translate:0,scale:1,origin:0,originPoint:0}),Hi=()=>({x:pb(),y:pb()}),mb=()=>({min:0,max:0}),Be=()=>({x:mb(),y:mb()}),JB=new WeakMap;function Gd(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function wl(e){return typeof e=="string"||Array.isArray(e)}const Iy=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ly=["initial",...Iy];function Qd(e){return Gd(e.animate)||Ly.some(t=>wl(e[t]))}function $k(e){return!!(Qd(e)||e.variants)}function XB(e,t,n){for(const r in t){const s=t[r],i=n[r];if(nt(s))e.addValue(r,s);else if(nt(i))e.addValue(r,Ro(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,Ro(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Pm={current:null},Fk={current:!1},ZB=typeof window<"u";function e5(){if(Fk.current=!0,!!ZB)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Pm.current=e.matches;e.addEventListener("change",t),t()}else Pm.current=!1}const gb=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let rd={};function Uk(e){rd=e}function t5(){return rd}class n5{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Ty,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=ft.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,ye.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Qd(n),this.isVariantNode=$k(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in p){const v=p[h];c[h]!==void 0&&nt(v)&&v.set(c[h])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,JB.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Fk.current||e5(),this.shouldReduceMotion=Pm.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),cs(this.notifyUpdate),cs(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&bk.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,d=new vk({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:At(u)}),p=o(d);this.valueSubscriptions.set(t,()=>{p(),d.cancel()});return}const r=zo.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ye.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in rd){const n=rd[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Be()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<gb.length;r++){const s=gb[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=XB(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Ro(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&($T(r)||UT(r))?r=parseFloat(r):!YB(r)&&xn.test(n)&&(r=jk(t,n)),this.setBaseTarget(t,nt(r)?r.get():r)),nt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Ay(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!nt(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new gy),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){jy.render(this.render)}}class Vk extends n5{constructor(){super(...arguments),this.KeyframeResolver=RB}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;nt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ps{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Bk({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function r5({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function s5(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function df(e){return e===void 0||e===1}function jm({scale:e,scaleX:t,scaleY:n}){return!df(e)||!df(t)||!df(n)}function Ts(e){return jm(e)||zk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function zk(e){return yb(e.x)||yb(e.y)}function yb(e){return e&&e!=="0%"}function sd(e,t,n){const r=e-n,s=t*r;return n+s}function vb(e,t,n,r,s){return s!==void 0&&(e=sd(e,s,r)),sd(e,n,r)+t}function Om(e,t=0,n=1,r,s){e.min=vb(e.min,t,n,r,s),e.max=vb(e.max,t,n,r,s)}function Hk(e,{x:t,y:n}){Om(e.x,t.translate,t.scale,t.originPoint),Om(e.y,n.translate,n.scale,n.originPoint)}const wb=.999999999999,bb=1.0000000000001;function i5(e,t,n,r=!1){var a;const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let l=0;l<s;l++){i=n[l],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(Dn(e.x,-i.scroll.offset.x),Dn(e.y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Hk(e,o)),r&&Ts(i.latestValues)&&iu(e,i.latestValues,(a=i.layout)==null?void 0:a.layoutBox))}t.x<bb&&t.x>wb&&(t.x=1),t.y<bb&&t.y>wb&&(t.y=1)}function Dn(e,t){e.min+=t,e.max+=t}function xb(e,t,n,r,s=.5){const i=Se(e.min,e.max,s);Om(e,t,n,i,r)}function Sb(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function iu(e,t,n){const r=n??e;xb(e.x,Sb(t.x,r.x),t.scaleX,t.scale,t.originX),xb(e.y,Sb(t.y,r.y),t.scaleY,t.scale,t.originY)}function Wk(e,t){return Bk(s5(e.getBoundingClientRect(),t))}function o5(e,t,n){const r=Wk(e,n),{scroll:s}=t;return s&&(Dn(r.x,s.offset.x),Dn(r.y,s.offset.y)),r}const a5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},l5=Bo.length;function c5(e,t,n){let r="",s=!0;for(let i=0;i<l5;i++){const o=Bo[i],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const c=parseFloat(a);l=o.startsWith("scale")?c===1:c===0}if(!l||n){const c=Nk(a,Py[o]);if(!l){s=!1;const u=a5[o]||o;r+=`${u}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function Dy(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(zo.has(l)){o=!0;continue}else if(tk(l)){s[l]=c;continue}else{const u=Nk(c,Py[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(o||n?r.transform=c5(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function qk(e,{style:t,vars:n},r,s){const i=e.style;let o;for(o in t)i[o]=t[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function _b(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const la={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(K.test(e))e=parseFloat(e);else return e;const n=_b(e,t.target.x),r=_b(e,t.target.y);return`${n}% ${r}%`}},u5={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=xn.parse(e);if(s.length>5)return r;const i=xn.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const c=Se(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}},Nm={borderRadius:{...la,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:la,borderTopRightRadius:la,borderBottomLeftRadius:la,borderBottomRightRadius:la,boxShadow:u5};function Kk(e,{layout:t,layoutId:n}){return zo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Nm[e]||e==="opacity")}function My(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const a in r)(nt(r[a])||s&&nt(s[a])||Kk(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function d5(e){return window.getComputedStyle(e)}class h5 extends Vk{constructor(){super(...arguments),this.type="html",this.renderInstance=qk}readValueFromInstance(t,n){var r;if(zo.has(n))return(r=this.projection)!=null&&r.isProjecting?wm(n):P4(t,n);{const s=d5(t),i=(tk(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Wk(t,n)}build(t,n,r){Dy(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return My(t,n,r)}}const f5={offset:"stroke-dashoffset",array:"stroke-dasharray"},p5={offset:"strokeDashoffset",array:"strokeDasharray"};function m5(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?f5:p5;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const g5=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Gk(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},l,c,u){if(Dy(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:p}=e;d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox);for(const h of g5)d[h]!==void 0&&(p[h]=d[h],delete d[h]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&m5(d,s,i,o,!1)}const Qk=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Yk=e=>typeof e=="string"&&e.toLowerCase()==="svg";function y5(e,t,n,r){qk(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(Qk.has(s)?s:Ry(s),t.attrs[s])}function Jk(e,t,n){const r=My(e,t,n);for(const s in e)if(nt(e[s])||nt(t[s])){const i=Bo.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class v5 extends Vk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Be}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(zo.has(n)){const r=Pk(n);return r&&r.default||0}return n=Qk.has(n)?n:Ry(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Jk(t,n,r)}build(t,n,r){Gk(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){y5(t,n,r,s)}mount(t){this.isSVGTag=Yk(t.tagName),super.mount(t)}}const w5=Ly.length;function Xk(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Xk(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<w5;n++){const r=Ly[n],s=e.props[r];(wl(s)||s===!1)&&(t[r]=s)}return t}function Zk(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const b5=[...Iy].reverse(),x5=Iy.length;function S5(e){return t=>Promise.all(t.map(({animation:n,options:r})=>vB(e,n,r)))}function _5(e){let t=S5(e),n=Eb(),r=!0,s=!1;const i=c=>(u,d)=>{var h;const p=qs(e,d,c==="exit"?(h=e.presenceContext)==null?void 0:h.custom:void 0);if(p){const{transition:v,transitionEnd:g,...x}=p;u={...u,...x,...g}}return u};function o(c){t=c(e)}function a(c){const{props:u}=e,d=Xk(e.parent)||{},p=[],h=new Set;let v={},g=1/0;for(let y=0;y<x5;y++){const b=b5[y],w=n[b],S=u[b]!==void 0?u[b]:d[b],_=wl(S),E=b===c?w.isActive:null;E===!1&&(g=y);let T=S===d[b]&&S!==u[b]&&_;if(T&&(r||s)&&e.manuallyAnimateOnMount&&(T=!1),w.protectedKeys={...v},!w.isActive&&E===null||!S&&!w.prevProp||Gd(S)||typeof S=="boolean")continue;if(b==="exit"&&w.isActive&&E!==!0){w.prevResolvedValues&&(v={...v,...w.prevResolvedValues});continue}const C=E5(w.prevProp,S);let O=C||b===c&&w.isActive&&!T&&_||y>g&&_,A=!1;const M=Array.isArray(S)?S:[S];let I=M.reduce(i(b),{});E===!1&&(I={});const{prevResolvedValues:Q={}}=w,D={...Q,...I},Y=P=>{O=!0,h.has(P)&&(A=!0,h.delete(P)),w.needsAnimating[P]=!0;const j=e.getValue(P);j&&(j.liveStyle=!1)};for(const P in D){const j=I[P],$=Q[P];if(v.hasOwnProperty(P))continue;let Z=!1;Tm(j)&&Tm($)?Z=!Zk(j,$)||C:Z=j!==$,Z?j!=null?Y(P):h.add(P):j!==void 0&&h.has(P)?Y(P):w.protectedKeys[P]=!0}w.prevProp=S,w.prevResolvedValues=I,w.isActive&&(v={...v,...I}),(r||s)&&e.blockInitialAnimation&&(O=!1);const H=T&&C;O&&(!H||A)&&p.push(...M.map(P=>{const j={type:b};if(typeof P=="string"&&(r||s)&&!H&&e.manuallyAnimateOnMount&&e.parent){const{parent:$}=e,Z=qs($,P);if($.enteringChildren&&Z){const{delayChildren:R}=Z.transition||{};j.delay=xk($.enteringChildren,e,R)}}return{animation:P,options:j}}))}if(h.size){const y={};if(typeof u.initial!="boolean"){const b=qs(e,Array.isArray(u.initial)?u.initial[0]:u.initial);b&&b.transition&&(y.transition=b.transition)}h.forEach(b=>{const w=e.getBaseTarget(b),S=e.getValue(b);S&&(S.liveStyle=!0),y[b]=w??null}),p.push({animation:y})}let x=!!p.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,s=!1,x?t(p):Promise.resolve()}function l(c,u){var p;if(n[c].isActive===u)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(h=>{var v;return(v=h.animationState)==null?void 0:v.setActive(c,u)}),n[c].isActive=u;const d=a(c);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Eb(),s=!0}}}function E5(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Zk(t,e):!1}function bs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Eb(){return{animate:bs(!0),whileInView:bs(),whileHover:bs(),whileTap:bs(),whileDrag:bs(),whileFocus:bs(),exit:bs()}}function Im(e,t){e.min=t.min,e.max=t.max}function an(e,t){Im(e.x,t.x),Im(e.y,t.y)}function Tb(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const eC=1e-4,T5=1-eC,k5=1+eC,tC=.01,C5=0-tC,A5=0+tC;function pt(e){return e.max-e.min}function R5(e,t,n){return Math.abs(e-t)<=n}function kb(e,t,n,r=.5){e.origin=r,e.originPoint=Se(t.min,t.max,e.origin),e.scale=pt(n)/pt(t),e.translate=Se(n.min,n.max,e.origin)-e.originPoint,(e.scale>=T5&&e.scale<=k5||isNaN(e.scale))&&(e.scale=1),(e.translate>=C5&&e.translate<=A5||isNaN(e.translate))&&(e.translate=0)}function Da(e,t,n,r){kb(e.x,t.x,n.x,r?r.originX:void 0),kb(e.y,t.y,n.y,r?r.originY:void 0)}function Cb(e,t,n,r=0){const s=r?Se(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+pt(t)}function P5(e,t,n,r){Cb(e.x,t.x,n.x,r==null?void 0:r.x),Cb(e.y,t.y,n.y,r==null?void 0:r.y)}function Ab(e,t,n,r=0){const s=r?Se(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+pt(t)}function id(e,t,n,r){Ab(e.x,t.x,n.x,r==null?void 0:r.x),Ab(e.y,t.y,n.y,r==null?void 0:r.y)}function Rb(e,t,n,r,s){return e-=t,e=sd(e,1/n,r),s!==void 0&&(e=sd(e,1/s,r)),e}function j5(e,t=0,n=1,r=.5,s,i=e,o=e){if(Bn.test(t)&&(t=parseFloat(t),t=Se(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Se(i.min,i.max,r);e===i&&(a-=t),e.min=Rb(e.min,t,n,a,s),e.max=Rb(e.max,t,n,a,s)}function Pb(e,t,[n,r,s],i,o){j5(e,t[n],t[r],t[s],t.scale,i,o)}const O5=["x","scaleX","originX"],N5=["y","scaleY","originY"];function jb(e,t,n,r){Pb(e.x,t,O5,n?n.x:void 0,r?r.x:void 0),Pb(e.y,t,N5,n?n.y:void 0,r?r.y:void 0)}function Ob(e){return e.translate===0&&e.scale===1}function nC(e){return Ob(e.x)&&Ob(e.y)}function Nb(e,t){return e.min===t.min&&e.max===t.max}function I5(e,t){return Nb(e.x,t.x)&&Nb(e.y,t.y)}function Ib(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function rC(e,t){return Ib(e.x,t.x)&&Ib(e.y,t.y)}function Lb(e){return pt(e.x)/pt(e.y)}function Db(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Pn(e){return[e("x"),e("y")]}function L5(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:p,skewX:h,skewY:v}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),h&&(r+=`skewX(${h}deg) `),v&&(r+=`skewY(${v}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const sC=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],D5=sC.length,Mb=e=>typeof e=="string"?parseFloat(e):e,$b=e=>typeof e=="number"||K.test(e);function M5(e,t,n,r,s,i){s?(e.opacity=Se(0,n.opacity??1,$5(r)),e.opacityExit=Se(t.opacity??1,0,F5(r))):i&&(e.opacity=Se(t.opacity??1,n.opacity??1,r));for(let o=0;o<D5;o++){const a=sC[o];let l=Fb(t,a),c=Fb(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||$b(l)===$b(c)?(e[a]=Math.max(Se(Mb(l),Mb(c),r),0),(Bn.test(c)||Bn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Se(t.rotate||0,n.rotate||0,r))}function Fb(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const $5=iC(0,.5,QT),F5=iC(.5,.95,Xt);function iC(e,t,n){return r=>r<e?0:r>t?1:n(yl(e,t,r))}
331function U5(e,t,n){const r=nt(e)?e:Ro(e);return r.start(Cy("",r,t,n)),r.animation}function bl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const V5=(e,t)=>e.depth-t.depth;class B5{constructor(){this.children=[],this.isDirty=!1}add(t){my(this.children,t),this.isDirty=!0}remove(t){Xu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(V5),this.isDirty=!1,this.children.forEach(t)}}function z5(e,t){const n=ft.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(cs(r),e(i-t))};return ye.setup(r,!0),()=>cs(r)}function ou(e){return nt(e)?e.get():e}class H5{constructor(){this.members=[]}add(t){my(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(Xu(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Xu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:o}=t.options;(i===void 0||i!==o)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,s,i,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(s=t.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||o.call(i)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const au={hasAnimatedSinceResize:!0,hasEverUpdated:!1},hf=["","X","Y","Z"],W5=1e3;let q5=0;function ff(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function oC(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=kk(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ye,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&oC(r)}function aC({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=q5++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Q5),this.nodes.forEach(t3),this.nodes.forEach(n3),this.nodes.forEach(Y5)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new B5)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new gy),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Ny(o)&&!GB(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const p=()=>this.root.updateBlockedByResize=!1;ye.read(()=>{d=window.innerWidth}),e(o,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=z5(p,250),au.hasAnimatedSinceResize&&(au.hasAnimatedSinceResize=!1,this.nodes.forEac
vendor: 4,537 bytes, line 331
331h(Bb)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:p,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||a3,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=c.getProps(),y=!this.targetLayout||!rC(this.targetLayout,h),b=!d&&p;if(this.options.layoutRoot||this.resumeFrom||b||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...ky(v,"layout"),onPlay:g,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,b)}else d||Bb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),cs(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(r3),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&oC(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(X5),this.nodes.forEach(Ub);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Vb);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Z5),this.nodes.forEach(e3),this.nodes.forEach(K5),this.nodes.forEach(G5)):this.nodes.forEach(Vb),this.clearAllSnapshots();const a=ft.now();et.delta=Wn(0,1e3/60,a-et.timestamp),et.timestamp=a,et.isProcessing=!0,rf.update.process(et),rf.preRender.process(et),rf.render.process(et),et.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,jy.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(J5),this.sharedNodes.forEach(s3)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ye.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ye.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!pt(this.snapshot.measuredBox.x)&&!pt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Be()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);
331this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!nC(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||Ts(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),l3(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Be();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(c3))){const{scroll:u}=this.root;u&&(Dn(a.x,u.offset.x),Dn(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=Be();if(an(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:p}=u;u!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&an(a,o),Dn(a.x,d.offset.x),Dn(a.y,d.offset.y))}return a}applyTransform(o,a=!1,l){var u,d;const c=l||Be();an(c,o);for(let p=0;p<this.path.length;p++){const h=this.path[p];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(Dn(c.x,-h.scroll.offset.x),Dn(c.y,-h.scroll.offset.y)),Ts(h.latestValues)&&iu(c,h.latestValues,(u=h.layout)==null?void 0:u.layoutBox)}return Ts(this.latestValues)&&iu(c,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),c}removeTransform(o){var l;const a=Be();an(a,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!Ts(u.latestValues))continue;let d;u.instance&&(jm(u.latestValues)&&u.updateSnapshot(),d=Be(),an(d,u.measurePageBox())),jb(a,u.latestValues,(l=u.snapshot)==null?void 0:l.layoutBox,d)}return Ts(this.latestValues)&&jb(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==et.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var h;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=et.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Be(),this.targetWithTransforms=Be()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),P5(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):an(this.target,this.layout.layoutBox),Hk(this.target,this.targetDelta)):an(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||jm(this.parent.latestValues)||zk(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Be(),this.relativeTargetOrigin=Be(),id(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),an(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var v;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&
vendor: 5,333 bytes, line 331
331(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===et.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;an(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,p=this.treeScale.y;i5(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Be());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Tb(this.prevProjectionDelta.x,this.projectionDelta.x),Tb(this.prevProjectionDelta.y,this.projectionDelta.y)),Da(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==p||!Db(this.projectionDelta.x,this.prevProjectionDelta.x)||!Db(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Hi(),this.projectionDelta=Hi(),this.projectionDeltaWithTransform=Hi()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Hi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=Be(),h=l?l.source:void 0,v=this.layout?this.layout.source:void 0,g=h!==v,x=this.getStack(),y=!x||x.members.length<=1,b=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(o3));this.animationProgress=0;let w;this.mixTargetDelta=S=>{const _=S/1e3;zb(d.x,o.x,_),zb(d.y,o.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(id(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),i3(this.relativeTarget,this.relativeTargetOrigin,p,_),w&&I5(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Be()),an(w,this.relativeTarget)),g&&(this.animationValues=u,M5(u,c,this.latestValues,_,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(cs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ye.update(()=>{au.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ro(0)),this.motionValue.jump(0,!1),this.currentAnimation=U5(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(W5),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&lC(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Be();const d=pt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const p=pt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}an(a,l),iu(a,u),Da(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new H5),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}
vendor: 8,879 bytes, line 331
331resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&ff("z",o,c,this.animationValues);for(let u=0;u<hf.length;u++)ff(`rotate${hf[u]}`,o,c,this.animationValues),ff(`skew${hf[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=ou(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=ou(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Ts(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=L5(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),o.transform=d;const{x:p,y:h}=this.projectionDelta;o.transformOrigin=`${p.origin*100}% ${h.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in Nm){if(u[v]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:y}=Nm[v],b=d==="none"?u[v]:g(u[v],c);if(x){const w=x.length;for(let S=0;S<w;S++)o[x[S]]=b}else y?this.options.visualElement.renderState.vars[v]=b:o[v]=b}this.options.layoutId&&(o.pointerEvents=c===this?ou(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ub),this.root.sharedNodes.clear()}}}function K5(e){e.updateLayout()}function G5(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;if(i==="size")Pn(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],h=pt(p);p.min=r[d].min,p.max=p.min+h});else if(i==="x"||i==="y"){const d=i==="x"?"y":"x";Im(o?t.measuredBox[d]:t.layoutBox[d],r[d])}else lC(i,t.layoutBox,r)&&Pn(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],h=pt(r[d]);p.max=p.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=Hi();Da(a,r,t.layoutBox);const l=Hi();o?Da(l,e.applyTransform(s,!0),t.measuredBox):Da(l,r,t.layoutBox);const c=!nC(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:h}=d;if(p&&h){const v=e.options.layoutAnchor||void 0,g=Be();id(g,t.layoutBox,p.layoutBox,v);const x=Be();id(x,r,h.layoutBox,v),rC(g,x)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Q5(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Y5(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function J5(e){e.clearSnapshot()}function Ub(e){e.clearMeasurements()}function X5(e){e.isLayoutDirty=!0,e.updateLayout()}function Vb(e){e.isLayoutDirty=!1}function Z5(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function e3(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Bb(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function t3(e){e.resolveTargetDelta()}function n3(e){e.calcProjection()}function r3(e){e.resetSkewAndRotation()}function s3(e){e.removeLeadSnapshot()}function zb(e,t,n){e.translate=Se(t.translate,0,n),e.scale=Se(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Hb(e,t,n,r){e.min=Se(t.min,n.min,r),e.max=Se(t.max,n.max,r)}function i3(e,t,n,r){Hb(e.x,t.x,n.x,r),Hb(e.y,t.y,n.y,r)}function o3(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const a3={duration:.45,ease:[.4,0,.1,1]},Wb=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),qb=Wb("applewebkit/")&&!Wb("chrome/")?Math.round:Xt;function Kb(e){e.min=qb(e.min),e.max=qb(e.max)}function l3(e){Kb(e.x),Kb(e.y)}function lC(e,t,n){return e==="position"||e==="preserve-aspect"&&!R5(Lb(t),Lb(n),.2)}function c3(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const u3=aC({attachResizeListener:(e,t)=>bl(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),pf={current:void 0},cC=aC({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!pf.current){const e=new u3({});e.mount(window),e.setOptions({layoutScroll:!0}),pf.current=e}return pf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),uC=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function d3(e=!0){const t=m.useContext(py);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=m.useId();m.useEffect(()=>{if(e)return s(i)},[e]);const o=m.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const dC=m.createContext({strict:!1}),Gb={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Qb=!1;function h3(){if(Qb)return;const e={};for(const t in Gb)e[t]={isEnabled:n=>Gb[t].some(r=>!!n[r])};Uk(e),Qb=!0}function hC(){return h3(),t5()}function f3(e){const t=hC();for(const n in e)t[n]={...t[n],...e[n]};Uk(t)}const p3=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function od(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||p3.has(e)}let fC=e=>!od(e);function m3(e){typeof e=="function"&&(fC=t=>t.startsWith("on")?!od(t):e(t))}try{m3(require("@emotion/is-prop-valid").default)}catch{}function g3(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||nt(e[s])||(fC(s)||n===!0&&od(s)||!t&&!od(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Yd=m.createContext({});function y3(e,t){if(Qd(e)){const{initial:n,animate:r}=e;return{initial:n===!1||wl(n)?n:void 0,animate:wl(r)?r:void 0}}return e.inherit!==!1?t:{}}function v3(e){const{initial:t,animate:n}=y3(e,m.useContext(Yd));return m.useMemo(()=>({initial:t,animate:n}),[Yb(t),Yb(n)])}function Yb(e){return Array.isArray(e)?e.join(" "):e}const $y=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function pC(e,t,n){for(const r in t)!nt(t[r])&&!Kk(r,n)&&(e[r]=t[r])}function w3({transformTemplate:e},t){return m.useMemo(()=>{const n=$y();return Dy(n,t,e),Object.assign({},n.vars,n.style)},[t])}function b3(e,t){const n=e.style||{},r={};return pC(r,n,e),Object.assign(r,w3(e,t)),r}function x3(e,t){const n={},r=b3(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}
331`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const mC=()=>({...$y(),attrs:{}});function S3(e,t,n,r){const s=m.useMemo(()=>{const i=mC();return Gk(i,t,Yk(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};pC(i,e.style,e),s.style={...i,...s.style}}return s}const _3=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Fy(e){return typeof e!="string"||e.includes("-")?!1:!!(_3.indexOf(e)>-1||/[A-Z]/u.test(e))}function E3(e,t,n,{latestValues:r},s,i=!1,o){const l=(o??Fy(e)?S3:x3)(t,r,s,e),c=g3(t,typeof e=="string",i),u=e!==m.Fragment?{...c,...l,ref:n}:{},{children:d}=t,p=m.useMemo(()=>nt(d)?d.get():d,[d]);return m.createElement(e,{...u,children:p})}function T3({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:k3(n,r,s,e),renderState:t()}}function k3(e,t,n,r){const s={},i=r(e,{});for(const p in i)s[p]=ou(i[p]);let{initial:o,animate:a}=e;const l=Qd(e),c=$k(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!Gd(d)){const p=Array.isArray(d)?d:[d];for(let h=0;h<p.length;h++){const v=Ay(e,p[h]);if(v){const{transitionEnd:g,transition:x,...y}=v;for(const b in y){let w=y[b];if(Array.isArray(w)){const S=u?w.length-1:0;w=w[S]}w!==null&&(s[b]=w)}for(const b in g)s[b]=g[b]}}}return s}const gC=e=>(t,n)=>{const r=m.useContext(Yd),s=m.useContext(py),i=()=>T3(e,t,r,s);return n?i():EV(i)},C3=gC({scrapeMotionValuesFromProps:My,createRenderState:$y}),A3=gC({scrapeMotionValuesFromProps:Jk,createRenderState:mC}),R3=Symbol.for("motionComponentSymbol");function P3(e,t,n){const r=m.useRef(n);m.useInsertionEffect(()=>{r.current=n});const s=m.useRef(null);return m.useCallback(i=>{var a;i&&((a=e.onMount)==null||a.call(e,i)),t&&(i?t.mount(i):t.unmount());const o=r.current;if(typeof o=="function")if(i){const l=o(i);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i)},[t])}const yC=m.createContext({});function Ci(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function j3(e,t,n,r,s,i){var w,S;const{visualElement:o}=m.useContext(Yd),a=m.useContext(dC),l=m.useContext(py),c=m.useContext(uC),u=c.reducedMotion,d=c.skipAnimations,p=m.useRef(null),h=m.useRef(!1);r=r||a.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),h.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const v=p.current,g=m.useContext(yC);v&&!v.projection&&s&&(v.type==="html"||v.type==="svg")&&O3(p.current,n,s,g);const x=m.useRef(!1);m.useInsertionEffect(()=>{v&&x.current&&v.update(n,l)});const y=n[Tk],b=m.useRef(!!y&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,y))&&((S=window.MotionHasOptimisedAnimation)==null?void 0:S.call(window,y)));return kV(()=>{h.current=!0,v&&(x.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),b.current&&v.animationState&&v.animationState.animateChanges())}),m.useEffect(()=>{v&&(!b.current&&v.animationState&&v.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var _;(_=window.MotionHandoffMarkAsComplete)==null||_.call(window,y)}),b.current=!1),v.enteringChildren=void 0)}),v}function O3(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:vC(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Ci(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}function vC(e){if(e)return e.options.allowProjection!==!1?e.projection:vC(e.parent)}function mf(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&f3(r);const i=n?n==="svg":Fy(e),o=i?A3:C3;function a(c,u){let d;const p={...m.useContext(uC),...c,layoutId:N3(c)},{isStatic:h}=p,v=v3(c),g=o(c,h);if(!h&&typeof window<"u"){I3();const x=L3(p);d=x.MeasureLayout,v.visualElement=j3(e,g,p,s,x.ProjectionNode,i)}return f.jsxs(Yd.Provider,{value:v,children:[d&&v.visualElement?f.jsx(d,{visualElement:v.visualElement,...p}):null,E3(e,c,P3(g,v.visualElement,u),g,h,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=m.forwardRef(a);return l[R3]=e,l}function N3({layoutId:e}){const t=m.useContext(MT).id;return t&&e!==void 0?t+"-"+e:e}function I3(e,t){m.useContext(dC).strict}function L3(e){const t=hC(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}
vendor: 17,199 bytes, line 331
331function D3(e,t){if(typeof Proxy>"u")return mf;const n=new Map,r=(i,o)=>mf(i,o,e,t),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,mf(o,void 0,e,t)),n.get(o))})}const M3=(e,t)=>t.isSVG??Fy(e)?new v5(t):new h5(t,{allowProjection:e!==m.Fragment});class $3 extends ps{constructor(t){super(t),t.animationState||(t.animationState=_5(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Gd(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let F3=0;class U3 extends ps{constructor(){super(...arguments),this.id=F3++,this.isExitComplete=!1}update(){var i;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const l=qs(this.node,o,a);if(l){const{transition:c,transitionEnd:u,...d}=l;for(const p in d)(i=this.node.getValue(p))==null||i.jump(d[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const V3={animation:{Feature:$3},exit:{Feature:U3}};function Vl(e){return{point:{x:e.pageX,y:e.pageY}}}const B3=e=>t=>Oy(t)&&e(t,Vl(t));function Ma(e,t,n,r){return bl(e,t,B3(n),r)}const wC=({current:e})=>e?e.ownerDocument.defaultView:null,Jb=(e,t)=>Math.abs(e-t);function z3(e,t){const n=Jb(e.x,t.x),r=Jb(e.y,t.y);return Math.sqrt(n**2+r**2)}const Xb=new Set(["auto","scroll"]);class bC{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Pc(this.lastRawMoveEventInfo,this.transformPagePoint));const h=gf(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,g=z3(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!g)return;const{point:x}=h,{timestamp:y}=et;this.history.push({...x,timestamp:y});const{onStart:b,onMove:w}=this.handlers;v||(b&&b(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,h)},this.handlePointerMove=(h,v)=>{this.lastMoveEvent=h,this.lastRawMoveEventInfo=v,this.lastMoveEventInfo=Pc(v,this.transformPagePoint),ye.update(this.updatePoint,!0)},this.handlePointerUp=(h,v)=>{this.end();const{onEnd:g,onSessionEnd:x,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=gf(h.type==="pointercancel"?this.lastMoveEventInfo:Pc(v,this.transformPagePoint),this.history);this.startEvent&&g&&g(h,b),x&&x(h,b)},!Oy(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const l=Vl(t),c=Pc(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=et;this.history=[{...u,timestamp:d}];const{onSessionStart:p}=n;p&&p(t,gf(c,this.history)),this.removeListeners=$l(Ma(this.contextWindow,"pointermove",this.handlePointerMove),Ma(this.contextWindow,"pointerup",this.handlePointerUp),Ma(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Xb.has(r.overflowX)||Xb.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,s),ye.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),cs(this.updatePoint)}}function Pc(e,t){return t?{point:t(e.point)}:e}function Zb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gf({point:e},t){return{point:e,delta:Zb(e,xC(t)),offset:Zb(e,H3(t)),velocity:W3(t,.1)}}function H3(e){return e[0]}function xC(e){return e[e.length-1]}function W3(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=xC(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>At(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>At(t)*2&&(r=e[1]);const i=Qt(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function q3(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Se(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Se(n,e,r.max):Math.min(e,n)),e}function ex(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function K3(e,{top:t,left:n,bottom:r,right:s}){return{x:ex(e.x,n,s),y:ex(e.y,t,r)}}function tx(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function G3(e,t){return{x:tx(e.x,t.x),y:tx(e.y,t.y)}}function Q3(e,t){let n=.5;const r=pt(e),s=pt(t);return s>r?n=yl(t.min,t.max-r,e.min):r>s&&(n=yl(e.min,e.max-s,t.min)),Wn(0,1,n)}function Y3(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Lm=.35;function J3(e=Lm){return e===!1?e=0:e===!0&&(e=Lm),{x:nx(e,"left","right"),y:nx(e,"top","bottom")}}function nx(e,t,n){return{min:rx(e,t),max:rx(e,n)}}function rx(e,t){return typeof e=="number"?e:e[t]||0}const X3=new WeakMap;class Z3{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Be(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=d=>{n&&this.snapToCursor(Vl(d).point),this.stopAnimation()},o=(d,p)=>{const{drag:h,dragPropagation:v,onDragStart:g}=this.getProps();if(h&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=jB(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Pn(y=>{let b=this.getAxisMotionValue(y).get()||0;if(Bn.test(b)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[y];S&&(b=pt(S)*(parseFloat(b)/100))}}this.originPoint[y]=b}),g&&ye.update(()=>g(d,p),!1,!0),km(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,p)=>{this.latestPointerEvent=d,this.latestPanInfo=p;const{dragPropagation:h,dragDirectionLock:v,onDirectionLock:g,onDrag:x}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:y}=p;if(v&&this.currentDirection===null){this.currentDirection=tz(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",p.point,y),this.updateAxis("y",p.point,y),this.visualElement.render(),x&&ye.update(()=>x(d,p),!1,!0)},l=(d,p)=>{this.latestPointerEvent=d,this.latestPanInfo=p,this.stop(d,p),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new bC(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:wC(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ye.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!jc(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=q3(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&Ci(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=K3(r.layoutBox,t):this.constraints=!1,this.elastic=J3(n),s!==this.constraints&&!Ci(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Pn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Y3(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ci(t))return!1;const r=t.current;Co(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;s.root&&(s.root.scroll=void 0,s.root.updateScroll());const i=o5(r,s.root,this.visualElement.getTransformPagePoint());let o=G3(s.layout.layoutBox,i);if(n){const a=n(r5(o));this.hasMutatedConstraints=!!a,a&&(o=Bk(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Pn(u=>{if(!jc(u,n,this.currentDirection))return;let d=l&&l[u]||{};(o===!0||o===u)&&(d={min:0,max:0});const p=s?200:1e6,h=s?40:1e7,v={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return km(this.visualElement,t),r.start(Cy(t,r,0,n,this.visualElement,!1))}stopAnimation(){Pn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Pn(n=>{const{drag:r}=this.getProps();if(!jc(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-Se(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ci(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Pn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=Q3({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Pn(o=>{if(!jc(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(Se(l,c,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;X3.set(this.visualElement,this);const t=this.visualElement.current,n=Ma(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),p=c.target,h=p!==t&&MB(p);u&&d&&!h&&this.start(c)});let r;const s=()=>{const{dragConstraints:c}=this.getProps();Ci(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=ez(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ye.read(s);const a=bl(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Pn(d=>{const p=this.getAxisMotionValue(d);p&&(this.originPoint[d]+=c[d].translate,p.set(p.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Lm,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function sx(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function ez(e,t,n){const r=fb(e,sx(n)),s=fb(t,sx(n));return()=>{r(),s()}}function jc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function tz(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class nz extends ps{constructor(t){super(t),this.removeGroupControls=Xt,this.removeListeners=Xt,this.controls=new Z3(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Xt}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const yf=e=>(t,n)=>{e&&ye.update(()=>e(t,n),!1,!0)};class rz extends ps{constructor(){super(...arguments),this.removePointerDownListener=Xt}onPointerDown(t){this.session=new bC(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:wC(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:yf(t),onStart:yf(n),onMove:yf(r),onEnd:(i,o)=>{delete this.session,s&&ye.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Ma(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let vf=!1;class sz extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),vf&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),au.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),vf=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||ye.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),jy.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;vf=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}
331function SC(e){const[t,n]=d3(),r=m.useContext(MT);return f.jsx(sz,{...e,layoutGroup:r,switchLayoutGroup:m.useContext(yC),isPresent:t,safeToRemove:n})}const iz={pan:{Feature:rz},drag:{Feature:nz,ProjectionNode:cC,MeasureLayout:SC}};function ix(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&ye.postRender(()=>i(t,Vl(t)))}class oz extends ps{mount(){const{current:t}=this.node;t&&(this.unmount=NB(t,(n,r)=>(ix(this.node,r,"Start"),s=>ix(this.node,s,"End"))))}unmount(){}}class az extends ps{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=$l(bl(this.node.current,"focus",()=>this.onFocus()),bl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ox(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&ye.postRender(()=>i(t,Vl(t)))}class lz extends ps{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=FB(t,(s,i)=>(ox(this.node,i,"Start"),(o,{success:a})=>ox(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Dm=new WeakMap,wf=new WeakMap,cz=e=>{const t=Dm.get(e.target);t&&t(e)},uz=e=>{e.forEach(cz)};function dz({root:e,...t}){const n=e||document;wf.has(n)||wf.set(n,{});const r=wf.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(uz,{root:e,...t})),r[s]}function hz(e,t,n){const r=dz(t);return Dm.set(e,n),r.observe(e),()=>{Dm.delete(e),r.unobserve(e)}}const fz={some:0,all:1};class pz extends ps{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:fz[s]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:p}=this.node.getProps(),h=u?d:p;h&&h(c)};this.stopObserver=hz(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(mz(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function mz({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const gz={inView:{Feature:pz},tap:{Feature:lz},focus:{Feature:az},hover:{Feature:oz}},yz={layout:{ProjectionNode:cC,MeasureLayout:SC}},vz={...V3,...gz,...iz,...yz},We=D3(vz,M3),lu=[.22,1,.36,1],zn={hidden:{opacity:0,y:16},visible:{opacity:1,y:0,transition:{duration:.55,ease:lu}}},Ho=(e=0,t=.08)=>({hidden:{},visible:{transition:{delayChildren:e,staggerChildren:t}}}),Wo={once:!0,amount:.25},wz=({accent:e,className:t,children:n,...r})=>f.jsxs("span",{className:ee("inline-flex items-center gap-2 text-eyebrow text-ink-muted",t),...r,children:[e&&f.jsx("span",{"aria-hidden":!0,className:"h-px w-8",style:{background:e}}),n]}),bz={narrow:"container-narrow",default:"container mx-auto px-4 sm:px-6",wide:"container-wide",full:"container-full"},xz={sm:"py-section-sm",md:"py-section",lg:"py-section-lg"},_C=({eyebrow:e,accent:t,title:n,kicker:r,align:s="left",container:i="default",spacing:o="md",className:a,headerClassName:l,children:c,as:u="section",id:d})=>{const p=u;return f.jsx(p,{id:d,className:ee(xz[o],a),children:f.jsxs("div",{className:bz[i],children:[(e||n||r)&&f.jsxs(We.header,{variants:Ho(0,.08),initial:"hidden",
331whileInView:"visible",viewport:Wo,className:ee("max-w-3xl mb-12 lg:mb-16",s==="center"&&"mx-auto text-center",l),children:[e&&f.jsx(We.div,{variants:zn,children:f.jsx(wz,{accent:t,children:e})}),n&&f.jsx(We.h2,{variants:zn,className:"text-h2 mt-5 text-foreground",children:n}),r&&f.jsx(We.p,{variants:zn,className:"text-body-lg mt-5 text-ink-muted",children:r})]}),c]})})},Sz={primary:"bg-primary text-primary-foreground hover:bg-[hsl(var(--primary-hover))] border border-primary",outline:"bg-transparent text-foreground border border-foreground/30 hover:border-foreground hover:bg-foreground hover:text-background","outline-gold":"bg-transparent text-[hsl(var(--metallic))] border border-[hsl(var(--metallic))] hover:bg-[hsl(var(--metallic))] hover:text-[#0d0d0d]","ghost-link":"bg-transparent text-foreground border border-transparent px-0 hover:text-primary"},_z={sm:"px-5 py-2.5 text-xs",md:"px-7 py-3.5 text-sm",lg:"px-9 py-4 text-sm"},Ez="inline-flex items-center gap-2 font-body font-semibold tracking-[0.04em] uppercase rounded-sm transition-colors duration-300",Po=m.forwardRef((e,t)=>{const{variant:n="primary",size:r="md",withArrow:s,className:i,children:o,...a}=e,l=ee(Ez,Sz[n],_z[r],i),c=f.jsxs(f.Fragment,{children:[o,s&&f.jsx(Fu,{size:14,className:"transition-transform group-hover:translate-x-1"})]});if("to"in e&&e.to){const u=e;return f.jsx(Ce,{to:u.to,target:u.target,rel:u.rel,className:ee(l,"group"),children:c})}if("href"in e&&e.href){const{href:u,target:d,rel:p}=e;return f.jsx("a",{href:u,target:d,rel:p,className:ee(l,"group"),children:c})}return f.jsx("button",{ref:t,className:ee(l,"group"),...a,children:c})});Po.displayName="EditorialButton";const Tz=m.forwardRef(({interactive:e=!1,tone:t="light",accent:n,className:r,children:s,style:i,...o},a)=>{const l=t==="dark";return f.jsxs("div",{ref:a,className:ee("relative border",l?"bg-[hsl(var(--ink))] border-[hsl(0,0%,18%)] text-[hsl(0,0%,95%)]":"bg-card border-[hsl(var(--hairline))] text-foreground","rounded-sm",e&&"lift-on-hover cursor-pointer",r),style:i,...o,children:[n&&f.jsx("span",{"aria-hidden":!0,className:"absolute top-0 left-0 h-px w-12",style:{background:n}}),s]})});Tz.displayName="PremiumCard";function kz(){return qe({queryKey:["page_content_all"],queryFn:async()=>{const{data:e,error:t}=await De.from("page_content").select("page_key,section_key,content,label");if(t)throw t;return e??[]},staleTime:6e4})}function Uy(e){return qe({queryKey:["page_content",e],queryFn:async()=>{const{data:t,error:n}=await De.from("page_content").select("section_key,content").eq("page_key",e);if(n)throw n;const r=new Map;return(t??[]).forEach(s=>r.set(s.section_key,s.content)),(s,i)=>r.get(s)||i},staleTime:6e4})}function ax(e){if(!e)return null;const t=e.split(/\r?\n/);return t.map((n,r)=>f.jsxs(m.Fragment,{children:[Rz(n),r<t.length-1&&f.jsx("br",{})]},r))}const Cz=/(\*\*[^*\n]+\*\*|\*[^*\n]+\*|_[^_\n]+_|\[[^\]\n]+\]\([^)\s]+\))/g,Az=/^(https?:\/\/|mailto:|\/|#)/i;function Rz(e){return e.split(Cz).map((n,r)=>{if(!n)return null;if(n.startsWith("**")&&n.endsWith("**"))return f.jsx("span",{className:"text-gradient-gold italic",children:n.slice(2,-2)},r);if(n.startsWith("*")&&n.endsWith("*")||n.startsWith("_")&&n.endsWith("_"))return f.jsx("em",{className:"italic",children:n.slice(1,-1)},r);const s=n.match(/^\[([^\]]+)\]\(([^)]+)\)$/);return s&&Az.test(s[2])?f.jsx("a",{href:s[2],className:"underline hover:text-primary transition-colors",children:s[1]},r):f.jsx(m.Fragment,{children:n},r)})}const Pz=[{name:"Automotive Refinish",color:"hsl(var(--sector-automotive))"},{name:"Car Care",color:"hsl(var(--sector-carcare))"},{name:"Wood Coatings",color:"hsl(var(--sector-wood))"},{name:"Industrial Coatings",color:"hsl(var(--sector-industrial))"},{name:"Royal Lab",color:"hsl(var(--sector-royallab))"}],jz=()=>{const{data:e}=Uy("home"),t=(s,i)=>e?e(s,i):i,n=e?e("hero_headline",""):"",r=t("hero_eyebrow","");return f.jsxs("section",{className:"relative lg:min-h-[92vh] flex flex-col justify-center hero-gradient overflow-hidden",children:[f.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 opacity-[0.06]",style:{backgroundImage:"linear-gradient(to right, #fff 1px, transparent 1px), linear-gradient(to bottom, #fff 1px, transparent 1px)",backgroundSize:"120px 120px"}}
331),f.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 opacity-[0.05] mix-blend-overlay",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")`}}),f.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute -top-40 -right-40 w-[600px] h-[600px] rounded-full opacity-[0.07] blur-3xl",style:{background:"radial-gradient(circle, hsl(var(--metallic)), transparent 60%)"}}),f.jsx("div",{className:"container-wide relative z-10 pt-14 sm:pt-20 lg:pt-40 pb-20 sm:pb-28 lg:pb-40",children:f.jsxs("div",{className:"grid lg:grid-cols-12 gap-10 items-end",children:[f.jsxs(We.div,{initial:{opacity:0,x:-16},animate:{opacity:1,x:0},transition:{duration:.6,ease:lu},className:"lg:col-span-3 flex flex-col gap-3",children:[f.jsxs("span",{className:"text-eyebrow text-[hsl(var(--metallic))]",children:[f.jsx("span",{className:"inline-block w-8 h-px bg-[hsl(var(--metallic))] align-middle mr-2"}),"Est. 6th October City · Egypt"]}),f.jsx("span",{className:"text-eyebrow text-[hsl(0,0%,55%)]",children:r||"Industrial Coatings Manufacturer"})]}),f.jsxs("div",{className:"lg:col-span-9",children:[f.jsx("h1",{className:"text-display text-[hsl(0,0%,98%)]",children:n?ax(n):f.jsxs(f.Fragment,{children:["Engineered to Last.",f.jsx("br",{}),"Made to ",f.jsx("span",{className:"text-gradient-gold italic",children:"Lead."})]})}),f.jsxs(We.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.6,ease:lu,delay:.35},className:"mt-10 grid sm:grid-cols-[1fr_auto] gap-8 items-end max-w-4xl",children:[f.jsx("p",{className:"text-body-lg text-[hsl(0,0%,75%)] max-w-xl",children:(()=>{const s=t("hero_sub","A direct manufacturer of 31 coatings across five industrial divisions — refinish, car care, wood, industrial, and Royal Lab custom formulation.");return ax(s)})()}),f.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[f.jsx(Po,{to:"/products",variant:"primary",size:"md",withArrow:!0,children:t("hero_cta_primary","Explore Products")}),f.jsx(Po,{to:"/contact",variant:"outline-gold",size:"md",children:t("hero_cta_secondary","Request a Quote")})]})]})]})]})}),f.jsx(We.div,{initial:{opacity:0}
331,animate:{opacity:1},transition:{duration:.6,ease:lu,delay:.6},className:"relative lg:absolute lg:bottom-0 lg:left-0 lg:right-0 z-10 border-t border-[hsl(0,0%,15%)] bg-[hsl(0,0%,3%)]/80 backdrop-blur-sm",children:f.jsx("div",{className:"container-wide py-4 lg:py-5",children:f.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-4 sm:gap-6",children:[f.jsx("span",{className:"text-eyebrow text-[hsl(0,0%,45%)] whitespace-nowrap sm:pr-6 sm:border-r border-[hsl(0,0%,15%)]",children:"Divisions / 05"}),f.jsx("ul",{className:"flex flex-wrap items-center gap-x-5 sm:gap-x-8 gap-y-3",children:Pz.map(s=>f.jsxs("li",{className:"flex items-center gap-2.5 whitespace-nowrap",children:[f.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:s.color}}),f.jsx("span",{className:"text-eyebrow text-[hsl(0,0%,80%)]",children:s.name})]},s.name))})]})})})]})},Oz=[{number:"31",label:"Engineered Products",sub:"Across 5 divisions"},{number:"05",label:"Industrial Sectors",sub:"Refinish to Royal Lab"},{number:"20+",label:"Years of Expertise",sub:"Manufacturing heritage"},{number:"01",label:"Direct Manufacturer",sub:"6th October City · EG"}],Nz=()=>{const{data:e}=Uy("home"),t=(r,s)=>e?e(r,s):s,n=Oz.map((r,s)=>({number:t(`stat_${s+1}_value`,r.number),label:t(`stat_${s+1}_label`,r.label),sub:t(`stat_${s+1}_sub`,r.sub)}));return f.jsx("section",{className:"bg-[hsl(var(--ink))] text-[hsl(0,0%,95%)] border-y border-[hsl(0,0%,12%)]",children:f.jsx(We.div,{variants:Ho(0,.08),initial:"hidden",whileInView:"visible",viewport:Wo,className:"container-wide grid grid-cols-2 lg:grid-cols-4",children:n.map((r,s)=>f.jsxs(We.div,{variants:zn,className:`relative px-6 py-12 lg:py-16 ${s!==n.length-1?"lg:border-r border-[hsl(0,0%,12%)]":""} ${s%2===0?"border-r lg:border-r border-[hsl(0,0%,12%)]":""} ${s<2?"border-b lg:border-b-0 border-[hsl(0,0%,12%)]":""}`,children:[f.jsx("span",{className:"absolute top-6 left-6 text-eyebrow text-[hsl(0,0%,35%)]",children:String(s+1).padStart(2,"0")}),f.jsxs("div",{className:"pl-0",children:[f.jsx("div",{className:"font-heading text-5xl lg:text-6xl font-semibold text-[hsl(var(--metallic))] tracking-tight",children:r.number}),f.jsx("div",{className:"mt-3 text-meta text-[hsl(0,0%,90%)]",children:r.label}),f.jsx("div",{className:"mt-1 font-body text-sm text-[hsl(0,0%,50%)]",children:r.sub})]})]},r.label+s))})})},Iz=[{n:"01",name:"Automotive Refinish",color:"hsl(var(--sector-automotive))",desc:"Professional refinishing systems for collision repair and custom shops.",path:"/sectors/automotive-refinish"},{n:"02",name:"Car Care",color:"hsl(var(--sector-carcare))",desc:"Detailing and maintenance products for the professional aftermarket.",path:"/sectors/car-care"},{n:"03",name:"Wood Coatings",color:"hsl(var(--sector-wood))",desc:"High-performance finishes for furniture, flooring, and architectural wood.",path:"/sectors/wood-coatings"},{n:"04",name:"Industrial Coatings",color:"hsl(var(--sector-industrial))",desc:"Protective and decorative solutions for heavy industry and infrastructure.",path:"/sectors/industrial"},{n:"05",name:"Aeroplane Coating",color:"#4C6A80",desc:"Specialist coating systems for aviation and aerospace applications.",path:"/sectors/aeroplane-coating"},{n:"06",name:"Railway Coating",color:"#4A4A4A",desc:"Heavy-duty systems for rolling stock and rail infrastructure.",path:"/sectors/railway-coating"}],Lz=()=>f.jsx(_C,{eyebrow:"Capability / Divisions",accent:"hsl(var(--primary))",title:f.jsxs(f.Fragment,{children:["Seven sectors.",f.jsx("br",{}),"One engineering standard."]}),kicker:"From automotive refinish to bespoke industrial formulation — every product is manufactured in-house under unified quality protocols.",spacing:"lg",container:"wide",children:f.jsxs(We.div,{variants:Ho(.05,.08),initial:"hidden",whileInView:"visible",viewport:Wo,className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-px bg-[hsl(var(--hairline))] border border-[hsl(var(--hairline))]",children:[Iz.map(e=>f.jsx(We.div,{variants:zn,children:f.jsxs(Ce,{to:e.path,className:"group relative block h-full bg-card p-8 lg:p-10 transition-colors duration-500 hover:bg-[hsl(var(--surface-2))]",children:[f.jsxs("div",{className:"flex items-start justify-between",children:[f.jsx("span",{className:"text-eyebrow text-ink-muted",children:e.n}),f.jsx(M0,{size:20,className:"text-ink-muted transition-all duration-300 group-hover:text-foreground group-hover:-translate-y-1 group-hover:translate-x-1"})]}),f.jsx("div",{className:"mt-8 h-px w-12 transition-all duration-500 group-hover:w-24",style:{background:e.color}}),f.jsx("h3",{className:"text-h3 mt-6 text-foreground",children:e.name}),f.jsx("p",{className:"mt-4 font-body text-sm leading-relaxed text-ink-muted",children:e.desc}
331),f.jsx("span",{className:"mt-8 inline-block text-eyebrow",style:{color:e.color},children:"Explore Division →"})]})},e.name)),f.jsx(We.div,{variants:zn,children:f.jsxs(Ce,{to:"/royal-lab",className:"group relative block h-full bg-[hsl(var(--ink))] p-8 lg:p-10 overflow-hidden",children:[f.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 opacity-[0.08]",style:{background:"radial-gradient(circle at top right, hsl(var(--metallic)), transparent 60%)"}}),f.jsxs("div",{className:"relative",children:[f.jsxs("div",{className:"flex items-start justify-between",children:[f.jsxs("span",{className:"text-eyebrow text-[hsl(var(--metallic))]",children:[f.jsx("span",{className:"inline-block w-6 h-px bg-[hsl(var(--metallic))] align-middle mr-2"}),"Premium"]}),f.jsx(M0,{size:20,className:"text-[hsl(var(--metallic))] transition-all duration-300 group-hover:-translate-y-1 group-hover:translate-x-1"})]}),f.jsx("div",{className:"mt-8 h-px w-12 transition-all duration-500 group-hover:w-24",style:{background:"hsl(var(--metallic))"}}),f.jsx("h3",{className:"text-h3 mt-6 text-[hsl(0,0%,98%)]",children:"Royal Lab"}),f.jsx("p",{className:"mt-4 font-body text-sm leading-relaxed text-[hsl(0,0%,65%)]",children:"Custom formulation on demand. Your specification, our laboratory and production line."}),f.jsx("span",{className:"mt-8 inline-block text-eyebrow text-[hsl(var(--metallic))]",children:"Enter the Lab →"})]})]})})]})});function Dz(e,t={}){if(!e)return"";if(!e.includes("/storage/v1/object/public/"))return e;const n=e.replace("/storage/v1/object/public/","/storage/v1/render/image/public/"),r=new URLSearchParams;t.width&&r.set("width",String(t.width)),r.set("quality",String(t.quality??75)),t.format!=="origin"&&r.set("format","webp");const s=r.toString();return s?`${n}?${s}`:n}const Mz={automotive:{name:"Automotive Refinish",color:"hsl(var(--sector-automotive))"},carcare:{name:"Car Care",color:"hsl(var(--sector-carcare))"},wood:{name:"Wood Coatings",color:"hsl(var(--sector-wood))"},industrial:{name:"Industrial Coatings",color:"hsl(var(--sector-industrial))"},royallab:{name:"Royal Lab",color:"hsl(var(--sector-royallab))"}},$z=()=>{const{data:e=[]}=sV();return e.length===0?null:f.jsx("section",{className:"py-section-lg bg-[hsl(var(--surface-2))]",children:f.jsxs("div",{className:"container-wide",children:[f.jsxs("div",{className:"grid lg:grid-cols-12 gap-8 mb-16 lg:mb-20 items-end",children:[f.jsxs("div",{className:"lg:col-span-7",children:[f.jsxs("span",{className:"text-eyebrow text-ink-muted",children:[f.jsx("span",{className:"inline-block w-8 h-px bg-primary align-middle mr-2"}),"Catalogue / Featured"]}),f.jsxs("h2",{className:"text-h2 mt-5 text-foreground",children:["Engineered formulations,",f.jsx("br",{}),f.jsx("span",{className:"italic text-ink-muted",children:"trusted in production."})]})]}),f.jsx("div",{className:"lg:col-span-5 lg:text-right",children:f.jsx("p",{className:"font-body text-base text-ink-muted max-w-md lg:ml-auto",children:"A selection from our catalogue of 31 industrial-grade coatings. Full technical data sheets available for every product."})})]}),f.jsx(We.div,{variants:Ho(0,.1),initial:"hidden",whileInView:"visible",viewport:Wo,className:"space-y-px bg-[hsl(var(--hairline))] border-y border-[hsl(var(--hairline))]",children:e.map((t,n)=>{const r=Mz[t.sector]??{name:t.sector,color:"hsl(var(--primary))"};return f.jsxs(We.article,{variants:zn,className:"grid grid-cols-1 lg:grid-cols-[80px_280px_1fr_auto] gap-0 bg-card group hover:bg-background transition-colors duration-500",children:[f.jsx("div",{className:"hidden lg:flex items-center justify-center border-r border-[hsl(var(--hairline))] py-10",children:f.jsx("span",{className:"text-eyebrow text-ink-muted",children:String(n+1).padStart(2,"0")})}),f.jsx("div",{className:"bg-[hsl(0,0%,100%)] border-r border-[hsl(var(--hairline))] flex items-center justify-center p-8 min-h-[220px]",children:t.image_url?f.jsx("img",{src:Dz(t.image_url,{width:480}),alt:`${t.name} ${t.sku}`,loading:"lazy",decoding:"async",className:"max-h-[180px] w-auto object-contain transition-transform duration-700 group-hover:scale-105"}):f.jsx("div",{className:"w-28 h-36 rounded-sm",style:{background:`linear-gradient(160deg, ${r.color}22, ${r.color}55)`,border:`1px solid ${r.color}44`}})}),f.jsxs("div",{className:"p-8 lg:p-10 flex flex-col justify-center",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("span",{className:"inline-block w-2 h-2 rounded-full",style:{backgroundColor:r.color}}),f.jsx("span",{className:"text-eyebrow text-ink-muted",children:r.name})]}),f.jsx("h3",{className:"text-h3 mt-4 text-foreground",children:f.jsx(Ce,{to:Vw(t.sku),className:"hover:text-primary transition-colors",children:t.name})}),f.jsxs("p",{className:"mt-2 font-body text-xs tracking-widest uppercase text-ink-muted",children:["SKU · ",t.sku]}),f.jsx("p",{className:"mt-4 font-body text-sm text-ink-muted leading-relaxed max-w-2xl",children:t.description})]}),f.jsxs("div",{className:"px-8 pb-8 lg:p-10 flex flex-col gap-3 justify-center lg:border-l border-[hsl(var(--hairline))] min-w-[200px]",children:[f.jsxs(Ce,{to:Vw(t.sku),className:"inline-flex items-center justify-between gap-3 text-meta text-foreground border-b border-foreground
331/20 pb-2 hover:border-primary hover:text-primary transition-colors",children:["View Details ",f.jsx(Fu,{size:14})]}),t.tds_url&&f.jsxs("a",{href:t.tds_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center justify-between gap-3 text-meta text-ink-muted border-b border-[hsl(var(--hairline))] pb-2 hover:text-foreground hover:border-foreground transition-colors",children:["TDS ",f.jsx($0,{size:14})]}),t.msds_url&&f.jsxs("a",{href:t.msds_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center justify-between gap-3 text-meta text-ink-muted border-b border-[hsl(var(--hairline))] pb-2 hover:text-foreground hover:border-foreground transition-colors",children:["MSDS ",f.jsx($0,{size:14})]})]})]},t.id)})}),f.jsx("div",{className:"mt-16 flex justify-center",children:f.jsx(Po,{to:"/products",variant:"outline",size:"lg",withArrow:!0,children:"View Full Catalogue · 31 Products"})})]})})},Fz=[{n:"01",Icon:VI,title:"Direct Manufacturer",body:"Vertically integrated production at our 6th October City facility — no middlemen, full traceability, single point of accountability."},{n:"02",Icon:BI,title:"Royal Lab R&D",body:"On-site formulation laboratory developing bespoke chemistries to client specification, with scale-up direct to our production lines."},{n:"03",Icon:JI,title:"Quality Protocols",body:"Batch-controlled QC, raw-material verification and finished-goods testing aligned with international automotive and industrial standards."},{n:"04",Icon:MI,title:"Export Ready",body:"Documentation, packaging and logistics structured for international distribution across MENA, Africa and emerging European markets."}],Uz=()=>f.jsx(_C,{eyebrow:"Manufacturing Authority",accent:"hsl(var(--primary))",title:f.jsxs(f.Fragment,{children:["Why specifiers choose",f.jsx("br",{}),"Royal Coating Egypt."]}),spacing:"lg",container:"wide",children:f.jsx(We.div,{variants:Ho(0,.08),initial:"hidden",whileInView:"visible",viewport:Wo,className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-px bg-[hsl(var(--hairline))] border border-[hsl(var(--hairline))]",children:Fz.map(({Icon:e,...t})=>f.jsxs(We.div,{variants:zn,className:"bg-card p-8 lg:p-10 group hover:bg-[hsl(var(--surface-2))] transition-colors duration-500",children:[f.jsxs("div",{className:"flex items-start justify-between",children:[f.jsx(e,{size:32,strokeWidth:1.25,className:"text-foreground transition-transform duration-500 group-hover:-translate-y-1"}),f.jsx("span",{className:"text-eyebrow text-ink-muted",children:t.n})]}),f.jsx("div",{className:"mt-10 h-px w-10 bg-primary transition-all duration-500 group-hover:w-20"}),f.jsx("h3",{className:"mt-6 font-heading text-xl font-semibold text-foreground",children:t.title}),f.jsx("p",{className:"mt-4 font-body text-sm leading-relaxed text-ink-muted",children:t.body})]},t.title))})}),Vz=()=>f.jsx("section",{className:"bg-[hsl(var(--surface-1))] border-t border-[hsl(var(--hairline))]",children:f.jsxs(We.div,{variants:Ho(0,.1),initial:"hidden",whileInView:"visible",viewport:Wo,className:"container-wide py-section-lg grid lg:grid-cols-12 gap-10 items-end",children:[f.jsxs(We.div,{variants:zn,className:"lg:col-span-7",children:[f.jsxs("span",{className:"text-eyebrow text-ink-muted",children:[f.jsx("span",{className:"inline-block w-8 h-px bg-primary align-middle mr-2"}),"Engage / Next Step"]}),f.jsxs("h2",{className:"text-h1 mt-6 text-foreground max-w-3xl",children:["Build with a manufacturer,",f.jsx("br",{}),f.jsx("span",{className:"italic text-ink-muted",children:"not a distributor."})]}),f.jsx("p",{className:"mt-6 font-body text-base text-ink-muted max-w-xl",children:"Send a technical enquiry, request a specification sheet, or speak directly with our commercial team via WhatsApp."})]}),f.jsxs(We.div,{variants:zn,className:"lg:col-span-5 flex flex-col gap-4 lg:items-end",children:[f.jsx(Po,{to:"/contact",variant:"primary",size:"lg",withArrow:!0,children:"Send Enquiry"}),f.jsx(Po,{href:"https://wa.me/201007007550",target:"_blank",rel:"noopener noreferrer",variant:"outline",size:"lg",children:"WhatsApp Commercial Team"}),f.jsx("span",{className:"text-meta text-ink-muted mt-2",children:"+20 100 700 7550 · Sun–Thu 09:00–17:00 EET"})]})]})}),lx="Royal Coating Egypt",cx="https://royalcoatingeg.com",Bz="https://storage.googleapis.com/gpt-engineer-file-uploads/attachments/og-images/f9c16628-67b3-47a2-a917-fa94590bea66",zz="Royal Coating Egypt — manufacturer of automotive refinish, car care, wood, and industrial 
331coatings, plus Royal Lab custom formulation. 6th October City, Egypt.",Hz=e=>qe({queryKey:["page_seo",e],queryFn:async()=>{const{data:t,error:n}=await De.from("page_seo").select("*").eq("route",e).maybeSingle();if(n)throw n;return t},staleTime:6e4}),yH=()=>qe({queryKey:["page_seo","all"],queryFn:async()=>{const{data:e,error:t}=await De.from("page_seo").select("*").order("route");if(t)throw t;return e??[]}}),Wz=e=>e.split("-").map(t=>t.length<=2?t.toUpperCase():t.charAt(0).toUpperCase()+t.slice(1)).join(" "),qz=(e,t)=>{const n=[{name:"Home",path:"/"}];if(!e||e==="/")return n;const r=e.split("/").filter(Boolean);let s="";return r.forEach((i,o)=>{s+=`/${i}`;const a=o===r.length-1;n.push({name:a?t:Wz(i),path:s})}),n},EC=({title:e,description:t,path:n,image:r,type:s="website",noindex:i=!1,breadcrumbs:o,jsonLd:a})=>{const{data:l}=Hz(n),c=(l==null?void 0:l.title)??e,u=(l==null?void 0:l.description)??t??zz,d=(l==null?void 0:l.og_image)??r??Bz,p=(l==null?void 0:l.noindex)??i,h=`${c} | ${lx}`,v=`${cx}${n}`,x={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:(o??qz(n,c)).map((b,w)=>({"@type":"ListItem",position:w+1,name:b.name,item:`${cx}${b.path}`}))},y=a?Array.isArray(a)?a:[a]:[];return f.jsxs(eN,{children:[f.jsx("title",{children:h}),f.jsx("meta",{name:"description",content:u}),f.jsx("link",{rel:"canonical",href:v}),p&&f.jsx("meta",{name:"robots",content:"noindex, nofollow"}),f.jsx("meta",{property:"og:type",content:s}),f.jsx("meta",{property:"og:site_name",content:lx}),f.jsx("meta",{property:"og:title",content:h}),f.jsx("meta",{property:"og:description",content:u}),f.jsx("meta",{property:"og:url",content:v}),f.jsx("meta",{property:"og:image",content:d}),f.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),f.jsx("meta",{name:"twitter:title",content:h}),f.jsx("meta",{name:"twitter:description",content:u}),f.jsx("meta",{name:"twitter:image",content:d}),f.jsx("script",{type:"application/ld+json",children:JSON.stringify(x)}),y.map((b,w)=>f.jsx("script",{type:"application/ld+json",children:JSON.stringify(b)},w))]})},Kz=Hg("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),cu=m.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?UN:"button";return f.jsx(o,{className:ee(Kz({variant:t,size:n,className:e})),ref:i,...s})});cu.displayName="Button";const va=m.forwardRef(({className:e,type:t,...n},r)=>f.jsx("input",{type:t,className:ee("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));va.displayName="Input";const TC=m.forwardRef(({className:e,...t},n)=>f.jsx("textarea",{className:ee("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
331ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));TC.displayName="Textarea";const Ai=m.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:ee("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Ai.displayName="Card";const Gz=m.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:ee("flex flex-col space-y-1.5 p-6",e),...t}));Gz.displayName="CardHeader";const Qz=m.forwardRef(({className:e,...t},n)=>f.jsx("h3",{ref:n,className:ee("text-2xl font-semibold leading-none tracking-tight",e),...t}));Qz.displayName="CardTitle";const Yz=m.forwardRef(({className:e,...t},n)=>f.jsx("p",{ref:n,className:ee("text-sm text-muted-foreground",e),...t}));Yz.displayName="CardDescription";const Jz=m.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:ee("p-6 pt-0",e),...t}));Jz.displayName="CardContent";const Xz=m.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:ee("flex items-center p-6 pt-0",e),...t}));Xz.displayName="CardFooter";const Zz=Hg("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Oc({className:e,variant:t,...n}){return f.jsx("div",{className:ee(Zz({variant:t}),e),...n})}function e8(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Jd="Switch",[t8,vH]=fs(Jd),[n8,r8]=t8(Jd),kC=m.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,form:u,...d}=e,[p,h]=m.useState(null),v=Ye(t,w=>h(w)),g=m.useRef(!1),x=p?u||!!p.closest("form"):!0,[y,b]=Do({prop:s,defaultProp:i??!1,onChange:c,caller:Jd});return f.jsxs(n8,{scope:n,checked:y,disabled:a,children:[f.jsx(le.button,{type:"button",role:"switch","aria-checked":y,"aria-required":o,"data-state":PC(y),"data-disabled":a?"":void 0,disabled:a,value:l,...d,ref:v,onClick:de(e.onClick,w=>{b(S=>!S),x&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})}),x&&f.jsx(RC,{control:p,bubbles:!g.current,name:r,value:l,checked:y,required:o,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});kC.displayName=Jd;var CC="SwitchThumb",AC=m.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=r8(CC,n);return f.jsx(le.span,{"data-state":PC(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});AC.displayName=CC;var s8="SwitchBubbleInput",RC=m.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...s},i)=>{const o=m.useRef(null),a=Ye(o,i),l=e8(n),c=iE(t);return m.useEffect(()=>{const u=o.current;if(!u)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==n&&h){const v=new Event("click",{bubbles:r});h.call(u,n),u.dispatchEvent(v)}},[l,n,r]),f.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:a,style:{...s.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});RC.displayName=s8;function PC(e){return e?"checked":"unchecked"}var jC=kC,i8=AC;const OC=m.forwardRef(({className:e,...t},n)=>f.jsx(jC,{className:ee("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:n,children:f.jsx(i8,{className:ee("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}
vendor: 4,263 bytes, line 331
331));OC.displayName=jC.displayName;var o8=m.createContext(void 0);function NC(e){const t=m.useContext(o8);return e||t||"ltr"}var bf="rovingFocusGroup.onEntryFocus",a8={bubbles:!1,cancelable:!0},Bl="RovingFocusGroup",[Mm,IC,l8]=c_(Bl),[c8,LC]=fs(Bl,[l8]),[u8,d8]=c8(Bl),DC=m.forwardRef((e,t)=>f.jsx(Mm.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(Mm.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(h8,{...e,ref:t})})}));DC.displayName=Bl;var h8=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,p=m.useRef(null),h=Ye(t,p),v=NC(i),[g,x]=Do({prop:o,defaultProp:a??null,onChange:l,caller:Bl}),[y,b]=m.useState(!1),w=_n(c),S=IC(n),_=m.useRef(!1),[E,T]=m.useState(0);return m.useEffect(()=>{const C=p.current;if(C)return C.addEventListener(bf,w),()=>C.removeEventListener(bf,w)},[w]),f.jsx(u8,{scope:n,orientation:r,dir:v,loop:s,currentTabStopId:g,onItemFocus:m.useCallback(C=>x(C),[x]),onItemShiftTab:m.useCallback(()=>b(!0),[]),onFocusableItemAdd:m.useCallback(()=>T(C=>C+1),[]),onFocusableItemRemove:m.useCallback(()=>T(C=>C-1),[]),children:f.jsx(le.div,{tabIndex:y||E===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:de(e.onMouseDown,()=>{_.current=!0}),onFocus:de(e.onFocus,C=>{const O=!_.current;if(C.target===C.currentTarget&&O&&!y){const A=new CustomEvent(bf,a8);if(C.currentTarget.dispatchEvent(A),!A.defaultPrevented){const M=S().filter(H=>H.focusable),I=M.find(H=>H.active),Q=M.find(H=>H.id===g),Y=[I,Q,...M].filter(Boolean).map(H=>H.ref.current);FC(Y,u)}}_.current=!1}),onBlur:de(e.onBlur,()=>b(!1))})})}),MC="RovingFocusGroupItem",$C=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,children:o,...a}=e,l=Jt(),c=i||l,u=d8(MC,n),d=u.currentTabStopId===c,p=IC(n),{onFocusableItemAdd:h,onFocusableItemRemove:v,currentTabStopId:g}=u;return m.useEffect(()=>{if(r)return h(),()=>v()},[r,h,v]),f.jsx(Mm.ItemSlot,{scope:n,id:c,focusable:r,active:s,children:f.jsx(le.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...a,ref:t,onMouseDown:de(e.onMouseDown,x=>{r?u.onItemFocus(c):x.preventDefault()}),onFocus:de(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:de(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=m8(x,u.orientation,u.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let w=p().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const S=w.indexOf(x.currentTarget);w=u.loop?g8(w,S+1):w.slice(S+1)}setTimeout(()=>FC(w))}}),children:typeof o=="function"?o({isCurrentTabStop:d,hasTabStop:g!=null}):o})})});$C.displayName=MC;var f8={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function p8(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function m8(e,t,n){const r=p8(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return f8[r]}function FC(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function g8(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var y8=DC,v8=$C,Xd="Tabs",[w8,wH]=fs(Xd,[LC]),UC=LC(),[b8,Vy]=w8(Xd),VC=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:l="automatic",...c}=e,u=NC(a),[d,p]=Do({prop:r,onChange:s,defaultProp:i??"",caller:Xd});return f.jsx(b8,{scope:n,baseId:Jt(),value:d,onValueChange:p,orientation:o,dir:u,activationMode:l,children:f.jsx(le.div,{dir:u,"data-orientation":o,...c,ref:t})})});VC.displayName=Xd;var BC="TabsList",zC=m.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,i=Vy(BC,n),o=UC(n);return f.jsx(y8,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:f.jsx(le.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:t})})});zC.displayName=BC;var HC="TabsTrigger",WC=m.forwardRef((e,t)=>
331{const{__scopeTabs:n,value:r,disabled:s=!1,...i}=e,o=Vy(HC,n),a=UC(n),l=GC(o.baseId,r),c=QC(o.baseId,r),u=r===o.value;return f.jsx(v8,{asChild:!0,...a,focusable:!s,active:u,children:f.jsx(le.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l,...i,ref:t,onMouseDown:de(e.onMouseDown,d=>{!s&&d.button===0&&d.ctrlKey===!1?o.onValueChange(r):d.preventDefault()}),onKeyDown:de(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&o.onValueChange(r)}),onFocus:de(e.onFocus,()=>{const d=o.activationMode!=="manual";!u&&!s&&d&&o.onValueChange(r)})})})});WC.displayName=HC;var qC="TabsContent",KC=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:i,...o}=e,a=Vy(qC,n),l=GC(a.baseId,r),c=QC(a.baseId,r),u=r===a.value,d=m.useRef(u);return m.useEffect(()=>{const p=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(p)},[]),f.jsx(ii,{present:s||u,children:({present:p})=>f.jsx(le.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:c,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:p&&i})})});KC.displayName=qC;function GC(e,t){return`${e}-trigger-${t}`}function QC(e,t){return`${e}-content-${t}`}var x8=VC,YC=zC,JC=WC,XC=KC;const S8=x8,ZC=m.forwardRef(({className:e,...t},n)=>f.jsx(YC,{ref:n,className:ee("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));ZC.displayName=YC.displayName;const wa=m.forwardRef(({className:e,...t},n)=>f.jsx(JC,{ref:n,className:ee("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));wa.displayName=JC.displayName;const ba=m.forwardRef(({className:e,...t},n)=>f.jsx(XC,{ref:n,className:ee("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));ba.displayName=XC.displayName;const _8=async(e,t,n,r)=>{try{const{data:{session:s}}=await De.auth.getSession();if(!s)return;await De.from("audit_log").insert({user_id:s.user.id,user_email:s.user.email,action:e,table_name:t,record_id:n,diff:r??null})}catch{}},Nc=[{key:"hero_eyebrow",label:"Eyebrow",placeholder:"Industrial Coatings Manufacturer"},{key:"hero_headline",label:"Headline (rich)",placeholder:`Engineered to Last.
332Made to **Lead.**`,textarea:!0,rich:!0},{key:"hero_sub",label:"Sub-headline (rich)",placeholder:"A direct manufacturer of 31 coatings…",textarea:!0,rich:!0},{key:"hero_cta_primary",label:"Primary CTA label",placeholder:"Explore Products"},{key:"hero_cta_secondary",label:"Secondary CTA label",placeholder:"Request a Quote"}],ca=[{value:"31",label:"Engineered Products",sub:"Across 5 divisions"},{value:"05",label:"Industrial Sectors",sub:"Refinish to Royal Lab"},{value:"20+",label:"Years of Expertise",sub:"Manufacturing heritage"},{value:"01",label:"Direct Manufacturer",sub:"6th October City · EG"}],xl=[{key:"hero",label:"Hero",description:"Top hero with headline and CTAs.",required:!0},{key:"authority",label:"Authority bar",description:"Four institutional stats."},{key:"sectors",label:"Sectors strip",description:"Five division entry points."},{key:"featured",label:"Featured products",description:"Retired — this section is disabled and no longer renders on the homepage.",retired:!0},{key:"why",label:"Why Royal Coating",description:"Manufacturer credibility block."},{key:"automechanika",label:"Automechanika banner",description:"Retired — the Automechanika campaign has ended. Post fairs and shows under Events instead.",retired:!0},{key:"contact",label:"Contact CTA",description:"Final conversion strip."}],ks={order:xl.map(e=>e.key),visible:xl.reduce((e,t)=>
332({...e,[t.key]:!t.retired}),{})};function ad(e){if(!e)return ks;try{const t=JSON.parse(e),n=Array.isArray(t.order)?t.order.filter(i=>xl.some(o=>o.key===i)):ks.order,r=[...n,...ks.order.filter(i=>!n.includes(i))],s={...ks.visible,...t.visible??{}};return xl.forEach(i=>{i.retired&&(s[i.key]=!1)}),{order:r,visible:s}}catch{return ks}}function E8(){const{data:e=[],refetch:t}=kz(),{toast:n}=a_(),r=h=>{var v;return(v=e.find(g=>g.page_key==="home"&&g.section_key===h))==null?void 0:v.content},[s,i]=m.useState({}),[o,a]=m.useState(ca),[l,c]=m.useState(ks);m.useEffect(()=>{const h={};Nc.forEach(g=>{h[g.key]=r(g.key)??""}),i(h);const v=ca.map((g,x)=>({value:r(`stat_${x+1}_value`)??g.value,label:r(`stat_${x+1}_label`)??g.label,sub:r(`stat_${x+1}_sub`)??g.sub}));a(v),c(ad(r("sections_config")))},[e.length]);const u=(h,v)=>{c(g=>{const x=[...g.order],y=h+v;return y<0||y>=x.length?g:([x[h],x[y]]=[x[y],x[h]],{...g,order:x})})},d=m.useMemo(()=>{const h=Nc.some(x=>(s[x.key]??"")!==(r(x.key)??"")),v=o.some((x,y)=>x.value!==(r(`stat_${y+1}_value`)??ca[y].value)||x.label!==(r(`stat_${y+1}_label`)??ca[y].label)||x.sub!==(r(`stat_${y+1}_sub`)??ca[y].sub)),g=JSON.stringify(l)!==JSON.stringify(ad(r("sections_config")));return h||v||g},[s,o,l,e]);async function p(){const h=[];Nc.forEach(g=>{h.push({page_key:"home",section_key:g.key,content:s[g.key]??"",label:g.label})}),o.forEach((g,x)=>{h.push({page_key:"home",section_key:`stat_${x+1}_value`,content:g.value,label:`Authority stat ${x+1} · value`}),h.push({page_key:"home",section_key:`stat_${x+1}_label`,content:g.label,label:`Authority stat ${x+1} · label`}),h.push({page_key:"home",section_key:`stat_${x+1}_sub`,content:g.sub,label:`Authority stat ${x+1} · sub-line`})}),h.push({page_key:"home",section_key:"sections_config",content:JSON.stringify(l),label:"Homepage section visibility & order"});const{error:v}=await De.from("page_content").upsert(h,{onConflict:"page_key,section_key"});if(v)return n({title:"Save failed",description:v.message,variant:"destructive"});await _8("homepage.update","page_content","home",{count:h.length}),n({title:"Homepage saved",description:`${h.length} block${h.length===1?"":"s"} updated.`}),t()}return f.jsxs("div",{className:"space-y-5",children:[f.jsxs("div",{className:"flex items-end justify-between gap-3 flex-wrap",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"font-heading text-3xl",children:"Homepage control center"}),f.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Edit hero copy, authority stats, and toggle sections on the public homepage."})]}),f.jsxs(cu,{onClick:p,disabled:!d,children:[f.jsx(QI,{className:"h-4 w-4 mr-1"})," Save changes"]})]}),f.jsx(Ai,{className:"p-4 bg-muted/30 border-dashed",children:f.jsxs("div",{className:"flex items-start gap-3 text-sm",children:[f.jsx(HI,{className:"h-4 w-4 mt-0.5 text-primary shrink-0"}),f.jsxs("div",{className:"text-muted-foreground",children:["Rich-text fields support ",f.jsx("code",{children:"**bold**"})," (gold gradient), ",f.jsx("code",{children:"*italic*"}),", ",f.jsx("code",{children:"[label](url)"}),", and line-breaks. Empty fields fall back to built-in defaults."]})]})}),f.jsxs(S8,{defaultValue:"hero",children:[f.jsxs(ZC,{children:[f.jsx(wa,{value:"hero",children:"Hero"}),f.jsx(wa,{value:"stats",children:"Authority stats"}),f.jsx(wa,{value:"sections",children:"Sections"}),f.jsx(wa,{value:"links",children:"Quick links"})]}),f.jsx(ba,{value:"hero",children:f.jsx(Ai,{className:"p-5 space-y-4",children:Nc.map(h=>f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[f.jsx("label",{className:"text-sm font-medium",children:h.label}),h.rich&&f.jsx(Oc,{variant:"outline",className:"text-[10px]",children:"rich-text"})]}),f.jsxs("div",{className:"text-xs text-muted-foreground mb-1",children:["Key: ",f.jsxs("code",{children:["home.",h.key]})]}),h.textarea?f.jsx(TC,{rows:3,placeholder:h.placeholder,value:s[h.key]??"",onChange:v=>i(g=>({...g,[h.key]:v.target.value}))}):f.jsx(va,{placeholder:h.placeholder,value:s[h.key]??"",onChange:v=>i(g=>({...g,[h.key]:v.target.value}))})]},h.key))})}),f.jsx(ba,{value:"stats",children:f.jsxs(Ai,{className:"p-5 space-y-5",children:[f.jsx("p",{className:"text-sm text-muted-foreground",children:"Four numbers shown in the Authority Bar directly below the hero. Keep values short — they are typeset large."}),o.map((h,v)=>f.jsxs("div",{className:"grid md:grid-cols-[120px_1fr_1fr] gap-3 items-end border-b last:border-0 pb-4 last:pb-0",children:[f.jsxs("div",{children:[f.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:["Stat ",v+1," · value"]}),f.jsx(va,{value:h.value,onChange:g=>a(x=>x.map((y,b)=>b===v?{...y,value:g.target.value}:y))})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Label"}),f.jsx(va,{value:h.label,onChange:g=>a(x=>x.map((y,b)=>b===v?{...y,label:g.target.value}:y))})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Sub-line"}),f.jsx(va,{value:h.sub,onChange:g=>a(x=>x.map((y,b)=>b===v?{...y,sub:g.target.value}:y))})]})]},v))]})}),f.jsx(ba,{value:"sections",children:f.jsxs(Ai,{className:"p-5 space-y-3",children:[f.jsx("p",{className:"text-sm text-muted-foreground",children:"Reorder or hide homepage sections. The Hero cannot be hidden."}),f.jsx("div",{className:"divide-y",children:l.order.map((h,v)=>{const g=xl.find(y=>y.key===h),x=g.retired?!1:l.visible[h]??!0;return f.jsxs("div",{className:`py-3 flex items-center gap-4 ${g.retired?"opacity-60":""}`,children:[f.jsxs("div",{className:"flex flex-col gap-1",children:[f.jsx(cu,{size:"icon",variant:"ghost",className:"h-6 w-6",disabled:v===0||g.retired,onClick:()=>u(v,-1),children:f.jsx(II,{className:"h-3 w-3"})}),f.jsx(cu,{size:"icon",variant:"ghost",className:"h-6 w-6",disabled:v===l.order.length-1||g.retired,onClick:()=>u(v,1),children:f.jsx(NI,{className:"h-3 w-3"})})]}),f.jsxs("div",{className:"flex-1",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"font-medium",children:g.label}),f.jsx(Oc,{variant:"outline",className:"text-[10px] font-mono",children:h}),g.required&&f.jsx(Oc,{variant:"secondary",className:"text-[10px]",children:"required"}),g.retired&&f.jsx(Oc,{variant:"destructive",className:"text-[10px]",children:"retired"})]}),f.jsx("p",{className:"text-xs text-muted-foreground",children:g.description})]}),f.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[x?f.jsx(UI,{className:"h-3.5 w-3.5"}):f.jsx(FI,{className:"h-3.5 w-3.5"}),f.jsx(OC,{checked:x,disabled:g.required||g.retired,onCheckedChange:y=>c(b=>({...b,visible:{...b.visible,[h]:y}}))})]})]},h)})})]})}),f.jsx(ba,{value:"links",children:f.jsx(Ai,{className:"p-5 grid md:grid-cols-2 gap-3",children:[{to:"/admin/products",label:"Featured products",note:"Flag products with “Featured” to surface them on home."}
332,{to:"/admin/announcement",label:"Announcement bar",note:"Top-of-site notice (banner enabled / text / link / colors)."},{to:"/admin/seo",label:"Homepage SEO",note:"Title, description and OG image for /."},{to:"/admin/branding",label:"Brand & logo",note:"Logo, favicon, brand name and tagline."},{to:"/admin/contact-info",label:"Contact info",note:"Phone, WhatsApp, email, address, hours, socials."},{to:"/admin/footer",label:"Footer",note:"Tagline, about copy, link columns."}].map(h=>f.jsxs(Ce,{to:h.to,className:"group block rounded-lg border p-4 hover:bg-muted/40 transition-colors",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"font-medium",children:h.label}),f.jsx($I,{className:"h-4 w-4 text-muted-foreground group-hover:text-foreground"})]}),f.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:h.note})]},h.to))})})]})]})}const T8=Object.freeze(Object.defineProperty({__proto__:null,AdminHomepage:E8,DEFAULT_SECTIONS_CONFIG:ks,parseSectionsConfig:ad},Symbol.toStringTag,{value:"Module"})),k8={hero:jz,authority:Nz,sectors:Lz,featured:$z,why:Uz,contact:Vz},C8=()=>{const{data:e}=Uy("home"),t=(r,s)=>e?e(r,s):s,n=ad(e?e("sections_config",""):"");return f.jsxs(f.Fragment,{children:[f.jsx(EC,{title:t("seo_title","B2B Coatings Manufacturer"),description:t("seo_description","Royal Coating Egypt manufactures 31 coatings across 5 divisions. Automotive, car care, wood, industrial, and Royal Lab custom formulations."),path:"/"}),n.order.map(r=>{if(r!=="hero"&&n.visible[r]===!1||r==="featured"||r==="automechanika")return null;const s=k8[r];return s?f.jsx(s,{},r):null})]})},A8=()=>{const e=Ft();return m.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),f.jsxs("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:[f.jsx(EC,{title:"Page Not Found",description:"The page you requested could not be found.",path:e.pathname}),f.jsxs("div",{className:"text-center",children:[f.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),f.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),f.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})]})},R8=m.lazy(()=>X(()=>import("./Products-CjWOe7xL.js"),__vite__mapDeps([0,1]))),P8=m.lazy(()=>X(()=>import("./ProductDetail-rlQb3AVW.js"),__vite__mapDeps([2,1,3,4,5]))),j8=m.lazy(()=>X(()=>import("./AutomotiveRefinish-DhWzNnOS.js"),__vite__mapDeps([6,7]))),O8=m.lazy(()=>X(()=>import("./CarCare-BtEqJFaA.js"),__vite__mapDeps([8,7]))),N8=m.lazy(()=>X(()=>import("./WoodCoatings-guhJ3R-A.js"),__vite__mapDeps([9,7]))),I8=m.lazy(()=>X(()=>import("./Industrial-C1dodmUO.js"),__vite__mapDeps([10,7]))),L8=m.lazy(()=>X(()=>import("./AeroplaneCoating-DctIPITG.js"),__vite__mapDeps([11,7]))),D8=m.lazy(()=>X(()=>import("./RailwayCoating-CSFOK81r.js"),__vite__mapDeps([12,7]))),M8=m.lazy(()=>X(()=>import("./RoyalLab-CThjizlq.js"),__vite__mapDeps([13,14,15,16]))),$8=m.lazy(()=>X(()=>import("./About-CtfFeRqm.js"),__vite__mapDeps([17,18,19,20,15]))),F8=m.lazy(()=>X(()=>import("./Contact-sTwrIJeI.js"),__vite__mapDeps([21,22,23]))),U8=m.lazy(()=>X(()=>import("./Events-w2sbi24o.js"),__vite__mapDeps([24,25,26,27]))),V8=m.lazy(()=>X(()=>import("./EventDetail-8Hit7ygY.js"),__vite__mapDeps([28,25,3,26,27,16]))),B8=m.lazy(()=>X(()=>import("./Careers-CEEnCSZY.js"),__vite__mapDeps([29,30,31,32]))),z8=m.lazy(()=>X(()=>import("./CareerDetail-DxbeVQwe.js"),__vite__mapDeps([33,30,34,3,31,26,35,36]))),H8=m.lazy(()=>X(()=>import("./Partners-Ch0ZNLfG.js"),__vite__mapDeps([37,38]))),W8=m.lazy(()=>X(()=>import("./Certifications-BhwQ1aQv.js"),__vite__mapDeps([39,18]))),q8=m.lazy(()=>X(()=>import("./Projects-yceiEbF8.js"),__vite__mapDeps([40,41]))),K8=m.lazy(()=>X(()=>import("./ProjectDetail-CZeH7jmG.js"),__vite__mapDeps([42,41,3,15,43]))),G8=m.lazy(()=>X(()=>import("./Quote-S3doRriI.js"),__vite__mapDeps([44,23,41,4,45,46,20]))),Q8=m.lazy(()=>X(()=>import("./Insights-BL39952H.js"),__vite__mapDeps([47,31]))),Y8=m.lazy(()=>X(()=>import("./InsightDetail-CGfZAywI.js"),__vite__mapDeps([48,3,31]))),J8=m.lazy(()=>X(()=>import("./Resources-DHkQ69FC.js"),__vite__mapDeps([49,5]))),X8=m.lazy(()=>X(()=>import("./Training-Cy4zd0jn.js"),__vite__mapDeps([50,43,32,35]))),Z8=m.lazy(()=>X(()=>
332import("./ColorSupport-DUMXW1sR.js"),__vite__mapDeps([51,20]))),e6=m.lazy(()=>X(()=>import("./Ar-DGMNg1DB.js"),__vite__mapDeps([52,3]))),t6=m.lazy(()=>X(()=>import("./WhereToBuy-DZN1B1SP.js"),__vite__mapDeps([53,15,16]))),n6=m.lazy(()=>X(()=>import("./ExportMarkets-CE4Va7rO.js"),__vite__mapDeps([54,55]))),r6=m.lazy(()=>X(()=>import("./Auth-UO17RvE_.js"),__vite__mapDeps([56,34]))),s6=m.lazy(()=>X(()=>import("./Unsubscribe-CcJ0rY_N.js"),[])),i6=m.lazy(()=>X(()=>import("./OAuthConsent-BEeri9Xn.js"),[])),o6=m.lazy(()=>X(()=>import("./BrandLayout-B218Hedi.js"),__vite__mapDeps([57,58,4]))),a6=m.lazy(()=>X(()=>import("./BrandOverview-DjD8-LRD.js"),__vite__mapDeps([59,58,4]))),l6=m.lazy(()=>X(()=>import("./BrandDna-Ky1GVaaj.js"),__vite__mapDeps([60,58,4]))),c6=m.lazy(()=>X(()=>import("./BrandLogo-DGGi4Rg2.js"),__vite__mapDeps([61,58,4]))),u6=m.lazy(()=>X(()=>import("./BrandColor-vxpdIYtT.js"),__vite__mapDeps([62,58,4,63,14]))),d6=m.lazy(()=>X(()=>import("./BrandTypography-74J3a5Hu.js"),__vite__mapDeps([64,58,4,63,14]))),h6=m.lazy(()=>X(()=>import("./BrandVoice-UrukUxsG.js"),__vite__mapDeps([65,58,4]))),f6=m.lazy(()=>X(()=>import("./BrandImagery-ee7iRxWA.js"),__vite__mapDeps([66,58,4]))),p6=m.lazy(()=>X(()=>import("./BrandAssets-BrLjoJdS.js"),__vite__mapDeps([67,58,4]))),m6=m.lazy(()=>X(()=>import("./AdminLayout-BUJUSSs2.js"),__vite__mapDeps([68,22,69,55,26,16,32]))),vt=()=>X(()=>import("./AdminPages-DcTaM3-C.js"),__vite__mapDeps([70,34,38,18,71,36,45,46])),g6=m.lazy(()=>vt().then(e=>({default:e.AdminDashboard}))),y6=m.lazy(()=>vt().then(e=>({default:e.AdminContactInfo}))),v6=m.lazy(()=>vt().then(e=>({default:e.AdminBranding}))),w6=m.lazy(()=>vt().then(e=>({default:e.AdminAnnouncement}))),b6=m.lazy(()=>vt().then(e=>({default:e.AdminPartners}))),x6=m.lazy(()=>vt().then(e=>({default:e.AdminSubmissions}))),S6=m.lazy(()=>vt().then(e=>({default:e.AdminSeo}))),_6=m.lazy(()=>vt().then(e=>({default:e.AdminMedia}))),E6=m.lazy(()=>vt().then(e=>({default:e.AdminUsers}))),T6=m.lazy(()=>vt().then(e=>({default:e.AdminAudit}))),k6=m.lazy(()=>vt().then(e=>({default:e.AdminSecurity}))),C6=m.lazy(()=>X(()=>import("./AdminProducts-BkMMjgqT.js"),__vite__mapDeps([72,73,74,1,71,45,36,46])).then(e=>({default:e.AdminProducts}))),A6=m.lazy(()=>vt().then(e=>({default:e.AdminCertifications}))),R6=m.lazy(()=>vt().then(e=>({default:e.AdminProjects}))),P6=m.lazy(()=>vt().then(e=>({default:e.AdminQuotes}))),j6=m.lazy(()=>vt().then(e=>({default:e.AdminInsights}))),O6=m.lazy(()=>X(()=>import("./AdminFooter-CWX1eHvd.js"),__vite__mapDeps([75,45,46])).then(e=>({default:e.AdminFooter}))),N6=m.lazy(()=>X(()=>
332import("./AdminContent-DNAH4TfU.js"),__vite__mapDeps([76,35])).then(e=>({default:e.AdminContent}))),I6=m.lazy(()=>X(()=>import("./AdminResources-B6xi3sbd.js"),__vite__mapDeps([77,71,74,45,36,46])).then(e=>({default:e.AdminResources}))),L6=m.lazy(()=>X(()=>import("./AdminTraining-Bx_UR4X7.js"),__vite__mapDeps([78,73,45,46])).then(e=>({default:e.AdminTraining}))),D6=m.lazy(()=>X(()=>import("./AdminInbox-DLnIUpEy.js"),__vite__mapDeps([79,69,46])).then(e=>({default:e.AdminInbox}))),M6=m.lazy(()=>X(()=>Promise.resolve().then(()=>T8),void 0).then(e=>({default:e.AdminHomepage}))),$6=m.lazy(()=>X(()=>import("./AdminTeam-BtFd9OMr.js"),__vite__mapDeps([80,34,19,45,46,36])).then(e=>({default:e.AdminTeam}))),F6=m.lazy(()=>X(()=>import("./AdminEvents-B-2S684-.js"),__vite__mapDeps([81,34,25,45,26,46,36])).then(e=>({default:e.AdminEvents}))),U6=m.lazy(()=>X(()=>import("./AdminCareers-DzZgsMAo.js"),__vite__mapDeps([82,34,30,45,46])).then(e=>({default:e.AdminCareers}))),V6=m.lazy(()=>X(()=>import("./AdminDistributors-Cz1GlICs.js"),__vite__mapDeps([83,34,4,45,46])).then(e=>({default:e.AdminDistributors}))),B6=new nj,z6=()=>f.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:f.jsx("div",{className:"h-1 w-24 bg-gradient-to-r from-transparent via-primary to-transparent animate-pulse"})}),H6=()=>f.jsx(o_,{children:f.jsx(aj,{client:B6,children:f.jsxs(_D,{children:[f.jsx(N2,{}),f.jsx(ON,{}),f.jsxs(wO,{children:[f.jsx(SV,{}),f.jsx(_V,{}),f.jsx(m.Suspense,{fallback:f.jsx(z6,{}),children:f.jsxs(uO,{children:[f.jsxs(V,{element:f.jsx(xV,{}),children:[f.jsx(V,{path:"/",element:f.jsx(C8,{})}),f.jsx(V,{path:"/products",element:f.jsx(R8,{})}),f.jsx(V,{path:"/products/:slug",element:f.jsx(P8,{})}),f.jsx(V,{path:"/sectors/automotive-refinish",element:f.jsx(j8,{})}),f.jsx(V,{path:"/sectors/car-care",element:f.jsx(O8,{})}),f.jsx(V,{path:"/sectors/wood-coatings",element:f.jsx(N8,{})}),f.jsx(V,{path:"/sectors/industrial",element:f.jsx(I8,{})}),f.jsx(V,{path:"/sectors/aeroplane-coating",element:f.jsx(L8,{})}),f.jsx(V,{path:"/sectors/railway-coating",element:f.jsx(D8,{})}),f.jsx(V,{path:"/royal-lab",element:f.jsx(M8,{})}),f.jsx(V,{path:"/about",element:f.jsx($8,{})}),f.jsx(V,{path:"/contact",element:f.jsx(F8,{})}),f.jsx(V,{path:"/events",element:f.jsx(U8,{})}),f.jsx(V,{path:"/events/:slug",element:f.jsx(V8,{})}),f.jsx(V,{path:"/careers",element:f.jsx(B8,{})}),f.jsx(V,{path:"/careers/:slug",element:f.jsx(z8,{})}),f.jsx(V,{path:"/partners",element:f.jsx(H8,{})}),f.jsx(V,{path:"/certifications",element:f.jsx(W8,{})}),f.jsx(V,{path:"/projects",element:f.jsx(q8,{})}),f.jsx(V,{path:"/projects/:slug",element:f.jsx(K8,{})}),f.jsx(V,{path:"/quote",element:f.jsx(G8,{})}),f.jsx(V,{path:"/insights",element:f.jsx(Q8,{})}),f.jsx(V,{path:"/insights/:slug",element:f.jsx(Y8,{})}),f.jsx(V,{path:"/resources",element:f.jsx(J8,{})}),f.jsx(V,{path:"/training",element:f.jsx(X8,{})}),f.jsx(V,{path:"/color-support",element:f.jsx(Z8,{})}),f.jsx(V,{path:"/ar",element:f.jsx(e6,{})}),f.jsx(V,{path:"/where-to-buy",element:f.jsx(t6,{})}),f.jsx(V,{path:"/export",element:f.jsx(n6,{})}),f.jsxs(V,{path:"/brand",element:f.jsx(o6,{}),children:[f.jsx(V,{index:!0,element:f.jsx(a6,{})}),f.jsx(V,{path:"dna",element:f.jsx(l6,{})}),f.jsx(V,{path:"logo",element:f.jsx(c6,{})}),f.jsx(V,{path:"color",element:f.jsx(u6,{})}),f.jsx(V,{path:"typography",element:f.jsx(d6,{})}),f.jsx(V,{path:"voice",element:f.jsx(h6,{})}),f.jsx(V,{path:"imagery",element:f.jsx(f6,{})}),f.jsx(V,{path:"assets",element:f.jsx(p6,{})})]})]}),f.jsx(V,{path:"/auth",element:f.jsx(r6,{})}),f.jsx(V,{path:"/unsubscribe",element:f.jsx(s6,{})}),f.jsx(V,{path:"/.lovable/oauth/consent",element:f.jsx(i6,{})}),f.jsxs(V,{path:"/admin",element:f.jsx(m6,{}),children:[f.jsx(V,{index:!0,element:f.jsx(g6,{})}),f.jsx(V,{path:"inbox",element:f.jsx(D6,{})}),f.jsx(V,{path:"homepage",element:f.jsx(M6,{})}),f.jsx(V,{path:"products",element:f.jsx(C6,{})}),f.jsx(V,{path:"partners",element:f.jsx(b6,{})}),f.jsx(V,{path:"certifications",element:f.jsx(A6,{})}),f.jsx(V,{path:"projects",element:f.jsx(R6,{})}),f.jsx(V,{path:"quotes",element:f.jsx(P6,{})}),f.jsx(V,{path:"insights",element:f.jsx(j6,{})}),f.jsx(V,{path:"seo",element:f.jsx(S6,{})}),f.jsx(V,{path:"announcement",element:f.jsx(w6,{})}),f.jsx(V,{path:"contact-info",element:f.jsx(y6,{})}),f.jsx(V,{path:"branding",element:f.jsx(v6,{})}),f.jsx(V,{path:"media",element:f.jsx(_6,{})}),f.jsx(V,{path:"submissions",element:f.jsx(x6,{})}),f.jsx(V,{path:"users",element:f.jsx(E6,{})}),f.jsx(V,{path:"audit",element:f.jsx(T6,{})}),f.jsx(V,{path:"security",element:f.jsx(k6,{})}),f.jsx(V,{path:"footer",element:f.jsx(O6,{})}),f.jsx(V,{path:"content",element:f.jsx(N6,{})}),f.jsx(V,{path:"resources",element:f.jsx(I6,{})}),f.jsx(V,{path:"training",element:f.jsx(L6,{})}),f.jsx(V,{path:"distributors",element:f.jsx(V6,{})}),f.jsx(V,{path:"team",element:f.jsx($6,{})}),f.jsx(V,{path:"events",element:f.jsx(F6,{})}),f.jsx(V,{path:"careers",element:f.jsx(U6,{})}),f.jsx(V,{path:"*",element:f.jsx(aO,{to:"/admin",replace:!0})})]}),f.jsx(V,{path:"*",element:f.jsx(A8,{})})]})})]})]})})});OS(document.getElementById("root")).render(f.jsx(H6,{}));export{uC as $,M0 as A,D_ as B,Tz as C,$0 as D,Po as E,Bp as F,JI as G,qI as H,a_ as I,Bd as J,ol as K,Ce as L,wz as M,zp as N,Eo as O,GI as P,Fh as Q,De as R,tV as S,$I as T,ee as U,LI as V,va as W,TC as X,cu as Y,Q6 as Z,dH as _,nV as a,QI as a$,PB as a0,EV as a1,py as a2,d3 as a3,kV as a4,MT as a5,uV as a6,hH as a7,pH as a8,aV as a9,ED as aA,UN as aB,YI as aC,WI as aD,Ai as aE,oj as aF,vF as aG,OC as aH,Oc as aI,yH as aJ,uH as aK,fH as aL,_8 as aM,fs as aN,Do as aO,Jt as aP,de as aQ,ii as aR,Ye as aS,ur as aT,c_ as aU,N as aV,NC as aW,kl as aX,pV as aY,II as aZ,NI as a_,iV as aa,oV as ab,zI as ac,lV as ad,aH as ae,oH as af,UI as ag,qe as ah,MI as ai,kd as aj,le as ak,Hg as al,Ft as am,K6 as an,lO as ao,Wg as ap,ly as aq,cy as ar,IU as as,wT as at,bT as au,yT as av,vT as aw,_D as ax,Z6 as ay,eH as az,Uy as b,kz as b0,HI as b1,S8 as b2,ZC as b3,wa as b4,ba as b5,iH as b6,cH as b7,lH as b8,Nl as b9,mp as ba,tl as bb,ZP as bc,tt as bd,St as be,zP as bf,aE as bg,tD as bh,Ol as bi,_U as bj,LF as bk,eT as bl,qE as bm,Rd as bn,nD as bo,rD as bp,e8 as bq,cI as br,_n as bs,eD as bt,Ug as bu,il as bv,DI as bw,cx as c,lx as d,EC as e,ax as f,Hp as g,Ho as h,zn as i,f as j,Dz as k,fe as l,We as m,q6 as n,sH as o,Vw as p,Fu as q,m as r,rH as s,lu as t,G6 as u,Wo as v,BI as w,VI as x,cV as y,_C 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.