@golocalinteractive/golocal-cloud-wrapper 1.0.49 → 1.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(A,I){typeof exports=="object"&&typeof module<"u"?I(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],I):(A=typeof globalThis<"u"?globalThis:A||self,I(A.GoLocalCloudWrapper={},A.React,A.ReactDOM))})(this,function(A,I,Br){"use strict";function Ur(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const l=Ur(I),Kr=Ur(Br);var Ot={exports:{}},mt={};/**
1
+ (function(L,W){typeof exports=="object"&&typeof module<"u"?W(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],W):(L=typeof globalThis<"u"?globalThis:L||self,W(L.GoLocalCloudWrapper={},L.React,L.ReactDOM))})(this,function(L,W,jt){"use strict";var b2=Object.defineProperty;var y2=(L,W,jt)=>W in L?b2(L,W,{enumerable:!0,configurable:!0,writable:!0,value:jt}):L[W]=jt;var Le=(L,W,jt)=>y2(L,typeof W!="symbol"?W+"":W,jt);var lo,Xh,fo,Yh;function Oi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const _=Oi(W),ki=Oi(jt);var rr={exports:{}},Rn={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Yr;function oc(){if(Yr)return mt;Yr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var i in o)i!=="key"&&(s[i]=o[i])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:s}}return mt.Fragment=t,mt.jsx=n,mt.jsxs=n,mt}var ht={};/**
9
+ */var Ni;function Qh(){if(Ni)return Rn;Ni=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var i in o)i!=="key"&&(s[i]=o[i])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:s}}return Rn.Fragment=t,Rn.jsx=n,Rn.jsxs=n,Rn}var Cn={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,12 +14,12 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var qr;function sc(){return qr||(qr=1,process.env.NODE_ENV!=="production"&&function(){function e(y){if(y==null)return null;if(typeof y=="function")return y.$$typeof===L?null:y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case g:return"Fragment";case v:return"Profiler";case w:return"StrictMode";case _:return"Suspense";case T:return"SuspenseList";case j:return"Activity"}if(typeof y=="object")switch(typeof y.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),y.$$typeof){case b:return"Portal";case E:return(y.displayName||"Context")+".Provider";case x:return(y._context.displayName||"Context")+".Consumer";case S:var P=y.render;return y=y.displayName,y||(y=P.displayName||P.name||"",y=y!==""?"ForwardRef("+y+")":"ForwardRef"),y;case M:return P=y.displayName||null,P!==null?P:e(y.type)||"Memo";case C:P=y._payload,y=y._init;try{return e(y(P))}catch{}}return null}function t(y){return""+y}function n(y){try{t(y);var P=!1}catch{P=!0}if(P){P=console;var F=P.error,H=typeof Symbol=="function"&&Symbol.toStringTag&&y[Symbol.toStringTag]||y.constructor.name||"Object";return F.call(P,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",H),t(y)}}function r(y){if(y===g)return"<>";if(typeof y=="object"&&y!==null&&y.$$typeof===C)return"<...>";try{var P=e(y);return P?"<"+P+">":"<...>"}catch{return"<...>"}}function o(){var y=U.A;return y===null?null:y.getOwner()}function s(){return Error("react-stack-top-frame")}function a(y){if(B.call(y,"key")){var P=Object.getOwnPropertyDescriptor(y,"key").get;if(P&&P.isReactWarning)return!1}return y.key!==void 0}function i(y,P){function F(){X||(X=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",P))}F.isReactWarning=!0,Object.defineProperty(y,"key",{get:F,configurable:!0})}function c(){var y=e(this.type);return V[y]||(V[y]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),y=this.props.ref,y!==void 0?y:null}function p(y,P,F,H,Z,ne,ue,Y){return F=ne.ref,y={$$typeof:h,type:y,key:P,props:ne,_owner:Z},(F!==void 0?F:null)!==null?Object.defineProperty(y,"ref",{enumerable:!1,get:c}):Object.defineProperty(y,"ref",{enumerable:!1,value:null}),y._store={},Object.defineProperty(y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(y,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(y,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ue}),Object.defineProperty(y,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Y}),Object.freeze&&(Object.freeze(y.props),Object.freeze(y)),y}function d(y,P,F,H,Z,ne,ue,Y){var ee=P.children;if(ee!==void 0)if(H)if(z(ee)){for(H=0;H<ee.length;H++)f(ee[H]);Object.freeze&&Object.freeze(ee)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(ee);if(B.call(P,"key")){ee=e(y);var te=Object.keys(P).filter(function(Se){return Se!=="key"});H=0<te.length?"{key: someKey, "+te.join(": ..., ")+": ...}":"{key: someKey}",N[ee+H]||(te=0<te.length?"{"+te.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var Ii;function ep(){return Ii||(Ii=1,process.env.NODE_ENV!=="production"&&function(){function e(T){if(T==null)return null;if(typeof T=="function")return T.$$typeof===D?null:T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case y:return"Fragment";case p:return"Profiler";case g:return"StrictMode";case v:return"Suspense";case R:return"SuspenseList";case C:return"Activity"}if(typeof T=="object")switch(typeof T.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),T.$$typeof){case E:return"Portal";case f:return(T.displayName||"Context")+".Provider";case b:return(T._context.displayName||"Context")+".Consumer";case A:var H=T.render;return T=T.displayName,T||(T=H.displayName||H.name||"",T=T!==""?"ForwardRef("+T+")":"ForwardRef"),T;case w:return H=T.displayName||null,H!==null?H:e(T.type)||"Memo";case x:H=T._payload,T=T._init;try{return e(T(H))}catch{}}return null}function t(T){return""+T}function n(T){try{t(T);var H=!1}catch{H=!0}if(H){H=console;var J=H.error,X=typeof Symbol=="function"&&Symbol.toStringTag&&T[Symbol.toStringTag]||T.constructor.name||"Object";return J.call(H,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",X),t(T)}}function r(T){if(T===y)return"<>";if(typeof T=="object"&&T!==null&&T.$$typeof===x)return"<...>";try{var H=e(T);return H?"<"+H+">":"<...>"}catch{return"<...>"}}function o(){var T=I.A;return T===null?null:T.getOwner()}function s(){return Error("react-stack-top-frame")}function a(T){if(P.call(T,"key")){var H=Object.getOwnPropertyDescriptor(T,"key").get;if(H&&H.isReactWarning)return!1}return T.key!==void 0}function i(T,H){function J(){oe||(oe=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",H))}J.isReactWarning=!0,Object.defineProperty(T,"key",{get:J,configurable:!0})}function c(){var T=e(this.type);return V[T]||(V[T]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),T=this.props.ref,T!==void 0?T:null}function u(T,H,J,X,se,fe,ye,te){return J=fe.ref,T={$$typeof:m,type:T,key:H,props:fe,_owner:se},(J!==void 0?J:null)!==null?Object.defineProperty(T,"ref",{enumerable:!1,get:c}):Object.defineProperty(T,"ref",{enumerable:!1,value:null}),T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(T,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(T,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ye}),Object.defineProperty(T,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:te}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T}function l(T,H,J,X,se,fe,ye,te){var le=H.children;if(le!==void 0)if(X)if(U(le)){for(X=0;X<le.length;X++)d(le[X]);Object.freeze&&Object.freeze(le)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(le);if(P.call(H,"key")){le=e(T);var ue=Object.keys(H).filter(function(k){return k!=="key"});X=0<ue.length?"{key: someKey, "+ue.join(": ..., ")+": ...}":"{key: someKey}",j[le+X]||(ue=0<ue.length?"{"+ue.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,H,ee,te,ee),N[ee+H]=!0)}if(ee=null,F!==void 0&&(n(F),ee=""+F),a(P)&&(n(P.key),ee=""+P.key),"key"in P){F={};for(var ae in P)ae!=="key"&&(F[ae]=P[ae])}else F=P;return ee&&i(F,typeof y=="function"?y.displayName||y.name||"Unknown":y),p(y,ee,ne,Z,o(),F,ue,Y)}function f(y){typeof y=="object"&&y!==null&&y.$$typeof===h&&y._store&&(y._store.validated=1)}var m=I,h=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),E=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),L=Symbol.for("react.client.reference"),U=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=Object.prototype.hasOwnProperty,z=Array.isArray,W=console.createTask?console.createTask:function(){return null};m={"react-stack-bottom-frame":function(y){return y()}};var X,V={},K=m["react-stack-bottom-frame"].bind(m,s)(),R=W(r(s)),N={};ht.Fragment=g,ht.jsx=function(y,P,F,H,Z){var ne=1e4>U.recentlyCreatedOwnerStacks++;return d(y,P,F,!1,H,Z,ne?Error("react-stack-top-frame"):K,ne?W(r(y)):R)},ht.jsxs=function(y,P,F,H,Z){var ne=1e4>U.recentlyCreatedOwnerStacks++;return d(y,P,F,!0,H,Z,ne?Error("react-stack-top-frame"):K,ne?W(r(y)):R)}}()),ht}var Xr;function ac(){return Xr||(Xr=1,process.env.NODE_ENV==="production"?Ot.exports=oc():Ot.exports=sc()),Ot.exports}var u=ac(),Pt={exports:{}},wn={};/**
22
+ <%s key={someKey} {...props} />`,X,le,ue,le),j[le+X]=!0)}if(le=null,J!==void 0&&(n(J),le=""+J),a(H)&&(n(H.key),le=""+H.key),"key"in H){J={};for(var be in H)be!=="key"&&(J[be]=H[be])}else J=H;return le&&i(J,typeof T=="function"?T.displayName||T.name||"Unknown":T),u(T,le,fe,se,o(),J,ye,te)}function d(T){typeof T=="object"&&T!==null&&T.$$typeof===m&&T._store&&(T._store.validated=1)}var h=W,m=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),f=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),D=Symbol.for("react.client.reference"),I=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=Object.prototype.hasOwnProperty,U=Array.isArray,G=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(T){return T()}};var oe,V={},Y=h["react-stack-bottom-frame"].bind(h,s)(),O=G(r(s)),j={};Cn.Fragment=y,Cn.jsx=function(T,H,J,X,se){var fe=1e4>I.recentlyCreatedOwnerStacks++;return l(T,H,J,!1,X,se,fe?Error("react-stack-top-frame"):Y,fe?G(r(T)):O)},Cn.jsxs=function(T,H,J,X,se){var fe=1e4>I.recentlyCreatedOwnerStacks++;return l(T,H,J,!0,X,se,fe?Error("react-stack-top-frame"):Y,fe?G(r(T)):O)}}()),Cn}var Di;function tp(){return Di||(Di=1,process.env.NODE_ENV==="production"?rr.exports=Qh():rr.exports=ep()),rr.exports}var S=tp(),or={exports:{}},po={};/**
23
23
  * @license React
24
24
  * use-sync-external-store-shim.production.js
25
25
  *
@@ -27,7 +27,7 @@ React keys must be passed directly to JSX without using spread:
27
27
  *
28
28
  * This source code is licensed under the MIT license found in the
29
29
  * LICENSE file in the root directory of this source tree.
30
- */var Zr;function ic(){if(Zr)return wn;Zr=1;var e=I;function t(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function i(f,m){var h=m(),b=r({inst:{value:h,getSnapshot:m}}),g=b[0].inst,w=b[1];return s(function(){g.value=h,g.getSnapshot=m,c(g)&&w({inst:g})},[f,h,m]),o(function(){return c(g)&&w({inst:g}),f(function(){c(g)&&w({inst:g})})},[f]),a(h),h}function c(f){var m=f.getSnapshot;f=f.value;try{var h=m();return!n(f,h)}catch{return!0}}function p(f,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:i;return wn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,wn}var xn={};/**
30
+ */var Mi;function np(){if(Mi)return po;Mi=1;var e=W;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function i(d,h){var m=h(),E=r({inst:{value:m,getSnapshot:h}}),y=E[0].inst,g=E[1];return s(function(){y.value=m,y.getSnapshot=h,c(y)&&g({inst:y})},[d,m,h]),o(function(){return c(y)&&g({inst:y}),d(function(){c(y)&&g({inst:y})})},[d]),a(m),m}function c(d){var h=d.getSnapshot;d=d.value;try{var m=h();return!n(d,m)}catch{return!0}}function u(d,h){return h()}var l=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return po.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:l,po}var mo={};/**
31
31
  * @license React
32
32
  * use-sync-external-store-shim.development.js
33
33
  *
@@ -35,112 +35,112 @@ React keys must be passed directly to JSX without using spread:
35
35
  *
36
36
  * This source code is licensed under the MIT license found in the
37
37
  * LICENSE file in the root directory of this source tree.
38
- */var Jr;function cc(){return Jr||(Jr=1,process.env.NODE_ENV!=="production"&&function(){function e(h,b){return h===b&&(h!==0||1/h===1/b)||h!==h&&b!==b}function t(h,b){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=b();if(!f){var w=b();s(g,w)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}w=a({inst:{value:g,getSnapshot:b}});var v=w[0].inst,x=w[1];return c(function(){v.value=g,v.getSnapshot=b,n(v)&&x({inst:v})},[h,g,b]),i(function(){return n(v)&&x({inst:v}),h(function(){n(v)&&x({inst:v})})},[h]),p(g),g}function n(h){var b=h.getSnapshot;h=h.value;try{var g=b();return!s(h,g)}catch{return!0}}function r(h,b){return b()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=I,s=typeof Object.is=="function"?Object.is:e,a=o.useState,i=o.useEffect,c=o.useLayoutEffect,p=o.useDebugValue,d=!1,f=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;xn.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),xn}var Qr;function lc(){return Qr||(Qr=1,process.env.NODE_ENV==="production"?Pt.exports=ic():Pt.exports=cc()),Pt.exports}var uc=lc();const eo=0,to=1,no=2,ro=3;var oo=Object.prototype.hasOwnProperty;function yn(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&yn(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(oo.call(e,n)&&++r&&!oo.call(t,n)||!(n in t)||!yn(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const ke=new WeakMap,Ve=()=>{},de=Ve(),Dt=Object,q=e=>e===de,xe=e=>typeof e=="function",Oe=(e,t)=>({...e,...t}),so=e=>xe(e.then),Cn={},It={},En="undefined",gt=typeof window!=En,Sn=typeof document!=En,dc=gt&&"Deno"in window,fc=()=>gt&&typeof window.requestAnimationFrame!=En,ao=(e,t)=>{const n=ke.get(e);return[()=>!q(t)&&e.get(t)||Cn,r=>{if(!q(t)){const o=e.get(t);t in It||(It[t]=o),n[5](t,Oe(o,r),o||Cn)}},n[6],()=>!q(t)&&t in It?It[t]:!q(t)&&e.get(t)||Cn]};let _n=!0;const pc=()=>_n,[Rn,Mn]=gt&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Ve,Ve],mc=()=>{const e=Sn&&document.visibilityState;return q(e)||e!=="hidden"},hc=e=>(Sn&&document.addEventListener("visibilitychange",e),Rn("focus",e),()=>{Sn&&document.removeEventListener("visibilitychange",e),Mn("focus",e)}),gc=e=>{const t=()=>{_n=!0,e()},n=()=>{_n=!1};return Rn("online",t),Rn("offline",n),()=>{Mn("online",t),Mn("offline",n)}},vc={isOnline:pc,isVisible:mc},bc={initFocus:hc,initReconnect:gc},io=!I.useId,vt=!gt||dc,wc=e=>fc()?window.requestAnimationFrame(e):setTimeout(e,1),jt=vt?I.useEffect:I.useLayoutEffect,An=typeof navigator<"u"&&navigator.connection,co=!vt&&An&&(["slow-2g","2g"].includes(An.effectiveType)||An.saveData),Lt=new WeakMap,Tn=(e,t)=>Dt.prototype.toString.call(e)===`[object ${t}]`;let xc=0;const Nn=e=>{const t=typeof e,n=Tn(e,"Date"),r=Tn(e,"RegExp"),o=Tn(e,"Object");let s,a;if(Dt(e)===e&&!n&&!r){if(s=Lt.get(e),s)return s;if(s=++xc+"~",Lt.set(e,s),Array.isArray(e)){for(s="@",a=0;a<e.length;a++)s+=Nn(e[a])+",";Lt.set(e,s)}if(o){s="#";const i=Dt.keys(e).sort();for(;!q(a=i.pop());)q(e[a])||(s+=a+":"+Nn(e[a])+",");Lt.set(e,s)}}else s=n?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return s},kn=e=>{if(xe(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Nn(e):"",[e,t]};let yc=0;const On=()=>++yc;async function lo(...e){const[t,n,r,o]=e,s=Oe({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let a=s.populateCache;const i=s.rollbackOnError;let c=s.optimisticData;const p=m=>typeof i=="function"?i(m):i!==!1,d=s.throwOnError;if(xe(n)){const m=n,h=[],b=t.keys();for(const g of b)!/^\$(inf|sub)\$/.test(g)&&m(t.get(g)._k)&&h.push(g);return Promise.all(h.map(f))}return f(n);async function f(m){const[h]=kn(m);if(!h)return;const[b,g]=ao(t,h),[w,v,x,E]=ke.get(t),S=()=>{const z=w[h];return(xe(s.revalidate)?s.revalidate(b().data,m):s.revalidate!==!1)&&(delete x[h],delete E[h],z&&z[0])?z[0](no).then(()=>b().data):b().data};if(e.length<3)return S();let _=r,T;const M=On();v[h]=[M,0];const C=!q(c),j=b(),L=j.data,U=j._c,B=q(U)?L:U;if(C&&(c=xe(c)?c(B,L):c,g({data:c,_c:B})),xe(_))try{_=_(B)}catch(z){T=z}if(_&&so(_))if(_=await _.catch(z=>{T=z}),M!==v[h][0]){if(T)throw T;return _}else T&&C&&p(T)&&(a=!0,g({data:B,_c:de}));if(a&&!T)if(xe(a)){const z=a(_,B);g({data:z,error:de,_c:de})}else g({data:_,error:de,_c:de});if(v[h][1]=On(),Promise.resolve(S()).then(()=>{g({_c:de})}),T){if(d)throw T;return}return _}}const uo=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},fo=(e,t)=>{if(!ke.has(e)){const n=Oe(bc,t),r=Object.create(null),o=lo.bind(de,e);let s=Ve;const a=Object.create(null),i=(d,f)=>{const m=a[d]||[];return a[d]=m,m.push(f),()=>m.splice(m.indexOf(f),1)},c=(d,f,m)=>{e.set(d,f);const h=a[d];if(h)for(const b of h)b(f,m)},p=()=>{if(!ke.has(e)&&(ke.set(e,[r,Object.create(null),Object.create(null),Object.create(null),o,c,i]),!vt)){const d=n.initFocus(setTimeout.bind(de,uo.bind(de,r,eo))),f=n.initReconnect(setTimeout.bind(de,uo.bind(de,r,to)));s=()=>{d&&d(),f&&f(),ke.delete(e)}}};return p(),[e,o,p,s]}return[e,ke.get(e)[4]]},Cc=(e,t,n,r,o)=>{const s=n.errorRetryCount,a=o.retryCount,i=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!q(s)&&a>s||setTimeout(r,i,o)},Ec=yn,[Pn,Sc]=fo(new Map),po=Oe({onLoadingSlow:Ve,onSuccess:Ve,onError:Ve,onErrorRetry:Cc,onDiscarded:Ve,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:co?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:co?5e3:3e3,compare:Ec,isPaused:()=>!1,cache:Pn,mutate:Sc,fallback:{}},vc),mo=(e,t)=>{const n=Oe(e,t);if(t){const{use:r,fallback:o}=e,{use:s,fallback:a}=t;r&&s&&(n.use=r.concat(s)),o&&a&&(n.fallback=Oe(o,a))}return n},Dn=I.createContext({}),_c=e=>{const{value:t}=e,n=I.useContext(Dn),r=xe(t),o=I.useMemo(()=>r?t(n):t,[r,n,t]),s=I.useMemo(()=>r?o:mo(n,o),[r,n,o]),a=o&&o.provider,i=I.useRef(de);a&&!i.current&&(i.current=fo(a(s.cache||Pn),o));const c=i.current;return c&&(s.cache=c[0],s.mutate=c[1]),jt(()=>{if(c)return c[2]&&c[2](),c[3]},[]),I.createElement(Dn.Provider,Oe(e,{value:s}))},Rc="$inf$",ho=gt&&window.__SWR_DEVTOOLS_USE__,Mc=ho?window.__SWR_DEVTOOLS_USE__:[],Ac=()=>{ho&&(window.__SWR_DEVTOOLS_REACT__=I)},Tc=e=>xe(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Nc=()=>Oe(po,I.useContext(Dn)),kc=e=>(t,n,r)=>e(t,n&&((...s)=>{const[a]=kn(t),[,,,i]=ke.get(Pn);if(a.startsWith(Rc))return n(...s);const c=i[a];return q(c)?n(...s):(delete i[a],c)}),r),Oc=Mc.concat(kc),Pc=e=>function(...n){const r=Nc(),[o,s,a]=Tc(n),i=mo(r,a);let c=e;const{use:p}=i,d=(p||[]).concat(Oc);for(let f=d.length;f--;)c=d[f](c);return c(o,s||i.fetcher||null,i)},Dc=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const o=r.indexOf(n);o>=0&&(r[o]=r[r.length-1],r.pop())}};Ac();const In=I.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),jn={dedupe:!0},Ic=(e,t,n)=>{const{cache:r,compare:o,suspense:s,fallbackData:a,revalidateOnMount:i,revalidateIfStale:c,refreshInterval:p,refreshWhenHidden:d,refreshWhenOffline:f,keepPreviousData:m}=n,[h,b,g,w]=ke.get(r),[v,x]=kn(e),E=I.useRef(!1),S=I.useRef(!1),_=I.useRef(v),T=I.useRef(t),M=I.useRef(n),C=()=>M.current,j=()=>C().isVisible()&&C().isOnline(),[L,U,B,z]=ao(r,v),W=I.useRef({}).current,X=q(a)?q(n.fallback)?de:n.fallback[v]:a,V=(J,Q)=>{for(const le in W){const oe=le;if(oe==="data"){if(!o(J[oe],Q[oe])&&(!q(J[oe])||!o(ne,Q[oe])))return!1}else if(Q[oe]!==J[oe])return!1}return!0},K=I.useMemo(()=>{const J=!v||!t?!1:q(i)?C().isPaused()||s?!1:c!==!1:i,Q=me=>{const Fe=Oe(me);return delete Fe._k,J?{isValidating:!0,isLoading:!0,...Fe}:Fe},le=L(),oe=z(),ve=Q(le),Ye=le===oe?ve:Q(oe);let se=ve;return[()=>{const me=Q(L());return V(me,se)?(se.data=me.data,se.isLoading=me.isLoading,se.isValidating=me.isValidating,se.error=me.error,se):(se=me,me)},()=>Ye]},[r,v]),R=uc.useSyncExternalStore(I.useCallback(J=>B(v,(Q,le)=>{V(le,Q)||J()}),[r,v]),K[0],K[1]),N=!E.current,y=h[v]&&h[v].length>0,P=R.data,F=q(P)?X&&so(X)?In(X):X:P,H=R.error,Z=I.useRef(F),ne=m?q(P)?q(Z.current)?F:Z.current:P:F,ue=y&&!q(H)?!1:N&&!q(i)?i:C().isPaused()?!1:s?q(F)?!1:c:q(F)||c,Y=!!(v&&t&&N&&ue),ee=q(R.isValidating)?Y:R.isValidating,te=q(R.isLoading)?Y:R.isLoading,ae=I.useCallback(async J=>{const Q=T.current;if(!v||!Q||S.current||C().isPaused())return!1;let le,oe,ve=!0;const Ye=J||{},se=!g[v]||!Ye.dedupe,me=()=>io?!S.current&&v===_.current&&E.current:v===_.current,Fe={isValidating:!1,isLoading:!1},tc=()=>{U(Fe)},nc=()=>{const we=g[v];we&&we[1]===oe&&delete g[v]},rc={isValidating:!0};q(L().data)&&(rc.isLoading=!0);try{if(se&&(U(rc),n.loadingTimeout&&q(L().data)&&setTimeout(()=>{ve&&me()&&C().onLoadingSlow(v,n)},n.loadingTimeout),g[v]=[Q(x),On()]),[le,oe]=g[v],le=await le,se&&setTimeout(nc,n.dedupingInterval),!g[v]||g[v][1]!==oe)return se&&me()&&C().onDiscarded(v),!1;Fe.error=de;const we=b[v];if(!q(we)&&(oe<=we[0]||oe<=we[1]||we[1]===0))return tc(),se&&me()&&C().onDiscarded(v),!1;const $e=L().data;Fe.data=o($e,le)?$e:le,se&&me()&&C().onSuccess(le,v,n)}catch(we){nc();const $e=C(),{shouldRetryOnError:Wr}=$e;$e.isPaused()||(Fe.error=we,se&&me()&&($e.onError(we,v,$e),(Wr===!0||xe(Wr)&&Wr(we))&&(!C().revalidateOnFocus||!C().revalidateOnReconnect||j())&&$e.onErrorRetry(we,v,$e,h0=>{const Gr=h[v];Gr&&Gr[0]&&Gr[0](ro,h0)},{retryCount:(Ye.retryCount||0)+1,dedupe:!0})))}return ve=!1,tc(),!0},[v,r]),Se=I.useCallback((...J)=>lo(r,_.current,...J),[]);if(jt(()=>{T.current=t,M.current=n,q(P)||(Z.current=P)}),jt(()=>{if(!v)return;const J=ae.bind(de,jn);let Q=0;C().revalidateOnFocus&&(Q=Date.now()+C().focusThrottleInterval);const oe=Dc(v,h,(ve,Ye={})=>{if(ve==eo){const se=Date.now();C().revalidateOnFocus&&se>Q&&j()&&(Q=se+C().focusThrottleInterval,J())}else if(ve==to)C().revalidateOnReconnect&&j()&&J();else{if(ve==no)return ae();if(ve==ro)return ae(Ye)}});return S.current=!1,_.current=v,E.current=!0,U({_k:x}),ue&&(q(F)||vt?J():wc(J)),()=>{S.current=!0,oe()}},[v]),jt(()=>{let J;function Q(){const oe=xe(p)?p(L().data):p;oe&&J!==-1&&(J=setTimeout(le,oe))}function le(){!L().error&&(d||C().isVisible())&&(f||C().isOnline())?ae(jn).then(Q):Q()}return Q(),()=>{J&&(clearTimeout(J),J=-1)}},[p,d,f,v]),I.useDebugValue(ne),s&&q(F)&&v){if(!io&&vt)throw new Error("Fallback data is required when using Suspense in SSR.");T.current=t,M.current=n,S.current=!1;const J=w[v];if(!q(J)){const Q=Se(J);In(Q)}if(q(H)){const Q=ae(jn);q(ne)||(Q.status="fulfilled",Q.value=!0),In(Q)}else throw H}return{mutate:Se,get data(){return W.data=!0,ne},get error(){return W.error=!0,H},get isValidating(){return W.isValidating=!0,ee},get isLoading(){return W.isLoading=!0,te}}},jc=Dt.defineProperty(_c,"defaultValue",{value:po}),Lc=Pc(Ic);function Fc(e){return e&&!e.startsWith("/")?`/${e}`:e}function $c(e){return e&&!e.endsWith("/")?`${e}/`:e}function Vc(e){return e.startsWith("/")?e.substring(1,e.length):e}const Hc=e=>{const t=process.env.NEXT_PUBLIC_BASE_PATH;if(!t)return e;const n=Fc(t);return $c(n)+Vc(e)};function zc(){const{data:e,error:t,isLoading:n,mutate:r}=Lc(Hc(process.env.NEXT_PUBLIC_PROFILE_ROUTE||"/auth/profile"),(...o)=>fetch(...o).then(s=>{if(!s.ok)throw new Error("Unauthorized");return s.status===204?null:s.json()}));return t?{user:null,isLoading:!1,error:t,invalidate:()=>r()}:e?{user:e,isLoading:!1,error:null,invalidate:()=>r()}:{user:e,isLoading:n,error:t,invalidate:()=>r()}}var go;(function(e){e.MISSING_SESSION="missing_session",e.MISSING_REFRESH_TOKEN="missing_refresh_token",e.FAILED_TO_REFRESH_TOKEN="failed_to_refresh_token"})(go||(go={}));var vo;(function(e){e.MISSING_SESSION="missing_session",e.MISSING_REFRESH_TOKEN="missing_refresh_token",e.FAILED_TO_EXCHANGE="failed_to_exchange_refresh_token"})(vo||(vo={}));function Wc({user:e,children:t}){return I.createElement(jc,{value:{fallback:{[process.env.NEXT_PUBLIC_PROFILE_ROUTE||"/auth/profile"]:e}}},t)}/**
38
+ */var Li;function rp(){return Li||(Li=1,process.env.NODE_ENV!=="production"&&function(){function e(m,E){return m===E&&(m!==0||1/m===1/E)||m!==m&&E!==E}function t(m,E){l||o.startTransition===void 0||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var y=E();if(!d){var g=E();s(y,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}g=a({inst:{value:y,getSnapshot:E}});var p=g[0].inst,b=g[1];return c(function(){p.value=y,p.getSnapshot=E,n(p)&&b({inst:p})},[m,y,E]),i(function(){return n(p)&&b({inst:p}),m(function(){n(p)&&b({inst:p})})},[m]),u(y),y}function n(m){var E=m.getSnapshot;m=m.value;try{var y=E();return!s(m,y)}catch{return!0}}function r(m,E){return E()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=W,s=typeof Object.is=="function"?Object.is:e,a=o.useState,i=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,l=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;mo.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),mo}var ji;function op(){return ji||(ji=1,process.env.NODE_ENV==="production"?or.exports=np():or.exports=rp()),or.exports}var sp=op();const Hi=0,Ui=1,$i=2,Wi=3;var Fi=Object.prototype.hasOwnProperty;function go(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&go(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Fi.call(e,n)&&++r&&!Fi.call(t,n)||!(n in t)||!go(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const pt=new WeakMap,St=()=>{},je=St(),sr=Object,de=e=>e===je,et=e=>typeof e=="function",mt=(e,t)=>({...e,...t}),Ki=e=>et(e.then),bo={},ar={},yo="undefined",Tn=typeof window!=yo,wo=typeof document!=yo,ap=Tn&&"Deno"in window,ip=()=>Tn&&typeof window.requestAnimationFrame!=yo,qi=(e,t)=>{const n=pt.get(e);return[()=>!de(t)&&e.get(t)||bo,r=>{if(!de(t)){const o=e.get(t);t in ar||(ar[t]=o),n[5](t,mt(o,r),o||bo)}},n[6],()=>!de(t)&&t in ar?ar[t]:!de(t)&&e.get(t)||bo]};let vo=!0;const cp=()=>vo,[Eo,_o]=Tn&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[St,St],up=()=>{const e=wo&&document.visibilityState;return de(e)||e!=="hidden"},lp=e=>(wo&&document.addEventListener("visibilitychange",e),Eo("focus",e),()=>{wo&&document.removeEventListener("visibilitychange",e),_o("focus",e)}),dp=e=>{const t=()=>{vo=!0,e()},n=()=>{vo=!1};return Eo("online",t),Eo("offline",n),()=>{_o("online",t),_o("offline",n)}},fp={isOnline:cp,isVisible:up},hp={initFocus:lp,initReconnect:dp},zi=!W.useId,Pn=!Tn||ap,pp=e=>ip()?window.requestAnimationFrame(e):setTimeout(e,1),ir=Pn?W.useEffect:W.useLayoutEffect,So=typeof navigator<"u"&&navigator.connection,Gi=!Pn&&So&&(["slow-2g","2g"].includes(So.effectiveType)||So.saveData),cr=new WeakMap,xo=(e,t)=>sr.prototype.toString.call(e)===`[object ${t}]`;let mp=0;const Ao=e=>{const t=typeof e,n=xo(e,"Date"),r=xo(e,"RegExp"),o=xo(e,"Object");let s,a;if(sr(e)===e&&!n&&!r){if(s=cr.get(e),s)return s;if(s=++mp+"~",cr.set(e,s),Array.isArray(e)){for(s="@",a=0;a<e.length;a++)s+=Ao(e[a])+",";cr.set(e,s)}if(o){s="#";const i=sr.keys(e).sort();for(;!de(a=i.pop());)de(e[a])||(s+=a+":"+Ao(e[a])+",");cr.set(e,s)}}else s=n?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return s},Ro=e=>{if(et(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Ao(e):"",[e,t]};let gp=0;const Co=()=>++gp;async function Bi(...e){const[t,n,r,o]=e,s=mt({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let a=s.populateCache;const i=s.rollbackOnError;let c=s.optimisticData;const u=h=>typeof i=="function"?i(h):i!==!1,l=s.throwOnError;if(et(n)){const h=n,m=[],E=t.keys();for(const y of E)!/^\$(inf|sub)\$/.test(y)&&h(t.get(y)._k)&&m.push(y);return Promise.all(m.map(d))}return d(n);async function d(h){const[m]=Ro(h);if(!m)return;const[E,y]=qi(t,m),[g,p,b,f]=pt.get(t),A=()=>{const U=g[m];return(et(s.revalidate)?s.revalidate(E().data,h):s.revalidate!==!1)&&(delete b[m],delete f[m],U&&U[0])?U[0]($i).then(()=>E().data):E().data};if(e.length<3)return A();let v=r,R;const w=Co();p[m]=[w,0];const x=!de(c),C=E(),D=C.data,I=C._c,P=de(I)?D:I;if(x&&(c=et(c)?c(P,D):c,y({data:c,_c:P})),et(v))try{v=v(P)}catch(U){R=U}if(v&&Ki(v))if(v=await v.catch(U=>{R=U}),w!==p[m][0]){if(R)throw R;return v}else R&&x&&u(R)&&(a=!0,y({data:P,_c:je}));if(a&&!R)if(et(a)){const U=a(v,P);y({data:U,error:je,_c:je})}else y({data:v,error:je,_c:je});if(p[m][1]=Co(),Promise.resolve(A()).then(()=>{y({_c:je})}),R){if(l)throw R;return}return v}}const Vi=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Ji=(e,t)=>{if(!pt.has(e)){const n=mt(hp,t),r=Object.create(null),o=Bi.bind(je,e);let s=St;const a=Object.create(null),i=(l,d)=>{const h=a[l]||[];return a[l]=h,h.push(d),()=>h.splice(h.indexOf(d),1)},c=(l,d,h)=>{e.set(l,d);const m=a[l];if(m)for(const E of m)E(d,h)},u=()=>{if(!pt.has(e)&&(pt.set(e,[r,Object.create(null),Object.create(null),Object.create(null),o,c,i]),!Pn)){const l=n.initFocus(setTimeout.bind(je,Vi.bind(je,r,Hi))),d=n.initReconnect(setTimeout.bind(je,Vi.bind(je,r,Ui)));s=()=>{l&&l(),d&&d(),pt.delete(e)}}};return u(),[e,o,u,s]}return[e,pt.get(e)[4]]},bp=(e,t,n,r,o)=>{const s=n.errorRetryCount,a=o.retryCount,i=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!de(s)&&a>s||setTimeout(r,i,o)},yp=go,[To,wp]=Ji(new Map),Xi=mt({onLoadingSlow:St,onSuccess:St,onError:St,onErrorRetry:bp,onDiscarded:St,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Gi?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Gi?5e3:3e3,compare:yp,isPaused:()=>!1,cache:To,mutate:wp,fallback:{}},fp),Yi=(e,t)=>{const n=mt(e,t);if(t){const{use:r,fallback:o}=e,{use:s,fallback:a}=t;r&&s&&(n.use=r.concat(s)),o&&a&&(n.fallback=mt(o,a))}return n},Po=W.createContext({}),vp=e=>{const{value:t}=e,n=W.useContext(Po),r=et(t),o=W.useMemo(()=>r?t(n):t,[r,n,t]),s=W.useMemo(()=>r?o:Yi(n,o),[r,n,o]),a=o&&o.provider,i=W.useRef(je);a&&!i.current&&(i.current=Ji(a(s.cache||To),o));const c=i.current;return c&&(s.cache=c[0],s.mutate=c[1]),ir(()=>{if(c)return c[2]&&c[2](),c[3]},[]),W.createElement(Po.Provider,mt(e,{value:s}))},Ep="$inf$",Zi=Tn&&window.__SWR_DEVTOOLS_USE__,_p=Zi?window.__SWR_DEVTOOLS_USE__:[],Sp=()=>{Zi&&(window.__SWR_DEVTOOLS_REACT__=W)},xp=e=>et(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Ap=()=>mt(Xi,W.useContext(Po)),Rp=e=>(t,n,r)=>e(t,n&&((...s)=>{const[a]=Ro(t),[,,,i]=pt.get(To);if(a.startsWith(Ep))return n(...s);const c=i[a];return de(c)?n(...s):(delete i[a],c)}),r),Cp=_p.concat(Rp),Tp=e=>function(...n){const r=Ap(),[o,s,a]=xp(n),i=Yi(r,a);let c=e;const{use:u}=i,l=(u||[]).concat(Cp);for(let d=l.length;d--;)c=l[d](c);return c(o,s||i.fetcher||null,i)},Pp=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const o=r.indexOf(n);o>=0&&(r[o]=r[r.length-1],r.pop())}};Sp();const Oo=W.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),ko={dedupe:!0},Op=(e,t,n)=>{const{cache:r,compare:o,suspense:s,fallbackData:a,revalidateOnMount:i,revalidateIfStale:c,refreshInterval:u,refreshWhenHidden:l,refreshWhenOffline:d,keepPreviousData:h}=n,[m,E,y,g]=pt.get(r),[p,b]=Ro(e),f=W.useRef(!1),A=W.useRef(!1),v=W.useRef(p),R=W.useRef(t),w=W.useRef(n),x=()=>w.current,C=()=>x().isVisible()&&x().isOnline(),[D,I,P,U]=qi(r,p),G=W.useRef({}).current,oe=de(a)?de(n.fallback)?je:n.fallback[p]:a,V=(M,q)=>{for(const ne in G){const $=ne;if($==="data"){if(!o(M[$],q[$])&&(!de(M[$])||!o(fe,q[$])))return!1}else if(q[$]!==M[$])return!1}return!0},Y=W.useMemo(()=>{const M=!p||!t?!1:de(i)?x().isPaused()||s?!1:c!==!1:i,q=Ae=>{const De=mt(Ae);return delete De._k,M?{isValidating:!0,isLoading:!0,...De}:De},ne=D(),$=U(),Ee=q(ne),Ce=ne===$?Ee:q($);let pe=Ee;return[()=>{const Ae=q(D());return V(Ae,pe)?(pe.data=Ae.data,pe.isLoading=Ae.isLoading,pe.isValidating=Ae.isValidating,pe.error=Ae.error,pe):(pe=Ae,Ae)},()=>Ce]},[r,p]),O=sp.useSyncExternalStore(W.useCallback(M=>P(p,(q,ne)=>{V(ne,q)||M()}),[r,p]),Y[0],Y[1]),j=!f.current,T=m[p]&&m[p].length>0,H=O.data,J=de(H)?oe&&Ki(oe)?Oo(oe):oe:H,X=O.error,se=W.useRef(J),fe=h?de(H)?de(se.current)?J:se.current:H:J,ye=T&&!de(X)?!1:j&&!de(i)?i:x().isPaused()?!1:s?de(J)?!1:c:de(J)||c,te=!!(p&&t&&j&&ye),le=de(O.isValidating)?te:O.isValidating,ue=de(O.isLoading)?te:O.isLoading,be=W.useCallback(async M=>{const q=R.current;if(!p||!q||A.current||x().isPaused())return!1;let ne,$,Ee=!0;const Ce=M||{},pe=!y[p]||!Ce.dedupe,Ae=()=>zi?!A.current&&p===v.current&&f.current:p===v.current,De={isValidating:!1,isLoading:!1},xn=()=>{I(De)},ho=()=>{const Ke=y[p];Ke&&Ke[1]===$&&delete y[p]},nr={isValidating:!0};de(D().data)&&(nr.isLoading=!0);try{if(pe&&(I(nr),n.loadingTimeout&&de(D().data)&&setTimeout(()=>{Ee&&Ae()&&x().onLoadingSlow(p,n)},n.loadingTimeout),y[p]=[q(b),Co()]),[ne,$]=y[p],ne=await ne,pe&&setTimeout(ho,n.dedupingInterval),!y[p]||y[p][1]!==$)return pe&&Ae()&&x().onDiscarded(p),!1;De.error=je;const Ke=E[p];if(!de(Ke)&&($<=Ke[0]||$<=Ke[1]||Ke[1]===0))return xn(),pe&&Ae()&&x().onDiscarded(p),!1;const Re=D().data;De.data=o(Re,ne)?Re:ne,pe&&Ae()&&x().onSuccess(ne,p,n)}catch(Ke){ho();const Re=x(),{shouldRetryOnError:dt}=Re;Re.isPaused()||(De.error=Ke,pe&&Ae()&&(Re.onError(Ke,p,Re),(dt===!0||et(dt)&&dt(Ke))&&(!x().revalidateOnFocus||!x().revalidateOnReconnect||C())&&Re.onErrorRetry(Ke,p,Re,An=>{const ie=m[p];ie&&ie[0]&&ie[0](Wi,An)},{retryCount:(Ce.retryCount||0)+1,dedupe:!0})))}return Ee=!1,xn(),!0},[p,r]),k=W.useCallback((...M)=>Bi(r,v.current,...M),[]);if(ir(()=>{R.current=t,w.current=n,de(H)||(se.current=H)}),ir(()=>{if(!p)return;const M=be.bind(je,ko);let q=0;x().revalidateOnFocus&&(q=Date.now()+x().focusThrottleInterval);const $=Pp(p,m,(Ee,Ce={})=>{if(Ee==Hi){const pe=Date.now();x().revalidateOnFocus&&pe>q&&C()&&(q=pe+x().focusThrottleInterval,M())}else if(Ee==Ui)x().revalidateOnReconnect&&C()&&M();else{if(Ee==$i)return be();if(Ee==Wi)return be(Ce)}});return A.current=!1,v.current=p,f.current=!0,I({_k:b}),ye&&(de(J)||Pn?M():pp(M)),()=>{A.current=!0,$()}},[p]),ir(()=>{let M;function q(){const $=et(u)?u(D().data):u;$&&M!==-1&&(M=setTimeout(ne,$))}function ne(){!D().error&&(l||x().isVisible())&&(d||x().isOnline())?be(ko).then(q):q()}return q(),()=>{M&&(clearTimeout(M),M=-1)}},[u,l,d,p]),W.useDebugValue(fe),s&&de(J)&&p){if(!zi&&Pn)throw new Error("Fallback data is required when using Suspense in SSR.");R.current=t,w.current=n,A.current=!1;const M=g[p];if(!de(M)){const q=k(M);Oo(q)}if(de(X)){const q=be(ko);de(fe)||(q.status="fulfilled",q.value=!0),Oo(q)}else throw X}return{mutate:k,get data(){return G.data=!0,fe},get error(){return G.error=!0,X},get isValidating(){return G.isValidating=!0,le},get isLoading(){return G.isLoading=!0,ue}}},kp=sr.defineProperty(vp,"defaultValue",{value:Xi}),Np=Tp(Op);function Ip(e){return e&&!e.startsWith("/")?`/${e}`:e}function Qi(e){return e&&!e.endsWith("/")?`${e}/`:e}function ec(e){return e&&e.startsWith("/")?e.substring(1,e.length):e}const Dp=e=>e.endsWith("/")?e.slice(0,-1):e,tc=e=>{const t=process.env.NEXT_PUBLIC_BASE_PATH;if(!t)return e;const n=Ip(t);return Qi(n)+ec(e)};function Mp(){const{data:e,error:t,isLoading:n,mutate:r}=Np(tc(process.env.NEXT_PUBLIC_PROFILE_ROUTE||"/auth/profile"),(...o)=>fetch(...o).then(s=>{if(!s.ok)throw new Error("Unauthorized");return s.status===204?null:s.json()}));return t?{user:null,isLoading:!1,error:t,invalidate:()=>r()}:e?{user:e,isLoading:!1,error:null,invalidate:()=>r()}:{user:e,isLoading:n,error:t,invalidate:()=>r()}}class ot extends Error{}class On extends ot{constructor({code:t,message:n}){super(n??"An error occured while interacting with the authorization server."),this.name="OAuth2Error",this.code=t}}class Lp extends ot{constructor(t){super(t??"Discovery failed for the OpenID Connect configuration."),this.code="discovery_error",this.name="DiscoveryError"}}class jp extends ot{constructor(t){super(t??"The state parameter is missing."),this.code="missing_state",this.name="MissingStateError"}}class Hp extends ot{constructor(t){super(t??"The state parameter is invalid."),this.code="invalid_state",this.name="InvalidStateError"}}class nc extends ot{constructor({cause:t,message:n}){super(n??"An error occured during the authorization flow."),this.code="authorization_error",this.cause=t,this.name="AuthorizationError"}}class Up extends ot{constructor(t){super(t??"An error occured while preparing or performing the authorization code grant request."),this.code="authorization_code_grant_request_error",this.name="AuthorizationCodeGrantRequestError"}}class $p extends ot{constructor({cause:t,message:n}){super(n??"An error occured while trying to exchange the authorization code."),this.code="authorization_code_grant_error",this.cause=t,this.name="AuthorizationCodeGrantError"}}class xt extends ot{constructor(t){super(t??"An error occured while completing the backchannel logout request."),this.code="backchannel_logout_error",this.name="BackchannelLogoutError"}}var Qt;(function(e){e.MISSING_SESSION="missing_session",e.MISSING_REFRESH_TOKEN="missing_refresh_token",e.FAILED_TO_REFRESH_TOKEN="failed_to_refresh_token"})(Qt||(Qt={}));class No extends ot{constructor(t,n,r){super(n),this.name="AccessTokenError",this.code=t,this.cause=r}}var kn;(function(e){e.MISSING_SESSION="missing_session",e.MISSING_REFRESH_TOKEN="missing_refresh_token",e.FAILED_TO_EXCHANGE="failed_to_exchange_refresh_token"})(kn||(kn={}));class Io extends ot{constructor(t,n,r){super(n),this.name="AccessTokenForConnectionError",this.code=t,this.cause=r}}function Wp({user:e,children:t}){return W.createElement(kp,{value:{fallback:{[process.env.NEXT_PUBLIC_PROFILE_ROUTE||"/auth/profile"]:e}}},t)}/**
39
39
  * @license lucide-react v0.522.0 - ISC
40
40
  *
41
41
  * This source code is licensed under the ISC license.
42
42
  * See the LICENSE file in the root directory of this source tree.
43
- */const Gc=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Bc=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),bo=e=>{const t=Bc(e);return t.charAt(0).toUpperCase()+t.slice(1)},wo=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Uc=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
43
+ */const Fp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Kp=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),rc=e=>{const t=Kp(e);return t.charAt(0).toUpperCase()+t.slice(1)},oc=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),qp=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
44
44
  * @license lucide-react v0.522.0 - ISC
45
45
  *
46
46
  * This source code is licensed under the ISC license.
47
47
  * See the LICENSE file in the root directory of this source tree.
48
- */var Kc={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"};/**
48
+ */var zp={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"};/**
49
49
  * @license lucide-react v0.522.0 - ISC
50
50
  *
51
51
  * This source code is licensed under the ISC license.
52
52
  * See the LICENSE file in the root directory of this source tree.
53
- */const Yc=I.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:a,...i},c)=>I.createElement("svg",{ref:c,...Kc,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:wo("lucide",o),...!s&&!Uc(i)&&{"aria-hidden":"true"},...i},[...a.map(([p,d])=>I.createElement(p,d)),...Array.isArray(s)?s:[s]]));/**
53
+ */const Gp=W.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:a,...i},c)=>W.createElement("svg",{ref:c,...zp,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:oc("lucide",o),...!s&&!qp(i)&&{"aria-hidden":"true"},...i},[...a.map(([u,l])=>W.createElement(u,l)),...Array.isArray(s)?s:[s]]));/**
54
54
  * @license lucide-react v0.522.0 - ISC
55
55
  *
56
56
  * This source code is licensed under the ISC license.
57
57
  * See the LICENSE file in the root directory of this source tree.
58
- */const fe=(e,t)=>{const n=I.forwardRef(({className:r,...o},s)=>I.createElement(Yc,{ref:s,iconNode:t,className:wo(`lucide-${Gc(bo(e))}`,`lucide-${e}`,r),...o}));return n.displayName=bo(e),n};/**
58
+ */const He=(e,t)=>{const n=W.forwardRef(({className:r,...o},s)=>W.createElement(Gp,{ref:s,iconNode:t,className:oc(`lucide-${Fp(rc(e))}`,`lucide-${e}`,r),...o}));return n.displayName=rc(e),n};/**
59
59
  * @license lucide-react v0.522.0 - ISC
60
60
  *
61
61
  * This source code is licensed under the ISC license.
62
62
  * See the LICENSE file in the root directory of this source tree.
63
- */const qc=fe("book-open-text",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M16 12h2",key:"7q9ll5"}],["path",{d:"M16 8h2",key:"msurwy"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}],["path",{d:"M6 12h2",key:"32wvfc"}],["path",{d:"M6 8h2",key:"30oboj"}]]);/**
63
+ */const Bp=He("book-open-text",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M16 12h2",key:"7q9ll5"}],["path",{d:"M16 8h2",key:"msurwy"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}],["path",{d:"M6 12h2",key:"32wvfc"}],["path",{d:"M6 8h2",key:"30oboj"}]]);/**
64
64
  * @license lucide-react v0.522.0 - ISC
65
65
  *
66
66
  * This source code is licensed under the ISC license.
67
67
  * See the LICENSE file in the root directory of this source tree.
68
- */const Xc=fe("calendar-sync",[["path",{d:"M11 10v4h4",key:"172dkj"}],["path",{d:"m11 14 1.535-1.605a5 5 0 0 1 8 1.5",key:"vu0qm5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"m21 18-1.535 1.605a5 5 0 0 1-8-1.5",key:"1qgeyt"}],["path",{d:"M21 22v-4h-4",key:"hrummi"}],["path",{d:"M21 8.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h4.3",key:"mctw84"}],["path",{d:"M3 10h4",key:"1el30a"}],["path",{d:"M8 2v4",key:"1cmpym"}]]);/**
68
+ */const Vp=He("calendar-sync",[["path",{d:"M11 10v4h4",key:"172dkj"}],["path",{d:"m11 14 1.535-1.605a5 5 0 0 1 8 1.5",key:"vu0qm5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"m21 18-1.535 1.605a5 5 0 0 1-8-1.5",key:"1qgeyt"}],["path",{d:"M21 22v-4h-4",key:"hrummi"}],["path",{d:"M21 8.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h4.3",key:"mctw84"}],["path",{d:"M3 10h4",key:"1el30a"}],["path",{d:"M8 2v4",key:"1cmpym"}]]);/**
69
69
  * @license lucide-react v0.522.0 - ISC
70
70
  *
71
71
  * This source code is licensed under the ISC license.
72
72
  * See the LICENSE file in the root directory of this source tree.
73
- */const Ft=fe("chart-area",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z",key:"q0gr47"}]]);/**
73
+ */const ur=He("chart-area",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z",key:"q0gr47"}]]);/**
74
74
  * @license lucide-react v0.522.0 - ISC
75
75
  *
76
76
  * This source code is licensed under the ISC license.
77
77
  * See the LICENSE file in the root directory of this source tree.
78
- */const Zc=fe("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
78
+ */const Jp=He("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
79
79
  * @license lucide-react v0.522.0 - ISC
80
80
  *
81
81
  * This source code is licensed under the ISC license.
82
82
  * See the LICENSE file in the root directory of this source tree.
83
- */const xo=fe("chart-line",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/**
83
+ */const sc=He("chart-line",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/**
84
84
  * @license lucide-react v0.522.0 - ISC
85
85
  *
86
86
  * This source code is licensed under the ISC license.
87
87
  * See the LICENSE file in the root directory of this source tree.
88
- */const Jc=fe("chart-pie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);/**
88
+ */const Xp=He("chart-pie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);/**
89
89
  * @license lucide-react v0.522.0 - ISC
90
90
  *
91
91
  * This source code is licensed under the ISC license.
92
92
  * See the LICENSE file in the root directory of this source tree.
93
- */const Qc=fe("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
93
+ */const Yp=He("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
94
94
  * @license lucide-react v0.522.0 - ISC
95
95
  *
96
96
  * This source code is licensed under the ISC license.
97
97
  * See the LICENSE file in the root directory of this source tree.
98
- */const el=fe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
98
+ */const Zp=He("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
99
99
  * @license lucide-react v0.522.0 - ISC
100
100
  *
101
101
  * This source code is licensed under the ISC license.
102
102
  * See the LICENSE file in the root directory of this source tree.
103
- */const yo=fe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
103
+ */const ac=He("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
104
104
  * @license lucide-react v0.522.0 - ISC
105
105
  *
106
106
  * This source code is licensed under the ISC license.
107
107
  * See the LICENSE file in the root directory of this source tree.
108
- */const tl=fe("circle-dollar-sign",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]]);/**
108
+ */const Qp=He("circle-dollar-sign",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]]);/**
109
109
  * @license lucide-react v0.522.0 - ISC
110
110
  *
111
111
  * This source code is licensed under the ISC license.
112
112
  * See the LICENSE file in the root directory of this source tree.
113
- */const nl=fe("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
113
+ */const em=He("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
114
114
  * @license lucide-react v0.522.0 - ISC
115
115
  *
116
116
  * This source code is licensed under the ISC license.
117
117
  * See the LICENSE file in the root directory of this source tree.
118
- */const Co=fe("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
118
+ */const ic=He("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
119
119
  * @license lucide-react v0.522.0 - ISC
120
120
  *
121
121
  * This source code is licensed under the ISC license.
122
122
  * See the LICENSE file in the root directory of this source tree.
123
- */const rl=fe("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);/**
123
+ */const tm=He("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);/**
124
124
  * @license lucide-react v0.522.0 - ISC
125
125
  *
126
126
  * This source code is licensed under the ISC license.
127
127
  * See the LICENSE file in the root directory of this source tree.
128
- */const ol=fe("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
128
+ */const nm=He("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
129
129
  * @license lucide-react v0.522.0 - ISC
130
130
  *
131
131
  * This source code is licensed under the ISC license.
132
132
  * See the LICENSE file in the root directory of this source tree.
133
- */const Eo=fe("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
133
+ */const cc=He("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
134
134
  * @license lucide-react v0.522.0 - ISC
135
135
  *
136
136
  * This source code is licensed under the ISC license.
137
137
  * See the LICENSE file in the root directory of this source tree.
138
- */const sl=fe("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function So(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $t(...e){return t=>{let n=!1;const r=e.map(o=>{const s=So(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():So(e[o],null)}}}}function ie(...e){return l.useCallback($t(...e),e)}function et(e){const t=al(e),n=l.forwardRef((r,o)=>{const{children:s,...a}=r,i=l.Children.toArray(s),c=i.find(cl);if(c){const p=c.props.children,d=i.map(f=>f===c?l.Children.count(p)>1?l.Children.only(null):l.isValidElement(p)?p.props.children:null:f);return u.jsx(t,{...a,ref:o,children:l.isValidElement(p)?l.cloneElement(p,void 0,d):null})}return u.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var tt=et("Slot");function al(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const a=ul(o),i=ll(s,o.props);return o.type!==l.Fragment&&(i.ref=r?$t(r,a):a),l.cloneElement(o,i)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _o=Symbol("radix.slottable");function il(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=_o,t}function cl(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_o}function ll(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ul(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ro(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ro(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Mo(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ro(e))&&(r&&(r+=" "),r+=t);return r}const Ao=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,To=Mo,Ln=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return To(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(p=>{const d=n==null?void 0:n[p],f=s==null?void 0:s[p];if(d===null)return null;const m=Ao(d)||Ao(f);return o[p][m]}),i=n&&Object.entries(n).reduce((p,d)=>{let[f,m]=d;return m===void 0||(p[f]=m),p},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((p,d)=>{let{class:f,className:m,...h}=d;return Object.entries(h).every(b=>{let[g,w]=b;return Array.isArray(w)?w.includes({...s,...i}[g]):{...s,...i}[g]===w})?[...p,f,m]:p},[]);return To(e,a,c,n==null?void 0:n.class,n==null?void 0:n.className)},Fn="-",dl=e=>{const t=pl(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const i=a.split(Fn);return i[0]===""&&i.length!==1&&i.shift(),No(i,t)||fl(a)},getConflictingClassGroupIds:(a,i)=>{const c=n[a]||[];return i&&r[a]?[...c,...r[a]]:c}}},No=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?No(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Fn);return(a=t.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},ko=/^\[(.+)\]$/,fl=e=>{if(ko.test(e)){const t=ko.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},pl=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)$n(n[o],r,o,t);return r},$n=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Oo(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(ml(o)){$n(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,a])=>{$n(a,Oo(t,s),n,r)})})},Oo=(e,t)=>{let n=e;return t.split(Fn).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},ml=e=>e.isThemeGetter,hl=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return o(s,a),a},set(s,a){n.has(s)?n.set(s,a):o(s,a)}}},Vn="!",Hn=":",gl=Hn.length,vl=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let a=0,i=0,c=0,p;for(let b=0;b<o.length;b++){let g=o[b];if(a===0&&i===0){if(g===Hn){s.push(o.slice(c,b)),c=b+gl;continue}if(g==="/"){p=b;continue}}g==="["?a++:g==="]"?a--:g==="("?i++:g===")"&&i--}const d=s.length===0?o:o.substring(c),f=bl(d),m=f!==d,h=p&&p>c?p-c:void 0;return{modifiers:s,hasImportantModifier:m,baseClassName:f,maybePostfixModifierPosition:h}};if(t){const o=t+Hn,s=r;r=a=>a.startsWith(o)?s(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},bl=e=>e.endsWith(Vn)?e.substring(0,e.length-1):e.startsWith(Vn)?e.substring(1):e,wl=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...s.sort(),a),s=[]):s.push(a)}),o.push(...s.sort()),o}},xl=e=>({cache:hl(e.cacheSize),parseClassName:vl(e),sortModifiers:wl(e),...dl(e)}),yl=/\s+/,Cl=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(yl);let c="";for(let p=i.length-1;p>=0;p-=1){const d=i[p],{isExternal:f,modifiers:m,hasImportantModifier:h,baseClassName:b,maybePostfixModifierPosition:g}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let w=!!g,v=r(w?b.substring(0,g):b);if(!v){if(!w){c=d+(c.length>0?" "+c:c);continue}if(v=r(b),!v){c=d+(c.length>0?" "+c:c);continue}w=!1}const x=s(m).join(":"),E=h?x+Vn:x,S=E+v;if(a.includes(S))continue;a.push(S);const _=o(v,w);for(let T=0;T<_.length;++T){const M=_[T];a.push(E+M)}c=d+(c.length>0?" "+c:c)}return c};function El(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Po(t))&&(r&&(r+=" "),r+=n);return r}const Po=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Po(e[r]))&&(n&&(n+=" "),n+=t);return n};function Sl(e,...t){let n,r,o,s=a;function a(c){const p=t.reduce((d,f)=>f(d),e());return n=xl(p),r=n.cache.get,o=n.cache.set,s=i,i(c)}function i(c){const p=r(c);if(p)return p;const d=Cl(c,n);return o(c,d),d}return function(){return s(El.apply(null,arguments))}}const ce=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Do=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Io=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_l=/^\d+\/\d+$/,Rl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ml=/\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$/,Al=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Tl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nt=e=>_l.test(e),G=e=>!!e&&!Number.isNaN(Number(e)),He=e=>!!e&&Number.isInteger(Number(e)),zn=e=>e.endsWith("%")&&G(e.slice(0,-1)),Pe=e=>Rl.test(e),kl=()=>!0,Ol=e=>Ml.test(e)&&!Al.test(e),jo=()=>!1,Pl=e=>Tl.test(e),Dl=e=>Nl.test(e),Il=e=>!k(e)&&!O(e),jl=e=>rt(e,Ho,jo),k=e=>Do.test(e),qe=e=>rt(e,zo,Ol),Wn=e=>rt(e,Hl,G),Lo=e=>rt(e,$o,jo),Ll=e=>rt(e,Vo,Dl),Vt=e=>rt(e,Wo,Pl),O=e=>Io.test(e),bt=e=>ot(e,zo),Fl=e=>ot(e,zl),Fo=e=>ot(e,$o),$l=e=>ot(e,Ho),Vl=e=>ot(e,Vo),Ht=e=>ot(e,Wo,!0),rt=(e,t,n)=>{const r=Do.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ot=(e,t,n=!1)=>{const r=Io.exec(e);return r?r[1]?t(r[1]):n:!1},$o=e=>e==="position"||e==="percentage",Vo=e=>e==="image"||e==="url",Ho=e=>e==="length"||e==="size"||e==="bg-size",zo=e=>e==="length",Hl=e=>e==="number",zl=e=>e==="family-name",Wo=e=>e==="shadow",Wl=Sl(()=>{const e=ce("color"),t=ce("font"),n=ce("text"),r=ce("font-weight"),o=ce("tracking"),s=ce("leading"),a=ce("breakpoint"),i=ce("container"),c=ce("spacing"),p=ce("radius"),d=ce("shadow"),f=ce("inset-shadow"),m=ce("text-shadow"),h=ce("drop-shadow"),b=ce("blur"),g=ce("perspective"),w=ce("aspect"),v=ce("ease"),x=ce("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...S(),O,k],T=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],C=()=>[O,k,c],j=()=>[nt,"full","auto",...C()],L=()=>[He,"none","subgrid",O,k],U=()=>["auto",{span:["full",He,O,k]},He,O,k],B=()=>[He,"auto",O,k],z=()=>["auto","min","max","fr",O,k],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...C()],K=()=>[nt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],R=()=>[e,O,k],N=()=>[...S(),Fo,Lo,{position:[O,k]}],y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",$l,jl,{size:[O,k]}],F=()=>[zn,bt,qe],H=()=>["","none","full",p,O,k],Z=()=>["",G,bt,qe],ne=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>[G,zn,Fo,Lo],ee=()=>["","none",b,O,k],te=()=>["none",G,O,k],ae=()=>["none",G,O,k],Se=()=>[G,O,k],Ke=()=>[nt,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pe],breakpoint:[Pe],color:[kl],container:[Pe],"drop-shadow":[Pe],ease:["in","out","in-out"],font:[Il],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Pe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Pe],shadow:[Pe],spacing:["px",G],text:[Pe],"text-shadow":[Pe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nt,k,O,w]}],container:["container"],columns:[{columns:[G,k,O,i]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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"],sr:["sr-only","not-sr-only"],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:_()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{start:j()}],end:[{end:j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[He,"auto",O,k]}],basis:[{basis:[nt,"full","auto",i,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[G,nt,"auto","initial","none",k]}],grow:[{grow:["",G,O,k]}],shrink:[{shrink:["",G,O,k]}],order:[{order:[He,"first","last","none",O,k]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:U()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:U()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],w:[{w:[i,"screen",...K()]}],"min-w":[{"min-w":[i,"screen","none",...K()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",n,bt,qe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,O,Wn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",zn,k]}],"font-family":[{font:[Fl,k,t]}],"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:[o,O,k]}],"line-clamp":[{"line-clamp":[G,"none",O,Wn]}],leading:[{leading:[s,...C()]}],"list-image":[{"list-image":["none",O,k]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",O,k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[G,"from-font","auto",O,qe]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[G,"auto",O,k]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O,k]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",O,k]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:y()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},He,O,k],radial:["",O,k],conic:[He,O,k]},Vl,Ll]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[G,O,k]}],"outline-w":[{outline:["",G,bt,qe]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",d,Ht,Vt]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",f,Ht,Vt]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[G,qe]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",m,Ht,Vt]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[G,O,k]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[G]}],"mask-image-linear-from-pos":[{"mask-linear-from":Y()}],"mask-image-linear-to-pos":[{"mask-linear-to":Y()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":Y()}],"mask-image-t-to-pos":[{"mask-t-to":Y()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":Y()}],"mask-image-r-to-pos":[{"mask-r-to":Y()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":Y()}],"mask-image-b-to-pos":[{"mask-b-to":Y()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":Y()}],"mask-image-l-to-pos":[{"mask-l-to":Y()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":Y()}],"mask-image-x-to-pos":[{"mask-x-to":Y()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":Y()}],"mask-image-y-to-pos":[{"mask-y-to":Y()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[O,k]}],"mask-image-radial-from-pos":[{"mask-radial-from":Y()}],"mask-image-radial-to-pos":[{"mask-radial-to":Y()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[G]}],"mask-image-conic-from-pos":[{"mask-conic-from":Y()}],"mask-image-conic-to-pos":[{"mask-conic-to":Y()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:y()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",O,k]}],filter:[{filter:["","none",O,k]}],blur:[{blur:ee()}],brightness:[{brightness:[G,O,k]}],contrast:[{contrast:[G,O,k]}],"drop-shadow":[{"drop-shadow":["","none",h,Ht,Vt]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",G,O,k]}],"hue-rotate":[{"hue-rotate":[G,O,k]}],invert:[{invert:["",G,O,k]}],saturate:[{saturate:[G,O,k]}],sepia:[{sepia:["",G,O,k]}],"backdrop-filter":[{"backdrop-filter":["","none",O,k]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[G,O,k]}],"backdrop-contrast":[{"backdrop-contrast":[G,O,k]}],"backdrop-grayscale":[{"backdrop-grayscale":["",G,O,k]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[G,O,k]}],"backdrop-invert":[{"backdrop-invert":["",G,O,k]}],"backdrop-opacity":[{"backdrop-opacity":[G,O,k]}],"backdrop-saturate":[{"backdrop-saturate":[G,O,k]}],"backdrop-sepia":[{"backdrop-sepia":["",G,O,k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",O,k]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[G,"initial",O,k]}],ease:[{ease:["linear","initial",v,O,k]}],delay:[{delay:[G,O,k]}],animate:[{animate:["none",x,O,k]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,O,k]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:te()}],"rotate-x":[{"rotate-x":te()}],"rotate-y":[{"rotate-y":te()}],"rotate-z":[{"rotate-z":te()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":["scale-3d"],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[O,k,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ke()}],"translate-x":[{"translate-x":Ke()}],"translate-y":[{"translate-y":Ke()}],"translate-z":[{"translate-z":Ke()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",O,k]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",O,k]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[G,bt,qe,Wn]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function D(...e){return Wl(Mo(e))}const Go=Ln("inline-flex items-center justify-center 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",{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"}}),zt=l.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const a=r?tt:"button";return u.jsx(a,{className:D(Go({variant:t,size:n,className:e})),ref:s,...o})});zt.displayName="Button";function Gl({className:e,...t}){return u.jsx("div",{"data-slot":"card",className:D("bg-card text-card-foreground flex flex-col gap-4 rounded-xl py-6 shadow-sm",e),...t})}function Bl({className:e,...t}){return u.jsx("div",{"data-slot":"card-header",className:D("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Ul({className:e,...t}){return u.jsx("div",{"data-slot":"card-title",className:D("leading-none font-semibold",e),...t})}function Kl({className:e,...t}){return u.jsx("div",{"data-slot":"card-description",className:D("text-muted-foreground text-sm",e),...t})}function Yl({className:e,...t}){return u.jsx("div",{"data-slot":"card-action",className:D("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function ql({className:e,...t}){return u.jsx("div",{"data-slot":"card-content",className:D("px-6",e),...t})}function Xl({className:e,...t}){return u.jsx("div",{"data-slot":"card-footer",className:D("flex items-center px-6 [.border-t]:pt-6",e),...t})}function Zl(){const[e,t]=I.useState(!1);return I.useEffect(()=>{const n=()=>{t(window.innerWidth<768)};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}const Gn=l.forwardRef(({className:e,type:t,...n},r)=>u.jsx("input",{type:t,className:D("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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:r,...n}));Gn.displayName="Input";var Jl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],re=Jl.reduce((e,t)=>{const n=et(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(c,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Bo(e,t){e&&Kr.flushSync(()=>e.dispatchEvent(t))}var Ql="Separator",Uo="horizontal",eu=["horizontal","vertical"],Ko=l.forwardRef((e,t)=>{const{decorative:n,orientation:r=Uo,...o}=e,s=tu(r)?r:Uo,i=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return u.jsx(re.div,{"data-orientation":s,...i,...o,ref:t})});Ko.displayName=Ql;function tu(e){return eu.includes(e)}var Yo=Ko;const Wt=l.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>u.jsx(Yo,{ref:o,decorative:n,orientation:t,className:D("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Wt.displayName=Yo.displayName;function $(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function nu(e,t){const n=l.createContext(t),r=s=>{const{children:a,...i}=s,c=l.useMemo(()=>i,Object.values(i));return u.jsx(n.Provider,{value:c,children:a})};r.displayName=e+"Provider";function o(s){const a=l.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Xe(e,t=[]){let n=[];function r(s,a){const i=l.createContext(a),c=n.length;n=[...n,a];const p=f=>{var v;const{scope:m,children:h,...b}=f,g=((v=m==null?void 0:m[e])==null?void 0:v[c])||i,w=l.useMemo(()=>b,Object.values(b));return u.jsx(g.Provider,{value:w,children:h})};p.displayName=s+"Provider";function d(f,m){var g;const h=((g=m==null?void 0:m[e])==null?void 0:g[c])||i,b=l.useContext(h);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[p,d]}const o=()=>{const s=n.map(a=>l.createContext(a));return function(i){const c=(i==null?void 0:i[e])||s;return l.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,ru(o,...t)]}function ru(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((i,{useScope:c,scopeName:p})=>{const f=c(s)[`__scope${p}`];return{...i,...f}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var ze=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},ou=l[" useId ".trim().toString()]||(()=>{}),su=0;function De(e){const[t,n]=l.useState(ou());return ze(()=>{n(r=>r??String(su++))},[e]),e||(t?`radix-${t}`:"")}var au=l[" useInsertionEffect ".trim().toString()]||ze;function wt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,a]=iu({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:o;{const d=l.useRef(e!==void 0);l.useEffect(()=>{const f=d.current;f!==i&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${i?"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.`),d.current=i},[i,r])}const p=l.useCallback(d=>{var f;if(i){const m=cu(d)?d(e):d;m!==e&&((f=a.current)==null||f.call(a,m))}else s(d)},[i,e,s,a]);return[c,p]}function iu({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),s=l.useRef(t);return au(()=>{s.current=t},[t]),l.useEffect(()=>{var a;o.current!==n&&((a=s.current)==null||a.call(s,n),o.current=n)},[n,o]),[n,r,s]}function cu(e){return typeof e=="function"}function _e(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function lu(e,t=globalThis==null?void 0:globalThis.document){const n=_e(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var uu="DismissableLayer",Bn="dismissableLayer.update",du="dismissableLayer.pointerDownOutside",fu="dismissableLayer.focusOutside",qo,Xo=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gt=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=e,p=l.useContext(Xo),[d,f]=l.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=l.useState({}),b=ie(t,M=>f(M)),g=Array.from(p.layers),[w]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(w),x=d?g.indexOf(d):-1,E=p.layersWithOutsidePointerEventsDisabled.size>0,S=x>=v,_=hu(M=>{const C=M.target,j=[...p.branches].some(L=>L.contains(C));!S||j||(o==null||o(M),a==null||a(M),M.defaultPrevented||i==null||i())},m),T=gu(M=>{const C=M.target;[...p.branches].some(L=>L.contains(C))||(s==null||s(M),a==null||a(M),M.defaultPrevented||i==null||i())},m);return lu(M=>{x===p.layers.size-1&&(r==null||r(M),!M.defaultPrevented&&i&&(M.preventDefault(),i()))},m),l.useEffect(()=>{if(d)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(qo=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(d)),p.layers.add(d),Zo(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=qo)}},[d,m,n,p]),l.useEffect(()=>()=>{d&&(p.layers.delete(d),p.layersWithOutsidePointerEventsDisabled.delete(d),Zo())},[d,p]),l.useEffect(()=>{const M=()=>h({});return document.addEventListener(Bn,M),()=>document.removeEventListener(Bn,M)},[]),u.jsx(re.div,{...c,ref:b,style:{pointerEvents:E?S?"auto":"none":void 0,...e.style},onFocusCapture:$(e.onFocusCapture,T.onFocusCapture),onBlurCapture:$(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:$(e.onPointerDownCapture,_.onPointerDownCapture)})});Gt.displayName=uu;var pu="DismissableLayerBranch",mu=l.forwardRef((e,t)=>{const n=l.useContext(Xo),r=l.useRef(null),o=ie(t,r);return l.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),u.jsx(re.div,{...e,ref:o})});mu.displayName=pu;function hu(e,t=globalThis==null?void 0:globalThis.document){const n=_e(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let c=function(){Jo(du,n,p,{discrete:!0})};const p={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function gu(e,t=globalThis==null?void 0:globalThis.document){const n=_e(e),r=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!r.current&&Jo(fu,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Zo(){const e=new CustomEvent(Bn);document.dispatchEvent(e)}function Jo(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Bo(o,s):o.dispatchEvent(s)}var Un="focusScope.autoFocusOnMount",Kn="focusScope.autoFocusOnUnmount",Qo={bubbles:!1,cancelable:!0},vu="FocusScope",Yn=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,c]=l.useState(null),p=_e(o),d=_e(s),f=l.useRef(null),m=ie(t,g=>c(g)),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let g=function(E){if(h.paused||!i)return;const S=E.target;i.contains(S)?f.current=S:We(f.current,{select:!0})},w=function(E){if(h.paused||!i)return;const S=E.relatedTarget;S!==null&&(i.contains(S)||We(f.current,{select:!0}))},v=function(E){if(document.activeElement===document.body)for(const _ of E)_.removedNodes.length>0&&We(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",w);const x=new MutationObserver(v);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",w),x.disconnect()}}},[r,i,h.paused]),l.useEffect(()=>{if(i){ns.add(h);const g=document.activeElement;if(!i.contains(g)){const v=new CustomEvent(Un,Qo);i.addEventListener(Un,p),i.dispatchEvent(v),v.defaultPrevented||(bu(Eu(es(i)),{select:!0}),document.activeElement===g&&We(i))}return()=>{i.removeEventListener(Un,p),setTimeout(()=>{const v=new CustomEvent(Kn,Qo);i.addEventListener(Kn,d),i.dispatchEvent(v),v.defaultPrevented||We(g??document.body,{select:!0}),i.removeEventListener(Kn,d),ns.remove(h)},0)}}},[i,p,d,h]);const b=l.useCallback(g=>{if(!n&&!r||h.paused)return;const w=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(w&&v){const x=g.currentTarget,[E,S]=wu(x);E&&S?!g.shiftKey&&v===S?(g.preventDefault(),n&&We(E,{select:!0})):g.shiftKey&&v===E&&(g.preventDefault(),n&&We(S,{select:!0})):v===x&&g.preventDefault()}},[n,r,h.paused]);return u.jsx(re.div,{tabIndex:-1,...a,ref:m,onKeyDown:b})});Yn.displayName=vu;function bu(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(We(r,{select:t}),document.activeElement!==n)return}function wu(e){const t=es(e),n=ts(t,e),r=ts(t.reverse(),e);return[n,r]}function es(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ts(e,t){for(const n of e)if(!xu(n,{upTo:t}))return n}function xu(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 yu(e){return e instanceof HTMLInputElement&&"select"in e}function We(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&yu(e)&&t&&e.select()}}var ns=Cu();function Cu(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=rs(e,t),e.unshift(t)},remove(t){var n;e=rs(e,t),(n=e[0])==null||n.resume()}}}function rs(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Eu(e){return e.filter(t=>t.tagName!=="A")}var Su="Portal",qn=l.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=l.useState(!1);ze(()=>s(!0),[]);const a=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?Br.createPortal(u.jsx(re.div,{...r,ref:t}),a):null});qn.displayName=Su;function _u(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Ie=e=>{const{present:t,children:n}=e,r=Ru(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=ie(r.ref,Mu(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null};Ie.displayName="Presence";function Ru(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),s=l.useRef("none"),a=e?"mounted":"unmounted",[i,c]=_u(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const p=Bt(r.current);s.current=i==="mounted"?p:"none"},[i]),ze(()=>{const p=r.current,d=o.current;if(d!==e){const m=s.current,h=Bt(p);e?c("MOUNT"):h==="none"||(p==null?void 0:p.display)==="none"?c("UNMOUNT"):c(d&&m!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ze(()=>{if(t){let p;const d=t.ownerDocument.defaultView??window,f=h=>{const g=Bt(r.current).includes(h.animationName);if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",p=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=h=>{h.target===t&&(s.current=Bt(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(p),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:l.useCallback(p=>{r.current=p?getComputedStyle(p):null,n(p)},[])}}function Bt(e){return(e==null?void 0:e.animationName)||"none"}function Mu(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xn=0;function os(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ss()),document.body.insertAdjacentElement("beforeend",e[1]??ss()),Xn++,()=>{Xn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xn--}},[])}function ss(){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 Re=function(){return Re=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Re.apply(this,arguments)};function as(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Au(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ut="right-scroll-bar-position",Kt="width-before-scroll-bar",Tu="with-scroll-bars-hidden",Nu="--removed-body-scroll-bar-size";function Zn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ku(e,t){var n=I.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Ou=typeof window<"u"?l.useLayoutEffect:l.useEffect,is=new WeakMap;function Pu(e,t){var n=ku(null,function(r){return e.forEach(function(o){return Zn(o,r)})});return Ou(function(){var r=is.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(i){s.has(i)||Zn(i,null)}),s.forEach(function(i){o.has(i)||Zn(i,a)})}is.set(n,e)},[e]),n}function Du(e){return e}function Iu(e,t){t===void 0&&(t=Du);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var c=function(){var d=a;a=[],d.forEach(s)},p=function(){return Promise.resolve().then(c)};p(),n={push:function(d){a.push(d),p()},filter:function(d){return a=a.filter(d),n}}}};return o}function ju(e){e===void 0&&(e={});var t=Iu(null);return t.options=Re({async:!0,ssr:!1},e),t}var cs=function(e){var t=e.sideCar,n=as(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 l.createElement(r,Re({},n))};cs.isSideCarExport=!0;function Lu(e,t){return e.useMedium(t),cs}var ls=ju(),Jn=function(){},Yt=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:Jn,onWheelCapture:Jn,onTouchMoveCapture:Jn}),o=r[0],s=r[1],a=e.forwardProps,i=e.children,c=e.className,p=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,h=e.noRelative,b=e.noIsolation,g=e.inert,w=e.allowPinchZoom,v=e.as,x=v===void 0?"div":v,E=e.gapMode,S=as(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=m,T=Pu([n,t]),M=Re(Re({},S),o);return l.createElement(l.Fragment,null,d&&l.createElement(_,{sideCar:ls,removeScrollBar:p,shards:f,noRelative:h,noIsolation:b,inert:g,setCallbacks:s,allowPinchZoom:!!w,lockRef:n,gapMode:E}),a?l.cloneElement(l.Children.only(i),Re(Re({},M),{ref:T})):l.createElement(x,Re({},M,{className:c,ref:T}),i))});Yt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Yt.classNames={fullWidth:Kt,zeroRight:Ut};var Fu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $u(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Fu();return t&&e.setAttribute("nonce",t),e}function Vu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Hu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var zu=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$u())&&(Vu(t,n),Hu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Wu=function(){var e=zu();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},us=function(){var e=Wu(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Gu={left:0,top:0,right:0,gap:0},Qn=function(e){return parseInt(e||"",10)||0},Bu=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Qn(n),Qn(r),Qn(o)]},Uu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Gu;var t=Bu(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])}},Ku=us(),st="data-scroll-locked",Yu=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
139
- .`.concat(Tu,` {
138
+ */const rm=He("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function uc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lr(...e){return t=>{let n=!1;const r=e.map(o=>{const s=uc(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():uc(e[o],null)}}}}function Te(...e){return _.useCallback(lr(...e),e)}function en(e){const t=om(e),n=_.forwardRef((r,o)=>{const{children:s,...a}=r,i=_.Children.toArray(s),c=i.find(am);if(c){const u=c.props.children,l=i.map(d=>d===c?_.Children.count(u)>1?_.Children.only(null):_.isValidElement(u)?u.props.children:null:d);return S.jsx(t,{...a,ref:o,children:_.isValidElement(u)?_.cloneElement(u,void 0,l):null})}return S.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var tn=en("Slot");function om(e){const t=_.forwardRef((n,r)=>{const{children:o,...s}=n;if(_.isValidElement(o)){const a=cm(o),i=im(s,o.props);return o.type!==_.Fragment&&(i.ref=r?lr(r,a):a),_.cloneElement(o,i)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lc=Symbol("radix.slottable");function sm(e){const t=({children:n})=>S.jsx(S.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=lc,t}function am(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lc}function im(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function cm(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function dc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=dc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fc(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=dc(e))&&(r&&(r+=" "),r+=t);return r}const hc=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,pc=fc,Do=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return pc(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(u=>{const l=n==null?void 0:n[u],d=s==null?void 0:s[u];if(l===null)return null;const h=hc(l)||hc(d);return o[u][h]}),i=n&&Object.entries(n).reduce((u,l)=>{let[d,h]=l;return h===void 0||(u[d]=h),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,l)=>{let{class:d,className:h,...m}=l;return Object.entries(m).every(E=>{let[y,g]=E;return Array.isArray(g)?g.includes({...s,...i}[y]):{...s,...i}[y]===g})?[...u,d,h]:u},[]);return pc(e,a,c,n==null?void 0:n.class,n==null?void 0:n.className)},Mo="-",um=e=>{const t=dm(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const i=a.split(Mo);return i[0]===""&&i.length!==1&&i.shift(),mc(i,t)||lm(a)},getConflictingClassGroupIds:(a,i)=>{const c=n[a]||[];return i&&r[a]?[...c,...r[a]]:c}}},mc=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?mc(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Mo);return(a=t.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},gc=/^\[(.+)\]$/,lm=e=>{if(gc.test(e)){const t=gc.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},dm=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Lo(n[o],r,o,t);return r},Lo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:bc(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(fm(o)){Lo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,a])=>{Lo(a,bc(t,s),n,r)})})},bc=(e,t)=>{let n=e;return t.split(Mo).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},fm=e=>e.isThemeGetter,hm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return o(s,a),a},set(s,a){n.has(s)?n.set(s,a):o(s,a)}}},jo="!",Ho=":",pm=Ho.length,mm=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let a=0,i=0,c=0,u;for(let E=0;E<o.length;E++){let y=o[E];if(a===0&&i===0){if(y===Ho){s.push(o.slice(c,E)),c=E+pm;continue}if(y==="/"){u=E;continue}}y==="["?a++:y==="]"?a--:y==="("?i++:y===")"&&i--}const l=s.length===0?o:o.substring(c),d=gm(l),h=d!==l,m=u&&u>c?u-c:void 0;return{modifiers:s,hasImportantModifier:h,baseClassName:d,maybePostfixModifierPosition:m}};if(t){const o=t+Ho,s=r;r=a=>a.startsWith(o)?s(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},gm=e=>e.endsWith(jo)?e.substring(0,e.length-1):e.startsWith(jo)?e.substring(1):e,bm=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...s.sort(),a),s=[]):s.push(a)}),o.push(...s.sort()),o}},ym=e=>({cache:hm(e.cacheSize),parseClassName:mm(e),sortModifiers:bm(e),...um(e)}),wm=/\s+/,vm=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(wm);let c="";for(let u=i.length-1;u>=0;u-=1){const l=i[u],{isExternal:d,modifiers:h,hasImportantModifier:m,baseClassName:E,maybePostfixModifierPosition:y}=n(l);if(d){c=l+(c.length>0?" "+c:c);continue}let g=!!y,p=r(g?E.substring(0,y):E);if(!p){if(!g){c=l+(c.length>0?" "+c:c);continue}if(p=r(E),!p){c=l+(c.length>0?" "+c:c);continue}g=!1}const b=s(h).join(":"),f=m?b+jo:b,A=f+p;if(a.includes(A))continue;a.push(A);const v=o(p,g);for(let R=0;R<v.length;++R){const w=v[R];a.push(f+w)}c=l+(c.length>0?" "+c:c)}return c};function Em(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=yc(t))&&(r&&(r+=" "),r+=n);return r}const yc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=yc(e[r]))&&(n&&(n+=" "),n+=t);return n};function _m(e,...t){let n,r,o,s=a;function a(c){const u=t.reduce((l,d)=>d(l),e());return n=ym(u),r=n.cache.get,o=n.cache.set,s=i,i(c)}function i(c){const u=r(c);if(u)return u;const l=vm(c,n);return o(c,l),l}return function(){return s(Em.apply(null,arguments))}}const Pe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},wc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,vc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Sm=/^\d+\/\d+$/,xm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Am=/\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$/,Rm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Cm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Tm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nn=e=>Sm.test(e),ae=e=>!!e&&!Number.isNaN(Number(e)),At=e=>!!e&&Number.isInteger(Number(e)),Uo=e=>e.endsWith("%")&&ae(e.slice(0,-1)),gt=e=>xm.test(e),Pm=()=>!0,Om=e=>Am.test(e)&&!Rm.test(e),Ec=()=>!1,km=e=>Cm.test(e),Nm=e=>Tm.test(e),Im=e=>!F(e)&&!K(e),Dm=e=>rn(e,Rc,Ec),F=e=>wc.test(e),Ht=e=>rn(e,Cc,Om),$o=e=>rn(e,Um,ae),_c=e=>rn(e,xc,Ec),Mm=e=>rn(e,Ac,Nm),dr=e=>rn(e,Tc,km),K=e=>vc.test(e),Nn=e=>on(e,Cc),Lm=e=>on(e,$m),Sc=e=>on(e,xc),jm=e=>on(e,Rc),Hm=e=>on(e,Ac),fr=e=>on(e,Tc,!0),rn=(e,t,n)=>{const r=wc.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},on=(e,t,n=!1)=>{const r=vc.exec(e);return r?r[1]?t(r[1]):n:!1},xc=e=>e==="position"||e==="percentage",Ac=e=>e==="image"||e==="url",Rc=e=>e==="length"||e==="size"||e==="bg-size",Cc=e=>e==="length",Um=e=>e==="number",$m=e=>e==="family-name",Tc=e=>e==="shadow",Wm=_m(()=>{const e=Pe("color"),t=Pe("font"),n=Pe("text"),r=Pe("font-weight"),o=Pe("tracking"),s=Pe("leading"),a=Pe("breakpoint"),i=Pe("container"),c=Pe("spacing"),u=Pe("radius"),l=Pe("shadow"),d=Pe("inset-shadow"),h=Pe("text-shadow"),m=Pe("drop-shadow"),E=Pe("blur"),y=Pe("perspective"),g=Pe("aspect"),p=Pe("ease"),b=Pe("animate"),f=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...A(),K,F],R=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],x=()=>[K,F,c],C=()=>[nn,"full","auto",...x()],D=()=>[At,"none","subgrid",K,F],I=()=>["auto",{span:["full",At,K,F]},At,K,F],P=()=>[At,"auto",K,F],U=()=>["auto","min","max","fr",K,F],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...x()],Y=()=>[nn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],O=()=>[e,K,F],j=()=>[...A(),Sc,_c,{position:[K,F]}],T=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",jm,Dm,{size:[K,F]}],J=()=>[Uo,Nn,Ht],X=()=>["","none","full",u,K,F],se=()=>["",ae,Nn,Ht],fe=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[ae,Uo,Sc,_c],le=()=>["","none",E,K,F],ue=()=>["none",ae,K,F],be=()=>["none",ae,K,F],k=()=>[ae,K,F],N=()=>[nn,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[gt],breakpoint:[gt],color:[Pm],container:[gt],"drop-shadow":[gt],ease:["in","out","in-out"],font:[Im],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[gt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[gt],shadow:[gt],spacing:["px",ae],text:[gt],"text-shadow":[gt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nn,F,K,g]}],container:["container"],columns:[{columns:[ae,F,K,i]}],"break-after":[{"break-after":f()}],"break-before":[{"break-before":f()}],"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"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[At,"auto",K,F]}],basis:[{basis:[nn,"full","auto",i,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ae,nn,"auto","initial","none",F]}],grow:[{grow:["",ae,K,F]}],shrink:[{shrink:["",ae,K,F]}],order:[{order:[At,"first","last","none",K,F]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],w:[{w:[i,"screen",...Y()]}],"min-w":[{"min-w":[i,"screen","none",...Y()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",n,Nn,Ht]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,K,$o]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Uo,F]}],"font-family":[{font:[Lm,F,t]}],"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:[o,K,F]}],"line-clamp":[{"line-clamp":[ae,"none",K,$o]}],leading:[{leading:[s,...x()]}],"list-image":[{"list-image":["none",K,F]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,F]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[ae,"from-font","auto",K,Ht]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[ae,"auto",K,F]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,F]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",K,F]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:j()}],"bg-repeat":[{bg:T()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},At,K,F],radial:["",K,F],conic:[At,K,F]},Hm,Mm]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ae,K,F]}],"outline-w":[{outline:["",ae,Nn,Ht]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",l,fr,dr]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",d,fr,dr]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[ae,Ht]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",h,fr,dr]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[ae,K,F]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[K,F]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:j()}],"mask-repeat":[{mask:T()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,F]}],filter:[{filter:["","none",K,F]}],blur:[{blur:le()}],brightness:[{brightness:[ae,K,F]}],contrast:[{contrast:[ae,K,F]}],"drop-shadow":[{"drop-shadow":["","none",m,fr,dr]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",ae,K,F]}],"hue-rotate":[{"hue-rotate":[ae,K,F]}],invert:[{invert:["",ae,K,F]}],saturate:[{saturate:[ae,K,F]}],sepia:[{sepia:["",ae,K,F]}],"backdrop-filter":[{"backdrop-filter":["","none",K,F]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[ae,K,F]}],"backdrop-contrast":[{"backdrop-contrast":[ae,K,F]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ae,K,F]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ae,K,F]}],"backdrop-invert":[{"backdrop-invert":["",ae,K,F]}],"backdrop-opacity":[{"backdrop-opacity":[ae,K,F]}],"backdrop-saturate":[{"backdrop-saturate":[ae,K,F]}],"backdrop-sepia":[{"backdrop-sepia":["",ae,K,F]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,F]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ae,"initial",K,F]}],ease:[{ease:["linear","initial",p,K,F]}],delay:[{delay:[ae,K,F]}],animate:[{animate:["none",b,K,F]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,K,F]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:k()}],"skew-x":[{"skew-x":k()}],"skew-y":[{"skew-y":k()}],transform:[{transform:[K,F,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:N()}],"translate-x":[{"translate-x":N()}],"translate-y":[{"translate-y":N()}],"translate-z":[{"translate-z":N()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",K,F]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"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",K,F]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[ae,Nn,Ht,$o]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function z(...e){return Wm(fc(e))}const Pc=Do("inline-flex items-center justify-center 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",{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"}}),hr=_.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const a=r?tn:"button";return S.jsx(a,{className:z(Pc({variant:t,size:n,className:e})),ref:s,...o})});hr.displayName="Button";function Fm({className:e,...t}){return S.jsx("div",{"data-slot":"card",className:z("bg-card text-card-foreground flex flex-col gap-4 rounded-xl py-6 shadow-sm",e),...t})}function Km({className:e,...t}){return S.jsx("div",{"data-slot":"card-header",className:z("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function qm({className:e,...t}){return S.jsx("div",{"data-slot":"card-title",className:z("leading-none font-semibold",e),...t})}function zm({className:e,...t}){return S.jsx("div",{"data-slot":"card-description",className:z("text-muted-foreground text-sm",e),...t})}function Gm({className:e,...t}){return S.jsx("div",{"data-slot":"card-action",className:z("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function Bm({className:e,...t}){return S.jsx("div",{"data-slot":"card-content",className:z("px-6",e),...t})}function Vm({className:e,...t}){return S.jsx("div",{"data-slot":"card-footer",className:z("flex items-center px-6 [.border-t]:pt-6",e),...t})}function Jm(){const[e,t]=W.useState(!1);return W.useEffect(()=>{const n=()=>{t(window.innerWidth<768)};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}const Wo=_.forwardRef(({className:e,type:t,...n},r)=>S.jsx("input",{type:t,className:z("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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:r,...n}));Wo.displayName="Input";var Xm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xe=Xm.reduce((e,t)=>{const n=en(`Primitive.${t}`),r=_.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(c,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Oc(e,t){e&&ki.flushSync(()=>e.dispatchEvent(t))}var Ym="Separator",kc="horizontal",Zm=["horizontal","vertical"],Nc=_.forwardRef((e,t)=>{const{decorative:n,orientation:r=kc,...o}=e,s=Qm(r)?r:kc,i=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return S.jsx(xe.div,{"data-orientation":s,...i,...o,ref:t})});Nc.displayName=Ym;function Qm(e){return Zm.includes(e)}var Ic=Nc;const pr=_.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>S.jsx(Ic,{ref:o,decorative:n,orientation:t,className:z("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));pr.displayName=Ic.displayName;function Z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function eg(e,t){const n=_.createContext(t),r=s=>{const{children:a,...i}=s,c=_.useMemo(()=>i,Object.values(i));return S.jsx(n.Provider,{value:c,children:a})};r.displayName=e+"Provider";function o(s){const a=_.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Ut(e,t=[]){let n=[];function r(s,a){const i=_.createContext(a),c=n.length;n=[...n,a];const u=d=>{var p;const{scope:h,children:m,...E}=d,y=((p=h==null?void 0:h[e])==null?void 0:p[c])||i,g=_.useMemo(()=>E,Object.values(E));return S.jsx(y.Provider,{value:g,children:m})};u.displayName=s+"Provider";function l(d,h){var y;const m=((y=h==null?void 0:h[e])==null?void 0:y[c])||i,E=_.useContext(m);if(E)return E;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,l]}const o=()=>{const s=n.map(a=>_.createContext(a));return function(i){const c=(i==null?void 0:i[e])||s;return _.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,tg(o,...t)]}function tg(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((i,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...i,...d}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Rt=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},ng=_[" useId ".trim().toString()]||(()=>{}),rg=0;function bt(e){const[t,n]=_.useState(ng());return Rt(()=>{n(r=>r??String(rg++))},[e]),e||(t?`radix-${t}`:"")}var og=_[" useInsertionEffect ".trim().toString()]||Rt;function In({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,a]=sg({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:o;{const l=_.useRef(e!==void 0);_.useEffect(()=>{const d=l.current;d!==i&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${i?"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.`),l.current=i},[i,r])}const u=_.useCallback(l=>{var d;if(i){const h=ag(l)?l(e):l;h!==e&&((d=a.current)==null||d.call(a,h))}else s(l)},[i,e,s,a]);return[c,u]}function sg({defaultProp:e,onChange:t}){const[n,r]=_.useState(e),o=_.useRef(n),s=_.useRef(t);return og(()=>{s.current=t},[t]),_.useEffect(()=>{var a;o.current!==n&&((a=s.current)==null||a.call(s,n),o.current=n)},[n,o]),[n,r,s]}function ag(e){return typeof e=="function"}function st(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function ig(e,t=globalThis==null?void 0:globalThis.document){const n=st(e);_.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var cg="DismissableLayer",Fo="dismissableLayer.update",ug="dismissableLayer.pointerDownOutside",lg="dismissableLayer.focusOutside",Dc,Mc=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mr=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=e,u=_.useContext(Mc),[l,d]=_.useState(null),h=(l==null?void 0:l.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=_.useState({}),E=Te(t,w=>d(w)),y=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=y.indexOf(g),b=l?y.indexOf(l):-1,f=u.layersWithOutsidePointerEventsDisabled.size>0,A=b>=p,v=hg(w=>{const x=w.target,C=[...u.branches].some(D=>D.contains(x));!A||C||(o==null||o(w),a==null||a(w),w.defaultPrevented||i==null||i())},h),R=pg(w=>{const x=w.target;[...u.branches].some(D=>D.contains(x))||(s==null||s(w),a==null||a(w),w.defaultPrevented||i==null||i())},h);return ig(w=>{b===u.layers.size-1&&(r==null||r(w),!w.defaultPrevented&&i&&(w.preventDefault(),i()))},h),_.useEffect(()=>{if(l)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Dc=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(l)),u.layers.add(l),Lc(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Dc)}},[l,h,n,u]),_.useEffect(()=>()=>{l&&(u.layers.delete(l),u.layersWithOutsidePointerEventsDisabled.delete(l),Lc())},[l,u]),_.useEffect(()=>{const w=()=>m({});return document.addEventListener(Fo,w),()=>document.removeEventListener(Fo,w)},[]),S.jsx(xe.div,{...c,ref:E,style:{pointerEvents:f?A?"auto":"none":void 0,...e.style},onFocusCapture:Z(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Z(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Z(e.onPointerDownCapture,v.onPointerDownCapture)})});mr.displayName=cg;var dg="DismissableLayerBranch",fg=_.forwardRef((e,t)=>{const n=_.useContext(Mc),r=_.useRef(null),o=Te(t,r);return _.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),S.jsx(xe.div,{...e,ref:o})});fg.displayName=dg;function hg(e,t=globalThis==null?void 0:globalThis.document){const n=st(e),r=_.useRef(!1),o=_.useRef(()=>{});return _.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let c=function(){jc(ug,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function pg(e,t=globalThis==null?void 0:globalThis.document){const n=st(e),r=_.useRef(!1);return _.useEffect(()=>{const o=s=>{s.target&&!r.current&&jc(lg,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Lc(){const e=new CustomEvent(Fo);document.dispatchEvent(e)}function jc(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Oc(o,s):o.dispatchEvent(s)}var Ko="focusScope.autoFocusOnMount",qo="focusScope.autoFocusOnUnmount",Hc={bubbles:!1,cancelable:!0},mg="FocusScope",zo=_.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,c]=_.useState(null),u=st(o),l=st(s),d=_.useRef(null),h=Te(t,y=>c(y)),m=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(r){let y=function(f){if(m.paused||!i)return;const A=f.target;i.contains(A)?d.current=A:Ct(d.current,{select:!0})},g=function(f){if(m.paused||!i)return;const A=f.relatedTarget;A!==null&&(i.contains(A)||Ct(d.current,{select:!0}))},p=function(f){if(document.activeElement===document.body)for(const v of f)v.removedNodes.length>0&&Ct(i)};document.addEventListener("focusin",y),document.addEventListener("focusout",g);const b=new MutationObserver(p);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",g),b.disconnect()}}},[r,i,m.paused]),_.useEffect(()=>{if(i){Wc.add(m);const y=document.activeElement;if(!i.contains(y)){const p=new CustomEvent(Ko,Hc);i.addEventListener(Ko,u),i.dispatchEvent(p),p.defaultPrevented||(gg(Eg(Uc(i)),{select:!0}),document.activeElement===y&&Ct(i))}return()=>{i.removeEventListener(Ko,u),setTimeout(()=>{const p=new CustomEvent(qo,Hc);i.addEventListener(qo,l),i.dispatchEvent(p),p.defaultPrevented||Ct(y??document.body,{select:!0}),i.removeEventListener(qo,l),Wc.remove(m)},0)}}},[i,u,l,m]);const E=_.useCallback(y=>{if(!n&&!r||m.paused)return;const g=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,p=document.activeElement;if(g&&p){const b=y.currentTarget,[f,A]=bg(b);f&&A?!y.shiftKey&&p===A?(y.preventDefault(),n&&Ct(f,{select:!0})):y.shiftKey&&p===f&&(y.preventDefault(),n&&Ct(A,{select:!0})):p===b&&y.preventDefault()}},[n,r,m.paused]);return S.jsx(xe.div,{tabIndex:-1,...a,ref:h,onKeyDown:E})});zo.displayName=mg;function gg(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ct(r,{select:t}),document.activeElement!==n)return}function bg(e){const t=Uc(e),n=$c(t,e),r=$c(t.reverse(),e);return[n,r]}function Uc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function $c(e,t){for(const n of e)if(!yg(n,{upTo:t}))return n}function yg(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 wg(e){return e instanceof HTMLInputElement&&"select"in e}function Ct(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&wg(e)&&t&&e.select()}}var Wc=vg();function vg(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Fc(e,t),e.unshift(t)},remove(t){var n;e=Fc(e,t),(n=e[0])==null||n.resume()}}}function Fc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Eg(e){return e.filter(t=>t.tagName!=="A")}var _g="Portal",Go=_.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=_.useState(!1);Rt(()=>s(!0),[]);const a=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?jt.createPortal(S.jsx(xe.div,{...r,ref:t}),a):null});Go.displayName=_g;function Sg(e,t){return _.useReducer((n,r)=>t[n][r]??n,e)}var yt=e=>{const{present:t,children:n}=e,r=xg(t),o=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),s=Te(r.ref,Ag(o));return typeof n=="function"||r.isPresent?_.cloneElement(o,{ref:s}):null};yt.displayName="Presence";function xg(e){const[t,n]=_.useState(),r=_.useRef(null),o=_.useRef(e),s=_.useRef("none"),a=e?"mounted":"unmounted",[i,c]=Sg(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const u=gr(r.current);s.current=i==="mounted"?u:"none"},[i]),Rt(()=>{const u=r.current,l=o.current;if(l!==e){const h=s.current,m=gr(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(l&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Rt(()=>{if(t){let u;const l=t.ownerDocument.defaultView??window,d=m=>{const y=gr(r.current).includes(m.animationName);if(m.target===t&&y&&(c("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=m=>{m.target===t&&(s.current=gr(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{l.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:_.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function gr(e){return(e==null?void 0:e.animationName)||"none"}function Ag(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Bo=0;function Kc(){_.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??qc()),document.body.insertAdjacentElement("beforeend",e[1]??qc()),Bo++,()=>{Bo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Bo--}},[])}function qc(){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 at=function(){return at=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},at.apply(this,arguments)};function zc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Rg(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var br="right-scroll-bar-position",yr="width-before-scroll-bar",Cg="with-scroll-bars-hidden",Tg="--removed-body-scroll-bar-size";function Vo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Pg(e,t){var n=W.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Og=typeof window<"u"?_.useLayoutEffect:_.useEffect,Gc=new WeakMap;function kg(e,t){var n=Pg(null,function(r){return e.forEach(function(o){return Vo(o,r)})});return Og(function(){var r=Gc.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(i){s.has(i)||Vo(i,null)}),s.forEach(function(i){o.has(i)||Vo(i,a)})}Gc.set(n,e)},[e]),n}function Ng(e){return e}function Ig(e,t){t===void 0&&(t=Ng);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var c=function(){var l=a;a=[],l.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(l){a.push(l),u()},filter:function(l){return a=a.filter(l),n}}}};return o}function Dg(e){e===void 0&&(e={});var t=Ig(null);return t.options=at({async:!0,ssr:!1},e),t}var Bc=function(e){var t=e.sideCar,n=zc(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 _.createElement(r,at({},n))};Bc.isSideCarExport=!0;function Mg(e,t){return e.useMedium(t),Bc}var Vc=Dg(),Jo=function(){},wr=_.forwardRef(function(e,t){var n=_.useRef(null),r=_.useState({onScrollCapture:Jo,onWheelCapture:Jo,onTouchMoveCapture:Jo}),o=r[0],s=r[1],a=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,l=e.enabled,d=e.shards,h=e.sideCar,m=e.noRelative,E=e.noIsolation,y=e.inert,g=e.allowPinchZoom,p=e.as,b=p===void 0?"div":p,f=e.gapMode,A=zc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),v=h,R=kg([n,t]),w=at(at({},A),o);return _.createElement(_.Fragment,null,l&&_.createElement(v,{sideCar:Vc,removeScrollBar:u,shards:d,noRelative:m,noIsolation:E,inert:y,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:f}),a?_.cloneElement(_.Children.only(i),at(at({},w),{ref:R})):_.createElement(b,at({},w,{className:c,ref:R}),i))});wr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},wr.classNames={fullWidth:yr,zeroRight:br};var Lg=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function jg(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Lg();return t&&e.setAttribute("nonce",t),e}function Hg(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ug(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $g=function(){var e=0,t=null;return{add:function(n){e==0&&(t=jg())&&(Hg(t,n),Ug(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Wg=function(){var e=$g();return function(t,n){_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Jc=function(){var e=Wg(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Fg={left:0,top:0,right:0,gap:0},Xo=function(e){return parseInt(e||"",10)||0},Kg=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Xo(n),Xo(r),Xo(o)]},qg=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Fg;var t=Kg(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])}},zg=Jc(),sn="data-scroll-locked",Gg=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
139
+ .`.concat(Cg,` {
140
140
  overflow: hidden `).concat(r,`;
141
141
  padding-right: `).concat(i,"px ").concat(r,`;
142
142
  }
143
- body[`).concat(st,`] {
143
+ body[`).concat(sn,`] {
144
144
  overflow: hidden `).concat(r,`;
145
145
  overscroll-behavior: contain;
146
146
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -153,30 +153,45 @@ React keys must be passed directly to JSX without using spread:
153
153
  `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
154
154
  }
155
155
 
156
- .`).concat(Ut,` {
156
+ .`).concat(br,` {
157
157
  right: `).concat(i,"px ").concat(r,`;
158
158
  }
159
159
 
160
- .`).concat(Kt,` {
160
+ .`).concat(yr,` {
161
161
  margin-right: `).concat(i,"px ").concat(r,`;
162
162
  }
163
163
 
164
- .`).concat(Ut," .").concat(Ut,` {
164
+ .`).concat(br," .").concat(br,` {
165
165
  right: 0 `).concat(r,`;
166
166
  }
167
167
 
168
- .`).concat(Kt," .").concat(Kt,` {
168
+ .`).concat(yr," .").concat(yr,` {
169
169
  margin-right: 0 `).concat(r,`;
170
170
  }
171
171
 
172
- body[`).concat(st,`] {
173
- `).concat(Nu,": ").concat(i,`px;
172
+ body[`).concat(sn,`] {
173
+ `).concat(Tg,": ").concat(i,`px;
174
174
  }
175
- `)},ds=function(){var e=parseInt(document.body.getAttribute(st)||"0",10);return isFinite(e)?e:0},qu=function(){l.useEffect(function(){return document.body.setAttribute(st,(ds()+1).toString()),function(){var e=ds()-1;e<=0?document.body.removeAttribute(st):document.body.setAttribute(st,e.toString())}},[])},Xu=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;qu();var s=l.useMemo(function(){return Uu(o)},[o]);return l.createElement(Ku,{styles:Yu(s,!t,o,n?"":"!important")})},er=!1;if(typeof window<"u")try{var qt=Object.defineProperty({},"passive",{get:function(){return er=!0,!0}});window.addEventListener("test",qt,qt),window.removeEventListener("test",qt,qt)}catch{er=!1}var at=er?{passive:!1}:!1,Zu=function(e){return e.tagName==="TEXTAREA"},fs=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Zu(e)&&n[t]==="visible")},Ju=function(e){return fs(e,"overflowY")},Qu=function(e){return fs(e,"overflowX")},ps=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ms(e,r);if(o){var s=hs(e,r),a=s[1],i=s[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ed=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},td=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ms=function(e,t){return e==="v"?Ju(t):Qu(t)},hs=function(e,t){return e==="v"?ed(t):td(t)},nd=function(e,t){return e==="h"&&t==="rtl"?-1:1},rd=function(e,t,n,r,o){var s=nd(e,window.getComputedStyle(t).direction),a=s*r,i=n.target,c=t.contains(i),p=!1,d=a>0,f=0,m=0;do{if(!i)break;var h=hs(e,i),b=h[0],g=h[1],w=h[2],v=g-w-s*b;(b||v)&&ms(e,i)&&(f+=v,m+=b);var x=i.parentNode;i=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(p=!0),p},Xt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gs=function(e){return[e.deltaX,e.deltaY]},vs=function(e){return e&&"current"in e?e.current:e},od=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sd=function(e){return`
175
+ `)},Xc=function(){var e=parseInt(document.body.getAttribute(sn)||"0",10);return isFinite(e)?e:0},Bg=function(){_.useEffect(function(){return document.body.setAttribute(sn,(Xc()+1).toString()),function(){var e=Xc()-1;e<=0?document.body.removeAttribute(sn):document.body.setAttribute(sn,e.toString())}},[])},Vg=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Bg();var s=_.useMemo(function(){return qg(o)},[o]);return _.createElement(zg,{styles:Gg(s,!t,o,n?"":"!important")})},Yo=!1;if(typeof window<"u")try{var vr=Object.defineProperty({},"passive",{get:function(){return Yo=!0,!0}});window.addEventListener("test",vr,vr),window.removeEventListener("test",vr,vr)}catch{Yo=!1}var an=Yo?{passive:!1}:!1,Jg=function(e){return e.tagName==="TEXTAREA"},Yc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Jg(e)&&n[t]==="visible")},Xg=function(e){return Yc(e,"overflowY")},Yg=function(e){return Yc(e,"overflowX")},Zc=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Qc(e,r);if(o){var s=eu(e,r),a=s[1],i=s[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Zg=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Qg=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Qc=function(e,t){return e==="v"?Xg(t):Yg(t)},eu=function(e,t){return e==="v"?Zg(t):Qg(t)},eb=function(e,t){return e==="h"&&t==="rtl"?-1:1},tb=function(e,t,n,r,o){var s=eb(e,window.getComputedStyle(t).direction),a=s*r,i=n.target,c=t.contains(i),u=!1,l=a>0,d=0,h=0;do{if(!i)break;var m=eu(e,i),E=m[0],y=m[1],g=m[2],p=y-g-s*E;(E||p)&&Qc(e,i)&&(d+=p,h+=E);var b=i.parentNode;i=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(l&&Math.abs(d)<1||!l&&Math.abs(h)<1)&&(u=!0),u},Er=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},tu=function(e){return[e.deltaX,e.deltaY]},nu=function(e){return e&&"current"in e?e.current:e},nb=function(e,t){return e[0]===t[0]&&e[1]===t[1]},rb=function(e){return`
176
176
  .block-interactivity-`.concat(e,` {pointer-events: none;}
177
177
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
178
- `)},ad=0,it=[];function id(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(ad++)[0],s=l.useState(us)[0],a=l.useRef(e);l.useEffect(function(){a.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=Au([e.lockRef.current],(e.shards||[]).map(vs),!0).filter(Boolean);return g.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=l.useCallback(function(g,w){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!a.current.allowPinchZoom;var v=Xt(g),x=n.current,E="deltaX"in g?g.deltaX:x[0]-v[0],S="deltaY"in g?g.deltaY:x[1]-v[1],_,T=g.target,M=Math.abs(E)>Math.abs(S)?"h":"v";if("touches"in g&&M==="h"&&T.type==="range")return!1;var C=ps(M,T);if(!C)return!0;if(C?_=M:(_=M==="v"?"h":"v",C=ps(M,T)),!C)return!1;if(!r.current&&"changedTouches"in g&&(E||S)&&(r.current=_),!_)return!0;var j=r.current||_;return rd(j,w,g,j==="h"?E:S)},[]),c=l.useCallback(function(g){var w=g;if(!(!it.length||it[it.length-1]!==s)){var v="deltaY"in w?gs(w):Xt(w),x=t.current.filter(function(_){return _.name===w.type&&(_.target===w.target||w.target===_.shadowParent)&&od(_.delta,v)})[0];if(x&&x.should){w.cancelable&&w.preventDefault();return}if(!x){var E=(a.current.shards||[]).map(vs).filter(Boolean).filter(function(_){return _.contains(w.target)}),S=E.length>0?i(w,E[0]):!a.current.noIsolation;S&&w.cancelable&&w.preventDefault()}}},[]),p=l.useCallback(function(g,w,v,x){var E={name:g,delta:w,target:v,should:x,shadowParent:cd(v)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(S){return S!==E})},1)},[]),d=l.useCallback(function(g){n.current=Xt(g),r.current=void 0},[]),f=l.useCallback(function(g){p(g.type,gs(g),g.target,i(g,e.lockRef.current))},[]),m=l.useCallback(function(g){p(g.type,Xt(g),g.target,i(g,e.lockRef.current))},[]);l.useEffect(function(){return it.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,at),document.addEventListener("touchmove",c,at),document.addEventListener("touchstart",d,at),function(){it=it.filter(function(g){return g!==s}),document.removeEventListener("wheel",c,at),document.removeEventListener("touchmove",c,at),document.removeEventListener("touchstart",d,at)}},[]);var h=e.removeScrollBar,b=e.inert;return l.createElement(l.Fragment,null,b?l.createElement(s,{styles:sd(o)}):null,h?l.createElement(Xu,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function cd(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ld=Lu(ls,id);var tr=l.forwardRef(function(e,t){return l.createElement(Yt,Re({},e,{ref:t,sideCar:ld}))});tr.classNames=Yt.classNames;var ud=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ct=new WeakMap,Zt=new WeakMap,Jt={},nr=0,bs=function(e){return e&&(e.host||bs(e.parentNode))},dd=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=bs(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})},fd=function(e,t,n,r){var o=dd(t,Array.isArray(e)?e:[e]);Jt[n]||(Jt[n]=new WeakMap);var s=Jt[n],a=[],i=new Set,c=new Set(o),p=function(f){!f||i.has(f)||(i.add(f),p(f.parentNode))};o.forEach(p);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(m){if(i.has(m))d(m);else try{var h=m.getAttribute(r),b=h!==null&&h!=="false",g=(ct.get(m)||0)+1,w=(s.get(m)||0)+1;ct.set(m,g),s.set(m,w),a.push(m),g===1&&b&&Zt.set(m,!0),w===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return d(t),i.clear(),nr++,function(){a.forEach(function(f){var m=ct.get(f)-1,h=s.get(f)-1;ct.set(f,m),s.set(f,h),m||(Zt.has(f)||f.removeAttribute(r),Zt.delete(f)),h||f.removeAttribute(n)}),nr--,nr||(ct=new WeakMap,ct=new WeakMap,Zt=new WeakMap,Jt={})}},ws=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=ud(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),fd(r,o,n,"aria-hidden")):function(){return null}},Qt="Dialog",[xs,P0]=Xe(Qt),[pd,ye]=xs(Qt),ys=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,i=l.useRef(null),c=l.useRef(null),[p,d]=wt({prop:r,defaultProp:o??!1,onChange:s,caller:Qt});return u.jsx(pd,{scope:t,triggerRef:i,contentRef:c,contentId:De(),titleId:De(),descriptionId:De(),open:p,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(f=>!f),[d]),modal:a,children:n})};ys.displayName=Qt;var Cs="DialogTrigger",Es=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(Cs,n),s=ie(t,o.triggerRef);return u.jsx(re.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":sr(o.open),...r,ref:s,onClick:$(e.onClick,o.onOpenToggle)})});Es.displayName=Cs;var rr="DialogPortal",[md,Ss]=xs(rr,{forceMount:void 0}),_s=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=ye(rr,t);return u.jsx(md,{scope:t,forceMount:n,children:l.Children.map(r,a=>u.jsx(Ie,{present:n||s.open,children:u.jsx(qn,{asChild:!0,container:o,children:a})}))})};_s.displayName=rr;var en="DialogOverlay",Rs=l.forwardRef((e,t)=>{const n=Ss(en,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ye(en,e.__scopeDialog);return s.modal?u.jsx(Ie,{present:r||s.open,children:u.jsx(gd,{...o,ref:t})}):null});Rs.displayName=en;var hd=et("DialogOverlay.RemoveScroll"),gd=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(en,n);return u.jsx(tr,{as:hd,allowPinchZoom:!0,shards:[o.contentRef],children:u.jsx(re.div,{"data-state":sr(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ze="DialogContent",Ms=l.forwardRef((e,t)=>{const n=Ss(Ze,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ye(Ze,e.__scopeDialog);return u.jsx(Ie,{present:r||s.open,children:s.modal?u.jsx(vd,{...o,ref:t}):u.jsx(bd,{...o,ref:t})})});Ms.displayName=Ze;var vd=l.forwardRef((e,t)=>{const n=ye(Ze,e.__scopeDialog),r=l.useRef(null),o=ie(t,n.contentRef,r);return l.useEffect(()=>{const s=r.current;if(s)return ws(s)},[]),u.jsx(As,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:$(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:$(e.onFocusOutside,s=>s.preventDefault())})}),bd=l.forwardRef((e,t)=>{const n=ye(Ze,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return u.jsx(As,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,i;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,p;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;((p=n.triggerRef.current)==null?void 0:p.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),As=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,i=ye(Ze,n),c=l.useRef(null),p=ie(t,c);return os(),u.jsxs(u.Fragment,{children:[u.jsx(Yn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:u.jsx(Gt,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":sr(i.open),...a,ref:p,onDismiss:()=>i.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(wd,{titleId:i.titleId}),u.jsx(yd,{contentRef:c,descriptionId:i.descriptionId})]})]})}),or="DialogTitle",Ts=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(or,n);return u.jsx(re.h2,{id:o.titleId,...r,ref:t})});Ts.displayName=or;var Ns="DialogDescription",ks=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(Ns,n);return u.jsx(re.p,{id:o.descriptionId,...r,ref:t})});ks.displayName=Ns;var Os="DialogClose",Ps=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(Os,n);return u.jsx(re.button,{type:"button",...r,ref:t,onClick:$(e.onClick,()=>o.onOpenChange(!1))})});Ps.displayName=Os;function sr(e){return e?"open":"closed"}var Ds="DialogTitleWarning",[D0,Is]=nu(Ds,{contentName:Ze,titleName:or,docsSlug:"dialog"}),wd=({titleId:e})=>{const t=Is(Ds),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
178
+ `)},ob=0,cn=[];function sb(e){var t=_.useRef([]),n=_.useRef([0,0]),r=_.useRef(),o=_.useState(ob++)[0],s=_.useState(Jc)[0],a=_.useRef(e);_.useEffect(function(){a.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=Rg([e.lockRef.current],(e.shards||[]).map(nu),!0).filter(Boolean);return y.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=_.useCallback(function(y,g){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!a.current.allowPinchZoom;var p=Er(y),b=n.current,f="deltaX"in y?y.deltaX:b[0]-p[0],A="deltaY"in y?y.deltaY:b[1]-p[1],v,R=y.target,w=Math.abs(f)>Math.abs(A)?"h":"v";if("touches"in y&&w==="h"&&R.type==="range")return!1;var x=Zc(w,R);if(!x)return!0;if(x?v=w:(v=w==="v"?"h":"v",x=Zc(w,R)),!x)return!1;if(!r.current&&"changedTouches"in y&&(f||A)&&(r.current=v),!v)return!0;var C=r.current||v;return tb(C,g,y,C==="h"?f:A)},[]),c=_.useCallback(function(y){var g=y;if(!(!cn.length||cn[cn.length-1]!==s)){var p="deltaY"in g?tu(g):Er(g),b=t.current.filter(function(v){return v.name===g.type&&(v.target===g.target||g.target===v.shadowParent)&&nb(v.delta,p)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var f=(a.current.shards||[]).map(nu).filter(Boolean).filter(function(v){return v.contains(g.target)}),A=f.length>0?i(g,f[0]):!a.current.noIsolation;A&&g.cancelable&&g.preventDefault()}}},[]),u=_.useCallback(function(y,g,p,b){var f={name:y,delta:g,target:p,should:b,shadowParent:ab(p)};t.current.push(f),setTimeout(function(){t.current=t.current.filter(function(A){return A!==f})},1)},[]),l=_.useCallback(function(y){n.current=Er(y),r.current=void 0},[]),d=_.useCallback(function(y){u(y.type,tu(y),y.target,i(y,e.lockRef.current))},[]),h=_.useCallback(function(y){u(y.type,Er(y),y.target,i(y,e.lockRef.current))},[]);_.useEffect(function(){return cn.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",c,an),document.addEventListener("touchmove",c,an),document.addEventListener("touchstart",l,an),function(){cn=cn.filter(function(y){return y!==s}),document.removeEventListener("wheel",c,an),document.removeEventListener("touchmove",c,an),document.removeEventListener("touchstart",l,an)}},[]);var m=e.removeScrollBar,E=e.inert;return _.createElement(_.Fragment,null,E?_.createElement(s,{styles:rb(o)}):null,m?_.createElement(Vg,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ab(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ib=Mg(Vc,sb);var Zo=_.forwardRef(function(e,t){return _.createElement(wr,at({},e,{ref:t,sideCar:ib}))});Zo.classNames=wr.classNames;var cb=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},un=new WeakMap,_r=new WeakMap,Sr={},Qo=0,ru=function(e){return e&&(e.host||ru(e.parentNode))},ub=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ru(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})},lb=function(e,t,n,r){var o=ub(t,Array.isArray(e)?e:[e]);Sr[n]||(Sr[n]=new WeakMap);var s=Sr[n],a=[],i=new Set,c=new Set(o),u=function(d){!d||i.has(d)||(i.add(d),u(d.parentNode))};o.forEach(u);var l=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(h){if(i.has(h))l(h);else try{var m=h.getAttribute(r),E=m!==null&&m!=="false",y=(un.get(h)||0)+1,g=(s.get(h)||0)+1;un.set(h,y),s.set(h,g),a.push(h),y===1&&E&&_r.set(h,!0),g===1&&h.setAttribute(n,"true"),E||h.setAttribute(r,"true")}catch(p){console.error("aria-hidden: cannot operate on ",h,p)}})};return l(t),i.clear(),Qo++,function(){a.forEach(function(d){var h=un.get(d)-1,m=s.get(d)-1;un.set(d,h),s.set(d,m),h||(_r.has(d)||d.removeAttribute(r),_r.delete(d)),m||d.removeAttribute(n)}),Qo--,Qo||(un=new WeakMap,un=new WeakMap,_r=new WeakMap,Sr={})}},ou=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=cb(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),lb(r,o,n,"aria-hidden")):function(){return null}},xr="Dialog",[su,L2]=Ut(xr),[db,tt]=su(xr),au=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,i=_.useRef(null),c=_.useRef(null),[u,l]=In({prop:r,defaultProp:o??!1,onChange:s,caller:xr});return S.jsx(db,{scope:t,triggerRef:i,contentRef:c,contentId:bt(),titleId:bt(),descriptionId:bt(),open:u,onOpenChange:l,onOpenToggle:_.useCallback(()=>l(d=>!d),[l]),modal:a,children:n})};au.displayName=xr;var iu="DialogTrigger",cu=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(iu,n),s=Te(t,o.triggerRef);return S.jsx(xe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ns(o.open),...r,ref:s,onClick:Z(e.onClick,o.onOpenToggle)})});cu.displayName=iu;var es="DialogPortal",[fb,uu]=su(es,{forceMount:void 0}),lu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=tt(es,t);return S.jsx(fb,{scope:t,forceMount:n,children:_.Children.map(r,a=>S.jsx(yt,{present:n||s.open,children:S.jsx(Go,{asChild:!0,container:o,children:a})}))})};lu.displayName=es;var Ar="DialogOverlay",du=_.forwardRef((e,t)=>{const n=uu(Ar,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=tt(Ar,e.__scopeDialog);return s.modal?S.jsx(yt,{present:r||s.open,children:S.jsx(pb,{...o,ref:t})}):null});du.displayName=Ar;var hb=en("DialogOverlay.RemoveScroll"),pb=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(Ar,n);return S.jsx(Zo,{as:hb,allowPinchZoom:!0,shards:[o.contentRef],children:S.jsx(xe.div,{"data-state":ns(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),$t="DialogContent",fu=_.forwardRef((e,t)=>{const n=uu($t,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=tt($t,e.__scopeDialog);return S.jsx(yt,{present:r||s.open,children:s.modal?S.jsx(mb,{...o,ref:t}):S.jsx(gb,{...o,ref:t})})});fu.displayName=$t;var mb=_.forwardRef((e,t)=>{const n=tt($t,e.__scopeDialog),r=_.useRef(null),o=Te(t,n.contentRef,r);return _.useEffect(()=>{const s=r.current;if(s)return ou(s)},[]),S.jsx(hu,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Z(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Z(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:Z(e.onFocusOutside,s=>s.preventDefault())})}),gb=_.forwardRef((e,t)=>{const n=tt($t,e.__scopeDialog),r=_.useRef(!1),o=_.useRef(!1);return S.jsx(hu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,i;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),hu=_.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,i=tt($t,n),c=_.useRef(null),u=Te(t,c);return Kc(),S.jsxs(S.Fragment,{children:[S.jsx(zo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:S.jsx(mr,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":ns(i.open),...a,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),S.jsxs(S.Fragment,{children:[S.jsx(bb,{titleId:i.titleId}),S.jsx(wb,{contentRef:c,descriptionId:i.descriptionId})]})]})}),ts="DialogTitle",pu=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(ts,n);return S.jsx(xe.h2,{id:o.titleId,...r,ref:t})});pu.displayName=ts;var mu="DialogDescription",gu=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(mu,n);return S.jsx(xe.p,{id:o.descriptionId,...r,ref:t})});gu.displayName=mu;var bu="DialogClose",yu=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tt(bu,n);return S.jsx(xe.button,{type:"button",...r,ref:t,onClick:Z(e.onClick,()=>o.onOpenChange(!1))})});yu.displayName=bu;function ns(e){return e?"open":"closed"}var wu="DialogTitleWarning",[j2,vu]=eg(wu,{contentName:$t,titleName:ts,docsSlug:"dialog"}),bb=({titleId:e})=>{const t=vu(wu),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
179
179
 
180
180
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
181
181
 
182
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},xd="DialogDescriptionWarning",yd=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Is(xd).contentName}}.`;return l.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Cd=ys,Ed=Es,Sd=_s,js=Rs,Ls=Ms,Fs=Ts,$s=ks,Vs=Ps;const Hs=Cd,_d=Ed,Rd=Vs,zs=Sd,ar=l.forwardRef(({className:e,...t},n)=>u.jsx(js,{className:D("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));ar.displayName=js.displayName;const Md=Ln("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),ir=l.forwardRef(({side:e="right",className:t,children:n,...r},o)=>u.jsxs(zs,{children:[u.jsx(ar,{}),u.jsxs(Ls,{ref:o,className:D(Md({side:e}),t),...r,children:[n,u.jsxs(Vs,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[u.jsx(sl,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ir.displayName=Ls.displayName;const cr=({className:e,...t})=>u.jsx("div",{className:D("flex flex-col space-y-2 text-center sm:text-left",e),...t});cr.displayName="SheetHeader";const Ws=({className:e,...t})=>u.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ws.displayName="SheetFooter";const lr=l.forwardRef(({className:e,...t},n)=>u.jsx(Fs,{ref:n,className:D("text-lg font-semibold text-foreground",e),...t}));lr.displayName=Fs.displayName;const ur=l.forwardRef(({className:e,...t},n)=>u.jsx($s,{ref:n,className:D("text-sm text-muted-foreground",e),...t}));ur.displayName=$s.displayName;function dr({className:e,...t}){return u.jsx("div",{className:D("animate-pulse rounded-md bg-muted",e),...t})}const Ad=["top","right","bottom","left"],Ge=Math.min,he=Math.max,tn=Math.round,nn=Math.floor,Me=e=>({x:e,y:e}),Td={left:"right",right:"left",bottom:"top",top:"bottom"},Nd={start:"end",end:"start"};function fr(e,t,n){return he(e,Ge(t,n))}function je(e,t){return typeof e=="function"?e(t):e}function Le(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function pr(e){return e==="x"?"y":"x"}function mr(e){return e==="y"?"height":"width"}function Ae(e){return["top","bottom"].includes(Le(e))?"y":"x"}function hr(e){return pr(Ae(e))}function kd(e,t,n){n===void 0&&(n=!1);const r=lt(e),o=hr(e),s=mr(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=rn(a)),[a,rn(a)]}function Od(e){const t=rn(e);return[gr(e),t,gr(t)]}function gr(e){return e.replace(/start|end/g,t=>Nd[t])}function Pd(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:a;default:return[]}}function Dd(e,t,n,r){const o=lt(e);let s=Pd(Le(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(gr)))),s}function rn(e){return e.replace(/left|right|bottom|top/g,t=>Td[t])}function Id(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gs(e){return typeof e!="number"?Id(e):{top:e,right:e,bottom:e,left:e}}function on(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Bs(e,t,n){let{reference:r,floating:o}=e;const s=Ae(t),a=hr(t),i=mr(a),c=Le(t),p=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=r[i]/2-o[i]/2;let h;switch(c){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(lt(t)){case"start":h[a]-=m*(n&&p?-1:1);break;case"end":h[a]+=m*(n&&p?-1:1);break}return h}const jd=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let p=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Bs(p,r,c),m=r,h={},b=0;for(let g=0;g<i.length;g++){const{name:w,fn:v}=i[g],{x,y:E,data:S,reset:_}=await v({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:h,rects:p,platform:a,elements:{reference:e,floating:t}});d=x??d,f=E??f,h={...h,[w]:{...h[w],...S}},_&&b<=50&&(b++,typeof _=="object"&&(_.placement&&(m=_.placement),_.rects&&(p=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:d,y:f}=Bs(p,m,c)),g=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:h}};async function xt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:p="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:h=0}=je(t,e),b=Gs(h),w=i[m?f==="floating"?"reference":"floating":f],v=on(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:p,rootBoundary:d,strategy:c})),x=f==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),S=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},_=on(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:x,offsetParent:E,strategy:c}):x);return{top:(v.top-_.top+b.top)/S.y,bottom:(_.bottom-v.bottom+b.bottom)/S.y,left:(v.left-_.left+b.left)/S.x,right:(_.right-v.right+b.right)/S.x}}const Ld=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:p,padding:d=0}=je(e,t)||{};if(p==null)return{};const f=Gs(d),m={x:n,y:r},h=hr(o),b=mr(h),g=await a.getDimensions(p),w=h==="y",v=w?"top":"left",x=w?"bottom":"right",E=w?"clientHeight":"clientWidth",S=s.reference[b]+s.reference[h]-m[h]-s.floating[b],_=m[h]-s.reference[h],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(p));let M=T?T[E]:0;(!M||!await(a.isElement==null?void 0:a.isElement(T)))&&(M=i.floating[E]||s.floating[b]);const C=S/2-_/2,j=M/2-g[b]/2-1,L=Ge(f[v],j),U=Ge(f[x],j),B=L,z=M-g[b]-U,W=M/2-g[b]/2+C,X=fr(B,W,z),V=!c.arrow&&lt(o)!=null&&W!==X&&s.reference[b]/2-(W<B?L:U)-g[b]/2<0,K=V?W<B?W-B:W-z:0;return{[h]:m[h]+K,data:{[h]:X,centerOffset:W-X-K,...V&&{alignmentOffset:K}},reset:V}}}),Fd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:p}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...w}=je(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=Le(o),x=Ae(i),E=Le(i)===i,S=await(c.isRTL==null?void 0:c.isRTL(p.floating)),_=m||(E||!g?[rn(i)]:Od(i)),T=b!=="none";!m&&T&&_.push(...Dd(i,g,b,S));const M=[i,..._],C=await xt(t,w),j=[];let L=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&j.push(C[v]),f){const W=kd(o,a,S);j.push(C[W[0]],C[W[1]])}if(L=[...L,{placement:o,overflows:j}],!j.every(W=>W<=0)){var U,B;const W=(((U=s.flip)==null?void 0:U.index)||0)+1,X=M[W];if(X&&(!(f==="alignment"?x!==Ae(X):!1)||L.every(R=>R.overflows[0]>0&&Ae(R.placement)===x)))return{data:{index:W,overflows:L},reset:{placement:X}};let V=(B=L.filter(K=>K.overflows[0]<=0).sort((K,R)=>K.overflows[1]-R.overflows[1])[0])==null?void 0:B.placement;if(!V)switch(h){case"bestFit":{var z;const K=(z=L.filter(R=>{if(T){const N=Ae(R.placement);return N===x||N==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(N=>N>0).reduce((N,y)=>N+y,0)]).sort((R,N)=>R[1]-N[1])[0])==null?void 0:z[0];K&&(V=K);break}case"initialPlacement":V=i;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function Us(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ks(e){return Ad.some(t=>e[t]>=0)}const $d=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=je(e,t);switch(r){case"referenceHidden":{const s=await xt(t,{...o,elementContext:"reference"}),a=Us(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Ks(a)}}}case"escaped":{const s=await xt(t,{...o,altBoundary:!0}),a=Us(s,n.floating);return{data:{escapedOffsets:a,escaped:Ks(a)}}}default:return{}}}}};async function Vd(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Le(n),i=lt(n),c=Ae(n)==="y",p=["left","top"].includes(a)?-1:1,d=s&&c?-1:1,f=je(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return i&&typeof b=="number"&&(h=i==="end"?b*-1:b),c?{x:h*d,y:m*p}:{x:m*p,y:h*d}}const Hd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:i}=t,c=await Vd(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},zd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:w=>{let{x:v,y:x}=w;return{x:v,y:x}}},...c}=je(e,t),p={x:n,y:r},d=await xt(t,c),f=Ae(Le(o)),m=pr(f);let h=p[m],b=p[f];if(s){const w=m==="y"?"top":"left",v=m==="y"?"bottom":"right",x=h+d[w],E=h-d[v];h=fr(x,h,E)}if(a){const w=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=b+d[w],E=b-d[v];b=fr(x,b,E)}const g=i.fn({...t,[m]:h,[f]:b});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:s,[f]:a}}}}}},Wd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:p=!0}=je(e,t),d={x:n,y:r},f=Ae(o),m=pr(f);let h=d[m],b=d[f];const g=je(i,t),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const E=m==="y"?"height":"width",S=s.reference[m]-s.floating[E]+w.mainAxis,_=s.reference[m]+s.reference[E]-w.mainAxis;h<S?h=S:h>_&&(h=_)}if(p){var v,x;const E=m==="y"?"width":"height",S=["top","left"].includes(Le(o)),_=s.reference[f]-s.floating[E]+(S&&((v=a.offset)==null?void 0:v[f])||0)+(S?0:w.crossAxis),T=s.reference[f]+s.reference[E]+(S?0:((x=a.offset)==null?void 0:x[f])||0)-(S?w.crossAxis:0);b<_?b=_:b>T&&(b=T)}return{[m]:h,[f]:b}}}},Gd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...p}=je(e,t),d=await xt(t,p),f=Le(o),m=lt(o),h=Ae(o)==="y",{width:b,height:g}=s.floating;let w,v;f==="top"||f==="bottom"?(w=f,v=m===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(v=f,w=m==="end"?"top":"bottom");const x=g-d.top-d.bottom,E=b-d.left-d.right,S=Ge(g-d[w],x),_=Ge(b-d[v],E),T=!t.middlewareData.shift;let M=S,C=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=x),T&&!m){const L=he(d.left,0),U=he(d.right,0),B=he(d.top,0),z=he(d.bottom,0);h?C=b-2*(L!==0||U!==0?L+U:he(d.left,d.right)):M=g-2*(B!==0||z!==0?B+z:he(d.top,d.bottom))}await c({...t,availableWidth:C,availableHeight:M});const j=await a.getDimensions(i.floating);return b!==j.width||g!==j.height?{reset:{rects:!0}}:{}}}};function sn(){return typeof window<"u"}function ut(e){return Ys(e)?(e.nodeName||"").toLowerCase():"#document"}function ge(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Te(e){var t;return(t=(Ys(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ys(e){return sn()?e instanceof Node||e instanceof ge(e).Node:!1}function Ce(e){return sn()?e instanceof Element||e instanceof ge(e).Element:!1}function Ne(e){return sn()?e instanceof HTMLElement||e instanceof ge(e).HTMLElement:!1}function qs(e){return!sn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ge(e).ShadowRoot}function yt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Bd(e){return["table","td","th"].includes(ut(e))}function an(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function vr(e){const t=br(),n=Ce(e)?Ee(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Ud(e){let t=Be(e);for(;Ne(t)&&!dt(t);){if(vr(t))return t;if(an(t))return null;t=Be(t)}return null}function br(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function dt(e){return["html","body","#document"].includes(ut(e))}function Ee(e){return ge(e).getComputedStyle(e)}function cn(e){return Ce(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Be(e){if(ut(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qs(e)&&e.host||Te(e);return qs(t)?t.host:t}function Xs(e){const t=Be(e);return dt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ne(t)&&yt(t)?t:Xs(t)}function Ct(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Xs(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=ge(o);if(s){const i=wr(a);return t.concat(a,a.visualViewport||[],yt(o)?o:[],i&&n?Ct(i):[])}return t.concat(o,Ct(o,[],n))}function wr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zs(e){const t=Ee(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ne(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=tn(n)!==s||tn(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function xr(e){return Ce(e)?e:e.contextElement}function ft(e){const t=xr(e);if(!Ne(t))return Me(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Zs(t);let a=(s?tn(n.width):n.width)/r,i=(s?tn(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Kd=Me(0);function Js(e){const t=ge(e);return!br()||!t.visualViewport?Kd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ge(e)?!1:t}function Je(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=xr(e);let a=Me(1);t&&(r?Ce(r)&&(a=ft(r)):a=ft(e));const i=Yd(s,n,r)?Js(s):Me(0);let c=(o.left+i.x)/a.x,p=(o.top+i.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(s){const m=ge(s),h=r&&Ce(r)?ge(r):r;let b=m,g=wr(b);for(;g&&r&&h!==b;){const w=ft(g),v=g.getBoundingClientRect(),x=Ee(g),E=v.left+(g.clientLeft+parseFloat(x.paddingLeft))*w.x,S=v.top+(g.clientTop+parseFloat(x.paddingTop))*w.y;c*=w.x,p*=w.y,d*=w.x,f*=w.y,c+=E,p+=S,b=ge(g),g=wr(b)}}return on({width:d,height:f,x:c,y:p})}function yr(e,t){const n=cn(e).scrollLeft;return t?t.left+n:Je(Te(e)).left+n}function Qs(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:yr(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function qd(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=Te(r),i=t?an(t.floating):!1;if(r===a||i&&s)return n;let c={scrollLeft:0,scrollTop:0},p=Me(1);const d=Me(0),f=Ne(r);if((f||!f&&!s)&&((ut(r)!=="body"||yt(a))&&(c=cn(r)),Ne(r))){const h=Je(r);p=ft(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const m=a&&!f&&!s?Qs(a,c,!0):Me(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-c.scrollLeft*p.x+d.x+m.x,y:n.y*p.y-c.scrollTop*p.y+d.y+m.y}}function Xd(e){return Array.from(e.getClientRects())}function Zd(e){const t=Te(e),n=cn(e),r=e.ownerDocument.body,o=he(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=he(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+yr(e);const i=-n.scrollTop;return Ee(r).direction==="rtl"&&(a+=he(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:i}}function Jd(e,t){const n=ge(e),r=Te(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,i=0,c=0;if(o){s=o.width,a=o.height;const p=br();(!p||p&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}return{width:s,height:a,x:i,y:c}}function Qd(e,t){const n=Je(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Ne(e)?ft(e):Me(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=o*s.x,p=r*s.y;return{width:a,height:i,x:c,y:p}}function ea(e,t,n){let r;if(t==="viewport")r=Jd(e,n);else if(t==="document")r=Zd(Te(e));else if(Ce(t))r=Qd(t,n);else{const o=Js(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return on(r)}function ta(e,t){const n=Be(e);return n===t||!Ce(n)||dt(n)?!1:Ee(n).position==="fixed"||ta(n,t)}function ef(e,t){const n=t.get(e);if(n)return n;let r=Ct(e,[],!1).filter(i=>Ce(i)&&ut(i)!=="body"),o=null;const s=Ee(e).position==="fixed";let a=s?Be(e):e;for(;Ce(a)&&!dt(a);){const i=Ee(a),c=vr(a);!c&&i.position==="fixed"&&(o=null),(s?!c&&!o:!c&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||yt(a)&&!c&&ta(e,a))?r=r.filter(d=>d!==a):o=i,a=Be(a)}return t.set(e,r),r}function tf(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?an(t)?[]:ef(t,this._c):[].concat(n),r],i=a[0],c=a.reduce((p,d)=>{const f=ea(t,d,o);return p.top=he(f.top,p.top),p.right=Ge(f.right,p.right),p.bottom=Ge(f.bottom,p.bottom),p.left=he(f.left,p.left),p},ea(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function nf(e){const{width:t,height:n}=Zs(e);return{width:t,height:n}}function rf(e,t,n){const r=Ne(t),o=Te(t),s=n==="fixed",a=Je(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=Me(0);function p(){c.x=yr(o)}if(r||!r&&!s)if((ut(t)!=="body"||yt(o))&&(i=cn(t)),r){const h=Je(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else o&&p();s&&!r&&o&&p();const d=o&&!r&&!s?Qs(o,i):Me(0),f=a.left+i.scrollLeft-c.x-d.x,m=a.top+i.scrollTop-c.y-d.y;return{x:f,y:m,width:a.width,height:a.height}}function Cr(e){return Ee(e).position==="static"}function na(e,t){if(!Ne(e)||Ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Te(e)===n&&(n=n.ownerDocument.body),n}function ra(e,t){const n=ge(e);if(an(e))return n;if(!Ne(e)){let o=Be(e);for(;o&&!dt(o);){if(Ce(o)&&!Cr(o))return o;o=Be(o)}return n}let r=na(e,t);for(;r&&Bd(r)&&Cr(r);)r=na(r,t);return r&&dt(r)&&Cr(r)&&!vr(r)?n:r||Ud(e)||n}const of=async function(e){const t=this.getOffsetParent||ra,n=this.getDimensions,r=await n(e.floating);return{reference:rf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function sf(e){return Ee(e).direction==="rtl"}const af={convertOffsetParentRelativeRectToViewportRelativeRect:qd,getDocumentElement:Te,getClippingRect:tf,getOffsetParent:ra,getElementRects:of,getClientRects:Xd,getDimensions:nf,getScale:ft,isElement:Ce,isRTL:sf};function oa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cf(e,t){let n=null,r;const o=Te(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const p=e.getBoundingClientRect(),{left:d,top:f,width:m,height:h}=p;if(i||t(),!m||!h)return;const b=nn(f),g=nn(o.clientWidth-(d+m)),w=nn(o.clientHeight-(f+h)),v=nn(d),E={rootMargin:-b+"px "+-g+"px "+-w+"px "+-v+"px",threshold:he(0,Ge(1,c))||1};let S=!0;function _(T){const M=T[0].intersectionRatio;if(M!==c){if(!S)return a();M?a(!1,M):r=setTimeout(()=>{a(!1,1e-7)},1e3)}M===1&&!oa(p,e.getBoundingClientRect())&&a(),S=!1}try{n=new IntersectionObserver(_,{...E,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,E)}n.observe(e)}return a(!0),s}function lf(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,p=xr(e),d=o||s?[...p?Ct(p):[],...Ct(t)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const f=p&&i?cf(p,n):null;let m=-1,h=null;a&&(h=new ResizeObserver(v=>{let[x]=v;x&&x.target===p&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var E;(E=h)==null||E.observe(t)})),n()}),p&&!c&&h.observe(p),h.observe(t));let b,g=c?Je(e):null;c&&w();function w(){const v=Je(e);g&&!oa(g,v)&&n(),g=v,b=requestAnimationFrame(w)}return n(),()=>{var v;d.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),f==null||f(),(v=h)==null||v.disconnect(),h=null,c&&cancelAnimationFrame(b)}}const uf=Hd,df=zd,ff=Fd,pf=Gd,mf=$d,sa=Ld,hf=Wd,gf=(e,t,n)=>{const r=new Map,o={platform:af,...n},s={...o.platform,_c:r};return jd(e,t,{...o,platform:s})};var vf=typeof document<"u",bf=function(){},ln=vf?I.useLayoutEffect:bf;function un(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!un(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!un(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function aa(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ia(e,t){const n=aa(e);return Math.round(t*n)/n}function Er(e){const t=l.useRef(e);return ln(()=>{t.current=e}),t}function wf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:p}=e,[d,f]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=l.useState(r);un(m,r)||h(r);const[b,g]=l.useState(null),[w,v]=l.useState(null),x=l.useCallback(R=>{R!==T.current&&(T.current=R,g(R))},[]),E=l.useCallback(R=>{R!==M.current&&(M.current=R,v(R))},[]),S=s||b,_=a||w,T=l.useRef(null),M=l.useRef(null),C=l.useRef(d),j=c!=null,L=Er(c),U=Er(o),B=Er(p),z=l.useCallback(()=>{if(!T.current||!M.current)return;const R={placement:t,strategy:n,middleware:m};U.current&&(R.platform=U.current),gf(T.current,M.current,R).then(N=>{const y={...N,isPositioned:B.current!==!1};W.current&&!un(C.current,y)&&(C.current=y,Kr.flushSync(()=>{f(y)}))})},[m,t,n,U,B]);ln(()=>{p===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[p]);const W=l.useRef(!1);ln(()=>(W.current=!0,()=>{W.current=!1}),[]),ln(()=>{if(S&&(T.current=S),_&&(M.current=_),S&&_){if(L.current)return L.current(S,_,z);z()}},[S,_,z,L,j]);const X=l.useMemo(()=>({reference:T,floating:M,setReference:x,setFloating:E}),[x,E]),V=l.useMemo(()=>({reference:S,floating:_}),[S,_]),K=l.useMemo(()=>{const R={position:n,left:0,top:0};if(!V.floating)return R;const N=ia(V.floating,d.x),y=ia(V.floating,d.y);return i?{...R,transform:"translate("+N+"px, "+y+"px)",...aa(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:N,top:y}},[n,i,V.floating,d.x,d.y]);return l.useMemo(()=>({...d,update:z,refs:X,elements:V,floatingStyles:K}),[d,z,X,V,K])}const xf=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?sa({element:r.current,padding:o}).fn(n):{}:r?sa({element:r,padding:o}).fn(n):{}}}},yf=(e,t)=>({...uf(e),options:[e,t]}),Cf=(e,t)=>({...df(e),options:[e,t]}),Ef=(e,t)=>({...hf(e),options:[e,t]}),Sf=(e,t)=>({...ff(e),options:[e,t]}),_f=(e,t)=>({...pf(e),options:[e,t]}),Rf=(e,t)=>({...mf(e),options:[e,t]}),Mf=(e,t)=>({...xf(e),options:[e,t]});var Af="Arrow",ca=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return u.jsx(re.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});ca.displayName=Af;var Tf=ca;function Nf(e){const[t,n]=l.useState(void 0);return ze(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const c=s.borderBoxSize,p=Array.isArray(c)?c[0]:c;a=p.inlineSize,i=p.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Sr="Popper",[la,dn]=Xe(Sr),[kf,ua]=la(Sr),da=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return u.jsx(kf,{scope:t,anchor:r,onAnchorChange:o,children:n})};da.displayName=Sr;var fa="PopperAnchor",pa=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=ua(fa,n),a=l.useRef(null),i=ie(t,a);return l.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:u.jsx(re.div,{...o,ref:i})});pa.displayName=fa;var _r="PopperContent",[Of,Pf]=la(_r),ma=l.forwardRef((e,t)=>{var Y,ee,te,ae,Se,Ke;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:p=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:h="optimized",onPlaced:b,...g}=e,w=ua(_r,n),[v,x]=l.useState(null),E=ie(t,J=>x(J)),[S,_]=l.useState(null),T=Nf(S),M=(T==null?void 0:T.width)??0,C=(T==null?void 0:T.height)??0,j=r+(s!=="center"?"-"+s:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},U=Array.isArray(p)?p:[p],B=U.length>0,z={padding:L,boundary:U.filter(If),altBoundary:B},{refs:W,floatingStyles:X,placement:V,isPositioned:K,middlewareData:R}=wf({strategy:"fixed",placement:j,whileElementsMounted:(...J)=>lf(...J,{animationFrame:h==="always"}),elements:{reference:w.anchor},middleware:[yf({mainAxis:o+C,alignmentAxis:a}),c&&Cf({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Ef():void 0,...z}),c&&Sf({...z}),_f({...z,apply:({elements:J,rects:Q,availableWidth:le,availableHeight:oe})=>{const{width:ve,height:Ye}=Q.reference,se=J.floating.style;se.setProperty("--radix-popper-available-width",`${le}px`),se.setProperty("--radix-popper-available-height",`${oe}px`),se.setProperty("--radix-popper-anchor-width",`${ve}px`),se.setProperty("--radix-popper-anchor-height",`${Ye}px`)}}),S&&Mf({element:S,padding:i}),jf({arrowWidth:M,arrowHeight:C}),m&&Rf({strategy:"referenceHidden",...z})]}),[N,y]=va(V),P=_e(b);ze(()=>{K&&(P==null||P())},[K,P]);const F=(Y=R.arrow)==null?void 0:Y.x,H=(ee=R.arrow)==null?void 0:ee.y,Z=((te=R.arrow)==null?void 0:te.centerOffset)!==0,[ne,ue]=l.useState();return ze(()=>{v&&ue(window.getComputedStyle(v).zIndex)},[v]),u.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:K?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[(ae=R.transformOrigin)==null?void 0:ae.x,(Se=R.transformOrigin)==null?void 0:Se.y].join(" "),...((Ke=R.hide)==null?void 0:Ke.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Of,{scope:n,placedSide:N,onArrowChange:_,arrowX:F,arrowY:H,shouldHideArrow:Z,children:u.jsx(re.div,{"data-side":N,"data-align":y,...g,ref:E,style:{...g.style,animation:K?void 0:"none"}})})})});ma.displayName=_r;var ha="PopperArrow",Df={top:"bottom",right:"left",bottom:"top",left:"right"},ga=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Pf(ha,r),a=Df[s.placedSide];return u.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:u.jsx(Tf,{...o,ref:n,style:{...o.style,display:"block"}})})});ga.displayName=ha;function If(e){return e!==null}var jf=e=>({name:"transformOrigin",options:e,fn(t){var w,v,x;const{placement:n,rects:r,middlewareData:o}=t,a=((w=o.arrow)==null?void 0:w.centerOffset)!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[p,d]=va(n),f={start:"0%",center:"50%",end:"100%"}[d],m=(((v=o.arrow)==null?void 0:v.x)??0)+i/2,h=(((x=o.arrow)==null?void 0:x.y)??0)+c/2;let b="",g="";return p==="bottom"?(b=a?f:`${m}px`,g=`${-c}px`):p==="top"?(b=a?f:`${m}px`,g=`${r.floating.height+c}px`):p==="right"?(b=`${-c}px`,g=a?f:`${h}px`):p==="left"&&(b=`${r.floating.width+c}px`,g=a?f:`${h}px`),{data:{x:b,y:g}}}});function va(e){const[t,n="center"]=e.split("-");return[t,n]}var Rr=da,ba=pa,wa=ma,xa=ga,Lf=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"}),Ff="VisuallyHidden",ya=l.forwardRef((e,t)=>u.jsx(re.span,{...e,ref:t,style:{...Lf,...e.style}}));ya.displayName=Ff;var $f=ya,[fn,I0]=Xe("Tooltip",[dn]),pn=dn(),Ca="TooltipProvider",Vf=700,Mr="tooltip.open",[Hf,Ar]=fn(Ca),Ea=e=>{const{__scopeTooltip:t,delayDuration:n=Vf,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,a=l.useRef(!0),i=l.useRef(!1),c=l.useRef(0);return l.useEffect(()=>{const p=c.current;return()=>window.clearTimeout(p)},[]),u.jsx(Hf,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:l.useCallback(p=>{i.current=p},[]),disableHoverableContent:o,children:s})};Ea.displayName=Ca;var Et="Tooltip",[zf,mn]=fn(Et),Sa=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,c=Ar(Et,e.__scopeTooltip),p=pn(t),[d,f]=l.useState(null),m=De(),h=l.useRef(0),b=a??c.disableHoverableContent,g=i??c.delayDuration,w=l.useRef(!1),[v,x]=wt({prop:r,defaultProp:o??!1,onChange:M=>{M?(c.onOpen(),document.dispatchEvent(new CustomEvent(Mr))):c.onClose(),s==null||s(M)},caller:Et}),E=l.useMemo(()=>v?w.current?"delayed-open":"instant-open":"closed",[v]),S=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w.current=!1,x(!0)},[x]),_=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),T=l.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{w.current=!0,x(!0),h.current=0},g)},[g,x]);return l.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),u.jsx(Rr,{...p,children:u.jsx(zf,{scope:t,contentId:m,open:v,stateAttribute:E,trigger:d,onTriggerChange:f,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayedRef.current?T():S()},[c.isOpenDelayedRef,T,S]),onTriggerLeave:l.useCallback(()=>{b?_():(window.clearTimeout(h.current),h.current=0)},[_,b]),onOpen:S,onClose:_,disableHoverableContent:b,children:n})})};Sa.displayName=Et;var Tr="TooltipTrigger",_a=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=mn(Tr,n),s=Ar(Tr,n),a=pn(n),i=l.useRef(null),c=ie(t,i,o.onTriggerChange),p=l.useRef(!1),d=l.useRef(!1),f=l.useCallback(()=>p.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.jsx(ba,{asChild:!0,...a,children:u.jsx(re.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:$(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:$(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:$(e.onPointerDown,()=>{o.open&&o.onClose(),p.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:$(e.onFocus,()=>{p.current||o.onOpen()}),onBlur:$(e.onBlur,o.onClose),onClick:$(e.onClick,o.onClose)})})});_a.displayName=Tr;var Wf="TooltipPortal",[j0,Gf]=fn(Wf,{forceMount:void 0}),pt="TooltipContent",Ra=l.forwardRef((e,t)=>{const n=Gf(pt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=mn(pt,e.__scopeTooltip);return u.jsx(Ie,{present:r||a.open,children:a.disableHoverableContent?u.jsx(Ma,{side:o,...s,ref:t}):u.jsx(Bf,{side:o,...s,ref:t})})}),Bf=l.forwardRef((e,t)=>{const n=mn(pt,e.__scopeTooltip),r=Ar(pt,e.__scopeTooltip),o=l.useRef(null),s=ie(t,o),[a,i]=l.useState(null),{trigger:c,onClose:p}=n,d=o.current,{onPointerInTransitChange:f}=r,m=l.useCallback(()=>{i(null),f(!1)},[f]),h=l.useCallback((b,g)=>{const w=b.currentTarget,v={x:b.clientX,y:b.clientY},x=Xf(v,w.getBoundingClientRect()),E=Zf(v,x),S=Jf(g.getBoundingClientRect()),_=ep([...E,...S]);i(_),f(!0)},[f]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(c&&d){const b=w=>h(w,d),g=w=>h(w,c);return c.addEventListener("pointerleave",b),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",g)}}},[c,d,h,m]),l.useEffect(()=>{if(a){const b=g=>{const w=g.target,v={x:g.clientX,y:g.clientY},x=(c==null?void 0:c.contains(w))||(d==null?void 0:d.contains(w)),E=!Qf(v,a);x?m():E&&(m(),p())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,a,p,m]),u.jsx(Ma,{...e,ref:s})}),[Uf,Kf]=fn(Et,{isInside:!1}),Yf=il("TooltipContent"),Ma=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,c=mn(pt,n),p=pn(n),{onClose:d}=c;return l.useEffect(()=>(document.addEventListener(Mr,d),()=>document.removeEventListener(Mr,d)),[d]),l.useEffect(()=>{if(c.trigger){const f=m=>{const h=m.target;h!=null&&h.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),u.jsx(Gt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:u.jsxs(wa,{"data-state":c.stateAttribute,...p,...i,ref:t,style:{...i.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:[u.jsx(Yf,{children:r}),u.jsx(Uf,{scope:n,isInside:!0,children:u.jsx($f,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Ra.displayName=pt;var Aa="TooltipArrow",qf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=pn(n);return Kf(Aa,n).isInside?null:u.jsx(xa,{...o,...r,ref:t})});qf.displayName=Aa;function Xf(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Zf(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 Jf(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Qf(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],p=i.x,d=i.y,f=c.x,m=c.y;d>r!=m>r&&n<(f-p)*(r-d)/(m-d)+p&&(o=!o)}return o}function ep(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),tp(t)}function tp(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var np=Ea,rp=Sa,op=_a,Ta=Ra;const Na=np,ka=rp,Oa=op,Nr=l.forwardRef(({className:e,sideOffset:t=4,...n},r)=>u.jsx(Ta,{ref:r,sideOffset:t,className:D("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}));Nr.displayName=Ta.displayName;const sp="sidebar_state",ap=60*60*24*7,ip="16rem",cp="18rem",lp="3rem",up="b",Pa=l.createContext(null);function St(){const e=l.useContext(Pa);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Da({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:s,...a}){const i=Zl(),[c,p]=l.useState(!1),[d,f]=l.useState(e),m=t??d,h=l.useCallback(v=>{const x=typeof v=="function"?v(m):v;n?n(x):f(x),document.cookie=`${sp}=${x}; path=/; max-age=${ap}`},[n,m]),b=l.useCallback(()=>i?p(v=>!v):h(v=>!v),[i,h,p]);l.useEffect(()=>{const v=x=>{x.key===up&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),b())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[b]);const g=m?"expanded":"collapsed",w=l.useMemo(()=>({state:g,open:m,setOpen:h,isMobile:i,openMobile:c,setOpenMobile:p,toggleSidebar:b}),[g,m,h,i,c,p,b]);return u.jsx(Pa.Provider,{value:w,children:u.jsx(Na,{delayDuration:0,children:u.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":ip,"--sidebar-width-icon":lp,...o},className:D("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),...a,children:s})})})}function Ia({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...s}){const{isMobile:a,state:i,openMobile:c,setOpenMobile:p}=St();return n==="none"?u.jsx("div",{"data-slot":"sidebar",className:D("bg-white text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...s,children:o}):a?u.jsx(Hs,{open:c,onOpenChange:p,...s,children:u.jsxs(ir,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-white text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":cp},side:e,children:[u.jsxs(cr,{className:"sr-only",children:[u.jsx(lr,{children:"Sidebar"}),u.jsx(ur,{children:"Displays the mobile sidebar."})]}),u.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):u.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":i,"data-collapsible":i==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[u.jsx("div",{"data-slot":"sidebar-gap",className:D("relative w-(--sidebar-width) bg-white transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),u.jsx("div",{"data-slot":"sidebar-container",className:D("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...s,children:u.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-white group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col px-1 py-2 group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})}function ja({className:e,onClick:t,...n}){const{toggleSidebar:r}=St();return u.jsxs(zt,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:D("size-7",e),onClick:o=>{t==null||t(o),r()},...n,children:[u.jsx(ol,{}),u.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function La({className:e,...t}){const{toggleSidebar:n}=St();return u.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:D("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function Fa({className:e,...t}){return u.jsx("main",{"data-slot":"sidebar-inset",className:D("bg-white relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function dp({className:e,...t}){return u.jsx(Gn,{"data-slot":"sidebar-input","data-sidebar":"input",className:D("bg-background h-8 w-full shadow-none",e),...t})}function $a({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:D("flex flex-col gap-2 p-2",e),...t})}function fp({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:D("flex flex-col gap-2 p-2",e),...t})}function pp({className:e,...t}){return u.jsx(Wt,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:D("bg-sidebar-border mx-2 w-auto",e),...t})}function Va({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:D("flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function Ha({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:D("relative flex w-full min-w-0 flex-col px-2 py-1",e),...t})}function mp({className:e,asChild:t=!1,...n}){const r=t?tt:"div";return u.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:D("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})}function hp({className:e,asChild:t=!1,...n}){const r=t?tt:"button";return u.jsx(r,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:D("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...n})}function za({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:D("w-full text-sm",e),...t})}function gp({className:e,...t}){return u.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:D("flex w-full min-w-0 flex-col gap-1",e),...t})}function vp({className:e,...t}){return u.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:D("group/menu-item relative",e),...t})}const bp=Ln("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function wp({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:s,...a}){const i=e?tt:"button",{isMobile:c,state:p}=St(),d=u.jsx(i,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":t,className:D(bp({variant:n,size:r}),s),...a});return o?(typeof o=="string"&&(o={children:o}),u.jsxs(ka,{children:[u.jsx(Oa,{asChild:!0,children:d}),u.jsx(Nr,{side:"right",align:"center",hidden:p!=="collapsed"||c,...o})]})):d}function xp({className:e,asChild:t=!1,showOnHover:n=!1,...r}){const o=t?tt:"button";return u.jsx(o,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:D("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",e),...r})}function yp({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:D("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t})}function Cp({className:e,showIcon:t=!1,...n}){const r=l.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return u.jsxs("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:D("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&u.jsx(dr,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),u.jsx(dr,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})}function Wa({className:e,...t}){return u.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:D("border-sidebar-border mx-3 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t})}function Ga({className:e,...t}){return u.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:D("group/menu-sub-item relative",e),...t})}function Ba({asChild:e=!1,size:t="md",isActive:n=!1,className:r,...o}){const s=e?tt:"a";return u.jsx(s,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:D("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})}function Ua({title:e,url:t,children:n,defaultOpen:r=!1,icon:o,isActive:s=!1}){const[a,i]=l.useState(r);return l.useEffect(()=>{s&&i(!0)},[s]),u.jsx(Ha,{children:u.jsxs("div",{className:"flex flex-col",children:[u.jsxs("div",{className:"flex flex-row items-center justify-between",children:[u.jsxs("a",{href:t,className:D("flex flex-1 cursor-pointer items-center gap-2 rounded-lg p-2 transition-colors hover:bg-gray-100"),children:[o&&u.jsx("span",{className:D("text-gray-600"),children:o}),u.jsx("span",{className:D("text-gray-600"),children:e})]}),u.jsx("button",{type:"button",className:"mr-3 rounded-lg p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-700",onClick:c=>{c.preventDefault(),c.stopPropagation(),i(!a)},"aria-label":a?"Collapse section":"Expand section",children:a?u.jsx(el,{className:"h-4 w-4"}):u.jsx(yo,{className:"h-4 w-4"})})]}),u.jsx("div",{className:D("overflow-hidden transition-all",a?"max-h-96":"max-h-0"),children:n})]})})}function Ka(e){const t=e+"CollectionProvider",[n,r]=Xe(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:w,children:v}=g,x=I.useRef(null),E=I.useRef(new Map).current;return u.jsx(o,{scope:w,itemMap:E,collectionRef:x,children:v})};a.displayName=t;const i=e+"CollectionSlot",c=et(i),p=I.forwardRef((g,w)=>{const{scope:v,children:x}=g,E=s(i,v),S=ie(w,E.collectionRef);return u.jsx(c,{ref:S,children:x})});p.displayName=i;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=et(d),h=I.forwardRef((g,w)=>{const{scope:v,children:x,...E}=g,S=I.useRef(null),_=ie(w,S),T=s(d,v);return I.useEffect(()=>(T.itemMap.set(S,{ref:S,...E}),()=>void T.itemMap.delete(S))),u.jsx(m,{[f]:"",ref:_,children:x})});h.displayName=d;function b(g){const w=s(e+"CollectionConsumer",g);return I.useCallback(()=>{const x=w.collectionRef.current;if(!x)return[];const E=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(w.itemMap.values()).sort((T,M)=>E.indexOf(T.ref.current)-E.indexOf(M.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:p,ItemSlot:h},b,r]}var Ep=l.createContext(void 0);function Ya(e){const t=l.useContext(Ep);return e||t||"ltr"}var kr="rovingFocusGroup.onEntryFocus",Sp={bubbles:!1,cancelable:!0},_t="RovingFocusGroup",[Or,qa,_p]=Ka(_t),[Rp,Xa]=Xe(_t,[_p]),[Mp,Ap]=Rp(_t),Za=l.forwardRef((e,t)=>u.jsx(Or.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Or.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Tp,{...e,ref:t})})}));Za.displayName=_t;var Tp=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:p,preventScrollOnEntryFocus:d=!1,...f}=e,m=l.useRef(null),h=ie(t,m),b=Ya(s),[g,w]=wt({prop:a,defaultProp:i??null,onChange:c,caller:_t}),[v,x]=l.useState(!1),E=_e(p),S=qa(n),_=l.useRef(!1),[T,M]=l.useState(0);return l.useEffect(()=>{const C=m.current;if(C)return C.addEventListener(kr,E),()=>C.removeEventListener(kr,E)},[E]),u.jsx(Mp,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(C=>w(C),[w]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>M(C=>C+1),[]),onFocusableItemRemove:l.useCallback(()=>M(C=>C-1),[]),children:u.jsx(re.div,{tabIndex:v||T===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:$(e.onMouseDown,()=>{_.current=!0}),onFocus:$(e.onFocus,C=>{const j=!_.current;if(C.target===C.currentTarget&&j&&!v){const L=new CustomEvent(kr,Sp);if(C.currentTarget.dispatchEvent(L),!L.defaultPrevented){const U=S().filter(V=>V.focusable),B=U.find(V=>V.active),z=U.find(V=>V.id===g),X=[B,z,...U].filter(Boolean).map(V=>V.ref.current);ei(X,d)}}_.current=!1}),onBlur:$(e.onBlur,()=>x(!1))})})}),Ja="RovingFocusGroupItem",Qa=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...i}=e,c=De(),p=s||c,d=Ap(Ja,n),f=d.currentTabStopId===p,m=qa(n),{onFocusableItemAdd:h,onFocusableItemRemove:b,currentTabStopId:g}=d;return l.useEffect(()=>{if(r)return h(),()=>b()},[r,h,b]),u.jsx(Or.ItemSlot,{scope:n,id:p,focusable:r,active:o,children:u.jsx(re.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...i,ref:t,onMouseDown:$(e.onMouseDown,w=>{r?d.onItemFocus(p):w.preventDefault()}),onFocus:$(e.onFocus,()=>d.onItemFocus(p)),onKeyDown:$(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){d.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const v=Op(w,d.orientation,d.dir);if(v!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let E=m().filter(S=>S.focusable).map(S=>S.ref.current);if(v==="last")E.reverse();else if(v==="prev"||v==="next"){v==="prev"&&E.reverse();const S=E.indexOf(w.currentTarget);E=d.loop?Pp(E,S+1):E.slice(S+1)}setTimeout(()=>ei(E))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:g!=null}):a})})});Qa.displayName=Ja;var Np={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function kp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Op(e,t,n){const r=kp(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Np[r]}function ei(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Pp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Dp=Za,Ip=Qa,Pr=["Enter"," "],jp=["ArrowDown","PageUp","Home"],ti=["ArrowUp","PageDown","End"],Lp=[...jp,...ti],Fp={ltr:[...Pr,"ArrowRight"],rtl:[...Pr,"ArrowLeft"]},$p={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Rt="Menu",[Mt,Vp,Hp]=Ka(Rt),[Qe,ni]=Xe(Rt,[Hp,dn,Xa]),At=dn(),ri=Xa(),[oi,Ue]=Qe(Rt),[zp,Tt]=Qe(Rt),si=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,i=At(t),[c,p]=l.useState(null),d=l.useRef(!1),f=_e(s),m=Ya(o);return l.useEffect(()=>{const h=()=>{d.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>d.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),u.jsx(Rr,{...i,children:u.jsx(oi,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:p,children:u.jsx(zp,{scope:t,onClose:l.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:m,modal:a,children:r})})})};si.displayName=Rt;var Wp="MenuAnchor",Dr=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=At(n);return u.jsx(ba,{...o,...r,ref:t})});Dr.displayName=Wp;var Ir="MenuPortal",[Gp,ai]=Qe(Ir,{forceMount:void 0}),ii=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Ue(Ir,t);return u.jsx(Gp,{scope:t,forceMount:n,children:u.jsx(Ie,{present:n||s.open,children:u.jsx(qn,{asChild:!0,container:o,children:r})})})};ii.displayName=Ir;var be="MenuContent",[Bp,jr]=Qe(be),ci=l.forwardRef((e,t)=>{const n=ai(be,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ue(be,e.__scopeMenu),a=Tt(be,e.__scopeMenu);return u.jsx(Mt.Provider,{scope:e.__scopeMenu,children:u.jsx(Ie,{present:r||s.open,children:u.jsx(Mt.Slot,{scope:e.__scopeMenu,children:a.modal?u.jsx(Up,{...o,ref:t}):u.jsx(Kp,{...o,ref:t})})})})}),Up=l.forwardRef((e,t)=>{const n=Ue(be,e.__scopeMenu),r=l.useRef(null),o=ie(t,r);return l.useEffect(()=>{const s=r.current;if(s)return ws(s)},[]),u.jsx(Lr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:$(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Kp=l.forwardRef((e,t)=>{const n=Ue(be,e.__scopeMenu);return u.jsx(Lr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Yp=et("MenuContent.ScrollLock"),Lr=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:c,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:h,disableOutsideScroll:b,...g}=e,w=Ue(be,n),v=Tt(be,n),x=At(n),E=ri(n),S=Vp(n),[_,T]=l.useState(null),M=l.useRef(null),C=ie(t,M,w.onContentChange),j=l.useRef(0),L=l.useRef(""),U=l.useRef(0),B=l.useRef(null),z=l.useRef("right"),W=l.useRef(0),X=b?tr:l.Fragment,V=b?{as:Yp,allowPinchZoom:!0}:void 0,K=N=>{var Y,ee;const y=L.current+N,P=S().filter(te=>!te.disabled),F=document.activeElement,H=(Y=P.find(te=>te.ref.current===F))==null?void 0:Y.textValue,Z=P.map(te=>te.textValue),ne=am(Z,y,H),ue=(ee=P.find(te=>te.textValue===ne))==null?void 0:ee.ref.current;(function te(ae){L.current=ae,window.clearTimeout(j.current),ae!==""&&(j.current=window.setTimeout(()=>te(""),1e3))})(y),ue&&setTimeout(()=>ue.focus())};l.useEffect(()=>()=>window.clearTimeout(j.current),[]),os();const R=l.useCallback(N=>{var P,F;return z.current===((P=B.current)==null?void 0:P.side)&&cm(N,(F=B.current)==null?void 0:F.area)},[]);return u.jsx(Bp,{scope:n,searchRef:L,onItemEnter:l.useCallback(N=>{R(N)&&N.preventDefault()},[R]),onItemLeave:l.useCallback(N=>{var y;R(N)||((y=M.current)==null||y.focus(),T(null))},[R]),onTriggerLeave:l.useCallback(N=>{R(N)&&N.preventDefault()},[R]),pointerGraceTimerRef:U,onPointerGraceIntentChange:l.useCallback(N=>{B.current=N},[]),children:u.jsx(X,{...V,children:u.jsx(Yn,{asChild:!0,trapped:o,onMountAutoFocus:$(s,N=>{var y;N.preventDefault(),(y=M.current)==null||y.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:u.jsx(Gt,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:h,children:u.jsx(Dp,{asChild:!0,...E,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:T,onEntryFocus:$(c,N=>{v.isUsingKeyboardRef.current||N.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(wa,{role:"menu","aria-orientation":"vertical","data-state":Ri(w.open),"data-radix-menu-content":"",dir:v.dir,...x,...g,ref:C,style:{outline:"none",...g.style},onKeyDown:$(g.onKeyDown,N=>{const P=N.target.closest("[data-radix-menu-content]")===N.currentTarget,F=N.ctrlKey||N.altKey||N.metaKey,H=N.key.length===1;P&&(N.key==="Tab"&&N.preventDefault(),!F&&H&&K(N.key));const Z=M.current;if(N.target!==Z||!Lp.includes(N.key))return;N.preventDefault();const ue=S().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);ti.includes(N.key)&&ue.reverse(),om(ue)}),onBlur:$(e.onBlur,N=>{N.currentTarget.contains(N.target)||(window.clearTimeout(j.current),L.current="")}),onPointerMove:$(e.onPointerMove,kt(N=>{const y=N.target,P=W.current!==N.clientX;if(N.currentTarget.contains(y)&&P){const F=N.clientX>W.current?"right":"left";z.current=F,W.current=N.clientX}}))})})})})})})});ci.displayName=be;var qp="MenuGroup",Fr=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(re.div,{role:"group",...r,ref:t})});Fr.displayName=qp;var Xp="MenuLabel",li=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(re.div,{...r,ref:t})});li.displayName=Xp;var hn="MenuItem",ui="menu.itemSelect",gn=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=l.useRef(null),a=Tt(hn,e.__scopeMenu),i=jr(hn,e.__scopeMenu),c=ie(t,s),p=l.useRef(!1),d=()=>{const f=s.current;if(!n&&f){const m=new CustomEvent(ui,{bubbles:!0,cancelable:!0});f.addEventListener(ui,h=>r==null?void 0:r(h),{once:!0}),Bo(f,m),m.defaultPrevented?p.current=!1:a.onClose()}};return u.jsx(di,{...o,ref:c,disabled:n,onClick:$(e.onClick,d),onPointerDown:f=>{var m;(m=e.onPointerDown)==null||m.call(e,f),p.current=!0},onPointerUp:$(e.onPointerUp,f=>{var m;p.current||(m=f.currentTarget)==null||m.click()}),onKeyDown:$(e.onKeyDown,f=>{const m=i.searchRef.current!=="";n||m&&f.key===" "||Pr.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});gn.displayName=hn;var di=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=jr(hn,n),i=ri(n),c=l.useRef(null),p=ie(t,c),[d,f]=l.useState(!1),[m,h]=l.useState("");return l.useEffect(()=>{const b=c.current;b&&h((b.textContent??"").trim())},[s.children]),u.jsx(Mt.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:u.jsx(Ip,{asChild:!0,...i,focusable:!r,children:u.jsx(re.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:p,onPointerMove:$(e.onPointerMove,kt(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:$(e.onPointerLeave,kt(b=>a.onItemLeave(b))),onFocus:$(e.onFocus,()=>f(!0)),onBlur:$(e.onBlur,()=>f(!1))})})})}),Zp="MenuCheckboxItem",fi=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return u.jsx(vi,{scope:e.__scopeMenu,checked:n,children:u.jsx(gn,{role:"menuitemcheckbox","aria-checked":vn(n)?"mixed":n,...o,ref:t,"data-state":Hr(n),onSelect:$(o.onSelect,()=>r==null?void 0:r(vn(n)?!0:!n),{checkForDefaultPrevented:!1})})})});fi.displayName=Zp;var pi="MenuRadioGroup",[Jp,Qp]=Qe(pi,{value:void 0,onValueChange:()=>{}}),mi=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=_e(r);return u.jsx(Jp,{scope:e.__scopeMenu,value:n,onValueChange:s,children:u.jsx(Fr,{...o,ref:t})})});mi.displayName=pi;var hi="MenuRadioItem",gi=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=Qp(hi,e.__scopeMenu),s=n===o.value;return u.jsx(vi,{scope:e.__scopeMenu,checked:s,children:u.jsx(gn,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Hr(s),onSelect:$(r.onSelect,()=>{var a;return(a=o.onValueChange)==null?void 0:a.call(o,n)},{checkForDefaultPrevented:!1})})})});gi.displayName=hi;var $r="MenuItemIndicator",[vi,em]=Qe($r,{checked:!1}),bi=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=em($r,n);return u.jsx(Ie,{present:r||vn(s.checked)||s.checked===!0,children:u.jsx(re.span,{...o,ref:t,"data-state":Hr(s.checked)})})});bi.displayName=$r;var tm="MenuSeparator",wi=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(re.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});wi.displayName=tm;var nm="MenuArrow",xi=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=At(n);return u.jsx(xa,{...o,...r,ref:t})});xi.displayName=nm;var Vr="MenuSub",[rm,yi]=Qe(Vr),Ci=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=Ue(Vr,t),a=At(t),[i,c]=l.useState(null),[p,d]=l.useState(null),f=_e(o);return l.useEffect(()=>(s.open===!1&&f(!1),()=>f(!1)),[s.open,f]),u.jsx(Rr,{...a,children:u.jsx(oi,{scope:t,open:r,onOpenChange:f,content:p,onContentChange:d,children:u.jsx(rm,{scope:t,contentId:De(),triggerId:De(),trigger:i,onTriggerChange:c,children:n})})})};Ci.displayName=Vr;var Nt="MenuSubTrigger",Ei=l.forwardRef((e,t)=>{const n=Ue(Nt,e.__scopeMenu),r=Tt(Nt,e.__scopeMenu),o=yi(Nt,e.__scopeMenu),s=jr(Nt,e.__scopeMenu),a=l.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:c}=s,p={__scopeMenu:e.__scopeMenu},d=l.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return l.useEffect(()=>d,[d]),l.useEffect(()=>{const f=i.current;return()=>{window.clearTimeout(f),c(null)}},[i,c]),u.jsx(Dr,{asChild:!0,...p,children:u.jsx(di,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Ri(n.open),...e,ref:$t(t,o.onTriggerChange),onClick:f=>{var m;(m=e.onClick)==null||m.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:$(e.onPointerMove,kt(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:$(e.onPointerLeave,kt(f=>{var h,b;d();const m=(h=n.content)==null?void 0:h.getBoundingClientRect();if(m){const g=(b=n.content)==null?void 0:b.dataset.side,w=g==="right",v=w?-5:5,x=m[w?"left":"right"],E=m[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+v,y:f.clientY},{x,y:m.top},{x:E,y:m.top},{x:E,y:m.bottom},{x,y:m.bottom}],side:g}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:$(e.onKeyDown,f=>{var h;const m=s.searchRef.current!=="";e.disabled||m&&f.key===" "||Fp[r.dir].includes(f.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),f.preventDefault())})})})});Ei.displayName=Nt;var Si="MenuSubContent",_i=l.forwardRef((e,t)=>{const n=ai(be,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ue(be,e.__scopeMenu),a=Tt(be,e.__scopeMenu),i=yi(Si,e.__scopeMenu),c=l.useRef(null),p=ie(t,c);return u.jsx(Mt.Provider,{scope:e.__scopeMenu,children:u.jsx(Ie,{present:r||s.open,children:u.jsx(Mt.Slot,{scope:e.__scopeMenu,children:u.jsx(Lr,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:p,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;a.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:$(e.onFocusOutside,d=>{d.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:$(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:$(e.onKeyDown,d=>{var h;const f=d.currentTarget.contains(d.target),m=$p[a.dir].includes(d.key);f&&m&&(s.onOpenChange(!1),(h=i.trigger)==null||h.focus(),d.preventDefault())})})})})})});_i.displayName=Si;function Ri(e){return e?"open":"closed"}function vn(e){return e==="indeterminate"}function Hr(e){return vn(e)?"indeterminate":e?"checked":"unchecked"}function om(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function sm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function am(e,t,n){const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=sm(e,Math.max(s,0));o.length===1&&(a=a.filter(p=>p!==n));const c=a.find(p=>p.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function im(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],p=i.x,d=i.y,f=c.x,m=c.y;d>r!=m>r&&n<(f-p)*(r-d)/(m-d)+p&&(o=!o)}return o}function cm(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return im(n,t)}function kt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var lm=si,um=Dr,dm=ii,fm=ci,pm=Fr,mm=li,hm=gn,gm=fi,vm=mi,bm=gi,wm=bi,xm=wi,ym=xi,Cm=Ci,Em=Ei,Sm=_i,bn="DropdownMenu",[_m,L0]=Xe(bn,[ni]),pe=ni(),[Rm,Mi]=_m(bn),Ai=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,c=pe(t),p=l.useRef(null),[d,f]=wt({prop:o,defaultProp:s??!1,onChange:a,caller:bn});return u.jsx(Rm,{scope:t,triggerId:De(),triggerRef:p,contentId:De(),open:d,onOpenChange:f,onOpenToggle:l.useCallback(()=>f(m=>!m),[f]),modal:i,children:u.jsx(lm,{...c,open:d,onOpenChange:f,dir:r,modal:i,children:n})})};Ai.displayName=bn;var Ti="DropdownMenuTrigger",Ni=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Mi(Ti,n),a=pe(n);return u.jsx(um,{asChild:!0,...a,children:u.jsx(re.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:$t(t,s.triggerRef),onPointerDown:$(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:$(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Ni.displayName=Ti;var Mm="DropdownMenuPortal",ki=e=>{const{__scopeDropdownMenu:t,...n}=e,r=pe(t);return u.jsx(dm,{...r,...n})};ki.displayName=Mm;var Oi="DropdownMenuContent",Pi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Mi(Oi,n),s=pe(n),a=l.useRef(!1);return u.jsx(fm,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:$(e.onCloseAutoFocus,i=>{var c;a.current||(c=o.triggerRef.current)==null||c.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:$(e.onInteractOutside,i=>{const c=i.detail.originalEvent,p=c.button===0&&c.ctrlKey===!0,d=c.button===2||p;(!o.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Pi.displayName=Oi;var Am="DropdownMenuGroup",Di=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=pe(n);return u.jsx(pm,{...o,...r,ref:t})});Di.displayName=Am;var Tm="DropdownMenuLabel",Ii=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=pe(n);return u.jsx(mm,{...o,...r,ref:t})});Ii.displayName=Tm;var Nm="DropdownMenuItem",ji=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=pe(n);return u.jsx(hm,{...o,...r,ref:t})});ji.displayName=Nm;var km="DropdownMenuCheckboxItem",Li=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=pe(n);return u.jsx(gm,{...o,...r,ref:t})});Li.displayName=km;var Om="DropdownMenuRadioGroup",Fi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=pe(n);return u.jsx(vm,{...o,...r,ref:t})});Fi.displayName=Om;var Pm="DropdownMenuRadioItem",$i=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=pe(n);return u.jsx(bm,{...o,...r,ref:t})});$i.displayName=Pm;var Dm="DropdownMenuItemIndicator",Vi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=pe(n);return u.jsx(wm,{...o,...r,ref:t})});Vi.displayName=Dm;var Im="DropdownMenuSeparator",Hi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=pe(n);return u.jsx(xm,{...o,...r,ref:t})});Hi.displayName=Im;var jm="DropdownMenuArrow",Lm=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=pe(n);return u.jsx(ym,{...o,...r,ref:t})});Lm.displayName=jm;var Fm=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,a=pe(t),[i,c]=wt({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return u.jsx(Cm,{...a,open:i,onOpenChange:c,children:n})},$m="DropdownMenuSubTrigger",zi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=pe(n);return u.jsx(Em,{...o,...r,ref:t})});zi.displayName=$m;var Vm="DropdownMenuSubContent",Wi=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=pe(n);return u.jsx(Sm,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Wi.displayName=Vm;var Hm=Ai,zm=Ni,Gi=ki,Wm=Pi,Gm=Di,Bm=Ii,Um=ji,Km=Li,Ym=Fi,qm=$i,Bi=Vi,Xm=Hi,Zm=Fm,Jm=zi,Qm=Wi;function Ui({...e}){return u.jsx(Hm,{"data-slot":"dropdown-menu",...e})}function e0({...e}){return u.jsx(Gi,{"data-slot":"dropdown-menu-portal",...e})}function Ki({...e}){return u.jsx(zm,{"data-slot":"dropdown-menu-trigger",...e})}function Yi({className:e,sideOffset:t=4,...n}){return u.jsx(Gi,{children:u.jsx(Wm,{"data-slot":"dropdown-menu-content",sideOffset:t,className:D("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function t0({...e}){return u.jsx(Gm,{"data-slot":"dropdown-menu-group",...e})}function zr({className:e,inset:t,variant:n="default",...r}){return u.jsx(Um,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:D("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function n0({className:e,children:t,checked:n,...r}){return u.jsxs(Km,{"data-slot":"dropdown-menu-checkbox-item",className:D("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[u.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:u.jsx(Bi,{children:u.jsx(Qc,{className:"size-4"})})}),t]})}function r0({...e}){return u.jsx(Ym,{"data-slot":"dropdown-menu-radio-group",...e})}function o0({className:e,children:t,...n}){return u.jsxs(qm,{"data-slot":"dropdown-menu-radio-item",className:D("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[u.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:u.jsx(Bi,{children:u.jsx(nl,{className:"size-2 fill-current"})})}),t]})}function qi({className:e,inset:t,...n}){return u.jsx(Bm,{"data-slot":"dropdown-menu-label","data-inset":t,className:D("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function Xi({className:e,...t}){return u.jsx(Xm,{"data-slot":"dropdown-menu-separator",className:D("bg-border -mx-1 my-1 h-px",e),...t})}function s0({className:e,...t}){return u.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:D("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function a0({...e}){return u.jsx(Zm,{"data-slot":"dropdown-menu-sub",...e})}function i0({className:e,inset:t,children:n,...r}){return u.jsxs(Jm,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:D("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...r,children:[n,u.jsx(yo,{className:"ml-auto size-4"})]})}function c0({className:e,...t}){return u.jsx(Qm,{"data-slot":"dropdown-menu-sub-content",className:D("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}const l0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20141%2060'%3e%3cpath%20d='M0.059%2019.711V59.673H19.509V49.95H9.779V19.711H0.059Z'%20fill='%2385B9D1'%3e%3c/path%3e%3cpath%20d='M0%200L0.056%204.915V19.715H9.776V9.715H19.5V59.673H29.22V0H0Z'%20fill='%23F68029'%3e%3c/path%3e%3cpath%20d='M23.49%2019.717H9.776V29.439H23.49V19.717Z'%20fill='%23F68029'%3e%3c/path%3e%3cpath%20d='M0.0580006%2019.718L9.785%2029.445V19.718H0.0580006Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M9.777%2049.953L19.504%2059.679V49.953H9.777Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M50.213%2021.331C50.1839%2019.244%2050.325%2017.1581%2050.635%2015.094C50.8293%2013.6891%2051.2694%2012.3294%2051.935%2011.077C52.4295%2010.1519%2053.1979%209.4023%2054.135%208.93101C55.1033%208.49691%2056.1561%208.28375%2057.217%208.307C58.2628%208.27673%2059.3024%208.47715%2060.262%208.894C61.1441%209.33605%2061.8541%2010.059%2062.28%2010.949C62.8725%2012.1976%2063.2507%2013.5369%2063.399%2014.911C63.6554%2016.9922%2063.7717%2019.0882%2063.747%2021.185C63.7759%2023.338%2063.6421%2025.4901%2063.347%2027.623C63.1657%2029.0675%2062.7378%2030.4702%2062.082%2031.77C61.6022%2032.7122%2060.8471%2033.4862%2059.917%2033.989C58.9503%2034.4507%2057.888%2034.6768%2056.817%2034.649C55.7687%2034.6771%2054.7258%2034.4896%2053.753%2034.098C52.8534%2033.6775%2052.1275%2032.9579%2051.699%2032.062C51.0884%2030.7803%2050.7037%2029.4027%2050.562%2027.99C50.3018%2025.7802%2050.1852%2023.5559%2050.213%2021.331ZM54.913%2022.248C54.913%2023.6913%2054.9377%2024.9267%2054.987%2025.954C55.0147%2026.8043%2055.1127%2027.6509%2055.28%2028.485C55.3666%2029.0149%2055.5877%2029.5138%2055.922%2029.934C56.0643%2030.0868%2056.238%2030.207%2056.4312%2030.2862C56.6244%2030.3655%2056.8324%2030.4019%2057.041%2030.393C57.25%2030.3964%2057.4571%2030.3533%2057.6473%2030.2668C57.8375%2030.1803%2058.0062%2030.0526%2058.141%2029.893C58.4964%2029.4241%2058.7297%2028.8744%2058.82%2028.293C59.0025%2027.3609%2059.1128%2026.4161%2059.15%2025.467C59.2107%2024.3177%2059.2414%2022.936%2059.242%2021.322C59.242%2019.732%2059.224%2018.3747%2059.188%2017.25C59.169%2016.3373%2059.0736%2015.4278%2058.903%2014.531C58.8198%2013.9744%2058.5923%2013.4493%2058.243%2013.008C58.0929%2012.8491%2057.9104%2012.7244%2057.7078%2012.6422C57.5053%2012.5601%2057.2874%2012.5225%2057.069%2012.532C56.8667%2012.5304%2056.6668%2012.576%2056.4852%2012.6652C56.3036%2012.7544%2056.1453%2012.8848%2056.023%2013.046C55.6766%2013.5389%2055.4446%2014.103%2055.344%2014.697C55.1442%2015.6885%2055.0277%2016.695%2054.996%2017.706C54.9347%2018.9533%2054.904%2020.4697%2054.904%2022.255'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M83.329%2021.331C83.2999%2019.244%2083.441%2017.1581%2083.751%2015.094C83.9453%2013.6891%2084.3854%2012.3294%2085.051%2011.077C85.5455%2010.1519%2086.3139%209.40235%2087.251%208.93105C89.2087%208.112%2091.4106%208.09871%2093.378%208.89405C94.2601%209.33609%2094.9701%2010.0591%2095.396%2010.949C95.9885%2012.1976%2096.3667%2013.537%2096.515%2014.911C96.7714%2016.9922%2096.8877%2019.0883%2096.863%2021.185C96.8919%2023.3381%2096.7581%2025.4902%2096.463%2027.6231C96.2817%2029.0676%2095.8538%2030.4703%2095.198%2031.77C94.7182%2032.7123%2093.9631%2033.4862%2093.033%2033.989C92.0663%2034.4507%2091.004%2034.6769%2089.933%2034.649C88.8847%2034.6772%2087.8418%2034.4896%2086.869%2034.098C85.9694%2033.6775%2085.2435%2032.9579%2084.815%2032.062C84.2044%2030.7803%2083.8197%2029.4027%2083.678%2027.99C83.4178%2025.7803%2083.3012%2023.5559%2083.329%2021.331ZM88.029%2022.2481C88.029%2023.6914%2088.0537%2024.9267%2088.103%2025.954C88.1307%2026.8044%2088.2287%2027.6509%2088.396%2028.4851C88.4826%2029.015%2088.7037%2029.5139%2089.038%2029.934C89.1803%2030.0869%2089.354%2030.207%2089.5472%2030.2863C89.7404%2030.3655%2089.9484%2030.4019%2090.157%2030.393C90.366%2030.3964%2090.573%2030.3533%2090.7633%2030.2669C90.9535%2030.1804%2091.1222%2030.0527%2091.257%2029.893C91.6124%2029.4242%2091.8458%2028.8744%2091.936%2028.2931C92.1185%2027.3609%2092.2288%2026.4161%2092.266%2025.467C92.3267%2024.3177%2092.3574%2022.936%2092.358%2021.322C92.358%2019.732%2092.34%2018.3747%2092.304%2017.2501C92.2887%2016.3329%2092.1964%2015.4187%2092.028%2014.517C91.9448%2013.9605%2091.7173%2013.4354%2091.368%2012.994C91.2162%2012.8368%2091.0323%2012.7141%2090.8289%2012.6343C90.6255%2012.5544%2090.4072%2012.5192%2090.189%2012.531C89.9867%2012.5294%2089.7868%2012.575%2089.6052%2012.6643C89.4236%2012.7535%2089.2653%2012.8839%2089.143%2013.045C88.7966%2013.5379%2088.5646%2014.102%2088.464%2014.6961C88.2642%2015.6876%2088.1477%2016.6941%2088.116%2017.705C88.0547%2018.9524%2088.024%2020.4687%2088.024%2022.254'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M131.349%2034.65V8.32202H135.458V30.797H140.631V34.649L131.349%2034.65Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M71.95%2034.65V8.33203H76.059V30.796H81.232V34.648L71.95%2034.65Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M104.833%2014.692C104.934%2014.098%20105.166%2013.534%20105.512%2013.041C105.634%2012.8798%20105.793%2012.7494%20105.974%2012.6602C106.156%2012.571%20106.356%2012.5253%20106.558%2012.527H110.103V8.30798H106.703C105.642%208.2848%20104.589%208.49794%20103.621%208.93197C102.684%209.40306%20101.915%2010.1527%20101.421%2011.078C100.756%2012.3304%20100.316%2013.6901%20100.121%2015.095C99.8114%2017.1591%2099.6706%2019.245%2099.7%2021.332C99.6722%2023.5568%2099.7885%2025.7811%20100.048%2027.991C100.19%2029.4037%20100.574%2030.7812%20101.185%2032.063C101.614%2032.9584%20102.34%2033.6778%20103.239%2034.099C104.212%2034.4899%20105.255%2034.6771%20106.303%2034.649L110.103%2034.613V30.393H106.522C106.313%2030.402%20106.105%2030.3657%20105.912%2030.2866C105.719%2030.2076%20105.545%2030.0876%20105.403%2029.935C105.069%2029.5144%20104.848%2029.0152%20104.761%2028.485C104.594%2027.6509%20104.496%2026.8043%20104.468%2025.954C104.419%2024.9266%20104.394%2023.6916%20104.394%2022.249C104.394%2020.4636%20104.425%2018.9473%20104.486%2017.7C104.518%2016.6894%20104.633%2015.6832%20104.833%2014.692Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M46.728%2019.247H42.878V30.395H41.828C41.6182%2030.4039%2041.409%2030.3669%2041.2149%2030.2868C41.0208%2030.2067%2040.8465%2030.0853%2040.704%2029.931C40.3695%2029.5106%2040.1485%2029.0113%2040.062%2028.481C39.894%2027.647%2039.7956%2026.8004%2039.768%2025.95C39.7187%2024.9227%2039.6944%2023.6877%2039.695%2022.245C39.695%2020.4597%2039.7257%2018.9434%2039.787%2017.696C39.8191%2016.6854%2039.9355%2015.6792%2040.135%2014.688C40.2357%2014.094%2040.4677%2013.53%2040.814%2013.037C40.9376%2012.8768%2041.0968%2012.7476%2041.2791%2012.6598C41.4614%2012.5719%2041.6617%2012.5278%2041.864%2012.531H45.904V8.31202H42.012C40.9511%208.28877%2039.8983%208.50191%2038.93%208.93601C37.9927%209.40699%2037.2241%2010.1567%2036.73%2011.082C36.0644%2012.3344%2035.6243%2013.6941%2035.43%2015.099C35.1189%2017.1613%2034.9764%2019.2456%2035.004%2021.331C34.9762%2023.5559%2035.0925%2025.7802%2035.352%2027.99C35.494%2029.4026%2035.8787%2030.7802%2036.489%2032.062C36.9179%2032.9579%2037.6442%2033.6775%2038.544%2034.098C39.517%2034.4891%2040.5598%2034.6763%2041.608%2034.648L43.587%2034.629H46.727L46.728%2019.247Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M123.653%2029.87H118L116.691%2034.65H112.797L120.939%208L128.793%2034.65H124.856L123.653%2029.87ZM122.587%2026.212L120.893%2019.982L119.085%2026.212H122.587Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M39.016%2041.436H37.059V54.507H39.016V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M44.559%2041.436H46.384L48.331%2046.651C48.919%2048.1937%2049.4198%2049.7682%2049.831%2051.367C49.6744%2050.357%2049.5584%2049.4427%2049.483%2048.624C49.4077%2047.8054%2049.37%2047.0347%2049.37%2046.312V41.436H51.336V54.511H49.495L47.303%2048.627C47.103%2048.0797%2046.9134%2047.518%2046.734%2046.942C46.5547%2046.366%2046.39%2045.762%2046.24%2045.13C46.2274%2045.0507%2046.207%2044.9547%2046.179%2044.842C46.151%2044.7293%2046.1177%2044.5997%2046.079%2044.453C46.098%2044.6%2046.114%2044.725%2046.126%2044.829C46.138%2044.933%2046.148%2045.022%2046.154%2045.095L46.254%2046.424L46.354%2048.041C46.36%2048.131%2046.365%2048.241%2046.368%2048.371C46.371%2048.501%2046.368%2048.648%2046.368%2048.811L46.468%2054.511H44.559V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M55.493%2041.436H61.861V42.977H59.67V54.511H57.751V42.977H55.493V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M65.828%2041.436H71.028V42.926H67.787V47.065H70.665V48.555H67.787V53.016H71.028V54.506H65.828V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M75.906%2041.436H78.483C79.3332%2041.3696%2080.1787%2041.6132%2080.863%2042.122C81.2131%2042.4774%2081.4826%2042.904%2081.6531%2043.3729C81.8236%2043.8417%2081.8911%2044.3418%2081.851%2044.839C81.8876%2045.6248%2081.7066%2046.4055%2081.328%2047.095C81.1685%2047.3665%2080.9531%2047.6008%2080.696%2047.7826C80.4389%2047.9643%2080.1461%2048.0892%2079.837%2048.149L82.509%2054.507H80.525L77.863%2048.107V54.507H75.906V41.436ZM77.863%2047.227C78.1485%2047.2893%2078.4451%2047.279%2078.7256%2047.1969C79.0061%2047.1148%2079.2615%2046.9637%2079.4684%2046.7573C79.6753%2046.5509%2079.8271%2046.2959%2079.9098%2046.0156C79.9926%2045.7353%2080.0036%2045.4387%2079.942%2045.153C79.9472%2044.8034%2079.9137%2044.4543%2079.842%2044.112C79.7909%2043.8589%2079.6851%2043.62%2079.532%2043.412C79.3909%2043.2304%2079.2018%2043.0918%2078.986%2043.012C78.7308%2042.9221%2078.4615%2042.8791%2078.191%2042.885H77.862L77.863%2047.227Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M90.046%2041.06L85.913%2054.514H87.745L88.45%2051.974H91.496L92.135%2054.531H94.028L90.046%2041.06ZM88.876%2050.403L90.013%2046.703L91.048%2050.415L88.876%2050.403Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M106.344%2041.436H112.712V42.977H110.52V54.511H108.602V42.977H106.344V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M118.865%2041.462H116.908V54.533H118.865V41.462Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M134.181%2041.462H139.381V42.952H136.136V47.093H139.014V48.583H136.136V53.044H139.381V54.534H134.181V41.462Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M99.749%2044.338C99.8046%2044.0109%2099.9338%2043.7008%20100.127%2043.431C100.202%2043.3322%20100.3%2043.2523%20100.411%2043.1976C100.523%2043.1429%20100.646%2043.115%20100.77%2043.116H102.464V41.207H100.846C100.318%2041.1955%2099.7949%2041.3011%2099.313%2041.516C98.8543%2041.748%2098.4782%2042.1157%2098.236%2042.569C97.9008%2043.2016%2097.6788%2043.888%2097.58%2044.597C97.4215%2045.6561%2097.3493%2046.7263%2097.364%2047.797C97.3503%2048.9393%2097.4101%2050.0814%2097.543%2051.216C97.6145%2051.9294%2097.808%2052.6252%2098.115%2053.273C98.3244%2053.7086%2098.6776%2054.0586%2099.115%2054.264C99.6001%2054.458%20100.12%2054.5509%20100.642%2054.537L102.469%2054.52V52.61H100.755C100.629%2052.6147%20100.503%2052.592%20100.386%2052.5435C100.269%2052.495%20100.164%2052.4218%20100.078%2052.329C99.8888%2052.0951%2099.7637%2051.816%2099.715%2051.519C99.6273%2051.081%2099.5758%2050.6365%2099.561%2050.19C99.536%2049.66%2099.523%2049.014%2099.523%2048.27C99.523%2047.349%2099.539%2046.557%2099.57%2045.916C99.5873%2045.3865%2099.6485%2044.8594%2099.753%2044.34'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M128.799%2041.466L126.671%2048.91L124.671%2041.466H122.679L126.654%2054.953L130.774%2041.466H128.799Z'%20fill='%230A3763'%3e%3c/path%3e%3c/svg%3e";function u0(){const[e,t]=I.useState("");return I.useEffect(()=>{t(window.location.pathname);const r=()=>{t(window.location.pathname)},o=()=>{t(window.location.pathname)};return window.addEventListener("popstate",r),window.addEventListener("pushstate",o),window.addEventListener("replacestate",o),()=>{window.removeEventListener("popstate",r),window.removeEventListener("pushstate",o),window.removeEventListener("replacestate",o)}},[]),{currentPath:e,isActiveRoute:r=>!!(e===r||r!=="/"&&e.startsWith(r))}}const Zi=I.createContext(void 0),Ji=()=>{const e=I.useContext(Zi);if(e===void 0)throw new Error("usePermissions must be used within PermissionsProvider");return e};function d0({children:e}){const[t,n]=I.useState({essentialInsights:!1,priceMonster:!1,web:!1});return I.useEffect(()=>{fetch("/api/auth/permissions").then(r=>r.json()).then(r=>{const o=(r==null?void 0:r.userData)||{};n({essentialInsights:!!o.essentialInsights,priceMonster:!!o.priceMonster,web:!!o.web})}).catch(r=>console.error("Error fetching product access:",r))},[]),u.jsx(Zi.Provider,{value:t,children:e})}const f0={navMain:[{title:"Essential Insights",key:"essentialInsights",url:"/essential-insights/overall-performance",icon:u.jsx(Jc,{className:"h-5 w-5"}),items:[{title:"Overall Performance",url:"/essential-insights/overall-performance",icon:u.jsx(Co,{className:"h-4 w-4"})},{title:"Organic Performance",url:"/essential-insights/organic-performance",icon:u.jsx(xo,{className:"h-4 w-4"})},{title:"Paid Performance",url:"/essential-insights/paid-performance",icon:u.jsx(Zc,{className:"h-4 w-4"})},{title:"Keyword Performance",url:"/essential-insights/keyword-performance",icon:u.jsx(xo,{className:"h-4 w-4"})},{title:"More Components",url:"/essential-insights/more-components",icon:u.jsx(Ft,{className:"h-4 w-4"})}]},{title:"Price Monster",key:"priceMonster",url:"/price-monster",icon:u.jsx(tl,{className:"h-4 w-4"}),items:[{title:"Dashboard",url:"/price-monster/dashboard",icon:u.jsx(Ft,{className:"h-4 w-4"})},{title:"Documentation",url:"/price-monster/documentation",icon:u.jsx(qc,{className:"h-4 w-4"})},{title:"Subscriptions",url:"/price-monster/subscriptions",icon:u.jsx(Xc,{className:"h-4 w-4"})}]},{title:"CMS",key:"web",url:"/cms",icon:u.jsx(Ft,{className:"h-4 w-4"}),items:[{title:"Dashboard",url:"/cms/dashboard",icon:u.jsx(Ft,{className:"h-4 w-4"})}]}]};function p0({...e}){const{isActiveRoute:t}=u0(),n=Ji();return u.jsxs(Ia,{...e,children:[u.jsx($a,{children:u.jsx("div",{className:"relative h-12 w-32 overflow-hidden",children:u.jsx("img",{src:l0,alt:"GLI Logo",className:"h-full w-full object-contain"})})}),u.jsxs(Va,{children:[u.jsx("div",{className:"relative flex w-full min-w-0 flex-col px-2 py-1",children:u.jsx("div",{className:"flex flex-col",children:u.jsxs("a",{href:"/",className:D("flex cursor-pointer items-center gap-2 rounded-lg px-2 py-2 transition-colors","hover:bg-gray-100",t("/")&&"bg-blue-50 text-gli-bluedark font-medium"),children:[u.jsx(Co,{className:D("h-5 w-5",t("/")?"text-gli-bluedark":"text-gray-600")}),u.jsx("span",{children:"Home"})]})})}),f0.navMain.map(r=>{const o=!r.key||n[r.key],s=o&&(t(r.url)||r.items.some(a=>t(a.url)));return u.jsx(Ua,{title:r.title,url:o?r.url:void 0,icon:r.icon,isActive:s,children:u.jsx(za,{children:u.jsx(Wa,{children:r.items.map(a=>{const i=o&&t(a.url);return u.jsx(Ga,{children:u.jsx(Ba,{asChild:!0,children:u.jsxs("a",{href:o?a.url:void 0,className:D("flex items-center gap-2 pl-4 transition-colors",o?"text-muted-foreground hover:bg-muted hover:text-foreground":"text-gray-400 cursor-not-allowed opacity-50",i&&"bg-blue-50 text-gli-bluedark font-medium"),onClick:c=>{o||c.preventDefault()},children:[u.jsx("span",{className:D(i?"text-gli-bluedark":o?"text-muted-foreground":"text-gray-400"),children:a.icon}),u.jsx("span",{className:D(i?"text-gli-bluedark":o?"text-muted-foreground":"text-gray-400"),children:a.title})]})})},a.title)})})})},r.title)})]}),u.jsx(La,{})]})}const Qi=({onLogout:e})=>{const{user:t,error:n,isLoading:r}=zc(),o=async()=>{try{e&&await e(),window.location.href="/auth/logout"}catch(s){console.error("Error during logout:",s),window.location.href="/auth/logout"}};return r?u.jsx("div",{className:"h-10 w-10 animate-pulse rounded-full bg-gray-200"}):n?u.jsxs("div",{children:["Error: ",n.message]}):t?u.jsx("div",{className:"relative flex items-center gap-3",children:u.jsxs(Ui,{children:[u.jsx(Ki,{asChild:!0,children:u.jsx(zt,{variant:"ghost",size:"lg",className:"rounded-full cursor-pointer p-0",children:t.picture?u.jsx("img",{src:t.picture,alt:t.name||"User profile",width:40,height:40,className:"rounded-full"}):u.jsx(Eo,{className:"h-5 w-5 text-gray-500"})})}),u.jsxs(Yi,{align:"end",className:"w-72",children:[u.jsx(qi,{children:u.jsx("div",{className:"flex flex-col space-y-1",children:u.jsxs("div",{className:"flex flex-col space-y-1",children:[u.jsx("p",{className:"text-xs text-gray-500",children:t.name}),u.jsx("p",{className:"truncate text-xs text-gray-500",children:t.email})]})})}),u.jsx(Xi,{}),u.jsx(zr,{asChild:!0,children:u.jsxs("a",{href:"/profile",className:"flex w-full cursor-default",children:[u.jsx(Eo,{className:"mr-2 h-4 w-4"}),u.jsx("span",{children:"Profile"})]})}),u.jsxs(zr,{onClick:o,children:[u.jsx(rl,{className:"mr-2 h-4 w-4"}),u.jsx("span",{children:"Sign out"})]})]})]})}):null},ec=({onLogout:e})=>u.jsx("div",{className:"sticky top-0 z-50 bg-white",children:u.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-white px-4",children:[u.jsxs("div",{className:"flex h-full items-center gap-4 flex-1 min-w-0 overflow-hidden",children:[u.jsx(ja,{}),u.jsx(Wt,{orientation:"vertical"})]}),u.jsx("div",{className:"flex-shrink-0",children:u.jsx(Qi,{onLogout:e})})]})}),m0=({children:e,onLogout:t})=>u.jsx(Wc,{children:u.jsx(Da,{children:u.jsxs("div",{className:"flex h-screen w-full",children:[u.jsx(p0,{}),u.jsxs(Fa,{className:"flex-1 flex flex-col min-w-0",children:[u.jsx(ec,{onLogout:t}),u.jsx("main",{className:"flex-1 bg-white overflow-auto",id:"page-content",children:e})]})]})})});A.AppHeader=ec,A.Button=zt,A.Card=Gl,A.CardAction=Yl,A.CardContent=ql,A.CardDescription=Kl,A.CardFooter=Xl,A.CardHeader=Bl,A.CardTitle=Ul,A.CollapsibleSection=Ua,A.DropdownMenu=Ui,A.DropdownMenuCheckboxItem=n0,A.DropdownMenuContent=Yi,A.DropdownMenuGroup=t0,A.DropdownMenuItem=zr,A.DropdownMenuLabel=qi,A.DropdownMenuPortal=e0,A.DropdownMenuRadioGroup=r0,A.DropdownMenuRadioItem=o0,A.DropdownMenuSeparator=Xi,A.DropdownMenuShortcut=s0,A.DropdownMenuSub=a0,A.DropdownMenuSubContent=c0,A.DropdownMenuSubTrigger=i0,A.DropdownMenuTrigger=Ki,A.GLICloudProvider=m0,A.Input=Gn,A.PermissionsProvider=d0,A.ProfileDropdown=Qi,A.Separator=Wt,A.Sheet=Hs,A.SheetClose=Rd,A.SheetContent=ir,A.SheetDescription=ur,A.SheetFooter=Ws,A.SheetHeader=cr,A.SheetOverlay=ar,A.SheetPortal=zs,A.SheetTitle=lr,A.SheetTrigger=_d,A.Sidebar=Ia,A.SidebarContent=Va,A.SidebarFooter=fp,A.SidebarGroup=Ha,A.SidebarGroupAction=hp,A.SidebarGroupContent=za,A.SidebarGroupLabel=mp,A.SidebarHeader=$a,A.SidebarInput=dp,A.SidebarInset=Fa,A.SidebarMenu=gp,A.SidebarMenuAction=xp,A.SidebarMenuBadge=yp,A.SidebarMenuButton=wp,A.SidebarMenuItem=vp,A.SidebarMenuSkeleton=Cp,A.SidebarMenuSub=Wa,A.SidebarMenuSubButton=Ba,A.SidebarMenuSubItem=Ga,A.SidebarProvider=Da,A.SidebarRail=La,A.SidebarSeparator=pp,A.SidebarTrigger=ja,A.Skeleton=dr,A.Tooltip=ka,A.TooltipContent=Nr,A.TooltipProvider=Na,A.TooltipTrigger=Oa,A.buttonVariants=Go,A.usePermissions=Ji,A.useSidebar=St,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
182
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return _.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},yb="DialogDescriptionWarning",wb=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${vu(yb).contentName}}.`;return _.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},vb=au,Eb=cu,_b=lu,Eu=du,_u=fu,Su=pu,xu=gu,Au=yu;const Ru=vb,Sb=Eb,xb=Au,Cu=_b,rs=_.forwardRef(({className:e,...t},n)=>S.jsx(Eu,{className:z("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));rs.displayName=Eu.displayName;const Ab=Do("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),os=_.forwardRef(({side:e="right",className:t,children:n,...r},o)=>S.jsxs(Cu,{children:[S.jsx(rs,{}),S.jsxs(_u,{ref:o,className:z(Ab({side:e}),t),...r,children:[n,S.jsxs(Au,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[S.jsx(rm,{className:"h-4 w-4"}),S.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));os.displayName=_u.displayName;const ss=({className:e,...t})=>S.jsx("div",{className:z("flex flex-col space-y-2 text-center sm:text-left",e),...t});ss.displayName="SheetHeader";const Tu=({className:e,...t})=>S.jsx("div",{className:z("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Tu.displayName="SheetFooter";const as=_.forwardRef(({className:e,...t},n)=>S.jsx(Su,{ref:n,className:z("text-lg font-semibold text-foreground",e),...t}));as.displayName=Su.displayName;const is=_.forwardRef(({className:e,...t},n)=>S.jsx(xu,{ref:n,className:z("text-sm text-muted-foreground",e),...t}));is.displayName=xu.displayName;function cs({className:e,...t}){return S.jsx("div",{className:z("animate-pulse rounded-md bg-muted",e),...t})}const Rb=["top","right","bottom","left"],Tt=Math.min,ze=Math.max,Rr=Math.round,Cr=Math.floor,it=e=>({x:e,y:e}),Cb={left:"right",right:"left",bottom:"top",top:"bottom"},Tb={start:"end",end:"start"};function us(e,t,n){return ze(e,Tt(t,n))}function wt(e,t){return typeof e=="function"?e(t):e}function vt(e){return e.split("-")[0]}function ln(e){return e.split("-")[1]}function ls(e){return e==="x"?"y":"x"}function ds(e){return e==="y"?"height":"width"}function ct(e){return["top","bottom"].includes(vt(e))?"y":"x"}function fs(e){return ls(ct(e))}function Pb(e,t,n){n===void 0&&(n=!1);const r=ln(e),o=fs(e),s=ds(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Tr(a)),[a,Tr(a)]}function Ob(e){const t=Tr(e);return[hs(e),t,hs(t)]}function hs(e){return e.replace(/start|end/g,t=>Tb[t])}function kb(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:a;default:return[]}}function Nb(e,t,n,r){const o=ln(e);let s=kb(vt(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(hs)))),s}function Tr(e){return e.replace(/left|right|bottom|top/g,t=>Cb[t])}function Ib(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pu(e){return typeof e!="number"?Ib(e):{top:e,right:e,bottom:e,left:e}}function Pr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ou(e,t,n){let{reference:r,floating:o}=e;const s=ct(t),a=fs(t),i=ds(a),c=vt(t),u=s==="y",l=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[i]/2-o[i]/2;let m;switch(c){case"top":m={x:l,y:r.y-o.height};break;case"bottom":m={x:l,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(ln(t)){case"start":m[a]-=h*(n&&u?-1:1);break;case"end":m[a]+=h*(n&&u?-1:1);break}return m}const Db=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:d}=Ou(u,r,c),h=r,m={},E=0;for(let y=0;y<i.length;y++){const{name:g,fn:p}=i[y],{x:b,y:f,data:A,reset:v}=await p({x:l,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});l=b??l,d=f??d,m={...m,[g]:{...m[g],...A}},v&&E<=50&&(E++,typeof v=="object"&&(v.placement&&(h=v.placement),v.rects&&(u=v.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):v.rects),{x:l,y:d}=Ou(u,h,c)),y=-1)}return{x:l,y:d,placement:h,strategy:o,middlewareData:m}};async function Dn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:h=!1,padding:m=0}=wt(t,e),E=Pu(m),g=i[h?d==="floating"?"reference":"floating":d],p=Pr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:u,rootBoundary:l,strategy:c})),b=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,f=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),A=await(s.isElement==null?void 0:s.isElement(f))?await(s.getScale==null?void 0:s.getScale(f))||{x:1,y:1}:{x:1,y:1},v=Pr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:f,strategy:c}):b);return{top:(p.top-v.top+E.top)/A.y,bottom:(v.bottom-p.bottom+E.bottom)/A.y,left:(p.left-v.left+E.left)/A.x,right:(v.right-p.right+E.right)/A.x}}const Mb=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:u,padding:l=0}=wt(e,t)||{};if(u==null)return{};const d=Pu(l),h={x:n,y:r},m=fs(o),E=ds(m),y=await a.getDimensions(u),g=m==="y",p=g?"top":"left",b=g?"bottom":"right",f=g?"clientHeight":"clientWidth",A=s.reference[E]+s.reference[m]-h[m]-s.floating[E],v=h[m]-s.reference[m],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let w=R?R[f]:0;(!w||!await(a.isElement==null?void 0:a.isElement(R)))&&(w=i.floating[f]||s.floating[E]);const x=A/2-v/2,C=w/2-y[E]/2-1,D=Tt(d[p],C),I=Tt(d[b],C),P=D,U=w-y[E]-I,G=w/2-y[E]/2+x,oe=us(P,G,U),V=!c.arrow&&ln(o)!=null&&G!==oe&&s.reference[E]/2-(G<P?D:I)-y[E]/2<0,Y=V?G<P?G-P:G-U:0;return{[m]:h[m]+Y,data:{[m]:oe,centerOffset:G-oe-Y,...V&&{alignmentOffset:Y}},reset:V}}}),Lb=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:y=!0,...g}=wt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const p=vt(o),b=ct(i),f=vt(i)===i,A=await(c.isRTL==null?void 0:c.isRTL(u.floating)),v=h||(f||!y?[Tr(i)]:Ob(i)),R=E!=="none";!h&&R&&v.push(...Nb(i,y,E,A));const w=[i,...v],x=await Dn(t,g),C=[];let D=((r=s.flip)==null?void 0:r.overflows)||[];if(l&&C.push(x[p]),d){const G=Pb(o,a,A);C.push(x[G[0]],x[G[1]])}if(D=[...D,{placement:o,overflows:C}],!C.every(G=>G<=0)){var I,P;const G=(((I=s.flip)==null?void 0:I.index)||0)+1,oe=w[G];if(oe&&(!(d==="alignment"?b!==ct(oe):!1)||D.every(O=>O.overflows[0]>0&&ct(O.placement)===b)))return{data:{index:G,overflows:D},reset:{placement:oe}};let V=(P=D.filter(Y=>Y.overflows[0]<=0).sort((Y,O)=>Y.overflows[1]-O.overflows[1])[0])==null?void 0:P.placement;if(!V)switch(m){case"bestFit":{var U;const Y=(U=D.filter(O=>{if(R){const j=ct(O.placement);return j===b||j==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(j=>j>0).reduce((j,T)=>j+T,0)]).sort((O,j)=>O[1]-j[1])[0])==null?void 0:U[0];Y&&(V=Y);break}case"initialPlacement":V=i;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function ku(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Nu(e){return Rb.some(t=>e[t]>=0)}const jb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=wt(e,t);switch(r){case"referenceHidden":{const s=await Dn(t,{...o,elementContext:"reference"}),a=ku(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Nu(a)}}}case"escaped":{const s=await Dn(t,{...o,altBoundary:!0}),a=ku(s,n.floating);return{data:{escapedOffsets:a,escaped:Nu(a)}}}default:return{}}}}};async function Hb(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=vt(n),i=ln(n),c=ct(n)==="y",u=["left","top"].includes(a)?-1:1,l=s&&c?-1:1,d=wt(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:E}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof E=="number"&&(m=i==="end"?E*-1:E),c?{x:m*l,y:h*u}:{x:h*u,y:m*l}}const Ub=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:i}=t,c=await Hb(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},$b=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:g=>{let{x:p,y:b}=g;return{x:p,y:b}}},...c}=wt(e,t),u={x:n,y:r},l=await Dn(t,c),d=ct(vt(o)),h=ls(d);let m=u[h],E=u[d];if(s){const g=h==="y"?"top":"left",p=h==="y"?"bottom":"right",b=m+l[g],f=m-l[p];m=us(b,m,f)}if(a){const g=d==="y"?"top":"left",p=d==="y"?"bottom":"right",b=E+l[g],f=E-l[p];E=us(b,E,f)}const y=i.fn({...t,[h]:m,[d]:E});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:s,[d]:a}}}}}},Wb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=wt(e,t),l={x:n,y:r},d=ct(o),h=ls(d);let m=l[h],E=l[d];const y=wt(i,t),g=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const f=h==="y"?"height":"width",A=s.reference[h]-s.floating[f]+g.mainAxis,v=s.reference[h]+s.reference[f]-g.mainAxis;m<A?m=A:m>v&&(m=v)}if(u){var p,b;const f=h==="y"?"width":"height",A=["top","left"].includes(vt(o)),v=s.reference[d]-s.floating[f]+(A&&((p=a.offset)==null?void 0:p[d])||0)+(A?0:g.crossAxis),R=s.reference[d]+s.reference[f]+(A?0:((b=a.offset)==null?void 0:b[d])||0)-(A?g.crossAxis:0);E<v?E=v:E>R&&(E=R)}return{[h]:m,[d]:E}}}},Fb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...u}=wt(e,t),l=await Dn(t,u),d=vt(o),h=ln(o),m=ct(o)==="y",{width:E,height:y}=s.floating;let g,p;d==="top"||d==="bottom"?(g=d,p=h===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(p=d,g=h==="end"?"top":"bottom");const b=y-l.top-l.bottom,f=E-l.left-l.right,A=Tt(y-l[g],b),v=Tt(E-l[p],f),R=!t.middlewareData.shift;let w=A,x=v;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(x=f),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=b),R&&!h){const D=ze(l.left,0),I=ze(l.right,0),P=ze(l.top,0),U=ze(l.bottom,0);m?x=E-2*(D!==0||I!==0?D+I:ze(l.left,l.right)):w=y-2*(P!==0||U!==0?P+U:ze(l.top,l.bottom))}await c({...t,availableWidth:x,availableHeight:w});const C=await a.getDimensions(i.floating);return E!==C.width||y!==C.height?{reset:{rects:!0}}:{}}}};function Or(){return typeof window<"u"}function dn(e){return Iu(e)?(e.nodeName||"").toLowerCase():"#document"}function Ge(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ut(e){var t;return(t=(Iu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Iu(e){return Or()?e instanceof Node||e instanceof Ge(e).Node:!1}function nt(e){return Or()?e instanceof Element||e instanceof Ge(e).Element:!1}function lt(e){return Or()?e instanceof HTMLElement||e instanceof Ge(e).HTMLElement:!1}function Du(e){return!Or()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ge(e).ShadowRoot}function Mn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=rt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Kb(e){return["table","td","th"].includes(dn(e))}function kr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ps(e){const t=ms(),n=nt(e)?rt(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function qb(e){let t=Pt(e);for(;lt(t)&&!fn(t);){if(ps(t))return t;if(kr(t))return null;t=Pt(t)}return null}function ms(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fn(e){return["html","body","#document"].includes(dn(e))}function rt(e){return Ge(e).getComputedStyle(e)}function Nr(e){return nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pt(e){if(dn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Du(e)&&e.host||ut(e);return Du(t)?t.host:t}function Mu(e){const t=Pt(e);return fn(t)?e.ownerDocument?e.ownerDocument.body:e.body:lt(t)&&Mn(t)?t:Mu(t)}function Ln(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Mu(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ge(o);if(s){const i=gs(a);return t.concat(a,a.visualViewport||[],Mn(o)?o:[],i&&n?Ln(i):[])}return t.concat(o,Ln(o,[],n))}function gs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lu(e){const t=rt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=lt(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=Rr(n)!==s||Rr(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function bs(e){return nt(e)?e:e.contextElement}function hn(e){const t=bs(e);if(!lt(t))return it(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Lu(t);let a=(s?Rr(n.width):n.width)/r,i=(s?Rr(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const zb=it(0);function ju(e){const t=Ge(e);return!ms()||!t.visualViewport?zb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gb(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ge(e)?!1:t}function Wt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=bs(e);let a=it(1);t&&(r?nt(r)&&(a=hn(r)):a=hn(e));const i=Gb(s,n,r)?ju(s):it(0);let c=(o.left+i.x)/a.x,u=(o.top+i.y)/a.y,l=o.width/a.x,d=o.height/a.y;if(s){const h=Ge(s),m=r&&nt(r)?Ge(r):r;let E=h,y=gs(E);for(;y&&r&&m!==E;){const g=hn(y),p=y.getBoundingClientRect(),b=rt(y),f=p.left+(y.clientLeft+parseFloat(b.paddingLeft))*g.x,A=p.top+(y.clientTop+parseFloat(b.paddingTop))*g.y;c*=g.x,u*=g.y,l*=g.x,d*=g.y,c+=f,u+=A,E=Ge(y),y=gs(E)}}return Pr({width:l,height:d,x:c,y:u})}function ys(e,t){const n=Nr(e).scrollLeft;return t?t.left+n:Wt(ut(e)).left+n}function Hu(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ys(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function Bb(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=ut(r),i=t?kr(t.floating):!1;if(r===a||i&&s)return n;let c={scrollLeft:0,scrollTop:0},u=it(1);const l=it(0),d=lt(r);if((d||!d&&!s)&&((dn(r)!=="body"||Mn(a))&&(c=Nr(r)),lt(r))){const m=Wt(r);u=hn(r),l.x=m.x+r.clientLeft,l.y=m.y+r.clientTop}const h=a&&!d&&!s?Hu(a,c,!0):it(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+l.x+h.x,y:n.y*u.y-c.scrollTop*u.y+l.y+h.y}}function Vb(e){return Array.from(e.getClientRects())}function Jb(e){const t=ut(e),n=Nr(e),r=e.ownerDocument.body,o=ze(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ze(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ys(e);const i=-n.scrollTop;return rt(r).direction==="rtl"&&(a+=ze(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:i}}function Xb(e,t){const n=Ge(e),r=ut(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,i=0,c=0;if(o){s=o.width,a=o.height;const u=ms();(!u||u&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}return{width:s,height:a,x:i,y:c}}function Yb(e,t){const n=Wt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=lt(e)?hn(e):it(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:a,height:i,x:c,y:u}}function Uu(e,t,n){let r;if(t==="viewport")r=Xb(e,n);else if(t==="document")r=Jb(ut(e));else if(nt(t))r=Yb(t,n);else{const o=ju(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Pr(r)}function $u(e,t){const n=Pt(e);return n===t||!nt(n)||fn(n)?!1:rt(n).position==="fixed"||$u(n,t)}function Zb(e,t){const n=t.get(e);if(n)return n;let r=Ln(e,[],!1).filter(i=>nt(i)&&dn(i)!=="body"),o=null;const s=rt(e).position==="fixed";let a=s?Pt(e):e;for(;nt(a)&&!fn(a);){const i=rt(a),c=ps(a);!c&&i.position==="fixed"&&(o=null),(s?!c&&!o:!c&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Mn(a)&&!c&&$u(e,a))?r=r.filter(l=>l!==a):o=i,a=Pt(a)}return t.set(e,r),r}function Qb(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?kr(t)?[]:Zb(t,this._c):[].concat(n),r],i=a[0],c=a.reduce((u,l)=>{const d=Uu(t,l,o);return u.top=ze(d.top,u.top),u.right=Tt(d.right,u.right),u.bottom=Tt(d.bottom,u.bottom),u.left=ze(d.left,u.left),u},Uu(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function ey(e){const{width:t,height:n}=Lu(e);return{width:t,height:n}}function ty(e,t,n){const r=lt(t),o=ut(t),s=n==="fixed",a=Wt(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=it(0);function u(){c.x=ys(o)}if(r||!r&&!s)if((dn(t)!=="body"||Mn(o))&&(i=Nr(t)),r){const m=Wt(t,!0,s,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else o&&u();s&&!r&&o&&u();const l=o&&!r&&!s?Hu(o,i):it(0),d=a.left+i.scrollLeft-c.x-l.x,h=a.top+i.scrollTop-c.y-l.y;return{x:d,y:h,width:a.width,height:a.height}}function ws(e){return rt(e).position==="static"}function Wu(e,t){if(!lt(e)||rt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ut(e)===n&&(n=n.ownerDocument.body),n}function Fu(e,t){const n=Ge(e);if(kr(e))return n;if(!lt(e)){let o=Pt(e);for(;o&&!fn(o);){if(nt(o)&&!ws(o))return o;o=Pt(o)}return n}let r=Wu(e,t);for(;r&&Kb(r)&&ws(r);)r=Wu(r,t);return r&&fn(r)&&ws(r)&&!ps(r)?n:r||qb(e)||n}const ny=async function(e){const t=this.getOffsetParent||Fu,n=this.getDimensions,r=await n(e.floating);return{reference:ty(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ry(e){return rt(e).direction==="rtl"}const oy={convertOffsetParentRelativeRectToViewportRelativeRect:Bb,getDocumentElement:ut,getClippingRect:Qb,getOffsetParent:Fu,getElementRects:ny,getClientRects:Vb,getDimensions:ey,getScale:hn,isElement:nt,isRTL:ry};function Ku(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sy(e,t){let n=null,r;const o=ut(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:l,top:d,width:h,height:m}=u;if(i||t(),!h||!m)return;const E=Cr(d),y=Cr(o.clientWidth-(l+h)),g=Cr(o.clientHeight-(d+m)),p=Cr(l),f={rootMargin:-E+"px "+-y+"px "+-g+"px "+-p+"px",threshold:ze(0,Tt(1,c))||1};let A=!0;function v(R){const w=R[0].intersectionRatio;if(w!==c){if(!A)return a();w?a(!1,w):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w===1&&!Ku(u,e.getBoundingClientRect())&&a(),A=!1}try{n=new IntersectionObserver(v,{...f,root:o.ownerDocument})}catch{n=new IntersectionObserver(v,f)}n.observe(e)}return a(!0),s}function ay(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=bs(e),l=o||s?[...u?Ln(u):[],...Ln(t)]:[];l.forEach(p=>{o&&p.addEventListener("scroll",n,{passive:!0}),s&&p.addEventListener("resize",n)});const d=u&&i?sy(u,n):null;let h=-1,m=null;a&&(m=new ResizeObserver(p=>{let[b]=p;b&&b.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var f;(f=m)==null||f.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let E,y=c?Wt(e):null;c&&g();function g(){const p=Wt(e);y&&!Ku(y,p)&&n(),y=p,E=requestAnimationFrame(g)}return n(),()=>{var p;l.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),d==null||d(),(p=m)==null||p.disconnect(),m=null,c&&cancelAnimationFrame(E)}}const iy=Ub,cy=$b,uy=Lb,ly=Fb,dy=jb,qu=Mb,fy=Wb,hy=(e,t,n)=>{const r=new Map,o={platform:oy,...n},s={...o.platform,_c:r};return Db(e,t,{...o,platform:s})};var py=typeof document<"u",my=function(){},Ir=py?W.useLayoutEffect:my;function Dr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Dr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Dr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function zu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gu(e,t){const n=zu(e);return Math.round(t*n)/n}function vs(e){const t=_.useRef(e);return Ir(()=>{t.current=e}),t}function gy(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[l,d]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=_.useState(r);Dr(h,r)||m(r);const[E,y]=_.useState(null),[g,p]=_.useState(null),b=_.useCallback(O=>{O!==R.current&&(R.current=O,y(O))},[]),f=_.useCallback(O=>{O!==w.current&&(w.current=O,p(O))},[]),A=s||E,v=a||g,R=_.useRef(null),w=_.useRef(null),x=_.useRef(l),C=c!=null,D=vs(c),I=vs(o),P=vs(u),U=_.useCallback(()=>{if(!R.current||!w.current)return;const O={placement:t,strategy:n,middleware:h};I.current&&(O.platform=I.current),hy(R.current,w.current,O).then(j=>{const T={...j,isPositioned:P.current!==!1};G.current&&!Dr(x.current,T)&&(x.current=T,ki.flushSync(()=>{d(T)}))})},[h,t,n,I,P]);Ir(()=>{u===!1&&x.current.isPositioned&&(x.current.isPositioned=!1,d(O=>({...O,isPositioned:!1})))},[u]);const G=_.useRef(!1);Ir(()=>(G.current=!0,()=>{G.current=!1}),[]),Ir(()=>{if(A&&(R.current=A),v&&(w.current=v),A&&v){if(D.current)return D.current(A,v,U);U()}},[A,v,U,D,C]);const oe=_.useMemo(()=>({reference:R,floating:w,setReference:b,setFloating:f}),[b,f]),V=_.useMemo(()=>({reference:A,floating:v}),[A,v]),Y=_.useMemo(()=>{const O={position:n,left:0,top:0};if(!V.floating)return O;const j=Gu(V.floating,l.x),T=Gu(V.floating,l.y);return i?{...O,transform:"translate("+j+"px, "+T+"px)",...zu(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:T}},[n,i,V.floating,l.x,l.y]);return _.useMemo(()=>({...l,update:U,refs:oe,elements:V,floatingStyles:Y}),[l,U,oe,V,Y])}const by=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qu({element:r.current,padding:o}).fn(n):{}:r?qu({element:r,padding:o}).fn(n):{}}}},yy=(e,t)=>({...iy(e),options:[e,t]}),wy=(e,t)=>({...cy(e),options:[e,t]}),vy=(e,t)=>({...fy(e),options:[e,t]}),Ey=(e,t)=>({...uy(e),options:[e,t]}),_y=(e,t)=>({...ly(e),options:[e,t]}),Sy=(e,t)=>({...dy(e),options:[e,t]}),xy=(e,t)=>({...by(e),options:[e,t]});var Ay="Arrow",Bu=_.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return S.jsx(xe.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:S.jsx("polygon",{points:"0,0 30,0 15,10"})})});Bu.displayName=Ay;var Ry=Bu;function Cy(e){const[t,n]=_.useState(void 0);return Rt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,i=u.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Es="Popper",[Vu,Mr]=Ut(Es),[Ty,Ju]=Vu(Es),Xu=e=>{const{__scopePopper:t,children:n}=e,[r,o]=_.useState(null);return S.jsx(Ty,{scope:t,anchor:r,onAnchorChange:o,children:n})};Xu.displayName=Es;var Yu="PopperAnchor",Zu=_.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Ju(Yu,n),a=_.useRef(null),i=Te(t,a);return _.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:S.jsx(xe.div,{...o,ref:i})});Zu.displayName=Yu;var _s="PopperContent",[Py,Oy]=Vu(_s),Qu=_.forwardRef((e,t)=>{var te,le,ue,be,k,N;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:l=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:E,...y}=e,g=Ju(_s,n),[p,b]=_.useState(null),f=Te(t,M=>b(M)),[A,v]=_.useState(null),R=Cy(A),w=(R==null?void 0:R.width)??0,x=(R==null?void 0:R.height)??0,C=r+(s!=="center"?"-"+s:""),D=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},I=Array.isArray(u)?u:[u],P=I.length>0,U={padding:D,boundary:I.filter(Ny),altBoundary:P},{refs:G,floatingStyles:oe,placement:V,isPositioned:Y,middlewareData:O}=gy({strategy:"fixed",placement:C,whileElementsMounted:(...M)=>ay(...M,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[yy({mainAxis:o+x,alignmentAxis:a}),c&&wy({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?vy():void 0,...U}),c&&Ey({...U}),_y({...U,apply:({elements:M,rects:q,availableWidth:ne,availableHeight:$})=>{const{width:Ee,height:Ce}=q.reference,pe=M.floating.style;pe.setProperty("--radix-popper-available-width",`${ne}px`),pe.setProperty("--radix-popper-available-height",`${$}px`),pe.setProperty("--radix-popper-anchor-width",`${Ee}px`),pe.setProperty("--radix-popper-anchor-height",`${Ce}px`)}}),A&&xy({element:A,padding:i}),Iy({arrowWidth:w,arrowHeight:x}),h&&Sy({strategy:"referenceHidden",...U})]}),[j,T]=nl(V),H=st(E);Rt(()=>{Y&&(H==null||H())},[Y,H]);const J=(te=O.arrow)==null?void 0:te.x,X=(le=O.arrow)==null?void 0:le.y,se=((ue=O.arrow)==null?void 0:ue.centerOffset)!==0,[fe,ye]=_.useState();return Rt(()=>{p&&ye(window.getComputedStyle(p).zIndex)},[p]),S.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:Y?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(be=O.transformOrigin)==null?void 0:be.x,(k=O.transformOrigin)==null?void 0:k.y].join(" "),...((N=O.hide)==null?void 0:N.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:S.jsx(Py,{scope:n,placedSide:j,onArrowChange:v,arrowX:J,arrowY:X,shouldHideArrow:se,children:S.jsx(xe.div,{"data-side":j,"data-align":T,...y,ref:f,style:{...y.style,animation:Y?void 0:"none"}})})})});Qu.displayName=_s;var el="PopperArrow",ky={top:"bottom",right:"left",bottom:"top",left:"right"},tl=_.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Oy(el,r),a=ky[s.placedSide];return S.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:S.jsx(Ry,{...o,ref:n,style:{...o.style,display:"block"}})})});tl.displayName=el;function Ny(e){return e!==null}var Iy=e=>({name:"transformOrigin",options:e,fn(t){var g,p,b;const{placement:n,rects:r,middlewareData:o}=t,a=((g=o.arrow)==null?void 0:g.centerOffset)!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,l]=nl(n),d={start:"0%",center:"50%",end:"100%"}[l],h=(((p=o.arrow)==null?void 0:p.x)??0)+i/2,m=(((b=o.arrow)==null?void 0:b.y)??0)+c/2;let E="",y="";return u==="bottom"?(E=a?d:`${h}px`,y=`${-c}px`):u==="top"?(E=a?d:`${h}px`,y=`${r.floating.height+c}px`):u==="right"?(E=`${-c}px`,y=a?d:`${m}px`):u==="left"&&(E=`${r.floating.width+c}px`,y=a?d:`${m}px`),{data:{x:E,y}}}});function nl(e){const[t,n="center"]=e.split("-");return[t,n]}var Ss=Xu,rl=Zu,ol=Qu,sl=tl,Dy=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"}),My="VisuallyHidden",al=_.forwardRef((e,t)=>S.jsx(xe.span,{...e,ref:t,style:{...Dy,...e.style}}));al.displayName=My;var Ly=al,[Lr,H2]=Ut("Tooltip",[Mr]),jr=Mr(),il="TooltipProvider",jy=700,xs="tooltip.open",[Hy,As]=Lr(il),cl=e=>{const{__scopeTooltip:t,delayDuration:n=jy,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,a=_.useRef(!0),i=_.useRef(!1),c=_.useRef(0);return _.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),S.jsx(Hy,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:_.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:_.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:_.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:s})};cl.displayName=il;var jn="Tooltip",[Uy,Hr]=Lr(jn),ul=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,c=As(jn,e.__scopeTooltip),u=jr(t),[l,d]=_.useState(null),h=bt(),m=_.useRef(0),E=a??c.disableHoverableContent,y=i??c.delayDuration,g=_.useRef(!1),[p,b]=In({prop:r,defaultProp:o??!1,onChange:w=>{w?(c.onOpen(),document.dispatchEvent(new CustomEvent(xs))):c.onClose(),s==null||s(w)},caller:jn}),f=_.useMemo(()=>p?g.current?"delayed-open":"instant-open":"closed",[p]),A=_.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,b(!0)},[b]),v=_.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b(!1)},[b]),R=_.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,b(!0),m.current=0},y)},[y,b]);return _.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),S.jsx(Ss,{...u,children:S.jsx(Uy,{scope:t,contentId:h,open:p,stateAttribute:f,trigger:l,onTriggerChange:d,onTriggerEnter:_.useCallback(()=>{c.isOpenDelayedRef.current?R():A()},[c.isOpenDelayedRef,R,A]),onTriggerLeave:_.useCallback(()=>{E?v():(window.clearTimeout(m.current),m.current=0)},[v,E]),onOpen:A,onClose:v,disableHoverableContent:E,children:n})})};ul.displayName=jn;var Rs="TooltipTrigger",ll=_.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Hr(Rs,n),s=As(Rs,n),a=jr(n),i=_.useRef(null),c=Te(t,i,o.onTriggerChange),u=_.useRef(!1),l=_.useRef(!1),d=_.useCallback(()=>u.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),S.jsx(rl,{asChild:!0,...a,children:S.jsx(xe.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:Z(e.onPointerMove,h=>{h.pointerType!=="touch"&&!l.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)}),onPointerLeave:Z(e.onPointerLeave,()=>{o.onTriggerLeave(),l.current=!1}),onPointerDown:Z(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Z(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Z(e.onBlur,o.onClose),onClick:Z(e.onClick,o.onClose)})})});ll.displayName=Rs;var $y="TooltipPortal",[U2,Wy]=Lr($y,{forceMount:void 0}),pn="TooltipContent",dl=_.forwardRef((e,t)=>{const n=Wy(pn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=Hr(pn,e.__scopeTooltip);return S.jsx(yt,{present:r||a.open,children:a.disableHoverableContent?S.jsx(fl,{side:o,...s,ref:t}):S.jsx(Fy,{side:o,...s,ref:t})})}),Fy=_.forwardRef((e,t)=>{const n=Hr(pn,e.__scopeTooltip),r=As(pn,e.__scopeTooltip),o=_.useRef(null),s=Te(t,o),[a,i]=_.useState(null),{trigger:c,onClose:u}=n,l=o.current,{onPointerInTransitChange:d}=r,h=_.useCallback(()=>{i(null),d(!1)},[d]),m=_.useCallback((E,y)=>{const g=E.currentTarget,p={x:E.clientX,y:E.clientY},b=By(p,g.getBoundingClientRect()),f=Vy(p,b),A=Jy(y.getBoundingClientRect()),v=Yy([...f,...A]);i(v),d(!0)},[d]);return _.useEffect(()=>()=>h(),[h]),_.useEffect(()=>{if(c&&l){const E=g=>m(g,l),y=g=>m(g,c);return c.addEventListener("pointerleave",E),l.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",E),l.removeEventListener("pointerleave",y)}}},[c,l,m,h]),_.useEffect(()=>{if(a){const E=y=>{const g=y.target,p={x:y.clientX,y:y.clientY},b=(c==null?void 0:c.contains(g))||(l==null?void 0:l.contains(g)),f=!Xy(p,a);b?h():f&&(h(),u())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[c,l,a,u,h]),S.jsx(fl,{...e,ref:s})}),[Ky,qy]=Lr(jn,{isInside:!1}),zy=sm("TooltipContent"),fl=_.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,c=Hr(pn,n),u=jr(n),{onClose:l}=c;return _.useEffect(()=>(document.addEventListener(xs,l),()=>document.removeEventListener(xs,l)),[l]),_.useEffect(()=>{if(c.trigger){const d=h=>{const m=h.target;m!=null&&m.contains(c.trigger)&&l()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,l]),S.jsx(mr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:l,children:S.jsxs(ol,{"data-state":c.stateAttribute,...u,...i,ref:t,style:{...i.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:[S.jsx(zy,{children:r}),S.jsx(Ky,{scope:n,isInside:!0,children:S.jsx(Ly,{id:c.contentId,role:"tooltip",children:o||r})})]})})});dl.displayName=pn;var hl="TooltipArrow",Gy=_.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=jr(n);return qy(hl,n).isInside?null:S.jsx(sl,{...o,...r,ref:t})});Gy.displayName=hl;function By(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Vy(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 Jy(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Xy(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],u=i.x,l=i.y,d=c.x,h=c.y;l>r!=h>r&&n<(d-u)*(r-l)/(h-l)+u&&(o=!o)}return o}function Yy(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),Zy(t)}function Zy(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Qy=cl,ew=ul,tw=ll,pl=dl;const ml=Qy,gl=ew,bl=tw,Cs=_.forwardRef(({className:e,sideOffset:t=4,...n},r)=>S.jsx(pl,{ref:r,sideOffset:t,className:z("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}));Cs.displayName=pl.displayName;const nw="sidebar_state",rw=60*60*24*7,ow="16rem",sw="18rem",aw="3rem",iw="b",yl=_.createContext(null);function Hn(){const e=_.useContext(yl);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function wl({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:s,...a}){const i=Jm(),[c,u]=_.useState(!1),[l,d]=_.useState(e),h=t??l,m=_.useCallback(p=>{const b=typeof p=="function"?p(h):p;n?n(b):d(b),document.cookie=`${nw}=${b}; path=/; max-age=${rw}`},[n,h]),E=_.useCallback(()=>i?u(p=>!p):m(p=>!p),[i,m,u]);_.useEffect(()=>{const p=b=>{b.key===iw&&(b.metaKey||b.ctrlKey)&&(b.preventDefault(),E())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[E]);const y=h?"expanded":"collapsed",g=_.useMemo(()=>({state:y,open:h,setOpen:m,isMobile:i,openMobile:c,setOpenMobile:u,toggleSidebar:E}),[y,h,m,i,c,u,E]);return S.jsx(yl.Provider,{value:g,children:S.jsx(ml,{delayDuration:0,children:S.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":ow,"--sidebar-width-icon":aw,...o},className:z("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),...a,children:s})})})}function vl({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...s}){const{isMobile:a,state:i,openMobile:c,setOpenMobile:u}=Hn();return n==="none"?S.jsx("div",{"data-slot":"sidebar",className:z("bg-white text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...s,children:o}):a?S.jsx(Ru,{open:c,onOpenChange:u,...s,children:S.jsxs(os,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-white text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":sw},side:e,children:[S.jsxs(ss,{className:"sr-only",children:[S.jsx(as,{children:"Sidebar"}),S.jsx(is,{children:"Displays the mobile sidebar."})]}),S.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):S.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":i,"data-collapsible":i==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[S.jsx("div",{"data-slot":"sidebar-gap",className:z("relative w-(--sidebar-width) bg-white transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),S.jsx("div",{"data-slot":"sidebar-container",className:z("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...s,children:S.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-white group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col px-1 py-2 group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})}function El({className:e,onClick:t,...n}){const{toggleSidebar:r}=Hn();return S.jsxs(hr,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:z("size-7",e),onClick:o=>{t==null||t(o),r()},...n,children:[S.jsx(nm,{}),S.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function _l({className:e,...t}){const{toggleSidebar:n}=Hn();return S.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:z("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function Sl({className:e,...t}){return S.jsx("main",{"data-slot":"sidebar-inset",className:z("bg-white relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function cw({className:e,...t}){return S.jsx(Wo,{"data-slot":"sidebar-input","data-sidebar":"input",className:z("bg-background h-8 w-full shadow-none",e),...t})}function xl({className:e,...t}){return S.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:z("flex flex-col gap-2 p-2",e),...t})}function uw({className:e,...t}){return S.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:z("flex flex-col gap-2 p-2",e),...t})}function lw({className:e,...t}){return S.jsx(pr,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:z("bg-sidebar-border mx-2 w-auto",e),...t})}function Al({className:e,...t}){return S.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:z("flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function Rl({className:e,...t}){return S.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:z("relative flex w-full min-w-0 flex-col px-2 py-1",e),...t})}function dw({className:e,asChild:t=!1,...n}){const r=t?tn:"div";return S.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:z("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})}function fw({className:e,asChild:t=!1,...n}){const r=t?tn:"button";return S.jsx(r,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:z("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...n})}function Cl({className:e,...t}){return S.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:z("w-full text-sm",e),...t})}function hw({className:e,...t}){return S.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:z("flex w-full min-w-0 flex-col gap-1",e),...t})}function pw({className:e,...t}){return S.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:z("group/menu-item relative",e),...t})}const mw=Do("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function gw({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:s,...a}){const i=e?tn:"button",{isMobile:c,state:u}=Hn(),l=S.jsx(i,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":t,className:z(mw({variant:n,size:r}),s),...a});return o?(typeof o=="string"&&(o={children:o}),S.jsxs(gl,{children:[S.jsx(bl,{asChild:!0,children:l}),S.jsx(Cs,{side:"right",align:"center",hidden:u!=="collapsed"||c,...o})]})):l}function bw({className:e,asChild:t=!1,showOnHover:n=!1,...r}){const o=t?tn:"button";return S.jsx(o,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:z("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",e),...r})}function yw({className:e,...t}){return S.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:z("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t})}function ww({className:e,showIcon:t=!1,...n}){const r=_.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return S.jsxs("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:z("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&S.jsx(cs,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),S.jsx(cs,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})}function Tl({className:e,...t}){return S.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:z("border-sidebar-border mx-3 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t})}function Pl({className:e,...t}){return S.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:z("group/menu-sub-item relative",e),...t})}function Ol({asChild:e=!1,size:t="md",isActive:n=!1,className:r,...o}){const s=e?tn:"a";return S.jsx(s,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:z("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})}function kl({title:e,url:t,children:n,defaultOpen:r=!1,icon:o,isActive:s=!1,className:a}){const[i,c]=_.useState(r);return _.useEffect(()=>{s&&c(!0)},[s]),S.jsx(Rl,{children:S.jsxs("div",{className:"flex flex-col",children:[S.jsxs("div",{className:"flex flex-row items-center justify-between",children:[S.jsxs("a",{href:t,className:z("flex flex-1 cursor-pointer items-center gap-2 rounded-lg p-2 transition-colors hover:bg-gray-100"),children:[o&&S.jsx("span",{className:z("text-gray-600"),children:o}),S.jsx("span",{className:z("text-gray-600"),children:e})]}),S.jsx("button",{type:"button",className:"mr-3 rounded-lg p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-700",onClick:u=>{u.preventDefault(),u.stopPropagation(),c(!i)},"aria-label":i?"Collapse section":"Expand section",children:i?S.jsx(Zp,{className:"h-4 w-4"}):S.jsx(ac,{className:"h-4 w-4"})})]}),S.jsx("div",{className:z("overflow-hidden transition-all",i?"max-h-96":"max-h-0"),children:n})]})})}function Nl(e){const t=e+"CollectionProvider",[n,r]=Ut(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:g,children:p}=y,b=W.useRef(null),f=W.useRef(new Map).current;return S.jsx(o,{scope:g,itemMap:f,collectionRef:b,children:p})};a.displayName=t;const i=e+"CollectionSlot",c=en(i),u=W.forwardRef((y,g)=>{const{scope:p,children:b}=y,f=s(i,p),A=Te(g,f.collectionRef);return S.jsx(c,{ref:A,children:b})});u.displayName=i;const l=e+"CollectionItemSlot",d="data-radix-collection-item",h=en(l),m=W.forwardRef((y,g)=>{const{scope:p,children:b,...f}=y,A=W.useRef(null),v=Te(g,A),R=s(l,p);return W.useEffect(()=>(R.itemMap.set(A,{ref:A,...f}),()=>void R.itemMap.delete(A))),S.jsx(h,{[d]:"",ref:v,children:b})});m.displayName=l;function E(y){const g=s(e+"CollectionConsumer",y);return W.useCallback(()=>{const b=g.collectionRef.current;if(!b)return[];const f=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((R,w)=>f.indexOf(R.ref.current)-f.indexOf(w.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:u,ItemSlot:m},E,r]}var vw=_.createContext(void 0);function Il(e){const t=_.useContext(vw);return e||t||"ltr"}var Ts="rovingFocusGroup.onEntryFocus",Ew={bubbles:!1,cancelable:!0},Un="RovingFocusGroup",[Ps,Dl,_w]=Nl(Un),[Sw,Ml]=Ut(Un,[_w]),[xw,Aw]=Sw(Un),Ll=_.forwardRef((e,t)=>S.jsx(Ps.Provider,{scope:e.__scopeRovingFocusGroup,children:S.jsx(Ps.Slot,{scope:e.__scopeRovingFocusGroup,children:S.jsx(Rw,{...e,ref:t})})}));Ll.displayName=Un;var Rw=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:l=!1,...d}=e,h=_.useRef(null),m=Te(t,h),E=Il(s),[y,g]=In({prop:a,defaultProp:i??null,onChange:c,caller:Un}),[p,b]=_.useState(!1),f=st(u),A=Dl(n),v=_.useRef(!1),[R,w]=_.useState(0);return _.useEffect(()=>{const x=h.current;if(x)return x.addEventListener(Ts,f),()=>x.removeEventListener(Ts,f)},[f]),S.jsx(xw,{scope:n,orientation:r,dir:E,loop:o,currentTabStopId:y,onItemFocus:_.useCallback(x=>g(x),[g]),onItemShiftTab:_.useCallback(()=>b(!0),[]),onFocusableItemAdd:_.useCallback(()=>w(x=>x+1),[]),onFocusableItemRemove:_.useCallback(()=>w(x=>x-1),[]),children:S.jsx(xe.div,{tabIndex:p||R===0?-1:0,"data-orientation":r,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:Z(e.onMouseDown,()=>{v.current=!0}),onFocus:Z(e.onFocus,x=>{const C=!v.current;if(x.target===x.currentTarget&&C&&!p){const D=new CustomEvent(Ts,Ew);if(x.currentTarget.dispatchEvent(D),!D.defaultPrevented){const I=A().filter(V=>V.focusable),P=I.find(V=>V.active),U=I.find(V=>V.id===y),oe=[P,U,...I].filter(Boolean).map(V=>V.ref.current);Ul(oe,l)}}v.current=!1}),onBlur:Z(e.onBlur,()=>b(!1))})})}),jl="RovingFocusGroupItem",Hl=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...i}=e,c=bt(),u=s||c,l=Aw(jl,n),d=l.currentTabStopId===u,h=Dl(n),{onFocusableItemAdd:m,onFocusableItemRemove:E,currentTabStopId:y}=l;return _.useEffect(()=>{if(r)return m(),()=>E()},[r,m,E]),S.jsx(Ps.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:S.jsx(xe.span,{tabIndex:d?0:-1,"data-orientation":l.orientation,...i,ref:t,onMouseDown:Z(e.onMouseDown,g=>{r?l.onItemFocus(u):g.preventDefault()}),onFocus:Z(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:Z(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){l.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const p=Pw(g,l.orientation,l.dir);if(p!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let f=h().filter(A=>A.focusable).map(A=>A.ref.current);if(p==="last")f.reverse();else if(p==="prev"||p==="next"){p==="prev"&&f.reverse();const A=f.indexOf(g.currentTarget);f=l.loop?Ow(f,A+1):f.slice(A+1)}setTimeout(()=>Ul(f))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:y!=null}):a})})});Hl.displayName=jl;var Cw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Tw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Pw(e,t,n){const r=Tw(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Cw[r]}function Ul(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Ow(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var kw=Ll,Nw=Hl,Os=["Enter"," "],Iw=["ArrowDown","PageUp","Home"],$l=["ArrowUp","PageDown","End"],Dw=[...Iw,...$l],Mw={ltr:[...Os,"ArrowRight"],rtl:[...Os,"ArrowLeft"]},Lw={ltr:["ArrowLeft"],rtl:["ArrowRight"]},$n="Menu",[Wn,jw,Hw]=Nl($n),[Ft,Wl]=Ut($n,[Hw,Mr,Ml]),Fn=Mr(),Fl=Ml(),[Kl,Ot]=Ft($n),[Uw,Kn]=Ft($n),ql=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,i=Fn(t),[c,u]=_.useState(null),l=_.useRef(!1),d=st(s),h=Il(o);return _.useEffect(()=>{const m=()=>{l.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},E=()=>l.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),S.jsx(Ss,{...i,children:S.jsx(Kl,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:u,children:S.jsx(Uw,{scope:t,onClose:_.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:l,dir:h,modal:a,children:r})})})};ql.displayName=$n;var $w="MenuAnchor",ks=_.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Fn(n);return S.jsx(rl,{...o,...r,ref:t})});ks.displayName=$w;var Ns="MenuPortal",[Ww,zl]=Ft(Ns,{forceMount:void 0}),Gl=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Ot(Ns,t);return S.jsx(Ww,{scope:t,forceMount:n,children:S.jsx(yt,{present:n||s.open,children:S.jsx(Go,{asChild:!0,container:o,children:r})})})};Gl.displayName=Ns;var Ye="MenuContent",[Fw,Is]=Ft(Ye),Bl=_.forwardRef((e,t)=>{const n=zl(Ye,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ot(Ye,e.__scopeMenu),a=Kn(Ye,e.__scopeMenu);return S.jsx(Wn.Provider,{scope:e.__scopeMenu,children:S.jsx(yt,{present:r||s.open,children:S.jsx(Wn.Slot,{scope:e.__scopeMenu,children:a.modal?S.jsx(Kw,{...o,ref:t}):S.jsx(qw,{...o,ref:t})})})})}),Kw=_.forwardRef((e,t)=>{const n=Ot(Ye,e.__scopeMenu),r=_.useRef(null),o=Te(t,r);return _.useEffect(()=>{const s=r.current;if(s)return ou(s)},[]),S.jsx(Ds,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Z(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),qw=_.forwardRef((e,t)=>{const n=Ot(Ye,e.__scopeMenu);return S.jsx(Ds,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),zw=en("MenuContent.ScrollLock"),Ds=_.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,onDismiss:m,disableOutsideScroll:E,...y}=e,g=Ot(Ye,n),p=Kn(Ye,n),b=Fn(n),f=Fl(n),A=jw(n),[v,R]=_.useState(null),w=_.useRef(null),x=Te(t,w,g.onContentChange),C=_.useRef(0),D=_.useRef(""),I=_.useRef(0),P=_.useRef(null),U=_.useRef("right"),G=_.useRef(0),oe=E?Zo:_.Fragment,V=E?{as:zw,allowPinchZoom:!0}:void 0,Y=j=>{var te,le;const T=D.current+j,H=A().filter(ue=>!ue.disabled),J=document.activeElement,X=(te=H.find(ue=>ue.ref.current===J))==null?void 0:te.textValue,se=H.map(ue=>ue.textValue),fe=rv(se,T,X),ye=(le=H.find(ue=>ue.textValue===fe))==null?void 0:le.ref.current;(function ue(be){D.current=be,window.clearTimeout(C.current),be!==""&&(C.current=window.setTimeout(()=>ue(""),1e3))})(T),ye&&setTimeout(()=>ye.focus())};_.useEffect(()=>()=>window.clearTimeout(C.current),[]),Kc();const O=_.useCallback(j=>{var H,J;return U.current===((H=P.current)==null?void 0:H.side)&&sv(j,(J=P.current)==null?void 0:J.area)},[]);return S.jsx(Fw,{scope:n,searchRef:D,onItemEnter:_.useCallback(j=>{O(j)&&j.preventDefault()},[O]),onItemLeave:_.useCallback(j=>{var T;O(j)||((T=w.current)==null||T.focus(),R(null))},[O]),onTriggerLeave:_.useCallback(j=>{O(j)&&j.preventDefault()},[O]),pointerGraceTimerRef:I,onPointerGraceIntentChange:_.useCallback(j=>{P.current=j},[]),children:S.jsx(oe,{...V,children:S.jsx(zo,{asChild:!0,trapped:o,onMountAutoFocus:Z(s,j=>{var T;j.preventDefault(),(T=w.current)==null||T.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:S.jsx(mr,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,onDismiss:m,children:S.jsx(kw,{asChild:!0,...f,dir:p.dir,orientation:"vertical",loop:r,currentTabStopId:v,onCurrentTabStopIdChange:R,onEntryFocus:Z(c,j=>{p.isUsingKeyboardRef.current||j.preventDefault()}),preventScrollOnEntryFocus:!0,children:S.jsx(ol,{role:"menu","aria-orientation":"vertical","data-state":dd(g.open),"data-radix-menu-content":"",dir:p.dir,...b,...y,ref:x,style:{outline:"none",...y.style},onKeyDown:Z(y.onKeyDown,j=>{const H=j.target.closest("[data-radix-menu-content]")===j.currentTarget,J=j.ctrlKey||j.altKey||j.metaKey,X=j.key.length===1;H&&(j.key==="Tab"&&j.preventDefault(),!J&&X&&Y(j.key));const se=w.current;if(j.target!==se||!Dw.includes(j.key))return;j.preventDefault();const ye=A().filter(te=>!te.disabled).map(te=>te.ref.current);$l.includes(j.key)&&ye.reverse(),tv(ye)}),onBlur:Z(e.onBlur,j=>{j.currentTarget.contains(j.target)||(window.clearTimeout(C.current),D.current="")}),onPointerMove:Z(e.onPointerMove,zn(j=>{const T=j.target,H=G.current!==j.clientX;if(j.currentTarget.contains(T)&&H){const J=j.clientX>G.current?"right":"left";U.current=J,G.current=j.clientX}}))})})})})})})});Bl.displayName=Ye;var Gw="MenuGroup",Ms=_.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return S.jsx(xe.div,{role:"group",...r,ref:t})});Ms.displayName=Gw;var Bw="MenuLabel",Vl=_.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return S.jsx(xe.div,{...r,ref:t})});Vl.displayName=Bw;var Ur="MenuItem",Jl="menu.itemSelect",$r=_.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=_.useRef(null),a=Kn(Ur,e.__scopeMenu),i=Is(Ur,e.__scopeMenu),c=Te(t,s),u=_.useRef(!1),l=()=>{const d=s.current;if(!n&&d){const h=new CustomEvent(Jl,{bubbles:!0,cancelable:!0});d.addEventListener(Jl,m=>r==null?void 0:r(m),{once:!0}),Oc(d,h),h.defaultPrevented?u.current=!1:a.onClose()}};return S.jsx(Xl,{...o,ref:c,disabled:n,onClick:Z(e.onClick,l),onPointerDown:d=>{var h;(h=e.onPointerDown)==null||h.call(e,d),u.current=!0},onPointerUp:Z(e.onPointerUp,d=>{var h;u.current||(h=d.currentTarget)==null||h.click()}),onKeyDown:Z(e.onKeyDown,d=>{const h=i.searchRef.current!=="";n||h&&d.key===" "||Os.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});$r.displayName=Ur;var Xl=_.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=Is(Ur,n),i=Fl(n),c=_.useRef(null),u=Te(t,c),[l,d]=_.useState(!1),[h,m]=_.useState("");return _.useEffect(()=>{const E=c.current;E&&m((E.textContent??"").trim())},[s.children]),S.jsx(Wn.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:S.jsx(Nw,{asChild:!0,...i,focusable:!r,children:S.jsx(xe.div,{role:"menuitem","data-highlighted":l?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:Z(e.onPointerMove,zn(E=>{r?a.onItemLeave(E):(a.onItemEnter(E),E.defaultPrevented||E.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Z(e.onPointerLeave,zn(E=>a.onItemLeave(E))),onFocus:Z(e.onFocus,()=>d(!0)),onBlur:Z(e.onBlur,()=>d(!1))})})})}),Vw="MenuCheckboxItem",Yl=_.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return S.jsx(nd,{scope:e.__scopeMenu,checked:n,children:S.jsx($r,{role:"menuitemcheckbox","aria-checked":Wr(n)?"mixed":n,...o,ref:t,"data-state":Hs(n),onSelect:Z(o.onSelect,()=>r==null?void 0:r(Wr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Yl.displayName=Vw;var Zl="MenuRadioGroup",[Jw,Xw]=Ft(Zl,{value:void 0,onValueChange:()=>{}}),Ql=_.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=st(r);return S.jsx(Jw,{scope:e.__scopeMenu,value:n,onValueChange:s,children:S.jsx(Ms,{...o,ref:t})})});Ql.displayName=Zl;var ed="MenuRadioItem",td=_.forwardRef((e,t)=>{const{value:n,...r}=e,o=Xw(ed,e.__scopeMenu),s=n===o.value;return S.jsx(nd,{scope:e.__scopeMenu,checked:s,children:S.jsx($r,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Hs(s),onSelect:Z(r.onSelect,()=>{var a;return(a=o.onValueChange)==null?void 0:a.call(o,n)},{checkForDefaultPrevented:!1})})})});td.displayName=ed;var Ls="MenuItemIndicator",[nd,Yw]=Ft(Ls,{checked:!1}),rd=_.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Yw(Ls,n);return S.jsx(yt,{present:r||Wr(s.checked)||s.checked===!0,children:S.jsx(xe.span,{...o,ref:t,"data-state":Hs(s.checked)})})});rd.displayName=Ls;var Zw="MenuSeparator",od=_.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return S.jsx(xe.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});od.displayName=Zw;var Qw="MenuArrow",sd=_.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Fn(n);return S.jsx(sl,{...o,...r,ref:t})});sd.displayName=Qw;var js="MenuSub",[ev,ad]=Ft(js),id=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=Ot(js,t),a=Fn(t),[i,c]=_.useState(null),[u,l]=_.useState(null),d=st(o);return _.useEffect(()=>(s.open===!1&&d(!1),()=>d(!1)),[s.open,d]),S.jsx(Ss,{...a,children:S.jsx(Kl,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:l,children:S.jsx(ev,{scope:t,contentId:bt(),triggerId:bt(),trigger:i,onTriggerChange:c,children:n})})})};id.displayName=js;var qn="MenuSubTrigger",cd=_.forwardRef((e,t)=>{const n=Ot(qn,e.__scopeMenu),r=Kn(qn,e.__scopeMenu),o=ad(qn,e.__scopeMenu),s=Is(qn,e.__scopeMenu),a=_.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},l=_.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return _.useEffect(()=>l,[l]),_.useEffect(()=>{const d=i.current;return()=>{window.clearTimeout(d),c(null)}},[i,c]),S.jsx(ks,{asChild:!0,...u,children:S.jsx(Xl,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":dd(n.open),...e,ref:lr(t,o.onTriggerChange),onClick:d=>{var h;(h=e.onClick)==null||h.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Z(e.onPointerMove,zn(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),l()},100))})),onPointerLeave:Z(e.onPointerLeave,zn(d=>{var m,E;l();const h=(m=n.content)==null?void 0:m.getBoundingClientRect();if(h){const y=(E=n.content)==null?void 0:E.dataset.side,g=y==="right",p=g?-5:5,b=h[g?"left":"right"],f=h[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+p,y:d.clientY},{x:b,y:h.top},{x:f,y:h.top},{x:f,y:h.bottom},{x:b,y:h.bottom}],side:y}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:Z(e.onKeyDown,d=>{var m;const h=s.searchRef.current!=="";e.disabled||h&&d.key===" "||Mw[r.dir].includes(d.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),d.preventDefault())})})})});cd.displayName=qn;var ud="MenuSubContent",ld=_.forwardRef((e,t)=>{const n=zl(Ye,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ot(Ye,e.__scopeMenu),a=Kn(Ye,e.__scopeMenu),i=ad(ud,e.__scopeMenu),c=_.useRef(null),u=Te(t,c);return S.jsx(Wn.Provider,{scope:e.__scopeMenu,children:S.jsx(yt,{present:r||s.open,children:S.jsx(Wn.Slot,{scope:e.__scopeMenu,children:S.jsx(Ds,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:l=>{var d;a.isUsingKeyboardRef.current&&((d=c.current)==null||d.focus()),l.preventDefault()},onCloseAutoFocus:l=>l.preventDefault(),onFocusOutside:Z(e.onFocusOutside,l=>{l.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:Z(e.onEscapeKeyDown,l=>{a.onClose(),l.preventDefault()}),onKeyDown:Z(e.onKeyDown,l=>{var m;const d=l.currentTarget.contains(l.target),h=Lw[a.dir].includes(l.key);d&&h&&(s.onOpenChange(!1),(m=i.trigger)==null||m.focus(),l.preventDefault())})})})})})});ld.displayName=ud;function dd(e){return e?"open":"closed"}function Wr(e){return e==="indeterminate"}function Hs(e){return Wr(e)?"indeterminate":e?"checked":"unchecked"}function tv(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function nv(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function rv(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=nv(e,Math.max(s,0));o.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function ov(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],u=i.x,l=i.y,d=c.x,h=c.y;l>r!=h>r&&n<(d-u)*(r-l)/(h-l)+u&&(o=!o)}return o}function sv(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ov(n,t)}function zn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var av=ql,iv=ks,cv=Gl,uv=Bl,lv=Ms,dv=Vl,fv=$r,hv=Yl,pv=Ql,mv=td,gv=rd,bv=od,yv=sd,wv=id,vv=cd,Ev=ld,Fr="DropdownMenu",[_v,$2]=Ut(Fr,[Wl]),Ue=Wl(),[Sv,fd]=_v(Fr),hd=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,c=Ue(t),u=_.useRef(null),[l,d]=In({prop:o,defaultProp:s??!1,onChange:a,caller:Fr});return S.jsx(Sv,{scope:t,triggerId:bt(),triggerRef:u,contentId:bt(),open:l,onOpenChange:d,onOpenToggle:_.useCallback(()=>d(h=>!h),[d]),modal:i,children:S.jsx(av,{...c,open:l,onOpenChange:d,dir:r,modal:i,children:n})})};hd.displayName=Fr;var pd="DropdownMenuTrigger",md=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=fd(pd,n),a=Ue(n);return S.jsx(iv,{asChild:!0,...a,children:S.jsx(xe.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:lr(t,s.triggerRef),onPointerDown:Z(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:Z(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});md.displayName=pd;var xv="DropdownMenuPortal",gd=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ue(t);return S.jsx(cv,{...r,...n})};gd.displayName=xv;var bd="DropdownMenuContent",yd=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=fd(bd,n),s=Ue(n),a=_.useRef(!1);return S.jsx(uv,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:Z(e.onCloseAutoFocus,i=>{var c;a.current||(c=o.triggerRef.current)==null||c.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:Z(e.onInteractOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,l=c.button===2||u;(!o.modal||l)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});yd.displayName=bd;var Av="DropdownMenuGroup",wd=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return S.jsx(lv,{...o,...r,ref:t})});wd.displayName=Av;var Rv="DropdownMenuLabel",vd=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return S.jsx(dv,{...o,...r,ref:t})});vd.displayName=Rv;var Cv="DropdownMenuItem",Ed=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return S.jsx(fv,{...o,...r,ref:t})});Ed.displayName=Cv;var Tv="DropdownMenuCheckboxItem",_d=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return S.jsx(hv,{...o,...r,ref:t})});_d.displayName=Tv;var Pv="DropdownMenuRadioGroup",Sd=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return S.jsx(pv,{...o,...r,ref:t})});Sd.displayName=Pv;var Ov="DropdownMenuRadioItem",xd=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return S.jsx(mv,{...o,...r,ref:t})});xd.displayName=Ov;var kv="DropdownMenuItemIndicator",Ad=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return S.jsx(gv,{...o,...r,ref:t})});Ad.displayName=kv;var Nv="DropdownMenuSeparator",Rd=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return S.jsx(bv,{...o,...r,ref:t})});Rd.displayName=Nv;var Iv="DropdownMenuArrow",Dv=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return S.jsx(yv,{...o,...r,ref:t})});Dv.displayName=Iv;var Mv=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,a=Ue(t),[i,c]=In({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return S.jsx(wv,{...a,open:i,onOpenChange:c,children:n})},Lv="DropdownMenuSubTrigger",Cd=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return S.jsx(vv,{...o,...r,ref:t})});Cd.displayName=Lv;var jv="DropdownMenuSubContent",Td=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return S.jsx(Ev,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Td.displayName=jv;var Hv=hd,Uv=md,Pd=gd,$v=yd,Wv=wd,Fv=vd,Kv=Ed,qv=_d,zv=Sd,Gv=xd,Od=Ad,Bv=Rd,Vv=Mv,Jv=Cd,Xv=Td;function kd({...e}){return S.jsx(Hv,{"data-slot":"dropdown-menu",...e})}function Yv({...e}){return S.jsx(Pd,{"data-slot":"dropdown-menu-portal",...e})}function Nd({...e}){return S.jsx(Uv,{"data-slot":"dropdown-menu-trigger",...e})}function Id({className:e,sideOffset:t=4,...n}){return S.jsx(Pd,{children:S.jsx($v,{"data-slot":"dropdown-menu-content",sideOffset:t,className:z("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function Zv({...e}){return S.jsx(Wv,{"data-slot":"dropdown-menu-group",...e})}function Us({className:e,inset:t,variant:n="default",...r}){return S.jsx(Kv,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:z("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function Qv({className:e,children:t,checked:n,...r}){return S.jsxs(qv,{"data-slot":"dropdown-menu-checkbox-item",className:z("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[S.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:S.jsx(Od,{children:S.jsx(Yp,{className:"size-4"})})}),t]})}function e0({...e}){return S.jsx(zv,{"data-slot":"dropdown-menu-radio-group",...e})}function t0({className:e,children:t,...n}){return S.jsxs(Gv,{"data-slot":"dropdown-menu-radio-item",className:z("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[S.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:S.jsx(Od,{children:S.jsx(em,{className:"size-2 fill-current"})})}),t]})}function Dd({className:e,inset:t,...n}){return S.jsx(Fv,{"data-slot":"dropdown-menu-label","data-inset":t,className:z("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function Md({className:e,...t}){return S.jsx(Bv,{"data-slot":"dropdown-menu-separator",className:z("bg-border -mx-1 my-1 h-px",e),...t})}function n0({className:e,...t}){return S.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:z("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function r0({...e}){return S.jsx(Vv,{"data-slot":"dropdown-menu-sub",...e})}function o0({className:e,inset:t,children:n,...r}){return S.jsxs(Jv,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:z("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...r,children:[n,S.jsx(ac,{className:"ml-auto size-4"})]})}function s0({className:e,...t}){return S.jsx(Xv,{"data-slot":"dropdown-menu-sub-content",className:z("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}const a0="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20141%2060'%3e%3cpath%20d='M0.059%2019.711V59.673H19.509V49.95H9.779V19.711H0.059Z'%20fill='%2385B9D1'%3e%3c/path%3e%3cpath%20d='M0%200L0.056%204.915V19.715H9.776V9.715H19.5V59.673H29.22V0H0Z'%20fill='%23F68029'%3e%3c/path%3e%3cpath%20d='M23.49%2019.717H9.776V29.439H23.49V19.717Z'%20fill='%23F68029'%3e%3c/path%3e%3cpath%20d='M0.0580006%2019.718L9.785%2029.445V19.718H0.0580006Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M9.777%2049.953L19.504%2059.679V49.953H9.777Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M50.213%2021.331C50.1839%2019.244%2050.325%2017.1581%2050.635%2015.094C50.8293%2013.6891%2051.2694%2012.3294%2051.935%2011.077C52.4295%2010.1519%2053.1979%209.4023%2054.135%208.93101C55.1033%208.49691%2056.1561%208.28375%2057.217%208.307C58.2628%208.27673%2059.3024%208.47715%2060.262%208.894C61.1441%209.33605%2061.8541%2010.059%2062.28%2010.949C62.8725%2012.1976%2063.2507%2013.5369%2063.399%2014.911C63.6554%2016.9922%2063.7717%2019.0882%2063.747%2021.185C63.7759%2023.338%2063.6421%2025.4901%2063.347%2027.623C63.1657%2029.0675%2062.7378%2030.4702%2062.082%2031.77C61.6022%2032.7122%2060.8471%2033.4862%2059.917%2033.989C58.9503%2034.4507%2057.888%2034.6768%2056.817%2034.649C55.7687%2034.6771%2054.7258%2034.4896%2053.753%2034.098C52.8534%2033.6775%2052.1275%2032.9579%2051.699%2032.062C51.0884%2030.7803%2050.7037%2029.4027%2050.562%2027.99C50.3018%2025.7802%2050.1852%2023.5559%2050.213%2021.331ZM54.913%2022.248C54.913%2023.6913%2054.9377%2024.9267%2054.987%2025.954C55.0147%2026.8043%2055.1127%2027.6509%2055.28%2028.485C55.3666%2029.0149%2055.5877%2029.5138%2055.922%2029.934C56.0643%2030.0868%2056.238%2030.207%2056.4312%2030.2862C56.6244%2030.3655%2056.8324%2030.4019%2057.041%2030.393C57.25%2030.3964%2057.4571%2030.3533%2057.6473%2030.2668C57.8375%2030.1803%2058.0062%2030.0526%2058.141%2029.893C58.4964%2029.4241%2058.7297%2028.8744%2058.82%2028.293C59.0025%2027.3609%2059.1128%2026.4161%2059.15%2025.467C59.2107%2024.3177%2059.2414%2022.936%2059.242%2021.322C59.242%2019.732%2059.224%2018.3747%2059.188%2017.25C59.169%2016.3373%2059.0736%2015.4278%2058.903%2014.531C58.8198%2013.9744%2058.5923%2013.4493%2058.243%2013.008C58.0929%2012.8491%2057.9104%2012.7244%2057.7078%2012.6422C57.5053%2012.5601%2057.2874%2012.5225%2057.069%2012.532C56.8667%2012.5304%2056.6668%2012.576%2056.4852%2012.6652C56.3036%2012.7544%2056.1453%2012.8848%2056.023%2013.046C55.6766%2013.5389%2055.4446%2014.103%2055.344%2014.697C55.1442%2015.6885%2055.0277%2016.695%2054.996%2017.706C54.9347%2018.9533%2054.904%2020.4697%2054.904%2022.255'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M83.329%2021.331C83.2999%2019.244%2083.441%2017.1581%2083.751%2015.094C83.9453%2013.6891%2084.3854%2012.3294%2085.051%2011.077C85.5455%2010.1519%2086.3139%209.40235%2087.251%208.93105C89.2087%208.112%2091.4106%208.09871%2093.378%208.89405C94.2601%209.33609%2094.9701%2010.0591%2095.396%2010.949C95.9885%2012.1976%2096.3667%2013.537%2096.515%2014.911C96.7714%2016.9922%2096.8877%2019.0883%2096.863%2021.185C96.8919%2023.3381%2096.7581%2025.4902%2096.463%2027.6231C96.2817%2029.0676%2095.8538%2030.4703%2095.198%2031.77C94.7182%2032.7123%2093.9631%2033.4862%2093.033%2033.989C92.0663%2034.4507%2091.004%2034.6769%2089.933%2034.649C88.8847%2034.6772%2087.8418%2034.4896%2086.869%2034.098C85.9694%2033.6775%2085.2435%2032.9579%2084.815%2032.062C84.2044%2030.7803%2083.8197%2029.4027%2083.678%2027.99C83.4178%2025.7803%2083.3012%2023.5559%2083.329%2021.331ZM88.029%2022.2481C88.029%2023.6914%2088.0537%2024.9267%2088.103%2025.954C88.1307%2026.8044%2088.2287%2027.6509%2088.396%2028.4851C88.4826%2029.015%2088.7037%2029.5139%2089.038%2029.934C89.1803%2030.0869%2089.354%2030.207%2089.5472%2030.2863C89.7404%2030.3655%2089.9484%2030.4019%2090.157%2030.393C90.366%2030.3964%2090.573%2030.3533%2090.7633%2030.2669C90.9535%2030.1804%2091.1222%2030.0527%2091.257%2029.893C91.6124%2029.4242%2091.8458%2028.8744%2091.936%2028.2931C92.1185%2027.3609%2092.2288%2026.4161%2092.266%2025.467C92.3267%2024.3177%2092.3574%2022.936%2092.358%2021.322C92.358%2019.732%2092.34%2018.3747%2092.304%2017.2501C92.2887%2016.3329%2092.1964%2015.4187%2092.028%2014.517C91.9448%2013.9605%2091.7173%2013.4354%2091.368%2012.994C91.2162%2012.8368%2091.0323%2012.7141%2090.8289%2012.6343C90.6255%2012.5544%2090.4072%2012.5192%2090.189%2012.531C89.9867%2012.5294%2089.7868%2012.575%2089.6052%2012.6643C89.4236%2012.7535%2089.2653%2012.8839%2089.143%2013.045C88.7966%2013.5379%2088.5646%2014.102%2088.464%2014.6961C88.2642%2015.6876%2088.1477%2016.6941%2088.116%2017.705C88.0547%2018.9524%2088.024%2020.4687%2088.024%2022.254'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M131.349%2034.65V8.32202H135.458V30.797H140.631V34.649L131.349%2034.65Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M71.95%2034.65V8.33203H76.059V30.796H81.232V34.648L71.95%2034.65Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M104.833%2014.692C104.934%2014.098%20105.166%2013.534%20105.512%2013.041C105.634%2012.8798%20105.793%2012.7494%20105.974%2012.6602C106.156%2012.571%20106.356%2012.5253%20106.558%2012.527H110.103V8.30798H106.703C105.642%208.2848%20104.589%208.49794%20103.621%208.93197C102.684%209.40306%20101.915%2010.1527%20101.421%2011.078C100.756%2012.3304%20100.316%2013.6901%20100.121%2015.095C99.8114%2017.1591%2099.6706%2019.245%2099.7%2021.332C99.6722%2023.5568%2099.7885%2025.7811%20100.048%2027.991C100.19%2029.4037%20100.574%2030.7812%20101.185%2032.063C101.614%2032.9584%20102.34%2033.6778%20103.239%2034.099C104.212%2034.4899%20105.255%2034.6771%20106.303%2034.649L110.103%2034.613V30.393H106.522C106.313%2030.402%20106.105%2030.3657%20105.912%2030.2866C105.719%2030.2076%20105.545%2030.0876%20105.403%2029.935C105.069%2029.5144%20104.848%2029.0152%20104.761%2028.485C104.594%2027.6509%20104.496%2026.8043%20104.468%2025.954C104.419%2024.9266%20104.394%2023.6916%20104.394%2022.249C104.394%2020.4636%20104.425%2018.9473%20104.486%2017.7C104.518%2016.6894%20104.633%2015.6832%20104.833%2014.692Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M46.728%2019.247H42.878V30.395H41.828C41.6182%2030.4039%2041.409%2030.3669%2041.2149%2030.2868C41.0208%2030.2067%2040.8465%2030.0853%2040.704%2029.931C40.3695%2029.5106%2040.1485%2029.0113%2040.062%2028.481C39.894%2027.647%2039.7956%2026.8004%2039.768%2025.95C39.7187%2024.9227%2039.6944%2023.6877%2039.695%2022.245C39.695%2020.4597%2039.7257%2018.9434%2039.787%2017.696C39.8191%2016.6854%2039.9355%2015.6792%2040.135%2014.688C40.2357%2014.094%2040.4677%2013.53%2040.814%2013.037C40.9376%2012.8768%2041.0968%2012.7476%2041.2791%2012.6598C41.4614%2012.5719%2041.6617%2012.5278%2041.864%2012.531H45.904V8.31202H42.012C40.9511%208.28877%2039.8983%208.50191%2038.93%208.93601C37.9927%209.40699%2037.2241%2010.1567%2036.73%2011.082C36.0644%2012.3344%2035.6243%2013.6941%2035.43%2015.099C35.1189%2017.1613%2034.9764%2019.2456%2035.004%2021.331C34.9762%2023.5559%2035.0925%2025.7802%2035.352%2027.99C35.494%2029.4026%2035.8787%2030.7802%2036.489%2032.062C36.9179%2032.9579%2037.6442%2033.6775%2038.544%2034.098C39.517%2034.4891%2040.5598%2034.6763%2041.608%2034.648L43.587%2034.629H46.727L46.728%2019.247Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M123.653%2029.87H118L116.691%2034.65H112.797L120.939%208L128.793%2034.65H124.856L123.653%2029.87ZM122.587%2026.212L120.893%2019.982L119.085%2026.212H122.587Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M39.016%2041.436H37.059V54.507H39.016V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M44.559%2041.436H46.384L48.331%2046.651C48.919%2048.1937%2049.4198%2049.7682%2049.831%2051.367C49.6744%2050.357%2049.5584%2049.4427%2049.483%2048.624C49.4077%2047.8054%2049.37%2047.0347%2049.37%2046.312V41.436H51.336V54.511H49.495L47.303%2048.627C47.103%2048.0797%2046.9134%2047.518%2046.734%2046.942C46.5547%2046.366%2046.39%2045.762%2046.24%2045.13C46.2274%2045.0507%2046.207%2044.9547%2046.179%2044.842C46.151%2044.7293%2046.1177%2044.5997%2046.079%2044.453C46.098%2044.6%2046.114%2044.725%2046.126%2044.829C46.138%2044.933%2046.148%2045.022%2046.154%2045.095L46.254%2046.424L46.354%2048.041C46.36%2048.131%2046.365%2048.241%2046.368%2048.371C46.371%2048.501%2046.368%2048.648%2046.368%2048.811L46.468%2054.511H44.559V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M55.493%2041.436H61.861V42.977H59.67V54.511H57.751V42.977H55.493V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M65.828%2041.436H71.028V42.926H67.787V47.065H70.665V48.555H67.787V53.016H71.028V54.506H65.828V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M75.906%2041.436H78.483C79.3332%2041.3696%2080.1787%2041.6132%2080.863%2042.122C81.2131%2042.4774%2081.4826%2042.904%2081.6531%2043.3729C81.8236%2043.8417%2081.8911%2044.3418%2081.851%2044.839C81.8876%2045.6248%2081.7066%2046.4055%2081.328%2047.095C81.1685%2047.3665%2080.9531%2047.6008%2080.696%2047.7826C80.4389%2047.9643%2080.1461%2048.0892%2079.837%2048.149L82.509%2054.507H80.525L77.863%2048.107V54.507H75.906V41.436ZM77.863%2047.227C78.1485%2047.2893%2078.4451%2047.279%2078.7256%2047.1969C79.0061%2047.1148%2079.2615%2046.9637%2079.4684%2046.7573C79.6753%2046.5509%2079.8271%2046.2959%2079.9098%2046.0156C79.9926%2045.7353%2080.0036%2045.4387%2079.942%2045.153C79.9472%2044.8034%2079.9137%2044.4543%2079.842%2044.112C79.7909%2043.8589%2079.6851%2043.62%2079.532%2043.412C79.3909%2043.2304%2079.2018%2043.0918%2078.986%2043.012C78.7308%2042.9221%2078.4615%2042.8791%2078.191%2042.885H77.862L77.863%2047.227Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M90.046%2041.06L85.913%2054.514H87.745L88.45%2051.974H91.496L92.135%2054.531H94.028L90.046%2041.06ZM88.876%2050.403L90.013%2046.703L91.048%2050.415L88.876%2050.403Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M106.344%2041.436H112.712V42.977H110.52V54.511H108.602V42.977H106.344V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M118.865%2041.462H116.908V54.533H118.865V41.462Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M134.181%2041.462H139.381V42.952H136.136V47.093H139.014V48.583H136.136V53.044H139.381V54.534H134.181V41.462Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M99.749%2044.338C99.8046%2044.0109%2099.9338%2043.7008%20100.127%2043.431C100.202%2043.3322%20100.3%2043.2523%20100.411%2043.1976C100.523%2043.1429%20100.646%2043.115%20100.77%2043.116H102.464V41.207H100.846C100.318%2041.1955%2099.7949%2041.3011%2099.313%2041.516C98.8543%2041.748%2098.4782%2042.1157%2098.236%2042.569C97.9008%2043.2016%2097.6788%2043.888%2097.58%2044.597C97.4215%2045.6561%2097.3493%2046.7263%2097.364%2047.797C97.3503%2048.9393%2097.4101%2050.0814%2097.543%2051.216C97.6145%2051.9294%2097.808%2052.6252%2098.115%2053.273C98.3244%2053.7086%2098.6776%2054.0586%2099.115%2054.264C99.6001%2054.458%20100.12%2054.5509%20100.642%2054.537L102.469%2054.52V52.61H100.755C100.629%2052.6147%20100.503%2052.592%20100.386%2052.5435C100.269%2052.495%20100.164%2052.4218%20100.078%2052.329C99.8888%2052.0951%2099.7637%2051.816%2099.715%2051.519C99.6273%2051.081%2099.5758%2050.6365%2099.561%2050.19C99.536%2049.66%2099.523%2049.014%2099.523%2048.27C99.523%2047.349%2099.539%2046.557%2099.57%2045.916C99.5873%2045.3865%2099.6485%2044.8594%2099.753%2044.34'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M128.799%2041.466L126.671%2048.91L124.671%2041.466H122.679L126.654%2054.953L130.774%2041.466H128.799Z'%20fill='%230A3763'%3e%3c/path%3e%3c/svg%3e";function i0(){const[e,t]=W.useState("");return W.useEffect(()=>{t(window.location.pathname);const r=()=>{t(window.location.pathname)},o=()=>{t(window.location.pathname)};return window.addEventListener("popstate",r),window.addEventListener("pushstate",o),window.addEventListener("replacestate",o),()=>{window.removeEventListener("popstate",r),window.removeEventListener("pushstate",o),window.removeEventListener("replacestate",o)}},[]),{currentPath:e,isActiveRoute:r=>!!(e===r||r!=="/"&&e.startsWith(r))}}var Gn={},$s={},Ws={},Fs={},Ks,Ld;function c0(){if(Ld)return Ks;Ld=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,o=(v,R)=>{for(var w in R)e(v,w,{get:R[w],enumerable:!0})},s=(v,R,w,x)=>{if(R&&typeof R=="object"||typeof R=="function")for(let C of n(R))!r.call(v,C)&&C!==w&&e(v,C,{get:()=>R[C],enumerable:!(x=t(R,C))||x.enumerable});return v},a=v=>s(e({},"__esModule",{value:!0}),v),i={};o(i,{RequestCookies:()=>p,ResponseCookies:()=>b,parseCookie:()=>u,parseSetCookie:()=>l,stringifyCookie:()=>c}),Ks=a(i);function c(v){var R;const w=["path"in v&&v.path&&`Path=${v.path}`,"expires"in v&&(v.expires||v.expires===0)&&`Expires=${(typeof v.expires=="number"?new Date(v.expires):v.expires).toUTCString()}`,"maxAge"in v&&typeof v.maxAge=="number"&&`Max-Age=${v.maxAge}`,"domain"in v&&v.domain&&`Domain=${v.domain}`,"secure"in v&&v.secure&&"Secure","httpOnly"in v&&v.httpOnly&&"HttpOnly","sameSite"in v&&v.sameSite&&`SameSite=${v.sameSite}`,"partitioned"in v&&v.partitioned&&"Partitioned","priority"in v&&v.priority&&`Priority=${v.priority}`].filter(Boolean),x=`${v.name}=${encodeURIComponent((R=v.value)!=null?R:"")}`;return w.length===0?x:`${x}; ${w.join("; ")}`}function u(v){const R=new Map;for(const w of v.split(/; */)){if(!w)continue;const x=w.indexOf("=");if(x===-1){R.set(w,"true");continue}const[C,D]=[w.slice(0,x),w.slice(x+1)];try{R.set(C,decodeURIComponent(D??"true"))}catch{}}return R}function l(v){if(!v)return;const[[R,w],...x]=u(v),{domain:C,expires:D,httponly:I,maxage:P,path:U,samesite:G,secure:oe,partitioned:V,priority:Y}=Object.fromEntries(x.map(([j,T])=>[j.toLowerCase().replace(/-/g,""),T])),O={name:R,value:decodeURIComponent(w),domain:C,...D&&{expires:new Date(D)},...I&&{httpOnly:!0},...typeof P=="string"&&{maxAge:Number(P)},path:U,...G&&{sameSite:m(G)},...oe&&{secure:!0},...Y&&{priority:y(Y)},...V&&{partitioned:!0}};return d(O)}function d(v){const R={};for(const w in v)v[w]&&(R[w]=v[w]);return R}var h=["strict","lax","none"];function m(v){return v=v.toLowerCase(),h.includes(v)?v:void 0}var E=["low","medium","high"];function y(v){return v=v.toLowerCase(),E.includes(v)?v:void 0}function g(v){if(!v)return[];var R=[],w=0,x,C,D,I,P;function U(){for(;w<v.length&&/\s/.test(v.charAt(w));)w+=1;return w<v.length}function G(){return C=v.charAt(w),C!=="="&&C!==";"&&C!==","}for(;w<v.length;){for(x=w,P=!1;U();)if(C=v.charAt(w),C===","){for(D=w,w+=1,U(),I=w;w<v.length&&G();)w+=1;w<v.length&&v.charAt(w)==="="?(P=!0,w=I,R.push(v.substring(x,D)),x=w):w=D+1}else w+=1;(!P||w>=v.length)&&R.push(v.substring(x,v.length))}return R}var p=class{constructor(v){this._parsed=new Map,this._headers=v;const R=v.get("cookie");if(R){const w=u(R);for(const[x,C]of w)this._parsed.set(x,{name:x,value:C})}}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...v){const R=typeof v[0]=="string"?v[0]:v[0].name;return this._parsed.get(R)}getAll(...v){var R;const w=Array.from(this._parsed);if(!v.length)return w.map(([C,D])=>D);const x=typeof v[0]=="string"?v[0]:(R=v[0])==null?void 0:R.name;return w.filter(([C])=>C===x).map(([C,D])=>D)}has(v){return this._parsed.has(v)}set(...v){const[R,w]=v.length===1?[v[0].name,v[0].value]:v,x=this._parsed;return x.set(R,{name:R,value:w}),this._headers.set("cookie",Array.from(x).map(([C,D])=>c(D)).join("; ")),this}delete(v){const R=this._parsed,w=Array.isArray(v)?v.map(x=>R.delete(x)):R.delete(v);return this._headers.set("cookie",Array.from(R).map(([x,C])=>c(C)).join("; ")),w}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(v=>`${v.name}=${encodeURIComponent(v.value)}`).join("; ")}},b=class{constructor(v){this._parsed=new Map;var R,w,x;this._headers=v;const C=(x=(w=(R=v.getSetCookie)==null?void 0:R.call(v))!=null?w:v.get("set-cookie"))!=null?x:[],D=Array.isArray(C)?C:g(C);for(const I of D){const P=l(I);P&&this._parsed.set(P.name,P)}}get(...v){const R=typeof v[0]=="string"?v[0]:v[0].name;return this._parsed.get(R)}getAll(...v){var R;const w=Array.from(this._parsed.values());if(!v.length)return w;const x=typeof v[0]=="string"?v[0]:(R=v[0])==null?void 0:R.name;return w.filter(C=>C.name===x)}has(v){return this._parsed.has(v)}set(...v){const[R,w,x]=v.length===1?[v[0].name,v[0].value,v[0]]:v,C=this._parsed;return C.set(R,A({name:R,value:w,...x})),f(C,this._headers),this}delete(...v){const[R,w]=typeof v[0]=="string"?[v[0]]:[v[0].name,v[0]];return this.set({...w,name:R,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(c).join("; ")}};function f(v,R){R.delete("set-cookie");for(const[,w]of v){const x=c(w);R.append("set-cookie",x)}}function A(v={name:"",value:""}){return typeof v.expires=="number"&&(v.expires=new Date(v.expires)),v.maxAge&&(v.expires=new Date(Date.now()+v.maxAge*1e3)),(v.path===null||v.path===void 0)&&(v.path="/"),v}return Ks}var jd;function Bn(){return jd||(jd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(r,o){for(var s in o)Object.defineProperty(r,s,{enumerable:!0,get:o[s]})}t(e,{RequestCookies:function(){return n.RequestCookies},ResponseCookies:function(){return n.ResponseCookies},stringifyCookie:function(){return n.stringifyCookie}});const n=c0()}(Fs)),Fs}var qs={},Hd;function zs(){return Hd||(Hd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ReflectAdapter",{enumerable:!0,get:function(){return t}});class t{static get(r,o,s){const a=Reflect.get(r,o,s);return typeof a=="function"?a.bind(r):a}static set(r,o,s,a){return Reflect.set(r,o,s,a)}static has(r,o){return Reflect.has(r,o)}static deleteProperty(r,o){return Reflect.deleteProperty(r,o)}}}(qs)),qs}var Gs={},Bs={},Vs={},Ud;function Js(){return Ud||(Ud=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,u){for(var l in u)Object.defineProperty(c,l,{enumerable:!0,get:u[l]})}t(e,{bindSnapshot:function(){return a},createAsyncLocalStorage:function(){return s},createSnapshot:function(){return i}});const n=Object.defineProperty(new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class r{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}static bind(u){return u}}const o=typeof globalThis<"u"&&globalThis.AsyncLocalStorage;function s(){return o?new o:new r}function a(c){return o?o.bind(c):r.bind(c)}function i(){return o?o.snapshot():function(c,...u){return c(...u)}}}(Vs)),Vs}var $d;function u0(){return $d||($d=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});const n=(0,Js().createAsyncLocalStorage)()}(Bs)),Bs}var Wd;function kt(){return Wd||(Wd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"workAsyncStorage",{enumerable:!0,get:function(){return t.workAsyncStorageInstance}});const t=u0()}(Gs)),Gs}var Xs={},Ys={},Fd;function l0(){return Fd||(Fd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"workUnitAsyncStorageInstance",{enumerable:!0,get:function(){return n}});const n=(0,Js().createAsyncLocalStorage)()}(Ys)),Ys}var Kr={exports:{}},Kd;function d0(){return Kd||(Kd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(f,A){for(var v in A)Object.defineProperty(f,v,{enumerable:!0,get:A[v]})}n(t,{ACTION_HEADER:function(){return o},FLIGHT_HEADERS:function(){return h},NEXT_DID_POSTPONE_HEADER:function(){return y},NEXT_HMR_REFRESH_HASH_COOKIE:function(){return u},NEXT_HMR_REFRESH_HEADER:function(){return c},NEXT_IS_PRERENDER_HEADER:function(){return b},NEXT_REWRITTEN_PATH_HEADER:function(){return g},NEXT_REWRITTEN_QUERY_HEADER:function(){return p},NEXT_ROUTER_PREFETCH_HEADER:function(){return a},NEXT_ROUTER_SEGMENT_PREFETCH_HEADER:function(){return i},NEXT_ROUTER_STALE_TIME_HEADER:function(){return E},NEXT_ROUTER_STATE_TREE_HEADER:function(){return s},NEXT_RSC_UNION_QUERY:function(){return m},NEXT_URL:function(){return l},RSC_CONTENT_TYPE_HEADER:function(){return d},RSC_HEADER:function(){return r}});const r="RSC",o="Next-Action",s="Next-Router-State-Tree",a="Next-Router-Prefetch",i="Next-Router-Segment-Prefetch",c="Next-HMR-Refresh",u="__next_hmr_refresh_hash__",l="Next-Url",d="text/x-component",h=[r,s,a,c,i],m="_rsc",E="x-nextjs-stale-time",y="x-nextjs-postponed",g="x-nextjs-rewritten-path",p="x-nextjs-rewritten-query",b="x-nextjs-prerender";(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Kr,Kr.exports)),Kr.exports}var qd;function Kt(){return qd||(qd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,d){for(var h in d)Object.defineProperty(l,h,{enumerable:!0,get:d[h]})}t(e,{getDraftModeProviderForCacheScope:function(){return u},getExpectedRequestStore:function(){return o},getHmrRefreshHash:function(){return c},getPrerenderResumeDataCache:function(){return a},getRenderResumeDataCache:function(){return i},throwForMissingRequestStore:function(){return s},workUnitAsyncStorage:function(){return n.workUnitAsyncStorageInstance}});const n=l0(),r=d0();function o(l){const d=n.workUnitAsyncStorageInstance.getStore();switch(d||s(l),d.type){case"request":return d;case"prerender":case"prerender-ppr":case"prerender-legacy":throw Object.defineProperty(new Error(`\`${l}\` cannot be called inside a prerender. This is a bug in Next.js.`),"__NEXT_ERROR_CODE",{value:"E401",enumerable:!1,configurable:!0});case"cache":throw Object.defineProperty(new Error(`\`${l}\` cannot be called inside "use cache". Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E37",enumerable:!1,configurable:!0});case"unstable-cache":throw Object.defineProperty(new Error(`\`${l}\` cannot be called inside unstable_cache. Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E69",enumerable:!1,configurable:!0});default:return d}}function s(l){throw Object.defineProperty(new Error(`\`${l}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E251",enumerable:!1,configurable:!0})}function a(l){return l.type==="prerender"||l.type==="prerender-ppr"?l.prerenderResumeDataCache:null}function i(l){return l.type!=="prerender-legacy"&&l.type!=="cache"&&l.type!=="unstable-cache"?l.type==="request"?l.renderResumeDataCache:l.prerenderResumeDataCache:null}function c(l,d){var h;if(l.dev)return d.type==="cache"||d.type==="prerender"?d.hmrRefreshHash:d.type==="request"?(h=d.cookies.get(r.NEXT_HMR_REFRESH_HASH_COOKIE))==null?void 0:h.value:void 0}function u(l,d){if(l.isDraftMode)switch(d.type){case"cache":case"unstable-cache":case"request":return d.draftMode;default:return}}}(Xs)),Xs}var zd;function f0(){return zd||(zd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(g,p){for(var b in p)Object.defineProperty(g,b,{enumerable:!0,get:p[b]})}t(e,{MutableRequestCookiesAdapter:function(){return d},ReadonlyRequestCookiesError:function(){return a},RequestCookiesAdapter:function(){return i},appendMutableCookies:function(){return l},areCookiesMutableInCurrentPhase:function(){return m},getModifiedCookieValues:function(){return u},responseCookiesToRequestCookies:function(){return y},wrapWithMutableAccessCheck:function(){return h}});const n=Bn(),r=zs(),o=kt(),s=Kt();class a extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options")}static callable(){throw new a}}class i{static seal(p){return new Proxy(p,{get(b,f,A){switch(f){case"clear":case"delete":case"set":return a.callable;default:return r.ReflectAdapter.get(b,f,A)}}})}}const c=Symbol.for("next.mutated.cookies");function u(g){const p=g[c];return!p||!Array.isArray(p)||p.length===0?[]:p}function l(g,p){const b=u(p);if(b.length===0)return!1;const f=new n.ResponseCookies(g),A=f.getAll();for(const v of b)f.set(v);for(const v of A)f.set(v);return!0}class d{static wrap(p,b){const f=new n.ResponseCookies(new Headers);for(const x of p.getAll())f.set(x);let A=[];const v=new Set,R=()=>{const x=o.workAsyncStorage.getStore();if(x&&(x.pathWasRevalidated=!0),A=f.getAll().filter(D=>v.has(D.name)),b){const D=[];for(const I of A){const P=new n.ResponseCookies(new Headers);P.set(I),D.push(P.toString())}b(D)}},w=new Proxy(f,{get(x,C,D){switch(C){case c:return A;case"delete":return function(...I){v.add(typeof I[0]=="string"?I[0]:I[0].name);try{return x.delete(...I),w}finally{R()}};case"set":return function(...I){v.add(typeof I[0]=="string"?I[0]:I[0].name);try{return x.set(...I),w}finally{R()}};default:return r.ReflectAdapter.get(x,C,D)}}});return w}}function h(g){const p=new Proxy(g,{get(b,f,A){switch(f){case"delete":return function(...v){return E("cookies().delete"),b.delete(...v),p};case"set":return function(...v){return E("cookies().set"),b.set(...v),p};default:return r.ReflectAdapter.get(b,f,A)}}});return p}function m(g){return g.phase==="action"}function E(g){const p=(0,s.getExpectedRequestStore)(g);if(!m(p))throw new a}function y(g){const p=new n.RequestCookies(new Headers);for(const b of g.getAll())p.set(b);return p}}(Ws)),Ws}var Zs={},qr={exports:{}},Gd;function Bd(){return Gd||(Gd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}n(t,{DynamicServerError:function(){return o},isDynamicServerError:function(){return s}});const r="DYNAMIC_SERVER_USAGE";class o extends Error{constructor(i){super("Dynamic server usage: "+i),this.description=i,this.digest=r}}function s(a){return typeof a!="object"||a===null||!("digest"in a)||typeof a.digest!="string"?!1:a.digest===r}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(qr,qr.exports)),qr.exports}var zr={exports:{}},Vd;function mn(){return Vd||(Vd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}n(t,{StaticGenBailoutError:function(){return o},isStaticGenBailoutError:function(){return s}});const r="NEXT_STATIC_GEN_BAILOUT";class o extends Error{constructor(...i){super(...i),this.code=r}}function s(a){return typeof a!="object"||a===null||!("code"in a)?!1:a.code===r}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(zr,zr.exports)),zr.exports}var Qs={},Jd;function Vn(){return Jd||(Jd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,u){for(var l in u)Object.defineProperty(c,l,{enumerable:!0,get:u[l]})}t(e,{isHangingPromiseRejectionError:function(){return n},makeHangingPromise:function(){return a}});function n(c){return typeof c!="object"||c===null||!("digest"in c)?!1:c.digest===r}const r="HANGING_PROMISE_REJECTION";class o extends Error{constructor(u){super(`During prerendering, ${u} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${u} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context.`),this.expression=u,this.digest=r}}const s=new WeakMap;function a(c,u){if(c.aborted)return Promise.reject(new o(u));{const l=new Promise((d,h)=>{const m=h.bind(null,new o(u));let E=s.get(c);if(E)E.push(m);else{const y=[m];s.set(c,y),c.addEventListener("abort",()=>{for(let g=0;g<y.length;g++)y[g]()},{once:!0})}});return l.catch(i),l}}function i(){}}(Qs)),Qs}var ea={},Xd;function h0(){return Xd||(Xd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,a){for(var i in a)Object.defineProperty(s,i,{enumerable:!0,get:a[i]})}t(e,{METADATA_BOUNDARY_NAME:function(){return n},OUTLET_BOUNDARY_NAME:function(){return o},VIEWPORT_BOUNDARY_NAME:function(){return r}});const n="__next_metadata_boundary__",r="__next_viewport_boundary__",o="__next_outlet_boundary__"}(ea)),ea}var ta={},Yd;function na(){return Yd||(Yd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{atLeastOneTask:function(){return o},scheduleImmediate:function(){return r},scheduleOnNextTick:function(){return n},waitAtLeastOneReactRenderTask:function(){return s}});const n=a=>{Promise.resolve().then(()=>{process.env.NEXT_RUNTIME==="edge"?setTimeout(a,0):process.nextTick(a)})},r=a=>{process.env.NEXT_RUNTIME==="edge"?setTimeout(a,0):setImmediate(a)};function o(){return new Promise(a=>r(a))}function s(){return process.env.NEXT_RUNTIME==="edge"?new Promise(a=>setTimeout(a,0)):new Promise(a=>setImmediate(a))}}(ta)),ta}var Zd;function Jn(){return Zd||(Zd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(k,N){for(var M in N)Object.defineProperty(k,M,{enumerable:!0,get:N[M]})}t(e,{Postpone:function(){return x},abortAndThrowOnSynchronousRequestDataAccess:function(){return R},abortOnSynchronousPlatformIOAccess:function(){return A},accessedDynamicData:function(){return V},annotateDynamicAccess:function(){return J},consumeDynamicAccess:function(){return Y},createDynamicTrackingState:function(){return h},createDynamicValidationState:function(){return m},createHangingInputAbortSignal:function(){return H},createPostponedAbortSignal:function(){return T},formatDynamicAPIAccesses:function(){return O},getFirstDynamicReason:function(){return E},isDynamicPostpone:function(){return I},isPrerenderInterruptedError:function(){return oe},markCurrentScopeAsDynamic:function(){return y},postponeWithTracking:function(){return C},throwIfDisallowedDynamic:function(){return be},throwToInterruptStaticGeneration:function(){return p},trackAllowedDynamicAccess:function(){return le},trackDynamicDataInDynamicRender:function(){return b},trackFallbackParamAccessed:function(){return g},trackSynchronousPlatformIOAccessInDev:function(){return v},trackSynchronousRequestDataAccessInDev:function(){return w},useDynamicRouteParams:function(){return X}});const n=l(W),r=Bd(),o=mn(),s=Kt(),a=kt(),i=Vn(),c=h0(),u=na();function l(k){return k&&k.__esModule?k:{default:k}}const d=typeof n.default.unstable_postpone=="function";function h(k){return{isDebugDynamicAccesses:k,dynamicAccesses:[],syncDynamicExpression:void 0,syncDynamicErrorWithStack:null}}function m(){return{hasSuspendedDynamic:!1,hasDynamicMetadata:!1,hasDynamicViewport:!1,hasSyncDynamicErrors:!1,dynamicErrors:[]}}function E(k){var N;return(N=k.dynamicAccesses[0])==null?void 0:N.expression}function y(k,N,M){if(!(N&&(N.type==="cache"||N.type==="unstable-cache"))&&!(k.forceDynamic||k.forceStatic)){if(k.dynamicShouldError)throw Object.defineProperty(new o.StaticGenBailoutError(`Route ${k.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${M}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(N)if(N.type==="prerender-ppr")C(k.route,M,N.dynamicTracking);else if(N.type==="prerender-legacy"){N.revalidate=0;const q=Object.defineProperty(new r.DynamicServerError(`Route ${k.route} couldn't be rendered statically because it used ${M}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E550",enumerable:!1,configurable:!0});throw k.dynamicUsageDescription=M,k.dynamicUsageStack=q.stack,q}else process.env.NODE_ENV==="development"&&N&&N.type==="request"&&(N.usedDynamic=!0)}}function g(k,N){const M=s.workUnitAsyncStorage.getStore();!M||M.type!=="prerender-ppr"||C(k.route,N,M.dynamicTracking)}function p(k,N,M){const q=Object.defineProperty(new r.DynamicServerError(`Route ${N.route} couldn't be rendered statically because it used \`${k}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw M.revalidate=0,N.dynamicUsageDescription=k,N.dynamicUsageStack=q.stack,q}function b(k,N){if(N){if(N.type==="cache"||N.type==="unstable-cache")return;(N.type==="prerender"||N.type==="prerender-legacy")&&(N.revalidate=0),process.env.NODE_ENV==="development"&&N.type==="request"&&(N.usedDynamic=!0)}}function f(k,N,M){const q=`Route ${k} needs to bail out of prerendering at this point because it used ${N}.`,ne=G(q);M.controller.abort(ne);const $=M.dynamicTracking;$&&$.dynamicAccesses.push({stack:$.isDebugDynamicAccesses?new Error().stack:void 0,expression:N})}function A(k,N,M,q){const ne=q.dynamicTracking;ne&&ne.syncDynamicErrorWithStack===null&&(ne.syncDynamicExpression=N,ne.syncDynamicErrorWithStack=M),f(k,N,q)}function v(k){k.prerenderPhase=!1}function R(k,N,M,q){if(q.controller.signal.aborted===!1){const $=q.dynamicTracking;$&&$.syncDynamicErrorWithStack===null&&($.syncDynamicExpression=N,$.syncDynamicErrorWithStack=M,q.validating===!0&&($.syncDynamicLogged=!0)),f(k,N,q)}throw G(`Route ${k} needs to bail out of prerendering at this point because it used ${N}.`)}const w=v;function x({reason:k,route:N}){const M=s.workUnitAsyncStorage.getStore(),q=M&&M.type==="prerender-ppr"?M.dynamicTracking:null;C(N,k,q)}function C(k,N,M){j(),M&&M.dynamicAccesses.push({stack:M.isDebugDynamicAccesses?new Error().stack:void 0,expression:N}),n.default.unstable_postpone(D(k,N))}function D(k,N){return`Route ${k} needs to bail out of prerendering at this point because it used ${N}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`}function I(k){return typeof k=="object"&&k!==null&&typeof k.message=="string"?P(k.message):!1}function P(k){return k.includes("needs to bail out of prerendering at this point because it used")&&k.includes("Learn more: https://nextjs.org/docs/messages/ppr-caught-error")}if(P(D("%%%","^^^"))===!1)throw Object.defineProperty(new Error("Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E296",enumerable:!1,configurable:!0});const U="NEXT_PRERENDER_INTERRUPTED";function G(k){const N=Object.defineProperty(new Error(k),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return N.digest=U,N}function oe(k){return typeof k=="object"&&k!==null&&k.digest===U&&"name"in k&&"message"in k&&k instanceof Error}function V(k){return k.length>0}function Y(k,N){return k.dynamicAccesses.push(...N.dynamicAccesses),k.dynamicAccesses}function O(k){return k.filter(N=>typeof N.stack=="string"&&N.stack.length>0).map(({expression:N,stack:M})=>(M=M.split(`
183
+ `).slice(4).filter(q=>!(q.includes("node_modules/next/")||q.includes(" (<anonymous>)")||q.includes(" (node:"))).join(`
184
+ `),`Dynamic API Usage Debug - ${N}:
185
+ ${M}`))}function j(){if(!d)throw Object.defineProperty(new Error("Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E224",enumerable:!1,configurable:!0})}function T(k){j();const N=new AbortController;try{n.default.unstable_postpone(k)}catch(M){N.abort(M)}return N.signal}function H(k){const N=new AbortController;return k.cacheSignal?k.cacheSignal.inputReady().then(()=>{N.abort()}):(0,u.scheduleOnNextTick)(()=>N.abort()),N.signal}function J(k,N){const M=N.dynamicTracking;M&&M.dynamicAccesses.push({stack:M.isDebugDynamicAccesses?new Error().stack:void 0,expression:k})}function X(k){const N=a.workAsyncStorage.getStore();if(N&&N.isStaticGeneration&&N.fallbackRouteParams&&N.fallbackRouteParams.size>0){const M=s.workUnitAsyncStorage.getStore();M&&(M.type==="prerender"?n.default.use((0,i.makeHangingPromise)(M.renderSignal,k)):M.type==="prerender-ppr"?C(N.route,k,M.dynamicTracking):M.type==="prerender-legacy"&&p(k,N,M))}}const se=/\n\s+at Suspense \(<anonymous>\)/,fe=new RegExp(`\\n\\s+at ${c.METADATA_BOUNDARY_NAME}[\\n\\s]`),ye=new RegExp(`\\n\\s+at ${c.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`),te=new RegExp(`\\n\\s+at ${c.OUTLET_BOUNDARY_NAME}[\\n\\s]`);function le(k,N,M,q,ne){if(!te.test(N))if(fe.test(N)){M.hasDynamicMetadata=!0;return}else if(ye.test(N)){M.hasDynamicViewport=!0;return}else if(se.test(N)){M.hasSuspendedDynamic=!0;return}else if(q.syncDynamicErrorWithStack||ne.syncDynamicErrorWithStack){M.hasSyncDynamicErrors=!0;return}else{const $=`Route "${k}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. We don't have the exact line number added to error messages yet but you can see which component in the stack below. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`,Ee=ue($,N);M.dynamicErrors.push(Ee);return}}function ue(k,N){const M=Object.defineProperty(new Error(k),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return M.stack="Error: "+k+N,M}function be(k,N,M,q){let ne,$,Ee;if(M.syncDynamicErrorWithStack?(ne=M.syncDynamicErrorWithStack,$=M.syncDynamicExpression,Ee=M.syncDynamicLogged===!0):q.syncDynamicErrorWithStack?(ne=q.syncDynamicErrorWithStack,$=q.syncDynamicExpression,Ee=q.syncDynamicLogged===!0):(ne=null,$=void 0,Ee=!1),N.hasSyncDynamicErrors&&ne)throw Ee||console.error(ne),new o.StaticGenBailoutError;const Ce=N.dynamicErrors;if(Ce.length){for(let pe=0;pe<Ce.length;pe++)console.error(Ce[pe]);throw new o.StaticGenBailoutError}if(!N.hasSuspendedDynamic){if(N.hasDynamicMetadata)throw ne?(console.error(ne),Object.defineProperty(new o.StaticGenBailoutError(`Route "${k}" has a \`generateMetadata\` that could not finish rendering before ${$} was used. Follow the instructions in the error for this expression to resolve.`),"__NEXT_ERROR_CODE",{value:"E608",enumerable:!1,configurable:!0})):Object.defineProperty(new o.StaticGenBailoutError(`Route "${k}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or external data (\`fetch(...)\`, etc...) but the rest of the route was static or only used cached data (\`"use cache"\`). If you expected this route to be prerenderable update your \`generateMetadata\` to not use Request data and only use cached external data. Otherwise, add \`await connection()\` somewhere within this route to indicate explicitly it should not be prerendered.`),"__NEXT_ERROR_CODE",{value:"E534",enumerable:!1,configurable:!0});if(N.hasDynamicViewport)throw ne?(console.error(ne),Object.defineProperty(new o.StaticGenBailoutError(`Route "${k}" has a \`generateViewport\` that could not finish rendering before ${$} was used. Follow the instructions in the error for this expression to resolve.`),"__NEXT_ERROR_CODE",{value:"E573",enumerable:!1,configurable:!0})):Object.defineProperty(new o.StaticGenBailoutError(`Route "${k}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or external data (\`fetch(...)\`, etc...) but the rest of the route was static or only used cached data (\`"use cache"\`). If you expected this route to be prerenderable update your \`generateViewport\` to not use Request data and only use cached external data. Otherwise, add \`await connection()\` somewhere within this route to indicate explicitly it should not be prerendered.`),"__NEXT_ERROR_CODE",{value:"E590",enumerable:!1,configurable:!0})}}}(Zs)),Zs}var ra={},Qd;function oa(){return Qd||(Qd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"createDedupedByCallsiteServerErrorLoggerDev",{enumerable:!0,get:function(){return c}});const t=r(W);function n(u){if(typeof WeakMap!="function")return null;var l=new WeakMap,d=new WeakMap;return(n=function(h){return h?d:l})(u)}function r(u,l){if(u&&u.__esModule)return u;if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var d=n(l);if(d&&d.has(u))return d.get(u);var h={__proto__:null},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var E in u)if(E!=="default"&&Object.prototype.hasOwnProperty.call(u,E)){var y=m?Object.getOwnPropertyDescriptor(u,E):null;y&&(y.get||y.set)?Object.defineProperty(h,E,y):h[E]=u[E]}return h.default=u,d&&d.set(u,h),h}const o={current:null},s=typeof t.cache=="function"?t.cache:u=>u,a=process.env.__NEXT_DYNAMIC_IO?console.error:console.warn,i=s(u=>{try{a(o.current)}finally{o.current=null}});function c(u){return function(...d){const h=u(...d);if(process.env.NODE_ENV!=="production"){var m;const E=(m=new Error().stack)==null?void 0:m.split(`
186
+ `);if(E===void 0||E.length<4)a(h);else{const y=E[4];o.current=h,i(y)}}else a(h)}}}(ra)),ra}var sa={},aa={},ia={},ef;function p0(){return ef||(ef=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"afterTaskAsyncStorageInstance",{enumerable:!0,get:function(){return n}});const n=(0,Js().createAsyncLocalStorage)()}(ia)),ia}var tf;function m0(){return tf||(tf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"afterTaskAsyncStorage",{enumerable:!0,get:function(){return t.afterTaskAsyncStorageInstance}});const t=p0()}(aa)),aa}var nf;function ca(){return nf||(nf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,u){for(var l in u)Object.defineProperty(c,l,{enumerable:!0,get:u[l]})}t(e,{isRequestAPICallableInsideAfter:function(){return i},throwForSearchParamsAccessInUseCache:function(){return a},throwWithStaticGenerationBailoutError:function(){return o},throwWithStaticGenerationBailoutErrorWithDynamicError:function(){return s}});const n=mn(),r=m0();function o(c,u){throw Object.defineProperty(new n.StaticGenBailoutError(`Route ${c} couldn't be rendered statically because it used ${u}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E576",enumerable:!1,configurable:!0})}function s(c,u){throw Object.defineProperty(new n.StaticGenBailoutError(`Route ${c} with \`dynamic = "error"\` couldn't be rendered statically because it used ${u}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E543",enumerable:!1,configurable:!0})}function a(c){const u=Object.defineProperty(new Error(`Route ${c.route} used "searchParams" inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "searchParams" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E634",enumerable:!1,configurable:!0});throw c.invalidUsageError??(c.invalidUsageError=u),u}function i(){const c=r.afterTaskAsyncStorage.getStore();return(c==null?void 0:c.rootTaskSpawnPhase)==="action"}}(sa)),sa}var rf;function g0(){return rf||(rf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"cookies",{enumerable:!0,get:function(){return d}});const t=f0(),n=Bn(),r=kt(),o=Kt(),s=Jn(),a=mn(),i=Vn(),c=oa(),u=na(),l=ca();function d(){const w="cookies",x=r.workAsyncStorage.getStore(),C=o.workUnitAsyncStorage.getStore();if(x){if(C&&C.phase==="after"&&!(0,l.isRequestAPICallableInsideAfter)())throw Object.defineProperty(new Error(`Route ${x.route} used "cookies" inside "after(...)". This is not supported. If you need this data inside an "after" callback, use "cookies" outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E88",enumerable:!1,configurable:!0});if(x.forceStatic){const P=h();return y(P)}if(C){if(C.type==="cache")throw Object.defineProperty(new Error(`Route ${x.route} used "cookies" inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "cookies" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E398",enumerable:!1,configurable:!0});if(C.type==="unstable-cache")throw Object.defineProperty(new Error(`Route ${x.route} used "cookies" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "cookies" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E157",enumerable:!1,configurable:!0})}if(x.dynamicShouldError)throw Object.defineProperty(new a.StaticGenBailoutError(`Route ${x.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E549",enumerable:!1,configurable:!0});if(C){if(C.type==="prerender")return E(x.route,C);C.type==="prerender-ppr"?(0,s.postponeWithTracking)(x.route,w,C.dynamicTracking):C.type==="prerender-legacy"&&(0,s.throwToInterruptStaticGeneration)(w,x,C)}(0,s.trackDynamicDataInDynamicRender)(x,C)}const D=(0,o.getExpectedRequestStore)(w);let I;return(0,t.areCookiesMutableInCurrentPhase)(D)?I=D.userspaceMutableCookies:I=D.cookies,process.env.NODE_ENV==="development"&&!(x!=null&&x.isPrefetchRequest)?g(I,x==null?void 0:x.route):y(I)}function h(){return t.RequestCookiesAdapter.seal(new n.RequestCookies(new Headers({})))}const m=new WeakMap;function E(w,x){const C=m.get(x);if(C)return C;const D=(0,i.makeHangingPromise)(x.renderSignal,"`cookies()`");return m.set(x,D),Object.defineProperties(D,{[Symbol.iterator]:{value:function(){const I="`cookies()[Symbol.iterator]()`",P=A(w,I);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,I,P,x)}},size:{get(){const I="`cookies().size`",P=A(w,I);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,I,P,x)}},get:{value:function(){let P;arguments.length===0?P="`cookies().get()`":P=`\`cookies().get(${p(arguments[0])})\``;const U=A(w,P);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,P,U,x)}},getAll:{value:function(){let P;arguments.length===0?P="`cookies().getAll()`":P=`\`cookies().getAll(${p(arguments[0])})\``;const U=A(w,P);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,P,U,x)}},has:{value:function(){let P;arguments.length===0?P="`cookies().has()`":P=`\`cookies().has(${p(arguments[0])})\``;const U=A(w,P);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,P,U,x)}},set:{value:function(){let P;if(arguments.length===0)P="`cookies().set()`";else{const G=arguments[0];G?P=`\`cookies().set(${p(G)}, ...)\``:P="`cookies().set(...)`"}const U=A(w,P);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,P,U,x)}},delete:{value:function(){let I;arguments.length===0?I="`cookies().delete()`":arguments.length===1?I=`\`cookies().delete(${p(arguments[0])})\``:I=`\`cookies().delete(${p(arguments[0])}, ...)\``;const P=A(w,I);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,I,P,x)}},clear:{value:function(){const P="`cookies().clear()`",U=A(w,P);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,P,U,x)}},toString:{value:function(){const P="`cookies().toString()`",U=A(w,P);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,P,U,x)}}}),D}function y(w){const x=m.get(w);if(x)return x;const C=Promise.resolve(w);return m.set(w,C),Object.defineProperties(C,{[Symbol.iterator]:{value:w[Symbol.iterator]?w[Symbol.iterator].bind(w):v.bind(w)},size:{get(){return w.size}},get:{value:w.get.bind(w)},getAll:{value:w.getAll.bind(w)},has:{value:w.has.bind(w)},set:{value:w.set.bind(w)},delete:{value:w.delete.bind(w)},clear:{value:typeof w.clear=="function"?w.clear.bind(w):R.bind(w,C)},toString:{value:w.toString.bind(w)}}),C}function g(w,x){const C=m.get(w);if(C)return C;const D=new Promise(I=>(0,u.scheduleImmediate)(()=>I(w)));return m.set(w,D),Object.defineProperties(D,{[Symbol.iterator]:{value:function(){return b(x,"`...cookies()` or similar iteration"),w[Symbol.iterator]?w[Symbol.iterator].apply(w,arguments):v.call(w)},writable:!1},size:{get(){return b(x,"`cookies().size`"),w.size}},get:{value:function(){let P;return arguments.length===0?P="`cookies().get()`":P=`\`cookies().get(${p(arguments[0])})\``,b(x,P),w.get.apply(w,arguments)},writable:!1},getAll:{value:function(){let P;return arguments.length===0?P="`cookies().getAll()`":P=`\`cookies().getAll(${p(arguments[0])})\``,b(x,P),w.getAll.apply(w,arguments)},writable:!1},has:{value:function(){let P;return arguments.length===0?P="`cookies().has()`":P=`\`cookies().has(${p(arguments[0])})\``,b(x,P),w.has.apply(w,arguments)},writable:!1},set:{value:function(){let P;if(arguments.length===0)P="`cookies().set()`";else{const U=arguments[0];U?P=`\`cookies().set(${p(U)}, ...)\``:P="`cookies().set(...)`"}return b(x,P),w.set.apply(w,arguments)},writable:!1},delete:{value:function(){let I;return arguments.length===0?I="`cookies().delete()`":arguments.length===1?I=`\`cookies().delete(${p(arguments[0])})\``:I=`\`cookies().delete(${p(arguments[0])}, ...)\``,b(x,I),w.delete.apply(w,arguments)},writable:!1},clear:{value:function(){return b(x,"`cookies().clear()`"),typeof w.clear=="function"?w.clear.apply(w,arguments):R.call(w,D)},writable:!1},toString:{value:function(){return b(x,"`cookies().toString()` or implicit casting"),w.toString.apply(w,arguments)},writable:!1}}),D}function p(w){return typeof w=="object"&&w!==null&&typeof w.name=="string"?`'${w.name}'`:typeof w=="string"?`'${w}'`:"..."}function b(w,x){const C=o.workUnitAsyncStorage.getStore();if(C&&C.type==="request"&&C.prerenderPhase===!0){const D=C;(0,s.trackSynchronousRequestDataAccessInDev)(D)}f(w,x)}const f=(0,c.createDedupedByCallsiteServerErrorLoggerDev)(A);function A(w,x){const C=w?`Route "${w}" `:"This route ";return Object.defineProperty(new Error(`${C}used ${x}. \`cookies()\` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E223",enumerable:!1,configurable:!0})}function v(){return this.getAll().map(w=>[w.name,w]).values()}function R(w){for(const x of this.getAll())this.delete(x.name);return w}}($s)),$s}var ua={},la={},of;function b0(){return of||(of=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,a){for(var i in a)Object.defineProperty(s,i,{enumerable:!0,get:a[i]})}t(e,{HeadersAdapter:function(){return o},ReadonlyHeadersError:function(){return r}});const n=zs();class r extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new r}}class o extends Headers{constructor(a){super(),this.headers=new Proxy(a,{get(i,c,u){if(typeof c=="symbol")return n.ReflectAdapter.get(i,c,u);const l=c.toLowerCase(),d=Object.keys(a).find(h=>h.toLowerCase()===l);if(!(typeof d>"u"))return n.ReflectAdapter.get(i,d,u)},set(i,c,u,l){if(typeof c=="symbol")return n.ReflectAdapter.set(i,c,u,l);const d=c.toLowerCase(),h=Object.keys(a).find(m=>m.toLowerCase()===d);return n.ReflectAdapter.set(i,h??c,u,l)},has(i,c){if(typeof c=="symbol")return n.ReflectAdapter.has(i,c);const u=c.toLowerCase(),l=Object.keys(a).find(d=>d.toLowerCase()===u);return typeof l>"u"?!1:n.ReflectAdapter.has(i,l)},deleteProperty(i,c){if(typeof c=="symbol")return n.ReflectAdapter.deleteProperty(i,c);const u=c.toLowerCase(),l=Object.keys(a).find(d=>d.toLowerCase()===u);return typeof l>"u"?!0:n.ReflectAdapter.deleteProperty(i,l)}})}static seal(a){return new Proxy(a,{get(i,c,u){switch(c){case"append":case"delete":case"set":return r.callable;default:return n.ReflectAdapter.get(i,c,u)}}})}merge(a){return Array.isArray(a)?a.join(", "):a}static from(a){return a instanceof Headers?a:new o(a)}append(a,i){const c=this.headers[a];typeof c=="string"?this.headers[a]=[c,i]:Array.isArray(c)?c.push(i):this.headers[a]=i}delete(a){delete this.headers[a]}get(a){const i=this.headers[a];return typeof i<"u"?this.merge(i):null}has(a){return typeof this.headers[a]<"u"}set(a,i){this.headers[a]=i}forEach(a,i){for(const[c,u]of this.entries())a.call(i,u,c,this)}*entries(){for(const a of Object.keys(this.headers)){const i=a.toLowerCase(),c=this.get(i);yield[i,c]}}*keys(){for(const a of Object.keys(this.headers))yield a.toLowerCase()}*values(){for(const a of Object.keys(this.headers))yield this.get(a)}[Symbol.iterator](){return this.entries()}}}(la)),la}var sf;function y0(){return sf||(sf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"headers",{enumerable:!0,get:function(){return l}});const t=b0(),n=kt(),r=Kt(),o=Jn(),s=mn(),a=Vn(),i=oa(),c=na(),u=ca();function l(){const f=n.workAsyncStorage.getStore(),A=r.workUnitAsyncStorage.getStore();if(f){if(A&&A.phase==="after"&&!(0,u.isRequestAPICallableInsideAfter)())throw Object.defineProperty(new Error(`Route ${f.route} used "headers" inside "after(...)". This is not supported. If you need this data inside an "after" callback, use "headers" outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E367",enumerable:!1,configurable:!0});if(f.forceStatic){const R=t.HeadersAdapter.seal(new Headers({}));return m(R)}if(A){if(A.type==="cache")throw Object.defineProperty(new Error(`Route ${f.route} used "headers" inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "headers" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E304",enumerable:!1,configurable:!0});if(A.type==="unstable-cache")throw Object.defineProperty(new Error(`Route ${f.route} used "headers" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "headers" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E127",enumerable:!1,configurable:!0})}if(f.dynamicShouldError)throw Object.defineProperty(new s.StaticGenBailoutError(`Route ${f.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E525",enumerable:!1,configurable:!0});if(A){if(A.type==="prerender")return h(f.route,A);A.type==="prerender-ppr"?(0,o.postponeWithTracking)(f.route,"headers",A.dynamicTracking):A.type==="prerender-legacy"&&(0,o.throwToInterruptStaticGeneration)("headers",f,A)}(0,o.trackDynamicDataInDynamicRender)(f,A)}const v=(0,r.getExpectedRequestStore)("headers");return process.env.NODE_ENV==="development"&&!(f!=null&&f.isPrefetchRequest)?E(v.headers,f==null?void 0:f.route):m(v.headers)}const d=new WeakMap;function h(f,A){const v=d.get(A);if(v)return v;const R=(0,a.makeHangingPromise)(A.renderSignal,"`headers()`");return d.set(A,R),Object.defineProperties(R,{append:{value:function(){const x=`\`headers().append(${y(arguments[0])}, ...)\``,C=b(f,x);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,x,C,A)}},delete:{value:function(){const x=`\`headers().delete(${y(arguments[0])})\``,C=b(f,x);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,x,C,A)}},get:{value:function(){const x=`\`headers().get(${y(arguments[0])})\``,C=b(f,x);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,x,C,A)}},has:{value:function(){const x=`\`headers().has(${y(arguments[0])})\``,C=b(f,x);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,x,C,A)}},set:{value:function(){const x=`\`headers().set(${y(arguments[0])}, ...)\``,C=b(f,x);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,x,C,A)}},getSetCookie:{value:function(){const x="`headers().getSetCookie()`",C=b(f,x);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,x,C,A)}},forEach:{value:function(){const x="`headers().forEach(...)`",C=b(f,x);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,x,C,A)}},keys:{value:function(){const x="`headers().keys()`",C=b(f,x);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,x,C,A)}},values:{value:function(){const x="`headers().values()`",C=b(f,x);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,x,C,A)}},entries:{value:function(){const x="`headers().entries()`",C=b(f,x);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,x,C,A)}},[Symbol.iterator]:{value:function(){const w="`headers()[Symbol.iterator]()`",x=b(f,w);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,w,x,A)}}}),R}function m(f){const A=d.get(f);if(A)return A;const v=Promise.resolve(f);return d.set(f,v),Object.defineProperties(v,{append:{value:f.append.bind(f)},delete:{value:f.delete.bind(f)},get:{value:f.get.bind(f)},has:{value:f.has.bind(f)},set:{value:f.set.bind(f)},getSetCookie:{value:f.getSetCookie.bind(f)},forEach:{value:f.forEach.bind(f)},keys:{value:f.keys.bind(f)},values:{value:f.values.bind(f)},entries:{value:f.entries.bind(f)},[Symbol.iterator]:{value:f[Symbol.iterator].bind(f)}}),v}function E(f,A){const v=d.get(f);if(v)return v;const R=new Promise(w=>(0,c.scheduleImmediate)(()=>w(f)));return d.set(f,R),Object.defineProperties(R,{append:{value:function(){const x=`\`headers().append(${y(arguments[0])}, ...)\``;return g(A,x),f.append.apply(f,arguments)}},delete:{value:function(){const x=`\`headers().delete(${y(arguments[0])})\``;return g(A,x),f.delete.apply(f,arguments)}},get:{value:function(){const x=`\`headers().get(${y(arguments[0])})\``;return g(A,x),f.get.apply(f,arguments)}},has:{value:function(){const x=`\`headers().has(${y(arguments[0])})\``;return g(A,x),f.has.apply(f,arguments)}},set:{value:function(){const x=`\`headers().set(${y(arguments[0])}, ...)\``;return g(A,x),f.set.apply(f,arguments)}},getSetCookie:{value:function(){return g(A,"`headers().getSetCookie()`"),f.getSetCookie.apply(f,arguments)}},forEach:{value:function(){return g(A,"`headers().forEach(...)`"),f.forEach.apply(f,arguments)}},keys:{value:function(){return g(A,"`headers().keys()`"),f.keys.apply(f,arguments)}},values:{value:function(){return g(A,"`headers().values()`"),f.values.apply(f,arguments)}},entries:{value:function(){return g(A,"`headers().entries()`"),f.entries.apply(f,arguments)}},[Symbol.iterator]:{value:function(){return g(A,"`...headers()` or similar iteration"),f[Symbol.iterator].apply(f,arguments)}}}),R}function y(f){return typeof f=="string"?`'${f}'`:"..."}function g(f,A){const v=r.workUnitAsyncStorage.getStore();if(v&&v.type==="request"&&v.prerenderPhase===!0){const R=v;(0,o.trackSynchronousRequestDataAccessInDev)(R)}p(f,A)}const p=(0,i.createDedupedByCallsiteServerErrorLoggerDev)(b);function b(f,A){const v=f?`Route "${f}" `:"This route ";return Object.defineProperty(new Error(`${v}used ${A}. \`headers()\` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E277",enumerable:!1,configurable:!0})}}(ua)),ua}var da={},af;function w0(){return af||(af=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"draftMode",{enumerable:!0,get:function(){return i}});const t=Kt(),n=kt(),r=Jn(),o=oa(),s=mn(),a=Bd();function i(){const p="draftMode",b=n.workAsyncStorage.getStore(),f=t.workUnitAsyncStorage.getStore();switch((!b||!f)&&(0,t.throwForMissingRequestStore)(p),f.type){case"request":return c(f.draftMode,b);case"cache":case"unstable-cache":const A=(0,t.getDraftModeProviderForCacheScope)(b,f);if(A)return c(A,b);case"prerender":case"prerender-ppr":case"prerender-legacy":if(process.env.NODE_ENV==="development"&&!(b!=null&&b.isPrefetchRequest)){const R=b==null?void 0:b.route;return d(null,R)}else return l(null);default:return f}}function c(p,b){const f=u.get(i);if(f)return f;let A;if(process.env.NODE_ENV==="development"&&!(b!=null&&b.isPrefetchRequest)){const v=b==null?void 0:b.route;A=d(p,v)}else A=l(p);return u.set(p,A),A}const u=new WeakMap;function l(p){const b=new h(p),f=Promise.resolve(b);return Object.defineProperty(f,"isEnabled",{get(){return b.isEnabled},set(A){Object.defineProperty(f,"isEnabled",{value:A,writable:!0,enumerable:!0})},enumerable:!0,configurable:!0}),f.enable=b.enable.bind(b),f.disable=b.disable.bind(b),f}function d(p,b){const f=new h(p),A=Promise.resolve(f);return Object.defineProperty(A,"isEnabled",{get(){return m(b,"`draftMode().isEnabled`"),f.isEnabled},set(v){Object.defineProperty(A,"isEnabled",{value:v,writable:!0,enumerable:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(A,"enable",{value:function(){return m(b,"`draftMode().enable()`"),f.enable.apply(f,arguments)}}),Object.defineProperty(A,"disable",{value:function(){return m(b,"`draftMode().disable()`"),f.disable.apply(f,arguments)}}),A}class h{constructor(b){this._provider=b}get isEnabled(){return this._provider!==null?this._provider.isEnabled:!1}enable(){g("draftMode().enable()"),this._provider!==null&&this._provider.enable()}disable(){g("draftMode().disable()"),this._provider!==null&&this._provider.disable()}}function m(p,b){const f=t.workUnitAsyncStorage.getStore();if(f&&f.type==="request"&&f.prerenderPhase===!0){const A=f;(0,r.trackSynchronousRequestDataAccessInDev)(A)}E(p,b)}const E=(0,o.createDedupedByCallsiteServerErrorLoggerDev)(y);function y(p,b){const f=p?`Route "${p}" `:"This route ";return Object.defineProperty(new Error(`${f}used ${b}. \`draftMode()\` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E377",enumerable:!1,configurable:!0})}function g(p){const b=n.workAsyncStorage.getStore(),f=t.workUnitAsyncStorage.getStore();if(b){if(f){if(f.type==="cache")throw Object.defineProperty(new Error(`Route ${b.route} used "${p}" inside "use cache". The enabled status of draftMode can be read in caches but you must not enable or disable draftMode inside a cache. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E246",enumerable:!1,configurable:!0});if(f.type==="unstable-cache")throw Object.defineProperty(new Error(`Route ${b.route} used "${p}" inside a function cached with "unstable_cache(...)". The enabled status of draftMode can be read in caches but you must not enable or disable draftMode inside a cache. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E259",enumerable:!1,configurable:!0});if(f.phase==="after")throw Object.defineProperty(new Error(`Route ${b.route} used "${p}" inside \`after\`. The enabled status of draftMode can be read inside \`after\` but you cannot enable or disable draftMode. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E348",enumerable:!1,configurable:!0})}if(b.dynamicShouldError)throw Object.defineProperty(new s.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${p}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(f)if(f.type==="prerender"){const A=Object.defineProperty(new Error(`Route ${b.route} used ${p} without first calling \`await connection()\`. See more info here: https://nextjs.org/docs/messages/next-prerender-sync-headers`),"__NEXT_ERROR_CODE",{value:"E126",enumerable:!1,configurable:!0});(0,r.abortAndThrowOnSynchronousRequestDataAccess)(b.route,p,A,f)}else if(f.type==="prerender-ppr")(0,r.postponeWithTracking)(b.route,p,f.dynamicTracking);else if(f.type==="prerender-legacy"){f.revalidate=0;const A=Object.defineProperty(new a.DynamicServerError(`Route ${b.route} couldn't be rendered statically because it used \`${p}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw b.dynamicUsageDescription=p,b.dynamicUsageStack=A.stack,A}else process.env.NODE_ENV==="development"&&f&&f.type==="request"&&(f.usedDynamic=!0)}}}(da)),da}var cf;function v0(){return cf||(cf=1,Gn.cookies=g0().cookies,Gn.headers=y0().headers,Gn.draftMode=w0().draftMode),Gn}var Xn=v0(),Gr={exports:{}},fa={},ha={},pa={},uf;function E0(){return uf||(uf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"detectDomainLocale",{enumerable:!0,get:function(){return t}});function t(n,r,o){if(n){o&&(o=o.toLowerCase());for(const i of n){var s,a;const c=(s=i.domain)==null?void 0:s.split(":",1)[0].toLowerCase();if(r===c||o===i.defaultLocale.toLowerCase()||(a=i.locales)!=null&&a.some(u=>u.toLowerCase()===o))return i}}}}(pa)),pa}var ma={},ga={},lf;function _0(){return lf||(lf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"removeTrailingSlash",{enumerable:!0,get:function(){return t}});function t(n){return n.replace(/\/$/,"")||"/"}}(ga)),ga}var ba={},ya={},df;function wa(){return df||(df=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return t}});function t(n){const r=n.indexOf("#"),o=n.indexOf("?"),s=o>-1&&(r<0||o<r);return s||r>-1?{pathname:n.substring(0,s?o:r),query:s?n.substring(o,r>-1?r:void 0):"",hash:r>-1?n.slice(r):""}:{pathname:n,query:"",hash:""}}}(ya)),ya}var ff;function hf(){return ff||(ff=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathPrefix",{enumerable:!0,get:function(){return n}});const t=wa();function n(r,o){if(!r.startsWith("/")||!o)return r;const{pathname:s,query:a,hash:i}=(0,t.parsePath)(r);return""+o+s+a+i}}(ba)),ba}var va={},pf;function S0(){return pf||(pf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathSuffix",{enumerable:!0,get:function(){return n}});const t=wa();function n(r,o){if(!r.startsWith("/")||!o)return r;const{pathname:s,query:a,hash:i}=(0,t.parsePath)(r);return""+s+o+a+i}}(va)),va}var Ea={},_a={},mf;function Sa(){return mf||(mf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"pathHasPrefix",{enumerable:!0,get:function(){return n}});const t=wa();function n(r,o){if(typeof r!="string")return!1;const{pathname:s}=(0,t.parsePath)(r);return s===o||s.startsWith(o+"/")}}(_a)),_a}var gf;function x0(){return gf||(gf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLocale",{enumerable:!0,get:function(){return r}});const t=hf(),n=Sa();function r(o,s,a,i){if(!s||s===a)return o;const c=o.toLowerCase();return!i&&((0,n.pathHasPrefix)(c,"/api")||(0,n.pathHasPrefix)(c,"/"+s.toLowerCase()))?o:(0,t.addPathPrefix)(o,"/"+s)}}(Ea)),Ea}var bf;function A0(){return bf||(bf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"formatNextPathnameInfo",{enumerable:!0,get:function(){return s}});const t=_0(),n=hf(),r=S0(),o=x0();function s(a){let i=(0,o.addLocale)(a.pathname,a.locale,a.buildId?void 0:a.defaultLocale,a.ignorePrefix);return(a.buildId||!a.trailingSlash)&&(i=(0,t.removeTrailingSlash)(i)),a.buildId&&(i=(0,r.addPathSuffix)((0,n.addPathPrefix)(i,"/_next/data/"+a.buildId),a.pathname==="/"?"index.json":".json")),i=(0,n.addPathPrefix)(i,a.basePath),!a.buildId&&a.trailingSlash?i.endsWith("/")?i:(0,r.addPathSuffix)(i,"/"):(0,t.removeTrailingSlash)(i)}}(ma)),ma}var xa={},yf;function R0(){return yf||(yf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getHostname",{enumerable:!0,get:function(){return t}});function t(n,r){let o;if(r!=null&&r.host&&!Array.isArray(r.host))o=r.host.toString().split(":",1)[0];else if(n.hostname)o=n.hostname;else return;return o.toLowerCase()}}(xa)),xa}var Aa={},Ra={},wf;function C0(){return wf||(wf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"normalizeLocalePath",{enumerable:!0,get:function(){return n}});const t=new WeakMap;function n(r,o){if(!o)return{pathname:r};let s=t.get(o);s||(s=o.map(l=>l.toLowerCase()),t.set(o,s));let a;const i=r.split("/",2);if(!i[1])return{pathname:r};const c=i[1].toLowerCase(),u=s.indexOf(c);return u<0?{pathname:r}:(a=o[u],r=r.slice(a.length+1)||"/",{pathname:r,detectedLocale:a})}}(Ra)),Ra}var Ca={},vf;function T0(){return vf||(vf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"removePathPrefix",{enumerable:!0,get:function(){return n}});const t=Sa();function n(r,o){if(!(0,t.pathHasPrefix)(r,o))return r;const s=r.slice(o.length);return s.startsWith("/")?s:"/"+s}}(Ca)),Ca}var Ef;function P0(){return Ef||(Ef=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getNextPathnameInfo",{enumerable:!0,get:function(){return o}});const t=C0(),n=T0(),r=Sa();function o(s,a){var i;const{basePath:c,i18n:u,trailingSlash:l}=(i=a.nextConfig)!=null?i:{},d={pathname:s,trailingSlash:s!=="/"?s.endsWith("/"):l};c&&(0,r.pathHasPrefix)(d.pathname,c)&&(d.pathname=(0,n.removePathPrefix)(d.pathname,c),d.basePath=c);let h=d.pathname;if(d.pathname.startsWith("/_next/data/")&&d.pathname.endsWith(".json")){const E=d.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),y=E[0];d.buildId=y,h=E[1]!=="index"?"/"+E.slice(1).join("/"):"/",a.parseData===!0&&(d.pathname=h)}if(u){let E=a.i18nProvider?a.i18nProvider.analyze(d.pathname):(0,t.normalizeLocalePath)(d.pathname,u.locales);d.locale=E.detectedLocale;var m;d.pathname=(m=E.pathname)!=null?m:d.pathname,!E.detectedLocale&&d.buildId&&(E=a.i18nProvider?a.i18nProvider.analyze(h):(0,t.normalizeLocalePath)(h,u.locales),E.detectedLocale&&(d.locale=E.detectedLocale))}return d}}(Aa)),Aa}var _f;function Sf(){return _f||(_f=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NextURL",{enumerable:!0,get:function(){return c}});const t=E0(),n=A0(),r=R0(),o=P0(),s=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function a(u,l){return new URL(String(u).replace(s,"localhost"),l&&String(l).replace(s,"localhost"))}const i=Symbol("NextURLInternal");class c{constructor(l,d,h){let m,E;typeof d=="object"&&"pathname"in d||typeof d=="string"?(m=d,E=h||{}):E=h||d||{},this[i]={url:a(l,m??E.base),options:E,basePath:""},this.analyze()}analyze(){var l,d,h,m,E;const y=(0,o.getNextPathnameInfo)(this[i].url.pathname,{nextConfig:this[i].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[i].options.i18nProvider}),g=(0,r.getHostname)(this[i].url,this[i].options.headers);this[i].domainLocale=this[i].options.i18nProvider?this[i].options.i18nProvider.detectDomainLocale(g):(0,t.detectDomainLocale)((d=this[i].options.nextConfig)==null||(l=d.i18n)==null?void 0:l.domains,g);const p=((h=this[i].domainLocale)==null?void 0:h.defaultLocale)||((E=this[i].options.nextConfig)==null||(m=E.i18n)==null?void 0:m.defaultLocale);this[i].url.pathname=y.pathname,this[i].defaultLocale=p,this[i].basePath=y.basePath??"",this[i].buildId=y.buildId,this[i].locale=y.locale??p,this[i].trailingSlash=y.trailingSlash}formatPathname(){return(0,n.formatNextPathnameInfo)({basePath:this[i].basePath,buildId:this[i].buildId,defaultLocale:this[i].options.forceLocale?void 0:this[i].defaultLocale,locale:this[i].locale,pathname:this[i].url.pathname,trailingSlash:this[i].trailingSlash})}formatSearch(){return this[i].url.search}get buildId(){return this[i].buildId}set buildId(l){this[i].buildId=l}get locale(){return this[i].locale??""}set locale(l){var d,h;if(!this[i].locale||!(!((h=this[i].options.nextConfig)==null||(d=h.i18n)==null)&&d.locales.includes(l)))throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${l}"`),"__NEXT_ERROR_CODE",{value:"E597",enumerable:!1,configurable:!0});this[i].locale=l}get defaultLocale(){return this[i].defaultLocale}get domainLocale(){return this[i].domainLocale}get searchParams(){return this[i].url.searchParams}get host(){return this[i].url.host}set host(l){this[i].url.host=l}get hostname(){return this[i].url.hostname}set hostname(l){this[i].url.hostname=l}get port(){return this[i].url.port}set port(l){this[i].url.port=l}get protocol(){return this[i].url.protocol}set protocol(l){this[i].url.protocol=l}get href(){const l=this.formatPathname(),d=this.formatSearch();return`${this.protocol}//${this.host}${l}${d}${this.hash}`}set href(l){this[i].url=a(l),this.analyze()}get origin(){return this[i].url.origin}get pathname(){return this[i].url.pathname}set pathname(l){this[i].url.pathname=l}get hash(){return this[i].url.hash}set hash(l){this[i].url.hash=l}get search(){return this[i].url.search}set search(l){this[i].url.search=l}get password(){return this[i].url.password}set password(l){this[i].url.password=l}get username(){return this[i].url.username}set username(l){this[i].url.username=l}get basePath(){return this[i].basePath}set basePath(l){this[i].basePath=l.startsWith("/")?l:`/${l}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new c(String(this),this[i].options)}}}(ha)),ha}var Ta={},Pa={},xf;function O0(){return xf||(xf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(pe,Ae){for(var De in Ae)Object.defineProperty(pe,De,{enumerable:!0,get:Ae[De]})}t(e,{ACTION_SUFFIX:function(){return d},APP_DIR_ALIAS:function(){return oe},CACHE_ONE_YEAR:function(){return w},DOT_NEXT_ALIAS:function(){return U},ESLINT_DEFAULT_DIRS:function(){return q},GSP_NO_RETURNED_VALUE:function(){return le},GSSP_COMPONENT_MEMBER_ERROR:function(){return k},GSSP_NO_RETURNED_VALUE:function(){return ue},INFINITE_CACHE:function(){return x},INSTRUMENTATION_HOOK_FILENAME:function(){return I},MATCHED_PATH_HEADER:function(){return o},MIDDLEWARE_FILENAME:function(){return C},MIDDLEWARE_LOCATION_REGEXP:function(){return D},NEXT_BODY_SUFFIX:function(){return E},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return R},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return g},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return p},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return v},NEXT_CACHE_TAGS_HEADER:function(){return y},NEXT_CACHE_TAG_MAX_ITEMS:function(){return f},NEXT_CACHE_TAG_MAX_LENGTH:function(){return A},NEXT_DATA_SUFFIX:function(){return h},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return r},NEXT_META_SUFFIX:function(){return m},NEXT_QUERY_PARAM_PREFIX:function(){return n},NEXT_RESUME_HEADER:function(){return b},NON_STANDARD_NODE_ENV:function(){return N},PAGES_DIR_ALIAS:function(){return P},PRERENDER_REVALIDATE_HEADER:function(){return s},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return a},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return J},ROOT_DIR_ALIAS:function(){return G},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return H},RSC_ACTION_ENCRYPTION_ALIAS:function(){return T},RSC_ACTION_PROXY_ALIAS:function(){return O},RSC_ACTION_VALIDATE_ALIAS:function(){return Y},RSC_CACHE_WRAPPER_ALIAS:function(){return j},RSC_MOD_REF_PROXY_ALIAS:function(){return V},RSC_PREFETCH_SUFFIX:function(){return i},RSC_SEGMENTS_DIR_SUFFIX:function(){return c},RSC_SEGMENT_SUFFIX:function(){return u},RSC_SUFFIX:function(){return l},SERVER_PROPS_EXPORT_ERROR:function(){return te},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return se},SERVER_PROPS_SSG_CONFLICT:function(){return fe},SERVER_RUNTIME:function(){return ne},SSG_FALLBACK_EXPORT_ERROR:function(){return M},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return X},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return ye},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return be},WEBPACK_LAYERS:function(){return Ee},WEBPACK_RESOURCE_QUERIES:function(){return Ce}});const n="nxtP",r="nxtI",o="x-matched-path",s="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",i=".prefetch.rsc",c=".segments",u=".segment.rsc",l=".rsc",d=".action",h=".json",m=".meta",E=".body",y="x-next-cache-tags",g="x-next-revalidated-tags",p="x-next-revalidate-tag-token",b="next-resume",f=128,A=256,v=1024,R="_N_T_",w=31536e3,x=4294967294,C="middleware",D=`(?:src/)?${C}`,I="instrumentation",P="private-next-pages",U="private-dot-next",G="private-next-root-dir",oe="private-next-app-dir",V="private-next-rsc-mod-ref-proxy",Y="private-next-rsc-action-validate",O="private-next-rsc-server-reference",j="private-next-rsc-cache-wrapper",T="private-next-rsc-action-encryption",H="private-next-rsc-action-client-wrapper",J="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",X="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",se="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",fe="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",ye="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",te="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",le="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",ue="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",be="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",k="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",N='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',M="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",q=["app","pages","components","lib","src"],ne={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},$={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",apiNode:"api-node",apiEdge:"api-edge",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",pagesDirBrowser:"pages-dir-browser",pagesDirEdge:"pages-dir-edge",pagesDirNode:"pages-dir-node"},Ee={...$,GROUP:{builtinReact:[$.reactServerComponents,$.actionBrowser],serverOnly:[$.reactServerComponents,$.actionBrowser,$.instrument,$.middleware],neutralTarget:[$.apiNode,$.apiEdge],clientOnly:[$.serverSideRendering,$.appPagesBrowser],bundled:[$.reactServerComponents,$.actionBrowser,$.serverSideRendering,$.appPagesBrowser,$.shared,$.instrument,$.middleware],appPages:[$.reactServerComponents,$.serverSideRendering,$.appPagesBrowser,$.actionBrowser]}},Ce={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}}(Pa)),Pa}var Af;function Rf(){return Af||(Af=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,u){for(var l in u)Object.defineProperty(c,l,{enumerable:!0,get:u[l]})}t(e,{fromNodeOutgoingHttpHeaders:function(){return r},normalizeNextQueryParam:function(){return i},splitCookiesString:function(){return o},toNodeOutgoingHttpHeaders:function(){return s},validateURL:function(){return a}});const n=O0();function r(c){const u=new Headers;for(let[l,d]of Object.entries(c)){const h=Array.isArray(d)?d:[d];for(let m of h)typeof m>"u"||(typeof m=="number"&&(m=m.toString()),u.append(l,m))}return u}function o(c){var u=[],l=0,d,h,m,E,y;function g(){for(;l<c.length&&/\s/.test(c.charAt(l));)l+=1;return l<c.length}function p(){return h=c.charAt(l),h!=="="&&h!==";"&&h!==","}for(;l<c.length;){for(d=l,y=!1;g();)if(h=c.charAt(l),h===","){for(m=l,l+=1,g(),E=l;l<c.length&&p();)l+=1;l<c.length&&c.charAt(l)==="="?(y=!0,l=E,u.push(c.substring(d,m)),d=l):l=m+1}else l+=1;(!y||l>=c.length)&&u.push(c.substring(d,c.length))}return u}function s(c){const u={},l=[];if(c)for(const[d,h]of c.entries())d.toLowerCase()==="set-cookie"?(l.push(...o(h)),u[d]=l.length===1?l[0]:l):u[d]=h;return u}function a(c){try{return String(new URL(String(c)))}catch(u){throw Object.defineProperty(new Error(`URL is malformed "${String(c)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:u}),"__NEXT_ERROR_CODE",{value:"E61",enumerable:!1,configurable:!0})}}function i(c){const u=[n.NEXT_QUERY_PARAM_PREFIX,n.NEXT_INTERCEPTION_MARKER_PREFIX];for(const l of u)if(c!==l&&c.startsWith(l))return c.substring(l.length);return null}}(Ta)),Ta}var Oa={},Cf;function k0(){return Cf||(Cf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,a){for(var i in a)Object.defineProperty(s,i,{enumerable:!0,get:a[i]})}t(e,{PageSignatureError:function(){return n},RemovedPageError:function(){return r},RemovedUAError:function(){return o}});class n extends Error{constructor({page:a}){super(`The middleware "${a}" accepts an async API directly with the form:
187
+
188
+ export function middleware(request, event) {
189
+ return NextResponse.redirect('/new-location')
190
+ }
191
+
192
+ Read more: https://nextjs.org/docs/messages/middleware-new-signature
193
+ `)}}class r extends Error{constructor(){super("The request.page has been deprecated in favour of `URLPattern`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n ")}}class o extends Error{constructor(){super("The request.ua has been removed in favour of `userAgent` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n ")}}}(Oa)),Oa}var Tf;function N0(){return Tf||(Tf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,u){for(var l in u)Object.defineProperty(c,l,{enumerable:!0,get:u[l]})}t(e,{INTERNALS:function(){return a},NextRequest:function(){return i}});const n=Sf(),r=Rf(),o=k0(),s=Bn(),a=Symbol("internal request");class i extends Request{constructor(u,l={}){const d=typeof u!="string"&&"url"in u?u.url:String(u);(0,r.validateURL)(d),process.env.NEXT_RUNTIME!=="edge"&&l.body&&l.duplex!=="half"&&(l.duplex="half"),u instanceof Request?super(u,l):super(d,l);const h=new n.NextURL(d,{headers:(0,r.toNodeOutgoingHttpHeaders)(this.headers),nextConfig:l.nextConfig});this[a]={cookies:new s.RequestCookies(this.headers),nextUrl:h,url:process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE?d:h.toString()}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[a].cookies}get nextUrl(){return this[a].nextUrl}get page(){throw new o.RemovedPageError}get ua(){throw new o.RemovedUAError}get url(){return this[a].url}}}(fa)),fa}var ka={},Pf;function I0(){return Pf||(Pf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NextResponse",{enumerable:!0,get:function(){return u}});const t=Bn(),n=Sf(),r=Rf(),o=zs(),s=Bn(),a=Symbol("internal response"),i=new Set([301,302,303,307,308]);function c(l,d){var h;if(!(l==null||(h=l.request)==null)&&h.headers){if(!(l.request.headers instanceof Headers))throw Object.defineProperty(new Error("request.headers must be an instance of Headers"),"__NEXT_ERROR_CODE",{value:"E119",enumerable:!1,configurable:!0});const m=[];for(const[E,y]of l.request.headers)d.set("x-middleware-request-"+E,y),m.push(E);d.set("x-middleware-override-headers",m.join(","))}}class u extends Response{constructor(d,h={}){super(d,h);const m=this.headers,E=new s.ResponseCookies(m),y=new Proxy(E,{get(g,p,b){switch(p){case"delete":case"set":return(...f)=>{const A=Reflect.apply(g[p],g,f),v=new Headers(m);return A instanceof s.ResponseCookies&&m.set("x-middleware-set-cookie",A.getAll().map(R=>(0,t.stringifyCookie)(R)).join(",")),c(h,v),A};default:return o.ReflectAdapter.get(g,p,b)}}});this[a]={cookies:y,url:h.url?new n.NextURL(h.url,{headers:(0,r.toNodeOutgoingHttpHeaders)(m),nextConfig:h.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[a].cookies}static json(d,h){const m=Response.json(d,h);return new u(m.body,m)}static redirect(d,h){const m=typeof h=="number"?h:(h==null?void 0:h.status)??307;if(!i.has(m))throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'),"__NEXT_ERROR_CODE",{value:"E529",enumerable:!1,configurable:!0});const E=typeof h=="object"?h:{},y=new Headers(E==null?void 0:E.headers);return y.set("Location",(0,r.validateURL)(d)),new u(null,{...E,headers:y,status:m})}static rewrite(d,h){const m=new Headers(h==null?void 0:h.headers);return m.set("x-middleware-rewrite",(0,r.validateURL)(d)),c(h,m),new u(null,{...h,headers:m})}static next(d){const h=new Headers(d==null?void 0:d.headers);return h.set("x-middleware-next","1"),c(d,h),new u(null,{...d,headers:h})}}}(ka)),ka}var Na={},Of;function D0(){return Of||(Of=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageResponse",{enumerable:!0,get:function(){return t}});function t(){throw Object.defineProperty(new Error('ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead'),"__NEXT_ERROR_CODE",{value:"E183",enumerable:!1,configurable:!0})}}(Na)),Na}var Ia={},Da={exports:{}},kf;function M0(){return kf||(kf=1,(()=>{var e={226:function(o,s){(function(a,i){var c="1.0.35",u="",l="?",d="function",h="undefined",m="object",E="string",y="major",g="model",p="name",b="type",f="vendor",A="version",v="architecture",R="console",w="mobile",x="tablet",C="smarttv",D="wearable",I="embedded",P=350,U="Amazon",G="Apple",oe="ASUS",V="BlackBerry",Y="Browser",O="Chrome",j="Edge",T="Firefox",H="Google",J="Huawei",X="LG",se="Microsoft",fe="Motorola",ye="Opera",te="Samsung",le="Sharp",ue="Sony",be="Xiaomi",k="Zebra",N="Facebook",M="Chromium OS",q="Mac OS",ne=function(ie,ge){var re={};for(var we in ie)ge[we]&&ge[we].length%2===0?re[we]=ge[we].concat(ie[we]):re[we]=ie[we];return re},$=function(ie){for(var ge={},re=0;re<ie.length;re++)ge[ie[re].toUpperCase()]=ie[re];return ge},Ee=function(ie,ge){return typeof ie===E?Ce(ge).indexOf(Ce(ie))!==-1:!1},Ce=function(ie){return ie.toLowerCase()},pe=function(ie){return typeof ie===E?ie.replace(/[^\d\.]/g,u).split(".")[0]:i},Ae=function(ie,ge){if(typeof ie===E)return ie=ie.replace(/^\s\s*/,u),typeof ge===h?ie:ie.substring(0,P)},De=function(ie,ge){for(var re=0,we,Lt,ft,me,Q,ht;re<ge.length&&!Q;){var Pi=ge[re],Zh=ge[re+1];for(we=Lt=0;we<Pi.length&&!Q&&Pi[we];)if(Q=Pi[we++].exec(ie),Q)for(ft=0;ft<Zh.length;ft++)ht=Q[++Lt],me=Zh[ft],typeof me===m&&me.length>0?me.length===2?typeof me[1]==d?this[me[0]]=me[1].call(this,ht):this[me[0]]=me[1]:me.length===3?typeof me[1]===d&&!(me[1].exec&&me[1].test)?this[me[0]]=ht?me[1].call(this,ht,me[2]):i:this[me[0]]=ht?ht.replace(me[1],me[2]):i:me.length===4&&(this[me[0]]=ht?me[3].call(this,ht.replace(me[1],me[2])):i):this[me]=ht||i;re+=2}},xn=function(ie,ge){for(var re in ge)if(typeof ge[re]===m&&ge[re].length>0){for(var we=0;we<ge[re].length;we++)if(Ee(ge[re][we],ie))return re===l?i:re}else if(Ee(ge[re],ie))return re===l?i:re;return ie},ho={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},nr={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ke={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[A,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[A,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,A],[/opios[\/ ]+([\w\.]+)/i],[A,[p,ye+" Mini"]],[/\bopr\/([\w\.]+)/i],[A,[p,ye]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,A],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[A,[p,"UC"+Y]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[A,[p,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[A,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[A,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[A,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[A,[p,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+Y],A],[/\bfocus\/([\w\.]+)/i],[A,[p,T+" Focus"]],[/\bopt\/([\w\.]+)/i],[A,[p,ye+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[A,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[A,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[A,[p,ye+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[A,[p,"MIUI "+Y]],[/fxios\/([-\w\.]+)/i],[A,[p,T]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 "+Y]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 "+Y],A],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],A],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[p,A],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,N],A],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[p,A],[/\bgsa\/([\w\.]+) .*safari\//i],[A,[p,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[A,[p,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[A,[p,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,O+" WebView"],A],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[A,[p,"Android "+Y]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,A],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[A,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[A,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[A,xn,ho]],[/(webkit|khtml)\/([\w\.]+)/i],[p,A],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],A],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[A,[p,T+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[p,A],[/(cobalt)\/([\w\.]+)/i],[p,[A,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[v,"amd64"]],[/(ia32(?=;))/i],[[v,Ce]],[/((?:i[346]|x)86)[;\)]/i],[[v,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[v,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[v,"armhf"]],[/windows (ce|mobile); ppc;/i],[[v,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[v,/ower/,u,Ce]],[/(sun4\w)[;\)]/i],[[v,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[v,Ce]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[g,[f,te],[b,x]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[g,[f,te],[b,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[g,[f,G],[b,w]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[g,[f,G],[b,x]],[/(macintosh);/i],[g,[f,G]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[g,[f,le],[b,w]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[g,[f,J],[b,x]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[g,[f,J],[b,w]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[g,/_/g," "],[f,be],[b,w]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[g,/_/g," "],[f,be],[b,x]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[g,[f,"OPPO"],[b,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[g,[f,"Vivo"],[b,w]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[g,[f,"Realme"],[b,w]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[g,[f,fe],[b,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[g,[f,fe],[b,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[g,[f,X],[b,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[g,[f,X],[b,w]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[g,[f,"Lenovo"],[b,x]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[g,/_/g," "],[f,"Nokia"],[b,w]],[/(pixel c)\b/i],[g,[f,H],[b,x]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[g,[f,H],[b,w]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[g,[f,ue],[b,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[g,"Xperia Tablet"],[f,ue],[b,x]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[g,[f,"OnePlus"],[b,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[g,[f,U],[b,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[g,/(.+)/g,"Fire Phone $1"],[f,U],[b,w]],[/(playbook);[-\w\),; ]+(rim)/i],[g,f,[b,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[g,[f,V],[b,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[g,[f,oe],[b,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[g,[f,oe],[b,w]],[/(nexus 9)/i],[g,[f,"HTC"],[b,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[g,/_/g," "],[b,w]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[g,[f,"Acer"],[b,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[g,[f,"Meizu"],[b,w]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[f,g,[b,w]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,g,[b,x]],[/(surface duo)/i],[g,[f,se],[b,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[g,[f,"Fairphone"],[b,w]],[/(u304aa)/i],[g,[f,"AT&T"],[b,w]],[/\bsie-(\w*)/i],[g,[f,"Siemens"],[b,w]],[/\b(rct\w+) b/i],[g,[f,"RCA"],[b,x]],[/\b(venue[\d ]{2,7}) b/i],[g,[f,"Dell"],[b,x]],[/\b(q(?:mv|ta)\w+) b/i],[g,[f,"Verizon"],[b,x]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[g,[f,"Barnes & Noble"],[b,x]],[/\b(tm\d{3}\w+) b/i],[g,[f,"NuVision"],[b,x]],[/\b(k88) b/i],[g,[f,"ZTE"],[b,x]],[/\b(nx\d{3}j) b/i],[g,[f,"ZTE"],[b,w]],[/\b(gen\d{3}) b.+49h/i],[g,[f,"Swiss"],[b,w]],[/\b(zur\d{3}) b/i],[g,[f,"Swiss"],[b,x]],[/\b((zeki)?tb.*\b) b/i],[g,[f,"Zeki"],[b,x]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],g,[b,x]],[/\b(ns-?\w{0,9}) b/i],[g,[f,"Insignia"],[b,x]],[/\b((nxa|next)-?\w{0,9}) b/i],[g,[f,"NextBook"],[b,x]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],g,[b,w]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],g,[b,w]],[/\b(ph-1) /i],[g,[f,"Essential"],[b,w]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[g,[f,"Envizen"],[b,x]],[/\b(trio[-\w\. ]+) b/i],[g,[f,"MachSpeed"],[b,x]],[/\btu_(1491) b/i],[g,[f,"Rotor"],[b,x]],[/(shield[\w ]+) b/i],[g,[f,"Nvidia"],[b,x]],[/(sprint) (\w+)/i],[f,g,[b,w]],[/(kin\.[onetw]{3})/i],[[g,/\./g," "],[f,se],[b,w]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[g,[f,k],[b,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[g,[f,k],[b,w]],[/smart-tv.+(samsung)/i],[f,[b,C]],[/hbbtv.+maple;(\d+)/i],[[g,/^/,"SmartTV"],[f,te],[b,C]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,X],[b,C]],[/(apple) ?tv/i],[f,[g,G+" TV"],[b,C]],[/crkey/i],[[g,O+"cast"],[f,H],[b,C]],[/droid.+aft(\w)( bui|\))/i],[g,[f,U],[b,C]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[g,[f,le],[b,C]],[/(bravia[\w ]+)( bui|\))/i],[g,[f,ue],[b,C]],[/(mitv-\w{5}) bui/i],[g,[f,be],[b,C]],[/Hbbtv.*(technisat) (.*);/i],[f,g,[b,C]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,Ae],[g,Ae],[b,C]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[b,C]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,g,[b,R]],[/droid.+; (shield) bui/i],[g,[f,"Nvidia"],[b,R]],[/(playstation [345portablevi]+)/i],[g,[f,ue],[b,R]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[g,[f,se],[b,R]],[/((pebble))app/i],[f,g,[b,D]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[g,[f,G],[b,D]],[/droid.+; (glass) \d/i],[g,[f,H],[b,D]],[/droid.+; (wt63?0{2,3})\)/i],[g,[f,k],[b,D]],[/(quest( 2| pro)?)/i],[g,[f,N],[b,D]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[b,I]],[/(aeobc)\b/i],[g,[f,U],[b,I]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[g,[b,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[g,[b,x]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,w]],[/(android[-\w\. ]{0,9});.+buil/i],[g,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[A,[p,j+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[A,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,A],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[A,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,A],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[p,[A,xn,nr]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,"Windows"],[A,xn,nr]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[A,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,q],[A,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[A,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,A],[/\(bb(10);/i],[A,[p,V]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[A,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[A,[p,T+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[A,[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[A,[p,"watchOS"]],[/crkey\/([\d\.]+)/i],[A,[p,O+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,M],A],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,A],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],A],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,A]]},Re=function(ie,ge){if(typeof ie===m&&(ge=ie,ie=i),!(this instanceof Re))return new Re(ie,ge).getResult();var re=typeof a!==h&&a.navigator?a.navigator:i,we=ie||(re&&re.userAgent?re.userAgent:u),Lt=re&&re.userAgentData?re.userAgentData:i,ft=ge?ne(Ke,ge):Ke,me=re&&re.userAgent==we;return this.getBrowser=function(){var Q={};return Q[p]=i,Q[A]=i,De.call(Q,we,ft.browser),Q[y]=pe(Q[A]),me&&re&&re.brave&&typeof re.brave.isBrave==d&&(Q[p]="Brave"),Q},this.getCPU=function(){var Q={};return Q[v]=i,De.call(Q,we,ft.cpu),Q},this.getDevice=function(){var Q={};return Q[f]=i,Q[g]=i,Q[b]=i,De.call(Q,we,ft.device),me&&!Q[b]&&Lt&&Lt.mobile&&(Q[b]=w),me&&Q[g]=="Macintosh"&&re&&typeof re.standalone!==h&&re.maxTouchPoints&&re.maxTouchPoints>2&&(Q[g]="iPad",Q[b]=x),Q},this.getEngine=function(){var Q={};return Q[p]=i,Q[A]=i,De.call(Q,we,ft.engine),Q},this.getOS=function(){var Q={};return Q[p]=i,Q[A]=i,De.call(Q,we,ft.os),me&&!Q[p]&&Lt&&Lt.platform!="Unknown"&&(Q[p]=Lt.platform.replace(/chrome os/i,M).replace(/macos/i,q)),Q},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return we},this.setUA=function(Q){return we=typeof Q===E&&Q.length>P?Ae(Q,P):Q,this},this.setUA(we),this};Re.VERSION=c,Re.BROWSER=$([p,A,y]),Re.CPU=$([v]),Re.DEVICE=$([g,f,b,R,w,C,x,D,I]),Re.ENGINE=Re.OS=$([p,A]),typeof s!==h?(o.exports&&(s=o.exports=Re),s.UAParser=Re):typeof a!==h&&(a.UAParser=Re);var dt=typeof a!==h&&(a.jQuery||a.Zepto);if(dt&&!dt.ua){var An=new Re;dt.ua=An.getResult(),dt.ua.get=function(){return An.getUA()},dt.ua.set=function(ie){An.setUA(ie);var ge=An.getResult();for(var re in ge)dt.ua[re]=ge[re]}}})(typeof window=="object"?window:this)}},t={};function n(o){var s=t[o];if(s!==void 0)return s.exports;var a=t[o]={exports:{}},i=!0;try{e[o].call(a.exports,a,a.exports,n),i=!1}finally{i&&delete t[o]}return a.exports}typeof n<"u"&&(n.ab=__dirname+"/");var r=n(226);Da.exports=r})()),Da.exports}var Nf;function If(){return Nf||(Nf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var u in c)Object.defineProperty(i,u,{enumerable:!0,get:c[u]})}t(e,{isBot:function(){return o},userAgent:function(){return a},userAgentFromString:function(){return s}});const n=r(M0());function r(i){return i&&i.__esModule?i:{default:i}}function o(i){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(i)}function s(i){return{...(0,n.default)(i),isBot:i===void 0?!1:o(i)}}function a({headers:i}){return s(i.get("user-agent")||void 0)}}(Ia)),Ia}var Ma={},Df;function L0(){return Df||(Df=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"URLPattern",{enumerable:!0,get:function(){return t}});const t=typeof URLPattern>"u"?void 0:URLPattern}(Ma)),Ma}var La={},ja={},Mf;function j0(){return Mf||(Mf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"after",{enumerable:!0,get:function(){return n}});const t=kt();function n(r){const o=t.workAsyncStorage.getStore();if(!o)throw Object.defineProperty(new Error("`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context"),"__NEXT_ERROR_CODE",{value:"E468",enumerable:!1,configurable:!0});const{afterContext:s}=o;return s.after(r)}}(ja)),ja}var Lf;function H0(){return Lf||(Lf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),t(j0(),e);function t(n,r){return Object.keys(n).forEach(function(o){o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:function(){return n[o]}})}),n}}(La)),La}var Ha={},jf;function U0(){return jf||(jf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"connection",{enumerable:!0,get:function(){return i}});const t=kt(),n=Kt(),r=Jn(),o=mn(),s=Vn(),a=ca();function i(){const c=t.workAsyncStorage.getStore(),u=n.workUnitAsyncStorage.getStore();if(c){if(u&&u.phase==="after"&&!(0,a.isRequestAPICallableInsideAfter)())throw Object.defineProperty(new Error(`Route ${c.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E186",enumerable:!1,configurable:!0});if(c.forceStatic)return Promise.resolve(void 0);if(u){if(u.type==="cache")throw Object.defineProperty(new Error(`Route ${c.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E111",enumerable:!1,configurable:!0});if(u.type==="unstable-cache")throw Object.defineProperty(new Error(`Route ${c.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E1",enumerable:!1,configurable:!0})}if(c.dynamicShouldError)throw Object.defineProperty(new o.StaticGenBailoutError(`Route ${c.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E562",enumerable:!1,configurable:!0});if(u){if(u.type==="prerender")return(0,s.makeHangingPromise)(u.renderSignal,"`connection()`");u.type==="prerender-ppr"?(0,r.postponeWithTracking)(c.route,"connection",u.dynamicTracking):u.type==="prerender-legacy"&&(0,r.throwToInterruptStaticGeneration)("connection",c,u)}(0,r.trackDynamicDataInDynamicRender)(c,u)}return Promise.resolve(void 0)}}(Ha)),Ha}var Ua={},$a={},Hf;function $0(){return Hf||(Hf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"InvariantError",{enumerable:!0,get:function(){return t}});class t extends Error{constructor(r,o){super("Invariant: "+(r.endsWith(".")?r:r+".")+" This is a bug in Next.js.",o),this.name="InvariantError"}}}($a)),$a}var Wa={},Uf;function W0(){return Uf||(Uf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{describeHasCheckingStringProperty:function(){return o},describeStringPropertyAccess:function(){return r},wellKnownProperties:function(){return s}});const n=/^[A-Za-z_$][A-Za-z0-9_$]*$/;function r(a,i){return n.test(i)?"`"+a+"."+i+"`":"`"+a+"["+JSON.stringify(i)+"]`"}function o(a,i){const c=JSON.stringify(i);return"`Reflect.has("+a+", "+c+")`, `"+c+" in "+a+"`, or similar"}const s=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toString","valueOf","toLocaleString","then","catch","finally","status","displayName","toJSON","$$typeof","__esModule"])}(Wa)),Wa}var $f;function F0(){return $f||($f=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"unstable_rootParams",{enumerable:!0,get:function(){return c}});const t=$0(),n=Jn(),r=kt(),o=Kt(),s=Vn(),a=W0(),i=new WeakMap;async function c(){const d=r.workAsyncStorage.getStore();if(!d)throw Object.defineProperty(new t.InvariantError("Missing workStore in unstable_rootParams"),"__NEXT_ERROR_CODE",{value:"E615",enumerable:!1,configurable:!0});const h=o.workUnitAsyncStorage.getStore();if(!h)throw Object.defineProperty(new Error(`Route ${d.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`),"__NEXT_ERROR_CODE",{value:"E641",enumerable:!1,configurable:!0});switch(h.type){case"unstable-cache":case"cache":throw Object.defineProperty(new Error(`Route ${d.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`),"__NEXT_ERROR_CODE",{value:"E642",enumerable:!1,configurable:!0});case"prerender":case"prerender-ppr":case"prerender-legacy":return u(h.rootParams,d,h);default:return Promise.resolve(h.rootParams)}}function u(d,h,m){const E=h.fallbackRouteParams;if(E){let y=!1;for(const g in d)if(E.has(g)){y=!0;break}if(y){if(m.type==="prerender"){const g=i.get(d);if(g)return g;const p=(0,s.makeHangingPromise)(m.renderSignal,"`unstable_rootParams`");return i.set(d,p),p}return l(d,E,h,m)}}return Promise.resolve(d)}function l(d,h,m,E){const y=i.get(d);if(y)return y;const g={...d},p=Promise.resolve(g);return i.set(d,p),Object.keys(d).forEach(b=>{a.wellKnownProperties.has(b)||(h.has(b)?Object.defineProperty(g,b,{get(){const f=(0,a.describeStringPropertyAccess)("unstable_rootParams",b);E.type==="prerender-ppr"?(0,n.postponeWithTracking)(m.route,f,E.dynamicTracking):(0,n.throwToInterruptStaticGeneration)(f,m,E)},enumerable:!0}):p[b]=d[b])}),p}}(Ua)),Ua}var Wf;function K0(){return Wf||(Wf=1,function(e,t){const n={NextRequest:N0().NextRequest,NextResponse:I0().NextResponse,ImageResponse:D0().ImageResponse,userAgentFromString:If().userAgentFromString,userAgent:If().userAgent,URLPattern:L0().URLPattern,after:H0().after,connection:U0().connection,unstable_rootParams:F0().unstable_rootParams};e.exports=n,t.NextRequest=n.NextRequest,t.NextResponse=n.NextResponse,t.ImageResponse=n.ImageResponse,t.userAgentFromString=n.userAgentFromString,t.userAgent=n.userAgent,t.URLPattern=n.URLPattern,t.after=n.after,t.connection=n.connection,t.unstable_rootParams=n.unstable_rootParams}(Gr,Gr.exports)),Gr.exports}var _e=K0();const ce=crypto,Be=e=>e instanceof CryptoKey,q0=async(e,t)=>{const n=`SHA-${e.slice(-3)}`;return new Uint8Array(await ce.subtle.digest(n,t))},$e=new TextEncoder,qt=new TextDecoder,Br=2**32;function Et(...e){const t=e.reduce((o,{length:s})=>o+s,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function z0(e,t){return Et($e.encode(e),new Uint8Array([0]),t)}function Fa(e,t,n){if(t<0||t>=Br)throw new RangeError(`value must be >= 0 and <= ${Br-1}. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,t&255],n)}function Ff(e){const t=Math.floor(e/Br),n=e%Br,r=new Uint8Array(8);return Fa(r,t,0),Fa(r,n,4),r}function Ka(e){const t=new Uint8Array(4);return Fa(t,e),t}function qa(e){return Et(Ka(e.length),e)}async function G0(e,t,n){const r=Math.ceil((t>>3)/32),o=new Uint8Array(r*32);for(let s=0;s<r;s++){const a=new Uint8Array(4+e.length+n.length);a.set(Ka(s+1)),a.set(e,4),a.set(n,4+e.length),o.set(await q0("sha256",a),s*32)}return o.slice(0,t>>3)}const B0=e=>{let t=e;typeof t=="string"&&(t=$e.encode(t));const n=32768,r=[];for(let o=0;o<t.length;o+=n)r.push(String.fromCharCode.apply(null,t.subarray(o,o+n)));return btoa(r.join(""))},Ve=e=>B0(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),V0=e=>{const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n},Oe=e=>{let t=e;t instanceof Uint8Array&&(t=qt.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return V0(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};class Me extends Error{constructor(t,n){var r;super(t,n),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,(r=Error.captureStackTrace)==null||r.call(Error,this,this.constructor)}}Me.code="ERR_JOSE_GENERIC";class qe extends Me{constructor(t,n,r="unspecified",o="unspecified"){super(t,{cause:{claim:r,reason:o,payload:n}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=r,this.reason=o,this.payload=n}}qe.code="ERR_JWT_CLAIM_VALIDATION_FAILED";class za extends Me{constructor(t,n,r="unspecified",o="unspecified"){super(t,{cause:{claim:r,reason:o,payload:n}}),this.code="ERR_JWT_EXPIRED",this.claim=r,this.reason=o,this.payload=n}}za.code="ERR_JWT_EXPIRED";class Vr extends Me{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}}Vr.code="ERR_JOSE_ALG_NOT_ALLOWED";class Se extends Me{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}}Se.code="ERR_JOSE_NOT_SUPPORTED";class Jr extends Me{constructor(t="decryption operation failed",n){super(t,n),this.code="ERR_JWE_DECRYPTION_FAILED"}}Jr.code="ERR_JWE_DECRYPTION_FAILED";class B extends Me{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}}B.code="ERR_JWE_INVALID";class ke extends Me{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}}ke.code="ERR_JWS_INVALID";class Ga extends Me{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}}Ga.code="ERR_JWT_INVALID";class J0 extends Me{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}}J0.code="ERR_JWK_INVALID";class Ba extends Me{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}}Ba.code="ERR_JWKS_INVALID";class Va extends Me{constructor(t="no applicable key found in the JSON Web Key Set",n){super(t,n),this.code="ERR_JWKS_NO_MATCHING_KEY"}}Va.code="ERR_JWKS_NO_MATCHING_KEY";class Kf extends Me{constructor(t="multiple matching keys found in the JSON Web Key Set",n){super(t,n),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}Kf.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";class qf extends Me{constructor(t="request timed out",n){super(t,n),this.code="ERR_JWKS_TIMEOUT"}}qf.code="ERR_JWKS_TIMEOUT";class zf extends Me{constructor(t="signature verification failed",n){super(t,n),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}zf.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";const Ja=ce.getRandomValues.bind(ce);function Gf(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new Se(`Unsupported JWE Algorithm: ${e}`)}}const X0=e=>Ja(new Uint8Array(Gf(e)>>3)),Bf=(e,t)=>{if(t.length<<3!==Gf(e))throw new B("Invalid Initialization Vector length")},Xr=(e,t)=>{const n=e.byteLength<<3;if(n!==t)throw new B(`Invalid Content Encryption Key length. Expected ${t} bits, got ${n} bits`)},Y0=(e,t)=>{if(!(e instanceof Uint8Array))throw new TypeError("First argument must be a buffer");if(!(t instanceof Uint8Array))throw new TypeError("Second argument must be a buffer");if(e.length!==t.length)throw new TypeError("Input buffers must have the same length");const n=e.length;let r=0,o=-1;for(;++o<n;)r|=e[o]^t[o];return r===0};function Ne(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function _t(e,t){return e.name===t}function Yr(e){return parseInt(e.name.slice(4),10)}function Z0(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function Vf(e,t){if(t.length&&!t.some(n=>e.usages.includes(n))){let n="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const r=t.pop();n+=`one of ${t.join(", ")}, or ${r}.`}else t.length===2?n+=`one of ${t[0]} or ${t[1]}.`:n+=`${t[0]}.`;throw new TypeError(n)}}function Q0(e,t,...n){switch(t){case"HS256":case"HS384":case"HS512":{if(!_t(e.algorithm,"HMAC"))throw Ne("HMAC");const r=parseInt(t.slice(2),10);if(Yr(e.algorithm.hash)!==r)throw Ne(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!_t(e.algorithm,"RSASSA-PKCS1-v1_5"))throw Ne("RSASSA-PKCS1-v1_5");const r=parseInt(t.slice(2),10);if(Yr(e.algorithm.hash)!==r)throw Ne(`SHA-${r}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!_t(e.algorithm,"RSA-PSS"))throw Ne("RSA-PSS");const r=parseInt(t.slice(2),10);if(Yr(e.algorithm.hash)!==r)throw Ne(`SHA-${r}`,"algorithm.hash");break}case"EdDSA":{if(e.algorithm.name!=="Ed25519"&&e.algorithm.name!=="Ed448")throw Ne("Ed25519 or Ed448");break}case"Ed25519":{if(!_t(e.algorithm,"Ed25519"))throw Ne("Ed25519");break}case"ES256":case"ES384":case"ES512":{if(!_t(e.algorithm,"ECDSA"))throw Ne("ECDSA");const r=Z0(t);if(e.algorithm.namedCurve!==r)throw Ne(r,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}Vf(e,n)}function Nt(e,t,...n){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!_t(e.algorithm,"AES-GCM"))throw Ne("AES-GCM");const r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw Ne(r,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!_t(e.algorithm,"AES-KW"))throw Ne("AES-KW");const r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw Ne(r,"algorithm.length");break}case"ECDH":{switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw Ne("ECDH, X25519, or X448")}break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!_t(e.algorithm,"PBKDF2"))throw Ne("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!_t(e.algorithm,"RSA-OAEP"))throw Ne("RSA-OAEP");const r=parseInt(t.slice(9),10)||1;if(Yr(e.algorithm.hash)!==r)throw Ne(`SHA-${r}`,"algorithm.hash");break}default:throw new TypeError("CryptoKey does not support this operation")}Vf(e,n)}function Jf(e,t,...n){var r;if(n=n.filter(Boolean),n.length>2){const o=n.pop();e+=`one of type ${n.join(", ")}, or ${o}.`}else n.length===2?e+=`one of type ${n[0]} or ${n[1]}.`:e+=`of type ${n[0]}.`;return t==null?e+=` Received ${t}`:typeof t=="function"&&t.name?e+=` Received function ${t.name}`:typeof t=="object"&&t!=null&&(r=t.constructor)!=null&&r.name&&(e+=` Received an instance of ${t.constructor.name}`),e}const We=(e,...t)=>Jf("Key must be ",e,...t);function Xf(e,t,...n){return Jf(`Key for the ${e} algorithm must be `,t,...n)}const Yf=e=>Be(e)?!0:(e==null?void 0:e[Symbol.toStringTag])==="KeyObject",Fe=["CryptoKey"];async function eE(e,t,n,r,o,s){if(!(t instanceof Uint8Array))throw new TypeError(We(t,"Uint8Array"));const a=parseInt(e.slice(1,4),10),i=await ce.subtle.importKey("raw",t.subarray(a>>3),"AES-CBC",!1,["decrypt"]),c=await ce.subtle.importKey("raw",t.subarray(0,a>>3),{hash:`SHA-${a<<1}`,name:"HMAC"},!1,["sign"]),u=Et(s,r,n,Ff(s.length<<3)),l=new Uint8Array((await ce.subtle.sign("HMAC",c,u)).slice(0,a>>3));let d;try{d=Y0(o,l)}catch{}if(!d)throw new Jr;let h;try{h=new Uint8Array(await ce.subtle.decrypt({iv:r,name:"AES-CBC"},i,n))}catch{}if(!h)throw new Jr;return h}async function tE(e,t,n,r,o,s){let a;t instanceof Uint8Array?a=await ce.subtle.importKey("raw",t,"AES-GCM",!1,["decrypt"]):(Nt(t,e,"decrypt"),a=t);try{return new Uint8Array(await ce.subtle.decrypt({additionalData:s,iv:r,name:"AES-GCM",tagLength:128},a,Et(n,o)))}catch{throw new Jr}}const Zf=async(e,t,n,r,o,s)=>{if(!Be(t)&&!(t instanceof Uint8Array))throw new TypeError(We(t,...Fe,"Uint8Array"));if(!r)throw new B("JWE Initialization Vector missing");if(!o)throw new B("JWE Authentication Tag missing");switch(Bf(e,r),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return t instanceof Uint8Array&&Xr(t,parseInt(e.slice(-3),10)),eE(e,t,n,r,o,s);case"A128GCM":case"A192GCM":case"A256GCM":return t instanceof Uint8Array&&Xr(t,parseInt(e.slice(1,4),10)),tE(e,t,n,r,o,s);default:throw new Se("Unsupported JWE Content Encryption Algorithm")}},Xa=(...e)=>{const t=e.filter(Boolean);if(t.length===0||t.length===1)return!0;let n;for(const r of t){const o=Object.keys(r);if(!n||n.size===0){n=new Set(o);continue}for(const s of o){if(n.has(s))return!1;n.add(s)}}return!0};function nE(e){return typeof e=="object"&&e!==null}function Je(e){if(!nE(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}const Zr=[{hash:"SHA-256",name:"HMAC"},!0,["sign"]];function Qf(e,t){if(e.algorithm.length!==parseInt(t.slice(1,4),10))throw new TypeError(`Invalid key size for alg: ${t}`)}function eh(e,t,n){if(Be(e))return Nt(e,t,n),e;if(e instanceof Uint8Array)return ce.subtle.importKey("raw",e,"AES-KW",!0,[n]);throw new TypeError(We(e,...Fe,"Uint8Array"))}const Ya=async(e,t,n)=>{const r=await eh(t,e,"wrapKey");Qf(r,e);const o=await ce.subtle.importKey("raw",n,...Zr);return new Uint8Array(await ce.subtle.wrapKey("raw",o,r,"AES-KW"))},Za=async(e,t,n)=>{const r=await eh(t,e,"unwrapKey");Qf(r,e);const o=await ce.subtle.unwrapKey("raw",n,r,"AES-KW",...Zr);return new Uint8Array(await ce.subtle.exportKey("raw",o))};async function th(e,t,n,r,o=new Uint8Array(0),s=new Uint8Array(0)){if(!Be(e))throw new TypeError(We(e,...Fe));if(Nt(e,"ECDH"),!Be(t))throw new TypeError(We(t,...Fe));Nt(t,"ECDH","deriveBits");const a=Et(qa($e.encode(n)),qa(o),qa(s),Ka(r));let i;e.algorithm.name==="X25519"?i=256:e.algorithm.name==="X448"?i=448:i=Math.ceil(parseInt(e.algorithm.namedCurve.substr(-3),10)/8)<<3;const c=new Uint8Array(await ce.subtle.deriveBits({name:e.algorithm.name,public:e},t,i));return G0(c,r,a)}async function rE(e){if(!Be(e))throw new TypeError(We(e,...Fe));return ce.subtle.generateKey(e.algorithm,!0,["deriveBits"])}function nh(e){if(!Be(e))throw new TypeError(We(e,...Fe));return["P-256","P-384","P-521"].includes(e.algorithm.namedCurve)||e.algorithm.name==="X25519"||e.algorithm.name==="X448"}function oE(e){if(!(e instanceof Uint8Array)||e.length<8)throw new B("PBES2 Salt Input must be 8 or more octets")}function sE(e,t){if(e instanceof Uint8Array)return ce.subtle.importKey("raw",e,"PBKDF2",!1,["deriveBits"]);if(Be(e))return Nt(e,t,"deriveBits","deriveKey"),e;throw new TypeError(We(e,...Fe,"Uint8Array"))}async function rh(e,t,n,r){oE(e);const o=z0(t,e),s=parseInt(t.slice(13,16),10),a={hash:`SHA-${t.slice(8,11)}`,iterations:n,name:"PBKDF2",salt:o},i={length:s,name:"AES-KW"},c=await sE(r,t);if(c.usages.includes("deriveBits"))return new Uint8Array(await ce.subtle.deriveBits(a,c,s));if(c.usages.includes("deriveKey"))return ce.subtle.deriveKey(a,c,i,!1,["wrapKey","unwrapKey"]);throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"')}const aE=async(e,t,n,r=2048,o=Ja(new Uint8Array(16)))=>{const s=await rh(o,e,r,t);return{encryptedKey:await Ya(e.slice(-6),s,n),p2c:r,p2s:Ve(o)}},iE=async(e,t,n,r,o)=>{const s=await rh(o,e,r,t);return Za(e.slice(-6),s,n)};function Qr(e){switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new Se(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}const Qa=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:n}=t.algorithm;if(typeof n!="number"||n<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}},cE=async(e,t,n)=>{if(!Be(t))throw new TypeError(We(t,...Fe));if(Nt(t,e,"encrypt","wrapKey"),Qa(e,t),t.usages.includes("encrypt"))return new Uint8Array(await ce.subtle.encrypt(Qr(e),t,n));if(t.usages.includes("wrapKey")){const r=await ce.subtle.importKey("raw",n,...Zr);return new Uint8Array(await ce.subtle.wrapKey("raw",r,t,Qr(e)))}throw new TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation')},uE=async(e,t,n)=>{if(!Be(t))throw new TypeError(We(t,...Fe));if(Nt(t,e,"decrypt","unwrapKey"),Qa(e,t),t.usages.includes("decrypt"))return new Uint8Array(await ce.subtle.decrypt(Qr(e),t,n));if(t.usages.includes("unwrapKey")){const r=await ce.subtle.unwrapKey("raw",n,t,Qr(e),...Zr);return new Uint8Array(await ce.subtle.exportKey("raw",r))}throw new TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation')};function gn(e){return Je(e)&&typeof e.kty=="string"}function lE(e){return e.kty!=="oct"&&typeof e.d=="string"}function dE(e){return e.kty!=="oct"&&typeof e.d>"u"}function fE(e){return gn(e)&&e.kty==="oct"&&typeof e.k=="string"}function hE(e){let t,n;switch(e.kty){case"RSA":{switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},n=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},n=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},n=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new Se('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"EC":{switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},n=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},n=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},n=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},n=e.d?["deriveBits"]:[];break;default:throw new Se('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"OKP":{switch(e.alg){case"Ed25519":t={name:"Ed25519"},n=e.d?["sign"]:["verify"];break;case"EdDSA":t={name:e.crv},n=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},n=e.d?["deriveBits"]:[];break;default:throw new Se('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}default:throw new Se('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:n}}const oh=async e=>{if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:t,keyUsages:n}=hE(e),r=[t,e.ext??!1,e.key_ops??n],o={...e};return delete o.alg,delete o.use,ce.subtle.importKey("jwk",o,...r)},sh=e=>Oe(e);let bn,yn;const ah=e=>(e==null?void 0:e[Symbol.toStringTag])==="KeyObject",eo=async(e,t,n,r,o=!1)=>{let s=e.get(t);if(s!=null&&s[r])return s[r];const a=await oh({...n,alg:r});return o&&Object.freeze(t),s?s[r]=a:e.set(t,{[r]:a}),a},zt={normalizePublicKey:(e,t)=>{if(ah(e)){let n=e.export({format:"jwk"});return delete n.d,delete n.dp,delete n.dq,delete n.p,delete n.q,delete n.qi,n.k?sh(n.k):(yn||(yn=new WeakMap),eo(yn,e,n,t))}return gn(e)?e.k?Oe(e.k):(yn||(yn=new WeakMap),eo(yn,e,e,t,!0)):e},normalizePrivateKey:(e,t)=>{if(ah(e)){let n=e.export({format:"jwk"});return n.k?sh(n.k):(bn||(bn=new WeakMap),eo(bn,e,n,t))}return gn(e)?e.k?Oe(e.k):(bn||(bn=new WeakMap),eo(bn,e,e,t,!0)):e}};function ei(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new Se(`Unsupported JWE Algorithm: ${e}`)}}const wn=e=>Ja(new Uint8Array(ei(e)>>3)),It=(e,t,n=0)=>{n===0&&(t.unshift(t.length),t.unshift(6));const r=e.indexOf(t[0],n);if(r===-1)return!1;const o=e.subarray(r,r+t.length);return o.length!==t.length?!1:o.every((s,a)=>s===t[a])||It(e,t,r+1)},ih=e=>{switch(!0){case It(e,[42,134,72,206,61,3,1,7]):return"P-256";case It(e,[43,129,4,0,34]):return"P-384";case It(e,[43,129,4,0,35]):return"P-521";case It(e,[43,101,110]):return"X25519";case It(e,[43,101,111]):return"X448";case It(e,[43,101,112]):return"Ed25519";case It(e,[43,101,113]):return"Ed448";default:throw new Se("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},pE=async(e,t,n,r,o)=>{let s,a;const i=new Uint8Array(atob(n.replace(e,"")).split("").map(c=>c.charCodeAt(0)));switch(r){case"PS256":case"PS384":case"PS512":s={name:"RSA-PSS",hash:`SHA-${r.slice(-3)}`},a=["sign"];break;case"RS256":case"RS384":case"RS512":s={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${r.slice(-3)}`},a=["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":s={name:"RSA-OAEP",hash:`SHA-${parseInt(r.slice(-3),10)||1}`},a=["decrypt","unwrapKey"];break;case"ES256":s={name:"ECDSA",namedCurve:"P-256"},a=["sign"];break;case"ES384":s={name:"ECDSA",namedCurve:"P-384"},a=["sign"];break;case"ES512":s={name:"ECDSA",namedCurve:"P-521"},a=["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{const c=ih(i);s=c.startsWith("P-")?{name:"ECDH",namedCurve:c}:{name:c},a=["deriveBits"];break}case"Ed25519":s={name:"Ed25519"},a=["sign"];break;case"EdDSA":s={name:ih(i)},a=["sign"];break;default:throw new Se('Invalid or unsupported "alg" (Algorithm) value')}return ce.subtle.importKey(t,i,s,!1,a)},mE=(e,t,n)=>pE(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"pkcs8",e,t);async function gE(e,t,n){if(typeof e!="string"||e.indexOf("-----BEGIN PRIVATE KEY-----")!==0)throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return mE(e,t)}async function ti(e,t){if(!Je(e))throw new TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if(typeof e.k!="string"||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return Oe(e.k);case"RSA":if("oth"in e&&e.oth!==void 0)throw new Se('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return oh({...e,alg:t});default:throw new Se('Unsupported "kty" (Key Type) Parameter value')}}const vn=e=>e==null?void 0:e[Symbol.toStringTag],ni=(e,t,n)=>{var r,o;if(t.use!==void 0&&t.use!=="sig")throw new TypeError("Invalid key for this operation, when present its use must be sig");if(t.key_ops!==void 0&&((o=(r=t.key_ops).includes)==null?void 0:o.call(r,n))!==!0)throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${n}`);if(t.alg!==void 0&&t.alg!==e)throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);return!0},bE=(e,t,n,r)=>{if(!(t instanceof Uint8Array)){if(r&&gn(t)){if(fE(t)&&ni(e,t,n))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!Yf(t))throw new TypeError(Xf(e,t,...Fe,"Uint8Array",r?"JSON Web Key":null));if(t.type!=="secret")throw new TypeError(`${vn(t)} instances for symmetric algorithms must be of type "secret"`)}},yE=(e,t,n,r)=>{if(r&&gn(t))switch(n){case"sign":if(lE(t)&&ni(e,t,n))return;throw new TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(dE(t)&&ni(e,t,n))return;throw new TypeError("JSON Web Key for this operation be a public JWK")}if(!Yf(t))throw new TypeError(Xf(e,t,...Fe,r?"JSON Web Key":null));if(t.type==="secret")throw new TypeError(`${vn(t)} instances for asymmetric algorithms must not be of type "secret"`);if(n==="sign"&&t.type==="public")throw new TypeError(`${vn(t)} instances for asymmetric algorithm signing must be of type "private"`);if(n==="decrypt"&&t.type==="public")throw new TypeError(`${vn(t)} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&n==="verify"&&t.type==="private")throw new TypeError(`${vn(t)} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&n==="encrypt"&&t.type==="private")throw new TypeError(`${vn(t)} instances for asymmetric algorithm encryption must be of type "public"`)};function ch(e,t,n,r){t.startsWith("HS")||t==="dir"||t.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(t)?bE(t,n,r,e):yE(t,n,r,e)}const uh=ch.bind(void 0,!1),lh=ch.bind(void 0,!0);async function wE(e,t,n,r,o){if(!(n instanceof Uint8Array))throw new TypeError(We(n,"Uint8Array"));const s=parseInt(e.slice(1,4),10),a=await ce.subtle.importKey("raw",n.subarray(s>>3),"AES-CBC",!1,["encrypt"]),i=await ce.subtle.importKey("raw",n.subarray(0,s>>3),{hash:`SHA-${s<<1}`,name:"HMAC"},!1,["sign"]),c=new Uint8Array(await ce.subtle.encrypt({iv:r,name:"AES-CBC"},a,t)),u=Et(o,r,c,Ff(o.length<<3)),l=new Uint8Array((await ce.subtle.sign("HMAC",i,u)).slice(0,s>>3));return{ciphertext:c,tag:l,iv:r}}async function vE(e,t,n,r,o){let s;n instanceof Uint8Array?s=await ce.subtle.importKey("raw",n,"AES-GCM",!1,["encrypt"]):(Nt(n,e,"encrypt"),s=n);const a=new Uint8Array(await ce.subtle.encrypt({additionalData:o,iv:r,name:"AES-GCM",tagLength:128},s,t)),i=a.slice(-16);return{ciphertext:a.slice(0,-16),tag:i,iv:r}}const dh=async(e,t,n,r,o)=>{if(!Be(n)&&!(n instanceof Uint8Array))throw new TypeError(We(n,...Fe,"Uint8Array"));switch(r?Bf(e,r):r=X0(e),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return n instanceof Uint8Array&&Xr(n,parseInt(e.slice(-3),10)),wE(e,t,n,r,o);case"A128GCM":case"A192GCM":case"A256GCM":return n instanceof Uint8Array&&Xr(n,parseInt(e.slice(1,4),10)),vE(e,t,n,r,o);default:throw new Se("Unsupported JWE Content Encryption Algorithm")}};async function EE(e,t,n,r){const o=e.slice(0,7),s=await dh(o,n,t,r,new Uint8Array(0));return{encryptedKey:s.ciphertext,iv:Ve(s.iv),tag:Ve(s.tag)}}async function _E(e,t,n,r,o){const s=e.slice(0,7);return Zf(s,t,n,r,o,new Uint8Array(0))}async function SE(e,t,n,r,o){var s;switch(uh(e,t,"decrypt"),t=await((s=zt.normalizePrivateKey)==null?void 0:s.call(zt,t,e))||t,e){case"dir":{if(n!==void 0)throw new B("Encountered unexpected JWE Encrypted Key");return t}case"ECDH-ES":if(n!==void 0)throw new B("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!Je(r.epk))throw new B('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!nh(t))throw new Se("ECDH with the provided key is not allowed or not supported by your javascript runtime");const a=await ti(r.epk,e);let i,c;if(r.apu!==void 0){if(typeof r.apu!="string")throw new B('JOSE Header "apu" (Agreement PartyUInfo) invalid');try{i=Oe(r.apu)}catch{throw new B("Failed to base64url decode the apu")}}if(r.apv!==void 0){if(typeof r.apv!="string")throw new B('JOSE Header "apv" (Agreement PartyVInfo) invalid');try{c=Oe(r.apv)}catch{throw new B("Failed to base64url decode the apv")}}const u=await th(a,t,e==="ECDH-ES"?r.enc:e,e==="ECDH-ES"?ei(r.enc):parseInt(e.slice(-5,-2),10),i,c);if(e==="ECDH-ES")return u;if(n===void 0)throw new B("JWE Encrypted Key missing");return Za(e.slice(-6),u,n)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(n===void 0)throw new B("JWE Encrypted Key missing");return uE(e,t,n)}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{if(n===void 0)throw new B("JWE Encrypted Key missing");if(typeof r.p2c!="number")throw new B('JOSE Header "p2c" (PBES2 Count) missing or invalid');const a=(o==null?void 0:o.maxPBES2Count)||1e4;if(r.p2c>a)throw new B('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if(typeof r.p2s!="string")throw new B('JOSE Header "p2s" (PBES2 Salt) missing or invalid');let i;try{i=Oe(r.p2s)}catch{throw new B("Failed to base64url decode the p2s")}return iE(e,t,n,r.p2c,i)}case"A128KW":case"A192KW":case"A256KW":{if(n===void 0)throw new B("JWE Encrypted Key missing");return Za(e,t,n)}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{if(n===void 0)throw new B("JWE Encrypted Key missing");if(typeof r.iv!="string")throw new B('JOSE Header "iv" (Initialization Vector) missing or invalid');if(typeof r.tag!="string")throw new B('JOSE Header "tag" (Authentication Tag) missing or invalid');let a;try{a=Oe(r.iv)}catch{throw new B("Failed to base64url decode the iv")}let i;try{i=Oe(r.tag)}catch{throw new B("Failed to base64url decode the tag")}return _E(e,t,n,a,i)}default:throw new Se('Invalid or unsupported "alg" (JWE Algorithm) header value')}}function ri(e,t,n,r,o){if(o.crit!==void 0&&(r==null?void 0:r.crit)===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!r||r.crit===void 0)return new Set;if(!Array.isArray(r.crit)||r.crit.length===0||r.crit.some(a=>typeof a!="string"||a.length===0))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let s;n!==void 0?s=new Map([...Object.entries(n),...t.entries()]):s=t;for(const a of r.crit){if(!s.has(a))throw new Se(`Extension Header Parameter "${a}" is not recognized`);if(o[a]===void 0)throw new e(`Extension Header Parameter "${a}" is missing`);if(s.get(a)&&r[a]===void 0)throw new e(`Extension Header Parameter "${a}" MUST be integrity protected`)}return new Set(r.crit)}const oi=(e,t)=>{if(t!==void 0&&(!Array.isArray(t)||t.some(n=>typeof n!="string")))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};async function xE(e,t,n){if(!Je(e))throw new B("Flattened JWE must be an object");if(e.protected===void 0&&e.header===void 0&&e.unprotected===void 0)throw new B("JOSE Header missing");if(e.iv!==void 0&&typeof e.iv!="string")throw new B("JWE Initialization Vector incorrect type");if(typeof e.ciphertext!="string")throw new B("JWE Ciphertext missing or incorrect type");if(e.tag!==void 0&&typeof e.tag!="string")throw new B("JWE Authentication Tag incorrect type");if(e.protected!==void 0&&typeof e.protected!="string")throw new B("JWE Protected Header incorrect type");if(e.encrypted_key!==void 0&&typeof e.encrypted_key!="string")throw new B("JWE Encrypted Key incorrect type");if(e.aad!==void 0&&typeof e.aad!="string")throw new B("JWE AAD incorrect type");if(e.header!==void 0&&!Je(e.header))throw new B("JWE Shared Unprotected Header incorrect type");if(e.unprotected!==void 0&&!Je(e.unprotected))throw new B("JWE Per-Recipient Unprotected Header incorrect type");let r;if(e.protected)try{const f=Oe(e.protected);r=JSON.parse(qt.decode(f))}catch{throw new B("JWE Protected Header is invalid")}if(!Xa(r,e.header,e.unprotected))throw new B("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");const o={...r,...e.header,...e.unprotected};if(ri(B,new Map,n==null?void 0:n.crit,r,o),o.zip!==void 0)throw new Se('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');const{alg:s,enc:a}=o;if(typeof s!="string"||!s)throw new B("missing JWE Algorithm (alg) in JWE Header");if(typeof a!="string"||!a)throw new B("missing JWE Encryption Algorithm (enc) in JWE Header");const i=n&&oi("keyManagementAlgorithms",n.keyManagementAlgorithms),c=n&&oi("contentEncryptionAlgorithms",n.contentEncryptionAlgorithms);if(i&&!i.has(s)||!i&&s.startsWith("PBES2"))throw new Vr('"alg" (Algorithm) Header Parameter value not allowed');if(c&&!c.has(a))throw new Vr('"enc" (Encryption Algorithm) Header Parameter value not allowed');let u;if(e.encrypted_key!==void 0)try{u=Oe(e.encrypted_key)}catch{throw new B("Failed to base64url decode the encrypted_key")}let l=!1;typeof t=="function"&&(t=await t(r,e),l=!0);let d;try{d=await SE(s,t,u,o,n)}catch(f){if(f instanceof TypeError||f instanceof B||f instanceof Se)throw f;d=wn(a)}let h,m;if(e.iv!==void 0)try{h=Oe(e.iv)}catch{throw new B("Failed to base64url decode the iv")}if(e.tag!==void 0)try{m=Oe(e.tag)}catch{throw new B("Failed to base64url decode the tag")}const E=$e.encode(e.protected??"");let y;e.aad!==void 0?y=Et(E,$e.encode("."),$e.encode(e.aad)):y=E;let g;try{g=Oe(e.ciphertext)}catch{throw new B("Failed to base64url decode the ciphertext")}const b={plaintext:await Zf(a,d,g,h,m,y)};if(e.protected!==void 0&&(b.protectedHeader=r),e.aad!==void 0)try{b.additionalAuthenticatedData=Oe(e.aad)}catch{throw new B("Failed to base64url decode the aad")}return e.unprotected!==void 0&&(b.sharedUnprotectedHeader=e.unprotected),e.header!==void 0&&(b.unprotectedHeader=e.header),l?{...b,key:t}:b}async function AE(e,t,n){if(e instanceof Uint8Array&&(e=qt.decode(e)),typeof e!="string")throw new B("Compact JWE must be a string or Uint8Array");const{0:r,1:o,2:s,3:a,4:i,length:c}=e.split(".");if(c!==5)throw new B("Invalid Compact JWE");const u=await xE({ciphertext:a,iv:s||void 0,protected:r,tag:i||void 0,encrypted_key:o||void 0},t,n),l={plaintext:u.plaintext,protectedHeader:u.protectedHeader};return typeof t=="function"?{...l,key:u.key}:l}const RE=Symbol(),CE=async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:Ve(e)};if(!Be(e))throw new TypeError(We(e,...Fe,"Uint8Array"));if(!e.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");const{ext:t,key_ops:n,alg:r,use:o,...s}=await ce.subtle.exportKey("jwk",e);return s};async function TE(e){return CE(e)}async function PE(e,t,n,r,o={}){var c;let s,a,i;switch(uh(e,n,"encrypt"),n=await((c=zt.normalizePublicKey)==null?void 0:c.call(zt,n,e))||n,e){case"dir":{i=n;break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!nh(n))throw new Se("ECDH with the provided key is not allowed or not supported by your javascript runtime");const{apu:u,apv:l}=o;let{epk:d}=o;d||(d=(await rE(n)).privateKey);const{x:h,y:m,crv:E,kty:y}=await TE(d),g=await th(n,d,e==="ECDH-ES"?t:e,e==="ECDH-ES"?ei(t):parseInt(e.slice(-5,-2),10),u,l);if(a={epk:{x:h,crv:E,kty:y}},y==="EC"&&(a.epk.y=m),u&&(a.apu=Ve(u)),l&&(a.apv=Ve(l)),e==="ECDH-ES"){i=g;break}i=r||wn(t);const p=e.slice(-6);s=await Ya(p,g,i);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{i=r||wn(t),s=await cE(e,n,i);break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{i=r||wn(t);const{p2c:u,p2s:l}=o;({encryptedKey:s,...a}=await aE(e,n,i,u,l));break}case"A128KW":case"A192KW":case"A256KW":{i=r||wn(t),s=await Ya(e,n,i);break}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{i=r||wn(t);const{iv:u}=o;({encryptedKey:s,...a}=await EE(e,n,i,u));break}default:throw new Se('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:i,encryptedKey:s,parameters:a}}class OE{constructor(t){if(!(t instanceof Uint8Array))throw new TypeError("plaintext must be an instance of Uint8Array");this._plaintext=t}setKeyManagementParameters(t){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=t,this}setProtectedHeader(t){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=t,this}setSharedUnprotectedHeader(t){if(this._sharedUnprotectedHeader)throw new TypeError("setSharedUnprotectedHeader can only be called once");return this._sharedUnprotectedHeader=t,this}setUnprotectedHeader(t){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=t,this}setAdditionalAuthenticatedData(t){return this._aad=t,this}setContentEncryptionKey(t){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=t,this}setInitializationVector(t){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=t,this}async encrypt(t,n){if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new B("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!Xa(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new B("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");const r={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if(ri(B,new Map,n==null?void 0:n.crit,this._protectedHeader,r),r.zip!==void 0)throw new Se('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');const{alg:o,enc:s}=r;if(typeof o!="string"||!o)throw new B('JWE "alg" (Algorithm) Header Parameter missing or invalid');if(typeof s!="string"||!s)throw new B('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');let a;if(this._cek&&(o==="dir"||o==="ECDH-ES"))throw new TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${o}`);let i;{let y;({cek:i,encryptedKey:a,parameters:y}=await PE(o,s,t,this._cek,this._keyManagementParameters)),y&&(n&&RE in n?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...y}:this.setUnprotectedHeader(y):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...y}:this.setProtectedHeader(y))}let c,u,l;this._protectedHeader?u=$e.encode(Ve(JSON.stringify(this._protectedHeader))):u=$e.encode(""),this._aad?(l=Ve(this._aad),c=Et(u,$e.encode("."),$e.encode(l))):c=u;const{ciphertext:d,tag:h,iv:m}=await dh(s,this._plaintext,i,this._iv,c),E={ciphertext:Ve(d)};return m&&(E.iv=Ve(m)),h&&(E.tag=Ve(h)),a&&(E.encrypted_key=Ve(a)),l&&(E.aad=l),this._protectedHeader&&(E.protected=qt.decode(u)),this._sharedUnprotectedHeader&&(E.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(E.header=this._unprotectedHeader),E}}function kE(e,t){const n=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:n,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:n,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:n,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:n,name:"ECDSA",namedCurve:t.namedCurve};case"Ed25519":return{name:"Ed25519"};case"EdDSA":return{name:t.name};default:throw new Se(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}async function NE(e,t,n){if(t=await zt.normalizePublicKey(t,e),Be(t))return Q0(t,e,n),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(We(t,...Fe));return ce.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[n])}throw new TypeError(We(t,...Fe,"Uint8Array","JSON Web Key"))}const IE=async(e,t,n,r)=>{const o=await NE(e,t,"verify");Qa(e,o);const s=kE(e,o.algorithm);try{return await ce.subtle.verify(s,o,n,r)}catch{return!1}};async function fh(e,t,n){if(!Je(e))throw new ke("Flattened JWS must be an object");if(e.protected===void 0&&e.header===void 0)throw new ke('Flattened JWS must have either of the "protected" or "header" members');if(e.protected!==void 0&&typeof e.protected!="string")throw new ke("JWS Protected Header incorrect type");if(e.payload===void 0)throw new ke("JWS Payload missing");if(typeof e.signature!="string")throw new ke("JWS Signature missing or incorrect type");if(e.header!==void 0&&!Je(e.header))throw new ke("JWS Unprotected Header incorrect type");let r={};if(e.protected)try{const y=Oe(e.protected);r=JSON.parse(qt.decode(y))}catch{throw new ke("JWS Protected Header is invalid")}if(!Xa(r,e.header))throw new ke("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const o={...r,...e.header},s=ri(ke,new Map([["b64",!0]]),n==null?void 0:n.crit,r,o);let a=!0;if(s.has("b64")&&(a=r.b64,typeof a!="boolean"))throw new ke('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:i}=o;if(typeof i!="string"||!i)throw new ke('JWS "alg" (Algorithm) Header Parameter missing or invalid');const c=n&&oi("algorithms",n.algorithms);if(c&&!c.has(i))throw new Vr('"alg" (Algorithm) Header Parameter value not allowed');if(a){if(typeof e.payload!="string")throw new ke("JWS Payload must be a string")}else if(typeof e.payload!="string"&&!(e.payload instanceof Uint8Array))throw new ke("JWS Payload must be a string or an Uint8Array instance");let u=!1;typeof t=="function"?(t=await t(r,e),u=!0,lh(i,t,"verify"),gn(t)&&(t=await ti(t,i))):lh(i,t,"verify");const l=Et($e.encode(e.protected??""),$e.encode("."),typeof e.payload=="string"?$e.encode(e.payload):e.payload);let d;try{d=Oe(e.signature)}catch{throw new ke("Failed to base64url decode the signature")}if(!await IE(i,t,d,l))throw new zf;let m;if(a)try{m=Oe(e.payload)}catch{throw new ke("Failed to base64url decode the payload")}else typeof e.payload=="string"?m=$e.encode(e.payload):m=e.payload;const E={payload:m};return e.protected!==void 0&&(E.protectedHeader=r),e.header!==void 0&&(E.unprotectedHeader=e.header),u?{...E,key:t}:E}async function DE(e,t,n){if(e instanceof Uint8Array&&(e=qt.decode(e)),typeof e!="string")throw new ke("Compact JWS must be a string or Uint8Array");const{0:r,1:o,2:s,length:a}=e.split(".");if(a!==3)throw new ke("Invalid Compact JWS");const i=await fh({payload:o,protected:r,signature:s},t,n),c={payload:i.payload,protectedHeader:i.protectedHeader};return typeof t=="function"?{...c,key:i.key}:c}const Dt=e=>Math.floor(e.getTime()/1e3),hh=60,ph=hh*60,si=ph*24,ME=si*7,LE=si*365.25,jE=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,Yn=e=>{const t=jE.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const n=parseFloat(t[2]),r=t[3].toLowerCase();let o;switch(r){case"sec":case"secs":case"second":case"seconds":case"s":o=Math.round(n);break;case"minute":case"minutes":case"min":case"mins":case"m":o=Math.round(n*hh);break;case"hour":case"hours":case"hr":case"hrs":case"h":o=Math.round(n*ph);break;case"day":case"days":case"d":o=Math.round(n*si);break;case"week":case"weeks":case"w":o=Math.round(n*ME);break;default:o=Math.round(n*LE);break}return t[1]==="-"||t[4]==="ago"?-o:o},mh=e=>e.toLowerCase().replace(/^application\//,""),HE=(e,t)=>typeof e=="string"?t.includes(e):Array.isArray(e)?t.some(Set.prototype.has.bind(new Set(e))):!1,gh=(e,t,n={})=>{let r;try{r=JSON.parse(qt.decode(t))}catch{}if(!Je(r))throw new Ga("JWT Claims Set must be a top-level JSON object");const{typ:o}=n;if(o&&(typeof e.typ!="string"||mh(e.typ)!==mh(o)))throw new qe('unexpected "typ" JWT header value',r,"typ","check_failed");const{requiredClaims:s=[],issuer:a,subject:i,audience:c,maxTokenAge:u}=n,l=[...s];u!==void 0&&l.push("iat"),c!==void 0&&l.push("aud"),i!==void 0&&l.push("sub"),a!==void 0&&l.push("iss");for(const E of new Set(l.reverse()))if(!(E in r))throw new qe(`missing required "${E}" claim`,r,E,"missing");if(a&&!(Array.isArray(a)?a:[a]).includes(r.iss))throw new qe('unexpected "iss" claim value',r,"iss","check_failed");if(i&&r.sub!==i)throw new qe('unexpected "sub" claim value',r,"sub","check_failed");if(c&&!HE(r.aud,typeof c=="string"?[c]:c))throw new qe('unexpected "aud" claim value',r,"aud","check_failed");let d;switch(typeof n.clockTolerance){case"string":d=Yn(n.clockTolerance);break;case"number":d=n.clockTolerance;break;case"undefined":d=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:h}=n,m=Dt(h||new Date);if((r.iat!==void 0||u)&&typeof r.iat!="number")throw new qe('"iat" claim must be a number',r,"iat","invalid");if(r.nbf!==void 0){if(typeof r.nbf!="number")throw new qe('"nbf" claim must be a number',r,"nbf","invalid");if(r.nbf>m+d)throw new qe('"nbf" claim timestamp check failed',r,"nbf","check_failed")}if(r.exp!==void 0){if(typeof r.exp!="number")throw new qe('"exp" claim must be a number',r,"exp","invalid");if(r.exp<=m-d)throw new za('"exp" claim timestamp check failed',r,"exp","check_failed")}if(u){const E=m-r.iat,y=typeof u=="number"?u:Yn(u);if(E-d>y)throw new za('"iat" claim timestamp check failed (too far in the past)',r,"iat","check_failed");if(E<0-d)throw new qe('"iat" claim timestamp check failed (it should be in the past)',r,"iat","check_failed")}return r};async function UE(e,t,n){var a;const r=await DE(e,t,n);if((a=r.protectedHeader.crit)!=null&&a.includes("b64")&&r.protectedHeader.b64===!1)throw new Ga("JWTs MUST NOT use unencoded payload");const s={payload:gh(r.protectedHeader,r.payload,n),protectedHeader:r.protectedHeader};return typeof t=="function"?{...s,key:r.key}:s}async function $E(e,t,n){const r=await AE(e,t,n),o=gh(r.protectedHeader,r.plaintext,n),{protectedHeader:s}=r;if(s.iss!==void 0&&s.iss!==o.iss)throw new qe('replicated "iss" claim header parameter mismatch',o,"iss","mismatch");if(s.sub!==void 0&&s.sub!==o.sub)throw new qe('replicated "sub" claim header parameter mismatch',o,"sub","mismatch");if(s.aud!==void 0&&JSON.stringify(s.aud)!==JSON.stringify(o.aud))throw new qe('replicated "aud" claim header parameter mismatch',o,"aud","mismatch");const a={payload:o,protectedHeader:s};return typeof t=="function"?{...a,key:r.key}:a}class WE{constructor(t){this._flattened=new OE(t)}setContentEncryptionKey(t){return this._flattened.setContentEncryptionKey(t),this}setInitializationVector(t){return this._flattened.setInitializationVector(t),this}setProtectedHeader(t){return this._flattened.setProtectedHeader(t),this}setKeyManagementParameters(t){return this._flattened.setKeyManagementParameters(t),this}async encrypt(t,n){const r=await this._flattened.encrypt(t,n);return[r.protected,r.encrypted_key,r.iv,r.ciphertext,r.tag].join(".")}}function Gt(e,t){if(!Number.isFinite(t))throw new TypeError(`Invalid ${e} input`);return t}class FE{constructor(t={}){if(!Je(t))throw new TypeError("JWT Claims Set MUST be an object");this._payload=t}setIssuer(t){return this._payload={...this._payload,iss:t},this}setSubject(t){return this._payload={...this._payload,sub:t},this}setAudience(t){return this._payload={...this._payload,aud:t},this}setJti(t){return this._payload={...this._payload,jti:t},this}setNotBefore(t){return typeof t=="number"?this._payload={...this._payload,nbf:Gt("setNotBefore",t)}:t instanceof Date?this._payload={...this._payload,nbf:Gt("setNotBefore",Dt(t))}:this._payload={...this._payload,nbf:Dt(new Date)+Yn(t)},this}setExpirationTime(t){return typeof t=="number"?this._payload={...this._payload,exp:Gt("setExpirationTime",t)}:t instanceof Date?this._payload={...this._payload,exp:Gt("setExpirationTime",Dt(t))}:this._payload={...this._payload,exp:Dt(new Date)+Yn(t)},this}setIssuedAt(t){return typeof t>"u"?this._payload={...this._payload,iat:Dt(new Date)}:t instanceof Date?this._payload={...this._payload,iat:Gt("setIssuedAt",Dt(t))}:typeof t=="string"?this._payload={...this._payload,iat:Gt("setIssuedAt",Dt(new Date)+Yn(t))}:this._payload={...this._payload,iat:Gt("setIssuedAt",t)},this}}class KE extends FE{setProtectedHeader(t){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=t,this}setKeyManagementParameters(t){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=t,this}setContentEncryptionKey(t){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=t,this}setInitializationVector(t){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=t,this}replicateIssuerAsHeader(){return this._replicateIssuerAsHeader=!0,this}replicateSubjectAsHeader(){return this._replicateSubjectAsHeader=!0,this}replicateAudienceAsHeader(){return this._replicateAudienceAsHeader=!0,this}async encrypt(t,n){const r=new WE($e.encode(JSON.stringify(this._payload)));return this._replicateIssuerAsHeader&&(this._protectedHeader={...this._protectedHeader,iss:this._payload.iss}),this._replicateSubjectAsHeader&&(this._protectedHeader={...this._protectedHeader,sub:this._payload.sub}),this._replicateAudienceAsHeader&&(this._protectedHeader={...this._protectedHeader,aud:this._payload.aud}),r.setProtectedHeader(this._protectedHeader),this._iv&&r.setInitializationVector(this._iv),this._cek&&r.setContentEncryptionKey(this._cek),this._keyManagementParameters&&r.setKeyManagementParameters(this._keyManagementParameters),r.encrypt(t,n)}}function qE(e){switch(typeof e=="string"&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new Se('Unsupported "alg" value for a JSON Web Key Set')}}function zE(e){return e&&typeof e=="object"&&Array.isArray(e.keys)&&e.keys.every(GE)}function GE(e){return Je(e)}function bh(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}class BE{constructor(t){if(this._cached=new WeakMap,!zE(t))throw new Ba("JSON Web Key Set malformed");this._jwks=bh(t)}async getKey(t,n){const{alg:r,kid:o}={...t,...n==null?void 0:n.header},s=qE(r),a=this._jwks.keys.filter(u=>{let l=s===u.kty;if(l&&typeof o=="string"&&(l=o===u.kid),l&&typeof u.alg=="string"&&(l=r===u.alg),l&&typeof u.use=="string"&&(l=u.use==="sig"),l&&Array.isArray(u.key_ops)&&(l=u.key_ops.includes("verify")),l)switch(r){case"ES256":l=u.crv==="P-256";break;case"ES256K":l=u.crv==="secp256k1";break;case"ES384":l=u.crv==="P-384";break;case"ES512":l=u.crv==="P-521";break;case"Ed25519":l=u.crv==="Ed25519";break;case"EdDSA":l=u.crv==="Ed25519"||u.crv==="Ed448";break}return l}),{0:i,length:c}=a;if(c===0)throw new Va;if(c!==1){const u=new Kf,{_cached:l}=this;throw u[Symbol.asyncIterator]=async function*(){for(const d of a)try{yield await yh(l,d,r)}catch{}},u}return yh(this._cached,i,r)}}async function yh(e,t,n){const r=e.get(t)||e.set(t,{}).get(t);if(r[n]===void 0){const o=await ti({...t,ext:!0},n);if(o instanceof Uint8Array||o.type!=="public")throw new Ba("JSON Web Key Set members must be public keys");r[n]=o}return r[n]}function wh(e){const t=new BE(e),n=async(r,o)=>t.getKey(r,o);return Object.defineProperties(n,{jwks:{value:()=>bh(t._jwks),enumerable:!0,configurable:!1,writable:!1}}),n}const VE=async(e,t,n)=>{let r,o,s=!1;typeof AbortController=="function"&&(r=new AbortController,o=setTimeout(()=>{s=!0,r.abort()},t));const a=await fetch(e.href,{signal:r?r.signal:void 0,redirect:"manual",headers:n.headers}).catch(i=>{throw s?new qf:i});if(o!==void 0&&clearTimeout(o),a.status!==200)throw new Me("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await a.json()}catch{throw new Me("Failed to parse the JSON Web Key Set HTTP response as JSON")}};function JE(){return typeof WebSocketPair<"u"||typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime<"u"&&EdgeRuntime==="vercel"}let ai;(typeof navigator>"u"||!((Xh=(lo=navigator.userAgent)==null?void 0:lo.startsWith)!=null&&Xh.call(lo,"Mozilla/5.0 ")))&&(ai="jose/v5.10.0");const to=Symbol();function XE(e,t){return!(typeof e!="object"||e===null||!("uat"in e)||typeof e.uat!="number"||Date.now()-e.uat>=t||!("jwks"in e)||!Je(e.jwks)||!Array.isArray(e.jwks.keys)||!Array.prototype.every.call(e.jwks.keys,Je))}class YE{constructor(t,n){if(!(t instanceof URL))throw new TypeError("url must be an instance of URL");this._url=new URL(t.href),this._options={agent:n==null?void 0:n.agent,headers:n==null?void 0:n.headers},this._timeoutDuration=typeof(n==null?void 0:n.timeoutDuration)=="number"?n==null?void 0:n.timeoutDuration:5e3,this._cooldownDuration=typeof(n==null?void 0:n.cooldownDuration)=="number"?n==null?void 0:n.cooldownDuration:3e4,this._cacheMaxAge=typeof(n==null?void 0:n.cacheMaxAge)=="number"?n==null?void 0:n.cacheMaxAge:6e5,(n==null?void 0:n[to])!==void 0&&(this._cache=n==null?void 0:n[to],XE(n==null?void 0:n[to],this._cacheMaxAge)&&(this._jwksTimestamp=this._cache.uat,this._local=wh(this._cache.jwks)))}coolingDown(){return typeof this._jwksTimestamp=="number"?Date.now()<this._jwksTimestamp+this._cooldownDuration:!1}fresh(){return typeof this._jwksTimestamp=="number"?Date.now()<this._jwksTimestamp+this._cacheMaxAge:!1}async getKey(t,n){(!this._local||!this.fresh())&&await this.reload();try{return await this._local(t,n)}catch(r){if(r instanceof Va&&this.coolingDown()===!1)return await this.reload(),this._local(t,n);throw r}}async reload(){this._pendingFetch&&JE()&&(this._pendingFetch=void 0);const t=new Headers(this._options.headers);ai&&!t.has("User-Agent")&&(t.set("User-Agent",ai),this._options.headers=Object.fromEntries(t.entries())),this._pendingFetch||(this._pendingFetch=VE(this._url,this._timeoutDuration,this._options).then(n=>{this._local=wh(n),this._cache&&(this._cache.uat=Date.now(),this._cache.jwks=n),this._jwksTimestamp=Date.now(),this._pendingFetch=void 0}).catch(n=>{throw this._pendingFetch=void 0,n})),await this._pendingFetch}}function ZE(e,t){const n=new YE(e,t),r=async(o,s)=>n.getKey(o,s);return Object.defineProperties(r,{coolingDown:{get:()=>n.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>n.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>n.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>!!n._pendingFetch,enumerable:!0,configurable:!1},jwks:{value:()=>{var o;return(o=n._local)==null?void 0:o.jwks()},enumerable:!0,configurable:!1,writable:!1}}),r}const QE=Ve;let ii;(typeof navigator>"u"||!((Yh=(fo=navigator.userAgent)==null?void 0:fo.startsWith)!=null&&Yh.call(fo,"Mozilla/5.0 ")))&&(ii="oauth4webapi/v3.5.3");function Zn(e,t){if(e==null)return!1;try{return e instanceof t||Object.getPrototypeOf(e)[Symbol.toStringTag]===t.prototype[Symbol.toStringTag]}catch{return!1}}const Ze="ERR_INVALID_ARG_VALUE",Xe="ERR_INVALID_ARG_TYPE";function ve(e,t,n){const r=new TypeError(e,{cause:n});return Object.assign(r,{code:t}),r}const Mt=Symbol(),e_=Symbol(),t_=Symbol(),Bt=Symbol(),ci=Symbol(),n_=new TextEncoder,r_=new TextDecoder;function En(e){return typeof e=="string"?n_.encode(e):r_.decode(e)}let ui;Uint8Array.prototype.toBase64?ui=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0})):ui=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const n=[];for(let r=0;r<t.byteLength;r+=32768)n.push(String.fromCharCode.apply(null,t.subarray(r,r+32768)));return btoa(n.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")};let li;Uint8Array.fromBase64?li=e=>{try{return Uint8Array.fromBase64(e,{alphabet:"base64url"})}catch(t){throw ve("The input to be decoded is not correctly encoded.",Ze,t)}}:li=e=>{try{const t=atob(e.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"")),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}catch(t){throw ve("The input to be decoded is not correctly encoded.",Ze,t)}};function Vt(e){return typeof e=="string"?li(e):ui(e)}class Qe extends Error{constructor(n,r){var o;super(n,r);Le(this,"code");this.name=this.constructor.name,this.code=rS,(o=Error.captureStackTrace)==null||o.call(Error,this,this.constructor)}}class o_ extends Error{constructor(n,r){var o;super(n,r);Le(this,"code");this.name=this.constructor.name,r!=null&&r.code&&(this.code=r==null?void 0:r.code),(o=Error.captureStackTrace)==null||o.call(Error,this,this.constructor)}}function ee(e,t,n){return new o_(e,{code:t,cause:n})}function s_(e,t){if(!(e instanceof CryptoKey))throw ve(`${t} must be a CryptoKey`,Xe)}function a_(e,t){if(s_(e,t),e.type!=="private")throw ve(`${t} must be a private CryptoKey`,Ze)}function no(e){return!(e===null||typeof e!="object"||Array.isArray(e))}function di(e){Zn(e,Headers)&&(e=Object.fromEntries(e.entries()));const t=new Headers(e??{});if(ii&&!t.has("user-agent")&&t.set("user-agent",ii),t.has("authorization"))throw ve('"options.headers" must not include the "authorization" header name',Ze);return t}function vh(e){if(typeof e=="function"&&(e=e()),!(e instanceof AbortSignal))throw ve('"options.signal" must return or be an instance of AbortSignal',Xe);return e}function Eh(e){return e.includes("//")?e.replace("//","/"):e}function i_(e,t){return e.pathname==="/"?e.pathname=t:e.pathname=Eh(`${t}/${e.pathname}`),e}function c_(e,t){return e.pathname=Eh(`${e.pathname}/${t}`),e}async function u_(e,t,n,r){if(!(e instanceof URL))throw ve(`"${t}" must be an instance of URL`,Xe);xh(e,(r==null?void 0:r[Mt])!==!0);const o=n(new URL(e.href)),s=di(r==null?void 0:r.headers);return s.set("accept","application/json"),((r==null?void 0:r[Bt])||fetch)(o.href,{body:void 0,headers:Object.fromEntries(s.entries()),method:"GET",redirect:"manual",signal:r!=null&&r.signal?vh(r.signal):void 0})}async function l_(e,t){return u_(e,"issuerIdentifier",n=>{switch(t==null?void 0:t.algorithm){case void 0:case"oidc":c_(n,".well-known/openid-configuration");break;case"oauth2":i_(n,".well-known/oauth-authorization-server");break;default:throw ve('"options.algorithm" must be "oidc" (default), or "oauth2"',Ze)}return n},t)}function Qn(e,t,n,r,o){try{if(typeof e!="number"||!Number.isFinite(e))throw ve(`${n} must be a number`,Xe,o);if(e>0)return;throw ve(`${n} must be a positive number`,Ze,o)}catch(s){throw r?ee(s.message,r,o):s}}function Ie(e,t,n,r){try{if(typeof e!="string")throw ve(`${t} must be a string`,Xe,r);if(e.length===0)throw ve(`${t} must not be empty`,Ze,r)}catch(o){throw n?ee(o.message,n,r):o}}async function d_(e,t){const n=e;if(!(n instanceof URL)&&n!==Mh)throw ve('"expectedIssuerIdentifier" must be an instance of URL',Xe);if(!Zn(t,Response))throw ve('"response" must be an instance of Response',Xe);if(t.status!==200)throw ee('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)',Ih,t);so(t);const r=await Ei(t);if(Ie(r.issuer,'"response" body "issuer" property',he,{body:r}),n!==Mh&&new URL(r.issuer).href!==n.href)throw ee('"response" body "issuer" property does not match the expected value',cS,{expected:n.href,body:r,attribute:"issuer"});return r}function _h(e){h_(e,"application/json")}function f_(e,...t){let n='"response" content-type must be ';if(t.length>2){const r=t.pop();n+=`${t.join(", ")}, or ${r}`}else t.length===2?n+=`${t[0]} or ${t[1]}`:n+=t[0];return ee(n,sS,e)}function h_(e,t){if(F_(e)!==t)throw f_(e,t)}function ro(){return Vt(crypto.getRandomValues(new Uint8Array(32)))}function p_(){return ro()}function m_(){return ro()}function g_(){return ro()}async function b_(e){return Ie(e,"codeVerifier"),Vt(await crypto.subtle.digest("SHA-256",En(e)))}function y_(e){return e instanceof CryptoKey?{key:e}:(e==null?void 0:e.key)instanceof CryptoKey?(e.kid!==void 0&&Ie(e.kid,'"kid"'),{key:e.key,kid:e.kid}):{}}function w_(e){switch(e.algorithm.hash.name){case"SHA-256":return"PS256";case"SHA-384":return"PS384";case"SHA-512":return"PS512";default:throw new Qe("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}function v_(e){switch(e.algorithm.hash.name){case"SHA-256":return"RS256";case"SHA-384":return"RS384";case"SHA-512":return"RS512";default:throw new Qe("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}function E_(e){switch(e.algorithm.namedCurve){case"P-256":return"ES256";case"P-384":return"ES384";case"P-521":return"ES512";default:throw new Qe("unsupported EcKeyAlgorithm namedCurve",{cause:e})}}function __(e){switch(e.algorithm.name){case"RSA-PSS":return w_(e);case"RSASSA-PKCS1-v1_5":return v_(e);case"ECDSA":return E_(e);case"Ed25519":case"EdDSA":return"Ed25519";default:throw new Qe("unsupported CryptoKey algorithm name",{cause:e})}}function fi(e){const t=e==null?void 0:e[e_];return typeof t=="number"&&Number.isFinite(t)?t:0}function Sh(e){const t=e==null?void 0:e[t_];return typeof t=="number"&&Number.isFinite(t)&&Math.sign(t)!==-1?t:30}function hi(){return Math.floor(Date.now()/1e3)}function Jt(e){if(typeof e!="object"||e===null)throw ve('"as" must be an object',Xe);Ie(e.issuer,'"as.issuer"')}function Xt(e){if(typeof e!="object"||e===null)throw ve('"client" must be an object',Xe);Ie(e.client_id,'"client.client_id"')}function S_(e){return Ie(e,'"clientSecret"'),(t,n,r,o)=>{r.set("client_id",n.client_id),r.set("client_secret",e)}}function x_(e,t){const n=hi()+fi(t);return{jti:ro(),aud:e.issuer,exp:n+60,iat:n,nbf:n,iss:t.client_id,sub:t.client_id}}function A_(e,t){const{key:n,kid:r}=y_(e);return a_(n,'"clientPrivateKey.key"'),async(o,s,a,i)=>{const c={alg:__(n),kid:r},u=x_(o,s);a.set("client_id",s.client_id),a.set("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),a.set("client_assertion",await R_(c,u,n))}}async function R_(e,t,n){if(!n.usages.includes("sign"))throw ve('CryptoKey instances used for signing assertions must include "sign" in their "usages"',Ze);const r=`${Vt(En(JSON.stringify(e)))}.${Vt(En(JSON.stringify(t)))}`,o=Vt(await crypto.subtle.sign(pS(n),n,En(r)));return`${r}.${o}`}const C_=URL.parse?(e,t)=>URL.parse(e,t):(e,t)=>{try{return new URL(e,t)}catch{return null}};function xh(e,t){if(t&&e.protocol!=="https:")throw ee("only requests to HTTPS are allowed",aS,e);if(e.protocol!=="https:"&&e.protocol!=="http:")throw ee("only HTTP and HTTPS requests are allowed",iS,e)}function Ah(e,t,n,r){let o;if(typeof e!="string"||!(o=C_(e)))throw ee(`authorization server metadata does not contain a valid ${n?`"as.mtls_endpoint_aliases.${t}"`:`"as.${t}"`}`,e===void 0?uS:lS,{attribute:n?`mtls_endpoint_aliases.${t}`:t});return xh(o,r),o}function Rh(e,t,n,r){return n&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?Ah(e.mtls_endpoint_aliases[t],t,n,r):Ah(e[t],t,n,r)}async function T_(e,t,n,r,o){var u;Jt(e),Xt(t);const s=Rh(e,"pushed_authorization_request_endpoint",t.use_mtls_endpoint_aliases,(o==null?void 0:o[Mt])!==!0),a=new URLSearchParams(r);a.set("client_id",t.client_id);const i=di(o==null?void 0:o.headers);i.set("accept","application/json"),(o==null?void 0:o.DPoP)!==void 0&&(Th(o.DPoP),await o.DPoP.addProof(s,i,"POST"));const c=await Ph(e,t,n,s,a,i,o);return(u=o==null?void 0:o.DPoP)==null||u.cacheNonce(c),c}class P_ extends Error{constructor(n,r){var o;super(n,r);Le(this,"cause");Le(this,"code");Le(this,"error");Le(this,"status");Le(this,"error_description");Le(this,"response");this.name=this.constructor.name,this.code=nS,this.cause=r.cause,this.error=r.cause.error,this.status=r.response.status,this.error_description=r.cause.error_description,Object.defineProperty(this,"response",{enumerable:!1,value:r.response}),(o=Error.captureStackTrace)==null||o.call(Error,this,this.constructor)}}class O_ extends Error{constructor(n,r){var o;super(n,r);Le(this,"cause");Le(this,"code");Le(this,"error");Le(this,"error_description");this.name=this.constructor.name,this.code=oS,this.cause=r.cause,this.error=r.cause.get("error"),this.error_description=r.cause.get("error_description")??void 0,(o=Error.captureStackTrace)==null||o.call(Error,this,this.constructor)}}class k_ extends Error{constructor(n,r){var o;super(n,r);Le(this,"cause");Le(this,"code");Le(this,"response");Le(this,"status");this.name=this.constructor.name,this.code=tS,this.cause=r.cause,this.status=r.response.status,this.response=r.response,Object.defineProperty(this,"response",{enumerable:!1}),(o=Error.captureStackTrace)==null||o.call(Error,this,this.constructor)}}const oo="[a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+",N_="[a-zA-Z0-9\\-\\._\\~\\+\\/]+[=]{0,2}",I_="("+oo+")\\s*=\\s*"+'"((?:[^"\\\\]|\\\\.)*)"',D_="("+oo+")\\s*=\\s*("+oo+")",M_=new RegExp("^[,\\s]*("+oo+")\\s(.*)"),L_=new RegExp("^[,\\s]*"+I_+"[,\\s]*(.*)"),j_=new RegExp("^[,\\s]*"+D_+"[,\\s]*(.*)"),H_=new RegExp("^("+N_+")(?:$|[,\\s])(.*)");function U_(e){if(!Zn(e,Response))throw ve('"response" must be an instance of Response',Xe);const t=e.headers.get("www-authenticate");if(t===null)return;const n=[];let r=t;for(;r;){let o=r.match(M_);const s=o==null?void 0:o[1].toLowerCase();if(r=o==null?void 0:o["2"],!s)return;const a={};let i;for(;r;){let u,l;if(o=r.match(L_)){if([,u,l,r]=o,l.includes("\\"))try{l=JSON.parse(`"${l}"`)}catch{}a[u.toLowerCase()]=l;continue}if(o=r.match(j_)){[,u,l,r]=o,a[u.toLowerCase()]=l;continue}if(o=r.match(H_)){if(Object.keys(a).length)break;[,i,r]=o;break}return}const c={scheme:s,parameters:a};i&&(c.token68=i),n.push(c)}if(n.length)return n}async function $_(e,t,n){if(Jt(e),Xt(t),!Zn(n,Response))throw ve('"response" must be an instance of Response',Xe);Nh(n),await Ch(n,201,"Pushed Authorization Request Endpoint"),so(n);const r=await Ei(n);Ie(r.request_uri,'"response" body "request_uri" property',he,{body:r});let o=typeof r.expires_in!="number"?parseFloat(r.expires_in):r.expires_in;return Qn(o,!1,'"response" body "expires_in" property',he,{body:r}),r.expires_in=o,r}async function W_(e){if(e.status>399&&e.status<500){so(e),_h(e);try{const t=await e.clone().json();if(no(t)&&typeof t.error=="string"&&t.error.length)return t}catch{}}}async function Ch(e,t,n){var r;if(e.status!==t){let o;throw(o=await W_(e))?(await((r=e.body)==null?void 0:r.cancel()),new P_("server responded with an error in the response body",{cause:o,response:e})):ee(`"response" is not a conform ${n} response (unexpected HTTP status code)`,Ih,e)}}function Th(e){if(!gi.has(e))throw ve('"options.DPoP" is not a valid DPoPHandle',Ze)}function F_(e){var t;return(t=e.headers.get("content-type"))==null?void 0:t.split(";")[0]}async function Ph(e,t,n,r,o,s,a){return await n(e,t,o,s),s.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),((a==null?void 0:a[Bt])||fetch)(r.href,{body:o,headers:Object.fromEntries(s.entries()),method:"POST",redirect:"manual",signal:a!=null&&a.signal?vh(a.signal):void 0})}async function pi(e,t,n,r,o,s){var u;const a=Rh(e,"token_endpoint",t.use_mtls_endpoint_aliases,(s==null?void 0:s[Mt])!==!0);o.set("grant_type",r);const i=di(s==null?void 0:s.headers);i.set("accept","application/json"),(s==null?void 0:s.DPoP)!==void 0&&(Th(s.DPoP),await s.DPoP.addProof(a,i,"POST"));const c=await Ph(e,t,n,a,o,i,s);return(u=s==null?void 0:s.DPoP)==null||u.cacheNonce(c),c}async function K_(e,t,n,r,o){Jt(e),Xt(t),Ie(r,'"refreshToken"');const s=new URLSearchParams(o==null?void 0:o.additionalParameters);return s.set("refresh_token",r),pi(e,t,n,"refresh_token",s,o)}const Oh=new WeakMap,q_=new WeakMap;function kh(e){if(!e.id_token)return;const t=Oh.get(e);if(!t)throw ve('"ref" was already garbage collected or did not resolve from the proper sources',Ze);return t}async function mi(e,t,n,r,o){if(Jt(e),Xt(t),!Zn(n,Response))throw ve('"response" must be an instance of Response',Xe);Nh(n),await Ch(n,200,"Token Endpoint"),so(n);const s=await Ei(n);if(Ie(s.access_token,'"response" body "access_token" property',he,{body:s}),Ie(s.token_type,'"response" body "token_type" property',he,{body:s}),s.token_type=s.token_type.toLowerCase(),s.token_type!=="dpop"&&s.token_type!=="bearer")throw new Qe("unsupported `token_type` value",{cause:{body:s}});if(s.expires_in!==void 0){let a=typeof s.expires_in!="number"?parseFloat(s.expires_in):s.expires_in;Qn(a,!1,'"response" body "expires_in" property',he,{body:s}),s.expires_in=a}if(s.refresh_token!==void 0&&Ie(s.refresh_token,'"response" body "refresh_token" property',he,{body:s}),s.scope!==void 0&&typeof s.scope!="string")throw ee('"response" body "scope" property must be a string',he,{body:s});if(s.id_token!==void 0){Ie(s.id_token,'"response" body "id_token" property',he,{body:s});const a=["aud","exp","iat","iss","sub"];t.require_auth_time===!0&&a.push("auth_time"),t.default_max_age!==void 0&&(Qn(t.default_max_age,!1,'"client.default_max_age"'),a.push("auth_time")),r!=null&&r.length&&a.push(...r);const{claims:i,jwt:c}=await mS(s.id_token,gS.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,"RS256"),fi(t),Sh(t),o==null?void 0:o[ci]).then(Z_.bind(void 0,a)).then(B_.bind(void 0,e)).then(G_.bind(void 0,t.client_id));if(Array.isArray(i.aud)&&i.aud.length!==1){if(i.azp===void 0)throw ee('ID Token "aud" (audience) claim includes additional untrusted audiences',Yt,{claims:i,claim:"aud"});if(i.azp!==t.client_id)throw ee('unexpected ID Token "azp" (authorized party) claim value',Yt,{expected:t.client_id,claims:i,claim:"azp"})}i.auth_time!==void 0&&Qn(i.auth_time,!1,'ID Token "auth_time" (authentication time)',he,{claims:i}),q_.set(n,c),Oh.set(s,i)}return s}function Nh(e){let t;if(t=U_(e))throw new k_("server responded with a challenge in the WWW-Authenticate HTTP Header",{cause:t,response:e})}async function z_(e,t,n,r){return mi(e,t,n,void 0,r)}function G_(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw ee('unexpected JWT "aud" (audience) claim value',Yt,{expected:e,claims:t.claims,claim:"aud"})}else if(t.claims.aud!==e)throw ee('unexpected JWT "aud" (audience) claim value',Yt,{expected:e,claims:t.claims,claim:"aud"});return t}function B_(e,t){var r;const n=((r=e[vS])==null?void 0:r.call(e,t))??e.issuer;if(t.claims.iss!==n)throw ee('unexpected JWT "iss" (issuer) claim value',Yt,{expected:n,claims:t.claims,claim:"iss"});return t}const gi=new WeakSet;function V_(e){return gi.add(e),e}const J_=Symbol();async function X_(e,t,n,r,o,s,a){if(Jt(e),Xt(t),!gi.has(r))throw ve('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()',Ze);Ie(o,'"redirectUri"');const i=Zt(r,"code");if(!i)throw ee('no authorization code in "callbackParameters"',he);const c=new URLSearchParams(a==null?void 0:a.additionalParameters);return c.set("redirect_uri",o),c.set("code",i),s!==J_&&(Ie(s,'"codeVerifier"'),c.set("code_verifier",s)),pi(e,t,n,"authorization_code",c,a)}const Y_={aud:"audience",c_hash:"code hash",client_id:"client id",exp:"expiration time",iat:"issued at",iss:"issuer",jti:"jwt id",nonce:"nonce",s_hash:"state hash",sub:"subject",ath:"access token hash",htm:"http method",htu:"http uri",cnf:"confirmation",auth_time:"authentication time"};function Z_(e,t){for(const n of e)if(t.claims[n]===void 0)throw ee(`JWT "${n}" (${Y_[n]}) claim missing`,he,{claims:t.claims});return t}const bi=Symbol(),yi=Symbol();async function Q_(e,t,n,r){return eS(e,t,n,r.expectedNonce,r.maxAge,{[ci]:r[ci]})}async function eS(e,t,n,r,o,s){const a=[];switch(r){case void 0:r=bi;break;case bi:break;default:Ie(r,'"expectedNonce" argument'),a.push("nonce")}switch(o??(o=t.default_max_age),o){case void 0:o=yi;break;case yi:break;default:Qn(o,!1,'"maxAge" argument'),a.push("auth_time")}const i=await mi(e,t,n,a,s);Ie(i.id_token,'"response" body "id_token" property',he,{body:i});const c=kh(i);if(o!==yi){const u=hi()+fi(t),l=Sh(t);if(c.auth_time+o<u-l)throw ee("too much time has elapsed since the last End-User authentication",vi,{claims:c,now:u,tolerance:l,claim:"auth_time"})}if(r===bi){if(c.nonce!==void 0)throw ee('unexpected ID Token "nonce" claim value',Yt,{expected:void 0,claims:c,claim:"nonce"})}else if(c.nonce!==r)throw ee('unexpected ID Token "nonce" claim value',Yt,{expected:r,claims:c,claim:"nonce"});return i}const tS="OAUTH_WWW_AUTHENTICATE_CHALLENGE",nS="OAUTH_RESPONSE_BODY_ERROR",rS="OAUTH_UNSUPPORTED_OPERATION",oS="OAUTH_AUTHORIZATION_RESPONSE_ERROR",wi="OAUTH_PARSE_ERROR",he="OAUTH_INVALID_RESPONSE",sS="OAUTH_RESPONSE_IS_NOT_JSON",Ih="OAUTH_RESPONSE_IS_NOT_CONFORM",aS="OAUTH_HTTP_REQUEST_FORBIDDEN",iS="OAUTH_REQUEST_PROTOCOL_FORBIDDEN",vi="OAUTH_JWT_TIMESTAMP_CHECK_FAILED",Yt="OAUTH_JWT_CLAIM_COMPARISON_FAILED",cS="OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED",uS="OAUTH_MISSING_SERVER_METADATA",lS="OAUTH_INVALID_SERVER_METADATA";async function dS(e,t,n,r,o,s){return Jt(e),Xt(t),Ie(r,'"grantType"'),pi(e,t,n,r,new URLSearchParams(o),s)}async function fS(e,t,n,r){return mi(e,t,n,void 0,r)}function so(e){if(e.bodyUsed)throw ve('"response" body has been used already',Ze)}function Dh(e){const{algorithm:t}=e;if(typeof t.modulusLength!="number"||t.modulusLength<2048)throw new Qe(`unsupported ${t.name} modulusLength`,{cause:e})}function hS(e){const{algorithm:t}=e;switch(t.namedCurve){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:throw new Qe("unsupported ECDSA namedCurve",{cause:e})}}function pS(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:hS(e)};case"RSA-PSS":switch(Dh(e),e.algorithm.hash.name){case"SHA-256":case"SHA-384":case"SHA-512":return{name:e.algorithm.name,saltLength:parseInt(e.algorithm.hash.name.slice(-3),10)>>3};default:throw new Qe("unsupported RSA-PSS hash name",{cause:e})}case"RSASSA-PKCS1-v1_5":return Dh(e),e.algorithm.name;case"Ed25519":return e.algorithm.name}throw new Qe("unsupported CryptoKey algorithm name",{cause:e})}async function mS(e,t,n,r,o){let{0:s,1:a,length:i}=e.split(".");if(i===5)if(o!==void 0)e=await o(e),{0:s,1:a,length:i}=e.split(".");else throw new Qe("JWE decryption is not configured",{cause:e});if(i!==3)throw ee("Invalid JWT",he,e);let c;try{c=JSON.parse(En(Vt(s)))}catch(d){throw ee("failed to parse JWT Header body as base64url encoded JSON",wi,d)}if(!no(c))throw ee("JWT Header must be a top level object",he,e);if(t(c),c.crit!==void 0)throw new Qe('no JWT "crit" header parameter extensions are supported',{cause:{header:c}});let u;try{u=JSON.parse(En(Vt(a)))}catch(d){throw ee("failed to parse JWT Payload body as base64url encoded JSON",wi,d)}if(!no(u))throw ee("JWT Payload must be a top level object",he,e);const l=hi()+n;if(u.exp!==void 0){if(typeof u.exp!="number")throw ee('unexpected JWT "exp" (expiration time) claim type',he,{claims:u});if(u.exp<=l-r)throw ee('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp',vi,{claims:u,now:l,tolerance:r,claim:"exp"})}if(u.iat!==void 0&&typeof u.iat!="number")throw ee('unexpected JWT "iat" (issued at) claim type',he,{claims:u});if(u.iss!==void 0&&typeof u.iss!="string")throw ee('unexpected JWT "iss" (issuer) claim type',he,{claims:u});if(u.nbf!==void 0){if(typeof u.nbf!="number")throw ee('unexpected JWT "nbf" (not before) claim type',he,{claims:u});if(u.nbf>l+r)throw ee('unexpected JWT "nbf" (not before) claim value',vi,{claims:u,now:l,tolerance:r,claim:"nbf"})}if(u.aud!==void 0&&typeof u.aud!="string"&&!Array.isArray(u.aud))throw ee('unexpected JWT "aud" (audience) claim type',he,{claims:u});return{header:c,claims:u,jwt:e}}function gS(e,t,n,r){if(e!==void 0){if(typeof e=="string"?r.alg!==e:!e.includes(r.alg))throw ee('unexpected JWT "alg" header parameter',he,{header:r,expected:e,reason:"client configuration"});return}if(Array.isArray(t)){if(!t.includes(r.alg))throw ee('unexpected JWT "alg" header parameter',he,{header:r,expected:t,reason:"authorization server metadata"});return}if(n!==void 0){if(typeof n=="string"?r.alg!==n:typeof n=="function"?!n(r.alg):!n.includes(r.alg))throw ee('unexpected JWT "alg" header parameter',he,{header:r,expected:n,reason:"default value"});return}throw ee('missing client or server configuration to verify used JWT "alg" header parameter',void 0,{client:e,issuer:t,fallback:n})}function Zt(e,t){const{0:n,length:r}=e.getAll(t);if(r>1)throw ee(`"${t}" parameter must be provided only once`,he);return n}const bS=Symbol(),yS=Symbol();function wS(e,t,n,r){if(Jt(e),Xt(t),n instanceof URL&&(n=n.searchParams),!(n instanceof URLSearchParams))throw ve('"parameters" must be an instance of URLSearchParams, or URL',Xe);if(Zt(n,"response"))throw ee('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()',he,{parameters:n});const o=Zt(n,"iss"),s=Zt(n,"state");if(!o&&e.authorization_response_iss_parameter_supported)throw ee('response parameter "iss" (issuer) missing',he,{parameters:n});if(o&&o!==e.issuer)throw ee('unexpected "iss" (issuer) response parameter value',he,{expected:e.issuer,parameters:n});switch(r){case void 0:case yS:if(s!==void 0)throw ee('unexpected "state" response parameter encountered',he,{expected:void 0,parameters:n});break;case bS:break;default:if(Ie(r,'"expectedState" argument'),s!==r)throw ee(s===void 0?'response parameter "state" missing':'unexpected "state" response parameter value',he,{expected:r,parameters:n})}if(Zt(n,"error"))throw new O_("authorization response from the server is an error",{cause:n});const i=Zt(n,"id_token"),c=Zt(n,"token");if(i!==void 0||c!==void 0)throw new Qe("implicit and hybrid flows are not supported");return V_(new URLSearchParams(n))}async function Ei(e,t=_h){let n;try{n=await e.json()}catch(r){throw t(e),ee('failed to parse "response" body as JSON',wi,r)}if(!no(n))throw ee('"response" body must be a top level object',he,{body:n});return n}const Mh=Symbol(),vS=Symbol(),ES={version:"4.7.0"};function _S(e,t){let n;try{n=new URL(e,t)}catch{return}if(n.origin===t.origin)return n}function ao(e){var t;const n=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||e.expires===0)&&`Expires=${(typeof e.expires=="number"?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&typeof e.maxAge=="number"&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),r=`${e.name}=${encodeURIComponent((t=e.value)!=null?t:"")}`;return n.length===0?r:`${r}; ${n.join("; ")}`}function Lh(e){const t=new Map;for(const n of e.split(/; */)){if(!n)continue;const r=n.indexOf("=");if(r===-1){t.set(n,"true");continue}const[o,s]=[n.slice(0,r),n.slice(r+1)];try{t.set(o,decodeURIComponent(s??"true"))}catch{}}return t}function SS(e){if(!e)return;const[[t,n],...r]=Lh(e),{domain:o,expires:s,httponly:a,maxage:i,path:c,samesite:u,secure:l,partitioned:d,priority:h}=Object.fromEntries(r.map(([E,y])=>[E.toLowerCase().replace(/-/g,""),y])),m={name:t,value:decodeURIComponent(n),domain:o,...s&&{expires:new Date(s)},...a&&{httpOnly:!0},...typeof i=="string"&&{maxAge:Number(i)},path:c,...u&&{sameSite:RS(u)},...l&&{secure:!0},...h&&{priority:TS(h)},...d&&{partitioned:!0}};return xS(m)}function xS(e){const t={};for(const n in e)e[n]&&(t[n]=e[n]);return t}var AS=["strict","lax","none"];function RS(e){return e=e.toLowerCase(),AS.includes(e)?e:void 0}var CS=["low","medium","high"];function TS(e){return e=e.toLowerCase(),CS.includes(e)?e:void 0}function PS(e){if(!e)return[];var t=[],n=0,r,o,s,a,i;function c(){for(;n<e.length&&/\s/.test(e.charAt(n));)n+=1;return n<e.length}function u(){return o=e.charAt(n),o!=="="&&o!==";"&&o!==","}for(;n<e.length;){for(r=n,i=!1;c();)if(o=e.charAt(n),o===","){for(s=n,n+=1,c(),a=n;n<e.length&&u();)n+=1;n<e.length&&e.charAt(n)==="="?(i=!0,n=a,t.push(e.substring(r,s)),r=n):n=s+1}else n+=1;(!i||n>=e.length)&&t.push(e.substring(r,e.length))}return t}var OS=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t){const n=Lh(t);for(const[r,o]of n)this._parsed.set(r,{name:r,value:o})}}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){const t=typeof e[0]=="string"?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;const n=Array.from(this._parsed);if(!e.length)return n.map(([o,s])=>s);const r=typeof e[0]=="string"?e[0]:(t=e[0])==null?void 0:t.name;return n.filter(([o])=>o===r).map(([o,s])=>s)}has(e){return this._parsed.has(e)}set(...e){const[t,n]=e.length===1?[e[0].name,e[0].value]:e,r=this._parsed;return r.set(t,{name:t,value:n}),this._headers.set("cookie",Array.from(r).map(([o,s])=>ao(s)).join("; ")),this}delete(e){const t=this._parsed,n=Array.isArray(e)?e.map(r=>t.delete(r)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([r,o])=>ao(o)).join("; ")),n}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},_i=class{constructor(e){this._parsed=new Map;var t,n,r;this._headers=e;const o=(r=(n=(t=e.getSetCookie)==null?void 0:t.call(e))!=null?n:e.get("set-cookie"))!=null?r:[],s=Array.isArray(o)?o:PS(o);for(const a of s){const i=SS(a);i&&this._parsed.set(i.name,i)}}get(...e){const t=typeof e[0]=="string"?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;const n=Array.from(this._parsed.values());if(!e.length)return n;const r=typeof e[0]=="string"?e[0]:(t=e[0])==null?void 0:t.name;return n.filter(o=>o.name===r)}has(e){return this._parsed.has(e)}set(...e){const[t,n,r]=e.length===1?[e[0].name,e[0].value,e[0]]:e,o=this._parsed;return o.set(t,NS({name:t,value:n,...r})),kS(o,this._headers),this}delete(...e){const[t,n]=typeof e[0]=="string"?[e[0]]:[e[0].name,e[0]];return this.set({...n,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(ao).join("; ")}};function kS(e,t){t.delete("set-cookie");for(const[,n]of e){const r=ao(n);t.append("set-cookie",r)}}function NS(e={name:"",value:""}){return typeof e.expires=="number"&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+e.maxAge*1e3)),(e.path===null||e.path===void 0)&&(e.path="/"),e}const IS=()=>{if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;throw new Error("unable to locate global object")},DS=async(e,t,n,r,o)=>{const{crypto:{subtle:s}}=IS();return new Uint8Array(await s.deriveBits({name:"HKDF",hash:`SHA-${e.substr(3)}`,salt:n,info:r},await s.importKey("raw",t,"HKDF",!1,["deriveBits"]),o<<3))};function MS(e){switch(e){case"sha256":case"sha384":case"sha512":case"sha1":return e;default:throw new TypeError('unsupported "digest" value')}}function Si(e,t){if(typeof e=="string")return new TextEncoder().encode(e);if(!(e instanceof Uint8Array))throw new TypeError(`"${t}"" must be an instance of Uint8Array or a string`);return e}function LS(e){const t=Si(e,"ikm");if(!t.byteLength)throw new TypeError('"ikm" must be at least one byte in length');return t}function jS(e){const t=Si(e,"info");if(t.byteLength>1024)throw TypeError('"info" must not contain more than 1024 bytes');return t}function HS(e,t){if(!Number.isInteger(e)||e<1)throw new TypeError('"keylen" must be a positive integer');const n=parseInt(t.substr(3),10)>>3||20;if(e>255*n)throw new TypeError('"keylen" too large');return e}async function xi(e,t,n,r,o){return DS(MS(e),LS(t),Si(n,"salt"),jS(r),HS(o,e))}const US="A256GCM",$S="dir",jh="sha256",Ai=32,Hh="JWE CEK";async function io(e,t,n,r){const o=await xi(jh,t,"",Hh,Ai);return(await new KE(e).setProtectedHeader({enc:US,alg:$S,...r}).setExpirationTime(n).encrypt(o)).toString()}async function _n(e,t,n){const r=await xi(jh,t,"",Hh,Ai);return await $E(e,r,{...n,clockTolerance:15})}const WS=e=>xi("sha256",e,"","JWS Cookie Signing",Ai);async function FS(e,t,n){if(!t)return;const[r,o]=t.split("."),s={protected:QE(JSON.stringify({alg:"HS256",b64:!1,crit:["b64"]})),payload:`${e}=${r}`,signature:o},a=await WS(n);try{return await fh(s,a,{algorithms:["HS256"]}),r}catch{return}}const Ri=3500,co="__",KS=new RegExp(`${co}(\\d+)$`),Uh=/\.(\d+)$/,Ci=(e,t)=>{const n=t?Uh.exec(e):KS.exec(e);if(n)return parseInt(n[1],10)},uo=(e,t,n)=>{const r=new RegExp(n?`^${t}${Uh.source}$`:`^${t}${co}\\d+$`);return e.getAll().filter(o=>r.test(o.name))};function qS(e,t,n,r,o){const{transient:s,...a}=n,i={...a};if(s&&delete i.maxAge,new TextEncoder().encode(t).length<=Ri){o.set(e,t,i),r.set(e,t),uo(r,e).forEach(m=>{o.delete(m.name),r.delete(m.name)});return}let u=0,l=0;for(;u<t.length;){const m=t.slice(u,u+Ri),E=`${e}${co}${l}`;o.set(E,m,i),r.set(E,m),u+=Ri,l++}const h=uo(r,e).length-l;if(h>0)for(let m=0;m<h;m++){const E=l+m,y=`${e}${co}${E}`;o.delete(y),r.delete(y)}o.delete(e),r.delete(e)}function $h(e,t,n){const r=t.get(e);if(r!=null&&r.value)return r.value;const o=uo(t,e,n).sort((a,i)=>Ci(a.name,n)-Ci(i.name,n));if(o.length===0)return;const s=Ci(o[o.length-1].name,n);if(o.length!==s+1){console.warn(`Incomplete chunked cookie '${e}': Found ${o.length} chunks, expected ${s+1}`);return}return o.map(a=>a.value).join("")}function Wh(e,t,n,r){n.delete(e),uo(t,e,r).forEach(o=>{n.delete(o.name)})}function er(e){e.headers.set("Cache-Control","private, no-cache, no-store, must-revalidate, max-age=0"),e.headers.set("Pragma","no-cache"),e.headers.set("Expires","0")}const zS=["sub","name","nickname","given_name","family_name","picture","email","email_verified","org_id"];function GS(e){return Object.keys(e).reduce((t,n)=>(zS.includes(n)&&(t[n]=e[n]),t),{})}const BS=["client_id","redirect_uri","response_type","code_challenge","code_challenge_method","state","nonce"],Fh=["openid","profile","email","offline_access"].join(" "),VS="urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token",JS="urn:ietf:params:oauth:token-type:refresh_token",XS="http://auth0.com/oauth/token-type/federated-connection-access-token";function Ti(e,t){return new URL(ec(tc(e)),Qi(t))}class YS{constructor(t){if(this.fetch=t.fetch||fetch,this.jwksCache=t.jwksCache||{},this.allowInsecureRequests=t.allowInsecureRequests??!1,this.httpOptions=()=>{const r=new Headers,o=t.enableTelemetry??!0,s=t.httpTimeout??5e3;if(o){const a="nextjs-auth0",i=ES.version;r.set("User-Agent",`${a}/${i}`),r.set("Auth0-Client",ZS(JSON.stringify({name:a,version:i})))}return{signal:AbortSignal.timeout(s),headers:r}},this.allowInsecureRequests&&process.env.NODE_ENV==="production"&&console.warn("allowInsecureRequests is enabled in a production environment. This is not recommended."),this.transactionStore=t.transactionStore,this.sessionStore=t.sessionStore,this.domain=t.domain,this.clientMetadata={client_id:t.clientId},this.clientSecret=t.clientSecret,this.authorizationParameters=t.authorizationParameters||{scope:Fh},this.pushedAuthorizationRequests=t.pushedAuthorizationRequests??!1,this.clientAssertionSigningKey=t.clientAssertionSigningKey,this.clientAssertionSigningAlg=t.clientAssertionSigningAlg||"RS256",this.authorizationParameters.scope||(this.authorizationParameters.scope=Fh),!this.authorizationParameters.scope.split(" ").map(r=>r.trim()).includes("openid"))throw new Error("The 'openid' scope must be included in the set of scopes. See https://auth0.com/docs");this.appBaseUrl=t.appBaseUrl,this.signInReturnToPath=t.signInReturnToPath||"/",this.beforeSessionSaved=t.beforeSessionSaved,this.onCallback=t.onCallback||this.defaultOnCallback,this.routes={login:"/auth/login",logout:"/auth/logout",callback:"/auth/callback",backChannelLogout:"/auth/backchannel-logout",profile:process.env.NEXT_PUBLIC_PROFILE_ROUTE||"/auth/profile",accessToken:process.env.NEXT_PUBLIC_ACCESS_TOKEN_ROUTE||"/auth/access-token",...t.routes},this.enableAccessTokenEndpoint=t.enableAccessTokenEndpoint??!0,this.noContentProfileResponseWhenUnauthenticated=t.noContentProfileResponseWhenUnauthenticated??!1}async handler(t){const{pathname:n}=t.nextUrl,r=Dp(n),o=t.method;if(o==="GET"&&r===this.routes.login)return this.handleLogin(t);if(o==="GET"&&r===this.routes.logout)return this.handleLogout(t);if(o==="GET"&&r===this.routes.callback)return this.handleCallback(t);if(o==="GET"&&r===this.routes.profile)return this.handleProfile(t);if(o==="GET"&&r===this.routes.accessToken&&this.enableAccessTokenEndpoint)return this.handleAccessToken(t);if(o==="POST"&&r===this.routes.backChannelLogout)return this.handleBackChannelLogout(t);{const s=_e.NextResponse.next(),a=await this.sessionStore.get(t.cookies);return a&&(await this.sessionStore.set(t.cookies,s.cookies,{...a}),er(s)),s}}async startInteractiveLogin(t={}){const n=Ti(this.routes.callback,this.appBaseUrl);let r=this.signInReturnToPath;if(t.returnTo){const y=new URL(this.authorizationParameters.redirect_uri||this.appBaseUrl),g=_S(t.returnTo,y);g&&(r=g.pathname+g.search+g.hash)}const o="S256",s=p_(),a=await b_(s),i=m_(),c=g_(),u=new URLSearchParams;u.set("client_id",this.clientMetadata.client_id),u.set("redirect_uri",n.toString()),u.set("response_type","code"),u.set("code_challenge",a),u.set("code_challenge_method",o),u.set("state",i),u.set("nonce",c);const l={...this.authorizationParameters,...t.authorizationParameters};Object.entries(l).forEach(([y,g])=>{!BS.includes(y)&&g!=null&&u.set(y,String(g))});const d={nonce:c,maxAge:this.authorizationParameters.max_age,codeVerifier:s,responseType:"code",state:i,returnTo:r},[h,m]=await this.authorizationUrl(u);if(h)return new _e.NextResponse("An error occured while trying to initiate the login request.",{status:500});const E=_e.NextResponse.redirect(m.toString());return await this.transactionStore.save(E.cookies,d),E}async handleLogin(t){const n=Object.fromEntries(t.nextUrl.searchParams.entries()),r={authorizationParameters:this.pushedAuthorizationRequests?{}:n,returnTo:n.returnTo};return this.startInteractiveLogin(r)}async handleLogout(t){const n=await this.sessionStore.get(t.cookies),[r,o]=await this.discoverAuthorizationServerMetadata();if(r)return new _e.NextResponse("An error occured while trying to initiate the logout request.",{status:500});const s=t.nextUrl.searchParams.get("returnTo")||this.appBaseUrl;if(!o.end_session_endpoint){console.warn("The Auth0 client does not have RP-initiated logout enabled, the user will be redirected to the `/v2/logout` endpoint instead. Learn how to enable it here: https://auth0.com/docs/authenticate/login/logout/log-users-out-of-auth0#enable-endpoint-discovery");const c=new URL("/v2/logout",this.issuer);c.searchParams.set("returnTo",s),c.searchParams.set("client_id",this.clientMetadata.client_id);const u=_e.NextResponse.redirect(c);return await this.sessionStore.delete(t.cookies,u.cookies),await this.transactionStore.deleteAll(t.cookies,u.cookies),u}const a=new URL(o.end_session_endpoint);a.searchParams.set("client_id",this.clientMetadata.client_id),a.searchParams.set("post_logout_redirect_uri",s),n!=null&&n.internal.sid&&a.searchParams.set("logout_hint",n.internal.sid),n!=null&&n.tokenSet.idToken&&a.searchParams.set("id_token_hint",n==null?void 0:n.tokenSet.idToken);const i=_e.NextResponse.redirect(a);return await this.sessionStore.delete(t.cookies,i.cookies),er(i),await this.transactionStore.deleteAll(t.cookies,i.cookies),i}async handleCallback(t){const n=t.nextUrl.searchParams.get("state");if(!n)return this.onCallback(new jp,{},null);const r=await this.transactionStore.get(t.cookies,n);if(!r)return this.onCallback(new Hp,{},null);const o=r.payload,s={returnTo:o.returnTo},[a,i]=await this.discoverAuthorizationServerMetadata();if(a)return this.onCallback(a,s,null);let c;try{c=wS(i,this.clientMetadata,t.nextUrl.searchParams,o.state)}catch(E){return this.onCallback(new nc({cause:new On({code:E.error,message:E.error_description})}),s,null)}let u;try{const E=Ti(this.routes.callback,this.appBaseUrl);u=await X_(i,this.clientMetadata,await this.getClientAuth(),c,E.toString(),o.codeVerifier,{...this.httpOptions(),[Bt]:this.fetch,[Mt]:this.allowInsecureRequests})}catch(E){return this.onCallback(new Up(E.message),s,null)}let l;try{l=await Q_(i,this.clientMetadata,u,{expectedNonce:o.nonce,maxAge:o.maxAge,requireIdToken:!0})}catch(E){return this.onCallback(new $p({cause:new On({code:E.error,message:E.error_description})}),s,null)}const d=kh(l);let h={user:d,tokenSet:{accessToken:l.access_token,idToken:l.id_token,scope:l.scope,refreshToken:l.refresh_token,expiresAt:Math.floor(Date.now()/1e3)+Number(l.expires_in)},internal:{sid:d.sid,createdAt:Math.floor(Date.now()/1e3)}};const m=await this.onCallback(null,s,h);return this.beforeSessionSaved?h={...await this.beforeSessionSaved(h,l.id_token??null),internal:h.internal}:h.user=GS(d),await this.sessionStore.set(t.cookies,m.cookies,h,!0),er(m),await this.transactionStore.delete(m.cookies,n),m}async handleProfile(t){const n=await this.sessionStore.get(t.cookies);if(!n)return this.noContentProfileResponseWhenUnauthenticated?new _e.NextResponse(null,{status:204}):new _e.NextResponse(null,{status:401});const r=_e.NextResponse.json(n==null?void 0:n.user);return er(r),r}async handleAccessToken(t){const n=await this.sessionStore.get(t.cookies);if(!n)return _e.NextResponse.json({error:{message:"The user does not have an active session.",code:Qt.MISSING_SESSION}},{status:401});const[r,o]=await this.getTokenSet(n.tokenSet);if(r)return _e.NextResponse.json({error:{message:r.message,code:r.code}},{status:401});const s=_e.NextResponse.json({token:o.accessToken,scope:o.scope,expires_at:o.expiresAt});return(o.accessToken!==n.tokenSet.accessToken||o.refreshToken!==n.tokenSet.refreshToken||o.expiresAt!==n.tokenSet.expiresAt)&&(await this.sessionStore.set(t.cookies,s.cookies,{...n,tokenSet:o}),er(s)),s}async handleBackChannelLogout(t){if(!this.sessionStore.store)return new _e.NextResponse("A session data store is not configured.",{status:500});if(!this.sessionStore.store.deleteByLogoutToken)return new _e.NextResponse("Back-channel logout is not supported by the session data store.",{status:500});const r=new URLSearchParams(await t.text()).get("logout_token");if(!r)return new _e.NextResponse("Missing `logout_token` in the request body.",{status:400});const[o,s]=await this.verifyLogoutToken(r);return o?new _e.NextResponse(o.message,{status:400}):(await this.sessionStore.store.deleteByLogoutToken(s),new _e.NextResponse(null,{status:204}))}async getTokenSet(t,n){if(!t.refreshToken&&t.expiresAt<=Date.now()/1e3)return[new No(Qt.MISSING_REFRESH_TOKEN,"The access token has expired and a refresh token was not provided. The user needs to re-authenticate."),null];if(t.refreshToken&&(n||t.expiresAt<=Date.now()/1e3)){const[r,o]=await this.discoverAuthorizationServerMetadata();if(r)return[r,null];const s=await K_(o,this.clientMetadata,await this.getClientAuth(),t.refreshToken,{...this.httpOptions(),[Bt]:this.fetch,[Mt]:this.allowInsecureRequests});let a;try{a=await z_(o,this.clientMetadata,s)}catch(u){return[new No(Qt.FAILED_TO_REFRESH_TOKEN,"The access token has expired and there was an error while trying to refresh it.",new On({code:u.error,message:u.error_description})),null]}const i=Math.floor(Date.now()/1e3)+Number(a.expires_in),c={...t,accessToken:a.access_token,idToken:a.id_token,expiresAt:i};return a.refresh_token?c.refreshToken=a.refresh_token:c.refreshToken=t.refreshToken,[null,c]}return[null,t]}async discoverAuthorizationServerMetadata(){if(this.authorizationServerMetadata)return[null,this.authorizationServerMetadata];const t=new URL(this.issuer);try{const n=await l_(t,{...this.httpOptions(),[Bt]:this.fetch,[Mt]:this.allowInsecureRequests}).then(r=>d_(t,r));return this.authorizationServerMetadata=n,[null,n]}catch(n){return console.error(`An error occured while performing the discovery request. issuer=${t.toString()}, error:`,n),[new Lp("Discovery failed for the OpenID Connect configuration."),null]}}async defaultOnCallback(t,n){return t?new _e.NextResponse(t.message,{status:500}):_e.NextResponse.redirect(Ti(n.returnTo||"/",this.appBaseUrl))}async verifyLogoutToken(t){const[n,r]=await this.discoverAuthorizationServerMetadata();if(n)return[n,null];const o="RS256",s=ZE(new URL(r.jwks_uri),{[to]:this.jwksCache}),{payload:a}=await UE(t,s,{issuer:r.issuer,audience:this.clientMetadata.client_id,algorithms:[o],requiredClaims:["iat"]});return!("sid"in a)&&!("sub"in a)?[new xt('either "sid" or "sub" (or both) claims must be present'),null]:"sid"in a&&typeof a.sid!="string"?[new xt('"sid" claim must be a string'),null]:"sub"in a&&typeof a.sub!="string"?[new xt('"sub" claim must be a string'),null]:"nonce"in a?[new xt('"nonce" claim is prohibited'),null]:"events"in a?typeof a.events!="object"||a.events===null?[new xt('"events" claim must be an object'),null]:"http://schemas.openid.net/event/backchannel-logout"in a.events?typeof a.events["http://schemas.openid.net/event/backchannel-logout"]!="object"?[new xt('"http://schemas.openid.net/event/backchannel-logout" member in the "events" claim must be an object'),null]:[null,{sid:a.sid,sub:a.sub}]:[new xt('"http://schemas.openid.net/event/backchannel-logout" member is missing in the "events" claim'),null]:[new xt('"events" claim is missing'),null]}async authorizationUrl(t){const[n,r]=await this.discoverAuthorizationServerMetadata();if(n)return[n,null];if(this.pushedAuthorizationRequests&&!r.pushed_authorization_request_endpoint)return console.error("The Auth0 tenant does not have pushed authorization requests enabled. Learn how to enable it here: https://auth0.com/docs/get-started/applications/configure-par"),[new Error("The authorization server does not support pushed authorization requests."),null];const o=new URL(r.authorization_endpoint);if(this.pushedAuthorizationRequests){const s=await T_(r,this.clientMetadata,await this.getClientAuth(),t,{...this.httpOptions(),[Bt]:this.fetch,[Mt]:this.allowInsecureRequests});let a;try{a=await $_(r,this.clientMetadata,s)}catch(i){return[new nc({cause:new On({code:i.error,message:i.error_description}),message:"An error occured while pushing the authorization request."}),null]}return o.searchParams.set("request_uri",a.request_uri),o.searchParams.set("client_id",this.clientMetadata.client_id),[null,o]}return o.search=t.toString(),[null,o]}async getClientAuth(){if(!this.clientSecret&&!this.clientAssertionSigningKey)throw new Error("The client secret or client assertion signing key must be provided.");let t=this.clientAssertionSigningKey;return t&&!(t instanceof CryptoKey)&&(t=await gE(t,this.clientAssertionSigningAlg)),t?A_(t):S_(this.clientSecret)}get issuer(){return this.domain.startsWith("http://")||this.domain.startsWith("https://")?this.domain:`https://${this.domain}`}async getConnectionTokenSet(t,n,r){if(!t.refreshToken&&(!n||n.expiresAt<=Date.now()/1e3))return[new Io(kn.MISSING_REFRESH_TOKEN,"A refresh token was not present, Connection Access Token requires a refresh token. The user needs to re-authenticate."),null];if(t.refreshToken&&(!n||n.expiresAt<=Date.now()/1e3)){const o=new URLSearchParams;o.append("connection",r.connection),o.append("subject_token_type",JS),o.append("subject_token",t.refreshToken),o.append("requested_token_type",XS),r.login_hint&&o.append("login_hint",r.login_hint);const[s,a]=await this.discoverAuthorizationServerMetadata();if(s)return[s,null];const i=await dS(a,this.clientMetadata,await this.getClientAuth(),VS,o,{[Bt]:this.fetch,[Mt]:this.allowInsecureRequests});let c;try{c=await fS(a,this.clientMetadata,i)}catch(u){return[new Io(kn.FAILED_TO_EXCHANGE,"There was an error trying to exchange the refresh token for a connection access token.",new On({code:u.error,message:u.error_description})),null]}return[null,{accessToken:c.access_token,expiresAt:Math.floor(Date.now()/1e3)+Number(c.expires_in),scope:c.scope,connection:r.connection}]}return[null,n]}}const ZS=e=>{const t=new TextEncoder().encode(e),n=32768,r=[];for(let o=0;o<t.length;o+=n)r.push(String.fromCharCode.apply(null,t.subarray(o,o+n)));return btoa(r.join(""))},QS="__session";class Kh{constructor({secret:t,rolling:n=!0,absoluteDuration:r=60*60*24*3,inactivityDuration:o=60*60*24*1,store:s,cookieOptions:a}){this.secret=t,this.rolling=n,this.absoluteDuration=r,this.inactivityDuration=o,this.store=s,this.sessionCookieName=(a==null?void 0:a.name)??QS,this.cookieConfig={httpOnly:!0,sameSite:(a==null?void 0:a.sameSite)??"lax",secure:(a==null?void 0:a.secure)??!1,path:(a==null?void 0:a.path)??"/",domain:a==null?void 0:a.domain,transient:a==null?void 0:a.transient}}epoch(){return Date.now()/1e3|0}calculateMaxAge(t){if(!this.rolling)return this.absoluteDuration;const n=this.epoch(),o=Math.min(n+this.inactivityDuration,t+this.absoluteDuration)-this.epoch();return o>0?o:0}}const Sn="appSession";function e2(e){if(e.protectedHeader.iat){const t=e;return qh(t.protectedHeader,t.payload)}return e.payload}function t2(e){var t;if((t=e.header)!=null&&t.iat){const n=e;return qh(n.header,n.data)}return e}function qh(e,t){const n=t.user;return{user:n,tokenSet:{idToken:t.idToken??void 0,accessToken:t.accessToken??void 0,scope:t.accessTokenScope,refreshToken:t.refreshToken,expiresAt:t.accessTokenExpiresAt},internal:{sid:n.sid,createdAt:e.iat}}}const zh=()=>{const e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")};class n2 extends Kh{constructor({secret:t,store:n,rolling:r,absoluteDuration:o,inactivityDuration:s,cookieOptions:a}){super({secret:t,rolling:r,absoluteDuration:o,inactivityDuration:s,cookieOptions:a}),this.store=n}async get(t){const n=t.get(this.sessionCookieName)||t.get(Sn);if(!n||!n.value)return null;let r=null;try{const{payload:s}=await _n(n.value,this.secret);r=s.id}catch(s){if(s.code==="ERR_JWE_INVALID"){const a=await FS(n.name,n.value,this.secret);if(!a)return null;r=a}}if(!r)return null;const o=await this.store.get(r);return o?t2(o):null}async set(t,n,r,o=!1){var l;let s=null;const a=(l=t.get(this.sessionCookieName))==null?void 0:l.value;if(a){const{payload:d}=await _n(a,this.secret);s=d.id}s&&o&&(await this.store.delete(s),s=zh()),s||(s=zh());const i=this.calculateMaxAge(r.internal.createdAt),c=Date.now()/1e3+i,u=await io({id:s},this.secret,c);n.set(this.sessionCookieName,u.toString(),{...this.cookieConfig,maxAge:i}),await this.store.set(s,r),t.set(this.sessionCookieName,u.toString()),this.sessionCookieName!==Sn&&t.has(Sn)&&n.delete(Sn)}async delete(t,n){var s;const r=(s=t.get(this.sessionCookieName))==null?void 0:s.value;if(await n.delete(this.sessionCookieName),!r)return;const{payload:o}=await _n(r,this.secret);await this.store.delete(o.id)}}class r2 extends Kh{constructor({secret:t,rolling:n,absoluteDuration:r,inactivityDuration:o,cookieOptions:s}){super({secret:t,rolling:n,absoluteDuration:r,inactivityDuration:o,cookieOptions:s}),this.connectionTokenSetsCookieName="__FC"}async get(t){const n=$h(this.sessionCookieName,t)??$h(Sn,t,!0);if(!n)return null;const r=await _n(n,this.secret),o=e2(r),s=await Promise.all(this.getConnectionTokenSetsCookies(t).map(a=>_n(a.value,this.secret)));return{...o,...s.length?{connectionTokenSets:s.map(a=>a.payload)}:{}}}async set(t,n,r){const{connectionTokenSets:o,...s}=r,a=this.calculateMaxAge(r.internal.createdAt),i=Math.floor(Date.now()/1e3)+a,u=(await io(s,this.secret,i)).toString(),l={...this.cookieConfig,maxAge:a};qS(this.sessionCookieName,u,l,t,n),o!=null&&o.length&&await Promise.all(o.map((d,h)=>this.storeInCookie(t,n,d,`${this.connectionTokenSetsCookieName}_${h}`,a))),Wh(Sn,t,n,!0)}async delete(t,n){Wh(this.sessionCookieName,t,n),this.getConnectionTokenSetsCookies(t).forEach(r=>n.delete(r.name))}async storeInCookie(t,n,r,o,s){const a=Math.floor(Date.now()/1e3+s),i=await io(r,this.secret,a),c=i.toString();n.set(o,i.toString(),{...this.cookieConfig,maxAge:s}),t.set(o,c);const u=new _i(new Headers);u.set(o,c,{...this.cookieConfig,maxAge:s}),new TextEncoder().encode(u.toString()).length>=4096&&(o===this.sessionCookieName?console.warn(`The ${o} cookie size exceeds 4096 bytes, which may cause issues in some browsers. Consider removing any unnecessary custom claims from the access token or the user profile. Alternatively, you can use a stateful session implementation to store the session data in a data store.`):console.warn(`The ${o} cookie size exceeds 4096 bytes, which may cause issues in some browsers. You can use a stateful session implementation to store the session data in a data store.`))}getConnectionTokenSetsCookies(t){return t.getAll().filter(n=>n.name.startsWith(this.connectionTokenSetsCookieName))}}const o2="__txn_";class s2{constructor({secret:t,cookieOptions:n}){this.secret=t,this.transactionCookiePrefix=(n==null?void 0:n.prefix)??o2,this.cookieConfig={httpOnly:!0,sameSite:(n==null?void 0:n.sameSite)??"lax",secure:(n==null?void 0:n.secure)??!1,path:(n==null?void 0:n.path)??"/",maxAge:60*60}}getTransactionCookieName(t){return`${this.transactionCookiePrefix}${t}`}getCookiePrefix(){return this.transactionCookiePrefix}async save(t,n){const r=Math.floor(Date.now()/1e3+this.cookieConfig.maxAge),o=await io(n,this.secret,r);if(!n.state)throw new Error("Transaction state is required");t.set(this.getTransactionCookieName(n.state),o.toString(),this.cookieConfig)}async get(t,n){var s;const r=this.getTransactionCookieName(n),o=(s=t.get(r))==null?void 0:s.value;return o?_n(o,this.secret):null}async delete(t,n){await t.delete(this.getTransactionCookieName(n))}async deleteAll(t,n){const r=this.getCookiePrefix();t.getAll().forEach(o=>{o.name.startsWith(r)&&n.delete(o.name)})}}class a2{constructor(t={}){var d,h,m,E,y,g,p,b,f,A,v,R,w,x,C,D;const{domain:n,clientId:r,clientSecret:o,appBaseUrl:s,secret:a,clientAssertionSigningKey:i}=this.validateAndExtractRequiredOptions(t),c=t.clientAssertionSigningAlg||process.env.AUTH0_CLIENT_ASSERTION_SIGNING_ALG,u={name:((h=(d=t.session)==null?void 0:d.cookie)==null?void 0:h.name)??"__session",secure:((E=(m=t.session)==null?void 0:m.cookie)==null?void 0:E.secure)??process.env.AUTH0_COOKIE_SECURE==="true",sameSite:((g=(y=t.session)==null?void 0:y.cookie)==null?void 0:g.sameSite)??process.env.AUTH0_COOKIE_SAME_SITE??"lax",path:((b=(p=t.session)==null?void 0:p.cookie)==null?void 0:b.path)??process.env.AUTH0_COOKIE_PATH??"/",transient:((A=(f=t.session)==null?void 0:f.cookie)==null?void 0:A.transient)??process.env.AUTH0_COOKIE_TRANSIENT==="true",domain:((R=(v=t.session)==null?void 0:v.cookie)==null?void 0:R.domain)??process.env.AUTH0_COOKIE_DOMAIN},l={prefix:((w=t.transactionCookie)==null?void 0:w.prefix)??"__txn_",secure:((x=t.transactionCookie)==null?void 0:x.secure)??!1,sameSite:((C=t.transactionCookie)==null?void 0:C.sameSite)??"lax",path:((D=t.transactionCookie)==null?void 0:D.path)??"/"};if(s){const{protocol:I}=new URL(s);I==="https:"&&(u.secure=!0,l.secure=!0)}this.transactionStore=new s2({...t.session,secret:a,cookieOptions:l}),this.sessionStore=t.sessionStore?new n2({...t.session,secret:a,store:t.sessionStore,cookieOptions:u}):new r2({...t.session,secret:a,cookieOptions:u}),this.authClient=new YS({transactionStore:this.transactionStore,sessionStore:this.sessionStore,domain:n,clientId:r,clientSecret:o,clientAssertionSigningKey:i,clientAssertionSigningAlg:c,authorizationParameters:t.authorizationParameters,pushedAuthorizationRequests:t.pushedAuthorizationRequests,appBaseUrl:s,secret:a,signInReturnToPath:t.signInReturnToPath,beforeSessionSaved:t.beforeSessionSaved,onCallback:t.onCallback,routes:t.routes,allowInsecureRequests:t.allowInsecureRequests,httpTimeout:t.httpTimeout,enableTelemetry:t.enableTelemetry,enableAccessTokenEndpoint:t.enableAccessTokenEndpoint,noContentProfileResponseWhenUnauthenticated:t.noContentProfileResponseWhenUnauthenticated})}middleware(t){return this.authClient.handler.bind(this.authClient)(t)}async getSession(t){return t?t instanceof _e.NextRequest?this.sessionStore.get(t.cookies):this.sessionStore.get(this.createRequestCookies(t)):this.sessionStore.get(await Xn.cookies())}async getAccessToken(t,n,r){const o={refresh:!1};let s,a,i={};if(t&&(t instanceof Request||typeof t.headers=="object")){if(s=t,a=n,i={...o,...r??{}},!a)throw new TypeError("getAccessToken(req, res): The 'res' argument is missing. Both 'req' and 'res' must be provided together for Pages Router or middleware usage.")}else{if(n!==void 0||r!==void 0)throw new TypeError("getAccessToken: Invalid arguments. Valid signatures are getAccessToken(), getAccessToken(options), or getAccessToken(req, res, options).");i={...o,...t??{}}}const c=s?await this.getSession(s):await this.getSession();if(!c)throw new No(Qt.MISSING_SESSION,"The user does not have an active session.");const[u,l]=await this.authClient.getTokenSet(c.tokenSet,i.refresh);if(u)throw u;return(l.accessToken!==c.tokenSet.accessToken||l.expiresAt!==c.tokenSet.expiresAt||l.refreshToken!==c.tokenSet.refreshToken)&&await this.saveToSession({...c,tokenSet:l},s,a),{token:l.accessToken,scope:l.scope,expiresAt:l.expiresAt}}async getAccessTokenForConnection(t,n,r){var c,u;const o=n?await this.getSession(n):await this.getSession();if(!o)throw new Io(kn.MISSING_SESSION,"The user does not have an active session.");const s=(c=o.connectionTokenSets)==null?void 0:c.find(l=>l.connection===t.connection),[a,i]=await this.authClient.getConnectionTokenSet(o.tokenSet,s,t);if(a!==null)throw a;if(i&&(!s||i.accessToken!==s.accessToken||i.expiresAt!==s.expiresAt||i.scope!==s.scope)){let l;s?l=(u=o.connectionTokenSets)==null?void 0:u.map(d=>d.connection===t.connection?i:d):l=[...o.connectionTokenSets||[],i],await this.saveToSession({...o,connectionTokenSets:l},n,r)}return{token:i.accessToken,scope:i.scope,expiresAt:i.expiresAt}}async updateSession(t,n,r){if(n){const o=t;if(!r)throw new Error("The session data is missing.");if(o instanceof _e.NextRequest&&n instanceof _e.NextResponse){const s=await this.getSession(o);if(!s)throw new Error("The user is not authenticated.");await this.sessionStore.set(o.cookies,n.cookies,{...r,internal:{...s.internal}})}else{const s=await this.getSession(o);if(!s)throw new Error("The user is not authenticated.");const a=new Headers,i=new _i(a),c=r,u=this.createRequestCookies(o),l=n;await this.sessionStore.set(u,i,{...c,internal:{...s.internal}});for(const[d,h]of a.entries())l.setHeader(d,h)}}else{const o=await this.getSession();if(!o)throw new Error("The user is not authenticated.");const s=t;if(!s)throw new Error("The session data is missing.");await this.sessionStore.set(await Xn.cookies(),await Xn.cookies(),{...s,internal:{...o.internal}})}}createRequestCookies(t){const n=new Headers;for(const r in t.headers)if(Array.isArray(t.headers[r]))for(const o of t.headers[r])n.append(r,o);else n.append(r,t.headers[r]??"");return new OS(n)}async startInteractiveLogin(t){return this.authClient.startInteractiveLogin(t)}async saveToSession(t,n,r){if(n&&r)if(n instanceof _e.NextRequest&&r instanceof _e.NextResponse)await this.sessionStore.set(n.cookies,r.cookies,t);else{const o=new Headers,s=new _i(o),a=r;await this.sessionStore.set(this.createRequestCookies(n),s,t);for(const[i,c]of o.entries())a.setHeader(i,c)}else try{await this.sessionStore.set(await Xn.cookies(),await Xn.cookies(),t)}catch{process.env.NODE_ENV==="development"&&console.warn("Failed to persist the updated token set. `getAccessToken()` was likely called from a Server Component which cannot set cookies.")}}validateAndExtractRequiredOptions(t){const n={domain:t.domain??process.env.AUTH0_DOMAIN,clientId:t.clientId??process.env.AUTH0_CLIENT_ID,appBaseUrl:t.appBaseUrl??process.env.APP_BASE_URL,secret:t.secret??process.env.AUTH0_SECRET},r=t.clientSecret??process.env.AUTH0_CLIENT_SECRET,o=t.clientAssertionSigningKey??process.env.AUTH0_CLIENT_ASSERTION_SIGNING_KEY,s=!!(r||o),a=Object.entries(n).filter(([,c])=>!c).map(([c])=>c);if(s||a.push("clientAuthentication"),a.length){const c={domain:"AUTH0_DOMAIN",clientId:"AUTH0_CLIENT_ID",appBaseUrl:"APP_BASE_URL",secret:"AUTH0_SECRET"};let u=`WARNING: Not all required options were provided when creating an instance of Auth0Client. Ensure to provide all missing options, either by passing it to the Auth0Client constructor, or by setting the corresponding environment variable.
194
+ `;a.forEach(l=>{l==="clientAuthentication"?u+=`Missing: clientAuthentication: Set either AUTH0_CLIENT_SECRET env var or AUTH0_CLIENT_ASSERTION_SIGNING_KEY env var, or pass clientSecret or clientAssertionSigningKey in options
195
+ `:c[l]?u+=`Missing: ${l}: Set ${c[l]} env var or pass ${l} in options
196
+ `:u+=`Missing: ${l}
197
+ `}),console.error(u.trim())}return{...n,clientSecret:r,clientAssertionSigningKey:o}}}const i2=new a2({authorizationParameters:{scope:"openid profile email permissions",audience:`${process.env.AUTH0_AUDIENCE}`}});async function c2(){const e=await i2.getAccessToken();return(e==null?void 0:e.token)||"No token available"}class tr extends Error{}tr.prototype.name="InvalidTokenError";function u2(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function l2(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return u2(t)}catch{return atob(t)}}function d2(e,t){if(typeof e!="string")throw new tr("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,r=e.split(".")[n];if(typeof r!="string")throw new tr(`Invalid token specified: missing part #${n+1}`);let o;try{o=l2(r)}catch(s){throw new tr(`Invalid token specified: invalid base64 for part #${n+1} (${s.message})`)}try{return JSON.parse(o)}catch(s){throw new tr(`Invalid token specified: invalid json for part #${n+1} (${s.message})`)}}async function f2(){var e,t,n,r;try{const o=await c2();if(!o)return{essentialInsights:!1,web:!1,priceMonster:!1};const a=(e=d2(o)["https://cloud.golocal.com/org_metadata"])==null?void 0:e.metadata;return{essentialInsights:((t=a==null?void 0:a["essential-insights"])==null?void 0:t.enabled)===!0,web:((n=a==null?void 0:a.web)==null?void 0:n.enabled)===!0,priceMonster:((r=a==null?void 0:a["price-monster"])==null?void 0:r.enabled)===!0}}catch(o){return console.error("Error getting user data:",o),{essentialInsights:!1,web:!1,priceMonster:!1}}}const Gh=W.createContext(void 0),Bh=()=>{const e=W.useContext(Gh);if(e===void 0)throw new Error("usePermissions must be used within PermissionsProvider");return e};function h2({children:e}){const[t,n]=W.useState({essentialInsights:!1,priceMonster:!1,web:!1});return W.useEffect(()=>{(async()=>{const r=await f2();n(r)})()},[]),S.jsx(Gh.Provider,{value:t,children:e})}const p2={navMain:[{title:"Essential Insights",key:"essentialInsights",url:"/essential-insights/overall-performance",icon:S.jsx(Xp,{className:"h-5 w-5"}),items:[{title:"Overall Performance",url:"/essential-insights/overall-performance",icon:S.jsx(ic,{className:"h-4 w-4"})},{title:"Organic Performance",url:"/essential-insights/organic-performance",icon:S.jsx(sc,{className:"h-4 w-4"})},{title:"Paid Performance",url:"/essential-insights/paid-performance",icon:S.jsx(Jp,{className:"h-4 w-4"})},{title:"Keyword Performance",url:"/essential-insights/keyword-performance",icon:S.jsx(sc,{className:"h-4 w-4"})},{title:"More Components",url:"/essential-insights/more-components",icon:S.jsx(ur,{className:"h-4 w-4"})}]},{title:"Price Monster",key:"priceMonster",url:"/price-monster",icon:S.jsx(Qp,{className:"h-4 w-4"}),items:[{title:"Dashboard",url:"/price-monster/dashboard",icon:S.jsx(ur,{className:"h-4 w-4"})},{title:"Documentation",url:"/price-monster/documentation",icon:S.jsx(Bp,{className:"h-4 w-4"})},{title:"Subscriptions",url:"/price-monster/subscriptions",icon:S.jsx(Vp,{className:"h-4 w-4"})}]},{title:"CMS",key:"web",url:"/cms",icon:S.jsx(ur,{className:"h-4 w-4"}),items:[{title:"Dashboard",url:"/cms/dashboard",icon:S.jsx(ur,{className:"h-4 w-4"})}]}]};function m2({...e}){const{isActiveRoute:t}=i0(),n=Bh();return S.jsxs(vl,{...e,children:[S.jsx(xl,{children:S.jsx("div",{className:"relative h-12 w-32 overflow-hidden",children:S.jsx("img",{src:a0,alt:"GLI Logo",className:"h-full w-full object-contain"})})}),S.jsxs(Al,{children:[S.jsx("div",{className:"relative flex w-full min-w-0 flex-col px-2 py-1",children:S.jsx("div",{className:"flex flex-col",children:S.jsxs("a",{href:"/",className:z("flex cursor-pointer items-center gap-2 rounded-lg px-2 py-2 transition-colors","hover:bg-gray-100",t("/")&&"bg-blue-50 text-gli-bluedark font-medium"),children:[S.jsx(ic,{className:z("h-5 w-5",t("/")?"text-gli-bluedark":"text-gray-600")}),S.jsx("span",{children:"Home"})]})})}),p2.navMain.map(r=>{const o=!r.key||n[r.key],s=o&&(t(r.url)||r.items.some(a=>t(a.url)));return S.jsx(kl,{title:r.title,url:o?r.url:void 0,icon:r.icon,isActive:s,className:z(!o&&"cursor-not-allowed opacity-50 pointer-events-none"),children:S.jsx(Cl,{children:S.jsx(Tl,{children:r.items.map(a=>{const i=o&&t(a.url);return S.jsx(Pl,{children:S.jsx(Ol,{asChild:!0,children:S.jsxs("a",{href:o?a.url:void 0,className:z("flex items-center gap-2 pl-4 transition-colors",o?"text-muted-foreground hover:bg-muted hover:text-foreground":"text-gray-400 cursor-not-allowed opacity-50",i&&"bg-blue-50 text-gli-bluedark font-medium"),onClick:c=>{o||c.preventDefault()},children:[S.jsx("span",{className:z(i?"text-gli-bluedark":o?"text-muted-foreground":"text-gray-400"),children:a.icon}),S.jsx("span",{className:z(i?"text-gli-bluedark":o?"text-muted-foreground":"text-gray-400"),children:a.title})]})})},a.title)})})})},r.title)})]}),S.jsx(_l,{})]})}const Vh=({onLogout:e})=>{const{user:t,error:n,isLoading:r}=Mp(),o=async()=>{try{e&&await e(),window.location.href="/auth/logout"}catch(s){console.error("Error during logout:",s),window.location.href="/auth/logout"}};return r?S.jsx("div",{className:"h-10 w-10 animate-pulse rounded-full bg-gray-200"}):n?S.jsxs("div",{children:["Error: ",n.message]}):t?S.jsx("div",{className:"relative flex items-center gap-3",children:S.jsxs(kd,{children:[S.jsx(Nd,{asChild:!0,children:S.jsx(hr,{variant:"ghost",size:"lg",className:"rounded-full cursor-pointer p-0",children:t.picture?S.jsx("img",{src:t.picture,alt:t.name||"User profile",width:40,height:40,className:"rounded-full"}):S.jsx(cc,{className:"h-5 w-5 text-gray-500"})})}),S.jsxs(Id,{align:"end",className:"w-72",children:[S.jsx(Dd,{children:S.jsx("div",{className:"flex flex-col space-y-1",children:S.jsxs("div",{className:"flex flex-col space-y-1",children:[S.jsx("p",{className:"text-xs text-gray-500",children:t.name}),S.jsx("p",{className:"truncate text-xs text-gray-500",children:t.email})]})})}),S.jsx(Md,{}),S.jsx(Us,{asChild:!0,children:S.jsxs("a",{href:"/profile",className:"flex w-full cursor-default",children:[S.jsx(cc,{className:"mr-2 h-4 w-4"}),S.jsx("span",{children:"Profile"})]})}),S.jsxs(Us,{onClick:o,children:[S.jsx(tm,{className:"mr-2 h-4 w-4"}),S.jsx("span",{children:"Sign out"})]})]})]})}):null},Jh=({onLogout:e})=>S.jsx("div",{className:"sticky top-0 z-50 bg-white",children:S.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-white px-4",children:[S.jsxs("div",{className:"flex h-full items-center gap-4 flex-1 min-w-0 overflow-hidden",children:[S.jsx(El,{}),S.jsx(pr,{orientation:"vertical"})]}),S.jsx("div",{className:"flex-shrink-0",children:S.jsx(Vh,{onLogout:e})})]})}),g2=({children:e,onLogout:t})=>S.jsx(Wp,{children:S.jsx(wl,{children:S.jsxs("div",{className:"flex h-screen w-full",children:[S.jsx(m2,{}),S.jsxs(Sl,{className:"flex-1 flex flex-col min-w-0",children:[S.jsx(Jh,{onLogout:t}),S.jsx("main",{className:"flex-1 bg-white overflow-auto",id:"page-content",children:e})]})]})})});L.AppHeader=Jh,L.Button=hr,L.Card=Fm,L.CardAction=Gm,L.CardContent=Bm,L.CardDescription=zm,L.CardFooter=Vm,L.CardHeader=Km,L.CardTitle=qm,L.CollapsibleSection=kl,L.DropdownMenu=kd,L.DropdownMenuCheckboxItem=Qv,L.DropdownMenuContent=Id,L.DropdownMenuGroup=Zv,L.DropdownMenuItem=Us,L.DropdownMenuLabel=Dd,L.DropdownMenuPortal=Yv,L.DropdownMenuRadioGroup=e0,L.DropdownMenuRadioItem=t0,L.DropdownMenuSeparator=Md,L.DropdownMenuShortcut=n0,L.DropdownMenuSub=r0,L.DropdownMenuSubContent=s0,L.DropdownMenuSubTrigger=o0,L.DropdownMenuTrigger=Nd,L.GLICloudProvider=g2,L.Input=Wo,L.PermissionsProvider=h2,L.ProfileDropdown=Vh,L.Separator=pr,L.Sheet=Ru,L.SheetClose=xb,L.SheetContent=os,L.SheetDescription=is,L.SheetFooter=Tu,L.SheetHeader=ss,L.SheetOverlay=rs,L.SheetPortal=Cu,L.SheetTitle=as,L.SheetTrigger=Sb,L.Sidebar=vl,L.SidebarContent=Al,L.SidebarFooter=uw,L.SidebarGroup=Rl,L.SidebarGroupAction=fw,L.SidebarGroupContent=Cl,L.SidebarGroupLabel=dw,L.SidebarHeader=xl,L.SidebarInput=cw,L.SidebarInset=Sl,L.SidebarMenu=hw,L.SidebarMenuAction=bw,L.SidebarMenuBadge=yw,L.SidebarMenuButton=gw,L.SidebarMenuItem=pw,L.SidebarMenuSkeleton=ww,L.SidebarMenuSub=Tl,L.SidebarMenuSubButton=Ol,L.SidebarMenuSubItem=Pl,L.SidebarProvider=wl,L.SidebarRail=_l,L.SidebarSeparator=lw,L.SidebarTrigger=El,L.Skeleton=cs,L.Tooltip=gl,L.TooltipContent=Cs,L.TooltipProvider=ml,L.TooltipTrigger=bl,L.buttonVariants=Pc,L.usePermissions=Bh,L.useSidebar=Hn,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});