/**
 * Skipped minification because the original files appears to be already minified.
 * Original file: /npm/@yoopta/toolbar@4.9.9/dist/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import*as n from"react";import o,{forwardRef as i,createElement as a,createContext as l,useMemo as s,useContext as c,useCallback as u,Children as f,isValidElement as d,cloneElement as p,Fragment as h,useLayoutEffect as g,useEffect as v,useRef as m,useState as y}from"react";import*as b from"react-dom";import{UI as w,getRootBlockElement as x,useYooptaTools as C,findSlateBySelectionPath as O,findPluginBlockByPath as _,HOTKEYS as k,Blocks as P,useYooptaEditor as j}from"@yoopta/editor";function E(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var R=["color"],S=i((function(e,t){var r=e.color,n=void 0===r?"currentColor":r,o=E(e,R);return a("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),a("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),T=["color"],A=i((function(e,t){var r=e.color,n=void 0===r?"currentColor":r,o=E(e,T);return a("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),a("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),N=["color"],M=i((function(e,t){var r=e.color,n=void 0===r?"currentColor":r,o=E(e,N);return a("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),a("path",{d:"M9.96424 2.68571C10.0668 2.42931 9.94209 2.13833 9.6857 2.03577C9.4293 1.93322 9.13832 2.05792 9.03576 2.31432L5.03576 12.3143C4.9332 12.5707 5.05791 12.8617 5.3143 12.9642C5.5707 13.0668 5.86168 12.9421 5.96424 12.6857L9.96424 2.68571ZM3.85355 5.14646C4.04882 5.34172 4.04882 5.6583 3.85355 5.85356L2.20711 7.50001L3.85355 9.14646C4.04882 9.34172 4.04882 9.6583 3.85355 9.85356C3.65829 10.0488 3.34171 10.0488 3.14645 9.85356L1.14645 7.85356C0.951184 7.6583 0.951184 7.34172 1.14645 7.14646L3.14645 5.14646C3.34171 4.9512 3.65829 4.9512 3.85355 5.14646ZM11.1464 5.14646C11.3417 4.9512 11.6583 4.9512 11.8536 5.14646L13.8536 7.14646C14.0488 7.34172 14.0488 7.6583 13.8536 7.85356L11.8536 9.85356C11.6583 10.0488 11.3417 10.0488 11.1464 9.85356C10.9512 9.6583 10.9512 9.34172 11.1464 9.14646L12.7929 7.50001L11.1464 5.85356C10.9512 5.6583 10.9512 5.34172 11.1464 5.14646Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),F=["color"],L=i((function(e,t){var r=e.color,n=void 0===r?"currentColor":r,o=E(e,F);return a("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),a("path",{d:"M5.10505 12C4.70805 12 4.4236 11.912 4.25171 11.736C4.0839 11.5559 4 11.2715 4 10.8827V4.11733C4 3.72033 4.08595 3.43588 4.25784 3.26398C4.43383 3.08799 4.71623 3 5.10505 3C6.42741 3 8.25591 3 9.02852 3C10.1373 3 11.0539 3.98153 11.0539 5.1846C11.0539 6.08501 10.6037 6.81855 9.70327 7.23602C10.8657 7.44851 11.5176 8.62787 11.5176 9.48128C11.5176 10.5125 10.9902 12 9.27734 12C8.77742 12 6.42626 12 5.10505 12ZM8.37891 8.00341H5.8V10.631H8.37891C8.9 10.631 9.6296 10.1211 9.6296 9.29877C9.6296 8.47643 8.9 8.00341 8.37891 8.00341ZM5.8 4.36903V6.69577H8.17969C8.53906 6.69577 9.27734 6.35939 9.27734 5.50002C9.27734 4.64064 8.48047 4.36903 8.17969 4.36903H5.8Z",fill:n}))})),D=["color"],B=i((function(e,t){var r=e.color,n=void 0===r?"currentColor":r,o=E(e,D);return a("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),a("path",{d:"M5.67494 3.50017C5.67494 3.25164 5.87641 3.05017 6.12494 3.05017H10.6249C10.8735 3.05017 11.0749 3.25164 11.0749 3.50017C11.0749 3.7487 10.8735 3.95017 10.6249 3.95017H9.00587L7.2309 11.05H8.87493C9.12345 11.05 9.32493 11.2515 9.32493 11.5C9.32493 11.7486 9.12345 11.95 8.87493 11.95H4.37493C4.1264 11.95 3.92493 11.7486 3.92493 11.5C3.92493 11.2515 4.1264 11.05 4.37493 11.05H5.99397L7.76894 3.95017H6.12494C5.87641 3.95017 5.67494 3.7487 5.67494 3.50017Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),z=["color"],I=i((function(e,t){var r=e.color,n=void 0===r?"currentColor":r,o=E(e,z);return a("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),a("path",{d:"M5.00003 3.25C5.00003 2.97386 4.77617 2.75 4.50003 2.75C4.22389 2.75 4.00003 2.97386 4.00003 3.25V7.10003H2.49998C2.27906 7.10003 2.09998 7.27912 2.09998 7.50003C2.09998 7.72094 2.27906 7.90003 2.49998 7.90003H4.00003V8.55C4.00003 10.483 5.56703 12.05 7.50003 12.05C9.43303 12.05 11 10.483 11 8.55V7.90003H12.5C12.7209 7.90003 12.9 7.72094 12.9 7.50003C12.9 7.27912 12.7209 7.10003 12.5 7.10003H11V3.25C11 2.97386 10.7762 2.75 10.5 2.75C10.2239 2.75 10 2.97386 10 3.25V7.10003H5.00003V3.25ZM5.00003 7.90003V8.55C5.00003 9.93071 6.11932 11.05 7.50003 11.05C8.88074 11.05 10 9.93071 10 8.55V7.90003H5.00003Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),H=["color"],V=i((function(e,t){var r=e.color,n=void 0===r?"currentColor":r,o=E(e,H);return a("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),a("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H10.5C10.7761 7 11 7.22386 11 7.5C11 7.77614 10.7761 8 10.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM3 10.5C3 10.2239 3.22386 10 3.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H3.5C3.22386 11 3 10.7761 3 10.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),q=["color"],W=i((function(e,t){var r=e.color,n=void 0===r?"currentColor":r,o=E(e,q);return a("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),a("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H7.5C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H10.5C10.7761 10 11 10.2239 11 10.5C11 10.7761 10.7761 11 10.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),Z=["color"],$=i((function(e,t){var r=e.color,n=void 0===r?"currentColor":r,o=E(e,Z);return a("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),a("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM7 7.5C7 7.22386 7.22386 7 7.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H7.5C7.22386 8 7 7.77614 7 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H4.5C4.22386 11 4 10.7761 4 10.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),G=["color"],K=i((function(e,t){var r=e.color,n=void 0===r?"currentColor":r,o=E(e,G);return a("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),a("path",{d:"M5.00001 2.75C5.00001 2.47386 4.77615 2.25 4.50001 2.25C4.22387 2.25 4.00001 2.47386 4.00001 2.75V8.05C4.00001 9.983 5.56702 11.55 7.50001 11.55C9.43301 11.55 11 9.983 11 8.05V2.75C11 2.47386 10.7762 2.25 10.5 2.25C10.2239 2.25 10 2.47386 10 2.75V8.05C10 9.43071 8.88072 10.55 7.50001 10.55C6.1193 10.55 5.00001 9.43071 5.00001 8.05V2.75ZM3.49998 13.1001C3.27906 13.1001 3.09998 13.2791 3.09998 13.5001C3.09998 13.721 3.27906 13.9001 3.49998 13.9001H11.5C11.7209 13.9001 11.9 13.721 11.9 13.5001C11.9 13.2791 11.7209 13.1001 11.5 13.1001H3.49998Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}));function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Y.apply(this,arguments)}function U(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(null==e||e(n),!1===r||!n.defaultPrevented)return null==t?void 0:t(n)}}function X(e,t=[]){let r=[];const n=()=>{const t=r.map((e=>l(e)));return function(r){const n=(null==r?void 0:r[e])||t;return s((()=>({[`__scope${e}`]:{...r,[e]:n}})),[r,n])}};return n.scopeName=e,[function(t,n){const o=l(n),i=r.length;function u(t){const{scope:r,children:n,...l}=t,c=(null==r?void 0:r[e][i])||o,u=s((()=>l),Object.values(l));return a(c.Provider,{value:u},n)}return r=[...r,n],u.displayName=t+"Provider",[u,function(r,a){const l=(null==a?void 0:a[e][i])||o,s=c(l);if(s)return s;if(void 0!==n)return n;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},J(n,...t)]}function J(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const n=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return s((()=>({[`__scope${t.scopeName}`]:n})),[n])}};return r.scopeName=t.scopeName,r}function Q(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function ee(...e){return u(Q(...e),e)}const te=i(((e,t)=>{const{children:r,...n}=e,o=f.toArray(r),i=o.find(oe);if(i){const e=i.props.children,r=o.map((t=>t===i?f.count(e)>1?f.only(null):d(e)?e.props.children:null:t));return a(re,Y({},n,{ref:t}),d(e)?p(e,void 0,r):null)}return a(re,Y({},n,{ref:t}),r)}));te.displayName="Slot";const re=i(((e,t)=>{const{children:r,...n}=e;return d(r)?p(r,{...ie(n,r.props),ref:t?Q(t,r.ref):r.ref}):f.count(r)>1?f.only(null):null}));re.displayName="SlotClone";const ne=({children:e})=>a(h,null,e);function oe(e){return d(e)&&e.type===ne}function ie(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{i(...e),o(...e)}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const ae=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?g:()=>{},le=n["useId".toString()]||(()=>{});let se=0;function ce(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}const ue=i(((e,t)=>{const{children:r,...n}=e,o=f.toArray(r),i=o.find(pe);if(i){const e=i.props.children,r=o.map((t=>t===i?f.count(e)>1?f.only(null):d(e)?e.props.children:null:t));return a(fe,Y({},n,{ref:t}),d(e)?p(e,void 0,r):null)}return a(fe,Y({},n,{ref:t}),r)}));ue.displayName="Slot";const fe=i(((e,t)=>{const{children:r,...n}=e;return d(r)?p(r,{...he(n,r.props),ref:t?ce(t,r.ref):r.ref}):f.count(r)>1?f.only(null):null}));fe.displayName="SlotClone";const de=({children:e})=>a(h,null,e);function pe(e){return d(e)&&e.type===de}function he(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{i(...e),o(...e)}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const ge=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const r=i(((e,r)=>{const{asChild:n,...o}=e,i=n?ue:t;return v((()=>{window[Symbol.for("radix-ui")]=!0}),[]),a(i,Y({},o,{ref:r}))}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function ve(e){const t=m(e);return v((()=>{t.current=e})),s((()=>(...e)=>{var r;return null===(r=t.current)||void 0===r?void 0:r.call(t,...e)}),[])}function me({prop:e,defaultProp:t,onChange:r=(()=>{})}){const[n,o]=function({defaultProp:e,onChange:t}){const r=y(e),[n]=r,o=m(n),i=ve(t);return v((()=>{o.current!==n&&(i(n),o.current=n)}),[n,o,i]),r}({defaultProp:t,onChange:r}),i=void 0!==e,a=i?e:n,l=ve(r);return[a,u((t=>{if(i){const r="function"==typeof t?t(e):t;r!==e&&l(r)}else o(t)}),[i,e,o,l])]}const ye=l(void 0);function be(e){const t=c(ye);return e||t||"ltr"}const we="rovingFocusGroup.onEntryFocus",xe={bubbles:!1,cancelable:!0},Ce="RovingFocusGroup",[Oe,_e,ke]=function(e){const t=e+"CollectionProvider",[r,n]=X(t),[i,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),l=e+"CollectionSlot",s=e+"CollectionItemSlot",c="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:r}=e,n=o.useRef(null),a=o.useRef(new Map).current;return o.createElement(i,{scope:t,itemMap:a,collectionRef:n},r)},Slot:o.forwardRef(((e,t)=>{const{scope:r,children:n}=e,i=ee(t,a(l,r).collectionRef);return o.createElement(te,{ref:i},n)})),ItemSlot:o.forwardRef(((e,t)=>{const{scope:r,children:n,...i}=e,l=o.useRef(null),u=ee(t,l),f=a(s,r);return o.useEffect((()=>(f.itemMap.set(l,{ref:l,...i}),()=>{f.itemMap.delete(l)}))),o.createElement(te,{[c]:"",ref:u},n)}))},function(t){const r=a(e+"CollectionConsumer",t),n=o.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${c}]`)),n=Array.from(r.itemMap.values()).sort(((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current)));return n}),[r.collectionRef,r.itemMap]);return n},n]}(Ce),[Pe,je]=X(Ce,[ke]),[Ee,Re]=Pe(Ce),Se=i(((e,t)=>a(Oe.Provider,{scope:e.__scopeRovingFocusGroup},a(Oe.Slot,{scope:e.__scopeRovingFocusGroup},a(Te,Y({},e,{ref:t})))))),Te=i(((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:f,...d}=e,p=m(null),h=function(...e){return u(function(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}(...e),e)}(t,p),g=be(i),[b=null,w]=me({prop:l,defaultProp:s,onChange:c}),[x,C]=y(!1),O=ve(f),_=_e(r),k=m(!1),[P,j]=y(0);return v((()=>{const e=p.current;if(e)return e.addEventListener(we,O),()=>e.removeEventListener(we,O)}),[O]),a(Ee,{scope:r,orientation:n,dir:g,loop:o,currentTabStopId:b,onItemFocus:u((e=>w(e)),[w]),onItemShiftTab:u((()=>C(!0)),[]),onFocusableItemAdd:u((()=>j((e=>e+1))),[]),onFocusableItemRemove:u((()=>j((e=>e-1))),[])},a(ge.div,Y({tabIndex:x||0===P?-1:0,"data-orientation":n},d,{ref:h,style:{outline:"none",...e.style},onMouseDown:U(e.onMouseDown,(()=>{k.current=!0})),onFocus:U(e.onFocus,(e=>{const t=!k.current;if(e.target===e.currentTarget&&t&&!x){const t=new CustomEvent(we,xe);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=_().filter((e=>e.focusable));Me([e.find((e=>e.active)),e.find((e=>e.id===b)),...e].filter(Boolean).map((e=>e.ref.current)))}}k.current=!1})),onBlur:U(e.onBlur,(()=>C(!1)))})))})),Ae=i(((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:l,...s}=e,c=function(e){const[t,r]=n.useState(le());return ae((()=>{e||r((e=>null!=e?e:String(se++)))}),[e]),e||(t?`radix-${t}`:"")}(),u=l||c,f=Re("RovingFocusGroupItem",r),d=f.currentTabStopId===u,p=_e(r),{onFocusableItemAdd:h,onFocusableItemRemove:g}=f;return v((()=>{if(o)return h(),()=>g()}),[o,h,g]),a(Oe.ItemSlot,{scope:r,id:u,focusable:o,active:i},a(ge.span,Y({tabIndex:d?0:-1,"data-orientation":f.orientation},s,{ref:t,onMouseDown:U(e.onMouseDown,(e=>{o?f.onItemFocus(u):e.preventDefault()})),onFocus:U(e.onFocus,(()=>f.onItemFocus(u))),onKeyDown:U(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void f.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,r){const n=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)?void 0:Ne[n]}(e,f.orientation,f.dir);if(void 0!==t){e.preventDefault();let o=p().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=f.loop?(n=i+1,(r=o).map(((e,t)=>r[(n+t)%r.length]))):o.slice(i+1)}setTimeout((()=>Me(o)))}var r,n}))})))})),Ne={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Me(e){const t=document.activeElement;for(const r of e){if(r===t)return;if(r.focus(),document.activeElement!==t)return}}const Fe=Se,Le=Ae,De="horizontal",Be=["horizontal","vertical"],ze=i(((e,t)=>{const{decorative:r,orientation:n=De,...o}=e,i=Ie(n)?n:De,l=r?{role:"none"}:{"aria-orientation":"vertical"===i?i:void 0,role:"separator"};return a(ge.div,Y({"data-orientation":i},l,o,{ref:t}))}));function Ie(e){return Be.includes(e)}ze.propTypes={orientation(e,t,r){const n=e[t],o=String(n);return n&&!Ie(n)?new Error(function(e,t){return`Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of:\n  - horizontal\n  - vertical\n\nDefaulting to \`${De}\`.`}(o,r)):null}};const He=ze,Ve=i(((e,t)=>{const{pressed:r,defaultPressed:n=!1,onPressedChange:o,...i}=e,[l=!1,s]=me({prop:r,onChange:o,defaultProp:n});return a(ge.button,Y({type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":e.disabled?"":void 0},i,{ref:t,onClick:U(e.onClick,(()=>{e.disabled||s(!l)}))}))})),qe="ToggleGroup",[We,Ze]=X(qe,[je]),$e=je(),Ge=o.forwardRef(((e,t)=>{const{type:r,...n}=e;if("single"===r){const e=n;return o.createElement(Ue,Y({},e,{ref:t}))}if("multiple"===r){const e=n;return o.createElement(Xe,Y({},e,{ref:t}))}throw new Error(`Missing prop \`type\` expected on \`${qe}\``)})),[Ke,Ye]=We(qe),Ue=o.forwardRef(((e,t)=>{const{value:r,defaultValue:n,onValueChange:i=(()=>{}),...a}=e,[l,s]=me({prop:r,defaultProp:n,onChange:i});return o.createElement(Ke,{scope:e.__scopeToggleGroup,type:"single",value:l?[l]:[],onItemActivate:s,onItemDeactivate:o.useCallback((()=>s("")),[s])},o.createElement(et,Y({},a,{ref:t})))})),Xe=o.forwardRef(((e,t)=>{const{value:r,defaultValue:n,onValueChange:i=(()=>{}),...a}=e,[l=[],s]=me({prop:r,defaultProp:n,onChange:i}),c=o.useCallback((e=>s(((t=[])=>[...t,e]))),[s]),u=o.useCallback((e=>s(((t=[])=>t.filter((t=>t!==e))))),[s]);return o.createElement(Ke,{scope:e.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:c,onItemDeactivate:u},o.createElement(et,Y({},a,{ref:t})))})),[Je,Qe]=We(qe),et=o.forwardRef(((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:i=!0,orientation:a,dir:l,loop:s=!0,...c}=e,u=$e(r),f=be(l),d={role:"group",dir:f,...c};return o.createElement(Je,{scope:r,rovingFocus:i,disabled:n},i?o.createElement(Fe,Y({asChild:!0},u,{orientation:a,dir:f,loop:s}),o.createElement(ge.div,Y({},d,{ref:t}))):o.createElement(ge.div,Y({},d,{ref:t})))})),tt="ToggleGroupItem",rt=o.forwardRef(((e,t)=>{const r=Ye(tt,e.__scopeToggleGroup),n=Qe(tt,e.__scopeToggleGroup),i=$e(e.__scopeToggleGroup),a=r.value.includes(e.value),l=n.disabled||e.disabled,s={...e,pressed:a,disabled:l},c=o.useRef(null);return n.rovingFocus?o.createElement(Le,Y({asChild:!0},i,{focusable:!l,active:a,ref:c}),o.createElement(nt,Y({},s,{ref:t}))):o.createElement(nt,Y({},s,{ref:t}))})),nt=o.forwardRef(((e,t)=>{const{__scopeToggleGroup:r,value:n,...i}=e,a=Ye(tt,r),l={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s="single"===a.type?l:void 0;return o.createElement(Ve,Y({},s,i,{ref:t,onPressedChange:e=>{e?a.onItemActivate(n):a.onItemDeactivate(n)}}))})),ot=Ge,it=rt,at="Toolbar",[lt,st]=X(at,[je,Ze]),ct=je(),ut=Ze(),[ft,dt]=lt(at),pt=i(((e,t)=>{const{__scopeToolbar:r,orientation:n="horizontal",dir:o,loop:i=!0,...l}=e,s=ct(r),c=be(o);return a(ft,{scope:r,orientation:n,dir:c},a(Fe,Y({asChild:!0},s,{orientation:n,dir:c,loop:i}),a(ge.div,Y({role:"toolbar","aria-orientation":n,dir:c},l,{ref:t}))))})),ht=i(((e,t)=>{const{__scopeToolbar:r,...n}=e,o=dt("ToolbarSeparator",r);return a(He,Y({orientation:"horizontal"===o.orientation?"vertical":"horizontal"},n,{ref:t}))})),gt=i(((e,t)=>{const{__scopeToolbar:r,...n}=e,o=ct(r);return a(Le,Y({asChild:!0},o,{focusable:!e.disabled}),a(ge.button,Y({type:"button"},n,{ref:t})))})),vt=pt,mt=ht,yt=i(((e,t)=>{const{__scopeToolbar:r,...n}=e,o=dt("ToolbarToggleGroup",r),i=ut(r);return a(ot,Y({"data-orientation":o.orientation,dir:o.dir},i,n,{ref:t,rovingFocus:!1}))})),bt=i(((e,t)=>{const{__scopeToolbar:r,...n}=e,o=ut(r),i={__scopeToolbar:e.__scopeToolbar};return a(gt,Y({asChild:!0},i),a(it,Y({},o,n,{ref:t})))}));function wt(e){return Ot(e)?(e.nodeName||"").toLowerCase():"#document"}function xt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ct(e){var t;return null==(t=(Ot(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ot(e){return e instanceof Node||e instanceof xt(e).Node}function _t(e){return e instanceof Element||e instanceof xt(e).Element}function kt(e){return e instanceof HTMLElement||e instanceof xt(e).HTMLElement}function Pt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof xt(e).ShadowRoot)}function jt(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=At(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Et(e){return["table","td","th"].includes(wt(e))}function Rt(e){const t=St(),r=At(e);return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some((e=>(r.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(r.contain||"").includes(e)))}function St(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Tt(e){return["html","body","#document"].includes(wt(e))}function At(e){return xt(e).getComputedStyle(e)}function Nt(e){return _t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Mt(e){if("html"===wt(e))return e;const t=e.assignedSlot||e.parentNode||Pt(e)&&e.host||Ct(e);return Pt(t)?t.host:t}function Ft(e){const t=Mt(e);return Tt(t)?e.ownerDocument?e.ownerDocument.body:e.body:kt(t)&&jt(t)?t:Ft(t)}function Lt(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=Ft(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=xt(o);return i?t.concat(a,a.visualViewport||[],jt(o)?o:[],a.frameElement&&r?Lt(a.frameElement):[]):t.concat(o,Lt(o,[],r))}const Dt=Math.min,Bt=Math.max,zt=Math.round,It=Math.floor,Ht=e=>({x:e,y:e}),Vt={left:"right",right:"left",bottom:"top",top:"bottom"},qt={start:"end",end:"start"};function Wt(e,t,r){return Bt(e,Dt(t,r))}function Zt(e,t){return"function"==typeof e?e(t):e}function $t(e){return e.split("-")[0]}function Gt(e){return e.split("-")[1]}function Kt(e){return"x"===e?"y":"x"}function Yt(e){return"y"===e?"height":"width"}function Ut(e){return["top","bottom"].includes($t(e))?"y":"x"}function Xt(e){return Kt(Ut(e))}function Jt(e){return e.replace(/start|end/g,(e=>qt[e]))}function Qt(e){return e.replace(/left|right|bottom|top/g,(e=>Vt[e]))}function er(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function tr(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function rr(e,t,r){let{reference:n,floating:o}=e;const i=Ut(t),a=Xt(t),l=Yt(a),s=$t(t),c="y"===i,u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,d=n[l]/2-o[l]/2;let p;switch(s){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch(Gt(t)){case"start":p[a]-=d*(r&&c?-1:1);break;case"end":p[a]+=d*(r&&c?-1:1)}return p}async function nr(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Zt(t,e),h=er(p),g=l[d?"floating"===f?"reference":"floating":f],v=tr(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(g)))||r?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),m="floating"===f?{...a.floating,x:n,y:o}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=tr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:y,strategy:s}):m);return{top:(v.top-w.top+h.top)/b.y,bottom:(w.bottom-v.bottom+h.bottom)/b.y,left:(v.left-w.left+h.left)/b.x,right:(w.right-v.right+h.right)/b.x}}function or(e){const t=Dt(...e.map((e=>e.left))),r=Dt(...e.map((e=>e.top)));return{x:t,y:r,width:Bt(...e.map((e=>e.right)))-t,height:Bt(...e.map((e=>e.bottom)))-r}}const ir=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=$t(r),l=Gt(r),s="y"===Ut(r),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,f=Zt(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),s?{x:p*u,y:d*c}:{x:d*c,y:p*u}}(t,e);return a===(null==(r=l.offset)?void 0:r.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}};function ar(e){const t=At(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=kt(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,l=zt(r)!==i||zt(n)!==a;return l&&(r=i,n=a),{width:r,height:n,$:l}}function lr(e){return _t(e)?e:e.contextElement}function sr(e){const t=lr(e);if(!kt(t))return Ht(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=ar(t);let a=(i?zt(r.width):r.width)/n,l=(i?zt(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const cr=Ht(0);function ur(e){const t=xt(e);return St()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:cr}function fr(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=lr(e);let a=Ht(1);t&&(n?_t(n)&&(a=sr(n)):a=sr(e));const l=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==xt(e))&&t}(i,r,n)?ur(i):Ht(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const e=xt(i),t=n&&_t(n)?xt(n):n;let r=e,o=r.frameElement;for(;o&&n&&t!==r;){const e=sr(o),t=o.getBoundingClientRect(),n=At(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,f*=e.y,s+=i,c+=a,r=xt(o),o=r.frameElement}}return tr({width:u,height:f,x:s,y:c})}const dr=[":popover-open",":modal"];function pr(e){return dr.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function hr(e){return fr(Ct(e)).left+Nt(e).scrollLeft}function gr(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=xt(e),n=Ct(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=St();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l,y:s}}(e,r);else if("document"===t)n=function(e){const t=Ct(e),r=Nt(e),n=e.ownerDocument.body,o=Bt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Bt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+hr(e);const l=-r.scrollTop;return"rtl"===At(n).direction&&(a+=Bt(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:l}}(Ct(e));else if(_t(t))n=function(e,t){const r=fr(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=kt(e)?sr(e):Ht(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=ur(e);n={...t,x:t.x-r.x,y:t.y-r.y}}return tr(n)}function vr(e,t){const r=Mt(e);return!(r===t||!_t(r)||Tt(r))&&("fixed"===At(r).position||vr(r,t))}function mr(e,t,r){const n=kt(t),o=Ct(t),i="fixed"===r,a=fr(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=Ht(0);if(n||!n&&!i)if(("body"!==wt(t)||jt(o))&&(l=Nt(t)),n){const e=fr(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=hr(o));return{x:a.left+l.scrollLeft-s.x,y:a.top+l.scrollTop-s.y,width:a.width,height:a.height}}function yr(e,t){return kt(e)&&"fixed"!==At(e).position?t?t(e):e.offsetParent:null}function br(e,t){const r=xt(e);if(!kt(e)||pr(e))return r;let n=yr(e,t);for(;n&&Et(n)&&"static"===At(n).position;)n=yr(n,t);return n&&("html"===wt(n)||"body"===wt(n)&&"static"===At(n).position&&!Rt(n))?r:n||function(e){let t=Mt(e);for(;kt(t)&&!Tt(t);){if(Rt(t))return t;t=Mt(t)}return null}(e)||r}const wr={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=Ct(n),l=!!t&&pr(t.floating);if(n===a||l&&i)return r;let s={scrollLeft:0,scrollTop:0},c=Ht(1);const u=Ht(0),f=kt(n);if((f||!f&&!i)&&(("body"!==wt(n)||jt(a))&&(s=Nt(n)),kt(n))){const e=fr(n);c=sr(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-s.scrollLeft*c.x+u.x,y:r.y*c.y-s.scrollTop*c.y+u.y}},getDocumentElement:Ct,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[..."clippingAncestors"===r?function(e,t){const r=t.get(e);if(r)return r;let n=Lt(e,[],!1).filter((e=>_t(e)&&"body"!==wt(e))),o=null;const i="fixed"===At(e).position;let a=i?Mt(e):e;for(;_t(a)&&!Tt(a);){const t=At(a),r=Rt(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||jt(a)&&!r&&vr(e,a))?n=n.filter((e=>e!==a)):o=t,a=Mt(a)}return t.set(e,n),n}(t,this._c):[].concat(r),n],a=i[0],l=i.reduce(((e,r)=>{const n=gr(t,r,o);return e.top=Bt(n.top,e.top),e.right=Dt(n.right,e.right),e.bottom=Dt(n.bottom,e.bottom),e.left=Bt(n.left,e.left),e}),gr(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:br,getElementRects:async function(e){const t=this.getOffsetParent||br,r=this.getDimensions;return{reference:mr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await r(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=ar(e);return{width:t,height:r}},getScale:sr,isElement:_t,isRTL:function(e){return"rtl"===At(e).direction}};function xr(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,c=lr(e),u=o||i?[...c?Lt(c):[],...Lt(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)}));const f=c&&l?function(e,t){let r,n=null;const o=Ct(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const{left:c,top:u,width:f,height:d}=e.getBoundingClientRect();if(l||t(),!f||!d)return;const p={rootMargin:-It(u)+"px "+-It(o.clientWidth-(c+f))+"px "+-It(o.clientHeight-(u+d))+"px "+-It(c)+"px",threshold:Bt(0,Dt(1,s))||1};let h=!0;function g(e){const t=e[0].intersectionRatio;if(t!==s){if(!h)return a();t?a(!1,t):r=setTimeout((()=>{a(!1,1e-7)}),100)}h=!1}try{n=new IntersectionObserver(g,{...p,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(g,p)}n.observe(e)}(!0),i}(c,r):null;let d,p=-1,h=null;a&&(h=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),r()})),c&&!s&&h.observe(c),h.observe(t));let g=s?fr(e):null;return s&&function t(){const n=fr(e);!g||n.x===g.x&&n.y===g.y&&n.width===g.width&&n.height===g.height||r();g=n,d=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)})),null==f||f(),null==(e=h)||e.disconnect(),h=null,s&&cancelAnimationFrame(d)}}const Cr=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=Zt(e,t),c={x:r,y:n},u=await nr(t,s),f=Ut($t(o)),d=Kt(f);let p=c[d],h=c[f];if(i){const e="y"===d?"bottom":"right";p=Wt(p+u["y"===d?"top":"left"],p,p-u[e])}if(a){const e="y"===f?"bottom":"right";h=Wt(h+u["y"===f?"top":"left"],h,h-u[e])}const g=l.fn({...t,[d]:p,[f]:h});return{...g,data:{x:g.x-r,y:g.y-n}}}}},Or=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...v}=Zt(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const m=$t(o),y=$t(l)===l,b=await(null==s.isRTL?void 0:s.isRTL(c.floating)),w=d||(y||!g?[Qt(l)]:function(e){const t=Qt(e);return[Jt(e),t,Jt(t)]}(l));d||"none"===h||w.push(...function(e,t,r,n){const o=Gt(e);let i=function(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:a;default:return[]}}($t(e),"start"===r,n);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Jt)))),i}(l,g,h,b));const x=[l,...w],C=await nr(t,v),O=[];let _=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&O.push(C[m]),f){const e=function(e,t,r){void 0===r&&(r=!1);const n=Gt(e),o=Xt(e),i=Yt(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Qt(a)),[a,Qt(a)]}(o,a,b);O.push(C[e[0]],C[e[1]])}if(_=[..._,{placement:o,overflows:O}],!O.every((e=>e<=0))){var k,P;const e=((null==(k=i.flip)?void 0:k.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:_},reset:{placement:t}};let r=null==(P=_.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:P.placement;if(!r)switch(p){case"bestFit":{var j;const e=null==(j=_.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:j[0];e&&(r=e);break}case"initialPlacement":r=l}if(o!==r)return{reset:{placement:r}}}return{}}}},_r=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:r,elements:n,rects:o,platform:i,strategy:a}=t,{padding:l=2,x:s,y:c}=Zt(e,t),u=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(n.reference))||[]),f=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),r=[];let n=null;for(let e=0;e<t.length;e++){const o=t[e];!n||o.y-n.y>n.height/2?r.push([o]):r[r.length-1].push(o),n=o}return r.map((e=>tr(or(e))))}(u),d=tr(or(u)),p=er(l);const h=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===f.length&&f[0].left>f[1].right&&null!=s&&null!=c)return f.find((e=>s>e.left-p.left&&s<e.right+p.right&&c>e.top-p.top&&c<e.bottom+p.bottom))||d;if(f.length>=2){if("y"===Ut(r)){const e=f[0],t=f[f.length-1],n="top"===$t(r),o=e.top,i=t.bottom,a=n?e.left:t.left,l=n?e.right:t.right;return{top:o,bottom:i,left:a,right:l,width:l-a,height:i-o,x:a,y:o}}const e="left"===$t(r),t=Bt(...f.map((e=>e.right))),n=Dt(...f.map((e=>e.left))),o=f.filter((r=>e?r.left===n:r.right===t)),i=o[0].top,a=o[o.length-1].bottom;return{top:i,bottom:a,left:n,right:t,width:t-n,height:a-i,x:n,y:i}}return d}},floating:n.floating,strategy:a});return o.reference.x!==h.reference.x||o.reference.y!==h.reference.y||o.reference.width!==h.reference.width||o.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},kr=(e,t,r)=>{const n=new Map,o={platform:wr,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=rr(c,n,s),d=n,p={},h=0;for(let r=0;r<l.length;r++){const{name:i,fn:g}=l[r],{x:v,y:m,data:y,reset:b}=await g({x:u,y:f,initialPlacement:n,placement:d,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=v?v:u,f=null!=m?m:f,p={...p,[i]:{...p[i],...y}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:f}=rr(c,d,s))),r=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Pr="undefined"!=typeof document?g:v;function jr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!=n--;)if(!jr(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;0!=n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!=n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!jr(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function Er(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rr(e,t){const r=Er(e);return Math.round(t*r)/r}function Sr(e){const t=n.useRef(e);return Pr((()=>{t.current=e})),t}const Tr=n["useInsertionEffect".toString()]||(e=>e());var Ar="undefined"!=typeof document?g:v;let Nr=!1,Mr=0;const Fr=()=>"floating-ui-"+Mr++;const Lr=n["useId".toString()]||function(){const[e,t]=n.useState((()=>Nr?Fr():void 0));return Ar((()=>{null==e&&t(Fr())}),[]),n.useEffect((()=>{Nr||(Nr=!0)}),[]),e};const Dr=n.createContext(null),Br=n.createContext(null);function zr(e){const t=m(e);return Ar((()=>{t.current=e})),t}function Ir(e){var t;void 0===e&&(e={});const{open:r=!1,onOpenChange:o,nodeId:i}=e,[a,l]=n.useState(null),s=(null==(t=e.elements)?void 0:t.reference)||a,c=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[f,d]=n.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=n.useState(o);jr(p,o)||h(o);const[g,v]=n.useState(null),[m,y]=n.useState(null),w=n.useCallback((e=>{e!==_.current&&(_.current=e,v(e))}),[]),x=n.useCallback((e=>{e!==k.current&&(k.current=e,y(e))}),[]),C=a||g,O=l||m,_=n.useRef(null),k=n.useRef(null),P=n.useRef(f),j=null!=c,E=Sr(c),R=Sr(i),S=n.useCallback((()=>{if(!_.current||!k.current)return;const e={placement:t,strategy:r,middleware:p};R.current&&(e.platform=R.current),kr(_.current,k.current,e).then((e=>{const t={...e,isPositioned:!0};T.current&&!jr(P.current,t)&&(P.current=t,b.flushSync((()=>{d(t)})))}))}),[p,t,r,R]);Pr((()=>{!1===u&&P.current.isPositioned&&(P.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[u]);const T=n.useRef(!1);Pr((()=>(T.current=!0,()=>{T.current=!1})),[]),Pr((()=>{if(C&&(_.current=C),O&&(k.current=O),C&&O){if(E.current)return E.current(C,O,S);S()}}),[C,O,S,E,j]);const A=n.useMemo((()=>({reference:_,floating:k,setReference:w,setFloating:x})),[w,x]),N=n.useMemo((()=>({reference:C,floating:O})),[C,O]),M=n.useMemo((()=>{const e={position:r,left:0,top:0};if(!N.floating)return e;const t=Rr(N.floating,f.x),n=Rr(N.floating,f.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...Er(N.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,s,N.floating,f.x,f.y]);return n.useMemo((()=>({...f,update:S,refs:A,elements:N,floatingStyles:M})),[f,S,A,N,M])}(e),u=n.useContext(Br),f=null!=((null==(d=n.useContext(Dr))?void 0:d.id)||null);var d;const p=function(e){const t=n.useRef((()=>{}));return Tr((()=>{t.current=e})),n.useCallback((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return null==t.current?void 0:t.current(...r)}),[])}(((e,t,r)=>{e&&(g.current.openEvent=t),v.emit("openchange",{open:e,event:t,reason:r,nested:f}),null==o||o(e,t,r)})),h=n.useRef(null),g=n.useRef({}),v=n.useState((()=>function(){const e=new Map;return{emit(t,r){var n;null==(n=e.get(t))||n.forEach((e=>e(r)))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter((e=>e!==r)))||[])}}}()))[0],m=Lr(),y=n.useCallback((e=>{const t=_t(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c.refs.setReference(t)}),[c.refs]),w=n.useCallback((e=>{(_t(e)||null===e)&&(h.current=e,l(e)),(_t(c.refs.reference.current)||null===c.refs.reference.current||null!==e&&!_t(e))&&c.refs.setReference(e)}),[c.refs]),x=n.useMemo((()=>({...c.refs,setReference:w,setPositionReference:y,domReference:h})),[c.refs,w,y]),C=n.useMemo((()=>({...c.elements,domReference:s})),[c.elements,s]),O=n.useMemo((()=>({...c,refs:x,elements:C,dataRef:g,nodeId:i,floatingId:m,events:v,open:r,onOpenChange:p})),[c,i,m,v,r,p,x,C]);return Ar((()=>{const e=null==u?void 0:u.nodesRef.current.find((e=>e.id===i));e&&(e.context=O)})),n.useMemo((()=>({...c,context:O,refs:x,elements:C})),[c,x,C,O])}const Hr=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function Vr(e,t){return"function"==typeof e?e(t):e}function qr(e,t){void 0===t&&(t={});const{open:r,elements:{floating:o}}=e,{duration:i=250}=t,a=("number"==typeof i?i:i.close)||0,[l,s]=n.useState(!1),[c,u]=n.useState("unmounted"),f=function(e,t){const[r,o]=n.useState(e);return e&&!r&&o(!0),n.useEffect((()=>{if(!e){const e=setTimeout((()=>o(!1)),t);return()=>clearTimeout(e)}}),[e,t]),r}(r,a);return Ar((()=>{l&&!f&&u("unmounted")}),[l,f]),Ar((()=>{if(o){if(r){u("initial");const e=requestAnimationFrame((()=>{u("open")}));return()=>{cancelAnimationFrame(e)}}s(!0),u("close")}}),[r,o]),{isMounted:f,status:c}}function Wr(){return(Wr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Zr(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t.indexOf(r=i[n])>=0||(o[r]=e[r]);return o}function $r(e){var t=m(e),r=m((function(e){t.current&&t.current(e)}));return t.current=e,r.current}var Gr=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),e>r?r:e<t?t:e},Kr=function(e){return"touches"in e},Yr=function(e){return e&&e.ownerDocument.defaultView||self},Ur=function(e,t,r){var n=e.getBoundingClientRect(),o=Kr(t)?function(e,t){for(var r=0;r<e.length;r++)if(e[r].identifier===t)return e[r];return e[0]}(t.touches,r):t;return{left:Gr((o.pageX-(n.left+Yr(e).pageXOffset))/n.width),top:Gr((o.pageY-(n.top+Yr(e).pageYOffset))/n.height)}},Xr=function(e){!Kr(e)&&e.preventDefault()},Jr=o.memo((function(e){var t=e.onMove,r=e.onKey,n=Zr(e,["onMove","onKey"]),i=m(null),a=$r(t),l=$r(r),c=m(null),u=m(!1),f=s((function(){var e=function(e){Xr(e),(Kr(e)?e.touches.length>0:e.buttons>0)&&i.current?a(Ur(i.current,e,c.current)):r(!1)},t=function(){return r(!1)};function r(r){var n=u.current,o=Yr(i.current),a=r?o.addEventListener:o.removeEventListener;a(n?"touchmove":"mousemove",e),a(n?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,n=i.current;if(n&&(Xr(t),!function(e,t){return t&&!Kr(e)}(t,u.current)&&n)){if(Kr(t)){u.current=!0;var o=t.changedTouches||[];o.length&&(c.current=o[0].identifier)}n.focus(),a(Ur(n,t,c.current)),r(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),l({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},r]}),[l,a]),d=f[0],p=f[1],h=f[2];return v((function(){return h}),[h]),o.createElement("div",Wr({},n,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"}))})),Qr=function(e){return e.filter(Boolean).join(" ")},en=function(e){var t=e.color,r=e.left,n=e.top,i=void 0===n?.5:n,a=Qr(["react-colorful__pointer",e.className]);return o.createElement("div",{className:a,style:{top:100*i+"%",left:100*r+"%"}},o.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},tn=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=Math.pow(10,t)),Math.round(r*e)/r},rn=function(e){return"#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?tn(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?tn(parseInt(e.substring(6,8),16)/255,2):1}},nn=function(e){var t=function(e){var t=e.s,r=e.v,n=e.a,o=(200-t)*r/100;return{h:tn(e.h),s:tn(o>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0),l:tn(o/2),a:tn(n,2)}}(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},on=function(e){var t=e.h,r=e.s,n=e.v,o=e.a;t=t/360*6,r/=100,n/=100;var i=Math.floor(t),a=n*(1-r),l=n*(1-(t-i)*r),s=n*(1-(1-t+i)*r),c=i%6;return{r:tn(255*[n,l,a,a,s,n][c]),g:tn(255*[s,n,n,l,a,a][c]),b:tn(255*[a,a,s,n,n,l][c]),a:tn(o,2)}},an=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},ln=function(e){var t=e.r,r=e.g,n=e.b,o=e.a,i=o<1?an(tn(255*o)):"";return"#"+an(t)+an(r)+an(n)+i},sn=function(e){var t=e.r,r=e.g,n=e.b,o=e.a,i=Math.max(t,r,n),a=i-Math.min(t,r,n),l=a?i===t?(r-n)/a:i===r?2+(n-t)/a:4+(t-r)/a:0;return{h:tn(60*(l<0?l+6:l)),s:tn(i?a/i*100:0),v:tn(i/255*100),a:o}},cn=o.memo((function(e){var t=e.hue,r=e.onChange,n=Qr(["react-colorful__hue",e.className]);return o.createElement("div",{className:n},o.createElement(Jr,{onMove:function(e){r({h:360*e.left})},onKey:function(e){r({h:Gr(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":tn(t),"aria-valuemax":"360","aria-valuemin":"0"},o.createElement(en,{className:"react-colorful__hue-pointer",left:t/360,color:nn({h:t,s:100,v:100,a:1})})))})),un=o.memo((function(e){var t=e.hsva,r=e.onChange,n={backgroundColor:nn({h:t.h,s:100,v:100,a:1})};return o.createElement("div",{className:"react-colorful__saturation",style:n},o.createElement(Jr,{onMove:function(e){r({s:100*e.left,v:100-100*e.top})},onKey:function(e){r({s:Gr(t.s+100*e.left,0,100),v:Gr(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+tn(t.s)+"%, Brightness "+tn(t.v)+"%"},o.createElement(en,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:nn(t)})))})),fn=function(e,t){if(e===t)return!0;for(var r in e)if(e[r]!==t[r])return!1;return!0};function dn(e,t,r){var n=$r(r),o=y((function(){return e.toHsva(t)})),i=o[0],a=o[1],l=m({color:t,hsva:i});v((function(){if(!e.equal(t,l.current.color)){var r=e.toHsva(t);l.current={hsva:r,color:t},a(r)}}),[t,e]),v((function(){var t;fn(i,l.current.hsva)||e.equal(t=e.fromHsva(i),l.current.color)||(l.current={hsva:i,color:t},n(t))}),[i,e,n]);var s=u((function(e){a((function(t){return Object.assign({},t,e)}))}),[]);return[i,s]}var pn="undefined"!=typeof window?g:v,hn=new Map,gn=function(e){pn((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!hn.has(t)){var r=t.createElement("style");r.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',hn.set(t,r);var n="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0;n&&r.setAttribute("nonce",n),t.head.appendChild(r)}}),[])},vn=function(e){var t=e.className,r=e.colorModel,n=e.color,i=void 0===n?r.defaultColor:n,a=e.onChange,l=Zr(e,["className","colorModel","color","onChange"]),s=m(null);gn(s);var c=dn(r,i,a),u=c[0],f=c[1],d=Qr(["react-colorful",t]);return o.createElement("div",Wr({},l,{ref:s,className:d}),o.createElement(un,{hsva:u,onChange:f}),o.createElement(cn,{hue:u.h,onChange:f,className:"react-colorful__last-control"}))},mn={defaultColor:"000",toHsva:function(e){return sn(rn(e))},fromHsva:function(e){return function(e){return ln(on(e))}({h:e.h,s:e.s,v:e.v,a:1})},equal:function(e,t){return e.toLowerCase()===t.toLowerCase()||fn(rn(e),rn(t))}},yn=function(e){return o.createElement(vn,Wr({},e,{colorModel:mn}))};
/**
 * @license lucide-react v0.453.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bn=(...e)=>e.filter(((e,t,r)=>Boolean(e)&&r.indexOf(e)===t)).join(" ")
/**
 * @license lucide-react v0.453.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */;var wn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
