@blocknote/shadcn 0.13.5 → 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(S,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react"),require("@blocknote/react"),require("class-variance-authority"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-slot"),require("@radix-ui/react-dropdown-menu"),require("lucide-react"),require("react-hook-form"),require("@radix-ui/react-label"),require("@radix-ui/react-popover"),require("@radix-ui/react-select"),require("@radix-ui/react-tabs"),require("@radix-ui/react-toggle"),require("@radix-ui/react-tooltip"),require("@blocknote/core")):typeof define=="function"&&define.amd?define(["exports","react","@blocknote/react","class-variance-authority","clsx","tailwind-merge","@radix-ui/react-slot","@radix-ui/react-dropdown-menu","lucide-react","react-hook-form","@radix-ui/react-label","@radix-ui/react-popover","@radix-ui/react-select","@radix-ui/react-tabs","@radix-ui/react-toggle","@radix-ui/react-tooltip","@blocknote/core"],y):(S=typeof globalThis<"u"?globalThis:S||self,y(S["blocknote-shadcn"]={},S.React,S.react,S.classVarianceAuthority,S.clsx,S.tailwindMerge,S.reactSlot,S.DropdownMenuPrimitive,S.lucideReact,S.reactHookForm,S.LabelPrimitive,S.PopoverPrimitive,S.SelectPrimitive,S.TabsPrimitive,S.TogglePrimitive,S.TooltipPrimitive,S.core))})(this,function(S,y,be,X,Ft,Lt,xe,Bt,L,Z,zt,Vt,$t,At,Wt,qt,C){"use strict";function B(t){if(t&&typeof t=="object"&&"default"in t)return t;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(r,o,a.get?a:{enumerable:!0,get:()=>t[o]})}}return r.default=t,Object.freeze(r)}const p=B(y),N=B(Bt),he=B(zt),Q=B(Vt),T=B($t),z=B(At),ye=B(Wt),Y=B(qt);var ae={exports:{}},U={};/**
1
+ (function(N,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("@blocknote/react"),require("class-variance-authority"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-slot"),require("@radix-ui/react-dropdown-menu"),require("lucide-react"),require("react-hook-form"),require("@radix-ui/react-label"),require("@radix-ui/react-popover"),require("@radix-ui/react-select"),require("@radix-ui/react-tabs"),require("@radix-ui/react-toggle"),require("@radix-ui/react-tooltip"),require("@blocknote/core")):typeof define=="function"&&define.amd?define(["exports","react","@blocknote/react","class-variance-authority","clsx","tailwind-merge","@radix-ui/react-slot","@radix-ui/react-dropdown-menu","lucide-react","react-hook-form","@radix-ui/react-label","@radix-ui/react-popover","@radix-ui/react-select","@radix-ui/react-tabs","@radix-ui/react-toggle","@radix-ui/react-tooltip","@blocknote/core"],x):(N=typeof globalThis<"u"?globalThis:N||self,x(N["blocknote-shadcn"]={},N.React,N.react,N.classVarianceAuthority,N.clsx,N.tailwindMerge,N.reactSlot,N.DropdownMenuPrimitive,N.lucideReact,N.reactHookForm,N.LabelPrimitive,N.PopoverPrimitive,N.SelectPrimitive,N.TabsPrimitive,N.TogglePrimitive,N.TooltipPrimitive,N.core))})(this,function(N,x,Z,Q,wt,Ct,xe,jt,L,se,Nt,Tt,St,Rt,Et,_t,C){"use strict";function B(t){if(t&&typeof t=="object"&&"default"in t)return t;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const m=B(x),T=B(jt),he=B(Nt),ee=B(Tt),E=B(St),V=B(Rt),ye=B(Et),U=B(_t);var ie={exports:{}},K={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var we;function Yt(){if(we)return U;we=1;var t=p.default,r=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function c(x,m,g){var b,E={},D=null,$=null;g!==void 0&&(D=""+g),m.key!==void 0&&(D=""+m.key),m.ref!==void 0&&($=m.ref);for(b in m)a.call(m,b)&&!d.hasOwnProperty(b)&&(E[b]=m[b]);if(x&&x.defaultProps)for(b in m=x.defaultProps,m)E[b]===void 0&&(E[b]=m[b]);return{$$typeof:r,type:x,key:D,ref:$,props:E,_owner:i.current}}return U.Fragment=o,U.jsx=c,U.jsxs=c,U}var G={};/**
9
+ */var we;function Pt(){if(we)return K;we=1;var t=m.default,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function c(h,v,f){var g,_={},D=null,z=null;f!==void 0&&(D=""+f),v.key!==void 0&&(D=""+v.key),v.ref!==void 0&&(z=v.ref);for(g in v)a.call(v,g)&&!d.hasOwnProperty(g)&&(_[g]=v[g]);if(h&&h.defaultProps)for(g in v=h.defaultProps,v)_[g]===void 0&&(_[g]=v[g]);return{$$typeof:n,type:h,key:D,ref:z,props:_,_owner:i.current}}return K.Fragment=r,K.jsx=c,K.jsxs=c,K}var J={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,15 +14,20 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Ce;function Ut(){return Ce||(Ce=1,process.env.NODE_ENV!=="production"&&function(){var t=p.default,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),x=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),$=Symbol.for("react.offscreen"),ut=Symbol.iterator,Xr="@@iterator";function Zr(e){if(e===null||typeof e!="object")return null;var s=ut&&e[ut]||e[Xr];return typeof s=="function"?s:null}var A=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function M(e){{for(var s=arguments.length,l=new Array(s>1?s-1:0),f=1;f<s;f++)l[f-1]=arguments[f];Qr("error",e,l)}}function Qr(e,s,l){{var f=A.ReactDebugCurrentFrame,w=f.getStackAddendum();w!==""&&(s+="%s",l=l.concat([w]));var j=l.map(function(h){return String(h)});j.unshift("Warning: "+s),Function.prototype.apply.call(console[e],console,j)}}var eo=!1,to=!1,ro=!1,oo=!1,no=!1,ft;ft=Symbol.for("react.module.reference");function ao(e){return!!(typeof e=="string"||typeof e=="function"||e===a||e===d||no||e===i||e===g||e===b||oo||e===$||eo||to||ro||typeof e=="object"&&e!==null&&(e.$$typeof===D||e.$$typeof===E||e.$$typeof===c||e.$$typeof===x||e.$$typeof===m||e.$$typeof===ft||e.getModuleId!==void 0))}function so(e,s,l){var f=e.displayName;if(f)return f;var w=s.displayName||s.name||"";return w!==""?l+"("+w+")":l}function pt(e){return e.displayName||"Context"}function k(e){if(e==null)return null;if(typeof e.tag=="number"&&M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case a:return"Fragment";case o:return"Portal";case d:return"Profiler";case i:return"StrictMode";case g:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case x:var s=e;return pt(s)+".Consumer";case c:var l=e;return pt(l._context)+".Provider";case m:return so(e,e.render,"ForwardRef");case E:var f=e.displayName||null;return f!==null?f:k(e.type)||"Memo";case D:{var w=e,j=w._payload,h=w._init;try{return k(h(j))}catch{return null}}}return null}var V=Object.assign,K=0,mt,gt,vt,bt,xt,ht,yt;function wt(){}wt.__reactDisabledLog=!0;function io(){{if(K===0){mt=console.log,gt=console.info,vt=console.warn,bt=console.error,xt=console.group,ht=console.groupCollapsed,yt=console.groupEnd;var e={configurable:!0,enumerable:!0,value:wt,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}K++}}function lo(){{if(K--,K===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:V({},e,{value:mt}),info:V({},e,{value:gt}),warn:V({},e,{value:vt}),error:V({},e,{value:bt}),group:V({},e,{value:xt}),groupCollapsed:V({},e,{value:ht}),groupEnd:V({},e,{value:yt})})}K<0&&M("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var de=A.ReactCurrentDispatcher,ce;function ee(e,s,l){{if(ce===void 0)try{throw Error()}catch(w){var f=w.stack.trim().match(/\n( *(at )?)/);ce=f&&f[1]||""}return`
18
- `+ce+e}}var ue=!1,te;{var co=typeof WeakMap=="function"?WeakMap:Map;te=new co}function Ct(e,s){if(!e||ue)return"";{var l=te.get(e);if(l!==void 0)return l}var f;ue=!0;var w=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var j;j=de.current,de.current=null,io();try{if(s){var h=function(){throw Error()};if(Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(F){f=F}Reflect.construct(e,[],h)}else{try{h.call()}catch(F){f=F}e.call(h.prototype)}}else{try{throw Error()}catch(F){f=F}e()}}catch(F){if(F&&f&&typeof F.stack=="string"){for(var v=F.stack.split(`
19
- `),O=f.stack.split(`
20
- `),R=v.length-1,P=O.length-1;R>=1&&P>=0&&v[R]!==O[P];)P--;for(;R>=1&&P>=0;R--,P--)if(v[R]!==O[P]){if(R!==1||P!==1)do if(R--,P--,P<0||v[R]!==O[P]){var I=`
21
- `+v[R].replace(" at new "," at ");return e.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",e.displayName)),typeof e=="function"&&te.set(e,I),I}while(R>=1&&P>=0);break}}}finally{ue=!1,de.current=j,lo(),Error.prepareStackTrace=w}var q=e?e.displayName||e.name:"",kt=q?ee(q):"";return typeof e=="function"&&te.set(e,kt),kt}function uo(e,s,l){return Ct(e,!1)}function fo(e){var s=e.prototype;return!!(s&&s.isReactComponent)}function re(e,s,l){if(e==null)return"";if(typeof e=="function")return Ct(e,fo(e));if(typeof e=="string")return ee(e);switch(e){case g:return ee("Suspense");case b:return ee("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case m:return uo(e.render);case E:return re(e.type,s,l);case D:{var f=e,w=f._payload,j=f._init;try{return re(j(w),s,l)}catch{}}}return""}var oe=Object.prototype.hasOwnProperty,jt={},Nt=A.ReactDebugCurrentFrame;function ne(e){if(e){var s=e._owner,l=re(e.type,e._source,s?s.type:null);Nt.setExtraStackFrame(l)}else Nt.setExtraStackFrame(null)}function po(e,s,l,f,w){{var j=Function.call.bind(oe);for(var h in e)if(j(e,h)){var v=void 0;try{if(typeof e[h]!="function"){var O=Error((f||"React class")+": "+l+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw O.name="Invariant Violation",O}v=e[h](s,h,f,l,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){v=R}v&&!(v instanceof Error)&&(ne(w),M("%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).",f||"React class",l,h,typeof v),ne(null)),v instanceof Error&&!(v.message in jt)&&(jt[v.message]=!0,ne(w),M("Failed %s type: %s",l,v.message),ne(null))}}}var mo=Array.isArray;function fe(e){return mo(e)}function go(e){{var s=typeof Symbol=="function"&&Symbol.toStringTag,l=s&&e[Symbol.toStringTag]||e.constructor.name||"Object";return l}}function vo(e){try{return St(e),!1}catch{return!0}}function St(e){return""+e}function Tt(e){if(vo(e))return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",go(e)),St(e)}var H=A.ReactCurrentOwner,bo={key:!0,ref:!0,__self:!0,__source:!0},_t,Rt,pe;pe={};function xo(e){if(oe.call(e,"ref")){var s=Object.getOwnPropertyDescriptor(e,"ref").get;if(s&&s.isReactWarning)return!1}return e.ref!==void 0}function ho(e){if(oe.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return!1}return e.key!==void 0}function yo(e,s){if(typeof e.ref=="string"&&H.current&&s&&H.current.stateNode!==s){var l=k(H.current.type);pe[l]||(M('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',k(H.current.type),e.ref),pe[l]=!0)}}function wo(e,s){{var l=function(){_t||(_t=!0,M("%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))};l.isReactWarning=!0,Object.defineProperty(e,"key",{get:l,configurable:!0})}}function Co(e,s){{var l=function(){Rt||(Rt=!0,M("%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))};l.isReactWarning=!0,Object.defineProperty(e,"ref",{get:l,configurable:!0})}}var jo=function(e,s,l,f,w,j,h){var v={$$typeof:r,type:e,key:s,ref:l,props:h,_owner:j};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:f}),Object.defineProperty(v,"_source",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.freeze&&(Object.freeze(v.props),Object.freeze(v)),v};function No(e,s,l,f,w){{var j,h={},v=null,O=null;l!==void 0&&(Tt(l),v=""+l),ho(s)&&(Tt(s.key),v=""+s.key),xo(s)&&(O=s.ref,yo(s,w));for(j in s)oe.call(s,j)&&!bo.hasOwnProperty(j)&&(h[j]=s[j]);if(e&&e.defaultProps){var R=e.defaultProps;for(j in R)h[j]===void 0&&(h[j]=R[j])}if(v||O){var P=typeof e=="function"?e.displayName||e.name||"Unknown":e;v&&wo(h,P),O&&Co(h,P)}return jo(e,v,O,w,f,H.current,h)}}var me=A.ReactCurrentOwner,Et=A.ReactDebugCurrentFrame;function W(e){if(e){var s=e._owner,l=re(e.type,e._source,s?s.type:null);Et.setExtraStackFrame(l)}else Et.setExtraStackFrame(null)}var ge;ge=!1;function ve(e){return typeof e=="object"&&e!==null&&e.$$typeof===r}function Pt(){{if(me.current){var e=k(me.current.type);if(e)return`
17
+ */var Ce;function Dt(){return Ce||(Ce=1,process.env.NODE_ENV!=="production"&&function(){var t=m.default,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),z=Symbol.for("react.offscreen"),He=Symbol.iterator,Fr="@@iterator";function Lr(e){if(e===null||typeof e!="object")return null;var s=He&&e[He]||e[Fr];return typeof s=="function"?s:null}var W=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function I(e){{for(var s=arguments.length,l=new Array(s>1?s-1:0),p=1;p<s;p++)l[p-1]=arguments[p];Br("error",e,l)}}function Br(e,s,l){{var p=W.ReactDebugCurrentFrame,w=p.getStackAddendum();w!==""&&(s+="%s",l=l.concat([w]));var j=l.map(function(y){return String(y)});j.unshift("Warning: "+s),Function.prototype.apply.call(console[e],console,j)}}var Vr=!1,Ar=!1,$r=!1,zr=!1,Wr=!1,Xe;Xe=Symbol.for("react.module.reference");function qr(e){return!!(typeof e=="string"||typeof e=="function"||e===a||e===d||Wr||e===i||e===f||e===g||zr||e===z||Vr||Ar||$r||typeof e=="object"&&e!==null&&(e.$$typeof===D||e.$$typeof===_||e.$$typeof===c||e.$$typeof===h||e.$$typeof===v||e.$$typeof===Xe||e.getModuleId!==void 0))}function Yr(e,s,l){var p=e.displayName;if(p)return p;var w=s.displayName||s.name||"";return w!==""?l+"("+w+")":l}function Ze(e){return e.displayName||"Context"}function F(e){if(e==null)return null;if(typeof e.tag=="number"&&I("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case a:return"Fragment";case r:return"Portal";case d:return"Profiler";case i:return"StrictMode";case f:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case h:var s=e;return Ze(s)+".Consumer";case c:var l=e;return Ze(l._context)+".Provider";case v:return Yr(e,e.render,"ForwardRef");case _:var p=e.displayName||null;return p!==null?p:F(e.type)||"Memo";case D:{var w=e,j=w._payload,y=w._init;try{return F(y(j))}catch{return null}}}return null}var A=Object.assign,G=0,Qe,et,tt,rt,nt,ot,at;function st(){}st.__reactDisabledLog=!0;function Ur(){{if(G===0){Qe=console.log,et=console.info,tt=console.warn,rt=console.error,nt=console.group,ot=console.groupCollapsed,at=console.groupEnd;var e={configurable:!0,enumerable:!0,value:st,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}G++}}function Kr(){{if(G--,G===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:Qe}),info:A({},e,{value:et}),warn:A({},e,{value:tt}),error:A({},e,{value:rt}),group:A({},e,{value:nt}),groupCollapsed:A({},e,{value:ot}),groupEnd:A({},e,{value:at})})}G<0&&I("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var de=W.ReactCurrentDispatcher,ce;function re(e,s,l){{if(ce===void 0)try{throw Error()}catch(w){var p=w.stack.trim().match(/\n( *(at )?)/);ce=p&&p[1]||""}return`
18
+ `+ce+e}}var ue=!1,ne;{var Jr=typeof WeakMap=="function"?WeakMap:Map;ne=new Jr}function it(e,s){if(!e||ue)return"";{var l=ne.get(e);if(l!==void 0)return l}var p;ue=!0;var w=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var j;j=de.current,de.current=null,Ur();try{if(s){var y=function(){throw Error()};if(Object.defineProperty(y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(y,[])}catch(k){p=k}Reflect.construct(e,[],y)}else{try{y.call()}catch(k){p=k}e.call(y.prototype)}}else{try{throw Error()}catch(k){p=k}e()}}catch(k){if(k&&p&&typeof k.stack=="string"){for(var b=k.stack.split(`
19
+ `),M=p.stack.split(`
20
+ `),R=b.length-1,P=M.length-1;R>=1&&P>=0&&b[R]!==M[P];)P--;for(;R>=1&&P>=0;R--,P--)if(b[R]!==M[P]){if(R!==1||P!==1)do if(R--,P--,P<0||b[R]!==M[P]){var O=`
21
+ `+b[R].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),typeof e=="function"&&ne.set(e,O),O}while(R>=1&&P>=0);break}}}finally{ue=!1,de.current=j,Kr(),Error.prepareStackTrace=w}var Y=e?e.displayName||e.name:"",$=Y?re(Y):"";return typeof e=="function"&&ne.set(e,$),$}function Gr(e,s,l){return it(e,!1)}function Hr(e){var s=e.prototype;return!!(s&&s.isReactComponent)}function oe(e,s,l){if(e==null)return"";if(typeof e=="function")return it(e,Hr(e));if(typeof e=="string")return re(e);switch(e){case f:return re("Suspense");case g:return re("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case v:return Gr(e.render);case _:return oe(e.type,s,l);case D:{var p=e,w=p._payload,j=p._init;try{return oe(j(w),s,l)}catch{}}}return""}var H=Object.prototype.hasOwnProperty,lt={},dt=W.ReactDebugCurrentFrame;function ae(e){if(e){var s=e._owner,l=oe(e.type,e._source,s?s.type:null);dt.setExtraStackFrame(l)}else dt.setExtraStackFrame(null)}function Xr(e,s,l,p,w){{var j=Function.call.bind(H);for(var y in e)if(j(e,y)){var b=void 0;try{if(typeof e[y]!="function"){var M=Error((p||"React class")+": "+l+" type `"+y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw M.name="Invariant Violation",M}b=e[y](s,y,p,l,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){b=R}b&&!(b instanceof Error)&&(ae(w),I("%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).",p||"React class",l,y,typeof b),ae(null)),b instanceof Error&&!(b.message in lt)&&(lt[b.message]=!0,ae(w),I("Failed %s type: %s",l,b.message),ae(null))}}}var Zr=Array.isArray;function fe(e){return Zr(e)}function Qr(e){{var s=typeof Symbol=="function"&&Symbol.toStringTag,l=s&&e[Symbol.toStringTag]||e.constructor.name||"Object";return l}}function en(e){try{return ct(e),!1}catch{return!0}}function ct(e){return""+e}function ut(e){if(en(e))return I("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qr(e)),ct(e)}var X=W.ReactCurrentOwner,tn={key:!0,ref:!0,__self:!0,__source:!0},ft,pt,pe;pe={};function rn(e){if(H.call(e,"ref")){var s=Object.getOwnPropertyDescriptor(e,"ref").get;if(s&&s.isReactWarning)return!1}return e.ref!==void 0}function nn(e){if(H.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return!1}return e.key!==void 0}function on(e,s){if(typeof e.ref=="string"&&X.current&&s&&X.current.stateNode!==s){var l=F(X.current.type);pe[l]||(I('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',F(X.current.type),e.ref),pe[l]=!0)}}function an(e,s){{var l=function(){ft||(ft=!0,I("%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))};l.isReactWarning=!0,Object.defineProperty(e,"key",{get:l,configurable:!0})}}function sn(e,s){{var l=function(){pt||(pt=!0,I("%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))};l.isReactWarning=!0,Object.defineProperty(e,"ref",{get:l,configurable:!0})}}var ln=function(e,s,l,p,w,j,y){var b={$$typeof:n,type:e,key:s,ref:l,props:y,_owner:j};return b._store={},Object.defineProperty(b._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(b,"_self",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.defineProperty(b,"_source",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.freeze&&(Object.freeze(b.props),Object.freeze(b)),b};function dn(e,s,l,p,w){{var j,y={},b=null,M=null;l!==void 0&&(ut(l),b=""+l),nn(s)&&(ut(s.key),b=""+s.key),rn(s)&&(M=s.ref,on(s,w));for(j in s)H.call(s,j)&&!tn.hasOwnProperty(j)&&(y[j]=s[j]);if(e&&e.defaultProps){var R=e.defaultProps;for(j in R)y[j]===void 0&&(y[j]=R[j])}if(b||M){var P=typeof e=="function"?e.displayName||e.name||"Unknown":e;b&&an(y,P),M&&sn(y,P)}return ln(e,b,M,w,p,X.current,y)}}var me=W.ReactCurrentOwner,mt=W.ReactDebugCurrentFrame;function q(e){if(e){var s=e._owner,l=oe(e.type,e._source,s?s.type:null);mt.setExtraStackFrame(l)}else mt.setExtraStackFrame(null)}var ve;ve=!1;function ge(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function vt(){{if(me.current){var e=F(me.current.type);if(e)return`
22
22
 
23
- Check the render method of \``+e+"`."}return""}}function So(e){{if(e!==void 0){var s=e.fileName.replace(/^.*[\\\/]/,""),l=e.lineNumber;return`
23
+ Check the render method of \``+e+"`."}return""}}function cn(e){{if(e!==void 0){var s=e.fileName.replace(/^.*[\\\/]/,""),l=e.lineNumber;return`
24
24
 
25
- Check your code at `+s+":"+l+"."}return""}}var Dt={};function To(e){{var s=Pt();if(!s){var l=typeof e=="string"?e:e.displayName||e.name;l&&(s=`
25
+ Check your code at `+s+":"+l+"."}return""}}var gt={};function un(e){{var s=vt();if(!s){var l=typeof e=="string"?e:e.displayName||e.name;l&&(s=`
26
26
 
27
- Check the top-level render call using <`+l+">.")}return s}}function Mt(e,s){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var l=To(s);if(Dt[l])return;Dt[l]=!0;var f="";e&&e._owner&&e._owner!==me.current&&(f=" It was passed a child from "+k(e._owner.type)+"."),W(e),M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',l,f),W(null)}}function Ot(e,s){{if(typeof e!="object")return;if(fe(e))for(var l=0;l<e.length;l++){var f=e[l];ve(f)&&Mt(f,s)}else if(ve(e))e._store&&(e._store.validated=!0);else if(e){var w=Zr(e);if(typeof w=="function"&&w!==e.entries)for(var j=w.call(e),h;!(h=j.next()).done;)ve(h.value)&&Mt(h.value,s)}}}function _o(e){{var s=e.type;if(s==null||typeof s=="string")return;var l;if(typeof s=="function")l=s.propTypes;else if(typeof s=="object"&&(s.$$typeof===m||s.$$typeof===E))l=s.propTypes;else return;if(l){var f=k(s);po(l,e.props,"prop",f,e)}else if(s.PropTypes!==void 0&&!ge){ge=!0;var w=k(s);M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w||"Unknown")}typeof s.getDefaultProps=="function"&&!s.getDefaultProps.isReactClassApproved&&M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ro(e){{for(var s=Object.keys(e.props),l=0;l<s.length;l++){var f=s[l];if(f!=="children"&&f!=="key"){W(e),M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",f),W(null);break}}e.ref!==null&&(W(e),M("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function It(e,s,l,f,w,j){{var h=ao(e);if(!h){var v="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).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 O=So(w);O?v+=O:v+=Pt();var R;e===null?R="null":fe(e)?R="array":e!==void 0&&e.$$typeof===r?(R="<"+(k(e.type)||"Unknown")+" />",v=" Did you accidentally export a JSX literal instead of a component?"):R=typeof e,M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,v)}var P=No(e,s,l,w,j);if(P==null)return P;if(h){var I=s.children;if(I!==void 0)if(f)if(fe(I)){for(var q=0;q<I.length;q++)Ot(I[q],e);Object.freeze&&Object.freeze(I)}else M("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(I,e)}return e===a?Ro(P):_o(P),P}}function Eo(e,s,l){return It(e,s,l,!0)}function Po(e,s,l){return It(e,s,l,!1)}var Do=Po,Mo=Eo;G.Fragment=a,G.jsx=Do,G.jsxs=Mo}()),G}process.env.NODE_ENV==="production"?ae.exports=Yt():ae.exports=Ut();var n=ae.exports;function u(...t){return Lt.twMerge(Ft.clsx(t))}const je=X.cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Gt({className:t,variant:r,...o}){return n.jsx("div",{className:u(je({variant:r}),t),...o})}const Jt=Object.freeze(Object.defineProperty({__proto__:null,Badge:Gt,badgeVariants:je},Symbol.toStringTag,{value:"Module"})),Ne=X.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Se=p.forwardRef(({className:t,variant:r,size:o,asChild:a=!1,...i},d)=>{const c=a?xe.Slot:"button";return n.jsx(c,{className:u(Ne({variant:r,size:o,className:t})),ref:d,...i})});Se.displayName="Button";const Kt=Object.freeze(Object.defineProperty({__proto__:null,Button:Se,buttonVariants:Ne},Symbol.toStringTag,{value:"Module"})),Te=p.forwardRef(({className:t,...r},o)=>n.jsx("div",{ref:o,className:u("rounded-lg border bg-card text-card-foreground shadow-sm",t),...r}));Te.displayName="Card";const _e=p.forwardRef(({className:t,...r},o)=>n.jsx("div",{ref:o,className:u("flex flex-col space-y-1.5 p-6",t),...r}));_e.displayName="CardHeader";const Re=p.forwardRef(({className:t,...r},o)=>n.jsx("h3",{ref:o,className:u("text-2xl font-semibold leading-none tracking-tight",t),...r}));Re.displayName="CardTitle";const Ee=p.forwardRef(({className:t,...r},o)=>n.jsx("p",{ref:o,className:u("text-sm text-muted-foreground",t),...r}));Ee.displayName="CardDescription";const Pe=p.forwardRef(({className:t,...r},o)=>n.jsx("div",{ref:o,className:u("p-6 pt-0",t),...r}));Pe.displayName="CardContent";const De=p.forwardRef(({className:t,...r},o)=>n.jsx("div",{ref:o,className:u("flex items-center p-6 pt-0",t),...r}));De.displayName="CardFooter";const Ht=Object.freeze(Object.defineProperty({__proto__:null,Card:Te,CardContent:Pe,CardDescription:Ee,CardFooter:De,CardHeader:_e,CardTitle:Re},Symbol.toStringTag,{value:"Module"})),Xt=N.Root,Zt=N.Trigger,Qt=N.Group,er=N.Portal,tr=N.Sub,rr=N.RadioGroup,Me=p.forwardRef(({className:t,inset:r,children:o,...a},i)=>n.jsxs(N.SubTrigger,{ref:i,className:u("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",r&&"pl-8",t),...a,children:[o,n.jsx(L.ChevronRight,{className:"ml-auto h-4 w-4"})]}));Me.displayName=N.SubTrigger.displayName;const Oe=p.forwardRef(({className:t,...r},o)=>n.jsx(N.SubContent,{ref:o,className:u("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r}));Oe.displayName=N.SubContent.displayName;const Ie=p.forwardRef(({className:t,sideOffset:r=4,...o},a)=>n.jsx(N.Content,{ref:a,sideOffset:r,className:u("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...o}));Ie.displayName=N.Content.displayName;const ke=p.forwardRef(({className:t,inset:r,...o},a)=>n.jsx(N.Item,{ref:a,className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r&&"pl-8",t),...o}));ke.displayName=N.Item.displayName;const Fe=p.forwardRef(({className:t,children:r,checked:o,...a},i)=>n.jsxs(N.CheckboxItem,{ref:i,className:u("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:o,...a,children:[n.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(N.ItemIndicator,{children:n.jsx(L.Check,{className:"h-4 w-4"})})}),r]}));Fe.displayName=N.CheckboxItem.displayName;const Le=p.forwardRef(({className:t,children:r,...o},a)=>n.jsxs(N.RadioItem,{ref:a,className:u("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...o,children:[n.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(N.ItemIndicator,{children:n.jsx(L.Circle,{className:"h-2 w-2 fill-current"})})}),r]}));Le.displayName=N.RadioItem.displayName;const Be=p.forwardRef(({className:t,inset:r,...o},a)=>n.jsx(N.Label,{ref:a,className:u("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",t),...o}));Be.displayName=N.Label.displayName;const ze=p.forwardRef(({className:t,...r},o)=>n.jsx(N.Separator,{ref:o,className:u("-mx-1 my-1 h-px bg-muted",t),...r}));ze.displayName=N.Separator.displayName;const Ve=({className:t,...r})=>n.jsx("span",{className:u("ml-auto text-xs tracking-widest opacity-60",t),...r});Ve.displayName="DropdownMenuShortcut";const or=Object.freeze(Object.defineProperty({__proto__:null,DropdownMenu:Xt,DropdownMenuCheckboxItem:Fe,DropdownMenuContent:Ie,DropdownMenuGroup:Qt,DropdownMenuItem:ke,DropdownMenuLabel:Be,DropdownMenuPortal:er,DropdownMenuRadioGroup:rr,DropdownMenuRadioItem:Le,DropdownMenuSeparator:ze,DropdownMenuShortcut:Ve,DropdownMenuSub:tr,DropdownMenuSubContent:Oe,DropdownMenuSubTrigger:Me,DropdownMenuTrigger:Zt},Symbol.toStringTag,{value:"Module"})),nr=X.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),se=p.forwardRef(({className:t,...r},o)=>n.jsx(he.Root,{ref:o,className:u(nr(),t),...r}));se.displayName=he.Root.displayName;const ar=Object.freeze(Object.defineProperty({__proto__:null,Label:se},Symbol.toStringTag,{value:"Module"})),sr=Z.FormProvider,$e=p.createContext({}),ir=({...t})=>n.jsx($e.Provider,{value:{name:t.name},children:n.jsx(Z.Controller,{...t})}),J=()=>{const t=p.useContext($e),r=p.useContext(Ae),{getFieldState:o,formState:a}=Z.useFormContext(),i=o(t.name,a);if(!t)throw new Error("useFormField should be used within <FormField>");const{id:d}=r;return{id:d,name:t.name,formItemId:`${d}-form-item`,formDescriptionId:`${d}-form-item-description`,formMessageId:`${d}-form-item-message`,...i}},Ae=p.createContext({}),We=p.forwardRef(({className:t,...r},o)=>{const a=p.useId();return n.jsx(Ae.Provider,{value:{id:a},children:n.jsx("div",{ref:o,className:u("space-y-2",t),...r})})});We.displayName="FormItem";const qe=p.forwardRef(({className:t,...r},o)=>{const{error:a,formItemId:i}=J();return n.jsx(se,{ref:o,className:u(a&&"text-destructive",t),htmlFor:i,...r})});qe.displayName="FormLabel";const Ye=p.forwardRef(({...t},r)=>{const{error:o,formItemId:a,formDescriptionId:i,formMessageId:d}=J();return n.jsx(xe.Slot,{ref:r,id:a,"aria-describedby":o?`${i} ${d}`:`${i}`,"aria-invalid":!!o,...t})});Ye.displayName="FormControl";const Ue=p.forwardRef(({className:t,...r},o)=>{const{formDescriptionId:a}=J();return n.jsx("p",{ref:o,id:a,className:u("text-sm text-muted-foreground",t),...r})});Ue.displayName="FormDescription";const Ge=p.forwardRef(({className:t,children:r,...o},a)=>{const{error:i,formMessageId:d}=J(),c=i?String(i==null?void 0:i.message):r;return c?n.jsx("p",{ref:a,id:d,className:u("text-sm font-medium text-destructive",t),...o,children:c}):null});Ge.displayName="FormMessage";const lr=Object.freeze(Object.defineProperty({__proto__:null,Form:sr,FormControl:Ye,FormDescription:Ue,FormField:ir,FormItem:We,FormLabel:qe,FormMessage:Ge,useFormField:J},Symbol.toStringTag,{value:"Module"})),Je=p.forwardRef(({className:t,type:r,...o},a)=>n.jsx("input",{type:r,className:u("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:a,...o}));Je.displayName="Input";const dr=Object.freeze(Object.defineProperty({__proto__:null,Input:Je},Symbol.toStringTag,{value:"Module"})),cr=Q.Root,ur=Q.Trigger,Ke=p.forwardRef(({className:t,align:r="center",sideOffset:o=4,...a},i)=>n.jsx(Q.Content,{ref:i,align:r,sideOffset:o,className:u("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...a}));Ke.displayName=Q.Content.displayName;const fr=Object.freeze(Object.defineProperty({__proto__:null,Popover:cr,PopoverContent:Ke,PopoverTrigger:ur},Symbol.toStringTag,{value:"Module"})),pr=T.Root,mr=T.Group,gr=T.Value,He=p.forwardRef(({className:t,children:r,...o},a)=>n.jsxs(T.Trigger,{ref:a,className:u("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...o,children:[r,n.jsx(T.Icon,{asChild:!0,children:n.jsx(L.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));He.displayName=T.Trigger.displayName;const ie=p.forwardRef(({className:t,...r},o)=>n.jsx(T.ScrollUpButton,{ref:o,className:u("flex cursor-default items-center justify-center py-1",t),...r,children:n.jsx(L.ChevronUp,{className:"h-4 w-4"})}));ie.displayName=T.ScrollUpButton.displayName;const le=p.forwardRef(({className:t,...r},o)=>n.jsx(T.ScrollDownButton,{ref:o,className:u("flex cursor-default items-center justify-center py-1",t),...r,children:n.jsx(L.ChevronDown,{className:"h-4 w-4"})}));le.displayName=T.ScrollDownButton.displayName;const Xe=p.forwardRef(({className:t,children:r,position:o="popper",...a},i)=>n.jsxs(T.Content,{ref:i,className:u("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,...a,children:[n.jsx(ie,{}),n.jsx(T.Viewport,{className:u("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),n.jsx(le,{})]}));Xe.displayName=T.Content.displayName;const Ze=p.forwardRef(({className:t,...r},o)=>n.jsx(T.Label,{ref:o,className:u("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...r}));Ze.displayName=T.Label.displayName;const Qe=p.forwardRef(({className:t,children:r,...o},a)=>n.jsxs(T.Item,{ref:a,className:u("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...o,children:[n.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(T.ItemIndicator,{children:n.jsx(L.Check,{className:"h-4 w-4"})})}),n.jsx(T.ItemText,{children:r})]}));Qe.displayName=T.Item.displayName;const et=p.forwardRef(({className:t,...r},o)=>n.jsx(T.Separator,{ref:o,className:u("-mx-1 my-1 h-px bg-muted",t),...r}));et.displayName=T.Separator.displayName;const vr=Object.freeze(Object.defineProperty({__proto__:null,Select:pr,SelectContent:Xe,SelectGroup:mr,SelectItem:Qe,SelectLabel:Ze,SelectScrollDownButton:le,SelectScrollUpButton:ie,SelectSeparator:et,SelectTrigger:He,SelectValue:gr},Symbol.toStringTag,{value:"Module"})),br=z.Root,tt=p.forwardRef(({className:t,...r},o)=>n.jsx(z.List,{ref:o,className:u("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...r}));tt.displayName=z.List.displayName;const rt=p.forwardRef(({className:t,...r},o)=>n.jsx(z.Trigger,{ref:o,className:u("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...r}));rt.displayName=z.Trigger.displayName;const ot=p.forwardRef(({className:t,...r},o)=>n.jsx(z.Content,{ref:o,className:u("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...r}));ot.displayName=z.Content.displayName;const xr=Object.freeze(Object.defineProperty({__proto__:null,Tabs:br,TabsContent:ot,TabsList:tt,TabsTrigger:rt},Symbol.toStringTag,{value:"Module"})),nt=X.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),at=p.forwardRef(({className:t,variant:r,size:o,...a},i)=>n.jsx(ye.Root,{ref:i,className:u(nt({variant:r,size:o,className:t})),...a}));at.displayName=ye.Root.displayName;const hr=Object.freeze(Object.defineProperty({__proto__:null,Toggle:at,toggleVariants:nt},Symbol.toStringTag,{value:"Module"})),yr=Y.Provider,wr=Y.Root,Cr=Y.Trigger,st=p.forwardRef(({className:t,sideOffset:r=4,...o},a)=>n.jsx(Y.Content,{ref:a,sideOffset:r,className:u("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...o}));st.displayName=Y.Content.displayName;const jr={Badge:Jt,Button:Kt,Card:Ht,DropdownMenu:or,Form:lr,Input:dr,Label:ar,Popover:fr,Select:vr,Tabs:xr,Toggle:hr,Tooltip:Object.freeze(Object.defineProperty({__proto__:null,Tooltip:wr,TooltipContent:st,TooltipProvider:yr,TooltipTrigger:Cr},Symbol.toStringTag,{value:"Module"}))},it=y.createContext(void 0);function _(){return y.useContext(it)}const Nr=t=>{const{children:r,...o}=t;C.assertEmpty(o);const a=_(),i=Z.useForm();return n.jsx(a.Form.Form,{...i,children:r})},Sr=t=>y.forwardRef((r,o)=>n.jsx(t,{onPointerDown:a=>{a.nativeEvent.fakeEvent||(a.ctrlKey=!0)},onPointerUp:a=>{const i=new PointerEvent("pointerdown",a.nativeEvent);i.fakeEvent=!0,a.target.dispatchEvent(i)},...r,ref:o})),Tr=t=>{const{children:r,onOpenChange:o,position:a,sub:i,...d}=t;C.assertEmpty(d);const c=_();return i?n.jsx(c.DropdownMenu.DropdownMenuSub,{onOpenChange:o,children:r}):n.jsx(c.DropdownMenu.DropdownMenu,{onOpenChange:o,children:r})},_r=t=>{const{children:r,sub:o,...a}=t;C.assertEmpty(a);const i=_(),d=y.useMemo(()=>Sr(i.DropdownMenu.DropdownMenuTrigger),[i.DropdownMenu.DropdownMenuTrigger]);return o?n.jsx(i.DropdownMenu.DropdownMenuSubTrigger,{children:r}):n.jsx(d,{asChild:!0,...a,children:r})},Rr=y.forwardRef((t,r)=>{const{className:o,children:a,sub:i,...d}=t;C.assertEmpty(d);const c=_();return i?n.jsx(c.DropdownMenu.DropdownMenuSubContent,{className:o,ref:r,children:a}):n.jsx(c.DropdownMenu.DropdownMenuContent,{className:o,ref:r,children:a})}),Er=y.forwardRef((t,r)=>{const{className:o,children:a,icon:i,checked:d,subTrigger:c,onClick:x,...m}=t;C.assertEmpty(m);const g=_();return c?n.jsxs(n.Fragment,{children:[i,a]}):d!==void 0?n.jsxs(g.DropdownMenu.DropdownMenuCheckboxItem,{className:u(o,"gap-1"),ref:r,checked:d,onClick:x,...m,children:[i,a]}):n.jsxs(g.DropdownMenu.DropdownMenuItem,{className:o,ref:r,onClick:x,...m,children:[i,a,c&&n.jsx(L.ChevronRight,{className:"ml-auto h-4 w-4"})]})}),Pr=y.forwardRef((t,r)=>{const{className:o,...a}=t;C.assertEmpty(a);const i=_();return n.jsx(i.DropdownMenu.DropdownMenuSeparator,{className:o,ref:r})}),Dr=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;C.assertEmpty(i);const d=_();return n.jsx(d.DropdownMenu.DropdownMenuLabel,{className:o,ref:r,children:a})}),Mr=y.forwardRef((t,r)=>{const{className:o,tabs:a,defaultOpenTab:i,openTab:d,setOpenTab:c,loading:x,...m}=t;C.assertEmpty(m);const g=_();return n.jsxs(g.Tabs.Tabs,{className:u(o,"bg-popover p-2 rounded-lg"),ref:r,value:d,defaultValue:i,onValueChange:c,children:[n.jsx(g.Tabs.TabsList,{children:a.map(b=>n.jsx(g.Tabs.TabsTrigger,{value:b.name,children:b.name},b.name))}),a.map(b=>n.jsx(g.Tabs.TabsContent,{value:b.name,children:n.jsx(g.Card.Card,{children:n.jsx(g.Card.CardContent,{className:"p-4",children:b.tabPanel})})},b.name))]})}),Or=y.forwardRef((t,r)=>{const{className:o,children:a,onClick:i,label:d,...c}=t;C.assertEmpty(c);const x=_();return n.jsx(x.Button.Button,{type:"submit",className:o,"aria-label":d,ref:r,onClick:i,children:a})}),Ir=y.forwardRef((t,r)=>{const{className:o,accept:a,value:i,placeholder:d,onChange:c,...x}=t;C.assertEmpty(x);const m=_();return n.jsx(m.Input.Input,{type:"file",className:o,ref:r,accept:a,value:i?i.name:void 0,onChange:async g=>c==null?void 0:c(g.target.files[0]),placeholder:d})}),kr=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;return C.assertEmpty(i),n.jsx("div",{className:u(o,"flex flex-col gap-2 items-start justify-center"),ref:r,children:a})}),Fr=y.forwardRef((t,r)=>{const{className:o,value:a,placeholder:i,onKeyDown:d,onChange:c,...x}=t;C.assertEmpty(x);const m=_();return n.jsx(m.Input.Input,{"data-test":"embed-input",className:u(o,"w-80"),ref:r,value:a,placeholder:i,onKeyDown:d,onChange:c})}),Lr=t=>{const{children:r,opened:o,position:a,...i}=t;C.assertEmpty(i);const d=_();return n.jsx(d.Popover.Popover,{open:o,children:r})},Br=y.forwardRef((t,r)=>{const{children:o,...a}=t;C.assertEmpty(a);const i=_();return n.jsx(i.Popover.PopoverTrigger,{ref:r,asChild:!0,children:o})}),zr=y.forwardRef((t,r)=>{const{className:o,variant:a,children:i,...d}=t;C.assertEmpty(d);const c=_();return n.jsx(c.Popover.PopoverContent,{sideOffset:8,className:u(o,"flex flex-col gap-2",a==="panel-popover"?"p-0 border-none shadow-none max-w-none w-fit":""),ref:r,children:i})}),Vr=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;return C.assertEmpty(i),n.jsx("div",{className:o,ref:r,children:a})}),$r=y.forwardRef((t,r)=>{const{className:o,children:a,icon:i,onClick:d,onDragEnd:c,onDragStart:x,draggable:m,label:g,...b}=t;C.assertEmpty(b,!1);const E=_();return n.jsxs(E.Button.Button,{variant:"ghost",className:u(o,"text-gray-400"),ref:r,"aria-label":g,onClick:d,onDragStart:x,onDragEnd:c,draggable:m,...b,children:[i,a]})}),Ar=y.forwardRef((t,r)=>{const{className:o,children:a,id:i,...d}=t;return C.assertEmpty(d),n.jsx("div",{id:i,role:"listbox",className:u("z-50 min-w-[8rem] overflow-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),ref:r,children:a})}),Wr=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;return C.assertEmpty(i),n.jsx("div",{className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),ref:r,children:n.jsx("div",{children:a})})}),qr=y.forwardRef((t,r)=>{const o=_(),{className:a,item:i,isSelected:d,onClick:c,id:x,...m}=t;return C.assertEmpty(m),n.jsxs("div",{className:u("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),ref:r,id:x,onClick:c,role:"option","aria-selected":d||void 0,children:[i.icon&&n.jsx("div",{className:"p-3","data-position":"left",children:i.icon}),n.jsxs("div",{className:"flex-1",children:[n.jsx("div",{className:"text-base",children:i.title}),n.jsx("div",{className:"text-xs",children:i.subtext})]}),i.badge&&n.jsx("div",{"data-position":"right",className:"text-xs",children:n.jsx(o.Badge.Badge,{variant:"secondary",children:i.badge})})]})}),Yr=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;return C.assertEmpty(i),n.jsx("div",{className:u("px-2 py-1.5 text-sm font-semibold",o),ref:r,children:a})}),Ur=y.forwardRef((t,r)=>{const{className:o,children:a,...i}=t;return C.assertEmpty(i),n.jsx("div",{className:o,ref:r,children:a})}),Gr=y.forwardRef((t,r)=>{const{className:o,children:a,draggable:i,onDragStart:d,onDragEnd:c,style:x,label:m,...g}=t;C.assertEmpty(g,!1);const b=_();return n.jsx(b.Button.Button,{variant:"ghost",className:u(o,"p-0 h-fit w-fit text-gray-400"),ref:r,"aria-label":m,draggable:i,onDragStart:d,onDragEnd:c,style:x,...g,children:a})}),Jr=y.forwardRef(t=>{const{className:r,name:o,label:a,icon:i,value:d,autoFocus:c,placeholder:x,onKeyDown:m,onChange:g,onSubmit:b,...E}=t;C.assertEmpty(E);const D=_();return a?n.jsxs("div",{children:[n.jsx(D.Label.Label,{htmlFor:a,children:a}),n.jsx(D.Input.Input,{className:r,id:a,name:o,autoFocus:c,placeholder:x,value:d,onKeyDown:m,onChange:g,onSubmit:b})]}):n.jsx(D.Input.Input,{"aria-label":o,name:o,autoFocus:c,placeholder:x,value:d,onKeyDown:m,onChange:g,onSubmit:b})}),lt=y.forwardRef((t,r)=>{const{className:o,children:a,onMouseEnter:i,onMouseLeave:d,...c}=t;C.assertEmpty(c);const x=_();return n.jsx(x.Tooltip.TooltipProvider,{delayDuration:0,children:n.jsx("div",{className:u(o,"flex gap-1 p-1 bg-popover text-popover-foreground border rounded-lg shadow-md"),ref:r,onMouseEnter:i,onMouseLeave:d,children:a})})}),dt=y.forwardRef((t,r)=>{const{className:o,children:a,mainTooltip:i,secondaryTooltip:d,icon:c,isSelected:x,isDisabled:m,onClick:g,label:b,...E}=t;C.assertEmpty(E,!1);const D=_(),$=x===void 0?n.jsxs(D.Button.Button,{className:o,variant:"ghost",disabled:m,onClick:g,ref:r,"aria-label":b,...E,children:[c,a]}):n.jsxs(D.Toggle.Toggle,{className:u(o,"data-[state=open]:bg-accent data-[state=closed]:text-accent-foreground"),"aria-label":b,onClick:g,pressed:x,disabled:m,"data-state":x?"on":"off","data-disabled":m,ref:r,...E,children:[c,a]});return n.jsxs(D.Tooltip.Tooltip,{children:[n.jsx(D.Tooltip.TooltipTrigger,{asChild:!0,children:$}),n.jsxs(D.Tooltip.TooltipContent,{className:"flex flex-col items-center",children:[n.jsx("span",{children:i}),d&&n.jsx("span",{children:d})]})]})}),Kr=y.forwardRef((t,r)=>{const{className:o,items:a,isDisabled:i,...d}=t;C.assertEmpty(d);const c=_(),x=g=>n.jsxs("div",{className:"flex gap-1 items-center",children:[g.icon,g.text]}),m=a.filter(g=>g.isSelected)[0];return m?n.jsxs(c.Select.Select,{value:m.text,onValueChange:g=>{var b,E;return(E=(b=a.find(D=>D.text===g)).onClick)==null?void 0:E.call(b)},disabled:i,children:[n.jsx(c.Select.SelectTrigger,{className:"border-none",children:n.jsx(c.Select.SelectValue,{})}),n.jsx(c.Select.SelectContent,{className:o,ref:r,children:a.map(g=>n.jsx(c.Select.SelectItem,{disabled:g.isDisabled,value:g.text,children:n.jsx(x,{...g})},g.text))})]}):null}),Io="",ct={FormattingToolbar:{Root:lt,Button:dt,Select:Kr},FilePanel:{Root:Mr,Button:Or,FileInput:Ir,TabPanel:kr,TextInput:Fr},LinkToolbar:{Root:lt,Button:dt},SideMenu:{Root:Vr,Button:$r},SuggestionMenu:{Root:Ar,Item:qr,EmptyItem:Wr,Label:Yr,Loader:Ur},TableHandle:{Root:Gr},Generic:{Form:{Root:Nr,TextInput:Jr},Menu:{Root:Tr,Trigger:_r,Dropdown:Rr,Divider:Pr,Label:Dr,Item:Er},Popover:{Root:Lr,Trigger:Br,Content:zr}}},Hr=t=>{const{shadCNComponents:r,...o}=t,a=y.useMemo(()=>({...r,...jr}),[r]);return n.jsx(it.Provider,{value:a,children:n.jsx(be.ComponentsContext.Provider,{value:ct,children:n.jsx(be.BlockNoteViewRaw,{...o})})})};S.BlockNoteView=Hr,S.components=ct,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
27
+ Check the top-level render call using <`+l+">.")}return s}}function bt(e,s){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var l=un(s);if(gt[l])return;gt[l]=!0;var p="";e&&e._owner&&e._owner!==me.current&&(p=" It was passed a child from "+F(e._owner.type)+"."),q(e),I('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',l,p),q(null)}}function xt(e,s){{if(typeof e!="object")return;if(fe(e))for(var l=0;l<e.length;l++){var p=e[l];ge(p)&&bt(p,s)}else if(ge(e))e._store&&(e._store.validated=!0);else if(e){var w=Lr(e);if(typeof w=="function"&&w!==e.entries)for(var j=w.call(e),y;!(y=j.next()).done;)ge(y.value)&&bt(y.value,s)}}}function fn(e){{var s=e.type;if(s==null||typeof s=="string")return;var l;if(typeof s=="function")l=s.propTypes;else if(typeof s=="object"&&(s.$$typeof===v||s.$$typeof===_))l=s.propTypes;else return;if(l){var p=F(s);Xr(l,e.props,"prop",p,e)}else if(s.PropTypes!==void 0&&!ve){ve=!0;var w=F(s);I("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w||"Unknown")}typeof s.getDefaultProps=="function"&&!s.getDefaultProps.isReactClassApproved&&I("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function pn(e){{for(var s=Object.keys(e.props),l=0;l<s.length;l++){var p=s[l];if(p!=="children"&&p!=="key"){q(e),I("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",p),q(null);break}}e.ref!==null&&(q(e),I("Invalid attribute `ref` supplied to `React.Fragment`."),q(null))}}var ht={};function yt(e,s,l,p,w,j){{var y=qr(e);if(!y){var b="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(b+=" 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 M=cn(w);M?b+=M:b+=vt();var R;e===null?R="null":fe(e)?R="array":e!==void 0&&e.$$typeof===n?(R="<"+(F(e.type)||"Unknown")+" />",b=" Did you accidentally export a JSX literal instead of a component?"):R=typeof e,I("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,b)}var P=dn(e,s,l,w,j);if(P==null)return P;if(y){var O=s.children;if(O!==void 0)if(p)if(fe(O)){for(var Y=0;Y<O.length;Y++)xt(O[Y],e);Object.freeze&&Object.freeze(O)}else I("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 xt(O,e)}if(H.call(s,"key")){var $=F(e),k=Object.keys(s).filter(function(hn){return hn!=="key"}),be=k.length>0?"{key: someKey, "+k.join(": ..., ")+": ...}":"{key: someKey}";if(!ht[$+be]){var xn=k.length>0?"{"+k.join(": ..., ")+": ...}":"{}";I(`A props object containing a "key" prop is being spread into JSX:
28
+ let props = %s;
29
+ <%s {...props} />
30
+ React keys must be passed directly to JSX without using spread:
31
+ let props = %s;
32
+ <%s key={someKey} {...props} />`,be,$,xn,$),ht[$+be]=!0}}return e===a?pn(P):fn(P),P}}function mn(e,s,l){return yt(e,s,l,!0)}function vn(e,s,l){return yt(e,s,l,!1)}var gn=vn,bn=mn;J.Fragment=a,J.jsx=gn,J.jsxs=bn}()),J}process.env.NODE_ENV==="production"?ie.exports=Pt():ie.exports=Dt();var o=ie.exports;function u(...t){return Ct.twMerge(wt.clsx(t))}const It=Q.cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Mt({className:t,variant:n,...r}){return o.jsx("div",{className:u(It({variant:n}),t),...r})}const kt=Q.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),je=m.forwardRef(({className:t,variant:n,size:r,asChild:a=!1,...i},d)=>{const c=a?xe.Slot:"button";return o.jsx(c,{className:u(kt({variant:n,size:r,className:t})),ref:d,...i})});je.displayName="Button";const Ne=m.forwardRef(({className:t,...n},r)=>o.jsx("div",{ref:r,className:u("rounded-lg border bg-card text-card-foreground shadow-sm",t),...n}));Ne.displayName="Card";const Ot=m.forwardRef(({className:t,...n},r)=>o.jsx("div",{ref:r,className:u("flex flex-col space-y-1.5 p-6",t),...n}));Ot.displayName="CardHeader";const Ft=m.forwardRef(({className:t,...n},r)=>o.jsx("h3",{ref:r,className:u("text-2xl font-semibold leading-none tracking-tight",t),...n}));Ft.displayName="CardTitle";const Lt=m.forwardRef(({className:t,...n},r)=>o.jsx("p",{ref:r,className:u("text-sm text-muted-foreground",t),...n}));Lt.displayName="CardDescription";const Te=m.forwardRef(({className:t,...n},r)=>o.jsx("div",{ref:r,className:u("p-6 pt-0",t),...n}));Te.displayName="CardContent";const Bt=m.forwardRef(({className:t,...n},r)=>o.jsx("div",{ref:r,className:u("flex items-center p-6 pt-0",t),...n}));Bt.displayName="CardFooter";const Vt=T.Root,At=T.Trigger,$t=T.Sub,Se=m.forwardRef(({className:t,inset:n,children:r,...a},i)=>o.jsxs(T.SubTrigger,{ref:i,className:u("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",t),...a,children:[r,o.jsx(L.ChevronRight,{className:"ml-auto h-4 w-4"})]}));Se.displayName=T.SubTrigger.displayName;const Re=m.forwardRef(({className:t,...n},r)=>o.jsx(T.SubContent,{ref:r,className:u("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));Re.displayName=T.SubContent.displayName;const Ee=m.forwardRef(({className:t,sideOffset:n=4,...r},a)=>o.jsx(T.Content,{ref:a,sideOffset:n,className:u("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r}));Ee.displayName=T.Content.displayName;const _e=m.forwardRef(({className:t,inset:n,...r},a)=>o.jsx(T.Item,{ref:a,className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",t),...r}));_e.displayName=T.Item.displayName;const Pe=m.forwardRef(({className:t,children:n,checked:r,...a},i)=>o.jsxs(T.CheckboxItem,{ref:i,className:u("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:r,...a,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(T.ItemIndicator,{children:o.jsx(L.Check,{className:"h-4 w-4"})})}),n]}));Pe.displayName=T.CheckboxItem.displayName;const zt=m.forwardRef(({className:t,children:n,...r},a)=>o.jsxs(T.RadioItem,{ref:a,className:u("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(T.ItemIndicator,{children:o.jsx(L.Circle,{className:"h-2 w-2 fill-current"})})}),n]}));zt.displayName=T.RadioItem.displayName;const De=m.forwardRef(({className:t,inset:n,...r},a)=>o.jsx(T.Label,{ref:a,className:u("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",t),...r}));De.displayName=T.Label.displayName;const Ie=m.forwardRef(({className:t,...n},r)=>o.jsx(T.Separator,{ref:r,className:u("-mx-1 my-1 h-px bg-muted",t),...n}));Ie.displayName=T.Separator.displayName;const Wt=Q.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),le=m.forwardRef(({className:t,...n},r)=>o.jsx(he.Root,{ref:r,className:u(Wt(),t),...n}));le.displayName=he.Root.displayName;const qt=se.FormProvider,Yt=m.createContext({}),te=()=>{const t=m.useContext(Yt),n=m.useContext(Me),{getFieldState:r,formState:a}=se.useFormContext(),i=r(t.name,a);if(!t)throw new Error("useFormField should be used within <FormField>");const{id:d}=n;return{id:d,name:t.name,formItemId:`${d}-form-item`,formDescriptionId:`${d}-form-item-description`,formMessageId:`${d}-form-item-message`,...i}},Me=m.createContext({}),Ut=m.forwardRef(({className:t,...n},r)=>{const a=m.useId();return o.jsx(Me.Provider,{value:{id:a},children:o.jsx("div",{ref:r,className:u("space-y-2",t),...n})})});Ut.displayName="FormItem";const Kt=m.forwardRef(({className:t,...n},r)=>{const{error:a,formItemId:i}=te();return o.jsx(le,{ref:r,className:u(a&&"text-destructive",t),htmlFor:i,...n})});Kt.displayName="FormLabel";const Jt=m.forwardRef(({...t},n)=>{const{error:r,formItemId:a,formDescriptionId:i,formMessageId:d}=te();return o.jsx(xe.Slot,{ref:n,id:a,"aria-describedby":r?`${i} ${d}`:`${i}`,"aria-invalid":!!r,...t})});Jt.displayName="FormControl";const Gt=m.forwardRef(({className:t,...n},r)=>{const{formDescriptionId:a}=te();return o.jsx("p",{ref:r,id:a,className:u("text-sm text-muted-foreground",t),...n})});Gt.displayName="FormDescription";const Ht=m.forwardRef(({className:t,children:n,...r},a)=>{const{error:i,formMessageId:d}=te(),c=i?String(i==null?void 0:i.message):n;return c?o.jsx("p",{ref:a,id:d,className:u("text-sm font-medium text-destructive",t),...r,children:c}):null});Ht.displayName="FormMessage";const ke=m.forwardRef(({className:t,type:n,...r},a)=>o.jsx("input",{type:n,className:u("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:a,...r}));ke.displayName="Input";const Xt=ee.Root,Zt=ee.Trigger,Oe=m.forwardRef(({className:t,align:n="center",sideOffset:r=4,...a},i)=>o.jsx(ee.Content,{ref:i,align:n,sideOffset:r,className:u("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...a}));Oe.displayName=ee.Content.displayName;const Qt=E.Root,er=E.Value,Fe=m.forwardRef(({className:t,children:n,...r},a)=>o.jsxs(E.Trigger,{ref:a,className:u("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...r,children:[n,o.jsx(E.Icon,{asChild:!0,children:o.jsx(L.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Fe.displayName=E.Trigger.displayName;const Le=m.forwardRef(({className:t,...n},r)=>o.jsx(E.ScrollUpButton,{ref:r,className:u("flex cursor-default items-center justify-center py-1",t),...n,children:o.jsx(L.ChevronUp,{className:"h-4 w-4"})}));Le.displayName=E.ScrollUpButton.displayName;const Be=m.forwardRef(({className:t,...n},r)=>o.jsx(E.ScrollDownButton,{ref:r,className:u("flex cursor-default items-center justify-center py-1",t),...n,children:o.jsx(L.ChevronDown,{className:"h-4 w-4"})}));Be.displayName=E.ScrollDownButton.displayName;const Ve=m.forwardRef(({className:t,children:n,position:r="popper",...a},i)=>o.jsxs(E.Content,{ref:i,className:u("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,...a,children:[o.jsx(Le,{}),o.jsx(E.Viewport,{className:u("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),o.jsx(Be,{})]}));Ve.displayName=E.Content.displayName;const tr=m.forwardRef(({className:t,...n},r)=>o.jsx(E.Label,{ref:r,className:u("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...n}));tr.displayName=E.Label.displayName;const Ae=m.forwardRef(({className:t,children:n,...r},a)=>o.jsxs(E.Item,{ref:a,className:u("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(E.ItemIndicator,{children:o.jsx(L.Check,{className:"h-4 w-4"})})}),o.jsx(E.ItemText,{children:n})]}));Ae.displayName=E.Item.displayName;const rr=m.forwardRef(({className:t,...n},r)=>o.jsx(E.Separator,{ref:r,className:u("-mx-1 my-1 h-px bg-muted",t),...n}));rr.displayName=E.Separator.displayName;const nr=V.Root,$e=m.forwardRef(({className:t,...n},r)=>o.jsx(V.List,{ref:r,className:u("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...n}));$e.displayName=V.List.displayName;const ze=m.forwardRef(({className:t,...n},r)=>o.jsx(V.Trigger,{ref:r,className:u("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...n}));ze.displayName=V.Trigger.displayName;const We=m.forwardRef(({className:t,...n},r)=>o.jsx(V.Content,{ref:r,className:u("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...n}));We.displayName=V.Content.displayName;const or=Q.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),qe=m.forwardRef(({className:t,variant:n,size:r,...a},i)=>o.jsx(ye.Root,{ref:i,className:u(or({variant:n,size:r,className:t})),...a}));qe.displayName=ye.Root.displayName;const ar=U.Provider,sr=U.Root,ir=U.Trigger,Ye=m.forwardRef(({className:t,sideOffset:n=4,...r},a)=>o.jsx(U.Content,{ref:a,sideOffset:n,className:u("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r}));Ye.displayName=U.Content.displayName;const lr={Badge:{Badge:Mt},Button:{Button:je},Card:{Card:Ne,CardContent:Te},DropdownMenu:{DropdownMenu:Vt,DropdownMenuCheckboxItem:Pe,DropdownMenuContent:Ee,DropdownMenuItem:_e,DropdownMenuLabel:De,DropdownMenuSeparator:Ie,DropdownMenuSub:$t,DropdownMenuSubContent:Re,DropdownMenuSubTrigger:Se,DropdownMenuTrigger:At},Form:{Form:qt},Input:{Input:ke},Label:{Label:le},Popover:{Popover:Xt,PopoverContent:Oe,PopoverTrigger:Zt},Select:{Select:Qt,SelectContent:Ve,SelectItem:Ae,SelectTrigger:Fe,SelectValue:er},Tabs:{Tabs:nr,TabsContent:We,TabsList:$e,TabsTrigger:ze},Toggle:{Toggle:qe},Tooltip:{Tooltip:sr,TooltipContent:Ye,TooltipProvider:ar,TooltipTrigger:ir}},Ue=x.createContext(void 0);function S(){return x.useContext(Ue)}const dr=t=>{const{children:n,...r}=t;C.assertEmpty(r);const a=S(),i=se.useForm();return o.jsx(a.Form.Form,{...i,children:n})},cr=t=>x.forwardRef((n,r)=>o.jsx(t,{onPointerDown:a=>{a.nativeEvent.fakeEvent||(a.ctrlKey=!0)},onPointerUp:a=>{const i=new PointerEvent("pointerdown",a.nativeEvent);i.fakeEvent=!0,a.target.dispatchEvent(i)},...n,ref:r})),ur=t=>{const{children:n,onOpenChange:r,position:a,sub:i,...d}=t;C.assertEmpty(d);const c=S();return i?o.jsx(c.DropdownMenu.DropdownMenuSub,{onOpenChange:r,children:n}):o.jsx(c.DropdownMenu.DropdownMenu,{onOpenChange:r,children:n})},fr=t=>{const{children:n,sub:r,...a}=t;C.assertEmpty(a);const i=S(),d=x.useMemo(()=>cr(i.DropdownMenu.DropdownMenuTrigger),[i.DropdownMenu.DropdownMenuTrigger]);return r?o.jsx(i.DropdownMenu.DropdownMenuSubTrigger,{children:n}):o.jsx(d,{asChild:!0,...a,children:n})},pr=x.forwardRef((t,n)=>{const{className:r,children:a,sub:i,...d}=t;C.assertEmpty(d);const c=S();return i?o.jsx(c.DropdownMenu.DropdownMenuSubContent,{className:r,ref:n,children:a}):o.jsx(c.DropdownMenu.DropdownMenuContent,{className:r,ref:n,children:a})}),mr=x.forwardRef((t,n)=>{const{className:r,children:a,icon:i,checked:d,subTrigger:c,onClick:h,...v}=t;C.assertEmpty(v);const f=S();return c?o.jsxs(o.Fragment,{children:[i,a]}):d!==void 0?o.jsxs(f.DropdownMenu.DropdownMenuCheckboxItem,{className:u(r,"gap-1"),ref:n,checked:d,onClick:h,...v,children:[i,a]}):o.jsxs(f.DropdownMenu.DropdownMenuItem,{className:r,ref:n,onClick:h,...v,children:[i,a,c&&o.jsx(L.ChevronRight,{className:"ml-auto h-4 w-4"})]})}),vr=x.forwardRef((t,n)=>{const{className:r,...a}=t;C.assertEmpty(a);const i=S();return o.jsx(i.DropdownMenu.DropdownMenuSeparator,{className:r,ref:n})}),gr=x.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;C.assertEmpty(i);const d=S();return o.jsx(d.DropdownMenu.DropdownMenuLabel,{className:r,ref:n,children:a})}),br=x.forwardRef((t,n)=>{const{className:r,tabs:a,defaultOpenTab:i,openTab:d,setOpenTab:c,loading:h,...v}=t;C.assertEmpty(v);const f=S();return o.jsxs(f.Tabs.Tabs,{className:u(r,"bg-popover p-2 rounded-lg"),ref:n,value:d,defaultValue:i,onValueChange:c,children:[o.jsx(f.Tabs.TabsList,{children:a.map(g=>o.jsx(f.Tabs.TabsTrigger,{value:g.name,children:g.name},g.name))}),a.map(g=>o.jsx(f.Tabs.TabsContent,{value:g.name,children:o.jsx(f.Card.Card,{children:o.jsx(f.Card.CardContent,{className:"p-4",children:g.tabPanel})})},g.name))]})}),xr=x.forwardRef((t,n)=>{const{className:r,children:a,onClick:i,label:d,...c}=t;C.assertEmpty(c);const h=S();return o.jsx(h.Button.Button,{type:"submit",className:r,"aria-label":d,ref:n,onClick:i,children:a})}),hr=x.forwardRef((t,n)=>{const{className:r,accept:a,value:i,placeholder:d,onChange:c,...h}=t;C.assertEmpty(h);const v=S();return o.jsx(v.Input.Input,{type:"file",className:r,ref:n,accept:a,value:i?i.name:void 0,onChange:async f=>c==null?void 0:c(f.target.files[0]),placeholder:d})}),yr=x.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;return C.assertEmpty(i),o.jsx("div",{className:u(r,"flex flex-col gap-2 items-start justify-center"),ref:n,children:a})}),wr=x.forwardRef((t,n)=>{const{className:r,value:a,placeholder:i,onKeyDown:d,onChange:c,...h}=t;C.assertEmpty(h);const v=S();return o.jsx(v.Input.Input,{"data-test":"embed-input",className:u(r,"w-80"),ref:n,value:a,placeholder:i,onKeyDown:d,onChange:c})}),Cr=t=>{const{children:n,opened:r,position:a,...i}=t;C.assertEmpty(i);const d=S();return o.jsx(d.Popover.Popover,{open:r,children:n})},jr=x.forwardRef((t,n)=>{const{children:r,...a}=t;C.assertEmpty(a);const i=S();return o.jsx(i.Popover.PopoverTrigger,{ref:n,asChild:!0,children:r})}),Nr=x.forwardRef((t,n)=>{const{className:r,variant:a,children:i,...d}=t;C.assertEmpty(d);const c=S();return o.jsx(c.Popover.PopoverContent,{sideOffset:8,className:u(r,"flex flex-col gap-2",a==="panel-popover"?"p-0 border-none shadow-none max-w-none w-fit":""),ref:n,children:i})}),Tr=x.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;return C.assertEmpty(i,!1),o.jsx("div",{className:r,ref:n,...i,children:a})}),Sr=x.forwardRef((t,n)=>{const{className:r,children:a,icon:i,onClick:d,onDragEnd:c,onDragStart:h,draggable:v,label:f,...g}=t;C.assertEmpty(g,!1);const _=S();return o.jsxs(_.Button.Button,{variant:"ghost",className:u(r,"text-gray-400"),ref:n,"aria-label":f,onClick:d,onDragStart:h,onDragEnd:c,draggable:v,...g,children:[i,a]})}),Rr=x.forwardRef((t,n)=>{const{className:r,children:a,id:i,...d}=t;return C.assertEmpty(d),o.jsx("div",{id:i,role:"listbox",className:u("z-50 min-w-[8rem] overflow-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r),ref:n,children:a})}),Er=x.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;return C.assertEmpty(i),o.jsx("div",{className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),ref:n,children:o.jsx("div",{children:a})})}),_r=x.forwardRef((t,n)=>{const r=S(),{className:a,item:i,isSelected:d,onClick:c,id:h,...v}=t;C.assertEmpty(v);const f=x.useRef(null);return x.useEffect(()=>{if(!f.current||!d)return;const g=Z.elementOverflow(f.current);g==="top"?f.current.scrollIntoView(!0):g==="bottom"&&f.current.scrollIntoView(!1)},[d]),o.jsxs("div",{className:u("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),ref:Z.mergeRefs([n,f]),id:h,onClick:c,role:"option","aria-selected":d||void 0,children:[i.icon&&o.jsx("div",{className:"p-3","data-position":"left",children:i.icon}),o.jsxs("div",{className:"flex-1",children:[o.jsx("div",{className:"text-base",children:i.title}),o.jsx("div",{className:"text-xs",children:i.subtext})]}),i.badge&&o.jsx("div",{"data-position":"right",className:"text-xs",children:o.jsx(r.Badge.Badge,{variant:"secondary",children:i.badge})})]})}),Pr=x.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;return C.assertEmpty(i),o.jsx("div",{className:u("px-2 py-1.5 text-sm font-semibold",r),ref:n,children:a})}),Dr=x.forwardRef((t,n)=>{const{className:r,children:a,...i}=t;return C.assertEmpty(i),o.jsx("div",{className:r,ref:n,children:a})}),Ir=x.forwardRef((t,n)=>{const{className:r,children:a,draggable:i,onDragStart:d,onDragEnd:c,style:h,label:v,...f}=t;C.assertEmpty(f,!1);const g=S();return o.jsx(g.Button.Button,{variant:"ghost",className:u(r,"p-0 h-fit w-fit text-gray-400"),ref:n,"aria-label":v,draggable:i,onDragStart:d,onDragEnd:c,style:h,...f,children:a})}),Mr=x.forwardRef(t=>{const{className:n,name:r,label:a,icon:i,value:d,autoFocus:c,placeholder:h,onKeyDown:v,onChange:f,onSubmit:g,..._}=t;C.assertEmpty(_);const D=S();return a?o.jsxs("div",{children:[o.jsx(D.Label.Label,{htmlFor:a,children:a}),o.jsx(D.Input.Input,{className:n,id:a,name:r,autoFocus:c,placeholder:h,value:d,onKeyDown:v,onChange:f,onSubmit:g})]}):o.jsx(D.Input.Input,{"aria-label":r,name:r,autoFocus:c,placeholder:h,value:d,onKeyDown:v,onChange:f,onSubmit:g})}),Ke=x.forwardRef((t,n)=>{const{className:r,children:a,onMouseEnter:i,onMouseLeave:d,...c}=t;C.assertEmpty(c);const h=S();return o.jsx(h.Tooltip.TooltipProvider,{delayDuration:0,children:o.jsx("div",{className:u(r,"flex gap-1 p-1 bg-popover text-popover-foreground border rounded-lg shadow-md"),ref:n,onMouseEnter:i,onMouseLeave:d,children:a})})}),Je=x.forwardRef((t,n)=>{const{className:r,children:a,mainTooltip:i,secondaryTooltip:d,icon:c,isSelected:h,isDisabled:v,onClick:f,label:g,..._}=t;C.assertEmpty(_,!1);const D=S(),z=h===void 0?o.jsxs(D.Button.Button,{className:r,variant:"ghost",disabled:v,onClick:f,ref:n,"aria-label":g,..._,children:[c,a]}):o.jsxs(D.Toggle.Toggle,{className:u(r,"data-[state=open]:bg-accent data-[state=closed]:text-accent-foreground"),"aria-label":g,onClick:f,pressed:h,disabled:v,"data-state":h?"on":"off","data-disabled":v,ref:n,..._,children:[c,a]});return o.jsxs(D.Tooltip.Tooltip,{children:[o.jsx(D.Tooltip.TooltipTrigger,{asChild:!0,children:z}),o.jsxs(D.Tooltip.TooltipContent,{className:"flex flex-col items-center",children:[o.jsx("span",{children:i}),d&&o.jsx("span",{children:d})]})]})}),kr=x.forwardRef((t,n)=>{const{className:r,items:a,isDisabled:i,...d}=t;C.assertEmpty(d);const c=S(),h=f=>o.jsxs("div",{className:"flex gap-1 items-center",children:[f.icon,f.text]}),v=a.filter(f=>f.isSelected)[0];return v?o.jsxs(c.Select.Select,{value:v.text,onValueChange:f=>{var g,_;return(_=(g=a.find(D=>D.text===f)).onClick)==null?void 0:_.call(g)},disabled:i,children:[o.jsx(c.Select.SelectTrigger,{className:"border-none",children:o.jsx(c.Select.SelectValue,{})}),o.jsx(c.Select.SelectContent,{className:r,ref:n,children:a.map(f=>o.jsx(c.Select.SelectItem,{disabled:f.isDisabled,value:f.text,children:o.jsx(h,{...f})},f.text))})]}):null}),yn="",Ge={FormattingToolbar:{Root:Ke,Button:Je,Select:kr},FilePanel:{Root:br,Button:xr,FileInput:hr,TabPanel:yr,TextInput:wr},LinkToolbar:{Root:Ke,Button:Je},SideMenu:{Root:Tr,Button:Sr},SuggestionMenu:{Root:Rr,Item:_r,EmptyItem:Er,Label:Pr,Loader:Dr},TableHandle:{Root:Ir},Generic:{Form:{Root:dr,TextInput:Mr},Menu:{Root:ur,Trigger:fr,Dropdown:pr,Divider:vr,Label:gr,Item:mr},Popover:{Root:Cr,Trigger:jr,Content:Nr}}},Or=t=>{const{shadCNComponents:n,...r}=t,a=x.useMemo(()=>({...n,...lr}),[n]);return o.jsx(Ue.Provider,{value:a,children:o.jsx(Z.ComponentsContext.Provider,{value:Ge,children:o.jsx(Z.BlockNoteViewRaw,{...r})})})};N.BlockNoteView=Or,N.components=Ge,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
28
33
  //# sourceMappingURL=blocknote-shadcn.umd.cjs.map