@yext/visual-editor 0.0.8 → 0.0.9

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.
@@ -16,15 +16,15 @@ object-assign
16
16
  *
17
17
  * This source code is licensed under the MIT license found in the
18
18
  * LICENSE file in the root directory of this source tree.
19
- */var Cn;function As(){return Cn||(Cn=1,function(e){process.env.NODE_ENV!=="production"&&function(){var t=w,r=to(),n=60103,o=60106;e.Fragment=60107;var a=60108,s=60114,i=60109,c=60110,d=60112,u=60113,g=60120,l=60115,v=60116,x=60121,h=60122,y=60117,E=60129,b=60131;if(typeof Symbol=="function"&&Symbol.for){var C=Symbol.for;n=C("react.element"),o=C("react.portal"),e.Fragment=C("react.fragment"),a=C("react.strict_mode"),s=C("react.profiler"),i=C("react.provider"),c=C("react.context"),d=C("react.forward_ref"),u=C("react.suspense"),g=C("react.suspense_list"),l=C("react.memo"),v=C("react.lazy"),x=C("react.block"),h=C("react.server.block"),y=C("react.fundamental"),C("react.scope"),C("react.opaque.id"),E=C("react.debug_trace_mode"),C("react.offscreen"),b=C("react.legacy_hidden")}var P=typeof Symbol=="function"&&Symbol.iterator,R="@@iterator";function D(p){if(p===null||typeof p!="object")return null;var S=P&&p[P]||p[R];return typeof S=="function"?S:null}var O=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function N(p){{for(var S=arguments.length,T=new Array(S>1?S-1:0),j=1;j<S;j++)T[j-1]=arguments[j];z("error",p,T)}}function z(p,S,T){{var j=O.ReactDebugCurrentFrame,re=j.getStackAddendum();re!==""&&(S+="%s",T=T.concat([re]));var ee=T.map(function(q){return""+q});ee.unshift("Warning: "+S),Function.prototype.apply.call(console[p],console,ee)}}var H=!1;function U(p){return!!(typeof p=="string"||typeof p=="function"||p===e.Fragment||p===s||p===E||p===a||p===u||p===g||p===b||H||typeof p=="object"&&p!==null&&(p.$$typeof===v||p.$$typeof===l||p.$$typeof===i||p.$$typeof===c||p.$$typeof===d||p.$$typeof===y||p.$$typeof===x||p[0]===h))}function _(p,S,T){var j=S.displayName||S.name||"";return p.displayName||(j!==""?T+"("+j+")":T)}function Y(p){return p.displayName||"Context"}function M(p){if(p==null)return null;if(typeof p.tag=="number"&&N("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case e.Fragment:return"Fragment";case o:return"Portal";case s:return"Profiler";case a:return"StrictMode";case u:return"Suspense";case g:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case c:var S=p;return Y(S)+".Consumer";case i:var T=p;return Y(T._context)+".Provider";case d:return _(p,p.render,"ForwardRef");case l:return M(p.type);case x:return M(p._render);case v:{var j=p,re=j._payload,ee=j._init;try{return M(ee(re))}catch{return null}}}return null}var X=0,F,K,A,B,oe,I,W;function k(){}k.__reactDisabledLog=!0;function J(){{if(X===0){F=console.log,K=console.info,A=console.warn,B=console.error,oe=console.group,I=console.groupCollapsed,W=console.groupEnd;var p={configurable:!0,enumerable:!0,value:k,writable:!0};Object.defineProperties(console,{info:p,log:p,warn:p,error:p,group:p,groupCollapsed:p,groupEnd:p})}X++}}function te(){{if(X--,X===0){var p={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:r({},p,{value:F}),info:r({},p,{value:K}),warn:r({},p,{value:A}),error:r({},p,{value:B}),group:r({},p,{value:oe}),groupCollapsed:r({},p,{value:I}),groupEnd:r({},p,{value:W})})}X<0&&N("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=O.ReactCurrentDispatcher,xe;function ge(p,S,T){{if(xe===void 0)try{throw Error()}catch(re){var j=re.stack.trim().match(/\n( *(at )?)/);xe=j&&j[1]||""}return`
20
- `+xe+p}}var we=!1,ve;{var ut=typeof WeakMap=="function"?WeakMap:Map;ve=new ut}function Le(p,S){if(!p||we)return"";{var T=ve.get(p);if(T!==void 0)return T}var j;we=!0;var re=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ee;ee=G.current,G.current=null,J();try{if(S){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(Fe){j=Fe}Reflect.construct(p,[],q)}else{try{q.call()}catch(Fe){j=Fe}p.call(q.prototype)}}else{try{throw Error()}catch(Fe){j=Fe}p()}}catch(Fe){if(Fe&&j&&typeof Fe.stack=="string"){for(var V=Fe.stack.split(`
19
+ */var Cn;function As(){return Cn||(Cn=1,function(e){process.env.NODE_ENV!=="production"&&function(){var t=w,r=to(),n=60103,o=60106;e.Fragment=60107;var a=60108,s=60114,i=60109,c=60110,d=60112,u=60113,g=60120,l=60115,v=60116,x=60121,h=60122,y=60117,E=60129,b=60131;if(typeof Symbol=="function"&&Symbol.for){var C=Symbol.for;n=C("react.element"),o=C("react.portal"),e.Fragment=C("react.fragment"),a=C("react.strict_mode"),s=C("react.profiler"),i=C("react.provider"),c=C("react.context"),d=C("react.forward_ref"),u=C("react.suspense"),g=C("react.suspense_list"),l=C("react.memo"),v=C("react.lazy"),x=C("react.block"),h=C("react.server.block"),y=C("react.fundamental"),C("react.scope"),C("react.opaque.id"),E=C("react.debug_trace_mode"),C("react.offscreen"),b=C("react.legacy_hidden")}var P=typeof Symbol=="function"&&Symbol.iterator,R="@@iterator";function D(p){if(p===null||typeof p!="object")return null;var S=P&&p[P]||p[R];return typeof S=="function"?S:null}var O=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function N(p){{for(var S=arguments.length,T=new Array(S>1?S-1:0),j=1;j<S;j++)T[j-1]=arguments[j];V("error",p,T)}}function V(p,S,T){{var j=O.ReactDebugCurrentFrame,re=j.getStackAddendum();re!==""&&(S+="%s",T=T.concat([re]));var ee=T.map(function(q){return""+q});ee.unshift("Warning: "+S),Function.prototype.apply.call(console[p],console,ee)}}var H=!1;function U(p){return!!(typeof p=="string"||typeof p=="function"||p===e.Fragment||p===s||p===E||p===a||p===u||p===g||p===b||H||typeof p=="object"&&p!==null&&(p.$$typeof===v||p.$$typeof===l||p.$$typeof===i||p.$$typeof===c||p.$$typeof===d||p.$$typeof===y||p.$$typeof===x||p[0]===h))}function _(p,S,T){var j=S.displayName||S.name||"";return p.displayName||(j!==""?T+"("+j+")":T)}function Y(p){return p.displayName||"Context"}function M(p){if(p==null)return null;if(typeof p.tag=="number"&&N("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case e.Fragment:return"Fragment";case o:return"Portal";case s:return"Profiler";case a:return"StrictMode";case u:return"Suspense";case g:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case c:var S=p;return Y(S)+".Consumer";case i:var T=p;return Y(T._context)+".Provider";case d:return _(p,p.render,"ForwardRef");case l:return M(p.type);case x:return M(p._render);case v:{var j=p,re=j._payload,ee=j._init;try{return M(ee(re))}catch{return null}}}return null}var X=0,F,K,A,B,oe,I,W;function k(){}k.__reactDisabledLog=!0;function J(){{if(X===0){F=console.log,K=console.info,A=console.warn,B=console.error,oe=console.group,I=console.groupCollapsed,W=console.groupEnd;var p={configurable:!0,enumerable:!0,value:k,writable:!0};Object.defineProperties(console,{info:p,log:p,warn:p,error:p,group:p,groupCollapsed:p,groupEnd:p})}X++}}function te(){{if(X--,X===0){var p={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:r({},p,{value:F}),info:r({},p,{value:K}),warn:r({},p,{value:A}),error:r({},p,{value:B}),group:r({},p,{value:oe}),groupCollapsed:r({},p,{value:I}),groupEnd:r({},p,{value:W})})}X<0&&N("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=O.ReactCurrentDispatcher,xe;function ge(p,S,T){{if(xe===void 0)try{throw Error()}catch(re){var j=re.stack.trim().match(/\n( *(at )?)/);xe=j&&j[1]||""}return`
20
+ `+xe+p}}var we=!1,ve;{var ut=typeof WeakMap=="function"?WeakMap:Map;ve=new ut}function Le(p,S){if(!p||we)return"";{var T=ve.get(p);if(T!==void 0)return T}var j;we=!0;var re=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ee;ee=G.current,G.current=null,J();try{if(S){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(Fe){j=Fe}Reflect.construct(p,[],q)}else{try{q.call()}catch(Fe){j=Fe}p.call(q.prototype)}}else{try{throw Error()}catch(Fe){j=Fe}p()}}catch(Fe){if(Fe&&j&&typeof Fe.stack=="string"){for(var z=Fe.stack.split(`
21
21
  `),de=j.stack.split(`
22
- `),ae=V.length-1,se=de.length-1;ae>=1&&se>=0&&V[ae]!==de[se];)se--;for(;ae>=1&&se>=0;ae--,se--)if(V[ae]!==de[se]){if(ae!==1||se!==1)do if(ae--,se--,se<0||V[ae]!==de[se]){var $e=`
23
- `+V[ae].replace(" at new "," at ");return typeof p=="function"&&ve.set(p,$e),$e}while(ae>=1&&se>=0);break}}}finally{we=!1,G.current=ee,te(),Error.prepareStackTrace=re}var gt=p?p.displayName||p.name:"",xn=gt?ge(gt):"";return typeof p=="function"&&ve.set(p,xn),xn}function Ne(p,S,T){return Le(p,!1)}function rt(p){var S=p.prototype;return!!(S&&S.isReactComponent)}function Ie(p,S,T){if(p==null)return"";if(typeof p=="function")return Le(p,rt(p));if(typeof p=="string")return ge(p);switch(p){case u:return ge("Suspense");case g:return ge("SuspenseList")}if(typeof p=="object")switch(p.$$typeof){case d:return Ne(p.render);case l:return Ie(p.type,S,T);case x:return Ne(p._render);case v:{var j=p,re=j._payload,ee=j._init;try{return Ie(ee(re),S,T)}catch{}}}return""}var Re={},dt=O.ReactDebugCurrentFrame;function He(p){if(p){var S=p._owner,T=Ie(p.type,p._source,S?S.type:null);dt.setExtraStackFrame(T)}else dt.setExtraStackFrame(null)}function ie(p,S,T,j,re){{var ee=Function.call.bind(Object.prototype.hasOwnProperty);for(var q in p)if(ee(p,q)){var V=void 0;try{if(typeof p[q]!="function"){var de=Error((j||"React class")+": "+T+" type `"+q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof p[q]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw de.name="Invariant Violation",de}V=p[q](S,q,j,T,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ae){V=ae}V&&!(V instanceof Error)&&(He(re),N("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",j||"React class",T,q,typeof V),He(null)),V instanceof Error&&!(V.message in Re)&&(Re[V.message]=!0,He(re),N("Failed %s type: %s",T,V.message),He(null))}}}var Ee=O.ReactCurrentOwner,Tt=Object.prototype.hasOwnProperty,br={key:!0,ref:!0,__self:!0,__source:!0},nt,Bt,ft;ft={};function Ot(p){if(Tt.call(p,"ref")){var S=Object.getOwnPropertyDescriptor(p,"ref").get;if(S&&S.isReactWarning)return!1}return p.ref!==void 0}function Ue(p){if(Tt.call(p,"key")){var S=Object.getOwnPropertyDescriptor(p,"key").get;if(S&&S.isReactWarning)return!1}return p.key!==void 0}function Wt(p,S){if(typeof p.ref=="string"&&Ee.current&&S&&Ee.current.stateNode!==S){var T=M(Ee.current.type);ft[T]||(N('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(Ee.current.type),p.ref),ft[T]=!0)}}function Ye(p,S){{var T=function(){nt||(nt=!0,N("%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://reactjs.org/link/special-props)",S))};T.isReactWarning=!0,Object.defineProperty(p,"key",{get:T,configurable:!0})}}function zt(p,S){{var T=function(){Bt||(Bt=!0,N("%s: `ref` 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://reactjs.org/link/special-props)",S))};T.isReactWarning=!0,Object.defineProperty(p,"ref",{get:T,configurable:!0})}}var yr=function(p,S,T,j,re,ee,q){var V={$$typeof:n,type:p,key:S,ref:T,props:q,_owner:ee};return V._store={},Object.defineProperty(V._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(V,"_self",{configurable:!1,enumerable:!1,writable:!1,value:j}),Object.defineProperty(V,"_source",{configurable:!1,enumerable:!1,writable:!1,value:re}),Object.freeze&&(Object.freeze(V.props),Object.freeze(V)),V};function Vt(p,S,T,j,re){{var ee,q={},V=null,de=null;T!==void 0&&(V=""+T),Ue(S)&&(V=""+S.key),Ot(S)&&(de=S.ref,Wt(S,re));for(ee in S)Tt.call(S,ee)&&!br.hasOwnProperty(ee)&&(q[ee]=S[ee]);if(p&&p.defaultProps){var ae=p.defaultProps;for(ee in ae)q[ee]===void 0&&(q[ee]=ae[ee])}if(V||de){var se=typeof p=="function"?p.displayName||p.name||"Unknown":p;V&&Ye(q,se),de&&zt(q,se)}return yr(p,V,de,re,j,Ee.current,q)}}var pt=O.ReactCurrentOwner,Ht=O.ReactDebugCurrentFrame;function De(p){if(p){var S=p._owner,T=Ie(p.type,p._source,S?S.type:null);Ht.setExtraStackFrame(T)}else Ht.setExtraStackFrame(null)}var Ce;Ce=!1;function Nt(p){return typeof p=="object"&&p!==null&&p.$$typeof===n}function L(){{if(pt.current){var p=M(pt.current.type);if(p)return`
22
+ `),ae=z.length-1,se=de.length-1;ae>=1&&se>=0&&z[ae]!==de[se];)se--;for(;ae>=1&&se>=0;ae--,se--)if(z[ae]!==de[se]){if(ae!==1||se!==1)do if(ae--,se--,se<0||z[ae]!==de[se]){var $e=`
23
+ `+z[ae].replace(" at new "," at ");return typeof p=="function"&&ve.set(p,$e),$e}while(ae>=1&&se>=0);break}}}finally{we=!1,G.current=ee,te(),Error.prepareStackTrace=re}var gt=p?p.displayName||p.name:"",xn=gt?ge(gt):"";return typeof p=="function"&&ve.set(p,xn),xn}function Ne(p,S,T){return Le(p,!1)}function rt(p){var S=p.prototype;return!!(S&&S.isReactComponent)}function Ie(p,S,T){if(p==null)return"";if(typeof p=="function")return Le(p,rt(p));if(typeof p=="string")return ge(p);switch(p){case u:return ge("Suspense");case g:return ge("SuspenseList")}if(typeof p=="object")switch(p.$$typeof){case d:return Ne(p.render);case l:return Ie(p.type,S,T);case x:return Ne(p._render);case v:{var j=p,re=j._payload,ee=j._init;try{return Ie(ee(re),S,T)}catch{}}}return""}var Re={},dt=O.ReactDebugCurrentFrame;function He(p){if(p){var S=p._owner,T=Ie(p.type,p._source,S?S.type:null);dt.setExtraStackFrame(T)}else dt.setExtraStackFrame(null)}function ie(p,S,T,j,re){{var ee=Function.call.bind(Object.prototype.hasOwnProperty);for(var q in p)if(ee(p,q)){var z=void 0;try{if(typeof p[q]!="function"){var de=Error((j||"React class")+": "+T+" type `"+q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof p[q]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw de.name="Invariant Violation",de}z=p[q](S,q,j,T,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ae){z=ae}z&&!(z instanceof Error)&&(He(re),N("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",j||"React class",T,q,typeof z),He(null)),z instanceof Error&&!(z.message in Re)&&(Re[z.message]=!0,He(re),N("Failed %s type: %s",T,z.message),He(null))}}}var Ee=O.ReactCurrentOwner,Tt=Object.prototype.hasOwnProperty,br={key:!0,ref:!0,__self:!0,__source:!0},nt,Bt,ft;ft={};function Ot(p){if(Tt.call(p,"ref")){var S=Object.getOwnPropertyDescriptor(p,"ref").get;if(S&&S.isReactWarning)return!1}return p.ref!==void 0}function Ue(p){if(Tt.call(p,"key")){var S=Object.getOwnPropertyDescriptor(p,"key").get;if(S&&S.isReactWarning)return!1}return p.key!==void 0}function Wt(p,S){if(typeof p.ref=="string"&&Ee.current&&S&&Ee.current.stateNode!==S){var T=M(Ee.current.type);ft[T]||(N('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(Ee.current.type),p.ref),ft[T]=!0)}}function Ye(p,S){{var T=function(){nt||(nt=!0,N("%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://reactjs.org/link/special-props)",S))};T.isReactWarning=!0,Object.defineProperty(p,"key",{get:T,configurable:!0})}}function Vt(p,S){{var T=function(){Bt||(Bt=!0,N("%s: `ref` 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://reactjs.org/link/special-props)",S))};T.isReactWarning=!0,Object.defineProperty(p,"ref",{get:T,configurable:!0})}}var yr=function(p,S,T,j,re,ee,q){var z={$$typeof:n,type:p,key:S,ref:T,props:q,_owner:ee};return z._store={},Object.defineProperty(z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(z,"_self",{configurable:!1,enumerable:!1,writable:!1,value:j}),Object.defineProperty(z,"_source",{configurable:!1,enumerable:!1,writable:!1,value:re}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z};function zt(p,S,T,j,re){{var ee,q={},z=null,de=null;T!==void 0&&(z=""+T),Ue(S)&&(z=""+S.key),Ot(S)&&(de=S.ref,Wt(S,re));for(ee in S)Tt.call(S,ee)&&!br.hasOwnProperty(ee)&&(q[ee]=S[ee]);if(p&&p.defaultProps){var ae=p.defaultProps;for(ee in ae)q[ee]===void 0&&(q[ee]=ae[ee])}if(z||de){var se=typeof p=="function"?p.displayName||p.name||"Unknown":p;z&&Ye(q,se),de&&Vt(q,se)}return yr(p,z,de,re,j,Ee.current,q)}}var pt=O.ReactCurrentOwner,Ht=O.ReactDebugCurrentFrame;function De(p){if(p){var S=p._owner,T=Ie(p.type,p._source,S?S.type:null);Ht.setExtraStackFrame(T)}else Ht.setExtraStackFrame(null)}var Ce;Ce=!1;function Nt(p){return typeof p=="object"&&p!==null&&p.$$typeof===n}function L(){{if(pt.current){var p=M(pt.current.type);if(p)return`
24
24
 
25
25
  Check the render method of \``+p+"`."}return""}}function Q(p){return""}var Z={};function Se(p){{var S=L();if(!S){var T=typeof p=="string"?p:p.displayName||p.name;T&&(S=`
26
26
 
27
- Check the top-level render call using <`+T+">.")}return S}}function he(p,S){{if(!p._store||p._store.validated||p.key!=null)return;p._store.validated=!0;var T=Se(S);if(Z[T])return;Z[T]=!0;var j="";p&&p._owner&&p._owner!==pt.current&&(j=" It was passed a child from "+M(p._owner.type)+"."),De(p),N('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',T,j),De(null)}}function ot(p,S){{if(typeof p!="object")return;if(Array.isArray(p))for(var T=0;T<p.length;T++){var j=p[T];Nt(j)&&he(j,S)}else if(Nt(p))p._store&&(p._store.validated=!0);else if(p){var re=D(p);if(typeof re=="function"&&re!==p.entries)for(var ee=re.call(p),q;!(q=ee.next()).done;)Nt(q.value)&&he(q.value,S)}}}function xr(p){{var S=p.type;if(S==null||typeof S=="string")return;var T;if(typeof S=="function")T=S.propTypes;else if(typeof S=="object"&&(S.$$typeof===d||S.$$typeof===l))T=S.propTypes;else return;if(T){var j=M(S);ie(T,p.props,"prop",j,p)}else if(S.PropTypes!==void 0&&!Ce){Ce=!0;var re=M(S);N("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",re||"Unknown")}typeof S.getDefaultProps=="function"&&!S.getDefaultProps.isReactClassApproved&&N("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ys(p){{for(var S=Object.keys(p.props),T=0;T<S.length;T++){var j=S[T];if(j!=="children"&&j!=="key"){De(p),N("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",j),De(null);break}}p.ref!==null&&(De(p),N("Invalid attribute `ref` supplied to `React.Fragment`."),De(null))}}function yn(p,S,T,j,re,ee){{var q=U(p);if(!q){var V="";(p===void 0||typeof p=="object"&&p!==null&&Object.keys(p).length===0)&&(V+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var de=Q();de?V+=de:V+=L();var ae;p===null?ae="null":Array.isArray(p)?ae="array":p!==void 0&&p.$$typeof===n?(ae="<"+(M(p.type)||"Unknown")+" />",V=" Did you accidentally export a JSX literal instead of a component?"):ae=typeof p,N("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ae,V)}var se=Vt(p,S,T,re,ee);if(se==null)return se;if(q){var $e=S.children;if($e!==void 0)if(j)if(Array.isArray($e)){for(var gt=0;gt<$e.length;gt++)ot($e[gt],p);Object.freeze&&Object.freeze($e)}else N("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 ot($e,p)}return p===e.Fragment?ys(se):xr(se),se}}function xs(p,S,T){return yn(p,S,T,!0)}function ws(p,S,T){return yn(p,S,T,!1)}var Es=ws,Cs=xs;e.jsx=Es,e.jsxs=Cs}()}(Er)),Er}process.env.NODE_ENV==="production"?jr.exports=Rs():jr.exports=As();var m=jr.exports;/**
27
+ Check the top-level render call using <`+T+">.")}return S}}function he(p,S){{if(!p._store||p._store.validated||p.key!=null)return;p._store.validated=!0;var T=Se(S);if(Z[T])return;Z[T]=!0;var j="";p&&p._owner&&p._owner!==pt.current&&(j=" It was passed a child from "+M(p._owner.type)+"."),De(p),N('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',T,j),De(null)}}function ot(p,S){{if(typeof p!="object")return;if(Array.isArray(p))for(var T=0;T<p.length;T++){var j=p[T];Nt(j)&&he(j,S)}else if(Nt(p))p._store&&(p._store.validated=!0);else if(p){var re=D(p);if(typeof re=="function"&&re!==p.entries)for(var ee=re.call(p),q;!(q=ee.next()).done;)Nt(q.value)&&he(q.value,S)}}}function xr(p){{var S=p.type;if(S==null||typeof S=="string")return;var T;if(typeof S=="function")T=S.propTypes;else if(typeof S=="object"&&(S.$$typeof===d||S.$$typeof===l))T=S.propTypes;else return;if(T){var j=M(S);ie(T,p.props,"prop",j,p)}else if(S.PropTypes!==void 0&&!Ce){Ce=!0;var re=M(S);N("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",re||"Unknown")}typeof S.getDefaultProps=="function"&&!S.getDefaultProps.isReactClassApproved&&N("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ys(p){{for(var S=Object.keys(p.props),T=0;T<S.length;T++){var j=S[T];if(j!=="children"&&j!=="key"){De(p),N("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",j),De(null);break}}p.ref!==null&&(De(p),N("Invalid attribute `ref` supplied to `React.Fragment`."),De(null))}}function yn(p,S,T,j,re,ee){{var q=U(p);if(!q){var z="";(p===void 0||typeof p=="object"&&p!==null&&Object.keys(p).length===0)&&(z+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var de=Q();de?z+=de:z+=L();var ae;p===null?ae="null":Array.isArray(p)?ae="array":p!==void 0&&p.$$typeof===n?(ae="<"+(M(p.type)||"Unknown")+" />",z=" Did you accidentally export a JSX literal instead of a component?"):ae=typeof p,N("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ae,z)}var se=zt(p,S,T,re,ee);if(se==null)return se;if(q){var $e=S.children;if($e!==void 0)if(j)if(Array.isArray($e)){for(var gt=0;gt<$e.length;gt++)ot($e[gt],p);Object.freeze&&Object.freeze($e)}else N("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 ot($e,p)}return p===e.Fragment?ys(se):xr(se),se}}function xs(p,S,T){return yn(p,S,T,!0)}function ws(p,S,T){return yn(p,S,T,!1)}var Es=ws,Cs=xs;e.jsx=Es,e.jsxs=Cs}()}(Er)),Er}process.env.NODE_ENV==="production"?jr.exports=Rs():jr.exports=As();var m=jr.exports;/**
28
28
  * @license lucide-react v0.414.0 - ISC
29
29
  *
30
30
  * This source code is licensed under the ISC license.
@@ -64,7 +64,7 @@ Check the top-level render call using <`+T+">.")}return S}}function he(p,S){{if(
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const js=cr("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);function Ms(e,t){const r=f.createContext(t);function n(a){const{children:s,...i}=a,c=f.useMemo(()=>i,Object.values(i));return m.jsx(r.Provider,{value:c,children:s})}function o(a){const s=f.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function St(e,t=[]){let r=[];function n(a,s){const i=f.createContext(s),c=r.length;r=[...r,s];function d(g){const{scope:l,children:v,...x}=g,h=(l==null?void 0:l[e][c])||i,y=f.useMemo(()=>x,Object.values(x));return m.jsx(h.Provider,{value:y,children:v})}function u(g,l){const v=(l==null?void 0:l[e][c])||i,x=f.useContext(v);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${g}\` must be used within \`${a}\``)}return d.displayName=a+"Provider",[d,u]}const o=()=>{const a=r.map(s=>f.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,Ls(o,...t)]}function Ls(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((i,{useScope:c,scopeName:d})=>{const g=c(a)[`__scope${d}`];return{...i,...g}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function Is(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function no(...e){return t=>e.forEach(r=>Is(r,t))}function pe(...e){return f.useCallback(no(...e),e)}function ue(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var it=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},$s=f.useId||(()=>{}),Fs=0;function Qt(e){const[t,r]=f.useState($s());return it(()=>{r(n=>n??String(Fs++))},[e]),t?`radix-${t}`:""}function Je(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Xr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=Bs({defaultProp:t,onChange:r}),a=e!==void 0,s=a?e:n,i=Je(r),c=f.useCallback(d=>{if(a){const g=typeof d=="function"?d(e):d;g!==e&&i(g)}else o(d)},[a,e,o,i]);return[s,c]}function Bs({defaultProp:e,onChange:t}){const r=f.useState(e),[n]=r,o=f.useRef(n),a=Je(t);return f.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}var It=f.forwardRef((e,t)=>{const{children:r,...n}=e,o=f.Children.toArray(r),a=o.find(Ws);if(a){const s=a.props.children,i=o.map(c=>c===a?f.Children.count(s)>1?f.Children.only(null):f.isValidElement(s)?s.props.children:null:c);return m.jsx(Mr,{...n,ref:t,children:f.isValidElement(s)?f.cloneElement(s,void 0,i):null})}return m.jsx(Mr,{...n,ref:t,children:r})});It.displayName="Slot";var Mr=f.forwardRef((e,t)=>{const{children:r,...n}=e;if(f.isValidElement(r)){const o=Vs(r);return f.cloneElement(r,{...zs(n,r.props),ref:t?no(t,o):o})}return f.Children.count(r)>1?f.Children.only(null):null});Mr.displayName="SlotClone";var Jr=({children:e})=>m.jsx(m.Fragment,{children:e});function Ws(e){return f.isValidElement(e)&&e.type===Jr}function zs(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{a(...i),o(...i)}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Vs(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Hs=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],le=Hs.reduce((e,t)=>{const r=f.forwardRef((n,o)=>{const{asChild:a,...s}=n,i=a?It:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(i,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Us(e,t){e&&Kr.flushSync(()=>e.dispatchEvent(t))}function Ys(e,t=globalThis==null?void 0:globalThis.document){const r=Je(e);f.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Gs="DismissableLayer",Lr="dismissableLayer.update",qs="dismissableLayer.pointerDownOutside",Ks="dismissableLayer.focusOutside",Sn,oo=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zr=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,d=f.useContext(oo),[u,g]=f.useState(null),l=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=f.useState({}),x=pe(t,O=>g(O)),h=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),E=h.indexOf(y),b=u?h.indexOf(u):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,P=b>=E,R=Zs(O=>{const N=O.target,z=[...d.branches].some(H=>H.contains(N));!P||z||(o==null||o(O),s==null||s(O),O.defaultPrevented||i==null||i())},l),D=Qs(O=>{const N=O.target;[...d.branches].some(H=>H.contains(N))||(a==null||a(O),s==null||s(O),O.defaultPrevented||i==null||i())},l);return Ys(O=>{b===d.layers.size-1&&(n==null||n(O),!O.defaultPrevented&&i&&(O.preventDefault(),i()))},l),f.useEffect(()=>{if(u)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Sn=l.body.style.pointerEvents,l.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),Pn(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(l.body.style.pointerEvents=Sn)}},[u,l,r,d]),f.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),Pn())},[u,d]),f.useEffect(()=>{const O=()=>v({});return document.addEventListener(Lr,O),()=>document.removeEventListener(Lr,O)},[]),m.jsx(le.div,{...c,ref:x,style:{pointerEvents:C?P?"auto":"none":void 0,...e.style},onFocusCapture:ue(e.onFocusCapture,D.onFocusCapture),onBlurCapture:ue(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:ue(e.onPointerDownCapture,R.onPointerDownCapture)})});Zr.displayName=Gs;var Xs="DismissableLayerBranch",Js=f.forwardRef((e,t)=>{const r=f.useContext(oo),n=f.useRef(null),o=pe(t,n);return f.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),m.jsx(le.div,{...e,ref:o})});Js.displayName=Xs;function Zs(e,t=globalThis==null?void 0:globalThis.document){const r=Je(e),n=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let c=function(){ao(qs,r,d,{discrete:!0})};const d={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);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Qs(e,t=globalThis==null?void 0:globalThis.document){const r=Je(e),n=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!n.current&&ao(Ks,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Pn(){const e=new CustomEvent(Lr);document.dispatchEvent(e)}function ao(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Us(o,a):o.dispatchEvent(a)}var Cr="focusScope.autoFocusOnMount",Sr="focusScope.autoFocusOnUnmount",Rn={bubbles:!1,cancelable:!0},ei="FocusScope",so=f.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=f.useState(null),d=Je(o),u=Je(a),g=f.useRef(null),l=pe(t,h=>c(h)),v=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(n){let h=function(C){if(v.paused||!i)return;const P=C.target;i.contains(P)?g.current=P:Ke(g.current,{select:!0})},y=function(C){if(v.paused||!i)return;const P=C.relatedTarget;P!==null&&(i.contains(P)||Ke(g.current,{select:!0}))},E=function(C){if(document.activeElement===document.body)for(const R of C)R.removedNodes.length>0&&Ke(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const b=new MutationObserver(E);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),b.disconnect()}}},[n,i,v.paused]),f.useEffect(()=>{if(i){Tn.add(v);const h=document.activeElement;if(!i.contains(h)){const E=new CustomEvent(Cr,Rn);i.addEventListener(Cr,d),i.dispatchEvent(E),E.defaultPrevented||(ti(si(io(i)),{select:!0}),document.activeElement===h&&Ke(i))}return()=>{i.removeEventListener(Cr,d),setTimeout(()=>{const E=new CustomEvent(Sr,Rn);i.addEventListener(Sr,u),i.dispatchEvent(E),E.defaultPrevented||Ke(h??document.body,{select:!0}),i.removeEventListener(Sr,u),Tn.remove(v)},0)}}},[i,d,u,v]);const x=f.useCallback(h=>{if(!r&&!n||v.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,E=document.activeElement;if(y&&E){const b=h.currentTarget,[C,P]=ri(b);C&&P?!h.shiftKey&&E===P?(h.preventDefault(),r&&Ke(C,{select:!0})):h.shiftKey&&E===C&&(h.preventDefault(),r&&Ke(P,{select:!0})):E===b&&h.preventDefault()}},[r,n,v.paused]);return m.jsx(le.div,{tabIndex:-1,...s,ref:l,onKeyDown:x})});so.displayName=ei;function ti(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ke(n,{select:t}),document.activeElement!==r)return}function ri(e){const t=io(e),r=An(t,e),n=An(t.reverse(),e);return[r,n]}function io(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function An(e,t){for(const r of e)if(!ni(r,{upTo:t}))return r}function ni(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 oi(e){return e instanceof HTMLInputElement&&"select"in e}function Ke(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&oi(e)&&t&&e.select()}}var Tn=ai();function ai(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=On(e,t),e.unshift(t)},remove(t){var r;e=On(e,t),(r=e[0])==null||r.resume()}}}function On(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function si(e){return e.filter(t=>t.tagName!=="A")}var ii="Portal",lo=f.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,a]=f.useState(!1);it(()=>a(!0),[]);const s=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?qr.createPortal(m.jsx(le.div,{...n,ref:t}),s):null});lo.displayName=ii;function li(e,t){return f.useReducer((r,n)=>t[r][n]??r,e)}var $t=e=>{const{present:t,children:r}=e,n=ci(t),o=typeof r=="function"?r({present:n.isPresent}):f.Children.only(r),a=pe(n.ref,ui(o));return typeof r=="function"||n.isPresent?f.cloneElement(o,{ref:a}):null};$t.displayName="Presence";function ci(e){const[t,r]=f.useState(),n=f.useRef({}),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,c]=li(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const d=Ut(n.current);a.current=i==="mounted"?d:"none"},[i]),it(()=>{const d=n.current,u=o.current;if(u!==e){const l=a.current,v=Ut(d);e?c("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(u&&l!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),it(()=>{if(t){const d=g=>{const v=Ut(n.current).includes(g.animationName);g.target===t&&v&&Kr.flushSync(()=>c("ANIMATION_END"))},u=g=>{g.target===t&&(a.current=Ut(n.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function Ut(e){return(e==null?void 0:e.animationName)||"none"}function ui(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Pr=0;function di(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Nn()),document.body.insertAdjacentElement("beforeend",e[1]??Nn()),Pr++,()=>{Pr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Pr--}},[])}function Nn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var ke=function(){return ke=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ke.apply(this,arguments)};function co(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function fi(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var er="right-scroll-bar-position",tr="width-before-scroll-bar",pi="with-scroll-bars-hidden",gi="--removed-body-scroll-bar-size";function Rr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function vi(e,t){var r=w.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var hi=typeof window<"u"?f.useLayoutEffect:f.useEffect,Dn=new WeakMap;function mi(e,t){var r=vi(null,function(n){return e.forEach(function(o){return Rr(o,n)})});return hi(function(){var n=Dn.get(r);if(n){var o=new Set(n),a=new Set(e),s=r.current;o.forEach(function(i){a.has(i)||Rr(i,null)}),a.forEach(function(i){o.has(i)||Rr(i,s)})}Dn.set(r,e)},[e]),r}function bi(e){return e}function yi(e,t){t===void 0&&(t=bi);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(i){return a(i)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(a),s=r}var c=function(){var u=s;s=[],u.forEach(a)},d=function(){return Promise.resolve().then(c)};d(),r={push:function(u){s.push(u),d()},filter:function(u){return s=s.filter(u),r}}}};return o}function xi(e){e===void 0&&(e={});var t=yi(null);return t.options=ke({async:!0,ssr:!1},e),t}var uo=function(e){var t=e.sideCar,r=co(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return f.createElement(n,ke({},r))};uo.isSideCarExport=!0;function wi(e,t){return e.useMedium(t),uo}var fo=xi(),Ar=function(){},ur=f.forwardRef(function(e,t){var r=f.useRef(null),n=f.useState({onScrollCapture:Ar,onWheelCapture:Ar,onTouchMoveCapture:Ar}),o=n[0],a=n[1],s=e.forwardProps,i=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,g=e.shards,l=e.sideCar,v=e.noIsolation,x=e.inert,h=e.allowPinchZoom,y=e.as,E=y===void 0?"div":y,b=e.gapMode,C=co(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=l,R=mi([r,t]),D=ke(ke({},C),o);return f.createElement(f.Fragment,null,u&&f.createElement(P,{sideCar:fo,removeScrollBar:d,shards:g,noIsolation:v,inert:x,setCallbacks:a,allowPinchZoom:!!h,lockRef:r,gapMode:b}),s?f.cloneElement(f.Children.only(i),ke(ke({},D),{ref:R})):f.createElement(E,ke({},D,{className:c,ref:R}),i))});ur.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ur.classNames={fullWidth:tr,zeroRight:er};var Ei=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ci(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ei();return t&&e.setAttribute("nonce",t),e}function Si(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Pi(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ri=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Ci())&&(Si(t,r),Pi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ai=function(){var e=Ri();return function(t,r){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},po=function(){var e=Ai(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Ti={left:0,top:0,right:0,gap:0},Tr=function(e){return parseInt(e||"",10)||0},Oi=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Tr(r),Tr(n),Tr(o)]},Ni=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ti;var t=Oi(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Di=po(),yt="data-scroll-locked",ki=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
67
+ */const js=cr("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);function Ms(e,t){const r=f.createContext(t);function n(a){const{children:s,...i}=a,c=f.useMemo(()=>i,Object.values(i));return m.jsx(r.Provider,{value:c,children:s})}function o(a){const s=f.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function St(e,t=[]){let r=[];function n(a,s){const i=f.createContext(s),c=r.length;r=[...r,s];function d(g){const{scope:l,children:v,...x}=g,h=(l==null?void 0:l[e][c])||i,y=f.useMemo(()=>x,Object.values(x));return m.jsx(h.Provider,{value:y,children:v})}function u(g,l){const v=(l==null?void 0:l[e][c])||i,x=f.useContext(v);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${g}\` must be used within \`${a}\``)}return d.displayName=a+"Provider",[d,u]}const o=()=>{const a=r.map(s=>f.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,Ls(o,...t)]}function Ls(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((i,{useScope:c,scopeName:d})=>{const g=c(a)[`__scope${d}`];return{...i,...g}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function Is(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function no(...e){return t=>e.forEach(r=>Is(r,t))}function pe(...e){return f.useCallback(no(...e),e)}function ue(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var it=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},$s=f.useId||(()=>{}),Fs=0;function Qt(e){const[t,r]=f.useState($s());return it(()=>{r(n=>n??String(Fs++))},[e]),t?`radix-${t}`:""}function Je(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Xr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=Bs({defaultProp:t,onChange:r}),a=e!==void 0,s=a?e:n,i=Je(r),c=f.useCallback(d=>{if(a){const g=typeof d=="function"?d(e):d;g!==e&&i(g)}else o(d)},[a,e,o,i]);return[s,c]}function Bs({defaultProp:e,onChange:t}){const r=f.useState(e),[n]=r,o=f.useRef(n),a=Je(t);return f.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}var It=f.forwardRef((e,t)=>{const{children:r,...n}=e,o=f.Children.toArray(r),a=o.find(Ws);if(a){const s=a.props.children,i=o.map(c=>c===a?f.Children.count(s)>1?f.Children.only(null):f.isValidElement(s)?s.props.children:null:c);return m.jsx(Mr,{...n,ref:t,children:f.isValidElement(s)?f.cloneElement(s,void 0,i):null})}return m.jsx(Mr,{...n,ref:t,children:r})});It.displayName="Slot";var Mr=f.forwardRef((e,t)=>{const{children:r,...n}=e;if(f.isValidElement(r)){const o=zs(r);return f.cloneElement(r,{...Vs(n,r.props),ref:t?no(t,o):o})}return f.Children.count(r)>1?f.Children.only(null):null});Mr.displayName="SlotClone";var Jr=({children:e})=>m.jsx(m.Fragment,{children:e});function Ws(e){return f.isValidElement(e)&&e.type===Jr}function Vs(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{a(...i),o(...i)}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function zs(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Hs=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],le=Hs.reduce((e,t)=>{const r=f.forwardRef((n,o)=>{const{asChild:a,...s}=n,i=a?It:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(i,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Us(e,t){e&&Kr.flushSync(()=>e.dispatchEvent(t))}function Ys(e,t=globalThis==null?void 0:globalThis.document){const r=Je(e);f.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Gs="DismissableLayer",Lr="dismissableLayer.update",qs="dismissableLayer.pointerDownOutside",Ks="dismissableLayer.focusOutside",Sn,oo=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zr=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,d=f.useContext(oo),[u,g]=f.useState(null),l=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=f.useState({}),x=pe(t,O=>g(O)),h=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),E=h.indexOf(y),b=u?h.indexOf(u):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,P=b>=E,R=Zs(O=>{const N=O.target,V=[...d.branches].some(H=>H.contains(N));!P||V||(o==null||o(O),s==null||s(O),O.defaultPrevented||i==null||i())},l),D=Qs(O=>{const N=O.target;[...d.branches].some(H=>H.contains(N))||(a==null||a(O),s==null||s(O),O.defaultPrevented||i==null||i())},l);return Ys(O=>{b===d.layers.size-1&&(n==null||n(O),!O.defaultPrevented&&i&&(O.preventDefault(),i()))},l),f.useEffect(()=>{if(u)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Sn=l.body.style.pointerEvents,l.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),Pn(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(l.body.style.pointerEvents=Sn)}},[u,l,r,d]),f.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),Pn())},[u,d]),f.useEffect(()=>{const O=()=>v({});return document.addEventListener(Lr,O),()=>document.removeEventListener(Lr,O)},[]),m.jsx(le.div,{...c,ref:x,style:{pointerEvents:C?P?"auto":"none":void 0,...e.style},onFocusCapture:ue(e.onFocusCapture,D.onFocusCapture),onBlurCapture:ue(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:ue(e.onPointerDownCapture,R.onPointerDownCapture)})});Zr.displayName=Gs;var Xs="DismissableLayerBranch",Js=f.forwardRef((e,t)=>{const r=f.useContext(oo),n=f.useRef(null),o=pe(t,n);return f.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),m.jsx(le.div,{...e,ref:o})});Js.displayName=Xs;function Zs(e,t=globalThis==null?void 0:globalThis.document){const r=Je(e),n=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let c=function(){ao(qs,r,d,{discrete:!0})};const d={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);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Qs(e,t=globalThis==null?void 0:globalThis.document){const r=Je(e),n=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!n.current&&ao(Ks,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Pn(){const e=new CustomEvent(Lr);document.dispatchEvent(e)}function ao(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Us(o,a):o.dispatchEvent(a)}var Cr="focusScope.autoFocusOnMount",Sr="focusScope.autoFocusOnUnmount",Rn={bubbles:!1,cancelable:!0},ei="FocusScope",so=f.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=f.useState(null),d=Je(o),u=Je(a),g=f.useRef(null),l=pe(t,h=>c(h)),v=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(n){let h=function(C){if(v.paused||!i)return;const P=C.target;i.contains(P)?g.current=P:Ke(g.current,{select:!0})},y=function(C){if(v.paused||!i)return;const P=C.relatedTarget;P!==null&&(i.contains(P)||Ke(g.current,{select:!0}))},E=function(C){if(document.activeElement===document.body)for(const R of C)R.removedNodes.length>0&&Ke(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const b=new MutationObserver(E);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),b.disconnect()}}},[n,i,v.paused]),f.useEffect(()=>{if(i){Tn.add(v);const h=document.activeElement;if(!i.contains(h)){const E=new CustomEvent(Cr,Rn);i.addEventListener(Cr,d),i.dispatchEvent(E),E.defaultPrevented||(ti(si(io(i)),{select:!0}),document.activeElement===h&&Ke(i))}return()=>{i.removeEventListener(Cr,d),setTimeout(()=>{const E=new CustomEvent(Sr,Rn);i.addEventListener(Sr,u),i.dispatchEvent(E),E.defaultPrevented||Ke(h??document.body,{select:!0}),i.removeEventListener(Sr,u),Tn.remove(v)},0)}}},[i,d,u,v]);const x=f.useCallback(h=>{if(!r&&!n||v.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,E=document.activeElement;if(y&&E){const b=h.currentTarget,[C,P]=ri(b);C&&P?!h.shiftKey&&E===P?(h.preventDefault(),r&&Ke(C,{select:!0})):h.shiftKey&&E===C&&(h.preventDefault(),r&&Ke(P,{select:!0})):E===b&&h.preventDefault()}},[r,n,v.paused]);return m.jsx(le.div,{tabIndex:-1,...s,ref:l,onKeyDown:x})});so.displayName=ei;function ti(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ke(n,{select:t}),document.activeElement!==r)return}function ri(e){const t=io(e),r=An(t,e),n=An(t.reverse(),e);return[r,n]}function io(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function An(e,t){for(const r of e)if(!ni(r,{upTo:t}))return r}function ni(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 oi(e){return e instanceof HTMLInputElement&&"select"in e}function Ke(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&oi(e)&&t&&e.select()}}var Tn=ai();function ai(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=On(e,t),e.unshift(t)},remove(t){var r;e=On(e,t),(r=e[0])==null||r.resume()}}}function On(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function si(e){return e.filter(t=>t.tagName!=="A")}var ii="Portal",lo=f.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,a]=f.useState(!1);it(()=>a(!0),[]);const s=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?qr.createPortal(m.jsx(le.div,{...n,ref:t}),s):null});lo.displayName=ii;function li(e,t){return f.useReducer((r,n)=>t[r][n]??r,e)}var $t=e=>{const{present:t,children:r}=e,n=ci(t),o=typeof r=="function"?r({present:n.isPresent}):f.Children.only(r),a=pe(n.ref,ui(o));return typeof r=="function"||n.isPresent?f.cloneElement(o,{ref:a}):null};$t.displayName="Presence";function ci(e){const[t,r]=f.useState(),n=f.useRef({}),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,c]=li(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const d=Ut(n.current);a.current=i==="mounted"?d:"none"},[i]),it(()=>{const d=n.current,u=o.current;if(u!==e){const l=a.current,v=Ut(d);e?c("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(u&&l!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),it(()=>{if(t){const d=g=>{const v=Ut(n.current).includes(g.animationName);g.target===t&&v&&Kr.flushSync(()=>c("ANIMATION_END"))},u=g=>{g.target===t&&(a.current=Ut(n.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function Ut(e){return(e==null?void 0:e.animationName)||"none"}function ui(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Pr=0;function di(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Nn()),document.body.insertAdjacentElement("beforeend",e[1]??Nn()),Pr++,()=>{Pr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Pr--}},[])}function Nn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var ke=function(){return ke=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ke.apply(this,arguments)};function co(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function fi(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var er="right-scroll-bar-position",tr="width-before-scroll-bar",pi="with-scroll-bars-hidden",gi="--removed-body-scroll-bar-size";function Rr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function vi(e,t){var r=w.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var hi=typeof window<"u"?f.useLayoutEffect:f.useEffect,Dn=new WeakMap;function mi(e,t){var r=vi(null,function(n){return e.forEach(function(o){return Rr(o,n)})});return hi(function(){var n=Dn.get(r);if(n){var o=new Set(n),a=new Set(e),s=r.current;o.forEach(function(i){a.has(i)||Rr(i,null)}),a.forEach(function(i){o.has(i)||Rr(i,s)})}Dn.set(r,e)},[e]),r}function bi(e){return e}function yi(e,t){t===void 0&&(t=bi);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(i){return a(i)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(a),s=r}var c=function(){var u=s;s=[],u.forEach(a)},d=function(){return Promise.resolve().then(c)};d(),r={push:function(u){s.push(u),d()},filter:function(u){return s=s.filter(u),r}}}};return o}function xi(e){e===void 0&&(e={});var t=yi(null);return t.options=ke({async:!0,ssr:!1},e),t}var uo=function(e){var t=e.sideCar,r=co(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return f.createElement(n,ke({},r))};uo.isSideCarExport=!0;function wi(e,t){return e.useMedium(t),uo}var fo=xi(),Ar=function(){},ur=f.forwardRef(function(e,t){var r=f.useRef(null),n=f.useState({onScrollCapture:Ar,onWheelCapture:Ar,onTouchMoveCapture:Ar}),o=n[0],a=n[1],s=e.forwardProps,i=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,g=e.shards,l=e.sideCar,v=e.noIsolation,x=e.inert,h=e.allowPinchZoom,y=e.as,E=y===void 0?"div":y,b=e.gapMode,C=co(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=l,R=mi([r,t]),D=ke(ke({},C),o);return f.createElement(f.Fragment,null,u&&f.createElement(P,{sideCar:fo,removeScrollBar:d,shards:g,noIsolation:v,inert:x,setCallbacks:a,allowPinchZoom:!!h,lockRef:r,gapMode:b}),s?f.cloneElement(f.Children.only(i),ke(ke({},D),{ref:R})):f.createElement(E,ke({},D,{className:c,ref:R}),i))});ur.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ur.classNames={fullWidth:tr,zeroRight:er};var Ei=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ci(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ei();return t&&e.setAttribute("nonce",t),e}function Si(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Pi(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ri=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Ci())&&(Si(t,r),Pi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ai=function(){var e=Ri();return function(t,r){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},po=function(){var e=Ai(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Ti={left:0,top:0,right:0,gap:0},Tr=function(e){return parseInt(e||"",10)||0},Oi=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Tr(r),Tr(n),Tr(o)]},Ni=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ti;var t=Oi(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Di=po(),yt="data-scroll-locked",ki=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
68
68
  .`.concat(pi,` {
69
69
  overflow: hidden `).concat(n,`;
70
70
  padding-right: `).concat(i,"px ").concat(n,`;
@@ -101,23 +101,23 @@ Check the top-level render call using <`+T+">.")}return S}}function he(p,S){{if(
101
101
  body[`).concat(yt,`] {
102
102
  `).concat(gi,": ").concat(i,`px;
103
103
  }
104
- `)},kn=function(){var e=parseInt(document.body.getAttribute(yt)||"0",10);return isFinite(e)?e:0},_i=function(){f.useEffect(function(){return document.body.setAttribute(yt,(kn()+1).toString()),function(){var e=kn()-1;e<=0?document.body.removeAttribute(yt):document.body.setAttribute(yt,e.toString())}},[])},ji=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;_i();var a=f.useMemo(function(){return Ni(o)},[o]);return f.createElement(Di,{styles:ki(a,!t,o,r?"":"!important")})},Ir=!1;if(typeof window<"u")try{var Yt=Object.defineProperty({},"passive",{get:function(){return Ir=!0,!0}});window.addEventListener("test",Yt,Yt),window.removeEventListener("test",Yt,Yt)}catch{Ir=!1}var ht=Ir?{passive:!1}:!1,Mi=function(e){return e.tagName==="TEXTAREA"},go=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Mi(e)&&r[t]==="visible")},Li=function(e){return go(e,"overflowY")},Ii=function(e){return go(e,"overflowX")},_n=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=vo(e,n);if(o){var a=ho(e,n),s=a[1],i=a[2];if(s>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},$i=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Fi=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},vo=function(e,t){return e==="v"?Li(t):Ii(t)},ho=function(e,t){return e==="v"?$i(t):Fi(t)},Bi=function(e,t){return e==="h"&&t==="rtl"?-1:1},Wi=function(e,t,r,n,o){var a=Bi(e,window.getComputedStyle(t).direction),s=a*n,i=r.target,c=t.contains(i),d=!1,u=s>0,g=0,l=0;do{var v=ho(e,i),x=v[0],h=v[1],y=v[2],E=h-y-a*x;(x||E)&&vo(e,i)&&(g+=E,l+=x),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(u&&(Math.abs(g)<1||!o)||!u&&(Math.abs(l)<1||!o))&&(d=!0),d},Gt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jn=function(e){return[e.deltaX,e.deltaY]},Mn=function(e){return e&&"current"in e?e.current:e},zi=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Vi=function(e){return`
104
+ `)},kn=function(){var e=parseInt(document.body.getAttribute(yt)||"0",10);return isFinite(e)?e:0},_i=function(){f.useEffect(function(){return document.body.setAttribute(yt,(kn()+1).toString()),function(){var e=kn()-1;e<=0?document.body.removeAttribute(yt):document.body.setAttribute(yt,e.toString())}},[])},ji=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;_i();var a=f.useMemo(function(){return Ni(o)},[o]);return f.createElement(Di,{styles:ki(a,!t,o,r?"":"!important")})},Ir=!1;if(typeof window<"u")try{var Yt=Object.defineProperty({},"passive",{get:function(){return Ir=!0,!0}});window.addEventListener("test",Yt,Yt),window.removeEventListener("test",Yt,Yt)}catch{Ir=!1}var ht=Ir?{passive:!1}:!1,Mi=function(e){return e.tagName==="TEXTAREA"},go=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Mi(e)&&r[t]==="visible")},Li=function(e){return go(e,"overflowY")},Ii=function(e){return go(e,"overflowX")},_n=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=vo(e,n);if(o){var a=ho(e,n),s=a[1],i=a[2];if(s>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},$i=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Fi=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},vo=function(e,t){return e==="v"?Li(t):Ii(t)},ho=function(e,t){return e==="v"?$i(t):Fi(t)},Bi=function(e,t){return e==="h"&&t==="rtl"?-1:1},Wi=function(e,t,r,n,o){var a=Bi(e,window.getComputedStyle(t).direction),s=a*n,i=r.target,c=t.contains(i),d=!1,u=s>0,g=0,l=0;do{var v=ho(e,i),x=v[0],h=v[1],y=v[2],E=h-y-a*x;(x||E)&&vo(e,i)&&(g+=E,l+=x),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(u&&(Math.abs(g)<1||!o)||!u&&(Math.abs(l)<1||!o))&&(d=!0),d},Gt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jn=function(e){return[e.deltaX,e.deltaY]},Mn=function(e){return e&&"current"in e?e.current:e},Vi=function(e,t){return e[0]===t[0]&&e[1]===t[1]},zi=function(e){return`
105
105
  .block-interactivity-`.concat(e,` {pointer-events: none;}
106
106
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
107
- `)},Hi=0,mt=[];function Ui(e){var t=f.useRef([]),r=f.useRef([0,0]),n=f.useRef(),o=f.useState(Hi++)[0],a=f.useState(po)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=fi([e.lockRef.current],(e.shards||[]).map(Mn),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(h,y){if("touches"in h&&h.touches.length===2)return!s.current.allowPinchZoom;var E=Gt(h),b=r.current,C="deltaX"in h?h.deltaX:b[0]-E[0],P="deltaY"in h?h.deltaY:b[1]-E[1],R,D=h.target,O=Math.abs(C)>Math.abs(P)?"h":"v";if("touches"in h&&O==="h"&&D.type==="range")return!1;var N=_n(O,D);if(!N)return!0;if(N?R=O:(R=O==="v"?"h":"v",N=_n(O,D)),!N)return!1;if(!n.current&&"changedTouches"in h&&(C||P)&&(n.current=R),!R)return!0;var z=n.current||R;return Wi(z,y,h,z==="h"?C:P,!0)},[]),c=f.useCallback(function(h){var y=h;if(!(!mt.length||mt[mt.length-1]!==a)){var E="deltaY"in y?jn(y):Gt(y),b=t.current.filter(function(R){return R.name===y.type&&(R.target===y.target||y.target===R.shadowParent)&&zi(R.delta,E)})[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}if(!b){var C=(s.current.shards||[]).map(Mn).filter(Boolean).filter(function(R){return R.contains(y.target)}),P=C.length>0?i(y,C[0]):!s.current.noIsolation;P&&y.cancelable&&y.preventDefault()}}},[]),d=f.useCallback(function(h,y,E,b){var C={name:h,delta:y,target:E,should:b,shadowParent:Yi(E)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(P){return P!==C})},1)},[]),u=f.useCallback(function(h){r.current=Gt(h),n.current=void 0},[]),g=f.useCallback(function(h){d(h.type,jn(h),h.target,i(h,e.lockRef.current))},[]),l=f.useCallback(function(h){d(h.type,Gt(h),h.target,i(h,e.lockRef.current))},[]);f.useEffect(function(){return mt.push(a),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:l}),document.addEventListener("wheel",c,ht),document.addEventListener("touchmove",c,ht),document.addEventListener("touchstart",u,ht),function(){mt=mt.filter(function(h){return h!==a}),document.removeEventListener("wheel",c,ht),document.removeEventListener("touchmove",c,ht),document.removeEventListener("touchstart",u,ht)}},[]);var v=e.removeScrollBar,x=e.inert;return f.createElement(f.Fragment,null,x?f.createElement(a,{styles:Vi(o)}):null,v?f.createElement(ji,{gapMode:e.gapMode}):null)}function Yi(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Gi=wi(fo,Ui);var mo=f.forwardRef(function(e,t){return f.createElement(ur,ke({},e,{ref:t,sideCar:Gi}))});mo.classNames=ur.classNames;var qi=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bt=new WeakMap,qt=new WeakMap,Kt={},Or=0,bo=function(e){return e&&(e.host||bo(e.parentNode))},Ki=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=bo(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Xi=function(e,t,r,n){var o=Ki(t,Array.isArray(e)?e:[e]);Kt[r]||(Kt[r]=new WeakMap);var a=Kt[r],s=[],i=new Set,c=new Set(o),d=function(g){!g||i.has(g)||(i.add(g),d(g.parentNode))};o.forEach(d);var u=function(g){!g||c.has(g)||Array.prototype.forEach.call(g.children,function(l){if(i.has(l))u(l);else try{var v=l.getAttribute(n),x=v!==null&&v!=="false",h=(bt.get(l)||0)+1,y=(a.get(l)||0)+1;bt.set(l,h),a.set(l,y),s.push(l),h===1&&x&&qt.set(l,!0),y===1&&l.setAttribute(r,"true"),x||l.setAttribute(n,"true")}catch(E){console.error("aria-hidden: cannot operate on ",l,E)}})};return u(t),i.clear(),Or++,function(){s.forEach(function(g){var l=bt.get(g)-1,v=a.get(g)-1;bt.set(g,l),a.set(g,v),l||(qt.has(g)||g.removeAttribute(n),qt.delete(g)),v||g.removeAttribute(r)}),Or--,Or||(bt=new WeakMap,bt=new WeakMap,qt=new WeakMap,Kt={})}},Ji=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=qi(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Xi(n,o,r,"aria-hidden")):function(){return null}},Qr="Dialog",[yo,xo]=St(Qr),[Zi,Oe]=yo(Qr),wo=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=f.useRef(null),c=f.useRef(null),[d=!1,u]=Xr({prop:n,defaultProp:o,onChange:a});return m.jsx(Zi,{scope:t,triggerRef:i,contentRef:c,contentId:Qt(),titleId:Qt(),descriptionId:Qt(),open:d,onOpenChange:u,onOpenToggle:f.useCallback(()=>u(g=>!g),[u]),modal:s,children:r})};wo.displayName=Qr;var Eo="DialogTrigger",Co=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Oe(Eo,r),a=pe(t,o.triggerRef);return m.jsx(le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":rn(o.open),...n,ref:a,onClick:ue(e.onClick,o.onOpenToggle)})});Co.displayName=Eo;var en="DialogPortal",[Qi,So]=yo(en,{forceMount:void 0}),Po=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=Oe(en,t);return m.jsx(Qi,{scope:t,forceMount:r,children:f.Children.map(n,s=>m.jsx($t,{present:r||a.open,children:m.jsx(lo,{asChild:!0,container:o,children:s})}))})};Po.displayName=en;var nr="DialogOverlay",Ro=f.forwardRef((e,t)=>{const r=So(nr,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Oe(nr,e.__scopeDialog);return a.modal?m.jsx($t,{present:n||a.open,children:m.jsx(el,{...o,ref:t})}):null});Ro.displayName=nr;var el=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Oe(nr,r);return m.jsx(mo,{as:It,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(le.div,{"data-state":rn(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),lt="DialogContent",Ao=f.forwardRef((e,t)=>{const r=So(lt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Oe(lt,e.__scopeDialog);return m.jsx($t,{present:n||a.open,children:a.modal?m.jsx(tl,{...o,ref:t}):m.jsx(rl,{...o,ref:t})})});Ao.displayName=lt;var tl=f.forwardRef((e,t)=>{const r=Oe(lt,e.__scopeDialog),n=f.useRef(null),o=pe(t,r.contentRef,n);return f.useEffect(()=>{const a=n.current;if(a)return Ji(a)},[]),m.jsx(To,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:ue(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:ue(e.onFocusOutside,a=>a.preventDefault())})}),rl=f.forwardRef((e,t)=>{const r=Oe(lt,e.__scopeDialog),n=f.useRef(!1),o=f.useRef(!1);return m.jsx(To,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=r.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),To=f.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=Oe(lt,r),c=f.useRef(null),d=pe(t,c);return di(),m.jsxs(m.Fragment,{children:[m.jsx(so,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(Zr,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":rn(i.open),...s,ref:d,onDismiss:()=>i.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(ol,{titleId:i.titleId}),m.jsx(sl,{contentRef:c,descriptionId:i.descriptionId})]})]})}),tn="DialogTitle",Oo=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Oe(tn,r);return m.jsx(le.h2,{id:o.titleId,...n,ref:t})});Oo.displayName=tn;var No="DialogDescription",Do=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Oe(No,r);return m.jsx(le.p,{id:o.descriptionId,...n,ref:t})});Do.displayName=No;var ko="DialogClose",_o=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Oe(ko,r);return m.jsx(le.button,{type:"button",...n,ref:t,onClick:ue(e.onClick,()=>o.onOpenChange(!1))})});_o.displayName=ko;function rn(e){return e?"open":"closed"}var jo="DialogTitleWarning",[nl,Mo]=Ms(jo,{contentName:lt,titleName:tn,docsSlug:"dialog"}),ol=({titleId:e})=>{const t=Mo(jo),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
107
+ `)},Hi=0,mt=[];function Ui(e){var t=f.useRef([]),r=f.useRef([0,0]),n=f.useRef(),o=f.useState(Hi++)[0],a=f.useState(po)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=fi([e.lockRef.current],(e.shards||[]).map(Mn),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(h,y){if("touches"in h&&h.touches.length===2)return!s.current.allowPinchZoom;var E=Gt(h),b=r.current,C="deltaX"in h?h.deltaX:b[0]-E[0],P="deltaY"in h?h.deltaY:b[1]-E[1],R,D=h.target,O=Math.abs(C)>Math.abs(P)?"h":"v";if("touches"in h&&O==="h"&&D.type==="range")return!1;var N=_n(O,D);if(!N)return!0;if(N?R=O:(R=O==="v"?"h":"v",N=_n(O,D)),!N)return!1;if(!n.current&&"changedTouches"in h&&(C||P)&&(n.current=R),!R)return!0;var V=n.current||R;return Wi(V,y,h,V==="h"?C:P,!0)},[]),c=f.useCallback(function(h){var y=h;if(!(!mt.length||mt[mt.length-1]!==a)){var E="deltaY"in y?jn(y):Gt(y),b=t.current.filter(function(R){return R.name===y.type&&(R.target===y.target||y.target===R.shadowParent)&&Vi(R.delta,E)})[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}if(!b){var C=(s.current.shards||[]).map(Mn).filter(Boolean).filter(function(R){return R.contains(y.target)}),P=C.length>0?i(y,C[0]):!s.current.noIsolation;P&&y.cancelable&&y.preventDefault()}}},[]),d=f.useCallback(function(h,y,E,b){var C={name:h,delta:y,target:E,should:b,shadowParent:Yi(E)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(P){return P!==C})},1)},[]),u=f.useCallback(function(h){r.current=Gt(h),n.current=void 0},[]),g=f.useCallback(function(h){d(h.type,jn(h),h.target,i(h,e.lockRef.current))},[]),l=f.useCallback(function(h){d(h.type,Gt(h),h.target,i(h,e.lockRef.current))},[]);f.useEffect(function(){return mt.push(a),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:l}),document.addEventListener("wheel",c,ht),document.addEventListener("touchmove",c,ht),document.addEventListener("touchstart",u,ht),function(){mt=mt.filter(function(h){return h!==a}),document.removeEventListener("wheel",c,ht),document.removeEventListener("touchmove",c,ht),document.removeEventListener("touchstart",u,ht)}},[]);var v=e.removeScrollBar,x=e.inert;return f.createElement(f.Fragment,null,x?f.createElement(a,{styles:zi(o)}):null,v?f.createElement(ji,{gapMode:e.gapMode}):null)}function Yi(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Gi=wi(fo,Ui);var mo=f.forwardRef(function(e,t){return f.createElement(ur,ke({},e,{ref:t,sideCar:Gi}))});mo.classNames=ur.classNames;var qi=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bt=new WeakMap,qt=new WeakMap,Kt={},Or=0,bo=function(e){return e&&(e.host||bo(e.parentNode))},Ki=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=bo(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Xi=function(e,t,r,n){var o=Ki(t,Array.isArray(e)?e:[e]);Kt[r]||(Kt[r]=new WeakMap);var a=Kt[r],s=[],i=new Set,c=new Set(o),d=function(g){!g||i.has(g)||(i.add(g),d(g.parentNode))};o.forEach(d);var u=function(g){!g||c.has(g)||Array.prototype.forEach.call(g.children,function(l){if(i.has(l))u(l);else try{var v=l.getAttribute(n),x=v!==null&&v!=="false",h=(bt.get(l)||0)+1,y=(a.get(l)||0)+1;bt.set(l,h),a.set(l,y),s.push(l),h===1&&x&&qt.set(l,!0),y===1&&l.setAttribute(r,"true"),x||l.setAttribute(n,"true")}catch(E){console.error("aria-hidden: cannot operate on ",l,E)}})};return u(t),i.clear(),Or++,function(){s.forEach(function(g){var l=bt.get(g)-1,v=a.get(g)-1;bt.set(g,l),a.set(g,v),l||(qt.has(g)||g.removeAttribute(n),qt.delete(g)),v||g.removeAttribute(r)}),Or--,Or||(bt=new WeakMap,bt=new WeakMap,qt=new WeakMap,Kt={})}},Ji=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=qi(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Xi(n,o,r,"aria-hidden")):function(){return null}},Qr="Dialog",[yo,xo]=St(Qr),[Zi,Oe]=yo(Qr),wo=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=f.useRef(null),c=f.useRef(null),[d=!1,u]=Xr({prop:n,defaultProp:o,onChange:a});return m.jsx(Zi,{scope:t,triggerRef:i,contentRef:c,contentId:Qt(),titleId:Qt(),descriptionId:Qt(),open:d,onOpenChange:u,onOpenToggle:f.useCallback(()=>u(g=>!g),[u]),modal:s,children:r})};wo.displayName=Qr;var Eo="DialogTrigger",Co=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Oe(Eo,r),a=pe(t,o.triggerRef);return m.jsx(le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":rn(o.open),...n,ref:a,onClick:ue(e.onClick,o.onOpenToggle)})});Co.displayName=Eo;var en="DialogPortal",[Qi,So]=yo(en,{forceMount:void 0}),Po=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=Oe(en,t);return m.jsx(Qi,{scope:t,forceMount:r,children:f.Children.map(n,s=>m.jsx($t,{present:r||a.open,children:m.jsx(lo,{asChild:!0,container:o,children:s})}))})};Po.displayName=en;var nr="DialogOverlay",Ro=f.forwardRef((e,t)=>{const r=So(nr,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Oe(nr,e.__scopeDialog);return a.modal?m.jsx($t,{present:n||a.open,children:m.jsx(el,{...o,ref:t})}):null});Ro.displayName=nr;var el=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Oe(nr,r);return m.jsx(mo,{as:It,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(le.div,{"data-state":rn(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),lt="DialogContent",Ao=f.forwardRef((e,t)=>{const r=So(lt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Oe(lt,e.__scopeDialog);return m.jsx($t,{present:n||a.open,children:a.modal?m.jsx(tl,{...o,ref:t}):m.jsx(rl,{...o,ref:t})})});Ao.displayName=lt;var tl=f.forwardRef((e,t)=>{const r=Oe(lt,e.__scopeDialog),n=f.useRef(null),o=pe(t,r.contentRef,n);return f.useEffect(()=>{const a=n.current;if(a)return Ji(a)},[]),m.jsx(To,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:ue(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:ue(e.onFocusOutside,a=>a.preventDefault())})}),rl=f.forwardRef((e,t)=>{const r=Oe(lt,e.__scopeDialog),n=f.useRef(!1),o=f.useRef(!1);return m.jsx(To,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=r.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),To=f.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=Oe(lt,r),c=f.useRef(null),d=pe(t,c);return di(),m.jsxs(m.Fragment,{children:[m.jsx(so,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(Zr,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":rn(i.open),...s,ref:d,onDismiss:()=>i.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(ol,{titleId:i.titleId}),m.jsx(sl,{contentRef:c,descriptionId:i.descriptionId})]})]})}),tn="DialogTitle",Oo=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Oe(tn,r);return m.jsx(le.h2,{id:o.titleId,...n,ref:t})});Oo.displayName=tn;var No="DialogDescription",Do=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Oe(No,r);return m.jsx(le.p,{id:o.descriptionId,...n,ref:t})});Do.displayName=No;var ko="DialogClose",_o=f.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Oe(ko,r);return m.jsx(le.button,{type:"button",...n,ref:t,onClick:ue(e.onClick,()=>o.onOpenChange(!1))})});_o.displayName=ko;function rn(e){return e?"open":"closed"}var jo="DialogTitleWarning",[nl,Mo]=Ms(jo,{contentName:lt,titleName:tn,docsSlug:"dialog"}),ol=({titleId:e})=>{const t=Mo(jo),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
108
108
 
109
109
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
110
110
 
111
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},al="DialogDescriptionWarning",sl=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mo(al).contentName}}.`;return f.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},il=wo,ll=Co,cl=Po,ul=Ro,dl=Ao,fl=Oo,pl=Do,Lo=_o,Io="AlertDialog",[gl,ef]=St(Io,[xo]),Ve=xo(),$o=e=>{const{__scopeAlertDialog:t,...r}=e,n=Ve(t);return m.jsx(il,{...n,...r,modal:!0})};$o.displayName=Io;var vl="AlertDialogTrigger",Fo=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Ve(r);return m.jsx(ll,{...o,...n,ref:t})});Fo.displayName=vl;var hl="AlertDialogPortal",Bo=e=>{const{__scopeAlertDialog:t,...r}=e,n=Ve(t);return m.jsx(cl,{...n,...r})};Bo.displayName=hl;var ml="AlertDialogOverlay",Wo=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Ve(r);return m.jsx(ul,{...o,...n,ref:t})});Wo.displayName=ml;var xt="AlertDialogContent",[bl,yl]=gl(xt),zo=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...o}=e,a=Ve(r),s=f.useRef(null),i=pe(t,s),c=f.useRef(null);return m.jsx(nl,{contentName:xt,titleName:Vo,docsSlug:"alert-dialog",children:m.jsx(bl,{scope:r,cancelRef:c,children:m.jsxs(dl,{role:"alertdialog",...a,...o,ref:i,onOpenAutoFocus:ue(o.onOpenAutoFocus,d=>{var u;d.preventDefault(),(u=c.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[m.jsx(Jr,{children:n}),m.jsx(wl,{contentRef:s})]})})})});zo.displayName=xt;var Vo="AlertDialogTitle",Ho=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Ve(r);return m.jsx(fl,{...o,...n,ref:t})});Ho.displayName=Vo;var Uo="AlertDialogDescription",Yo=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Ve(r);return m.jsx(pl,{...o,...n,ref:t})});Yo.displayName=Uo;var xl="AlertDialogAction",Go=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Ve(r);return m.jsx(Lo,{...o,...n,ref:t})});Go.displayName=xl;var qo="AlertDialogCancel",Ko=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=yl(qo,r),a=Ve(r),s=pe(t,o);return m.jsx(Lo,{...a,...n,ref:s})});Ko.displayName=qo;var wl=({contentRef:e})=>{const t=`\`${xt}\` requires a description for the component to be accessible for screen reader users.
111
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},al="DialogDescriptionWarning",sl=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mo(al).contentName}}.`;return f.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},il=wo,ll=Co,cl=Po,ul=Ro,dl=Ao,fl=Oo,pl=Do,Lo=_o,Io="AlertDialog",[gl,rf]=St(Io,[xo]),ze=xo(),$o=e=>{const{__scopeAlertDialog:t,...r}=e,n=ze(t);return m.jsx(il,{...n,...r,modal:!0})};$o.displayName=Io;var vl="AlertDialogTrigger",Fo=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=ze(r);return m.jsx(ll,{...o,...n,ref:t})});Fo.displayName=vl;var hl="AlertDialogPortal",Bo=e=>{const{__scopeAlertDialog:t,...r}=e,n=ze(t);return m.jsx(cl,{...n,...r})};Bo.displayName=hl;var ml="AlertDialogOverlay",Wo=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=ze(r);return m.jsx(ul,{...o,...n,ref:t})});Wo.displayName=ml;var xt="AlertDialogContent",[bl,yl]=gl(xt),Vo=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...o}=e,a=ze(r),s=f.useRef(null),i=pe(t,s),c=f.useRef(null);return m.jsx(nl,{contentName:xt,titleName:zo,docsSlug:"alert-dialog",children:m.jsx(bl,{scope:r,cancelRef:c,children:m.jsxs(dl,{role:"alertdialog",...a,...o,ref:i,onOpenAutoFocus:ue(o.onOpenAutoFocus,d=>{var u;d.preventDefault(),(u=c.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[m.jsx(Jr,{children:n}),m.jsx(wl,{contentRef:s})]})})})});Vo.displayName=xt;var zo="AlertDialogTitle",Ho=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=ze(r);return m.jsx(fl,{...o,...n,ref:t})});Ho.displayName=zo;var Uo="AlertDialogDescription",Yo=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=ze(r);return m.jsx(pl,{...o,...n,ref:t})});Yo.displayName=Uo;var xl="AlertDialogAction",Go=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=ze(r);return m.jsx(Lo,{...o,...n,ref:t})});Go.displayName=xl;var qo="AlertDialogCancel",Ko=f.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=yl(qo,r),a=ze(r),s=pe(t,o);return m.jsx(Lo,{...a,...n,ref:s})});Ko.displayName=qo;var wl=({contentRef:e})=>{const t=`\`${xt}\` requires a description for the component to be accessible for screen reader users.
112
112
 
113
113
  You can add a description to the \`${xt}\` by passing a \`${Uo}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
114
114
 
115
115
  Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${xt}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
116
116
 
117
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return f.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},El=$o,Cl=Fo,Sl=Bo,Xo=Wo,Jo=zo,Zo=Go,Qo=Ko,ea=Ho,ta=Yo;function ra(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=ra(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Pl(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=ra(e))&&(n&&(n+=" "),n+=t);return n}const nn="-";function Rl(e){const t=Tl(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;function o(s){const i=s.split(nn);return i[0]===""&&i.length!==1&&i.shift(),na(i,t)||Al(s)}function a(s,i){const c=r[s]||[];return i&&n[s]?[...c,...n[s]]:c}return{getClassGroupId:o,getConflictingClassGroupIds:a}}function na(e,t){var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?na(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(nn);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId}const Ln=/^\[(.+)\]$/;function Al(e){if(Ln.test(e)){const t=Ln.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function Tl(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Nl(Object.entries(e.classGroups),r).forEach(([a,s])=>{$r(s,n,a,t)}),n}function $r(e,t,r,n){e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:In(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(Ol(o)){$r(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,s])=>{$r(s,In(t,a),r,n)})})}function In(e,t){let r=e;return t.split(nn).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function Ol(e){return e.isThemeGetter}function Nl(e,t){return t?e.map(([r,n])=>{const o=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[r,o]}):e}function Dl(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function o(a,s){r.set(a,s),t++,t>e&&(t=0,n=r,r=new Map)}return{get(a){let s=r.get(a);if(s!==void 0)return s;if((s=n.get(a))!==void 0)return o(a,s),s},set(a,s){r.has(a)?r.set(a,s):o(a,s)}}}const oa="!";function kl(e){const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],a=t.length;function s(i){const c=[];let d=0,u=0,g;for(let y=0;y<i.length;y++){let E=i[y];if(d===0){if(E===o&&(n||i.slice(y,y+a)===t)){c.push(i.slice(u,y)),u=y+a;continue}if(E==="/"){g=y;continue}}E==="["?d++:E==="]"&&d--}const l=c.length===0?i:i.substring(u),v=l.startsWith(oa),x=v?l.substring(1):l,h=g&&g>u?g-u:void 0;return{modifiers:c,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:h}}return r?function(c){return r({className:c,parseClassName:s})}:s}function _l(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t}function jl(e){return{cache:Dl(e.cacheSize),parseClassName:kl(e),...Rl(e)}}const Ml=/\s+/;function Ll(e,t){const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,a=new Set;return e.trim().split(Ml).map(s=>{const{modifiers:i,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:u}=r(s);let g=!!u,l=n(g?d.substring(0,u):d);if(!l){if(!g)return{isTailwindClass:!1,originalClassName:s};if(l=n(d),!l)return{isTailwindClass:!1,originalClassName:s};g=!1}const v=_l(i).join(":");return{isTailwindClass:!0,modifierId:c?v+oa:v,classGroupId:l,originalClassName:s,hasPostfixModifier:g}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:i,classGroupId:c,hasPostfixModifier:d}=s,u=i+c;return a.has(u)?!1:(a.add(u),o(c,d).forEach(g=>a.add(i+g)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function Il(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=aa(t))&&(n&&(n+=" "),n+=r);return n}function aa(e){if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=aa(e[n]))&&(r&&(r+=" "),r+=t);return r}function $l(e,...t){let r,n,o,a=s;function s(c){const d=t.reduce((u,g)=>g(u),e());return r=jl(d),n=r.cache.get,o=r.cache.set,a=i,i(c)}function i(c){const d=n(c);if(d)return d;const u=Ll(c,r);return o(c,u),u}return function(){return a(Il.apply(null,arguments))}}function ne(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const sa=/^\[(?:([a-z-]+):)?(.+)\]$/i,Fl=/^\d+\/\d+$/,Bl=new Set(["px","full","screen"]),Wl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zl=/\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$/,Vl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Hl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ul=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Be(e){return st(e)||Bl.has(e)||Fl.test(e)}function Ge(e){return Pt(e,"length",Ql)}function st(e){return!!e&&!Number.isNaN(Number(e))}function Xt(e){return Pt(e,"number",st)}function kt(e){return!!e&&Number.isInteger(Number(e))}function Yl(e){return e.endsWith("%")&&st(e.slice(0,-1))}function $(e){return sa.test(e)}function qe(e){return Wl.test(e)}const Gl=new Set(["length","size","percentage"]);function ql(e){return Pt(e,Gl,ia)}function Kl(e){return Pt(e,"position",ia)}const Xl=new Set(["image","url"]);function Jl(e){return Pt(e,Xl,tc)}function Zl(e){return Pt(e,"",ec)}function _t(){return!0}function Pt(e,t,r){const n=sa.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function Ql(e){return zl.test(e)&&!Vl.test(e)}function ia(){return!1}function ec(e){return Hl.test(e)}function tc(e){return Ul.test(e)}function rc(){const e=ne("colors"),t=ne("spacing"),r=ne("blur"),n=ne("brightness"),o=ne("borderColor"),a=ne("borderRadius"),s=ne("borderSpacing"),i=ne("borderWidth"),c=ne("contrast"),d=ne("grayscale"),u=ne("hueRotate"),g=ne("invert"),l=ne("gap"),v=ne("gradientColorStops"),x=ne("gradientColorStopPositions"),h=ne("inset"),y=ne("margin"),E=ne("opacity"),b=ne("padding"),C=ne("saturate"),P=ne("scale"),R=ne("sepia"),D=ne("skew"),O=ne("space"),N=ne("translate"),z=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",$,t],_=()=>[$,t],Y=()=>["",Be,Ge],M=()=>["auto",st,$],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",$],oe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[st,Xt],W=()=>[st,$];return{cacheSize:500,separator:":",theme:{colors:[_t],spacing:[Be,Ge],blur:["none","",qe,$],brightness:I(),borderColor:[e],borderRadius:["none","","full",qe,$],borderSpacing:_(),borderWidth:Y(),contrast:I(),grayscale:B(),hueRotate:W(),invert:B(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[Yl,Ge],inset:U(),margin:U(),opacity:I(),padding:_(),saturate:I(),scale:I(),sepia:B(),skew:W(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",$]}],container:["container"],columns:[{columns:[qe]}],"break-after":[{"break-after":oe()}],"break-before":[{"break-before":oe()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...X(),$]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",kt,$]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",kt,$]}],"grid-cols":[{"grid-cols":[_t]}],"col-start-end":[{col:["auto",{span:["full",kt,$]},$]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[_t]}],"row-start-end":[{row:["auto",{span:[kt,$]},$]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$]}],gap:[{gap:[l]}],"gap-x":[{"gap-x":[l]}],"gap-y":[{"gap-y":[l]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$,t]}],"min-w":[{"min-w":[$,t,"min","max","fit"]}],"max-w":[{"max-w":[$,t,"none","full","min","max","fit","prose",{screen:[qe]},qe]}],h:[{h:[$,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$,t,"auto","min","max","fit"]}],"font-size":[{text:["base",qe,Ge]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xt]}],"font-family":[{font:[_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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$]}],"line-clamp":[{"line-clamp":["none",st,Xt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Be,$]}],"list-image":[{"list-image":["none",$]}],"list-style-type":[{list:["none","disc","decimal",$]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Be,Ge]}],"underline-offset":[{"underline-offset":["auto",Be,$]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),Kl]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ql]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Jl]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[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:["",...F()]}],"outline-offset":[{"outline-offset":[Be,$]}],"outline-w":[{outline:[Be,Ge]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[Be,Ge]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",qe,Zl]}],"shadow-color":[{shadow:[_t]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",qe,$]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[g]}],saturate:[{saturate:[C]}],sepia:[{sepia:[R]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[R]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",$]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",$]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[kt,$]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",$]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Be,Ge,Xt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const nc=$l(rc);function fe(...e){return nc(Pl(e))}function la(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=la(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function oc(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=la(e))&&(n&&(n+=" "),n+=t);return n}const $n=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Fn=oc,ca=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Fn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const u=r==null?void 0:r[d],g=a==null?void 0:a[d];if(u===null)return null;const l=$n(u)||$n(g);return o[d][l]}),i=r&&Object.entries(r).reduce((d,u)=>{let[g,l]=u;return l===void 0||(d[g]=l),d},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,u)=>{let{class:g,className:l,...v}=u;return Object.entries(v).every(x=>{let[h,y]=x;return Array.isArray(y)?y.includes({...a,...i}[h]):{...a,...i}[h]===y})?[...d,g,l]:d},[]);return Fn(e,s,c,r==null?void 0:r.class,r==null?void 0:r.className)},on=ca("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-secondary active:bg-primary-foreground active:text-primary active:border-primary focus:border-2",secondary:"bg-primary-foreground text-primary border-2 border-primary hover:bg-primary hover:text-primary-foreground active:bg-secondary active:text-secondary-foreground focus:border-2",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border-primary border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 rounded-md 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"}}),ac=f.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const s=n?It:"button";return m.jsx(s,{className:fe(on({variant:t,size:r,className:e})),ref:a,...o})});ac.displayName="Button";const sc=El,ic=Cl,lc=Sl,ua=f.forwardRef(({className:e,...t},r)=>m.jsx(Xo,{className:fe("ve-fixed ve-inset-0 ve-z-50 ve-bg-black/80 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0",e),...t,ref:r}));ua.displayName=Xo.displayName;const da=f.forwardRef(({className:e,...t},r)=>m.jsxs(lc,{children:[m.jsx(ua,{}),m.jsx(Jo,{ref:r,className:fe("ve-fixed ve-left-[50%] ve-top-[50%] ve-z-50 ve-grid ve-w-full ve-max-w-lg ve-translate-x-[-50%] ve-translate-y-[-50%] ve-gap-4 ve-border ve-bg-background ve-p-6 ve-shadow-lg ve-duration-200 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0 data-[state=closed]:ve-zoom-out-95 data-[state=open]:ve-zoom-in-95 data-[state=closed]:ve-slide-out-to-left-1/2 data-[state=closed]:ve-slide-out-to-top-[48%] data-[state=open]:ve-slide-in-from-left-1/2 data-[state=open]:ve-slide-in-from-top-[48%] sm:ve-rounded-lg",e),...t})]}));da.displayName=Jo.displayName;const fa=({className:e,...t})=>m.jsx("div",{className:fe("ve-flex ve-flex-col ve-space-y-2 ve-text-center sm:ve-text-left",e),...t});fa.displayName="AlertDialogHeader";const pa=({className:e,...t})=>m.jsx("div",{className:fe("ve-flex ve-flex-col-reverse sm:ve-flex-row sm:ve-justify-end sm:ve-space-x-2",e),...t});pa.displayName="AlertDialogFooter";const ga=f.forwardRef(({className:e,...t},r)=>m.jsx(ea,{ref:r,className:fe("ve-text-lg ve-font-semibold",e),...t}));ga.displayName=ea.displayName;const va=f.forwardRef(({className:e,...t},r)=>m.jsx(ta,{ref:r,className:fe("ve-text-sm ve-text-muted-foreground",e),...t}));va.displayName=ta.displayName;const cc=f.forwardRef(({className:e,...t},r)=>m.jsx(Zo,{ref:r,className:fe(on(),e),...t}));cc.displayName=Zo.displayName;const ha=f.forwardRef(({className:e,...t},r)=>m.jsx(Qo,{ref:r,className:fe(on({variant:"outline"}),"ve-mt-2 sm:ve-mt-0",e),...t}));ha.displayName=Qo.displayName;const uc=ca("ve-inline-flex ve-items-center ve-justify-center ve-whitespace-nowrap ve-rounded-md ve-text-sm ve-font-medium ve-ring-offset-background ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 disabled:ve-pointer-events-none disabled:ve-opacity-50",{variants:{variant:{default:"ve-bg-primary ve-text-primary-foreground hover:ve-bg-primary/90",destructive:"ve-bg-destructive ve-text-destructive-foreground hover:ve-bg-destructive/90",outline:"ve-border ve-border-input ve-bg-background hover:ve-bg-accent hover:ve-text-accent-foreground",secondary:"ve-bg-secondary ve-text-secondary-foreground hover:ve-bg-secondary/80",ghost:"hover:ve-bg-accent hover:ve-text-accent-foreground",link:"ve-text-primary ve-underline-offset-4 hover:ve-underline"},size:{default:"ve-h-10 ve-rounded-md ve-px-4 ve-py-2",sm:"ve-h-9 ve-rounded-md ve-px-3",lg:"ve-h-11 ve-rounded-md ve-px-8",icon:"ve-h-10 ve-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Xe=f.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const s=n?It:"button";return m.jsx(s,{className:fe(uc({variant:t,size:r,className:e})),ref:a,...o})});Xe.displayName="Button";function dc(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function ma(e){const[t,r]=f.useState(void 0);return it(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;s=d.inlineSize,i=d.blockSize}else s=e.offsetWidth,i=e.offsetHeight;r({width:s,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var an="Switch",[fc,tf]=St(an),[pc,gc]=fc(an),ba=f.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:s,disabled:i,value:c="on",onCheckedChange:d,...u}=e,[g,l]=f.useState(null),v=pe(t,b=>l(b)),x=f.useRef(!1),h=g?!!g.closest("form"):!0,[y=!1,E]=Xr({prop:o,defaultProp:a,onChange:d});return m.jsxs(pc,{scope:r,checked:y,disabled:i,children:[m.jsx(le.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":wa(y),"data-disabled":i?"":void 0,disabled:i,value:c,...u,ref:v,onClick:ue(e.onClick,b=>{E(C=>!C),h&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),h&&m.jsx(vc,{control:g,bubbles:!x.current,name:n,value:c,checked:y,required:s,disabled:i,style:{transform:"translateX(-100%)"}})]})});ba.displayName=an;var ya="SwitchThumb",xa=f.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=gc(ya,r);return m.jsx(le.span,{"data-state":wa(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});xa.displayName=ya;var vc=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,a=f.useRef(null),s=dc(r),i=ma(t);return f.useEffect(()=>{const c=a.current,d=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==r&&g){const l=new Event("click",{bubbles:n});g.call(c,r),c.dispatchEvent(l)}},[s,r,n]),m.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function wa(e){return e?"checked":"unchecked"}var Ea=ba,hc=xa;const Ca=f.forwardRef(({className:e,...t},r)=>m.jsx(Ea,{className:fe("ve-self-center ve-peer ve-inline-flex ve-h-5 ve-w-9 ve-shrink-0 ve-cursor-pointer ve-items-center ve-rounded-full ve-border-2 ve-border-transparent ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 focus-visible:ve-ring-offset-background disabled:ve-cursor-not-allowed disabled:ve-opacity-50 data-[state=checked]:ve-bg-primary data-[state=unchecked]:ve-bg-input",e),...t,ref:r,children:m.jsx(hc,{className:fe("ve-self-center ve-pointer-events-none ve-block ve-h-4 ve-w-4 ve-rounded-full ve-bg-background ve-shadow-lg ve-ring-0 ve-transition-transform data-[state=checked]:ve-translate-x-4 data-[state=unchecked]:ve-translate-x-0")})}));Ca.displayName=Ea.displayName;const mc=["top","right","bottom","left"],Ze=Math.min,be=Math.max,or=Math.round,Jt=Math.floor,Qe=e=>({x:e,y:e}),bc={left:"right",right:"left",bottom:"top",top:"bottom"},yc={start:"end",end:"start"};function Fr(e,t,r){return be(e,Ze(t,r))}function We(e,t){return typeof e=="function"?e(t):e}function ze(e){return e.split("-")[0]}function Rt(e){return e.split("-")[1]}function sn(e){return e==="x"?"y":"x"}function ln(e){return e==="y"?"height":"width"}function et(e){return["top","bottom"].includes(ze(e))?"y":"x"}function cn(e){return sn(et(e))}function xc(e,t,r){r===void 0&&(r=!1);const n=Rt(e),o=cn(e),a=ln(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=ar(s)),[s,ar(s)]}function wc(e){const t=ar(e);return[Br(e),t,Br(t)]}function Br(e){return e.replace(/start|end/g,t=>yc[t])}function Ec(e,t,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?a:s;default:return[]}}function Cc(e,t,r,n){const o=Rt(e);let a=Ec(ze(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Br)))),a}function ar(e){return e.replace(/left|right|bottom|top/g,t=>bc[t])}function Sc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Sa(e){return typeof e!="number"?Sc(e):{top:e,right:e,bottom:e,left:e}}function sr(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Bn(e,t,r){let{reference:n,floating:o}=e;const a=et(t),s=cn(t),i=ln(s),c=ze(t),d=a==="y",u=n.x+n.width/2-o.width/2,g=n.y+n.height/2-o.height/2,l=n[i]/2-o[i]/2;let v;switch(c){case"top":v={x:u,y:n.y-o.height};break;case"bottom":v={x:u,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:g};break;case"left":v={x:n.x-o.width,y:g};break;default:v={x:n.x,y:n.y}}switch(Rt(t)){case"start":v[s]-=l*(r&&d?-1:1);break;case"end":v[s]+=l*(r&&d?-1:1);break}return v}const Pc=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,i=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:g}=Bn(d,n,c),l=n,v={},x=0;for(let h=0;h<i.length;h++){const{name:y,fn:E}=i[h],{x:b,y:C,data:P,reset:R}=await E({x:u,y:g,initialPlacement:n,placement:l,strategy:o,middlewareData:v,rects:d,platform:s,elements:{reference:e,floating:t}});u=b??u,g=C??g,v={...v,[y]:{...v[y],...P}},R&&x<=50&&(x++,typeof R=="object"&&(R.placement&&(l=R.placement),R.rects&&(d=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:u,y:g}=Bn(d,l,c)),h=-1)}return{x:u,y:g,placement:l,strategy:o,middlewareData:v}};async function Mt(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:i,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:g="floating",altBoundary:l=!1,padding:v=0}=We(t,e),x=Sa(v),y=i[l?g==="floating"?"reference":"floating":g],E=sr(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(y)))==null||r?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:d,rootBoundary:u,strategy:c})),b=g==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),P=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},R=sr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:C,strategy:c}):b);return{top:(E.top-R.top+x.top)/P.y,bottom:(R.bottom-E.bottom+x.bottom)/P.y,left:(E.left-R.left+x.left)/P.x,right:(R.right-E.right+x.right)/P.x}}const Rc=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:i,middlewareData:c}=t,{element:d,padding:u=0}=We(e,t)||{};if(d==null)return{};const g=Sa(u),l={x:r,y:n},v=cn(o),x=ln(v),h=await s.getDimensions(d),y=v==="y",E=y?"top":"left",b=y?"bottom":"right",C=y?"clientHeight":"clientWidth",P=a.reference[x]+a.reference[v]-l[v]-a.floating[x],R=l[v]-a.reference[v],D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let O=D?D[C]:0;(!O||!await(s.isElement==null?void 0:s.isElement(D)))&&(O=i.floating[C]||a.floating[x]);const N=P/2-R/2,z=O/2-h[x]/2-1,H=Ze(g[E],z),U=Ze(g[b],z),_=H,Y=O-h[x]-U,M=O/2-h[x]/2+N,X=Fr(_,M,Y),F=!c.arrow&&Rt(o)!=null&&M!==X&&a.reference[x]/2-(M<_?H:U)-h[x]/2<0,K=F?M<_?M-_:M-Y:0;return{[v]:l[v]+K,data:{[v]:X,centerOffset:M-X-K,...F&&{alignmentOffset:K}},reset:F}}}),Ac=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:c,elements:d}=t,{mainAxis:u=!0,crossAxis:g=!0,fallbackPlacements:l,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...y}=We(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const E=ze(o),b=et(i),C=ze(i)===i,P=await(c.isRTL==null?void 0:c.isRTL(d.floating)),R=l||(C||!h?[ar(i)]:wc(i)),D=x!=="none";!l&&D&&R.push(...Cc(i,h,x,P));const O=[i,...R],N=await Mt(t,y),z=[];let H=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&z.push(N[E]),g){const M=xc(o,s,P);z.push(N[M[0]],N[M[1]])}if(H=[...H,{placement:o,overflows:z}],!z.every(M=>M<=0)){var U,_;const M=(((U=a.flip)==null?void 0:U.index)||0)+1,X=O[M];if(X)return{data:{index:M,overflows:H},reset:{placement:X}};let F=(_=H.filter(K=>K.overflows[0]<=0).sort((K,A)=>K.overflows[1]-A.overflows[1])[0])==null?void 0:_.placement;if(!F)switch(v){case"bestFit":{var Y;const K=(Y=H.filter(A=>{if(D){const B=et(A.placement);return B===b||B==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(B=>B>0).reduce((B,oe)=>B+oe,0)]).sort((A,B)=>A[1]-B[1])[0])==null?void 0:Y[0];K&&(F=K);break}case"initialPlacement":F=i;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function Wn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zn(e){return mc.some(t=>e[t]>=0)}const Tc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=We(e,t);switch(n){case"referenceHidden":{const a=await Mt(t,{...o,elementContext:"reference"}),s=Wn(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:zn(s)}}}case"escaped":{const a=await Mt(t,{...o,altBoundary:!0}),s=Wn(a,r.floating);return{data:{escapedOffsets:s,escaped:zn(s)}}}default:return{}}}}};async function Oc(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=ze(r),i=Rt(r),c=et(r)==="y",d=["left","top"].includes(s)?-1:1,u=a&&c?-1:1,g=We(t,e);let{mainAxis:l,crossAxis:v,alignmentAxis:x}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return i&&typeof x=="number"&&(v=i==="end"?x*-1:x),c?{x:v*u,y:l*d}:{x:l*d,y:v*u}}const Nc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:i}=t,c=await Oc(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},Dc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:y=>{let{x:E,y:b}=y;return{x:E,y:b}}},...c}=We(e,t),d={x:r,y:n},u=await Mt(t,c),g=et(ze(o)),l=sn(g);let v=d[l],x=d[g];if(a){const y=l==="y"?"top":"left",E=l==="y"?"bottom":"right",b=v+u[y],C=v-u[E];v=Fr(b,v,C)}if(s){const y=g==="y"?"top":"left",E=g==="y"?"bottom":"right",b=x+u[y],C=x-u[E];x=Fr(b,x,C)}const h=i.fn({...t,[l]:v,[g]:x});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[l]:a,[g]:s}}}}}},kc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:c=!0,crossAxis:d=!0}=We(e,t),u={x:r,y:n},g=et(o),l=sn(g);let v=u[l],x=u[g];const h=We(i,t),y=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const C=l==="y"?"height":"width",P=a.reference[l]-a.floating[C]+y.mainAxis,R=a.reference[l]+a.reference[C]-y.mainAxis;v<P?v=P:v>R&&(v=R)}if(d){var E,b;const C=l==="y"?"width":"height",P=["top","left"].includes(ze(o)),R=a.reference[g]-a.floating[C]+(P&&((E=s.offset)==null?void 0:E[g])||0)+(P?0:y.crossAxis),D=a.reference[g]+a.reference[C]+(P?0:((b=s.offset)==null?void 0:b[g])||0)-(P?y.crossAxis:0);x<R?x=R:x>D&&(x=D)}return{[l]:v,[g]:x}}}},_c=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:c=()=>{},...d}=We(e,t),u=await Mt(t,d),g=ze(o),l=Rt(o),v=et(o)==="y",{width:x,height:h}=a.floating;let y,E;g==="top"||g==="bottom"?(y=g,E=l===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(E=g,y=l==="end"?"top":"bottom");const b=h-u.top-u.bottom,C=x-u.left-u.right,P=Ze(h-u[y],b),R=Ze(x-u[E],C),D=!t.middlewareData.shift;let O=P,N=R;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(O=b),D&&!l){const H=be(u.left,0),U=be(u.right,0),_=be(u.top,0),Y=be(u.bottom,0);v?N=x-2*(H!==0||U!==0?H+U:be(u.left,u.right)):O=h-2*(_!==0||Y!==0?_+Y:be(u.top,u.bottom))}await c({...t,availableWidth:N,availableHeight:O});const z=await s.getDimensions(i.floating);return x!==z.width||h!==z.height?{reset:{rects:!0}}:{}}}};function dr(){return typeof window<"u"}function At(e){return Pa(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Me(e){var t;return(t=(Pa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Pa(e){return dr()?e instanceof Node||e instanceof ye(e).Node:!1}function Ae(e){return dr()?e instanceof Element||e instanceof ye(e).Element:!1}function je(e){return dr()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function Vn(e){return!dr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Ft(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function jc(e){return["table","td","th"].includes(At(e))}function fr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function un(e){const t=dn(),r=Ae(e)?Te(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Mc(e){let t=tt(e);for(;je(t)&&!Et(t);){if(un(t))return t;if(fr(t))return null;t=tt(t)}return null}function dn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Et(e){return["html","body","#document"].includes(At(e))}function Te(e){return ye(e).getComputedStyle(e)}function pr(e){return Ae(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tt(e){if(At(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vn(e)&&e.host||Me(e);return Vn(t)?t.host:t}function Ra(e){const t=tt(e);return Et(t)?e.ownerDocument?e.ownerDocument.body:e.body:je(t)&&Ft(t)?t:Ra(t)}function Lt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Ra(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=ye(o);if(a){const i=Wr(s);return t.concat(s,s.visualViewport||[],Ft(o)?o:[],i&&r?Lt(i):[])}return t.concat(o,Lt(o,[],r))}function Wr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Aa(e){const t=Te(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=je(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,i=or(r)!==a||or(n)!==s;return i&&(r=a,n=s),{width:r,height:n,$:i}}function fn(e){return Ae(e)?e:e.contextElement}function wt(e){const t=fn(e);if(!je(t))return Qe(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=Aa(t);let s=(a?or(r.width):r.width)/n,i=(a?or(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Lc=Qe(0);function Ta(e){const t=ye(e);return!dn()||!t.visualViewport?Lc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ic(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ye(e)?!1:t}function ct(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=fn(e);let s=Qe(1);t&&(n?Ae(n)&&(s=wt(n)):s=wt(e));const i=Ic(a,r,n)?Ta(a):Qe(0);let c=(o.left+i.x)/s.x,d=(o.top+i.y)/s.y,u=o.width/s.x,g=o.height/s.y;if(a){const l=ye(a),v=n&&Ae(n)?ye(n):n;let x=l,h=Wr(x);for(;h&&n&&v!==x;){const y=wt(h),E=h.getBoundingClientRect(),b=Te(h),C=E.left+(h.clientLeft+parseFloat(b.paddingLeft))*y.x,P=E.top+(h.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,d*=y.y,u*=y.x,g*=y.y,c+=C,d+=P,x=ye(h),h=Wr(x)}}return sr({width:u,height:g,x:c,y:d})}function $c(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=Me(n),i=t?fr(t.floating):!1;if(n===s||i&&a)return r;let c={scrollLeft:0,scrollTop:0},d=Qe(1);const u=Qe(0),g=je(n);if((g||!g&&!a)&&((At(n)!=="body"||Ft(s))&&(c=pr(n)),je(n))){const l=ct(n);d=wt(n),u.x=l.x+n.clientLeft,u.y=l.y+n.clientTop}return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+u.x,y:r.y*d.y-c.scrollTop*d.y+u.y}}function Fc(e){return Array.from(e.getClientRects())}function zr(e,t){const r=pr(e).scrollLeft;return t?t.left+r:ct(Me(e)).left+r}function Bc(e){const t=Me(e),r=pr(e),n=e.ownerDocument.body,o=be(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=be(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+zr(e);const i=-r.scrollTop;return Te(n).direction==="rtl"&&(s+=be(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:i}}function Wc(e,t){const r=ye(e),n=Me(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,c=0;if(o){a=o.width,s=o.height;const d=dn();(!d||d&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}return{width:a,height:s,x:i,y:c}}function zc(e,t){const r=ct(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=je(e)?wt(e):Qe(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,c=o*a.x,d=n*a.y;return{width:s,height:i,x:c,y:d}}function Hn(e,t,r){let n;if(t==="viewport")n=Wc(e,r);else if(t==="document")n=Bc(Me(e));else if(Ae(t))n=zc(t,r);else{const o=Ta(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return sr(n)}function Oa(e,t){const r=tt(e);return r===t||!Ae(r)||Et(r)?!1:Te(r).position==="fixed"||Oa(r,t)}function Vc(e,t){const r=t.get(e);if(r)return r;let n=Lt(e,[],!1).filter(i=>Ae(i)&&At(i)!=="body"),o=null;const a=Te(e).position==="fixed";let s=a?tt(e):e;for(;Ae(s)&&!Et(s);){const i=Te(s),c=un(s);!c&&i.position==="fixed"&&(o=null),(a?!c&&!o:!c&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ft(s)&&!c&&Oa(e,s))?n=n.filter(u=>u!==s):o=i,s=tt(s)}return t.set(e,n),n}function Hc(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?fr(t)?[]:Vc(t,this._c):[].concat(r),n],i=s[0],c=s.reduce((d,u)=>{const g=Hn(t,u,o);return d.top=be(g.top,d.top),d.right=Ze(g.right,d.right),d.bottom=Ze(g.bottom,d.bottom),d.left=be(g.left,d.left),d},Hn(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Uc(e){const{width:t,height:r}=Aa(e);return{width:t,height:r}}function Yc(e,t,r){const n=je(t),o=Me(t),a=r==="fixed",s=ct(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const c=Qe(0);if(n||!n&&!a)if((At(t)!=="body"||Ft(o))&&(i=pr(t)),n){const v=ct(t,!0,a,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&(c.x=zr(o));let d=0,u=0;if(o&&!n&&!a){const v=o.getBoundingClientRect();u=v.top+i.scrollTop,d=v.left+i.scrollLeft-zr(o,v)}const g=s.left+i.scrollLeft-c.x-d,l=s.top+i.scrollTop-c.y-u;return{x:g,y:l,width:s.width,height:s.height}}function Nr(e){return Te(e).position==="static"}function Un(e,t){if(!je(e)||Te(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Me(e)===r&&(r=r.ownerDocument.body),r}function Na(e,t){const r=ye(e);if(fr(e))return r;if(!je(e)){let o=tt(e);for(;o&&!Et(o);){if(Ae(o)&&!Nr(o))return o;o=tt(o)}return r}let n=Un(e,t);for(;n&&jc(n)&&Nr(n);)n=Un(n,t);return n&&Et(n)&&Nr(n)&&!un(n)?r:n||Mc(e)||r}const Gc=async function(e){const t=this.getOffsetParent||Na,r=this.getDimensions,n=await r(e.floating);return{reference:Yc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function qc(e){return Te(e).direction==="rtl"}const Kc={convertOffsetParentRelativeRectToViewportRelativeRect:$c,getDocumentElement:Me,getClippingRect:Hc,getOffsetParent:Na,getElementRects:Gc,getClientRects:Fc,getDimensions:Uc,getScale:wt,isElement:Ae,isRTL:qc};function Xc(e,t){let r=null,n;const o=Me(e);function a(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function s(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),a();const{left:d,top:u,width:g,height:l}=e.getBoundingClientRect();if(i||t(),!g||!l)return;const v=Jt(u),x=Jt(o.clientWidth-(d+g)),h=Jt(o.clientHeight-(u+l)),y=Jt(d),b={rootMargin:-v+"px "+-x+"px "+-h+"px "+-y+"px",threshold:be(0,Ze(1,c))||1};let C=!0;function P(R){const D=R[0].intersectionRatio;if(D!==c){if(!C)return s();D?s(!1,D):n=setTimeout(()=>{s(!1,1e-7)},1e3)}C=!1}try{r=new IntersectionObserver(P,{...b,root:o.ownerDocument})}catch{r=new IntersectionObserver(P,b)}r.observe(e)}return s(!0),a}function Jc(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,d=fn(e),u=o||a?[...d?Lt(d):[],...Lt(t)]:[];u.forEach(E=>{o&&E.addEventListener("scroll",r,{passive:!0}),a&&E.addEventListener("resize",r)});const g=d&&i?Xc(d,r):null;let l=-1,v=null;s&&(v=new ResizeObserver(E=>{let[b]=E;b&&b.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(l),l=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(t)})),r()}),d&&!c&&v.observe(d),v.observe(t));let x,h=c?ct(e):null;c&&y();function y(){const E=ct(e);h&&(E.x!==h.x||E.y!==h.y||E.width!==h.width||E.height!==h.height)&&r(),h=E,x=requestAnimationFrame(y)}return r(),()=>{var E;u.forEach(b=>{o&&b.removeEventListener("scroll",r),a&&b.removeEventListener("resize",r)}),g==null||g(),(E=v)==null||E.disconnect(),v=null,c&&cancelAnimationFrame(x)}}const Zc=Nc,Qc=Dc,eu=Ac,tu=_c,ru=Tc,Yn=Rc,nu=kc,ou=(e,t,r)=>{const n=new Map,o={platform:Kc,...r},a={...o.platform,_c:n};return Pc(e,t,{...o,platform:a})};var rr=typeof document<"u"?w.useLayoutEffect:w.useEffect;function ir(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ir(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!ir(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Da(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gn(e,t){const r=Da(e);return Math.round(t*r)/r}function Dr(e){const t=f.useRef(e);return rr(()=>{t.current=e}),t}function au(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:c,open:d}=e,[u,g]=f.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[l,v]=f.useState(n);ir(l,n)||v(n);const[x,h]=f.useState(null),[y,E]=f.useState(null),b=f.useCallback(A=>{A!==D.current&&(D.current=A,h(A))},[]),C=f.useCallback(A=>{A!==O.current&&(O.current=A,E(A))},[]),P=a||x,R=s||y,D=f.useRef(null),O=f.useRef(null),N=f.useRef(u),z=c!=null,H=Dr(c),U=Dr(o),_=Dr(d),Y=f.useCallback(()=>{if(!D.current||!O.current)return;const A={placement:t,strategy:r,middleware:l};U.current&&(A.platform=U.current),ou(D.current,O.current,A).then(B=>{const oe={...B,isPositioned:_.current!==!1};M.current&&!ir(N.current,oe)&&(N.current=oe,Kr.flushSync(()=>{g(oe)}))})},[l,t,r,U,_]);rr(()=>{d===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,g(A=>({...A,isPositioned:!1})))},[d]);const M=f.useRef(!1);rr(()=>(M.current=!0,()=>{M.current=!1}),[]),rr(()=>{if(P&&(D.current=P),R&&(O.current=R),P&&R){if(H.current)return H.current(P,R,Y);Y()}},[P,R,Y,H,z]);const X=f.useMemo(()=>({reference:D,floating:O,setReference:b,setFloating:C}),[b,C]),F=f.useMemo(()=>({reference:P,floating:R}),[P,R]),K=f.useMemo(()=>{const A={position:r,left:0,top:0};if(!F.floating)return A;const B=Gn(F.floating,u.x),oe=Gn(F.floating,u.y);return i?{...A,transform:"translate("+B+"px, "+oe+"px)",...Da(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:B,top:oe}},[r,i,F.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:Y,refs:X,elements:F,floatingStyles:K}),[u,Y,X,F,K])}const su=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Yn({element:n.current,padding:o}).fn(r):{}:n?Yn({element:n,padding:o}).fn(r):{}}}},iu=(e,t)=>({...Zc(e),options:[e,t]}),lu=(e,t)=>({...Qc(e),options:[e,t]}),cu=(e,t)=>({...nu(e),options:[e,t]}),uu=(e,t)=>({...eu(e),options:[e,t]}),du=(e,t)=>({...tu(e),options:[e,t]}),fu=(e,t)=>({...ru(e),options:[e,t]}),pu=(e,t)=>({...su(e),options:[e,t]});var gu="Arrow",ka=f.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return m.jsx(le.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});ka.displayName=gu;var vu=ka,pn="Popper",[_a,ja]=St(pn),[hu,Ma]=_a(pn),La=e=>{const{__scopePopper:t,children:r}=e,[n,o]=f.useState(null);return m.jsx(hu,{scope:t,anchor:n,onAnchorChange:o,children:r})};La.displayName=pn;var Ia="PopperAnchor",$a=f.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=Ma(Ia,r),s=f.useRef(null),i=pe(t,s);return f.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||s.current)}),n?null:m.jsx(le.div,{...o,ref:i})});$a.displayName=Ia;var gn="PopperContent",[mu,bu]=_a(gn),Fa=f.forwardRef((e,t)=>{var xe,ge,we,ve,ut,Le;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:g="partial",hideWhenDetached:l=!1,updatePositionStrategy:v="optimized",onPlaced:x,...h}=e,y=Ma(gn,r),[E,b]=f.useState(null),C=pe(t,Ne=>b(Ne)),[P,R]=f.useState(null),D=ma(P),O=(D==null?void 0:D.width)??0,N=(D==null?void 0:D.height)??0,z=n+(a!=="center"?"-"+a:""),H=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},U=Array.isArray(d)?d:[d],_=U.length>0,Y={padding:H,boundary:U.filter(xu),altBoundary:_},{refs:M,floatingStyles:X,placement:F,isPositioned:K,middlewareData:A}=au({strategy:"fixed",placement:z,whileElementsMounted:(...Ne)=>Jc(...Ne,{animationFrame:v==="always"}),elements:{reference:y.anchor},middleware:[iu({mainAxis:o+N,alignmentAxis:s}),c&&lu({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?cu():void 0,...Y}),c&&uu({...Y}),du({...Y,apply:({elements:Ne,rects:rt,availableWidth:Ie,availableHeight:Re})=>{const{width:dt,height:He}=rt.reference,ie=Ne.floating.style;ie.setProperty("--radix-popper-available-width",`${Ie}px`),ie.setProperty("--radix-popper-available-height",`${Re}px`),ie.setProperty("--radix-popper-anchor-width",`${dt}px`),ie.setProperty("--radix-popper-anchor-height",`${He}px`)}}),P&&pu({element:P,padding:i}),wu({arrowWidth:O,arrowHeight:N}),l&&fu({strategy:"referenceHidden",...Y})]}),[B,oe]=za(F),I=Je(x);it(()=>{K&&(I==null||I())},[K,I]);const W=(xe=A.arrow)==null?void 0:xe.x,k=(ge=A.arrow)==null?void 0:ge.y,J=((we=A.arrow)==null?void 0:we.centerOffset)!==0,[te,G]=f.useState();return it(()=>{E&&G(window.getComputedStyle(E).zIndex)},[E]),m.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:K?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[(ve=A.transformOrigin)==null?void 0:ve.x,(ut=A.transformOrigin)==null?void 0:ut.y].join(" "),...((Le=A.hide)==null?void 0:Le.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(mu,{scope:r,placedSide:B,onArrowChange:R,arrowX:W,arrowY:k,shouldHideArrow:J,children:m.jsx(le.div,{"data-side":B,"data-align":oe,...h,ref:C,style:{...h.style,animation:K?void 0:"none"}})})})});Fa.displayName=gn;var Ba="PopperArrow",yu={top:"bottom",right:"left",bottom:"top",left:"right"},Wa=f.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=bu(Ba,n),s=yu[a.placedSide];return m.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:m.jsx(vu,{...o,ref:r,style:{...o.style,display:"block"}})})});Wa.displayName=Ba;function xu(e){return e!==null}var wu=e=>({name:"transformOrigin",options:e,fn(t){var y,E,b;const{placement:r,rects:n,middlewareData:o}=t,s=((y=o.arrow)==null?void 0:y.centerOffset)!==0,i=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[d,u]=za(r),g={start:"0%",center:"50%",end:"100%"}[u],l=(((E=o.arrow)==null?void 0:E.x)??0)+i/2,v=(((b=o.arrow)==null?void 0:b.y)??0)+c/2;let x="",h="";return d==="bottom"?(x=s?g:`${l}px`,h=`${-c}px`):d==="top"?(x=s?g:`${l}px`,h=`${n.floating.height+c}px`):d==="right"?(x=`${-c}px`,h=s?g:`${v}px`):d==="left"&&(x=`${n.floating.width+c}px`,h=s?g:`${v}px`),{data:{x,y:h}}}});function za(e){const[t,r="center"]=e.split("-");return[t,r]}var Eu=La,Cu=$a,Su=Fa,Pu=Wa,Ru="VisuallyHidden",Va=f.forwardRef((e,t)=>m.jsx(le.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Va.displayName=Ru;var Au=Va,[gr,rf]=St("Tooltip",[ja]),vr=ja(),Ha="TooltipProvider",Tu=700,Vr="tooltip.open",[Ou,vn]=gr(Ha),Ua=e=>{const{__scopeTooltip:t,delayDuration:r=Tu,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,[s,i]=f.useState(!0),c=f.useRef(!1),d=f.useRef(0);return f.useEffect(()=>{const u=d.current;return()=>window.clearTimeout(u)},[]),m.jsx(Ou,{scope:t,isOpenDelayed:s,delayDuration:r,onOpen:f.useCallback(()=>{window.clearTimeout(d.current),i(!1)},[]),onClose:f.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>i(!0),n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:f.useCallback(u=>{c.current=u},[]),disableHoverableContent:o,children:a})};Ua.displayName=Ha;var hr="Tooltip",[Nu,mr]=gr(hr),Ya=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,c=vn(hr,e.__scopeTooltip),d=vr(t),[u,g]=f.useState(null),l=Qt(),v=f.useRef(0),x=s??c.disableHoverableContent,h=i??c.delayDuration,y=f.useRef(!1),[E=!1,b]=Xr({prop:n,defaultProp:o,onChange:O=>{O?(c.onOpen(),document.dispatchEvent(new CustomEvent(Vr))):c.onClose(),a==null||a(O)}}),C=f.useMemo(()=>E?y.current?"delayed-open":"instant-open":"closed",[E]),P=f.useCallback(()=>{window.clearTimeout(v.current),y.current=!1,b(!0)},[b]),R=f.useCallback(()=>{window.clearTimeout(v.current),b(!1)},[b]),D=f.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{y.current=!0,b(!0)},h)},[h,b]);return f.useEffect(()=>()=>window.clearTimeout(v.current),[]),m.jsx(Eu,{...d,children:m.jsx(Nu,{scope:t,contentId:l,open:E,stateAttribute:C,trigger:u,onTriggerChange:g,onTriggerEnter:f.useCallback(()=>{c.isOpenDelayed?D():P()},[c.isOpenDelayed,D,P]),onTriggerLeave:f.useCallback(()=>{x?R():window.clearTimeout(v.current)},[R,x]),onOpen:P,onClose:R,disableHoverableContent:x,children:r})})};Ya.displayName=hr;var Hr="TooltipTrigger",Ga=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=mr(Hr,r),a=vn(Hr,r),s=vr(r),i=f.useRef(null),c=pe(t,i,o.onTriggerChange),d=f.useRef(!1),u=f.useRef(!1),g=f.useCallback(()=>d.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),m.jsx(Cu,{asChild:!0,...s,children:m.jsx(le.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:ue(e.onPointerMove,l=>{l.pointerType!=="touch"&&!u.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:ue(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:ue(e.onBlur,o.onClose),onClick:ue(e.onClick,o.onClose)})})});Ga.displayName=Hr;var Du="TooltipPortal",[nf,ku]=gr(Du,{forceMount:void 0}),Ct="TooltipContent",qa=f.forwardRef((e,t)=>{const r=ku(Ct,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=mr(Ct,e.__scopeTooltip);return m.jsx($t,{present:n||s.open,children:s.disableHoverableContent?m.jsx(Ka,{side:o,...a,ref:t}):m.jsx(_u,{side:o,...a,ref:t})})}),_u=f.forwardRef((e,t)=>{const r=mr(Ct,e.__scopeTooltip),n=vn(Ct,e.__scopeTooltip),o=f.useRef(null),a=pe(t,o),[s,i]=f.useState(null),{trigger:c,onClose:d}=r,u=o.current,{onPointerInTransitChange:g}=n,l=f.useCallback(()=>{i(null),g(!1)},[g]),v=f.useCallback((x,h)=>{const y=x.currentTarget,E={x:x.clientX,y:x.clientY},b=Lu(E,y.getBoundingClientRect()),C=Iu(E,b),P=$u(h.getBoundingClientRect()),R=Bu([...C,...P]);i(R),g(!0)},[g]);return f.useEffect(()=>()=>l(),[l]),f.useEffect(()=>{if(c&&u){const x=y=>v(y,u),h=y=>v(y,c);return c.addEventListener("pointerleave",x),u.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",x),u.removeEventListener("pointerleave",h)}}},[c,u,v,l]),f.useEffect(()=>{if(s){const x=h=>{const y=h.target,E={x:h.clientX,y:h.clientY},b=(c==null?void 0:c.contains(y))||(u==null?void 0:u.contains(y)),C=!Fu(E,s);b?l():C&&(l(),d())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,u,s,d,l]),m.jsx(Ka,{...e,ref:a})}),[ju,Mu]=gr(hr,{isInside:!1}),Ka=f.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,c=mr(Ct,r),d=vr(r),{onClose:u}=c;return f.useEffect(()=>(document.addEventListener(Vr,u),()=>document.removeEventListener(Vr,u)),[u]),f.useEffect(()=>{if(c.trigger){const g=l=>{const v=l.target;v!=null&&v.contains(c.trigger)&&u()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[c.trigger,u]),m.jsx(Zr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:g=>g.preventDefault(),onDismiss:u,children:m.jsxs(Su,{"data-state":c.stateAttribute,...d,...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:[m.jsx(Jr,{children:n}),m.jsx(ju,{scope:r,isInside:!0,children:m.jsx(Au,{id:c.contentId,role:"tooltip",children:o||n})})]})})});qa.displayName=Ct;var Xa="TooltipArrow",Ja=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=vr(r);return Mu(Xa,r).isInside?null:m.jsx(Pu,{...o,...n,ref:t})});Ja.displayName=Xa;function Lu(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Iu(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function $u(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Fu(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,c=t[a].y,d=t[s].x,u=t[s].y;c>n!=u>n&&r<(d-i)*(n-c)/(u-c)+i&&(o=!o)}return o}function Bu(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Wu(t)}function Wu(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var zu=Ua,Vu=Ya,Hu=Ga,Za=qa,Uu=Ja;const Qa=zu,es=Vu,ts=Hu,rs=Uu,hn=f.forwardRef(({className:e,sideOffset:t=4,...r},n)=>m.jsx(Za,{ref:n,sideOffset:t,className:fe("ve-z-50 ve-overflow-hidden ve-rounded-[6px] ve-bg-popover ve-px-3 ve-py-1.5 ve-text-sm ve-text-popover-foreground",e),...r}));hn.displayName=Za.displayName;const Yu=({displayName:e,fieldId:t,children:r})=>{const{tooltipsVisible:n}=os();let o="";return e&&t?o=`${e} (${t})`:t?o=`(${t})`:e&&(o=`${e}`),m.jsx("div",{children:m.jsx(Qa,{children:m.jsxs(es,{open:n&&!!o,children:[m.jsx(ts,{asChild:!0,children:m.jsx("div",{className:n?"ve-outline-2 ve-outline-dotted ve-outline-[#5A58F2]":"",children:r})}),m.jsxs(hn,{children:[m.jsx("p",{children:o}),m.jsx(rs,{fill:"bg-popover"})]})]})})})},ns=w.createContext(void 0),Gu=({children:e})=>{const[t,r]=w.useState(!1),n=()=>{r(o=>!o)};return m.jsx(ns.Provider,{value:{tooltipsVisible:t,toggleTooltips:n},children:e})},os=()=>{const e=w.useContext(ns);return e||{tooltipsVisible:!1,toggleTooltips:()=>{}}},qu=(e,t,r,n,o,a)=>{const{history:{back:s,forward:i,histories:c,index:d,hasPast:u,hasFuture:g,setHistories:l}}=_e.usePuck();return w.useEffect(()=>{t(c,d)},[d,c,t]),m.jsxs("header",{className:"puck-header",children:[m.jsxs("div",{className:"header-left",children:[m.jsx(Xu,{}),m.jsx(Ju,{})]}),m.jsx("div",{className:"header-center"}),m.jsxs("div",{className:"actions",children:[m.jsx(Xe,{variant:"ghost",size:"icon",disabled:!u,onClick:s,children:m.jsx(_s,{className:"sm-icon"})}),m.jsx(Xe,{variant:"ghost",size:"icon",disabled:!g,onClick:i,children:m.jsx(js,{className:"sm-icon"})}),m.jsx(Ku,{disabled:c.length===1,onClearLocalChanges:()=>{e(),l([{id:"root",state:{data:n}}])}}),!a&&m.jsx(Xe,{variant:"secondary",disabled:c.length===1,onClick:async()=>{await o(r),e()},children:"Publish"})]})]})},Ku=({disabled:e,onClearLocalChanges:t})=>{const[r,n]=w.useState(!1),o=()=>{t(),n(!1)};return m.jsxs(sc,{open:r,onOpenChange:n,children:[m.jsx(ic,{disabled:e,asChild:!0,children:m.jsx(Xe,{variant:"outline",children:"Clear Local Changes"})}),m.jsxs(da,{children:[m.jsxs(fa,{children:[m.jsx(ga,{children:"Clear Local Changes"}),m.jsx(va,{children:"This action will remove your local changes. It cannot be undone."})]}),m.jsxs(pa,{children:[m.jsx(ha,{children:"Cancel"}),m.jsx(Xe,{onClick:o,children:"Confirm"})]})]})]})},Xu=()=>{const{dispatch:e,appState:{ui:{leftSideBarVisible:t,rightSideBarVisible:r}}}=_e.usePuck(),n=w.useCallback(o=>{const a=window.matchMedia("(min-width: 638px)").matches,s=o==="left"?t:r,i=o==="left"?"rightSideBarVisible":"leftSideBarVisible";e({type:"setUi",ui:{[`${o}SideBarVisible`]:!s,...a?{}:{[i]:!1}}})},[e,t,r]);return m.jsxs(m.Fragment,{children:[m.jsx(Xe,{variant:"ghost",size:"icon",onClick:()=>{n("left")},children:m.jsx(Ds,{className:"sm-icon"})}),m.jsx(Xe,{variant:"ghost",size:"icon",onClick:()=>{n("right")},children:m.jsx(ks,{className:"sm-icon"})})]})},Ju=()=>{const{toggleTooltips:e,tooltipsVisible:t}=os();return m.jsx(Qa,{children:m.jsxs(es,{children:[m.jsx(ts,{asChild:!0,children:m.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[m.jsx(Ca,{onCheckedChange:e,checked:t}),m.jsx("p",{className:"ve-self-center ve-text-sm",children:"Entity Fields"})]})}),m.jsxs(hn,{children:[t?"Hide Entity Fields":"Show Entity Fields",m.jsx(rs,{fill:"ve-bg-popover"})]})]})})},qn="ROLE_",Kn="TEMPLATE_",Zu="LAYOUT_",Qu="ENTITY_";function Ur(e,t,r,n,o){const a=e?"dev":"";if(!t||!r||!o&&!n)throw new Error("Unable to generate local storage key, missing query parameters");if(t===Bd.INDIVIDUAL){if(!o)throw new Error(`EntityId required for role ${t}`);return a+qn+t+Kn+r+Qu+o}if(!n)throw new Error(`LayoutId required for role ${t}`);return a+qn+t+Kn+r+Zu+n}const ed=({puckConfig:e,puckInitialHistory:t,isLoading:r,clearHistory:n,templateMetadata:o,saveState:a,saveSaveState:s,saveVisualConfigData:i,sendDevSaveStateData:c,buildLocalStorageKey:d,devLogger:u})=>{const[g,l]=w.useState(!1),v=w.useRef(0),x=w.useCallback((b,C)=>{C!==0&&v.current!==C&&b.length>0&&(u.logFunc("handleHistoryChange"),u.logData("PUCK_INDEX",C),u.logData("PUCK_HISTORY",b),v.current=C,u.logFunc("saveToLocalStorage"),window.localStorage.setItem(d(),JSON.stringify(b)),(a==null?void 0:a.hash)!==b[C].id&&(o.isDevMode&&!o.devOverride?(u.logFunc("sendDevSaveStateData"),c({payload:{devSaveStateData:JSON.stringify(b[C].state.data)}})):(u.logFunc("saveSaveState"),s({payload:{hash:b[C].id,history:JSON.stringify(b[C].state)}}))))},[o,Ur,a]),h=()=>{n(),v.current=0},y=async b=>{u.logFunc("saveVisualConfigData"),i({payload:{visualConfigurationData:JSON.stringify(b)}})},E=async()=>{if(!r&&!g){l(!0);return}};return m.jsx(Gu,{children:m.jsx(_e.Puck,{config:e,data:{},initialHistory:t,onChange:E,overrides:{header:()=>{const{appState:b}=_e.usePuck();return qu(h,x,b.data,t==null?void 0:t.histories[0].state.data,y,o.isDevMode&&!o.devOverride)}}})})};var mn="Progress",bn=100,[td,of]=St(mn),[rd,nd]=td(mn),as=f.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:a=od,...s}=e;(o||o===0)&&!Xn(o)&&console.error(ad(`${o}`,"Progress"));const i=Xn(o)?o:bn;n!==null&&!Jn(n,i)&&console.error(sd(`${n}`,"Progress"));const c=Jn(n,i)?n:null,d=lr(c)?a(c,i):void 0;return m.jsx(rd,{scope:r,value:c,max:i,children:m.jsx(le.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":lr(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":ls(c,i),"data-value":c??void 0,"data-max":i,...s,ref:t})})});as.displayName=mn;var ss="ProgressIndicator",is=f.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=nd(ss,r);return m.jsx(le.div,{"data-state":ls(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});is.displayName=ss;function od(e,t){return`${Math.round(e/t*100)}%`}function ls(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function lr(e){return typeof e=="number"}function Xn(e){return lr(e)&&!isNaN(e)&&e>0}function Jn(e,t){return lr(e)&&!isNaN(e)&&e<=t&&e>=0}function ad(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${bn}\`.`}function sd(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
117
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return f.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},El=$o,Cl=Fo,Sl=Bo,Xo=Wo,Jo=Vo,Zo=Go,Qo=Ko,ea=Ho,ta=Yo;function ra(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=ra(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Pl(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=ra(e))&&(n&&(n+=" "),n+=t);return n}const nn="-";function Rl(e){const t=Tl(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;function o(s){const i=s.split(nn);return i[0]===""&&i.length!==1&&i.shift(),na(i,t)||Al(s)}function a(s,i){const c=r[s]||[];return i&&n[s]?[...c,...n[s]]:c}return{getClassGroupId:o,getConflictingClassGroupIds:a}}function na(e,t){var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?na(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(nn);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId}const Ln=/^\[(.+)\]$/;function Al(e){if(Ln.test(e)){const t=Ln.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function Tl(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Nl(Object.entries(e.classGroups),r).forEach(([a,s])=>{$r(s,n,a,t)}),n}function $r(e,t,r,n){e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:In(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(Ol(o)){$r(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,s])=>{$r(s,In(t,a),r,n)})})}function In(e,t){let r=e;return t.split(nn).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function Ol(e){return e.isThemeGetter}function Nl(e,t){return t?e.map(([r,n])=>{const o=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[r,o]}):e}function Dl(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function o(a,s){r.set(a,s),t++,t>e&&(t=0,n=r,r=new Map)}return{get(a){let s=r.get(a);if(s!==void 0)return s;if((s=n.get(a))!==void 0)return o(a,s),s},set(a,s){r.has(a)?r.set(a,s):o(a,s)}}}const oa="!";function kl(e){const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],a=t.length;function s(i){const c=[];let d=0,u=0,g;for(let y=0;y<i.length;y++){let E=i[y];if(d===0){if(E===o&&(n||i.slice(y,y+a)===t)){c.push(i.slice(u,y)),u=y+a;continue}if(E==="/"){g=y;continue}}E==="["?d++:E==="]"&&d--}const l=c.length===0?i:i.substring(u),v=l.startsWith(oa),x=v?l.substring(1):l,h=g&&g>u?g-u:void 0;return{modifiers:c,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:h}}return r?function(c){return r({className:c,parseClassName:s})}:s}function _l(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t}function jl(e){return{cache:Dl(e.cacheSize),parseClassName:kl(e),...Rl(e)}}const Ml=/\s+/;function Ll(e,t){const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,a=new Set;return e.trim().split(Ml).map(s=>{const{modifiers:i,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:u}=r(s);let g=!!u,l=n(g?d.substring(0,u):d);if(!l){if(!g)return{isTailwindClass:!1,originalClassName:s};if(l=n(d),!l)return{isTailwindClass:!1,originalClassName:s};g=!1}const v=_l(i).join(":");return{isTailwindClass:!0,modifierId:c?v+oa:v,classGroupId:l,originalClassName:s,hasPostfixModifier:g}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:i,classGroupId:c,hasPostfixModifier:d}=s,u=i+c;return a.has(u)?!1:(a.add(u),o(c,d).forEach(g=>a.add(i+g)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function Il(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=aa(t))&&(n&&(n+=" "),n+=r);return n}function aa(e){if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=aa(e[n]))&&(r&&(r+=" "),r+=t);return r}function $l(e,...t){let r,n,o,a=s;function s(c){const d=t.reduce((u,g)=>g(u),e());return r=jl(d),n=r.cache.get,o=r.cache.set,a=i,i(c)}function i(c){const d=n(c);if(d)return d;const u=Ll(c,r);return o(c,u),u}return function(){return a(Il.apply(null,arguments))}}function ne(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const sa=/^\[(?:([a-z-]+):)?(.+)\]$/i,Fl=/^\d+\/\d+$/,Bl=new Set(["px","full","screen"]),Wl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vl=/\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$/,zl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Hl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ul=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Be(e){return st(e)||Bl.has(e)||Fl.test(e)}function Ge(e){return Pt(e,"length",Ql)}function st(e){return!!e&&!Number.isNaN(Number(e))}function Xt(e){return Pt(e,"number",st)}function kt(e){return!!e&&Number.isInteger(Number(e))}function Yl(e){return e.endsWith("%")&&st(e.slice(0,-1))}function $(e){return sa.test(e)}function qe(e){return Wl.test(e)}const Gl=new Set(["length","size","percentage"]);function ql(e){return Pt(e,Gl,ia)}function Kl(e){return Pt(e,"position",ia)}const Xl=new Set(["image","url"]);function Jl(e){return Pt(e,Xl,tc)}function Zl(e){return Pt(e,"",ec)}function _t(){return!0}function Pt(e,t,r){const n=sa.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function Ql(e){return Vl.test(e)&&!zl.test(e)}function ia(){return!1}function ec(e){return Hl.test(e)}function tc(e){return Ul.test(e)}function rc(){const e=ne("colors"),t=ne("spacing"),r=ne("blur"),n=ne("brightness"),o=ne("borderColor"),a=ne("borderRadius"),s=ne("borderSpacing"),i=ne("borderWidth"),c=ne("contrast"),d=ne("grayscale"),u=ne("hueRotate"),g=ne("invert"),l=ne("gap"),v=ne("gradientColorStops"),x=ne("gradientColorStopPositions"),h=ne("inset"),y=ne("margin"),E=ne("opacity"),b=ne("padding"),C=ne("saturate"),P=ne("scale"),R=ne("sepia"),D=ne("skew"),O=ne("space"),N=ne("translate"),V=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",$,t],_=()=>[$,t],Y=()=>["",Be,Ge],M=()=>["auto",st,$],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",$],oe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[st,Xt],W=()=>[st,$];return{cacheSize:500,separator:":",theme:{colors:[_t],spacing:[Be,Ge],blur:["none","",qe,$],brightness:I(),borderColor:[e],borderRadius:["none","","full",qe,$],borderSpacing:_(),borderWidth:Y(),contrast:I(),grayscale:B(),hueRotate:W(),invert:B(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[Yl,Ge],inset:U(),margin:U(),opacity:I(),padding:_(),saturate:I(),scale:I(),sepia:B(),skew:W(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",$]}],container:["container"],columns:[{columns:[qe]}],"break-after":[{"break-after":oe()}],"break-before":[{"break-before":oe()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...X(),$]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",kt,$]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",kt,$]}],"grid-cols":[{"grid-cols":[_t]}],"col-start-end":[{col:["auto",{span:["full",kt,$]},$]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[_t]}],"row-start-end":[{row:["auto",{span:[kt,$]},$]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$]}],gap:[{gap:[l]}],"gap-x":[{"gap-x":[l]}],"gap-y":[{"gap-y":[l]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$,t]}],"min-w":[{"min-w":[$,t,"min","max","fit"]}],"max-w":[{"max-w":[$,t,"none","full","min","max","fit","prose",{screen:[qe]},qe]}],h:[{h:[$,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$,t,"auto","min","max","fit"]}],"font-size":[{text:["base",qe,Ge]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xt]}],"font-family":[{font:[_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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$]}],"line-clamp":[{"line-clamp":["none",st,Xt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Be,$]}],"list-image":[{"list-image":["none",$]}],"list-style-type":[{list:["none","disc","decimal",$]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Be,Ge]}],"underline-offset":[{"underline-offset":["auto",Be,$]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),Kl]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ql]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Jl]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[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:["",...F()]}],"outline-offset":[{"outline-offset":[Be,$]}],"outline-w":[{outline:[Be,Ge]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[Be,Ge]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",qe,Zl]}],"shadow-color":[{shadow:[_t]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",qe,$]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[g]}],saturate:[{saturate:[C]}],sepia:[{sepia:[R]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[R]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",$]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",$]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[kt,$]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",$]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Be,Ge,Xt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const nc=$l(rc);function fe(...e){return nc(Pl(e))}function la(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=la(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function oc(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=la(e))&&(n&&(n+=" "),n+=t);return n}const $n=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Fn=oc,ca=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Fn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const u=r==null?void 0:r[d],g=a==null?void 0:a[d];if(u===null)return null;const l=$n(u)||$n(g);return o[d][l]}),i=r&&Object.entries(r).reduce((d,u)=>{let[g,l]=u;return l===void 0||(d[g]=l),d},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,u)=>{let{class:g,className:l,...v}=u;return Object.entries(v).every(x=>{let[h,y]=x;return Array.isArray(y)?y.includes({...a,...i}[h]):{...a,...i}[h]===y})?[...d,g,l]:d},[]);return Fn(e,s,c,r==null?void 0:r.class,r==null?void 0:r.className)},on=ca("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-secondary active:bg-primary-foreground active:text-primary active:border-primary focus:border-2",secondary:"bg-primary-foreground text-primary border-2 border-primary hover:bg-primary hover:text-primary-foreground active:bg-secondary active:text-secondary-foreground focus:border-2",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border-primary border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 rounded-md 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"}}),ac=f.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const s=n?It:"button";return m.jsx(s,{className:fe(on({variant:t,size:r,className:e})),ref:a,...o})});ac.displayName="Button";const sc=El,ic=Cl,lc=Sl,ua=f.forwardRef(({className:e,...t},r)=>m.jsx(Xo,{className:fe("ve-fixed ve-inset-0 ve-z-50 ve-bg-black/80 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0",e),...t,ref:r}));ua.displayName=Xo.displayName;const da=f.forwardRef(({className:e,...t},r)=>m.jsxs(lc,{children:[m.jsx(ua,{}),m.jsx(Jo,{ref:r,className:fe("ve-fixed ve-left-[50%] ve-top-[50%] ve-z-50 ve-grid ve-w-full ve-max-w-lg ve-translate-x-[-50%] ve-translate-y-[-50%] ve-gap-4 ve-border ve-bg-background ve-p-6 ve-shadow-lg ve-duration-200 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0 data-[state=closed]:ve-zoom-out-95 data-[state=open]:ve-zoom-in-95 data-[state=closed]:ve-slide-out-to-left-1/2 data-[state=closed]:ve-slide-out-to-top-[48%] data-[state=open]:ve-slide-in-from-left-1/2 data-[state=open]:ve-slide-in-from-top-[48%] sm:ve-rounded-lg",e),...t})]}));da.displayName=Jo.displayName;const fa=({className:e,...t})=>m.jsx("div",{className:fe("ve-flex ve-flex-col ve-space-y-2 ve-text-center sm:ve-text-left",e),...t});fa.displayName="AlertDialogHeader";const pa=({className:e,...t})=>m.jsx("div",{className:fe("ve-flex ve-flex-col-reverse sm:ve-flex-row sm:ve-justify-end sm:ve-space-x-2",e),...t});pa.displayName="AlertDialogFooter";const ga=f.forwardRef(({className:e,...t},r)=>m.jsx(ea,{ref:r,className:fe("ve-text-lg ve-font-semibold",e),...t}));ga.displayName=ea.displayName;const va=f.forwardRef(({className:e,...t},r)=>m.jsx(ta,{ref:r,className:fe("ve-text-sm ve-text-muted-foreground",e),...t}));va.displayName=ta.displayName;const cc=f.forwardRef(({className:e,...t},r)=>m.jsx(Zo,{ref:r,className:fe(on(),e),...t}));cc.displayName=Zo.displayName;const ha=f.forwardRef(({className:e,...t},r)=>m.jsx(Qo,{ref:r,className:fe(on({variant:"outline"}),"ve-mt-2 sm:ve-mt-0",e),...t}));ha.displayName=Qo.displayName;const uc=ca("ve-inline-flex ve-items-center ve-justify-center ve-whitespace-nowrap ve-rounded-md ve-text-sm ve-font-medium ve-ring-offset-background ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 disabled:ve-pointer-events-none disabled:ve-opacity-50",{variants:{variant:{default:"ve-bg-primary ve-text-primary-foreground hover:ve-bg-primary/90",destructive:"ve-bg-destructive ve-text-destructive-foreground hover:ve-bg-destructive/90",outline:"ve-border ve-border-input ve-bg-background hover:ve-bg-accent hover:ve-text-accent-foreground",secondary:"ve-bg-secondary ve-text-secondary-foreground hover:ve-bg-secondary/80",ghost:"hover:ve-bg-accent hover:ve-text-accent-foreground",link:"ve-text-primary ve-underline-offset-4 hover:ve-underline"},size:{default:"ve-h-10 ve-rounded-md ve-px-4 ve-py-2",sm:"ve-h-9 ve-rounded-md ve-px-3",lg:"ve-h-11 ve-rounded-md ve-px-8",icon:"ve-h-10 ve-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Xe=f.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const s=n?It:"button";return m.jsx(s,{className:fe(uc({variant:t,size:r,className:e})),ref:a,...o})});Xe.displayName="Button";function dc(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function ma(e){const[t,r]=f.useState(void 0);return it(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;s=d.inlineSize,i=d.blockSize}else s=e.offsetWidth,i=e.offsetHeight;r({width:s,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var an="Switch",[fc,nf]=St(an),[pc,gc]=fc(an),ba=f.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:s,disabled:i,value:c="on",onCheckedChange:d,...u}=e,[g,l]=f.useState(null),v=pe(t,b=>l(b)),x=f.useRef(!1),h=g?!!g.closest("form"):!0,[y=!1,E]=Xr({prop:o,defaultProp:a,onChange:d});return m.jsxs(pc,{scope:r,checked:y,disabled:i,children:[m.jsx(le.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":wa(y),"data-disabled":i?"":void 0,disabled:i,value:c,...u,ref:v,onClick:ue(e.onClick,b=>{E(C=>!C),h&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),h&&m.jsx(vc,{control:g,bubbles:!x.current,name:n,value:c,checked:y,required:s,disabled:i,style:{transform:"translateX(-100%)"}})]})});ba.displayName=an;var ya="SwitchThumb",xa=f.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=gc(ya,r);return m.jsx(le.span,{"data-state":wa(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});xa.displayName=ya;var vc=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,a=f.useRef(null),s=dc(r),i=ma(t);return f.useEffect(()=>{const c=a.current,d=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==r&&g){const l=new Event("click",{bubbles:n});g.call(c,r),c.dispatchEvent(l)}},[s,r,n]),m.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function wa(e){return e?"checked":"unchecked"}var Ea=ba,hc=xa;const Ca=f.forwardRef(({className:e,...t},r)=>m.jsx(Ea,{className:fe("ve-self-center ve-peer ve-inline-flex ve-h-5 ve-w-9 ve-shrink-0 ve-cursor-pointer ve-items-center ve-rounded-full ve-border-2 ve-border-transparent ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 focus-visible:ve-ring-offset-background disabled:ve-cursor-not-allowed disabled:ve-opacity-50 data-[state=checked]:ve-bg-primary data-[state=unchecked]:ve-bg-input",e),...t,ref:r,children:m.jsx(hc,{className:fe("ve-self-center ve-pointer-events-none ve-block ve-h-4 ve-w-4 ve-rounded-full ve-bg-background ve-shadow-lg ve-ring-0 ve-transition-transform data-[state=checked]:ve-translate-x-4 data-[state=unchecked]:ve-translate-x-0")})}));Ca.displayName=Ea.displayName;const mc=["top","right","bottom","left"],Ze=Math.min,be=Math.max,or=Math.round,Jt=Math.floor,Qe=e=>({x:e,y:e}),bc={left:"right",right:"left",bottom:"top",top:"bottom"},yc={start:"end",end:"start"};function Fr(e,t,r){return be(e,Ze(t,r))}function We(e,t){return typeof e=="function"?e(t):e}function Ve(e){return e.split("-")[0]}function Rt(e){return e.split("-")[1]}function sn(e){return e==="x"?"y":"x"}function ln(e){return e==="y"?"height":"width"}function et(e){return["top","bottom"].includes(Ve(e))?"y":"x"}function cn(e){return sn(et(e))}function xc(e,t,r){r===void 0&&(r=!1);const n=Rt(e),o=cn(e),a=ln(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=ar(s)),[s,ar(s)]}function wc(e){const t=ar(e);return[Br(e),t,Br(t)]}function Br(e){return e.replace(/start|end/g,t=>yc[t])}function Ec(e,t,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?a:s;default:return[]}}function Cc(e,t,r,n){const o=Rt(e);let a=Ec(Ve(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Br)))),a}function ar(e){return e.replace(/left|right|bottom|top/g,t=>bc[t])}function Sc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Sa(e){return typeof e!="number"?Sc(e):{top:e,right:e,bottom:e,left:e}}function sr(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Bn(e,t,r){let{reference:n,floating:o}=e;const a=et(t),s=cn(t),i=ln(s),c=Ve(t),d=a==="y",u=n.x+n.width/2-o.width/2,g=n.y+n.height/2-o.height/2,l=n[i]/2-o[i]/2;let v;switch(c){case"top":v={x:u,y:n.y-o.height};break;case"bottom":v={x:u,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:g};break;case"left":v={x:n.x-o.width,y:g};break;default:v={x:n.x,y:n.y}}switch(Rt(t)){case"start":v[s]-=l*(r&&d?-1:1);break;case"end":v[s]+=l*(r&&d?-1:1);break}return v}const Pc=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,i=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:g}=Bn(d,n,c),l=n,v={},x=0;for(let h=0;h<i.length;h++){const{name:y,fn:E}=i[h],{x:b,y:C,data:P,reset:R}=await E({x:u,y:g,initialPlacement:n,placement:l,strategy:o,middlewareData:v,rects:d,platform:s,elements:{reference:e,floating:t}});u=b??u,g=C??g,v={...v,[y]:{...v[y],...P}},R&&x<=50&&(x++,typeof R=="object"&&(R.placement&&(l=R.placement),R.rects&&(d=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:u,y:g}=Bn(d,l,c)),h=-1)}return{x:u,y:g,placement:l,strategy:o,middlewareData:v}};async function Mt(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:i,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:g="floating",altBoundary:l=!1,padding:v=0}=We(t,e),x=Sa(v),y=i[l?g==="floating"?"reference":"floating":g],E=sr(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(y)))==null||r?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:d,rootBoundary:u,strategy:c})),b=g==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),P=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},R=sr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:C,strategy:c}):b);return{top:(E.top-R.top+x.top)/P.y,bottom:(R.bottom-E.bottom+x.bottom)/P.y,left:(E.left-R.left+x.left)/P.x,right:(R.right-E.right+x.right)/P.x}}const Rc=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:i,middlewareData:c}=t,{element:d,padding:u=0}=We(e,t)||{};if(d==null)return{};const g=Sa(u),l={x:r,y:n},v=cn(o),x=ln(v),h=await s.getDimensions(d),y=v==="y",E=y?"top":"left",b=y?"bottom":"right",C=y?"clientHeight":"clientWidth",P=a.reference[x]+a.reference[v]-l[v]-a.floating[x],R=l[v]-a.reference[v],D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let O=D?D[C]:0;(!O||!await(s.isElement==null?void 0:s.isElement(D)))&&(O=i.floating[C]||a.floating[x]);const N=P/2-R/2,V=O/2-h[x]/2-1,H=Ze(g[E],V),U=Ze(g[b],V),_=H,Y=O-h[x]-U,M=O/2-h[x]/2+N,X=Fr(_,M,Y),F=!c.arrow&&Rt(o)!=null&&M!==X&&a.reference[x]/2-(M<_?H:U)-h[x]/2<0,K=F?M<_?M-_:M-Y:0;return{[v]:l[v]+K,data:{[v]:X,centerOffset:M-X-K,...F&&{alignmentOffset:K}},reset:F}}}),Ac=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:c,elements:d}=t,{mainAxis:u=!0,crossAxis:g=!0,fallbackPlacements:l,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...y}=We(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const E=Ve(o),b=et(i),C=Ve(i)===i,P=await(c.isRTL==null?void 0:c.isRTL(d.floating)),R=l||(C||!h?[ar(i)]:wc(i)),D=x!=="none";!l&&D&&R.push(...Cc(i,h,x,P));const O=[i,...R],N=await Mt(t,y),V=[];let H=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&V.push(N[E]),g){const M=xc(o,s,P);V.push(N[M[0]],N[M[1]])}if(H=[...H,{placement:o,overflows:V}],!V.every(M=>M<=0)){var U,_;const M=(((U=a.flip)==null?void 0:U.index)||0)+1,X=O[M];if(X)return{data:{index:M,overflows:H},reset:{placement:X}};let F=(_=H.filter(K=>K.overflows[0]<=0).sort((K,A)=>K.overflows[1]-A.overflows[1])[0])==null?void 0:_.placement;if(!F)switch(v){case"bestFit":{var Y;const K=(Y=H.filter(A=>{if(D){const B=et(A.placement);return B===b||B==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(B=>B>0).reduce((B,oe)=>B+oe,0)]).sort((A,B)=>A[1]-B[1])[0])==null?void 0:Y[0];K&&(F=K);break}case"initialPlacement":F=i;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function Wn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vn(e){return mc.some(t=>e[t]>=0)}const Tc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=We(e,t);switch(n){case"referenceHidden":{const a=await Mt(t,{...o,elementContext:"reference"}),s=Wn(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Vn(s)}}}case"escaped":{const a=await Mt(t,{...o,altBoundary:!0}),s=Wn(a,r.floating);return{data:{escapedOffsets:s,escaped:Vn(s)}}}default:return{}}}}};async function Oc(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Ve(r),i=Rt(r),c=et(r)==="y",d=["left","top"].includes(s)?-1:1,u=a&&c?-1:1,g=We(t,e);let{mainAxis:l,crossAxis:v,alignmentAxis:x}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return i&&typeof x=="number"&&(v=i==="end"?x*-1:x),c?{x:v*u,y:l*d}:{x:l*d,y:v*u}}const Nc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:i}=t,c=await Oc(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},Dc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:y=>{let{x:E,y:b}=y;return{x:E,y:b}}},...c}=We(e,t),d={x:r,y:n},u=await Mt(t,c),g=et(Ve(o)),l=sn(g);let v=d[l],x=d[g];if(a){const y=l==="y"?"top":"left",E=l==="y"?"bottom":"right",b=v+u[y],C=v-u[E];v=Fr(b,v,C)}if(s){const y=g==="y"?"top":"left",E=g==="y"?"bottom":"right",b=x+u[y],C=x-u[E];x=Fr(b,x,C)}const h=i.fn({...t,[l]:v,[g]:x});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[l]:a,[g]:s}}}}}},kc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:c=!0,crossAxis:d=!0}=We(e,t),u={x:r,y:n},g=et(o),l=sn(g);let v=u[l],x=u[g];const h=We(i,t),y=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const C=l==="y"?"height":"width",P=a.reference[l]-a.floating[C]+y.mainAxis,R=a.reference[l]+a.reference[C]-y.mainAxis;v<P?v=P:v>R&&(v=R)}if(d){var E,b;const C=l==="y"?"width":"height",P=["top","left"].includes(Ve(o)),R=a.reference[g]-a.floating[C]+(P&&((E=s.offset)==null?void 0:E[g])||0)+(P?0:y.crossAxis),D=a.reference[g]+a.reference[C]+(P?0:((b=s.offset)==null?void 0:b[g])||0)-(P?y.crossAxis:0);x<R?x=R:x>D&&(x=D)}return{[l]:v,[g]:x}}}},_c=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:c=()=>{},...d}=We(e,t),u=await Mt(t,d),g=Ve(o),l=Rt(o),v=et(o)==="y",{width:x,height:h}=a.floating;let y,E;g==="top"||g==="bottom"?(y=g,E=l===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(E=g,y=l==="end"?"top":"bottom");const b=h-u.top-u.bottom,C=x-u.left-u.right,P=Ze(h-u[y],b),R=Ze(x-u[E],C),D=!t.middlewareData.shift;let O=P,N=R;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(O=b),D&&!l){const H=be(u.left,0),U=be(u.right,0),_=be(u.top,0),Y=be(u.bottom,0);v?N=x-2*(H!==0||U!==0?H+U:be(u.left,u.right)):O=h-2*(_!==0||Y!==0?_+Y:be(u.top,u.bottom))}await c({...t,availableWidth:N,availableHeight:O});const V=await s.getDimensions(i.floating);return x!==V.width||h!==V.height?{reset:{rects:!0}}:{}}}};function dr(){return typeof window<"u"}function At(e){return Pa(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Me(e){var t;return(t=(Pa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Pa(e){return dr()?e instanceof Node||e instanceof ye(e).Node:!1}function Ae(e){return dr()?e instanceof Element||e instanceof ye(e).Element:!1}function je(e){return dr()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function zn(e){return!dr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Ft(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function jc(e){return["table","td","th"].includes(At(e))}function fr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function un(e){const t=dn(),r=Ae(e)?Te(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Mc(e){let t=tt(e);for(;je(t)&&!Et(t);){if(un(t))return t;if(fr(t))return null;t=tt(t)}return null}function dn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Et(e){return["html","body","#document"].includes(At(e))}function Te(e){return ye(e).getComputedStyle(e)}function pr(e){return Ae(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tt(e){if(At(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zn(e)&&e.host||Me(e);return zn(t)?t.host:t}function Ra(e){const t=tt(e);return Et(t)?e.ownerDocument?e.ownerDocument.body:e.body:je(t)&&Ft(t)?t:Ra(t)}function Lt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Ra(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=ye(o);if(a){const i=Wr(s);return t.concat(s,s.visualViewport||[],Ft(o)?o:[],i&&r?Lt(i):[])}return t.concat(o,Lt(o,[],r))}function Wr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Aa(e){const t=Te(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=je(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,i=or(r)!==a||or(n)!==s;return i&&(r=a,n=s),{width:r,height:n,$:i}}function fn(e){return Ae(e)?e:e.contextElement}function wt(e){const t=fn(e);if(!je(t))return Qe(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=Aa(t);let s=(a?or(r.width):r.width)/n,i=(a?or(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Lc=Qe(0);function Ta(e){const t=ye(e);return!dn()||!t.visualViewport?Lc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ic(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ye(e)?!1:t}function ct(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=fn(e);let s=Qe(1);t&&(n?Ae(n)&&(s=wt(n)):s=wt(e));const i=Ic(a,r,n)?Ta(a):Qe(0);let c=(o.left+i.x)/s.x,d=(o.top+i.y)/s.y,u=o.width/s.x,g=o.height/s.y;if(a){const l=ye(a),v=n&&Ae(n)?ye(n):n;let x=l,h=Wr(x);for(;h&&n&&v!==x;){const y=wt(h),E=h.getBoundingClientRect(),b=Te(h),C=E.left+(h.clientLeft+parseFloat(b.paddingLeft))*y.x,P=E.top+(h.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,d*=y.y,u*=y.x,g*=y.y,c+=C,d+=P,x=ye(h),h=Wr(x)}}return sr({width:u,height:g,x:c,y:d})}function $c(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=Me(n),i=t?fr(t.floating):!1;if(n===s||i&&a)return r;let c={scrollLeft:0,scrollTop:0},d=Qe(1);const u=Qe(0),g=je(n);if((g||!g&&!a)&&((At(n)!=="body"||Ft(s))&&(c=pr(n)),je(n))){const l=ct(n);d=wt(n),u.x=l.x+n.clientLeft,u.y=l.y+n.clientTop}return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+u.x,y:r.y*d.y-c.scrollTop*d.y+u.y}}function Fc(e){return Array.from(e.getClientRects())}function Vr(e,t){const r=pr(e).scrollLeft;return t?t.left+r:ct(Me(e)).left+r}function Bc(e){const t=Me(e),r=pr(e),n=e.ownerDocument.body,o=be(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=be(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Vr(e);const i=-r.scrollTop;return Te(n).direction==="rtl"&&(s+=be(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:i}}function Wc(e,t){const r=ye(e),n=Me(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,c=0;if(o){a=o.width,s=o.height;const d=dn();(!d||d&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}return{width:a,height:s,x:i,y:c}}function Vc(e,t){const r=ct(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=je(e)?wt(e):Qe(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,c=o*a.x,d=n*a.y;return{width:s,height:i,x:c,y:d}}function Hn(e,t,r){let n;if(t==="viewport")n=Wc(e,r);else if(t==="document")n=Bc(Me(e));else if(Ae(t))n=Vc(t,r);else{const o=Ta(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return sr(n)}function Oa(e,t){const r=tt(e);return r===t||!Ae(r)||Et(r)?!1:Te(r).position==="fixed"||Oa(r,t)}function zc(e,t){const r=t.get(e);if(r)return r;let n=Lt(e,[],!1).filter(i=>Ae(i)&&At(i)!=="body"),o=null;const a=Te(e).position==="fixed";let s=a?tt(e):e;for(;Ae(s)&&!Et(s);){const i=Te(s),c=un(s);!c&&i.position==="fixed"&&(o=null),(a?!c&&!o:!c&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ft(s)&&!c&&Oa(e,s))?n=n.filter(u=>u!==s):o=i,s=tt(s)}return t.set(e,n),n}function Hc(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?fr(t)?[]:zc(t,this._c):[].concat(r),n],i=s[0],c=s.reduce((d,u)=>{const g=Hn(t,u,o);return d.top=be(g.top,d.top),d.right=Ze(g.right,d.right),d.bottom=Ze(g.bottom,d.bottom),d.left=be(g.left,d.left),d},Hn(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Uc(e){const{width:t,height:r}=Aa(e);return{width:t,height:r}}function Yc(e,t,r){const n=je(t),o=Me(t),a=r==="fixed",s=ct(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const c=Qe(0);if(n||!n&&!a)if((At(t)!=="body"||Ft(o))&&(i=pr(t)),n){const v=ct(t,!0,a,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&(c.x=Vr(o));let d=0,u=0;if(o&&!n&&!a){const v=o.getBoundingClientRect();u=v.top+i.scrollTop,d=v.left+i.scrollLeft-Vr(o,v)}const g=s.left+i.scrollLeft-c.x-d,l=s.top+i.scrollTop-c.y-u;return{x:g,y:l,width:s.width,height:s.height}}function Nr(e){return Te(e).position==="static"}function Un(e,t){if(!je(e)||Te(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Me(e)===r&&(r=r.ownerDocument.body),r}function Na(e,t){const r=ye(e);if(fr(e))return r;if(!je(e)){let o=tt(e);for(;o&&!Et(o);){if(Ae(o)&&!Nr(o))return o;o=tt(o)}return r}let n=Un(e,t);for(;n&&jc(n)&&Nr(n);)n=Un(n,t);return n&&Et(n)&&Nr(n)&&!un(n)?r:n||Mc(e)||r}const Gc=async function(e){const t=this.getOffsetParent||Na,r=this.getDimensions,n=await r(e.floating);return{reference:Yc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function qc(e){return Te(e).direction==="rtl"}const Kc={convertOffsetParentRelativeRectToViewportRelativeRect:$c,getDocumentElement:Me,getClippingRect:Hc,getOffsetParent:Na,getElementRects:Gc,getClientRects:Fc,getDimensions:Uc,getScale:wt,isElement:Ae,isRTL:qc};function Xc(e,t){let r=null,n;const o=Me(e);function a(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function s(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),a();const{left:d,top:u,width:g,height:l}=e.getBoundingClientRect();if(i||t(),!g||!l)return;const v=Jt(u),x=Jt(o.clientWidth-(d+g)),h=Jt(o.clientHeight-(u+l)),y=Jt(d),b={rootMargin:-v+"px "+-x+"px "+-h+"px "+-y+"px",threshold:be(0,Ze(1,c))||1};let C=!0;function P(R){const D=R[0].intersectionRatio;if(D!==c){if(!C)return s();D?s(!1,D):n=setTimeout(()=>{s(!1,1e-7)},1e3)}C=!1}try{r=new IntersectionObserver(P,{...b,root:o.ownerDocument})}catch{r=new IntersectionObserver(P,b)}r.observe(e)}return s(!0),a}function Jc(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,d=fn(e),u=o||a?[...d?Lt(d):[],...Lt(t)]:[];u.forEach(E=>{o&&E.addEventListener("scroll",r,{passive:!0}),a&&E.addEventListener("resize",r)});const g=d&&i?Xc(d,r):null;let l=-1,v=null;s&&(v=new ResizeObserver(E=>{let[b]=E;b&&b.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(l),l=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(t)})),r()}),d&&!c&&v.observe(d),v.observe(t));let x,h=c?ct(e):null;c&&y();function y(){const E=ct(e);h&&(E.x!==h.x||E.y!==h.y||E.width!==h.width||E.height!==h.height)&&r(),h=E,x=requestAnimationFrame(y)}return r(),()=>{var E;u.forEach(b=>{o&&b.removeEventListener("scroll",r),a&&b.removeEventListener("resize",r)}),g==null||g(),(E=v)==null||E.disconnect(),v=null,c&&cancelAnimationFrame(x)}}const Zc=Nc,Qc=Dc,eu=Ac,tu=_c,ru=Tc,Yn=Rc,nu=kc,ou=(e,t,r)=>{const n=new Map,o={platform:Kc,...r},a={...o.platform,_c:n};return Pc(e,t,{...o,platform:a})};var rr=typeof document<"u"?w.useLayoutEffect:w.useEffect;function ir(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ir(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!ir(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Da(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gn(e,t){const r=Da(e);return Math.round(t*r)/r}function Dr(e){const t=f.useRef(e);return rr(()=>{t.current=e}),t}function au(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:c,open:d}=e,[u,g]=f.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[l,v]=f.useState(n);ir(l,n)||v(n);const[x,h]=f.useState(null),[y,E]=f.useState(null),b=f.useCallback(A=>{A!==D.current&&(D.current=A,h(A))},[]),C=f.useCallback(A=>{A!==O.current&&(O.current=A,E(A))},[]),P=a||x,R=s||y,D=f.useRef(null),O=f.useRef(null),N=f.useRef(u),V=c!=null,H=Dr(c),U=Dr(o),_=Dr(d),Y=f.useCallback(()=>{if(!D.current||!O.current)return;const A={placement:t,strategy:r,middleware:l};U.current&&(A.platform=U.current),ou(D.current,O.current,A).then(B=>{const oe={...B,isPositioned:_.current!==!1};M.current&&!ir(N.current,oe)&&(N.current=oe,Kr.flushSync(()=>{g(oe)}))})},[l,t,r,U,_]);rr(()=>{d===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,g(A=>({...A,isPositioned:!1})))},[d]);const M=f.useRef(!1);rr(()=>(M.current=!0,()=>{M.current=!1}),[]),rr(()=>{if(P&&(D.current=P),R&&(O.current=R),P&&R){if(H.current)return H.current(P,R,Y);Y()}},[P,R,Y,H,V]);const X=f.useMemo(()=>({reference:D,floating:O,setReference:b,setFloating:C}),[b,C]),F=f.useMemo(()=>({reference:P,floating:R}),[P,R]),K=f.useMemo(()=>{const A={position:r,left:0,top:0};if(!F.floating)return A;const B=Gn(F.floating,u.x),oe=Gn(F.floating,u.y);return i?{...A,transform:"translate("+B+"px, "+oe+"px)",...Da(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:B,top:oe}},[r,i,F.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:Y,refs:X,elements:F,floatingStyles:K}),[u,Y,X,F,K])}const su=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Yn({element:n.current,padding:o}).fn(r):{}:n?Yn({element:n,padding:o}).fn(r):{}}}},iu=(e,t)=>({...Zc(e),options:[e,t]}),lu=(e,t)=>({...Qc(e),options:[e,t]}),cu=(e,t)=>({...nu(e),options:[e,t]}),uu=(e,t)=>({...eu(e),options:[e,t]}),du=(e,t)=>({...tu(e),options:[e,t]}),fu=(e,t)=>({...ru(e),options:[e,t]}),pu=(e,t)=>({...su(e),options:[e,t]});var gu="Arrow",ka=f.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return m.jsx(le.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});ka.displayName=gu;var vu=ka,pn="Popper",[_a,ja]=St(pn),[hu,Ma]=_a(pn),La=e=>{const{__scopePopper:t,children:r}=e,[n,o]=f.useState(null);return m.jsx(hu,{scope:t,anchor:n,onAnchorChange:o,children:r})};La.displayName=pn;var Ia="PopperAnchor",$a=f.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=Ma(Ia,r),s=f.useRef(null),i=pe(t,s);return f.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||s.current)}),n?null:m.jsx(le.div,{...o,ref:i})});$a.displayName=Ia;var gn="PopperContent",[mu,bu]=_a(gn),Fa=f.forwardRef((e,t)=>{var xe,ge,we,ve,ut,Le;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:g="partial",hideWhenDetached:l=!1,updatePositionStrategy:v="optimized",onPlaced:x,...h}=e,y=Ma(gn,r),[E,b]=f.useState(null),C=pe(t,Ne=>b(Ne)),[P,R]=f.useState(null),D=ma(P),O=(D==null?void 0:D.width)??0,N=(D==null?void 0:D.height)??0,V=n+(a!=="center"?"-"+a:""),H=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},U=Array.isArray(d)?d:[d],_=U.length>0,Y={padding:H,boundary:U.filter(xu),altBoundary:_},{refs:M,floatingStyles:X,placement:F,isPositioned:K,middlewareData:A}=au({strategy:"fixed",placement:V,whileElementsMounted:(...Ne)=>Jc(...Ne,{animationFrame:v==="always"}),elements:{reference:y.anchor},middleware:[iu({mainAxis:o+N,alignmentAxis:s}),c&&lu({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?cu():void 0,...Y}),c&&uu({...Y}),du({...Y,apply:({elements:Ne,rects:rt,availableWidth:Ie,availableHeight:Re})=>{const{width:dt,height:He}=rt.reference,ie=Ne.floating.style;ie.setProperty("--radix-popper-available-width",`${Ie}px`),ie.setProperty("--radix-popper-available-height",`${Re}px`),ie.setProperty("--radix-popper-anchor-width",`${dt}px`),ie.setProperty("--radix-popper-anchor-height",`${He}px`)}}),P&&pu({element:P,padding:i}),wu({arrowWidth:O,arrowHeight:N}),l&&fu({strategy:"referenceHidden",...Y})]}),[B,oe]=Va(F),I=Je(x);it(()=>{K&&(I==null||I())},[K,I]);const W=(xe=A.arrow)==null?void 0:xe.x,k=(ge=A.arrow)==null?void 0:ge.y,J=((we=A.arrow)==null?void 0:we.centerOffset)!==0,[te,G]=f.useState();return it(()=>{E&&G(window.getComputedStyle(E).zIndex)},[E]),m.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:K?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[(ve=A.transformOrigin)==null?void 0:ve.x,(ut=A.transformOrigin)==null?void 0:ut.y].join(" "),...((Le=A.hide)==null?void 0:Le.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(mu,{scope:r,placedSide:B,onArrowChange:R,arrowX:W,arrowY:k,shouldHideArrow:J,children:m.jsx(le.div,{"data-side":B,"data-align":oe,...h,ref:C,style:{...h.style,animation:K?void 0:"none"}})})})});Fa.displayName=gn;var Ba="PopperArrow",yu={top:"bottom",right:"left",bottom:"top",left:"right"},Wa=f.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=bu(Ba,n),s=yu[a.placedSide];return m.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:m.jsx(vu,{...o,ref:r,style:{...o.style,display:"block"}})})});Wa.displayName=Ba;function xu(e){return e!==null}var wu=e=>({name:"transformOrigin",options:e,fn(t){var y,E,b;const{placement:r,rects:n,middlewareData:o}=t,s=((y=o.arrow)==null?void 0:y.centerOffset)!==0,i=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[d,u]=Va(r),g={start:"0%",center:"50%",end:"100%"}[u],l=(((E=o.arrow)==null?void 0:E.x)??0)+i/2,v=(((b=o.arrow)==null?void 0:b.y)??0)+c/2;let x="",h="";return d==="bottom"?(x=s?g:`${l}px`,h=`${-c}px`):d==="top"?(x=s?g:`${l}px`,h=`${n.floating.height+c}px`):d==="right"?(x=`${-c}px`,h=s?g:`${v}px`):d==="left"&&(x=`${n.floating.width+c}px`,h=s?g:`${v}px`),{data:{x,y:h}}}});function Va(e){const[t,r="center"]=e.split("-");return[t,r]}var Eu=La,Cu=$a,Su=Fa,Pu=Wa,Ru="VisuallyHidden",za=f.forwardRef((e,t)=>m.jsx(le.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));za.displayName=Ru;var Au=za,[gr,of]=St("Tooltip",[ja]),vr=ja(),Ha="TooltipProvider",Tu=700,zr="tooltip.open",[Ou,vn]=gr(Ha),Ua=e=>{const{__scopeTooltip:t,delayDuration:r=Tu,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,[s,i]=f.useState(!0),c=f.useRef(!1),d=f.useRef(0);return f.useEffect(()=>{const u=d.current;return()=>window.clearTimeout(u)},[]),m.jsx(Ou,{scope:t,isOpenDelayed:s,delayDuration:r,onOpen:f.useCallback(()=>{window.clearTimeout(d.current),i(!1)},[]),onClose:f.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>i(!0),n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:f.useCallback(u=>{c.current=u},[]),disableHoverableContent:o,children:a})};Ua.displayName=Ha;var hr="Tooltip",[Nu,mr]=gr(hr),Ya=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,c=vn(hr,e.__scopeTooltip),d=vr(t),[u,g]=f.useState(null),l=Qt(),v=f.useRef(0),x=s??c.disableHoverableContent,h=i??c.delayDuration,y=f.useRef(!1),[E=!1,b]=Xr({prop:n,defaultProp:o,onChange:O=>{O?(c.onOpen(),document.dispatchEvent(new CustomEvent(zr))):c.onClose(),a==null||a(O)}}),C=f.useMemo(()=>E?y.current?"delayed-open":"instant-open":"closed",[E]),P=f.useCallback(()=>{window.clearTimeout(v.current),y.current=!1,b(!0)},[b]),R=f.useCallback(()=>{window.clearTimeout(v.current),b(!1)},[b]),D=f.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{y.current=!0,b(!0)},h)},[h,b]);return f.useEffect(()=>()=>window.clearTimeout(v.current),[]),m.jsx(Eu,{...d,children:m.jsx(Nu,{scope:t,contentId:l,open:E,stateAttribute:C,trigger:u,onTriggerChange:g,onTriggerEnter:f.useCallback(()=>{c.isOpenDelayed?D():P()},[c.isOpenDelayed,D,P]),onTriggerLeave:f.useCallback(()=>{x?R():window.clearTimeout(v.current)},[R,x]),onOpen:P,onClose:R,disableHoverableContent:x,children:r})})};Ya.displayName=hr;var Hr="TooltipTrigger",Ga=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=mr(Hr,r),a=vn(Hr,r),s=vr(r),i=f.useRef(null),c=pe(t,i,o.onTriggerChange),d=f.useRef(!1),u=f.useRef(!1),g=f.useCallback(()=>d.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),m.jsx(Cu,{asChild:!0,...s,children:m.jsx(le.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:ue(e.onPointerMove,l=>{l.pointerType!=="touch"&&!u.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:ue(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:ue(e.onBlur,o.onClose),onClick:ue(e.onClick,o.onClose)})})});Ga.displayName=Hr;var Du="TooltipPortal",[af,ku]=gr(Du,{forceMount:void 0}),Ct="TooltipContent",qa=f.forwardRef((e,t)=>{const r=ku(Ct,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=mr(Ct,e.__scopeTooltip);return m.jsx($t,{present:n||s.open,children:s.disableHoverableContent?m.jsx(Ka,{side:o,...a,ref:t}):m.jsx(_u,{side:o,...a,ref:t})})}),_u=f.forwardRef((e,t)=>{const r=mr(Ct,e.__scopeTooltip),n=vn(Ct,e.__scopeTooltip),o=f.useRef(null),a=pe(t,o),[s,i]=f.useState(null),{trigger:c,onClose:d}=r,u=o.current,{onPointerInTransitChange:g}=n,l=f.useCallback(()=>{i(null),g(!1)},[g]),v=f.useCallback((x,h)=>{const y=x.currentTarget,E={x:x.clientX,y:x.clientY},b=Lu(E,y.getBoundingClientRect()),C=Iu(E,b),P=$u(h.getBoundingClientRect()),R=Bu([...C,...P]);i(R),g(!0)},[g]);return f.useEffect(()=>()=>l(),[l]),f.useEffect(()=>{if(c&&u){const x=y=>v(y,u),h=y=>v(y,c);return c.addEventListener("pointerleave",x),u.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",x),u.removeEventListener("pointerleave",h)}}},[c,u,v,l]),f.useEffect(()=>{if(s){const x=h=>{const y=h.target,E={x:h.clientX,y:h.clientY},b=(c==null?void 0:c.contains(y))||(u==null?void 0:u.contains(y)),C=!Fu(E,s);b?l():C&&(l(),d())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,u,s,d,l]),m.jsx(Ka,{...e,ref:a})}),[ju,Mu]=gr(hr,{isInside:!1}),Ka=f.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,c=mr(Ct,r),d=vr(r),{onClose:u}=c;return f.useEffect(()=>(document.addEventListener(zr,u),()=>document.removeEventListener(zr,u)),[u]),f.useEffect(()=>{if(c.trigger){const g=l=>{const v=l.target;v!=null&&v.contains(c.trigger)&&u()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[c.trigger,u]),m.jsx(Zr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:g=>g.preventDefault(),onDismiss:u,children:m.jsxs(Su,{"data-state":c.stateAttribute,...d,...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:[m.jsx(Jr,{children:n}),m.jsx(ju,{scope:r,isInside:!0,children:m.jsx(Au,{id:c.contentId,role:"tooltip",children:o||n})})]})})});qa.displayName=Ct;var Xa="TooltipArrow",Ja=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=vr(r);return Mu(Xa,r).isInside?null:m.jsx(Pu,{...o,...n,ref:t})});Ja.displayName=Xa;function Lu(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Iu(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function $u(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Fu(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,c=t[a].y,d=t[s].x,u=t[s].y;c>n!=u>n&&r<(d-i)*(n-c)/(u-c)+i&&(o=!o)}return o}function Bu(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Wu(t)}function Wu(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Vu=Ua,zu=Ya,Hu=Ga,Za=qa,Uu=Ja;const Qa=Vu,es=zu,ts=Hu,rs=Uu,hn=f.forwardRef(({className:e,sideOffset:t=4,...r},n)=>m.jsx(Za,{ref:n,sideOffset:t,className:fe("ve-z-50 ve-overflow-hidden ve-rounded-[6px] ve-bg-popover ve-px-3 ve-py-1.5 ve-text-sm ve-text-popover-foreground",e),...r}));hn.displayName=Za.displayName;const Yu=({displayName:e,fieldId:t,children:r})=>{const{tooltipsVisible:n}=os();let o="";return e&&t?o=`${e} (${t})`:t?o=`(${t})`:e&&(o=`${e}`),m.jsx("div",{children:m.jsx(Qa,{children:m.jsxs(es,{open:n&&!!o,children:[m.jsx(ts,{asChild:!0,children:m.jsx("div",{className:n?"ve-outline-2 ve-outline-dotted ve-outline-[#5A58F2]":"",children:r})}),m.jsxs(hn,{children:[m.jsx("p",{children:o}),m.jsx(rs,{fill:"bg-popover"})]})]})})})},ns=w.createContext(void 0),Gu=({children:e})=>{const[t,r]=w.useState(!1),n=()=>{r(o=>!o)};return m.jsx(ns.Provider,{value:{tooltipsVisible:t,toggleTooltips:n},children:e})},os=()=>{const e=w.useContext(ns);return e||{tooltipsVisible:!1,toggleTooltips:()=>{}}},qu=(e,t,r,n,o,a)=>{const{history:{back:s,forward:i,histories:c,index:d,hasPast:u,hasFuture:g,setHistories:l}}=_e.usePuck();return w.useEffect(()=>{t(c,d)},[d,c,t]),m.jsxs("header",{className:"puck-header",children:[m.jsxs("div",{className:"header-left",children:[m.jsx(Xu,{}),m.jsx(Ju,{})]}),m.jsx("div",{className:"header-center"}),m.jsxs("div",{className:"actions",children:[m.jsx(Xe,{variant:"ghost",size:"icon",disabled:!u,onClick:s,children:m.jsx(_s,{className:"sm-icon"})}),m.jsx(Xe,{variant:"ghost",size:"icon",disabled:!g,onClick:i,children:m.jsx(js,{className:"sm-icon"})}),m.jsx(Ku,{disabled:c.length===1,onClearLocalChanges:()=>{e(),l([{id:"root",state:{data:n}}])}}),!a&&m.jsx(Xe,{variant:"secondary",disabled:c.length===1,onClick:async()=>{await o(r),e()},children:"Publish"})]})]})},Ku=({disabled:e,onClearLocalChanges:t})=>{const[r,n]=w.useState(!1),o=()=>{t(),n(!1)};return m.jsxs(sc,{open:r,onOpenChange:n,children:[m.jsx(ic,{disabled:e,asChild:!0,children:m.jsx(Xe,{variant:"outline",children:"Clear Local Changes"})}),m.jsxs(da,{children:[m.jsxs(fa,{children:[m.jsx(ga,{children:"Clear Local Changes"}),m.jsx(va,{children:"This action will remove your local changes. It cannot be undone."})]}),m.jsxs(pa,{children:[m.jsx(ha,{children:"Cancel"}),m.jsx(Xe,{onClick:o,children:"Confirm"})]})]})]})},Xu=()=>{const{dispatch:e,appState:{ui:{leftSideBarVisible:t,rightSideBarVisible:r}}}=_e.usePuck(),n=w.useCallback(o=>{const a=window.matchMedia("(min-width: 638px)").matches,s=o==="left"?t:r,i=o==="left"?"rightSideBarVisible":"leftSideBarVisible";e({type:"setUi",ui:{[`${o}SideBarVisible`]:!s,...a?{}:{[i]:!1}}})},[e,t,r]);return m.jsxs(m.Fragment,{children:[m.jsx(Xe,{variant:"ghost",size:"icon",onClick:()=>{n("left")},children:m.jsx(Ds,{className:"sm-icon"})}),m.jsx(Xe,{variant:"ghost",size:"icon",onClick:()=>{n("right")},children:m.jsx(ks,{className:"sm-icon"})})]})},Ju=()=>{const{toggleTooltips:e,tooltipsVisible:t}=os();return m.jsx(Qa,{children:m.jsxs(es,{children:[m.jsx(ts,{asChild:!0,children:m.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[m.jsx(Ca,{onCheckedChange:e,checked:t}),m.jsx("p",{className:"ve-self-center ve-text-sm",children:"Entity Fields"})]})}),m.jsxs(hn,{children:[t?"Hide Entity Fields":"Show Entity Fields",m.jsx(rs,{fill:"ve-bg-popover"})]})]})})},qn="ROLE_",Kn="TEMPLATE_",Zu="LAYOUT_",Qu="ENTITY_";function Ur(e,t,r,n,o){const a=e?"dev":"";if(!t||!r||!o&&!n)throw new Error("Unable to generate local storage key, missing query parameters");if(t===Bd.INDIVIDUAL){if(!o)throw new Error(`EntityId required for role ${t}`);return a+qn+t+Kn+r+Qu+o}if(!n)throw new Error(`LayoutId required for role ${t}`);return a+qn+t+Kn+r+Zu+n}const ed=({puckConfig:e,puckInitialHistory:t,isLoading:r,clearHistory:n,templateMetadata:o,saveState:a,saveSaveState:s,saveVisualConfigData:i,sendDevSaveStateData:c,buildLocalStorageKey:d,devLogger:u})=>{const[g,l]=w.useState(!1),v=w.useRef(0),x=w.useCallback((b,C)=>{C!==0&&v.current!==C&&b.length>0&&(u.logFunc("handleHistoryChange"),u.logData("PUCK_INDEX",C),u.logData("PUCK_HISTORY",b),v.current=C,u.logFunc("saveToLocalStorage"),window.localStorage.setItem(d(),JSON.stringify(b)),(a==null?void 0:a.hash)!==b[C].id&&(o.isDevMode&&!o.devOverride?(u.logFunc("sendDevSaveStateData"),c({payload:{devSaveStateData:JSON.stringify(b[C].state.data)}})):(u.logFunc("saveSaveState"),s({payload:{hash:b[C].id,history:JSON.stringify(b[C].state)}}))))},[o,Ur,a]),h=()=>{n(),v.current=0},y=async b=>{u.logFunc("saveVisualConfigData"),i({payload:{visualConfigurationData:JSON.stringify(b)}})},E=async()=>{if(!r&&!g){l(!0);return}};return m.jsx(Gu,{children:m.jsx(_e.Puck,{config:e,data:{},initialHistory:t,onChange:E,overrides:{header:()=>{const{appState:b}=_e.usePuck();return qu(h,x,b.data,t==null?void 0:t.histories[0].state.data,y,o.isDevMode&&!o.devOverride)}}})})};var mn="Progress",bn=100,[td,sf]=St(mn),[rd,nd]=td(mn),as=f.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:a=od,...s}=e;(o||o===0)&&!Xn(o)&&console.error(ad(`${o}`,"Progress"));const i=Xn(o)?o:bn;n!==null&&!Jn(n,i)&&console.error(sd(`${n}`,"Progress"));const c=Jn(n,i)?n:null,d=lr(c)?a(c,i):void 0;return m.jsx(rd,{scope:r,value:c,max:i,children:m.jsx(le.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":lr(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":ls(c,i),"data-value":c??void 0,"data-max":i,...s,ref:t})})});as.displayName=mn;var ss="ProgressIndicator",is=f.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=nd(ss,r);return m.jsx(le.div,{"data-state":ls(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});is.displayName=ss;function od(e,t){return`${Math.round(e/t*100)}%`}function ls(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function lr(e){return typeof e=="number"}function Xn(e){return lr(e)&&!isNaN(e)&&e>0}function Jn(e,t){return lr(e)&&!isNaN(e)&&e<=t&&e>=0}function ad(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${bn}\`.`}function sd(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
118
118
  - a positive number
119
119
  - less than the value passed to \`max\` (or ${bn} if no \`max\` prop is set)
120
120
  - \`null\` or \`undefined\` if the progress is indeterminate.
121
121
 
122
122
  Defaulting to \`null\`.`}var cs=as,id=is;const us=f.forwardRef(({className:e,value:t,...r},n)=>m.jsx(cs,{ref:n,className:fe("ve-relative ve-h-4 ve-w-full ve-overflow-hidden ve-rounded-full ve-bg-secondary",e),...r,children:m.jsx(id,{className:"ve-h-full ve-w-full ve-flex-1 ve-bg-primary ve-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));us.displayName=cs.displayName;function ld({progress:e}){return m.jsxs("div",{className:"ve-flex ve-h-screen ve-loading-wrapper ve-w-screen ve-flex-col ve-items-center ve-justify-center",children:[m.jsx(us,{className:"ve-w-1/3 ve-loading-progress",value:e}),m.jsx("div",{children:"Loading Visual Editor..."})]})}var Zn=["light","dark"],cd="(prefers-color-scheme: dark)",ud=f.createContext(void 0),dd={setTheme:e=>{},themes:[]},fd=()=>{var e;return(e=f.useContext(ud))!=null?e:dd};f.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:o,defaultTheme:a,value:s,attrs:i,nonce:c})=>{let d=a==="system",u=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${i.map(x=>`'${x}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,g=o?Zn.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",l=(x,h=!1,y=!0)=>{let E=s?s[x]:x,b=h?x+"|| ''":`'${E}'`,C="";return o&&y&&!h&&Zn.includes(x)&&(C+=`d.style.colorScheme = '${x}';`),r==="class"?h||E?C+=`c.add(${b})`:C+="null":E&&(C+=`d[s](n,${b})`),C},v=e?`!function(){${u}${l(e)}}()`:n?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${d})){var t='${cd}',m=window.matchMedia(t);if(m.media!==t||m.matches){${l("dark")}}else{${l("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${l(s?"x[e]":"e",!0)}}${d?"":"else{"+l(a,!1,!1)+"}"}${g}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${l(s?"x[e]":"e",!0)}}else{${l(a,!1,!1)};}${g}}catch(t){}}();`;return f.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:v}})});var pd=e=>{switch(e){case"success":return hd;case"info":return bd;case"warning":return md;case"error":return yd;default:return null}},gd=Array(12).fill(0),vd=({visible:e})=>w.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},w.createElement("div",{className:"sonner-spinner"},gd.map((t,r)=>w.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),hd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),md=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),bd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),yd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),xd=()=>{let[e,t]=w.useState(document.hidden);return w.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Yr=1,wd=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Yr++,a=this.toasts.find(i=>i.id===o),s=e.dismissible===void 0?!0:e.dismissible;return a?this.toasts=this.toasts.map(i=>i.id===o?(this.publish({...i,...e,id:o,title:r}),{...i,...e,id:o,dismissible:s,title:r}):i):this.addToast({title:r,...n,dismissible:s,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),o=r!==void 0;return n.then(async a=>{if(Cd(a)&&!a.ok){o=!1;let s=typeof t.error=="function"?await t.error(`HTTP error! status: ${a.status}`):t.error,i=typeof t.description=="function"?await t.description(`HTTP error! status: ${a.status}`):t.description;this.create({id:r,type:"error",message:s,description:i})}else if(t.success!==void 0){o=!1;let s=typeof t.success=="function"?await t.success(a):t.success,i=typeof t.description=="function"?await t.description(a):t.description;this.create({id:r,type:"success",message:s,description:i})}}).catch(async a=>{if(t.error!==void 0){o=!1;let s=typeof t.error=="function"?await t.error(a):t.error,i=typeof t.description=="function"?await t.description(a):t.description;this.create({id:r,type:"error",message:s,description:i})}}).finally(()=>{var a;o&&(this.dismiss(r),r=void 0),(a=t.finally)==null||a.call(t)}),r},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Yr++;return this.create({jsx:e(r),id:r,...t}),r},this.subscribers=[],this.toasts=[]}},me=new wd,Ed=(e,t)=>{let r=(t==null?void 0:t.id)||Yr++;return me.addToast({title:e,...t,id:r}),r},Cd=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Sd=Ed,Pd=()=>me.toasts;Object.assign(Sd,{success:me.success,info:me.info,warning:me.warning,error:me.error,custom:me.custom,message:me.message,promise:me.promise,dismiss:me.dismiss,loading:me.loading},{getHistory:Pd});function Rd(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Rd(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
123
- `);function Zt(e){return e.label!==void 0}var Ad=3,Td="32px",Od=4e3,Nd=356,Dd=14,kd=20,_d=200;function jd(...e){return e.filter(Boolean).join(" ")}var Md=e=>{var t,r,n,o,a,s,i,c,d,u;let{invert:g,toast:l,unstyled:v,interacting:x,setHeights:h,visibleToasts:y,heights:E,index:b,toasts:C,expanded:P,removeToast:R,defaultRichColors:D,closeButton:O,style:N,cancelButtonStyle:z,actionButtonStyle:H,className:U="",descriptionClassName:_="",duration:Y,position:M,gap:X,loadingIcon:F,expandByDefault:K,classNames:A,icons:B,closeButtonAriaLabel:oe="Close toast",pauseWhenPageIsHidden:I,cn:W}=e,[k,J]=w.useState(!1),[te,G]=w.useState(!1),[xe,ge]=w.useState(!1),[we,ve]=w.useState(!1),[ut,Le]=w.useState(0),[Ne,rt]=w.useState(0),Ie=w.useRef(null),Re=w.useRef(null),dt=b===0,He=b+1<=y,ie=l.type,Ee=l.dismissible!==!1,Tt=l.className||"",br=l.descriptionClassName||"",nt=w.useMemo(()=>E.findIndex(L=>L.toastId===l.id)||0,[E,l.id]),Bt=w.useMemo(()=>{var L;return(L=l.closeButton)!=null?L:O},[l.closeButton,O]),ft=w.useMemo(()=>l.duration||Y||Od,[l.duration,Y]),Ot=w.useRef(0),Ue=w.useRef(0),Wt=w.useRef(0),Ye=w.useRef(null),[zt,yr]=M.split("-"),Vt=w.useMemo(()=>E.reduce((L,Q,Z)=>Z>=nt?L:L+Q.height,0),[E,nt]),pt=xd(),Ht=l.invert||g,De=ie==="loading";Ue.current=w.useMemo(()=>nt*X+Vt,[nt,Vt]),w.useEffect(()=>{J(!0)},[]),w.useLayoutEffect(()=>{if(!k)return;let L=Re.current,Q=L.style.height;L.style.height="auto";let Z=L.getBoundingClientRect().height;L.style.height=Q,rt(Z),h(Se=>Se.find(he=>he.toastId===l.id)?Se.map(he=>he.toastId===l.id?{...he,height:Z}:he):[{toastId:l.id,height:Z,position:l.position},...Se])},[k,l.title,l.description,h,l.id]);let Ce=w.useCallback(()=>{G(!0),Le(Ue.current),h(L=>L.filter(Q=>Q.toastId!==l.id)),setTimeout(()=>{R(l)},_d)},[l,R,h,Ue]);w.useEffect(()=>{if(l.promise&&ie==="loading"||l.duration===1/0||l.type==="loading")return;let L,Q=ft;return P||x||I&&pt?(()=>{if(Wt.current<Ot.current){let Z=new Date().getTime()-Ot.current;Q=Q-Z}Wt.current=new Date().getTime()})():Q!==1/0&&(Ot.current=new Date().getTime(),L=setTimeout(()=>{var Z;(Z=l.onAutoClose)==null||Z.call(l,l),Ce()},Q)),()=>clearTimeout(L)},[P,x,K,l,ft,Ce,l.promise,ie,I,pt]),w.useEffect(()=>{let L=Re.current;if(L){let Q=L.getBoundingClientRect().height;return rt(Q),h(Z=>[{toastId:l.id,height:Q,position:l.position},...Z]),()=>h(Z=>Z.filter(Se=>Se.toastId!==l.id))}},[h,l.id]),w.useEffect(()=>{l.delete&&Ce()},[Ce,l.delete]);function Nt(){return B!=null&&B.loading?w.createElement("div",{className:"sonner-loader","data-visible":ie==="loading"},B.loading):F?w.createElement("div",{className:"sonner-loader","data-visible":ie==="loading"},F):w.createElement(vd,{visible:ie==="loading"})}return w.createElement("li",{"aria-live":l.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:Re,className:W(U,Tt,A==null?void 0:A.toast,(t=l==null?void 0:l.classNames)==null?void 0:t.toast,A==null?void 0:A.default,A==null?void 0:A[ie],(r=l==null?void 0:l.classNames)==null?void 0:r[ie]),"data-sonner-toast":"","data-rich-colors":(n=l.richColors)!=null?n:D,"data-styled":!(l.jsx||l.unstyled||v),"data-mounted":k,"data-promise":!!l.promise,"data-removed":te,"data-visible":He,"data-y-position":zt,"data-x-position":yr,"data-index":b,"data-front":dt,"data-swiping":xe,"data-dismissible":Ee,"data-type":ie,"data-invert":Ht,"data-swipe-out":we,"data-expanded":!!(P||K&&k),style:{"--index":b,"--toasts-before":b,"--z-index":C.length-b,"--offset":`${te?ut:Ue.current}px`,"--initial-height":K?"auto":`${Ne}px`,...N,...l.style},onPointerDown:L=>{De||!Ee||(Ie.current=new Date,Le(Ue.current),L.target.setPointerCapture(L.pointerId),L.target.tagName!=="BUTTON"&&(ge(!0),Ye.current={x:L.clientX,y:L.clientY}))},onPointerUp:()=>{var L,Q,Z,Se;if(we||!Ee)return;Ye.current=null;let he=Number(((L=Re.current)==null?void 0:L.style.getPropertyValue("--swipe-amount").replace("px",""))||0),ot=new Date().getTime()-((Q=Ie.current)==null?void 0:Q.getTime()),xr=Math.abs(he)/ot;if(Math.abs(he)>=kd||xr>.11){Le(Ue.current),(Z=l.onDismiss)==null||Z.call(l,l),Ce(),ve(!0);return}(Se=Re.current)==null||Se.style.setProperty("--swipe-amount","0px"),ge(!1)},onPointerMove:L=>{var Q;if(!Ye.current||!Ee)return;let Z=L.clientY-Ye.current.y,Se=L.clientX-Ye.current.x,he=(zt==="top"?Math.min:Math.max)(0,Z),ot=L.pointerType==="touch"?10:2;Math.abs(he)>ot?(Q=Re.current)==null||Q.style.setProperty("--swipe-amount",`${Z}px`):Math.abs(Se)>ot&&(Ye.current=null)}},Bt&&!l.jsx?w.createElement("button",{"aria-label":oe,"data-disabled":De,"data-close-button":!0,onClick:De||!Ee?()=>{}:()=>{var L;Ce(),(L=l.onDismiss)==null||L.call(l,l)},className:W(A==null?void 0:A.closeButton,(o=l==null?void 0:l.classNames)==null?void 0:o.closeButton)},w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},w.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),w.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,l.jsx||w.isValidElement(l.title)?l.jsx||l.title:w.createElement(w.Fragment,null,ie||l.icon||l.promise?w.createElement("div",{"data-icon":"",className:W(A==null?void 0:A.icon,(a=l==null?void 0:l.classNames)==null?void 0:a.icon)},l.promise||l.type==="loading"&&!l.icon?l.icon||Nt():null,l.type!=="loading"?l.icon||(B==null?void 0:B[ie])||pd(ie):null):null,w.createElement("div",{"data-content":"",className:W(A==null?void 0:A.content,(s=l==null?void 0:l.classNames)==null?void 0:s.content)},w.createElement("div",{"data-title":"",className:W(A==null?void 0:A.title,(i=l==null?void 0:l.classNames)==null?void 0:i.title)},l.title),l.description?w.createElement("div",{"data-description":"",className:W(_,br,A==null?void 0:A.description,(c=l==null?void 0:l.classNames)==null?void 0:c.description)},l.description):null),w.isValidElement(l.cancel)?l.cancel:l.cancel&&Zt(l.cancel)?w.createElement("button",{"data-button":!0,"data-cancel":!0,style:l.cancelButtonStyle||z,onClick:L=>{var Q,Z;Zt(l.cancel)&&Ee&&((Z=(Q=l.cancel).onClick)==null||Z.call(Q,L),Ce())},className:W(A==null?void 0:A.cancelButton,(d=l==null?void 0:l.classNames)==null?void 0:d.cancelButton)},l.cancel.label):null,w.isValidElement(l.action)?l.action:l.action&&Zt(l.action)?w.createElement("button",{"data-button":!0,"data-action":!0,style:l.actionButtonStyle||H,onClick:L=>{var Q,Z;Zt(l.action)&&(L.defaultPrevented||((Z=(Q=l.action).onClick)==null||Z.call(Q,L),Ce()))},className:W(A==null?void 0:A.actionButton,(u=l==null?void 0:l.classNames)==null?void 0:u.actionButton)},l.action.label):null))};function Qn(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var Ld=e=>{let{invert:t,position:r="bottom-right",hotkey:n=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:i,theme:c="light",richColors:d,duration:u,style:g,visibleToasts:l=Ad,toastOptions:v,dir:x=Qn(),gap:h=Dd,loadingIcon:y,icons:E,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:C,cn:P=jd}=e,[R,D]=w.useState([]),O=w.useMemo(()=>Array.from(new Set([r].concat(R.filter(I=>I.position).map(I=>I.position)))),[R,r]),[N,z]=w.useState([]),[H,U]=w.useState(!1),[_,Y]=w.useState(!1),[M,X]=w.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),F=w.useRef(null),K=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=w.useRef(null),B=w.useRef(!1),oe=w.useCallback(I=>{var W;(W=R.find(k=>k.id===I.id))!=null&&W.delete||me.dismiss(I.id),D(k=>k.filter(({id:J})=>J!==I.id))},[R]);return w.useEffect(()=>me.subscribe(I=>{if(I.dismiss){D(W=>W.map(k=>k.id===I.id?{...k,delete:!0}:k));return}setTimeout(()=>{qr.flushSync(()=>{D(W=>{let k=W.findIndex(J=>J.id===I.id);return k!==-1?[...W.slice(0,k),{...W[k],...I},...W.slice(k+1)]:[I,...W]})})})}),[]),w.useEffect(()=>{if(c!=="system"){X(c);return}c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:I})=>{X(I?"dark":"light")})},[c]),w.useEffect(()=>{R.length<=1&&U(!1)},[R]),w.useEffect(()=>{let I=W=>{var k,J;n.every(te=>W[te]||W.code===te)&&(U(!0),(k=F.current)==null||k.focus()),W.code==="Escape"&&(document.activeElement===F.current||(J=F.current)!=null&&J.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[n]),w.useEffect(()=>{if(F.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,B.current=!1)}},[F.current]),R.length?w.createElement("section",{"aria-label":`${b} ${K}`,tabIndex:-1},O.map((I,W)=>{var k;let[J,te]=I.split("-");return w.createElement("ol",{key:I,dir:x==="auto"?Qn():x,tabIndex:-1,ref:F,className:s,"data-sonner-toaster":!0,"data-theme":M,"data-y-position":J,"data-x-position":te,style:{"--front-toast-height":`${((k=N[0])==null?void 0:k.height)||0}px`,"--offset":typeof i=="number"?`${i}px`:i||Td,"--width":`${Nd}px`,"--gap":`${h}px`,...g},onBlur:G=>{B.current&&!G.currentTarget.contains(G.relatedTarget)&&(B.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||B.current||(B.current=!0,A.current=G.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{_||U(!1)},onPointerDown:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||Y(!0)},onPointerUp:()=>Y(!1)},R.filter(G=>!G.position&&W===0||G.position===I).map((G,xe)=>{var ge,we;return w.createElement(Md,{key:G.id,icons:E,index:xe,toast:G,defaultRichColors:d,duration:(ge=v==null?void 0:v.duration)!=null?ge:u,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:t,visibleToasts:l,closeButton:(we=v==null?void 0:v.closeButton)!=null?we:a,interacting:_,position:I,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:oe,toasts:R.filter(ve=>ve.position==G.position),heights:N.filter(ve=>ve.position==G.position),setHeights:z,expandByDefault:o,gap:h,loadingIcon:y,expanded:H,pauseWhenPageIsHidden:C,cn:P})}))})):null};const Id=({...e})=>{const{theme:t="system"}=fd();return m.jsx(Ld,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:ve-bg-background group-[.toaster]:ve-text-foreground group-[.toaster]:ve-border-border group-[.toaster]:ve-shadow-lg",description:"group-[.toast]:ve-text-muted-foreground",actionButton:"group-[.toast]:ve-bg-primary group-[.toast]:ve-text-primary-foreground",cancelButton:"group-[.toast]:ve-bg-muted group-[.toast]:ve-text-muted-foreground"}},...e})},ds=(e,t,r="*")=>t==null?void 0:t.postMessage(e,{targetOrigin:r}),at=(e,t)=>{const[r,n]=w.useState("pending");return fs(e,t,$d(n)),{sendToParent:a=>{if(!window.parent)throw new Error("Parent window has closed");n("pending");for(const s of t)ds({...a,type:e},window.parent,s)},status:r}},jt=(e,t,r)=>{fs(e,t,(o,a,s)=>{const{type:i,payload:c}=o;i===e&&typeof r=="function"&&r(d=>ds({...d,type:e},s,a),c)})},fs=(e,t,r)=>{const[n,o]=w.useState(),[a,s]=w.useState(),i=w.useRef(),c=w.useRef();i.current=n,c.current=a;const d=w.useCallback(({origin:u,source:g,data:l})=>{var x;if((x=l==null?void 0:l.source)!=null&&x.startsWith("react-devtools")||!t.includes(u))return;const{type:v}=l;v===e&&(s(g),o(u),r(l,u,g))},[e,t,s,o,r]);w.useEffect(()=>(window.addEventListener("message",d),()=>window.removeEventListener("message",d)),[e,a,n,d])},$d=e=>(t,r,n)=>{const{status:o}=t;o==="success"?e("success"):o==="error"&&e("error")};class Fd{constructor(t=!1){Dt(this,"enable",t=>{this.enabled=t,this.enabled&&console.log("[DEBUG] xYextDebug enabled")});Dt(this,"logData",(t,r)=>{this.enabled&&console.log("[DEBUG]",t,"-",r)});Dt(this,"logFunc",t=>{this.enabled&&console.log("[DEBUG] -->",t,"called")});Dt(this,"log",t=>{this.enabled&&console.log("[DEBUG]",t)});this.enabled=t,this.enabled&&console.log("[DEBUG] xYextDebug enabled")}}const Bd={GLOBAL:"global",INDIVIDUAL:"individual"},Pe=["http://localhost","https://dev.yext.com","https://qa.yext.com","https://sandbox.yext.com","https://www.yext.com","https://app-qa.eu.yext.com","https://app.eu.yext.com"],ce=new Fd,Wd=({document:e,componentRegistry:t})=>{const[r,n]=w.useState(),[o,a]=w.useState(!1),[s,i]=w.useState(),[c,d]=w.useState(!1),[u,g]=w.useState(),[l,v]=w.useState(!1),[x,h]=w.useState(void 0),[y,E]=w.useState(void 0),[b,C]=w.useState(),[P,R]=w.useState(),[D,O]=w.useState(!1);e&&ce.logData("DOCUMENT",e);const N=w.useCallback(()=>b?Ur(b.isDevMode&&!b.devOverride,b.role,b.templateId,b.layoutId,b.entityId):"",[b]);w.useEffect(()=>{if(typeof window<"u"){const k=window.location.ancestorOrigins;k.length===0||!k[0].includes("pagescdn")&&!k[0].includes("yext.com")&&!k[0].includes("localhost")?window.location.assign("/404.html"):O(!0)}},[]),jt("getTemplateMetadata",Pe,(k,J)=>{const te=t.get(J.templateId);R(te);const G=J;C(J),ce.enable(G.isxYextDebug),ce.logData("TEMPLATE_METADATA",G),ce.logData("PUCK_CONFIG",te),k({status:"success",payload:{message:"payload received"}})}),w.useEffect(()=>{if(b!=null&&b.isDevMode)try{h(pageSets),E(siteStream)}catch{console.warn("pageSets are not defined")}},[b==null?void 0:b.isDevMode]);const z=()=>{ce.logFunc("clearLocalStorage"),window.localStorage.removeItem(N())},H=()=>{ce.logFunc("clearHistory"),z(),K()},U=w.useRef(!0);w.useEffect(()=>{if(U.current){U.current=!1;return}_()},[b,l,c]);const _=w.useCallback(()=>{if(!c||!l||!b)return;if(ce.logFunc("loadPuckInitialHistory"),b.isDevMode&&!b.devOverride){const te=window.localStorage.getItem(N());if(te){ce.log("Dev Mode - Using localStorage");const G=JSON.parse(te),xe=G.length-1;n({histories:G,index:xe,appendData:!1}),a(!0);return}ce.log("Dev Mode - No localStorage. Using data from Content"),s&&n({histories:[{id:"root",state:{data:s}}],appendData:!1}),a(!0);return}if(!u){z(),ce.log("Prod Mode - No saveState. Using data from Content"),s&&n({histories:[{id:"root",state:{data:s}}],appendData:!1}),a(!0);return}const k=window.localStorage.getItem(N());if(!k){ce.log("Prod Mode - No localStorage. Using saveState"),n({histories:s?[{id:"root",state:{data:s}},{id:u.hash,state:kr(u.history)}]:[{id:u.hash,state:kr(u.history)}],index:s?1:0,appendData:!1}),a(!0);return}const J=JSON.parse(k).findIndex(te=>te.id===(u==null?void 0:u.hash));if(J!==-1){ce.log("Prod Mode - Using localStorage"),n({histories:JSON.parse(k),index:J,appendData:!1}),a(!0);return}z()},[n,a,z,Ur]);w.useEffect(()=>{r&&ce.logData("PUCK_INITIAL_HISTORY",r)},[r]);const{sendToParent:Y}=at("iFrameLoaded",Pe),{sendToParent:M}=at("sendDevSaveStateData",Pe);w.useEffect(()=>{Y({payload:{message:"iFrame is loaded"}})},[]),w.useEffect(()=>{var k;if(b!=null&&b.isDevMode){const J=window.localStorage.getItem(N()),te=J?JSON.parse(J):[],G=JSON.stringify(te.length>0?(k=te[te.length-1].data)==null?void 0:k.data:{});M({payload:{devSaveStateData:G}})}},[b]),jt("getSaveState",Pe,(k,J)=>{ce.logData("SAVE_STATE",J),g(J),v(!0),k({status:"success",payload:{message:"saveState received"}})}),jt("getVisualConfigurationData",Pe,(k,J)=>{const te=kr(J.visualConfigurationData);ce.logData("VISUAL_CONFIGURATION_DATA",te),i(te),d(!0),k({status:"success",payload:{message:"getVisualConfigurationData received"}})});const{sendToParent:X}=at("pushPageSets",Pe);w.useEffect(()=>{typeof window<"u"&&(b!=null&&b.isDevMode)&&x&&X({payload:{...x,siteStream:y}})},[b==null?void 0:b.isDevMode,x]);const{sendToParent:F}=at("saveSaveState",Pe),{sendToParent:K}=at("deleteSaveState",Pe),{sendToParent:A}=at("saveVisualConfigData",Pe),{sendToParent:B}=at("openQuickFind",Pe),oe=k=>{(k.ctrlKey||k.metaKey)&&k.key==="k"&&B()};w.useEffect(()=>(window.addEventListener("keydown",oe),()=>{window.removeEventListener("keydown",oe)}),[]);const I=!P||!b||!e||!l||!c||!o,W=100*(!!P+!!b+!!e+l+c+o)/6;return m.jsxs(m.Fragment,{children:[I?D&&m.jsx(ld,{progress:W}):m.jsx(ed,{puckConfig:P,isLoading:I,puckInitialHistory:r,clearHistory:b.isDevMode&&!b.devOverride?z:H,templateMetadata:b,saveState:u,saveSaveState:F,saveVisualConfigData:A,sendDevSaveStateData:M,buildLocalStorageKey:N,devLogger:ce}),m.jsx(Id,{closeButton:!0,richColors:!0})]})},kr=e=>JSON.parse(e.replace(/\\"/g,'"')),zd=()=>{const[e,t]=w.useState();return jt("getEntityDocument",Pe,(r,n)=>{t(n),r({status:"success",payload:{message:"getEntityDocument received"}})}),e},Vd=()=>{const[e,t]=w.useState(void 0);return jt("getTemplateStream",Pe,(r,n)=>{t(n),r({status:"success",payload:{message:"templateStream received"}})}),e},ps=f.createContext(void 0),Hd=({entityFields:e,children:t})=>m.jsx(ps.Provider,{value:e,children:t}),gs=()=>{const e=f.useContext(ps);if(!e)throw new Error("useEntityFields must be used within a DocumentProvider");return e},Ud=["uid","meta","slug","c_visualConfigurations","c_pages_layouts"],Yd=["type.image","type.hours","type.address"],vs=e=>hs(e,""),hs=(e,t)=>{var n,o,a;const r=t?`${t}.${e.name}`:e.name;if(Yd.includes(ms(e)))return[{name:r,schemaField:e}];if((n=e.children)!=null&&n.fields&&((a=(o=e.children)==null?void 0:o.fields)==null?void 0:a.length)>0){const s=[];for(const i of e.children.fields)s.push(...hs(i,r));return s}return[{name:r,schemaField:e}]},ms=e=>e.definition.typeName||e.definition.typeRegistryId||Object.entries(e.definition.type)[0][1];function Gd(e,t,r){const n=e.get(t)||[];return n.push(r),e.set(t,n),e}const qd=(e,t)=>e.reduce((r,n)=>{if(n.definition.isList)return r;const o=vs(n);for(const a of o){const s=ms(a.schemaField);s&&(r=Gd(r,s,a.name))}return r},new Map),bs=e=>{let r=gs().stream.schema.fields.filter(n=>!Ud.includes(n.name));if(e!=null&&e.allowList){const n=r.map(o=>o.name);e.allowList.forEach(o=>{n.includes(o)||console.warn(`The entity field filter allowList included ${o}, which does not exist in the stream.`)}),r=r.filter(o=>e.allowList.includes(o.name))}if(e!=null&&e.disallowList&&(r=r.filter(n=>!e.disallowList.includes(n.name))),e!=null&&e.types){const n=qd(r);e.types.forEach(o=>{r=r.filter(a=>{var s;return(s=n.get(o))==null?void 0:s.includes(a.name)})})}if(e!=null&&e.includeSubfields){const n=[];for(const o of r){const a=vs(o);for(const s of a)n.push({...s.schemaField,name:s.name})}r=n}return r},Kd=e=>({type:"custom",label:e.label,render:({field:t,value:r,onChange:n})=>{const o=bs(e.filter);return m.jsxs(m.Fragment,{children:[m.jsx(_e.FieldLabel,{label:t.label||"Label is undefined",children:m.jsx(_e.AutoField,{field:{type:"select",options:[{value:"",label:"Select a Content field"},...o.map(a=>({label:a.name,value:a.name}))]},onChange:a=>{n({fieldName:a,staticValue:r.staticValue})},value:r==null?void 0:r.fieldName})}),m.jsx(_e.FieldLabel,{label:"Static Value",className:"entityField-staticValue",children:m.jsx(_e.AutoField,{onChange:a=>n({fieldName:r.fieldName,staticValue:a}),value:r==null?void 0:r.staticValue,field:{type:"text"}})})]})}}),Xd=e=>{const t=bs(e.filter),r={};return r[e.fieldName]={label:"Entity Field",type:"select",options:t.map(n=>({label:n.name,value:n.name}))},m.jsx(m.Fragment,{children:m.jsx(_e.FieldLabel,{label:e.renderProps.field.label,children:m.jsx(_e.AutoField,{field:{type:"object",objectFields:{...r,...e.objectFields}},onChange:n=>e.renderProps.onChange(n),value:e.renderProps.value})})})},Gr=JSON.stringify({root:{},content:[],zones:{}});function Jd(e,t){var i,c,d;if(!t)throw new Error("Unable to parse puck data, template name must be defined in config.");const{document:r}=e,n=r.c_visualConfigurations??[],o=r.c_pages_layouts??[],a=(i=r._site)==null?void 0:i.c_visualLayouts;for(const u of n)if(u.template===t){const g=JSON.parse(_r(u.data,t));return{...e,document:{...r,visualTemplate:g}}}for(const u of o)if(((c=u.c_visualConfiguration)==null?void 0:c.template)===t){const g=JSON.parse(_r(u.c_visualConfiguration.data,t));return{...e,document:{...r,visualTemplate:g}}}if(a){for(const u of a)if(((d=u.c_visualConfiguration)==null?void 0:d.template)===t){const g=JSON.parse(_r(u.c_visualConfiguration.data,t));return{...e,document:{...r,visualTemplate:g}}}}console.warn(`Unable to find puck data for template: ${t}`);const s=JSON.parse(Gr);return{...e,document:{...r,visualTemplate:s}}}function _r(e,t){if(!e||e.length<1)return console.warn(`Missing visual editor data for template: ${t}`),Gr;try{JSON.parse(e)}catch{return console.warn(`Invalid visual editor data for template: ${t}`),Gr}return e}const Zd=(e,t)=>{if(t.fieldName==="")return t.staticValue;try{const r=t.fieldName.split(".");let n=!1,o=e;for(let a=0;a<r.length;a++)if((o==null?void 0:o[r[a]])!==void 0)o=o[r[a]];else{n=!0;break}if(!n)return o}catch(r){console.error("Error in resolveYextEntityField:",r)}return console.warn(`The field ${t.fieldName} was not found in the document, defaulting to static value ${t.staticValue}.`),t.staticValue};exports.Editor=Wd;exports.EntityField=Yu;exports.EntityFieldsProvider=Hd;exports.YextEntityFieldSelector=Kd;exports.renderEntityFields=Xd;exports.resolveVisualEditorData=Jd;exports.resolveYextEntityField=Zd;exports.useEntityFields=gs;exports.usePlatformBridgeDocument=zd;exports.usePlatformBridgeEntityFields=Vd;
123
+ `);function Zt(e){return e.label!==void 0}var Ad=3,Td="32px",Od=4e3,Nd=356,Dd=14,kd=20,_d=200;function jd(...e){return e.filter(Boolean).join(" ")}var Md=e=>{var t,r,n,o,a,s,i,c,d,u;let{invert:g,toast:l,unstyled:v,interacting:x,setHeights:h,visibleToasts:y,heights:E,index:b,toasts:C,expanded:P,removeToast:R,defaultRichColors:D,closeButton:O,style:N,cancelButtonStyle:V,actionButtonStyle:H,className:U="",descriptionClassName:_="",duration:Y,position:M,gap:X,loadingIcon:F,expandByDefault:K,classNames:A,icons:B,closeButtonAriaLabel:oe="Close toast",pauseWhenPageIsHidden:I,cn:W}=e,[k,J]=w.useState(!1),[te,G]=w.useState(!1),[xe,ge]=w.useState(!1),[we,ve]=w.useState(!1),[ut,Le]=w.useState(0),[Ne,rt]=w.useState(0),Ie=w.useRef(null),Re=w.useRef(null),dt=b===0,He=b+1<=y,ie=l.type,Ee=l.dismissible!==!1,Tt=l.className||"",br=l.descriptionClassName||"",nt=w.useMemo(()=>E.findIndex(L=>L.toastId===l.id)||0,[E,l.id]),Bt=w.useMemo(()=>{var L;return(L=l.closeButton)!=null?L:O},[l.closeButton,O]),ft=w.useMemo(()=>l.duration||Y||Od,[l.duration,Y]),Ot=w.useRef(0),Ue=w.useRef(0),Wt=w.useRef(0),Ye=w.useRef(null),[Vt,yr]=M.split("-"),zt=w.useMemo(()=>E.reduce((L,Q,Z)=>Z>=nt?L:L+Q.height,0),[E,nt]),pt=xd(),Ht=l.invert||g,De=ie==="loading";Ue.current=w.useMemo(()=>nt*X+zt,[nt,zt]),w.useEffect(()=>{J(!0)},[]),w.useLayoutEffect(()=>{if(!k)return;let L=Re.current,Q=L.style.height;L.style.height="auto";let Z=L.getBoundingClientRect().height;L.style.height=Q,rt(Z),h(Se=>Se.find(he=>he.toastId===l.id)?Se.map(he=>he.toastId===l.id?{...he,height:Z}:he):[{toastId:l.id,height:Z,position:l.position},...Se])},[k,l.title,l.description,h,l.id]);let Ce=w.useCallback(()=>{G(!0),Le(Ue.current),h(L=>L.filter(Q=>Q.toastId!==l.id)),setTimeout(()=>{R(l)},_d)},[l,R,h,Ue]);w.useEffect(()=>{if(l.promise&&ie==="loading"||l.duration===1/0||l.type==="loading")return;let L,Q=ft;return P||x||I&&pt?(()=>{if(Wt.current<Ot.current){let Z=new Date().getTime()-Ot.current;Q=Q-Z}Wt.current=new Date().getTime()})():Q!==1/0&&(Ot.current=new Date().getTime(),L=setTimeout(()=>{var Z;(Z=l.onAutoClose)==null||Z.call(l,l),Ce()},Q)),()=>clearTimeout(L)},[P,x,K,l,ft,Ce,l.promise,ie,I,pt]),w.useEffect(()=>{let L=Re.current;if(L){let Q=L.getBoundingClientRect().height;return rt(Q),h(Z=>[{toastId:l.id,height:Q,position:l.position},...Z]),()=>h(Z=>Z.filter(Se=>Se.toastId!==l.id))}},[h,l.id]),w.useEffect(()=>{l.delete&&Ce()},[Ce,l.delete]);function Nt(){return B!=null&&B.loading?w.createElement("div",{className:"sonner-loader","data-visible":ie==="loading"},B.loading):F?w.createElement("div",{className:"sonner-loader","data-visible":ie==="loading"},F):w.createElement(vd,{visible:ie==="loading"})}return w.createElement("li",{"aria-live":l.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:Re,className:W(U,Tt,A==null?void 0:A.toast,(t=l==null?void 0:l.classNames)==null?void 0:t.toast,A==null?void 0:A.default,A==null?void 0:A[ie],(r=l==null?void 0:l.classNames)==null?void 0:r[ie]),"data-sonner-toast":"","data-rich-colors":(n=l.richColors)!=null?n:D,"data-styled":!(l.jsx||l.unstyled||v),"data-mounted":k,"data-promise":!!l.promise,"data-removed":te,"data-visible":He,"data-y-position":Vt,"data-x-position":yr,"data-index":b,"data-front":dt,"data-swiping":xe,"data-dismissible":Ee,"data-type":ie,"data-invert":Ht,"data-swipe-out":we,"data-expanded":!!(P||K&&k),style:{"--index":b,"--toasts-before":b,"--z-index":C.length-b,"--offset":`${te?ut:Ue.current}px`,"--initial-height":K?"auto":`${Ne}px`,...N,...l.style},onPointerDown:L=>{De||!Ee||(Ie.current=new Date,Le(Ue.current),L.target.setPointerCapture(L.pointerId),L.target.tagName!=="BUTTON"&&(ge(!0),Ye.current={x:L.clientX,y:L.clientY}))},onPointerUp:()=>{var L,Q,Z,Se;if(we||!Ee)return;Ye.current=null;let he=Number(((L=Re.current)==null?void 0:L.style.getPropertyValue("--swipe-amount").replace("px",""))||0),ot=new Date().getTime()-((Q=Ie.current)==null?void 0:Q.getTime()),xr=Math.abs(he)/ot;if(Math.abs(he)>=kd||xr>.11){Le(Ue.current),(Z=l.onDismiss)==null||Z.call(l,l),Ce(),ve(!0);return}(Se=Re.current)==null||Se.style.setProperty("--swipe-amount","0px"),ge(!1)},onPointerMove:L=>{var Q;if(!Ye.current||!Ee)return;let Z=L.clientY-Ye.current.y,Se=L.clientX-Ye.current.x,he=(Vt==="top"?Math.min:Math.max)(0,Z),ot=L.pointerType==="touch"?10:2;Math.abs(he)>ot?(Q=Re.current)==null||Q.style.setProperty("--swipe-amount",`${Z}px`):Math.abs(Se)>ot&&(Ye.current=null)}},Bt&&!l.jsx?w.createElement("button",{"aria-label":oe,"data-disabled":De,"data-close-button":!0,onClick:De||!Ee?()=>{}:()=>{var L;Ce(),(L=l.onDismiss)==null||L.call(l,l)},className:W(A==null?void 0:A.closeButton,(o=l==null?void 0:l.classNames)==null?void 0:o.closeButton)},w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},w.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),w.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,l.jsx||w.isValidElement(l.title)?l.jsx||l.title:w.createElement(w.Fragment,null,ie||l.icon||l.promise?w.createElement("div",{"data-icon":"",className:W(A==null?void 0:A.icon,(a=l==null?void 0:l.classNames)==null?void 0:a.icon)},l.promise||l.type==="loading"&&!l.icon?l.icon||Nt():null,l.type!=="loading"?l.icon||(B==null?void 0:B[ie])||pd(ie):null):null,w.createElement("div",{"data-content":"",className:W(A==null?void 0:A.content,(s=l==null?void 0:l.classNames)==null?void 0:s.content)},w.createElement("div",{"data-title":"",className:W(A==null?void 0:A.title,(i=l==null?void 0:l.classNames)==null?void 0:i.title)},l.title),l.description?w.createElement("div",{"data-description":"",className:W(_,br,A==null?void 0:A.description,(c=l==null?void 0:l.classNames)==null?void 0:c.description)},l.description):null),w.isValidElement(l.cancel)?l.cancel:l.cancel&&Zt(l.cancel)?w.createElement("button",{"data-button":!0,"data-cancel":!0,style:l.cancelButtonStyle||V,onClick:L=>{var Q,Z;Zt(l.cancel)&&Ee&&((Z=(Q=l.cancel).onClick)==null||Z.call(Q,L),Ce())},className:W(A==null?void 0:A.cancelButton,(d=l==null?void 0:l.classNames)==null?void 0:d.cancelButton)},l.cancel.label):null,w.isValidElement(l.action)?l.action:l.action&&Zt(l.action)?w.createElement("button",{"data-button":!0,"data-action":!0,style:l.actionButtonStyle||H,onClick:L=>{var Q,Z;Zt(l.action)&&(L.defaultPrevented||((Z=(Q=l.action).onClick)==null||Z.call(Q,L),Ce()))},className:W(A==null?void 0:A.actionButton,(u=l==null?void 0:l.classNames)==null?void 0:u.actionButton)},l.action.label):null))};function Qn(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var Ld=e=>{let{invert:t,position:r="bottom-right",hotkey:n=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:i,theme:c="light",richColors:d,duration:u,style:g,visibleToasts:l=Ad,toastOptions:v,dir:x=Qn(),gap:h=Dd,loadingIcon:y,icons:E,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:C,cn:P=jd}=e,[R,D]=w.useState([]),O=w.useMemo(()=>Array.from(new Set([r].concat(R.filter(I=>I.position).map(I=>I.position)))),[R,r]),[N,V]=w.useState([]),[H,U]=w.useState(!1),[_,Y]=w.useState(!1),[M,X]=w.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),F=w.useRef(null),K=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=w.useRef(null),B=w.useRef(!1),oe=w.useCallback(I=>{var W;(W=R.find(k=>k.id===I.id))!=null&&W.delete||me.dismiss(I.id),D(k=>k.filter(({id:J})=>J!==I.id))},[R]);return w.useEffect(()=>me.subscribe(I=>{if(I.dismiss){D(W=>W.map(k=>k.id===I.id?{...k,delete:!0}:k));return}setTimeout(()=>{qr.flushSync(()=>{D(W=>{let k=W.findIndex(J=>J.id===I.id);return k!==-1?[...W.slice(0,k),{...W[k],...I},...W.slice(k+1)]:[I,...W]})})})}),[]),w.useEffect(()=>{if(c!=="system"){X(c);return}c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:I})=>{X(I?"dark":"light")})},[c]),w.useEffect(()=>{R.length<=1&&U(!1)},[R]),w.useEffect(()=>{let I=W=>{var k,J;n.every(te=>W[te]||W.code===te)&&(U(!0),(k=F.current)==null||k.focus()),W.code==="Escape"&&(document.activeElement===F.current||(J=F.current)!=null&&J.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[n]),w.useEffect(()=>{if(F.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,B.current=!1)}},[F.current]),R.length?w.createElement("section",{"aria-label":`${b} ${K}`,tabIndex:-1},O.map((I,W)=>{var k;let[J,te]=I.split("-");return w.createElement("ol",{key:I,dir:x==="auto"?Qn():x,tabIndex:-1,ref:F,className:s,"data-sonner-toaster":!0,"data-theme":M,"data-y-position":J,"data-x-position":te,style:{"--front-toast-height":`${((k=N[0])==null?void 0:k.height)||0}px`,"--offset":typeof i=="number"?`${i}px`:i||Td,"--width":`${Nd}px`,"--gap":`${h}px`,...g},onBlur:G=>{B.current&&!G.currentTarget.contains(G.relatedTarget)&&(B.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||B.current||(B.current=!0,A.current=G.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{_||U(!1)},onPointerDown:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||Y(!0)},onPointerUp:()=>Y(!1)},R.filter(G=>!G.position&&W===0||G.position===I).map((G,xe)=>{var ge,we;return w.createElement(Md,{key:G.id,icons:E,index:xe,toast:G,defaultRichColors:d,duration:(ge=v==null?void 0:v.duration)!=null?ge:u,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:t,visibleToasts:l,closeButton:(we=v==null?void 0:v.closeButton)!=null?we:a,interacting:_,position:I,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:oe,toasts:R.filter(ve=>ve.position==G.position),heights:N.filter(ve=>ve.position==G.position),setHeights:V,expandByDefault:o,gap:h,loadingIcon:y,expanded:H,pauseWhenPageIsHidden:C,cn:P})}))})):null};const Id=({...e})=>{const{theme:t="system"}=fd();return m.jsx(Ld,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:ve-bg-background group-[.toaster]:ve-text-foreground group-[.toaster]:ve-border-border group-[.toaster]:ve-shadow-lg",description:"group-[.toast]:ve-text-muted-foreground",actionButton:"group-[.toast]:ve-bg-primary group-[.toast]:ve-text-primary-foreground",cancelButton:"group-[.toast]:ve-bg-muted group-[.toast]:ve-text-muted-foreground"}},...e})},ds=(e,t,r="*")=>t==null?void 0:t.postMessage(e,{targetOrigin:r}),at=(e,t)=>{const[r,n]=w.useState("pending");return fs(e,t,$d(n)),{sendToParent:a=>{if(!window.parent)throw new Error("Parent window has closed");n("pending");for(const s of t)ds({...a,type:e},window.parent,s)},status:r}},jt=(e,t,r)=>{fs(e,t,(o,a,s)=>{const{type:i,payload:c}=o;i===e&&typeof r=="function"&&r(d=>ds({...d,type:e},s,a),c)})},fs=(e,t,r)=>{const[n,o]=w.useState(),[a,s]=w.useState(),i=w.useRef(),c=w.useRef();i.current=n,c.current=a;const d=w.useCallback(({origin:u,source:g,data:l})=>{var x;if((x=l==null?void 0:l.source)!=null&&x.startsWith("react-devtools")||!t.includes(u))return;const{type:v}=l;v===e&&(s(g),o(u),r(l,u,g))},[e,t,s,o,r]);w.useEffect(()=>(window.addEventListener("message",d),()=>window.removeEventListener("message",d)),[e,a,n,d])},$d=e=>(t,r,n)=>{const{status:o}=t;o==="success"?e("success"):o==="error"&&e("error")};class Fd{constructor(t=!1){Dt(this,"enable",t=>{this.enabled=t,this.enabled&&console.log("[DEBUG] xYextDebug enabled")});Dt(this,"logData",(t,r)=>{this.enabled&&console.log("[DEBUG]",t,"-",r)});Dt(this,"logFunc",t=>{this.enabled&&console.log("[DEBUG] -->",t,"called")});Dt(this,"log",t=>{this.enabled&&console.log("[DEBUG]",t)});this.enabled=t,this.enabled&&console.log("[DEBUG] xYextDebug enabled")}}const Bd={GLOBAL:"global",INDIVIDUAL:"individual"},Pe=["http://localhost","https://dev.yext.com","https://qa.yext.com","https://sandbox.yext.com","https://www.yext.com","https://app-qa.eu.yext.com","https://app.eu.yext.com"],ce=new Fd,Wd=({document:e,componentRegistry:t})=>{const[r,n]=w.useState(),[o,a]=w.useState(!1),[s,i]=w.useState(),[c,d]=w.useState(!1),[u,g]=w.useState(),[l,v]=w.useState(!1),[x,h]=w.useState(void 0),[y,E]=w.useState(void 0),[b,C]=w.useState(),[P,R]=w.useState(),[D,O]=w.useState(!1);e&&ce.logData("DOCUMENT",e);const N=w.useCallback(()=>b?Ur(b.isDevMode&&!b.devOverride,b.role,b.templateId,b.layoutId,b.entityId):"",[b]);w.useEffect(()=>{if(typeof window<"u"){const k=window.location.ancestorOrigins;k.length===0||!k[0].includes("pagescdn")&&!k[0].includes("yext.com")&&!k[0].includes("localhost")?window.location.assign("/404.html"):O(!0)}},[]),jt("getTemplateMetadata",Pe,(k,J)=>{const te=t.get(J.templateId);R(te);const G=J;C(J),ce.enable(G.isxYextDebug),ce.logData("TEMPLATE_METADATA",G),ce.logData("PUCK_CONFIG",te),k({status:"success",payload:{message:"payload received"}})}),w.useEffect(()=>{if(b!=null&&b.isDevMode)try{h(pageSets),E(siteStream)}catch{console.warn("pageSets are not defined")}},[b==null?void 0:b.isDevMode]);const V=()=>{ce.logFunc("clearLocalStorage"),window.localStorage.removeItem(N())},H=()=>{ce.logFunc("clearHistory"),V(),K()},U=w.useRef(!0);w.useEffect(()=>{if(U.current){U.current=!1;return}_()},[b,l,c]);const _=w.useCallback(()=>{if(!c||!l||!b)return;if(ce.logFunc("loadPuckInitialHistory"),b.isDevMode&&!b.devOverride){const te=window.localStorage.getItem(N());if(te){ce.log("Dev Mode - Using localStorage");const G=JSON.parse(te),xe=G.length-1;n({histories:G,index:xe,appendData:!1}),a(!0);return}ce.log("Dev Mode - No localStorage. Using data from Content"),s&&n({histories:[{id:"root",state:{data:s}}],appendData:!1}),a(!0);return}if(!u){V(),ce.log("Prod Mode - No saveState. Using data from Content"),s&&n({histories:[{id:"root",state:{data:s}}],appendData:!1}),a(!0);return}const k=window.localStorage.getItem(N());if(!k){ce.log("Prod Mode - No localStorage. Using saveState"),n({histories:s?[{id:"root",state:{data:s}},{id:u.hash,state:kr(u.history)}]:[{id:u.hash,state:kr(u.history)}],index:s?1:0,appendData:!1}),a(!0);return}const J=JSON.parse(k).findIndex(te=>te.id===(u==null?void 0:u.hash));if(J!==-1){ce.log("Prod Mode - Using localStorage"),n({histories:JSON.parse(k),index:J,appendData:!1}),a(!0);return}V()},[n,a,V,Ur]);w.useEffect(()=>{r&&ce.logData("PUCK_INITIAL_HISTORY",r)},[r]);const{sendToParent:Y}=at("iFrameLoaded",Pe),{sendToParent:M}=at("sendDevSaveStateData",Pe);w.useEffect(()=>{Y({payload:{message:"iFrame is loaded"}})},[]),w.useEffect(()=>{var k;if(b!=null&&b.isDevMode){const J=window.localStorage.getItem(N()),te=J?JSON.parse(J):[],G=JSON.stringify(te.length>0?(k=te[te.length-1].data)==null?void 0:k.data:{});M({payload:{devSaveStateData:G}})}},[b]),jt("getSaveState",Pe,(k,J)=>{ce.logData("SAVE_STATE",J),g(J),v(!0),k({status:"success",payload:{message:"saveState received"}})}),jt("getVisualConfigurationData",Pe,(k,J)=>{const te=kr(J.visualConfigurationData);ce.logData("VISUAL_CONFIGURATION_DATA",te),i(te),d(!0),k({status:"success",payload:{message:"getVisualConfigurationData received"}})});const{sendToParent:X}=at("pushPageSets",Pe);w.useEffect(()=>{typeof window<"u"&&(b!=null&&b.isDevMode)&&x&&X({payload:{...x,siteStream:y}})},[b==null?void 0:b.isDevMode,x]);const{sendToParent:F}=at("saveSaveState",Pe),{sendToParent:K}=at("deleteSaveState",Pe),{sendToParent:A}=at("saveVisualConfigData",Pe),{sendToParent:B}=at("openQuickFind",Pe),oe=k=>{(k.ctrlKey||k.metaKey)&&k.key==="k"&&B()};w.useEffect(()=>(window.addEventListener("keydown",oe),()=>{window.removeEventListener("keydown",oe)}),[]);const I=!P||!b||!e||!l||!c||!o,W=100*(!!P+!!b+!!e+l+c+o)/6;return m.jsxs(m.Fragment,{children:[I?D&&m.jsx(ld,{progress:W}):m.jsx(ed,{puckConfig:P,isLoading:I,puckInitialHistory:r,clearHistory:b.isDevMode&&!b.devOverride?V:H,templateMetadata:b,saveState:u,saveSaveState:F,saveVisualConfigData:A,sendDevSaveStateData:M,buildLocalStorageKey:N,devLogger:ce}),m.jsx(Id,{closeButton:!0,richColors:!0})]})},kr=e=>JSON.parse(e.replace(/\\"/g,'"')),Vd=()=>{const[e,t]=w.useState(void 0);return jt("getTemplateStream",Pe,(r,n)=>{t(n),r({status:"success",payload:{message:"templateStream received"}})}),e},ps=f.createContext(void 0),zd=({entityFields:e,children:t})=>m.jsx(ps.Provider,{value:e,children:t}),gs=()=>{const e=f.useContext(ps);if(!e)throw new Error("useEntityFields must be used within a DocumentProvider");return e},Hd=["uid","meta","slug","c_visualConfigurations","c_pages_layouts"],Ud=[],vs=e=>hs(e,""),hs=(e,t)=>{var o,a,s;const r=t?`${t}.${e.name}`:e.name;if(Ud.includes(ms(e)))return[{name:r,schemaField:e}];if(e.definition.isList)return[];const n=[{name:r,schemaField:e}];if((o=e.children)!=null&&o.fields&&((s=(a=e.children)==null?void 0:a.fields)==null?void 0:s.length)>0)for(const i of e.children.fields)n.push(...hs(i,r));return n},ms=e=>e.definition.typeName||e.definition.typeRegistryId||Object.entries(e.definition.type)[0][1];function Yd(e,t,r){const n=e.get(t)||[];return n.push(r),e.set(t,n),e}const Gd=e=>e.reduce((t,r)=>{const n=vs(r);for(const o of n){const a=ms(o.schemaField);a&&(t=Yd(t,a,o.name))}return t},new Map),bs=e=>{let r=gs().stream.schema.fields.filter(o=>!Hd.includes(o.name));if(e!=null&&e.allowList){const o=r.map(a=>a.name);e.allowList.forEach(a=>{o.includes(a)||console.warn(`The entity field filter allowList included ${a}, which does not exist in the stream.`)}),r=r.filter(a=>e.allowList.includes(a.name))}e!=null&&e.disallowList&&(r=r.filter(o=>!e.disallowList.includes(o.name)));let n=[];for(const o of r){const a=vs(o);for(const s of a)n.push({...s.schemaField,name:s.name})}if(e!=null&&e.types){const o=Gd(n),a=[];e.types.forEach(s=>{a.push(...n.filter(i=>{var c;return(c=o.get(s))==null?void 0:c.includes(i.name)}))}),n=a}return n},qd=["type.string","type.phone"],Kd=e=>{for(const t of qd)if(e.includes(t))return!0},Xd=e=>({type:"custom",label:e.label,render:({field:t,value:r,onChange:n})=>{const o=bs(e.filter);return m.jsxs(m.Fragment,{children:[m.jsx(_e.FieldLabel,{label:t.label||"Label is undefined",children:m.jsx(_e.AutoField,{field:{type:"select",options:[{value:"",label:"Select a Content field"},...o.map(a=>({label:a.name,value:a.name}))]},onChange:a=>{n({fieldName:a,staticValue:(r==null?void 0:r.staticValue)??""})},value:r==null?void 0:r.fieldName})}),Kd(e.filter.types)&&m.jsx(_e.FieldLabel,{label:"Static Value",className:"entityField-staticValue",children:m.jsx(_e.AutoField,{onChange:a=>n({fieldName:(r==null?void 0:r.fieldName)??"",staticValue:a}),value:r==null?void 0:r.staticValue,field:{type:"text"}})})]})}}),Jd=()=>{const[e,t]=w.useState();return jt("getEntityDocument",Pe,(r,n)=>{t(n),r({status:"success",payload:{message:"getEntityDocument received"}})}),e},Zd=e=>{const t=bs(e.filter),r={};return r[e.fieldName]={label:"Entity Field",type:"select",options:t.map(n=>({label:n.name,value:n.name}))},m.jsx(m.Fragment,{children:m.jsx(_e.FieldLabel,{label:e.renderProps.field.label,children:m.jsx(_e.AutoField,{field:{type:"object",objectFields:{...r,...e.objectFields}},onChange:n=>e.renderProps.onChange(n),value:e.renderProps.value})})})},Gr=JSON.stringify({root:{},content:[],zones:{}});function Qd(e,t){var i,c,d;if(!t)throw new Error("Unable to parse puck data, template name must be defined in config.");const{document:r}=e,n=r.c_visualConfigurations??[],o=r.c_pages_layouts??[],a=(i=r._site)==null?void 0:i.c_visualLayouts;for(const u of n)if(u.template===t){const g=JSON.parse(_r(u.data,t));return{...e,document:{...r,visualTemplate:g}}}for(const u of o)if(((c=u.c_visualConfiguration)==null?void 0:c.template)===t){const g=JSON.parse(_r(u.c_visualConfiguration.data,t));return{...e,document:{...r,visualTemplate:g}}}if(a){for(const u of a)if(((d=u.c_visualConfiguration)==null?void 0:d.template)===t){const g=JSON.parse(_r(u.c_visualConfiguration.data,t));return{...e,document:{...r,visualTemplate:g}}}}console.warn(`Unable to find puck data for template: ${t}`);const s=JSON.parse(Gr);return{...e,document:{...r,visualTemplate:s}}}function _r(e,t){if(!e||e.length<1)return console.warn(`Missing visual editor data for template: ${t}`),Gr;try{JSON.parse(e)}catch{return console.warn(`Invalid visual editor data for template: ${t}`),Gr}return e}const ef=(e,t)=>{if(!(!t||typeof t!="object"||!("fieldName"in t)||!("staticValue"in t))){if(t.fieldName==="")return t.staticValue;try{const r=t.fieldName.split(".");let n=!1,o=e;for(let a=0;a<r.length;a++)if((o==null?void 0:o[r[a]])!==void 0)o=o[r[a]];else{n=!0;break}if(!n)return o}catch(r){console.error("Error in resolveYextEntityField:",r)}return console.warn(`The field ${t.fieldName} was not found in the document, defaulting to static value ${t.staticValue}.`),t.staticValue}};exports.Editor=Wd;exports.EntityField=Yu;exports.EntityFieldsProvider=zd;exports.YextEntityFieldSelector=Xd;exports.renderEntityFields=Zd;exports.resolveVisualEditorData=Qd;exports.resolveYextEntityField=ef;exports.useEntityFields=gs;exports.usePlatformBridgeDocument=Jd;exports.usePlatformBridgeEntityFields=Vd;