/**
 * @license lucide-react v0.453.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xn=i((({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:l,...s},c)=>a("svg",{ref:c,...wn,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:bn("lucide",o),...s},[...l.map((([e,t])=>a(e,t))),...Array.isArray(i)?i:[i]]))),Cn=((e,t)=>{const r=i((({className:r,...n},o)=>{return a(xn,{ref:o,iconNode:t,className:bn(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,r),...n});var i}));return r.displayName=`${e}`,r})("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);
/**
 * @license lucide-react v0.453.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const{Portal:On}=w,_n={text:[{name:"Default",value:"black"},{name:"Gray",value:"#787774"},{name:"Brown",value:"#976D57"},{name:"Orange",value:"#CC772F"},{name:"Yellow",value:"#C29243"},{name:"Green",value:"#548064"},{name:"Blue",value:"#477DA5"},{name:"Purple",value:"#A48BBE"},{name:"Pink",value:"#B35588"},{name:"Red",value:"#C4554D"}],background:[{name:"Default",value:"unset"},{name:"Gray",value:"#F1F1EF"},{name:"Brown",value:"#F3EEEE"},{name:"Orange",value:"#F8ECDF"},{name:"Yellow",value:"#FAF3DD"},{name:"Green",value:"#EEF3ED"},{name:"Blue",value:"#E9F3F7"},{name:"Purple",value:"#F6F3F8"},{name:"Pink",value:"#F9F2F5"},{name:"Red",value:"#FAECEC"}]},kn={width:"100%",height:170},Pn=({editor:r,refs:n,floatingStyles:o,highlightColors:i={}})=>{const[a,l]=y("text"),[c,u]=y(!0),[f,d]=y(null),p=function(e,t,r){var n=this,o=m(null),i=m(0),a=m(null),l=m([]),c=m(),u=m(),f=m(e),d=m(!0);f.current=e;var p="undefined"!=typeof window,h=!t&&0!==t&&p;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var g=!!(r=r||{}).leading,y=!("trailing"in r)||!!r.trailing,b="maxWait"in r,w="debounceOnServer"in r&&!!r.debounceOnServer,x=b?Math.max(+r.maxWait||0,t):null;v((function(){return d.current=!0,function(){d.current=!1}}),[]);var C=s((function(){var e=function(e){var t=l.current,r=c.current;return l.current=c.current=null,i.current=e,u.current=f.current.apply(r,t)},r=function(e,t){h&&cancelAnimationFrame(a.current),a.current=h?requestAnimationFrame(e):setTimeout(e,t)},s=function(e){if(!d.current)return!1;var r=e-o.current;return!o.current||r>=t||r<0||b&&e-i.current>=x},v=function(t){return a.current=null,y&&l.current?e(t):(l.current=c.current=null,u.current)},m=function e(){var n=Date.now();if(s(n))return v(n);if(d.current){var a=t-(n-o.current),l=b?Math.min(a,x-(n-i.current)):a;r(e,l)}},C=function(){if(p||w){var f=Date.now(),h=s(f);if(l.current=[].slice.call(arguments),c.current=n,o.current=f,h){if(!a.current&&d.current)return i.current=o.current,r(m,t),g?e(o.current):u.current;if(b)return r(m,t),e(o.current)}return a.current||r(m,t),u.current}};return C.cancel=function(){a.current&&(h?cancelAnimationFrame(a.current):clearTimeout(a.current)),i.current=0,l.current=o.current=c.current=a.current=null},C.isPending=function(){return!!a.current},C.flush=function(){return a.current?v(Date.now()):u.current},C}),[g,b,t,x,y,h,p,w]);return C}(((e,t)=>{const n=r.formats.highlight.getValue();(null==n?void 0:n[e])===t?r.formats.highlight.update(Object.assign(Object.assign({},i),{[e]:void 0})):r.formats.highlight.update(Object.assign(Object.assign({},i),{[e]:t})),d(null)}),50),h=(e,t,n)=>{if(n)d(t),p(e,t);else{const n=r.formats.highlight.getValue();(null==n?void 0:n[e])===t?r.formats.highlight.update(Object.assign(Object.assign({},i),{[e]:void 0})):r.formats.highlight.update(Object.assign(Object.assign({},i),{[e]:t}))}};return e(On,Object.assign({id:"yoo-highlight-color-portal"},{children:e("div",Object.assign({style:o,ref:n.setFloating,onClick:e=>e.stopPropagation(),className:"yoo-toolbar-z-50"},{children:t("div",Object.assign({className:"yoo-toolbar-bg-[#FFFFFF] yoo-toolbar-p-2 yoo-toolbar-rounded-md yoo-toolbar-shadow-md yoo-toolbar-border yoo-toolbar-border-solid yoo-toolbar-border-[#e5e7eb]"},{children:[t("div",Object.assign({className:"yoo-toolbar-flex yoo-toolbar-space-x-2 yoo-toolbar-mb-3"},{children:[e("button",Object.assign({type:"button",className:"yoo-toolbar-px-3 yoo-toolbar-py-1 yoo-toolbar-text-sm yoo-toolbar-rounded "+("text"===a?"yoo-toolbar-bg-blue-50 yoo-toolbar-text-blue-600":"yoo-toolbar-text-gray-600 hover:yoo-toolbar-bg-gray-50"),onClick:()=>l("text")},{children:"Text"})),e("button",Object.assign({type:"button",className:"yoo-toolbar-px-3 yoo-toolbar-py-1 yoo-toolbar-text-sm yoo-toolbar-rounded "+("background"===a?"yoo-toolbar-bg-blue-50 yoo-toolbar-text-blue-600":"yoo-toolbar-text-gray-600 hover:yoo-toolbar-bg-gray-50"),onClick:()=>l("background")},{children:"Background"}))]})),e("div",Object.assign({className:"yoo-toolbar-grid yoo-toolbar-justify-items-center yoo-toolbar-grid-cols-5 yoo-toolbar-gap-1 yoo-toolbar-mb-3"},{children:_n[a].map((({name:t,value:r})=>{return e("button",{type:"button",title:t,className:"yoo-toolbar-w-6 yoo-toolbar-h-6 yoo-toolbar-rounded yoo-toolbar-transition-all hover:yoo-toolbar-scale-110",style:(n="text"===a?"color":"backgroundColor",o=r,{backgroundColor:o,border:(f||(null==i?void 0:i[n]))===o?"2px solid #3b82f6":"1px solid #e3e3e3",position:"relative"}),onClick:()=>h("text"===a?"color":"backgroundColor",r)},t);var n,o}))})),t("div",Object.assign({className:"yoo-toolbar-border-t yoo-toolbar-pt-2"},{children:[t("button",Object.assign({type:"button",className:"yoo-toolbar-text-sm yoo-toolbar-text-gray-600 hover:yoo-toolbar-text-gray-900 yoo-toolbar-flex yoo-toolbar-items-center",onClick:()=>u(!c)},{children:["Color Picker",e(Cn,{className:"yoo-toolbar-w-4 yoo-toolbar-h-4 yoo-toolbar-ml-1"})]})),c&&e("div",Object.assign({className:"yoo-toolbar-mt-2"},{children:e(yn,{color:f||(null==i?void 0:i["text"===a?"color":"backgroundColor"])||"#000000",onChange:e=>h("text"===a?"color":"backgroundColor",e,!0),style:kn})}))]}))]}))}))}))};
/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */
function jn(e){return"[object Object]"===Object.prototype.toString.call(e)}function En(e){var t,r;return!1!==jn(e)&&(void 0===(t=e.constructor)||!1!==jn(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))}var Rn=Symbol.for("immer-nothing"),Sn=Symbol.for("immer-draftable"),Tn=Symbol.for("immer-state");function An(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Nn=Object.getPrototypeOf;function Mn(e){return!!e&&!!e[Tn]}function Fn(e){return!!e&&(Dn(e)||Array.isArray(e)||!!e[Sn]||!!e.constructor?.[Sn]||Vn(e)||qn(e))}var Ln=Object.prototype.constructor.toString();function Dn(e){if(!e||"object"!=typeof e)return!1;const t=Nn(e);if(null===t)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===Ln}function Bn(e,t){0===zn(e)?Reflect.ownKeys(e).forEach((r=>{t(r,e[r],e)})):e.forEach(((r,n)=>t(n,r,e)))}function zn(e){const t=e[Tn];return t?t.type_:Array.isArray(e)?1:Vn(e)?2:qn(e)?3:0}function In(e,t){return 2===zn(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Hn(e,t,r){const n=zn(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function Vn(e){return e instanceof Map}function qn(e){return e instanceof Set}function Wn(e){return e.copy_||e.base_}function Zn(e,t){if(Vn(e))return new Map(e);if(qn(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Dn(e)){if(!Nn(e)){const t=Object.create(null);return Object.assign(t,e)}return{...e}}const r=Object.getOwnPropertyDescriptors(e);delete r[Tn];let n=Reflect.ownKeys(r);for(let t=0;t<n.length;t++){const o=n[t],i=r[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Nn(e),r)}function $n(e,t=!1){return Kn(e)||Mn(e)||!Fn(e)||(zn(e)>1&&(e.set=e.add=e.clear=e.delete=Gn),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>$n(t,!0)))),e}function Gn(){An(2)}function Kn(e){return Object.isFrozen(e)}var Yn,Un={};function Xn(e){const t=Un[e];return t||An(0),t}function Jn(){return Yn}function Qn(e,t){t&&(Xn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function eo(e){to(e),e.drafts_.forEach(no),e.drafts_=null}function to(e){e===Yn&&(Yn=e.parent_)}function ro(e){return Yn={drafts_:[],parent_:Yn,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function no(e){const t=e[Tn];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function oo(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return void 0!==e&&e!==r?(r[Tn].modified_&&(eo(t),An(4)),Fn(e)&&(e=io(t,e),t.parent_||lo(t,e)),t.patches_&&Xn("Patches").generateReplacementPatches_(r[Tn].base_,e,t.patches_,t.inversePatches_)):e=io(t,r,[]),eo(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Rn?e:void 0}function io(e,t,r){if(Kn(t))return t;const n=t[Tn];if(!n)return Bn(t,((o,i)=>ao(e,n,t,o,i,r))),t;if(n.scope_!==e)return t;if(!n.modified_)return lo(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const t=n.copy_;let o=t,i=!1;3===n.type_&&(o=new Set(t),t.clear(),i=!0),Bn(o,((o,a)=>ao(e,n,t,o,a,r,i))),lo(e,t,!1),r&&e.patches_&&Xn("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function ao(e,t,r,n,o,i,a){if(Mn(o)){const a=io(e,o,i&&t&&3!==t.type_&&!In(t.assigned_,n)?i.concat(n):void 0);if(Hn(r,n,a),!Mn(a))return;e.canAutoFreeze_=!1}else a&&r.add(o);if(Fn(o)&&!Kn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;io(e,o),t&&t.scope_.parent_||"symbol"==typeof n||!Object.prototype.propertyIsEnumerable.call(r,n)||lo(e,o)}}function lo(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$n(t,r)}var so={get(e,t){if(t===Tn)return e;const r=Wn(e);if(!In(r,t))return function(e,t,r){const n=fo(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}(e,r,t);const n=r[t];return e.finalized_||!Fn(n)?n:n===uo(e.base_,t)?(ho(e),e.copy_[t]=go(n,e)):n},has:(e,t)=>t in Wn(e),ownKeys:e=>Reflect.ownKeys(Wn(e)),set(e,t,r){const n=fo(Wn(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const n=uo(Wn(e),t),o=n?.[Tn];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(r,n)&&(void 0!==r||In(e.base_,t)))return!0;ho(e),po(e)}return e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==uo(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,ho(e),po(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const r=Wn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty(){An(11)},getPrototypeOf:e=>Nn(e.base_),setPrototypeOf(){An(12)}},co={};function uo(e,t){const r=e[Tn];return(r?Wn(r):e)[t]}function fo(e,t){if(!(t in e))return;let r=Nn(e);for(;r;){const e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=Nn(r)}}function po(e){e.modified_||(e.modified_=!0,e.parent_&&po(e.parent_))}function ho(e){e.copy_||(e.copy_=Zn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Bn(so,((e,t)=>{co[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),co.deleteProperty=function(e,t){return co.set.call(this,e,t,void 0)},co.set=function(e,t,r){return so.set.call(this,e[0],t,r,e[0])};function go(e,t){const r=Vn(e)?Xn("MapSet").proxyMap_(e,t):qn(e)?Xn("MapSet").proxySet_(e,t):function(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Jn(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=so;r&&(o=[n],i=co);const{revoke:a,proxy:l}=Proxy.revocable(o,i);return n.draft_=l,n.revoke_=a,l}(e,t);return(t?t.scope_:Jn()).drafts_.push(r),r}function vo(e){if(!Fn(e)||Kn(e))return e;const t=e[Tn];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Zn(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Zn(e,!0);return Bn(r,((e,t)=>{Hn(r,e,vo(t))})),t&&(t.finalized_=!1),r}var mo=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,r)=>{if("function"==typeof e&&"function"!=typeof t){const r=t;t=e;const n=this;return function(e=r,...o){return n.produce(e,(e=>t.call(this,e,...o)))}}let n;if("function"!=typeof t&&An(6),void 0!==r&&"function"!=typeof r&&An(7),Fn(e)){const o=ro(this),i=go(e,void 0);let a=!0;try{n=t(i),a=!1}finally{a?eo(o):to(o)}return Qn(o,r),oo(n,o)}if(!e||"object"!=typeof e){if(n=t(e),void 0===n&&(n=e),n===Rn&&(n=void 0),this.autoFreeze_&&$n(n,!0),r){const t=[],o=[];Xn("Patches").generateReplacementPatches_(e,n,t,o),r(t,o)}return n}An(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...r)=>this.produceWithPatches(t,(t=>e(t,...r)));let r,n;const o=this.produce(e,t,((e,t)=>{r=e,n=t}));return[o,r,n]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Fn(e)||An(8),Mn(e)&&(e=function(e){Mn(e)||An(10);return vo(e)}(e));const t=ro(this),r=go(e,void 0);return r[Tn].isManual_=!0,to(t),r}finishDraft(e,t){const r=e&&e[Tn];r&&r.isManual_||An(9);const{scope_:n}=r;return Qn(n,t),oo(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));const n=Xn("Patches").applyPatches_;return Mn(e)?n(e,t):this.produce(e,(e=>n(e,t)))}},yo=mo.produce;mo.produceWithPatches.bind(mo),mo.setAutoFreeze.bind(mo),mo.setUseStrictShallowCopy.bind(mo),mo.applyPatches.bind(mo);var bo=mo.createDraft.bind(mo),wo=mo.finishDraft.bind(mo),xo={ancestors(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:r=!1}=t,n=xo.levels(e,t);return n=r?n.slice(1):n.slice(0,-1)},common(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var o=e[n];if(o!==t[n])break;r.push(o)}return r},compare(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],a=t[r];return xo.equals(n,o)&&i>a},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return xo.equals(n,o)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],a=t[r];return xo.equals(n,o)&&i<a},equals:(e,t)=>e.length===t.length&&e.every(((e,r)=>e===t[r])),hasPrevious:e=>e[e.length-1]>0,isAfter:(e,t)=>1===xo.compare(e,t),isAncestor:(e,t)=>e.length<t.length&&0===xo.compare(e,t),isBefore:(e,t)=>-1===xo.compare(e,t),isChild:(e,t)=>e.length===t.length+1&&0===xo.compare(e,t),isCommon:(e,t)=>e.length<=t.length&&0===xo.compare(e,t),isDescendant:(e,t)=>e.length>t.length&&0===xo.compare(e,t),isParent:(e,t)=>e.length+1===t.length&&0===xo.compare(e,t),isPath:e=>Array.isArray(e)&&(0===e.length||"number"==typeof e[0]),isSibling(e,t){if(e.length!==t.length)return!1;var r=e.slice(0,-1),n=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&xo.equals(r,n)},levels(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:r=!1}=t,n=[],o=0;o<=e.length;o++)n.push(e.slice(0,o));return r&&n.reverse(),n},next(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!xo.isAncestor(t,e)&&!xo.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return null;var n=[...e],{affinity:o="forward"}=r;if(0===e.length)return n;switch(t.type){case"insert_node":var{path:i}=t;(xo.equals(i,n)||xo.endsBefore(i,n)||xo.isAncestor(i,n))&&(n[i.length-1]+=1);break;case"remove_node":var{path:a}=t;if(xo.equals(a,n)||xo.isAncestor(a,n))return null;xo.endsBefore(a,n)&&(n[a.length-1]-=1);break;case"merge_node":var{path:l,position:s}=t;xo.equals(l,n)||xo.endsBefore(l,n)?n[l.length-1]-=1:xo.isAncestor(l,n)&&(n[l.length-1]-=1,n[l.length]+=s);break;case"split_node":var{path:c,position:u}=t;if(xo.equals(c,n)){if("forward"===o)n[n.length-1]+=1;else if("backward"!==o)return null}else xo.endsBefore(c,n)?n[c.length-1]+=1:xo.isAncestor(c,n)&&e[c.length]>=u&&(n[c.length-1]+=1,n[c.length]-=u);break;case"move_node":var{path:f,newPath:d}=t;if(xo.equals(f,d))return n;if(xo.isAncestor(f,n)||xo.equals(f,n)){var p=d.slice();return xo.endsBefore(f,d)&&f.length<d.length&&(p[f.length-1]-=1),p.concat(n.slice(f.length))}xo.isSibling(f,d)&&(xo.isAncestor(d,n)||xo.equals(d,n))?xo.endsBefore(f,n)?n[f.length-1]-=1:n[f.length-1]+=1:xo.endsBefore(d,n)||xo.equals(d,n)||xo.isAncestor(d,n)?(xo.endsBefore(f,n)&&(n[f.length-1]-=1),n[d.length-1]+=1):xo.endsBefore(f,n)&&(xo.equals(d,n)&&(n[d.length-1]+=1),n[f.length-1]-=1)}return n}};function Co(e){return Co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Co(e)}function Oo(e){var t=function(e,t){if("object"!==Co(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Co(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Co(t)?t:String(t)}function _o(e,t,r){return(t=Oo(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ko(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Po(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ko(Object(r),!0).forEach((function(t){_o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ko(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var jo={transform(e,t){e.children=bo(e.children);var r=e.selection&&bo(e.selection);try{r=((e,t,r)=>{switch(r.type){case"insert_node":var{path:n,node:o}=r,i=Io.parent(e,n),a=n[n.length-1];if(a>i.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));if(i.children.splice(a,0,o),t)for(var[l,s]of Mo.points(t))t[s]=Ko.transform(l,r);break;case"insert_text":var{path:c,offset:u,text:f}=r;if(0===f.length)break;var d=Io.leaf(e,c),p=d.text.slice(0,u),h=d.text.slice(u);if(d.text=p+f+h,t)for(var[g,v]of Mo.points(t))t[v]=Ko.transform(g,r);break;case"merge_node":var{path:m}=r,y=Io.get(e,m),b=xo.previous(m),w=Io.get(e,b),x=Io.parent(e,m),C=m[m.length-1];if(ri.isText(y)&&ri.isText(w))w.text+=y.text;else{if(ri.isText(y)||ri.isText(w))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(m,"] to nodes of different interfaces: ").concat(Uo.stringify(y)," ").concat(Uo.stringify(w)));w.children.push(...y.children)}if(x.children.splice(C,1),t)for(var[O,_]of Mo.points(t))t[_]=Ko.transform(O,r);break;case"move_node":var{path:k,newPath:P}=r;if(xo.isAncestor(k,P))throw new Error("Cannot move a path [".concat(k,"] to new path [").concat(P,"] because the destination is inside itself."));var j=Io.get(e,k),E=Io.parent(e,k),R=k[k.length-1];E.children.splice(R,1);var S=xo.transform(k,r),T=Io.get(e,xo.parent(S)),A=S[S.length-1];if(T.children.splice(A,0,j),t)for(var[N,M]of Mo.points(t))t[M]=Ko.transform(N,r);break;case"remove_node":var{path:F}=r,L=F[F.length-1];if(Io.parent(e,F).children.splice(L,1),t)for(var[D,B]of Mo.points(t)){var z=Ko.transform(D,r);if(null!=t&&null!=z)t[B]=z;else{var I=void 0,H=void 0;for(var[V,q]of Io.texts(e)){if(-1!==xo.compare(q,F)){H=[V,q];break}I=[V,q]}var W=!1;I&&H&&(W=xo.equals(H[1],F)?!xo.hasPrevious(H[1]):xo.common(I[1],F).length<xo.common(H[1],F).length),I&&!W?(D.path=I[1],D.offset=I[0].text.length):H?(D.path=H[1],D.offset=0):t=null}}break;case"remove_text":var{path:Z,offset:$,text:G}=r;if(0===G.length)break;var K=Io.leaf(e,Z),Y=K.text.slice(0,$),U=K.text.slice($+G.length);if(K.text=Y+U,t)for(var[X,J]of Mo.points(t))t[J]=Ko.transform(X,r);break;case"set_node":var{path:Q,properties:ee,newProperties:te}=r;if(0===Q.length)throw new Error("Cannot set properties on the root node!");var re=Io.get(e,Q);for(var ne in te){if("children"===ne||"text"===ne)throw new Error('Cannot set the "'.concat(ne,'" property of nodes!'));var oe=te[ne];null==oe?delete re[ne]:re[ne]=oe}for(var ie in ee)te.hasOwnProperty(ie)||delete re[ie];break;case"set_selection":var{newProperties:ae}=r;if(null==ae)t=ae;else{if(null==t){if(!Mo.isRange(ae))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Uo.stringify(ae)," when there is no current selection."));t=Po({},ae)}for(var le in ae){var se=ae[le];if(null==se){if("anchor"===le||"focus"===le)throw new Error('Cannot remove the "'.concat(le,'" selection property'));delete t[le]}else t[le]=se}}break;case"split_node":var{path:ce,position:ue,properties:fe}=r;if(0===ce.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(ce,"] because the root node cannot be split."));var de,pe=Io.get(e,ce),he=Io.parent(e,ce),ge=ce[ce.length-1];if(ri.isText(pe)){var ve=pe.text.slice(0,ue),me=pe.text.slice(ue);pe.text=ve,de=Po(Po({},fe),{},{text:me})}else{var ye=pe.children.slice(0,ue),be=pe.children.slice(ue);pe.children=ye,de=Po(Po({},fe),{},{children:be})}if(he.children.splice(ge+1,0,de),t)for(var[we,xe]of Mo.points(t))t[xe]=Ko.transform(we,r)}return t})(e,r,t)}finally{e.children=wo(e.children),e.selection=r?Mn(r)?wo(r):r:null}}},Eo={insertNodes(e,t,r){e.insertNodes(t,r)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,r){e.setNodes(t,r)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,r){e.unsetNodes(t,r)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,r){e.wrapNodes(t,r)}},Ro={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,r){e.setPoint(t,r)},setSelection(e,t){e.setSelection(t)}},So=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(En(n)&&En(o)){if(!So(n,o))return!1}else if(Array.isArray(n)&&Array.isArray(o)){if(n.length!==o.length)return!1;for(var i=0;i<n.length;i++)if(n[i]!==o[i])return!1}else if(n!==o)return!1}for(var a in t)if(void 0===e[a]&&void 0!==t[a])return!1;return!0};function To(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Ao=["anchor","focus"];function No(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Mo={edges(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:o}=e;return Mo.isBackward(e)===r?[n,o]:[o,n]},end(e){var[,t]=Mo.edges(e);return t},equals:(e,t)=>Ko.equals(e.anchor,t.anchor)&&Ko.equals(e.focus,t.focus),includes(e,t){if(Mo.isRange(t)){if(Mo.includes(e,t.anchor)||Mo.includes(e,t.focus))return!0;var[r,n]=Mo.edges(e),[o,i]=Mo.edges(t);return Ko.isBefore(r,o)&&Ko.isAfter(n,i)}var[a,l]=Mo.edges(e),s=!1,c=!1;return Ko.isPoint(t)?(s=Ko.compare(t,a)>=0,c=Ko.compare(t,l)<=0):(s=xo.compare(t,a.path)>=0,c=xo.compare(t,l.path)<=0),s&&c},intersection(e,t){var r=To(e,Ao),[n,o]=Mo.edges(e),[i,a]=Mo.edges(t),l=Ko.isBefore(n,i)?i:n,s=Ko.isBefore(o,a)?o:a;return Ko.isBefore(s,l)?null:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?No(Object(r),!0).forEach((function(t){_o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):No(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({anchor:l,focus:s},r)},isBackward(e){var{anchor:t,focus:r}=e;return Ko.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return Ko.equals(t,r)},isExpanded:e=>!Mo.isCollapsed(e),isForward:e=>!Mo.isBackward(e),isRange:e=>En(e)&&Ko.isPoint(e.anchor)&&Ko.isPoint(e.focus),*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=Mo.edges(e);return t},transform(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return yo(e,(e=>{if(null===e)return null;var n,o,{affinity:i="inward"}=r;if("inward"===i){var a=Mo.isCollapsed(e);Mo.isForward(e)?(n="forward",o=a?n:"backward"):(n="backward",o=a?n:"forward")}else"outward"===i?Mo.isForward(e)?(n="backward",o="forward"):(n="forward",o="backward"):(n=i,o=i);var l=Ko.transform(e.anchor,t,{affinity:n}),s=Ko.transform(e.focus,t,{affinity:o});if(!l||!s)return null;e.anchor=l,e.focus=s}))}},Fo=e=>En(e)&&Io.isNodeList(e.children)&&!Zo.isEditor(e),Lo={isAncestor:e=>En(e)&&Io.isNodeList(e.children),isElement:Fo,isElementList:e=>Array.isArray(e)&&e.every((e=>Lo.isElement(e))),isElementProps:e=>void 0!==e.children,isElementType:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return Fo(e)&&e[r]===t},matches(e,t){for(var r in t)if("children"!==r&&e[r]!==t[r])return!1;return!0}},Do=["children"],Bo=["text"],zo=new WeakMap,Io={ancestor(e,t){var r=Io.get(e,t);if(ri.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Uo.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var n of xo.ancestors(t,r)){var o=[Io.ancestor(e,n),n];yield o}}()},child(e,t){if(ri.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Uo.stringify(e)));var r=e.children[t];if(null==r)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Uo.stringify(e)));return r},children(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var{reverse:n=!1}=r,o=Io.ancestor(e,t),{children:i}=o,a=n?i.length-1:0;n?a>=0:a<i.length;){var l=Io.child(o,a),s=t.concat(a);yield[l,s],a=n?a-1:a+1}}()},common(e,t,r){var n=xo.common(t,r);return[Io.get(e,n),n]},descendant(e,t){var r=Io.get(e,t);if(Zo.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Uo.stringify(r)));return r},descendants(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[r,n]of Io.nodes(e,t))0!==n.length&&(yield[r,n])}()},elements(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[r,n]of Io.nodes(e,t))Lo.isElement(r)&&(yield[r,n])}()},extractProps:e=>Lo.isAncestor(e)?To(e,Do):To(e,Bo),first(e,t){for(var r=t.slice(),n=Io.get(e,r);n&&!ri.isText(n)&&0!==n.children.length;)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(ri.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Uo.stringify(e)));var r=yo({children:e.children},(e=>{var[r,n]=Mo.edges(t),o=Io.nodes(e,{reverse:!0,pass:e=>{var[,r]=e;return!Mo.includes(t,r)}});for(var[,i]of o){if(!Mo.includes(t,i)){var a=Io.parent(e,i),l=i[i.length-1];a.children.splice(l,1)}if(xo.equals(i,n.path)){var s=Io.leaf(e,i);s.text=s.text.slice(0,n.offset)}if(xo.equals(i,r.path)){var c=Io.leaf(e,i);c.text=c.text.slice(r.offset)}}Zo.isEditor(e)&&(e.selection=null)}));return r.children},get(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(ri.isText(r)||!r.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Uo.stringify(e)));r=r.children[o]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(ri.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode:e=>ri.isText(e)||Lo.isElement(e)||Zo.isEditor(e),isNodeList(e){if(!Array.isArray(e))return!1;var t=zo.get(e);if(void 0!==t)return t;var r=e.every((e=>Io.isNode(e)));return zo.set(e,r),r},last(e,t){for(var r=t.slice(),n=Io.get(e,r);n&&!ri.isText(n)&&0!==n.children.length;){var o=n.children.length-1;n=n.children[o],r.push(o)}return[n,r]},leaf(e,t){var r=Io.get(e,t);if(!ri.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Uo.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var n of xo.levels(t,r)){var o=Io.get(e,n);yield[o,n]}}()},matches:(e,t)=>Lo.isElement(e)&&Lo.isElementProps(t)&&Lo.matches(e,t)||ri.isText(e)&&ri.isTextProps(t)&&ri.matches(e,t),nodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var{pass:r,reverse:n=!1}=t,{from:o=[],to:i}=t,a=new Set,l=[],s=e;!i||!(n?xo.isBefore(l,i):xo.isAfter(l,i));)if(a.has(s)||(yield[s,l]),a.has(s)||ri.isText(s)||0===s.children.length||null!=r&&!1!==r([s,l])){if(0===l.length)break;if(!n){var c=xo.next(l);if(Io.has(e,c)){l=c,s=Io.get(e,l);continue}}if(n&&0!==l[l.length-1])l=xo.previous(l),s=Io.get(e,l);else l=xo.parent(l),s=Io.get(e,l),a.add(s)}else{a.add(s);var u=n?s.children.length-1:0;xo.isAncestor(l,o)&&(u=o[l.length]),l=l.concat(u),s=Io.get(e,l)}}()},parent(e,t){var r=xo.parent(t),n=Io.get(e,r);if(ri.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string:e=>ri.isText(e)?e.text:e.children.map(Io.string).join(""),texts(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[r,n]of Io.nodes(e,t))ri.isText(r)&&(yield[r,n])}()}};function Ho(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Vo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ho(Object(r),!0).forEach((function(t){_o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ho(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var qo={isNodeOperation:e=>qo.isOperation(e)&&e.type.endsWith("_node"),isOperation(e){if(!En(e))return!1;switch(e.type){case"insert_node":case"remove_node":return xo.isPath(e.path)&&Io.isNode(e.node);case"insert_text":case"remove_text":return"number"==typeof e.offset&&"string"==typeof e.text&&xo.isPath(e.path);case"merge_node":return"number"==typeof e.position&&xo.isPath(e.path)&&En(e.properties);case"move_node":return xo.isPath(e.path)&&xo.isPath(e.newPath);case"set_node":return xo.isPath(e.path)&&En(e.properties)&&En(e.newProperties);case"set_selection":return null===e.properties&&Mo.isRange(e.newProperties)||null===e.newProperties&&Mo.isRange(e.properties)||En(e.properties)&&En(e.newProperties);case"split_node":return xo.isPath(e.path)&&"number"==typeof e.position&&En(e.properties);default:return!1}},isOperationList:e=>Array.isArray(e)&&e.every((e=>qo.isOperation(e))),isSelectionOperation:e=>qo.isOperation(e)&&e.type.endsWith("_selection"),isTextOperation:e=>qo.isOperation(e)&&e.type.endsWith("_text"),inverse(e){switch(e.type){case"insert_node":return Vo(Vo({},e),{},{type:"remove_node"});case"insert_text":return Vo(Vo({},e),{},{type:"remove_text"});case"merge_node":return Vo(Vo({},e),{},{type:"split_node",path:xo.previous(e.path)});case"move_node":var{newPath:t,path:r}=e;if(xo.equals(t,r))return e;if(xo.isSibling(r,t))return Vo(Vo({},e),{},{path:t,newPath:r});var n=xo.transform(r,e),o=xo.transform(xo.next(r),e);return Vo(Vo({},e),{},{path:n,newPath:o});case"remove_node":return Vo(Vo({},e),{},{type:"insert_node"});case"remove_text":return Vo(Vo({},e),{},{type:"insert_text"});case"set_node":var{properties:i,newProperties:a}=e;return Vo(Vo({},e),{},{properties:a,newProperties:i});case"set_selection":var{properties:l,newProperties:s}=e;return Vo(Vo({},e),{},null==l?{properties:s,newProperties:null}:null==s?{properties:null,newProperties:l}:{properties:s,newProperties:l});case"split_node":return Vo(Vo({},e),{},{type:"merge_node",path:xo.next(e.path)})}}},Wo=new WeakMap,Zo={above:(e,t)=>e.above(t),addMark(e,t,r){e.addMark(t,r)},after:(e,t,r)=>e.after(t,r),before:(e,t,r)=>e.before(t,r),deleteBackward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:r="character"}=t;e.deleteBackward(r)},deleteForward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:r="character"}=t;e.deleteForward(r)},deleteFragment(e,t){e.deleteFragment(t)},edges:(e,t)=>e.edges(t),elementReadOnly(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.elementReadOnly(t)},end:(e,t)=>e.end(t),first:(e,t)=>e.first(t),fragment:(e,t)=>e.fragment(t),hasBlocks:(e,t)=>e.hasBlocks(t),hasInlines:(e,t)=>e.hasInlines(t),hasPath:(e,t)=>e.hasPath(t),hasTexts:(e,t)=>e.hasTexts(t),insertBreak(e){e.insertBreak()},insertFragment(e,t,r){e.insertFragment(t,r)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock:(e,t)=>e.isBlock(t),isEdge:(e,t,r)=>e.isEdge(t,r),isEditor:e=>(e=>{var t=Wo.get(e);if(void 0!==t)return t;if(!En(e))return!1;var r="function"==typeof e.addMark&&"function"==typeof e.apply&&"function"==typeof e.deleteFragment&&"function"==typeof e.insertBreak&&"function"==typeof e.insertSoftBreak&&"function"==typeof e.insertFragment&&"function"==typeof e.insertNode&&"function"==typeof e.insertText&&"function"==typeof e.isElementReadOnly&&"function"==typeof e.isInline&&"function"==typeof e.isSelectable&&"function"==typeof e.isVoid&&"function"==typeof e.normalizeNode&&"function"==typeof e.onChange&&"function"==typeof e.removeMark&&"function"==typeof e.getDirtyPaths&&(null===e.marks||En(e.marks))&&(null===e.selection||Mo.isRange(e.selection))&&Io.isNodeList(e.children)&&qo.isOperationList(e.operations);return Wo.set(e,r),r})(e),isElementReadOnly:(e,t)=>e.isElementReadOnly(t),isEmpty:(e,t)=>e.isEmpty(t),isEnd:(e,t,r)=>e.isEnd(t,r),isInline:(e,t)=>e.isInline(t),isNormalizing:e=>e.isNormalizing(),isSelectable:(e,t)=>e.isSelectable(t),isStart:(e,t,r)=>e.isStart(t,r),isVoid:(e,t)=>e.isVoid(t),last:(e,t)=>e.last(t),leaf:(e,t,r)=>e.leaf(t,r),levels:(e,t)=>e.levels(t),marks:e=>e.getMarks(),next:(e,t)=>e.next(t),node:(e,t,r)=>e.node(t,r),nodes:(e,t)=>e.nodes(t),normalize(e,t){e.normalize(t)},parent:(e,t,r)=>e.parent(t,r),path:(e,t,r)=>e.path(t,r),pathRef:(e,t,r)=>e.pathRef(t,r),pathRefs:e=>e.pathRefs(),point:(e,t,r)=>e.point(t,r),pointRef:(e,t,r)=>e.pointRef(t,r),pointRefs:e=>e.pointRefs(),positions:(e,t)=>e.positions(t),previous:(e,t)=>e.previous(t),range:(e,t,r)=>e.range(t,r),rangeRef:(e,t,r)=>e.rangeRef(t,r),rangeRefs:e=>e.rangeRefs(),removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start:(e,t)=>e.start(t),string:(e,t,r)=>e.string(t,r),unhangRange:(e,t,r)=>e.unhangRange(t,r),void:(e,t)=>e.void(t),withoutNormalizing(e,t){e.withoutNormalizing(t)}};function $o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Go(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$o(Object(r),!0).forEach((function(t){_o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ko={compare(e,t){var r=xo.compare(e.path,t.path);return 0===r?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter:(e,t)=>1===Ko.compare(e,t),isBefore:(e,t)=>-1===Ko.compare(e,t),equals:(e,t)=>e.offset===t.offset&&xo.equals(e.path,t.path),isPoint:e=>En(e)&&"number"==typeof e.offset&&xo.isPath(e.path),transform(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return yo(e,(e=>{if(null===e)return null;var{affinity:n="forward"}=r,{path:o,offset:i}=e;switch(t.type){case"insert_node":case"move_node":e.path=xo.transform(o,t,r);break;case"insert_text":xo.equals(t.path,o)&&(t.offset<i||t.offset===i&&"forward"===n)&&(e.offset+=t.text.length);break;case"merge_node":xo.equals(t.path,o)&&(e.offset+=t.position),e.path=xo.transform(o,t,r);break;case"remove_text":xo.equals(t.path,o)&&t.offset<=i&&(e.offset-=Math.min(i-t.offset,t.text.length));break;case"remove_node":if(xo.equals(t.path,o)||xo.isAncestor(t.path,o))return null;e.path=xo.transform(o,t,r);break;case"split_node":if(xo.equals(t.path,o)){if(t.position===i&&null==n)return null;(t.position<i||t.position===i&&"forward"===n)&&(e.offset-=t.position,e.path=xo.transform(o,t,Go(Go({},r),{},{affinity:"forward"})))}else e.path=xo.transform(o,t,r)}}))}},Yo=void 0,Uo={setScrubber(e){Yo=e},stringify:e=>JSON.stringify(e,Yo)},Xo=["text"],Jo=["anchor","focus"];function Qo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ei(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qo(Object(r),!0).forEach((function(t){_o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ti,ri={equals(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{loose:n=!1}=r;function o(e){return To(e,Xo)}return So(n?o(e):e,n?o(t):t)},isText:e=>En(e)&&"string"==typeof e.text,isTextList:e=>Array.isArray(e)&&e.every((e=>ri.isText(e))),isTextProps:e=>void 0!==e.text,matches(e,t){for(var r in t)if("text"!==r&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[ei({},e)];for(var n of t){var o=To(n,Jo),[i,a]=Mo.edges(n),l=[],s=0,c=i.offset,u=a.offset;for(var f of r){var{length:d}=f.text,p=s;if(s+=d,c<=p&&s<=u)Object.assign(f,o),l.push(f);else if(c!==u&&(c===s||u===p)||c>s||u<p||u===p&&0!==p)l.push(f);else{var h=f,g=void 0,v=void 0;if(u<s){var m=u-p;v=ei(ei({},h),{},{text:h.text.slice(m)}),h=ei(ei({},h),{},{text:h.text.slice(0,m)})}if(c>p){var y=c-p;g=ei(ei({},h),{},{text:h.text.slice(0,y)}),h=ei(ei({},h),{},{text:h.text.slice(y)})}Object.assign(h,o),g&&l.push(g),l.push(h),v&&l.push(v)}}r=l}return r}},ni=e=>e.selection?e.selection:e.children.length>0?Zo.end(e,[]):[0];!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(ti||(ti={})),ti.L,ti.L,ti.V,ti.LV,ti.LVT,ti.LV,ti.V,ti.V,ti.T,ti.LVT,ti.T,ti.T,ti.Any,ti.Extend,ti.ZWJ,ti.Any,ti.SpacingMark,ti.Prepend,ti.Any,ti.ZWJ,ti.ExtPict,ti.RI,ti.RI;var oi={delete(e,t){e.delete(t)},insertFragment(e,t,r){e.insertFragment(t,r)},insertText(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Zo.withoutNormalizing(e,(()=>{var{voids:n=!1}=r,{at:o=ni(e)}=r;if(xo.isPath(o)&&(o=Zo.range(e,o)),Mo.isRange(o))if(Mo.isCollapsed(o))o=o.anchor;else{var i=Mo.end(o);if(!n&&Zo.void(e,{at:i}))return;var a=Mo.start(o),l=Zo.pointRef(e,a),s=Zo.pointRef(e,i);li.delete(e,{at:o,voids:n});var c=l.unref(),u=s.unref();o=c||u,li.setSelection(e,{anchor:o,focus:o})}if(!(!n&&Zo.void(e,{at:o})||Zo.elementReadOnly(e,{at:o}))){var{path:f,offset:d}=o;t.length>0&&e.apply({type:"insert_text",path:f,offset:d,text:t})}}))}};function ii(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ai(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ii(Object(r),!0).forEach((function(t){_o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ii(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var li=ai(ai(ai(ai({},jo),Eo),Ro),oi);function si({editor:e,view:t,onClose:r}){return{actions:Object.keys(e.blocks).filter((t=>function(e,t){var r;const n=e.blocks[t];if(!n)return!1;const o=x(n.elements);return"void"!==(null===(r=null==o?void 0:o.props)||void 0===r?void 0:r.nodeType)}(e,t))).map((t=>{var r,n,o,i,a,l;return{type:t,title:(null===(n=null===(r=e.blocks[t].options)||void 0===r?void 0:r.display)||void 0===n?void 0:n.title)||t,description:null===(i=null===(o=e.blocks[t].options)||void 0===o?void 0:o.display)||void 0===i?void 0:i.description,icon:null===(l=null===(a=e.blocks[t].options)||void 0===a?void 0:a.display)||void 0===l?void 0:l.icon}})),onClose:r,empty:!1,getItemProps:t=>({onMouseEnter:()=>{},"data-action-menu-item":!0,"data-action-menu-item-type":t,"aria-selected":!1,onClick:()=>{var n,o,i;if(Array.isArray(e.path.selected)&&e.path.selected.length>0){const a=[];for(const t of e.path.selected){const r=e.getBlock({at:t}),l=e.blocks[(null==r?void 0:r.type)||""],s=x(null==l?void 0:l.elements);r&&"void"!==(null===(n=null==s?void 0:s.props)||void 0===n?void 0:n.nodeType)&&"inline"!==(null===(o=null==s?void 0:s.props)||void 0===o?void 0:o.nodeType)&&"inlineVoid"!==(null===(i=null==s?void 0:s.props)||void 0===i?void 0:i.nodeType)&&a.push({id:r.id,type:r.type,path:r.meta.order})}if(a.length>0){const r=a.every((({type:e})=>e===t));e.batchOperations((()=>{a.forEach((({path:n,type:o})=>{r?e.toggleBlock("Paragraph",{focus:!1,at:n}):o!==t&&e.toggleBlock(t,{focus:!1,at:n})}))}))}r()}else e.toggleBlock(t,{focus:!0}),r()}}),getRootProps:()=>({"data-action-menu-list":!0}),editor:e,view:t}}const{Overlay:ci,Portal:ui}=w,fi={title:"",url:"",target:"_self",rel:"noreferrer"},di={left:W,center:V,right:$},pi={link:!1,highlight:!1,actionMenu:!1},hi=({activeBlock:n,editor:o,toggleHoldToolbar:i})=>{var a,l,s;const[c,u]=y({link:!1,highlight:!1,actionMenu:!1}),[f,d]=y(fi),p=m(null),h=C(),g=(e,t)=>{u((()=>Object.assign(Object.assign({},pi),{[e]:t})))},{refs:b,floatingStyles:w}=Ir({placement:"bottom-start",open:c.actionMenu,onOpenChange:e=>g("actionMenu",e),middleware:[_r(),Or(),Cr(),ir(10)],whileElementsMounted:xr}),{refs:x,floatingStyles:j}=Ir({placement:"top-end",open:c.highlight,onOpenChange:e=>g("highlight",e),middleware:[_r(),Or(),Cr(),ir(10)],whileElementsMounted:xr}),{refs:E,floatingStyles:R}=Ir({placement:"top-start",open:c.link,onOpenChange:e=>g("link",e),middleware:[_r(),Or(),Cr(),ir(10)],whileElementsMounted:xr}),T=e=>{var t,r;return{backgroundColor:(null===(t=o.formats[e])||void 0===t?void 0:t.isActive())?"#1183ff":void 0,color:(null===(r=o.formats[e])||void 0===r?void 0:r.isActive())?"#fff":void 0}},N=o.formats.highlight,F=null==N?void 0:N.getValue(),D=(null===(l=null===(a=null==n?void 0:n.options)||void 0===a?void 0:a.display)||void 0===l?void 0:l.title)||(null==n?void 0:n.type)||"",z=h.ActionMenu,H=h.LinkTool;v((()=>{const e=e=>{if(k.isEscape(e))return u(pi),void(null==i||i(!1))};if(c.link){const e=O(o);if(!e||!e.selection)return;p.current=e.selection;const t=Zo.string(e,null==e?void 0:e.selection),r=(e=>{const[t]=Zo.nodes(e,{match:e=>!Zo.isEditor(e)&&Lo.isElement(e)&&"link"===e.type});return t})(e);if(r){const[e]=r;d(Object.assign(Object.assign({},e.props),{title:t}))}else d(Object.assign(Object.assign({},f),{title:t}))}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[o.path,o.children,c.link]);const V=e=>c[e],q=e=>({backgroundColor:V(e)?"#f4f4f5":void 0}),W=e=>{u(pi),o.formats[e].toggle()},Z=_(o,{at:o.path.current}),$=di[(null===(s=null==Z?void 0:Z.meta)||void 0===s?void 0:s.align)||"left"],G=si({editor:o,onClose:()=>g("actionMenu",!1),view:"small"});return t(vt,Object.assign({className:"yoopta-toolbar-root"},{children:[e(yt,Object.assign({className:"yoopta-toolbar-group",type:"single","aria-label":"Block formatting"},{children:t(bt,Object.assign({className:"yoopta-button yoopta-toolbar-item",value:D,"aria-label":D,ref:b.setReference,onClick:()=>g("actionMenu",!c.actionMenu),style:q("actionMenu")},{children:[e("span",Object.assign({className:"yoo-toolbar-mr-0"},{children:D})),c.actionMenu&&!!z&&e(ui,Object.assign({id:"yoo-toolbar-action-menu-list-portal"},{children:e("div",Object.assign({style:w,ref:b.setFloating,onClick:e=>e.stopPropagation()},{children:e(z,Object.assign({},G))}))}))]}))})),e(mt,{className:"yoopta-toolbar-separator"}),e(yt,Object.assign({className:"yoopta-toolbar-group",type:"single","aria-label":"Block formatting"},{children:t(bt,Object.assign({className:"yoopta-button yoopta-toolbar-item",value:"LinkTool","aria-label":"LinkTool",ref:E.setReference,onClick:()=>{g("link",!c.link),null==i||i(!0)},style:q("link")},{children:[e("span",Object.assign({className:"yoo-toolbar-mr-0"},{children:"Link"})),c.link&&!!H&&e(ui,Object.assign({id:"yoo-link-tool-portal"},{children:e(ci,Object.assign({lockScroll:!0,className:"z-[100]",onClick:e=>{var t;e.stopPropagation(),e.preventDefault(),(null===(t=E.floating.current)||void 0===t?void 0:t.contains(e.target))||(null==i||i(!1),u(pi))}},{children:e("div",Object.assign({style:R,ref:E.setFloating},{children:e(H,{link:f,onSave:e=>{if("number"!=typeof o.path.current)return;const t=P.getBlockSlate(o,{at:o.path.current});t&&Zo.withoutNormalizing(t,(()=>{var r,n,a,l,s,c;if(!t.selection)return;const u=null===(l=null===(a=null===(n=null===(r=o.plugins)||void 0===r?void 0:r.LinkPlugin)||void 0===n?void 0:n.elements)||void 0===a?void 0:a.link)||void 0===l?void 0:l.props;null===(c=(s=o.commands).insertLink)||void 0===c||c.call(s,{slate:t,blockId:null==Z?void 0:Z.id,props:Object.assign(Object.assign({},e),{target:(null==u?void 0:u.target)||e.target||"_self",rel:(null==u?void 0:u.rel)||e.rel||"noopener noreferrer",nodeType:"inline"})}),g("link",!1),d(fi),null==i||i(!1)}))},onDelete:()=>{var e,t;if("number"!=typeof o.path.current)return;const r=P.getBlockSlate(o,{at:o.path.current});r&&(null===(t=(e=o.commands).deleteLink)||void 0===t||t.call(e,{slate:r}),g("link",!1),d(fi),null==i||i(!1))}})}))}))}))]}))})),e(mt,{className:"yoopta-toolbar-separator"}),t(yt,Object.assign({className:"yoopta-toolbar-group",type:"multiple","aria-label":"Text formatting"},{children:[o.formats.bold&&e(bt,Object.assign({className:"yoopta-button yoopta-toolbar-item-mark",value:"bold","aria-label":"Bold",style:T("bold"),onClick:()=>W("bold")},{children:e(L,{width:20,height:20})})),o.formats.italic&&e(bt,Object.assign({className:"yoopta-button yoopta-toolbar-item-mark",value:"italic","aria-label":"Italic",style:T("italic"),onClick:()=>W("italic")},{children:e(B,{width:20,height:20})})),o.formats.underline&&e(bt,Object.assign({className:"yoopta-button yoopta-toolbar-item-mark",value:"underline","aria-label":"Underline",style:T("underline"),onClick:()=>W("underline")},{children:e(K,{width:20,height:20})})),o.formats.strike&&e(bt,Object.assign({className:"yoopta-button yoopta-toolbar-item-mark",value:"strike","aria-label":"Strike",style:T("strike"),onClick:()=>W("strike")},{children:e(I,{width:20,height:20})})),o.formats.code&&e(bt,Object.assign({className:"yoopta-button yoopta-toolbar-item-mark",value:"code","aria-label":"Code",style:T("code"),onClick:()=>W("code")},{children:e(M,{width:20,height:20})}))]})),e(mt,{className:"yoopta-toolbar-separator"}),t(yt,Object.assign({className:"yoopta-toolbar-group",type:"multiple","aria-label":"Text formatting"},{children:[e(bt,Object.assign({className:"yoopta-button yoopta-toolbar-item-mark",value:"align","aria-label":"Alignment",style:T("align"),onClick:()=>{var e;const t=["left","center","right"];if(!Z)return;const r=(null===(e=null==Z?void 0:Z.meta)||void 0===e?void 0:e.align)||"left",n=t[(t.indexOf(r)+1)%t.length];if(Array.isArray(o.path.selected)&&o.path.selected.length>0)for(const e of o.path.selected){const t=P.getBlock(o,{at:e});t&&P.updateBlock(o,t.id,{meta:Object.assign(Object.assign({},t.meta),{align:n})})}else P.updateBlock(o,Z.id,{meta:Object.assign(Object.assign({},Z.meta),{align:n})})}},{children:e($,{width:20,height:20})})),o.formats.highlight&&t(r,{children:[c.highlight&&e(Pn,{editor:o,floatingStyles:j,refs:x,onClose:()=>g("highlight",!1),highlightColors:F}),t(bt,Object.assign({className:"yoopta-button yoopta-toolbar-item-mark",value:"highlight","aria-label":"Highlight",style:(()=>{const e=q("highlight");return{color:null==F?void 0:F.color,backgroundColor:e.backgroundColor||(null==F?void 0:F.backgroundColor),backgroundImage:null==F?void 0:F.backgroundImage,WebkitTextFillColor:null==F?void 0:F.webkitTextFillColor}})(),ref:x.setReference,onClick:()=>g("highlight",!c.highlight)},{children:[e("span",Object.assign({className:"yoopta-toolbar-color-text"},{children:"A"})),c.highlight?e(A,{width:10}):e(S,{width:10})]}))]})]}))]}))};var gi="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},vi="Expected a function",mi=NaN,yi="[object Symbol]",bi=/^\s+|\s+$/g,wi=/^[-+]0x[0-9a-f]+$/i,xi=/^0b[01]+$/i,Ci=/^0o[0-7]+$/i,Oi=parseInt,_i="object"==typeof gi&&gi&&gi.Object===Object&&gi,ki="object"==typeof self&&self&&self.Object===Object&&self,Pi=_i||ki||Function("return this")(),ji=Object.prototype.toString,Ei=Math.max,Ri=Math.min,Si=function(){return Pi.Date.now()};function Ti(e,t,r){var n,o,i,a,l,s,c=0,u=!1,f=!1,d=!0;if("function"!=typeof e)throw new TypeError(vi);function p(t){var r=n,i=o;return n=o=void 0,c=t,a=e.apply(i,r)}function h(e){var r=e-s;return void 0===s||r>=t||r<0||f&&e-c>=i}function g(){var e=Si();if(h(e))return v(e);l=setTimeout(g,function(e){var r=t-(e-s);return f?Ri(r,i-(e-c)):r}(e))}function v(e){return l=void 0,d&&n?p(e):(n=o=void 0,a)}function m(){var e=Si(),r=h(e);if(n=arguments,o=this,s=e,r){if(void 0===l)return function(e){return c=e,l=setTimeout(g,t),u?p(e):a}(s);if(f)return l=setTimeout(g,t),p(s)}return void 0===l&&(l=setTimeout(g,t)),a}return t=Ni(t)||0,Ai(r)&&(u=!!r.leading,i=(f="maxWait"in r)?Ei(Ni(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d),m.cancel=function(){void 0!==l&&clearTimeout(l),c=0,n=s=o=l=void 0},m.flush=function(){return void 0===l?a:v(Si())},m}function Ai(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ni(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&ji.call(e)==yi}(e))return mi;if(Ai(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ai(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(bi,"");var r=xi.test(e);return r||Ci.test(e)?Oi(e.slice(2),r?2:8):wi.test(e)?mi:+e}var Mi=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new TypeError(vi);return Ai(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Ti(e,t,{leading:n,maxWait:t,trailing:o})};const{Portal:Fi}=w,Li=({render:t})=>{const r=j(),[o,i]=y(!1),[a,l]=y(!1),{refs:s,floatingStyles:c,context:u}=Ir({placement:"top",open:o,onOpenChange:i,middleware:[_r(),Or(),Cr(),ir(10)],whileElementsMounted:xr}),{isMounted:f,styles:d}=function(e,t){void 0===t&&(t={});const{initial:r={opacity:0},open:o,close:i,common:a,duration:l=250}=t,s=e.placement,c=s.split("-")[0],u=n.useMemo((()=>({side:c,placement:s})),[c,s]),f="number"==typeof l,d=(f?l:l.open)||0,p=(f?l:l.close)||0,[h,g]=n.useState((()=>({...Vr(a,u),...Vr(r,u)}))),{isMounted:v,status:m}=qr(e,{duration:l}),y=zr(r),b=zr(o),w=zr(i),x=zr(a);return Ar((()=>{const e=Vr(y.current,u),t=Vr(w.current,u),r=Vr(x.current,u),n=Vr(b.current,u)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===m&&g((t=>({transitionProperty:t.transitionProperty,...r,...e}))),"open"===m&&g({transitionProperty:Object.keys(n).map(Hr).join(","),transitionDuration:d+"ms",...r,...n}),"close"===m){const n=t||e;g({transitionProperty:Object.keys(n).map(Hr).join(","),transitionDuration:p+"ms",...r,...n})}}),[p,w,y,b,x,d,m,u]),{isMounted:v,styles:h}}(u,{duration:100}),p=Mi((()=>{var e;if(a)return;const t=s.floating.current;if(t&&t.contains(document.activeElement))return;const n=window.getSelection();if(!n||(null==n?void 0:n.isCollapsed)||(null==n?void 0:n.anchorOffset)===(null==n?void 0:n.focusOffset))return i(!1);const o=n.getRangeAt(0),l=o.getBoundingClientRect(),c=o.toString().trim(),u=document.querySelectorAll("[data-custom-editor]"),f=null==o?void 0:o.commonAncestorContainer;let d=!1;for(let e=0;e<u.length;e++)if(u[e].contains(f)){d=!0;break}if(!(null===(e=r.refElement)||void 0===e?void 0:e.contains(f))||d)return i(!1);o&&c.length>0&&(s.setReference({getBoundingClientRect:()=>l,getClientRects:()=>o.getClientRects()}),i(!0))}),200);if(v((()=>{if(Array.isArray(r.path.selected)||r.path.selection){if(!Array.isArray(r.path.selected)||r.path.selection)return window.document.addEventListener("selectionchange",p),()=>window.document.removeEventListener("selectionchange",p);(()=>{var e;if(!Array.isArray(r.path.selected)||0===r.path.selected.length||"mousemove"!==r.path.source&&"keyboard"!==r.path.source)return i(!1);const t=Math.min(...r.path.selected),n=Math.max(...r.path.selected);let o=!0;"number"==typeof r.path.current&&(o=Math.abs(r.path.current-n)<=Math.abs(r.path.current-t));const a=r.getBlock({at:o?n:t}),l=null===(e=r.refElement)||void 0===e?void 0:e.querySelector(`[data-yoopta-block-id="${null==a?void 0:a.id}"]`);l&&(s.setReference({getBoundingClientRect:()=>l.getBoundingClientRect(),getClientRects:()=>l.getClientRects()}),i(!0))})()}else i(!1)}),[r.path,a,r.children]),!f)return null;const h=Object.values(r.blocks).find((e=>e.isActive())),g=Object.assign(Object.assign({},c),d),m=e=>l(e);if(t){const n=t;return e(Fi,Object.assign({id:"yoo-toolbar-portal"},{children:e("div",Object.assign({style:g,ref:s.setFloating,className:"yoo-toolbar-z-[99]",onClick:e=>e.stopPropagation()},{children:e(n,{activeBlock:h,editor:r,toggleHoldToolbar:m})}))}))}return e(Fi,Object.assign({id:"yoo-toolbar-portal"},{children:e("div",Object.assign({style:g,ref:s.setFloating,className:"yoo-toolbar-z-[99]",onClick:e=>e.stopPropagation()},{children:e(hi,{activeBlock:h,editor:r,toggleHoldToolbar:m})}))}))};!function(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".yoo-toolbar-z-50{z-index:50}.yoo-toolbar-z-\\[99\\]{z-index:99}.yoo-toolbar-mb-3{margin-bottom:.75rem}.yoo-toolbar-ml-1{margin-left:.25rem}.yoo-toolbar-mr-0{margin-right:0}.yoo-toolbar-mt-2{margin-top:.5rem}.yoo-toolbar-flex{display:flex}.yoo-toolbar-grid{display:grid}.yoo-toolbar-h-4{height:1rem}.yoo-toolbar-h-6{height:1.5rem}.yoo-toolbar-w-4{width:1rem}.yoo-toolbar-w-6{width:1.5rem}.yoo-toolbar-grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.yoo-toolbar-items-center{align-items:center}.yoo-toolbar-justify-items-center{justify-items:center}.yoo-toolbar-gap-1{gap:.25rem}.yoo-toolbar-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.yoo-toolbar-rounded{border-radius:.25rem}.yoo-toolbar-rounded-md{border-radius:.375rem}.yoo-toolbar-border{border-width:1px}.yoo-toolbar-border-t{border-top-width:1px}.yoo-toolbar-border-solid{border-style:solid}.yoo-toolbar-border-\\[\\#e5e7eb\\]{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.yoo-toolbar-bg-\\[\\#FFFFFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.yoo-toolbar-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity))}.yoo-toolbar-p-2{padding:.5rem}.yoo-toolbar-px-3{padding-left:.75rem;padding-right:.75rem}.yoo-toolbar-py-1{padding-bottom:.25rem;padding-top:.25rem}.yoo-toolbar-pt-2{padding-top:.5rem}.yoo-toolbar-text-sm{font-size:.875rem;line-height:1.25rem}.yoo-toolbar-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.yoo-toolbar-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.yoo-toolbar-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-toolbar-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoopta-toolbar-root{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);background-color:rgb(255 255 255/var(--tw-bg-opacity));border-color:rgb(227 227 227/var(--tw-border-opacity));border-radius:.375rem;border-style:solid;border-width:1px;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);display:flex;padding:5px;z-index:50}.yoopta-toolbar-group{align-items:center;display:flex}.yoopta-toolbar-item{border-radius:.375rem;font-size:16px;height:100%;padding:0 10px}.yoopta-toolbar-item:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity))}.yoopta-toolbar-item-mark{align-items:center;border-radius:.375rem;cursor:pointer;display:inline-flex;height:32px;justify-content:center;margin-left:2px;padding:0 5px}.yoopta-toolbar-item-mark:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity))}.yoopta-toolbar-separator{--tw-bg-opacity:1;background-color:rgb(219 216 224/var(--tw-bg-opacity));margin:0 6px;width:1px}.yoopta-toolbar-color-text{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif;font-size:1.125rem;line-height:1.75rem;padding-left:.25rem;padding-right:.25rem}.hover\\:yoo-toolbar-scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:yoo-toolbar-bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.hover\\:yoo-toolbar-text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}");export{hi as DefaultToolbarRender,Li as default};
