@yoopta/image 4.0.0-rc.14 → 4.0.0-rc.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import{useYooptaEditor as e,useYooptaPluginOptions as t,UI as o,useBlockData as i,useYooptaReadOnly as n,useBlockSelected as r,YooptaPlugin as a,generateId as s}from"@yoopta/editor";import{jsx as l,jsxs as c,Fragment as d}from"react/jsx-runtime";import*as p from"react";import{useLayoutEffect as u,useEffect as h,forwardRef as g,createElement as f,useState as m,useMemo as y}from"react";import*as w from"react-dom";import{flushSync as x,createPortal as b}from"react-dom";const v=({width:e,height:t,src:o,alt:i,fit:n,bgColor:r,layout:a="intrinsic"})=>{const s={objectFit:n||"contain",backgroundColor:r||"transparent"},c="fixed"===a,d="fill"===a,p="intrinsic"===a;return"responsive"===a&&(s.width="100%",s.height="auto"),c&&(s.width="100%",s.height="100%"),d&&(s.width="100%",s.height="100%"),p&&(s.width="100%",s.height="100%"),l("div",Object.assign({className:"yoo-image-w-full","data-layout":a},{children:o&&l("img",{src:o,width:e,height:t,alt:i||"",decoding:"async",loading:"lazy",style:s})}))};var C,z=(C=function(e,t){return C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},C(e,t)},function(e,t){function o(){this.constructor=e}C(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),R=function(){return R=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},R.apply(this,arguments)},S={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},_={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},E={width:"20px",height:"20px",position:"absolute"},k={top:R(R({},S),{top:"-5px"}),right:R(R({},_),{left:void 0,right:"-5px"}),bottom:R(R({},S),{top:void 0,bottom:"-5px"}),left:R(R({},_),{left:"-5px"}),topRight:R(R({},E),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:R(R({},E),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:R(R({},E),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:R(R({},E),{left:"-10px",top:"-10px",cursor:"nw-resize"})},L=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return z(t,e),t.prototype.render=function(){return p.createElement("div",{className:this.props.className||"",style:R(R({position:"absolute",userSelect:"none"},k[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(p.PureComponent),N=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},e(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),O=function(){return O=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},O.apply(this,arguments)},M={width:"auto",height:"auto"},W=function(e,t,o){return Math.max(Math.min(e,o),t)},j=function(e,t){return Math.round(e/t)*t},A=function(e,t){return new RegExp(e,"i").test(t)},T=function(e){return Boolean(e.touches&&e.touches.length)},B=function(e,t,o){void 0===o&&(o=0);var i=t.reduce((function(o,i,n){return Math.abs(i-e)<Math.abs(t[o]-e)?n:o}),0),n=Math.abs(t[i]-e);return 0===o||n<o?t[i]:e},H=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},P=function(e,t,o,i){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return o*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return i*(Number(e.replace("vh",""))/100)}return e},I=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],D="__resizable_base__",F=function(e){function t(t){var o=e.call(this,t)||this;return o.ratio=1,o.resizable=null,o.parentLeft=0,o.parentTop=0,o.resizableLeft=0,o.resizableRight=0,o.resizableTop=0,o.resizableBottom=0,o.targetLeft=0,o.targetTop=0,o.appendBase=function(){if(!o.resizable||!o.window)return null;var e=o.parentNode;if(!e)return null;var t=o.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(D):t.className+=D,e.appendChild(t),t},o.removeBase=function(e){var t=o.parentNode;t&&t.removeChild(e)},o.ref=function(e){e&&(o.resizable=e)},o.state={isResizing:!1,width:void 0===(o.propsSize&&o.propsSize.width)?"auto":o.propsSize&&o.propsSize.width,height:void 0===(o.propsSize&&o.propsSize.height)?"auto":o.propsSize&&o.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},o.onResizeStart=o.onResizeStart.bind(o),o.onMouseMove=o.onMouseMove.bind(o),o.onMouseUp=o.onMouseUp.bind(o),o}return N(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||M},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,i=this.resizable.offsetHeight,n=this.resizable.style.position;"relative"!==n&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:o,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=n}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,o=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var o=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/o[t]*100+"%"}return H(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?H(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?H(t.height):o("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,o=this.parentNode.style.flexWrap;"wrap"!==o&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=o),this.removeBase(e),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var o=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==o&&"auto"!==o?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var o,i,n=this.props.boundsByDirection,r=this.state.direction,a=n&&A("left",r),s=n&&A("top",r);if("parent"===this.props.bounds){var l=this.parentNode;l&&(o=a?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),i=s?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(o=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var o=this.props.scale||1,i=this.props.resizeRatio||1,n=this.state,r=n.direction,a=n.original,s=this.props,l=s.lockAspectRatio,c=s.lockAspectRatioExtraHeight,d=s.lockAspectRatioExtraWidth,p=a.width,u=a.height,h=c||0,g=d||0;return A("right",r)&&(p=a.width+(e-a.x)*i/o,l&&(u=(p-g)/this.ratio+h)),A("left",r)&&(p=a.width-(e-a.x)*i/o,l&&(u=(p-g)/this.ratio+h)),A("bottom",r)&&(u=a.height+(t-a.y)*i/o,l&&(p=(u-h)*this.ratio+g)),A("top",r)&&(u=a.height-(t-a.y)*i/o,l&&(p=(u-h)*this.ratio+g)),{newWidth:p,newHeight:u}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,o,i){var n=this.props,r=n.lockAspectRatio,a=n.lockAspectRatioExtraHeight,s=n.lockAspectRatioExtraWidth,l=void 0===i.width?10:i.width,c=void 0===o.width||o.width<0?e:o.width,d=void 0===i.height?10:i.height,p=void 0===o.height||o.height<0?t:o.height,u=a||0,h=s||0;if(r){var g=(d-u)*this.ratio+h,f=(p-u)*this.ratio+h,m=(l-h)/this.ratio+u,y=(c-h)/this.ratio+u,w=Math.max(l,g),x=Math.min(c,f),b=Math.max(d,m),v=Math.min(p,y);e=W(e,w,x),t=W(t,b,v)}else e=W(e,l,c),t=W(t,d,p);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var i=this.resizable.getBoundingClientRect(),n=i.left,r=i.top,a=i.right,s=i.bottom;this.resizableLeft=n,this.resizableRight=a,this.resizableTop=r,this.resizableBottom=s}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var o,i=0,n=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(i=e.nativeEvent.clientX,n=e.nativeEvent.clientY):e.nativeEvent&&T(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,n=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var r=this.window.getComputedStyle(this.resizable);if("auto"!==r.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",o=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:i,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:O(O({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:o};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&T(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var o=this.props,i=o.maxWidth,n=o.maxHeight,r=o.minWidth,a=o.minHeight,s=T(e)?e.touches[0].clientX:e.clientX,l=T(e)?e.touches[0].clientY:e.clientY,c=this.state,d=c.direction,p=c.original,u=c.width,h=c.height,g=this.getParentSize(),f=function(e,t,o,i,n,r,a){return i=P(i,e.width,t,o),n=P(n,e.height,t,o),r=P(r,e.width,t,o),a=P(a,e.height,t,o),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===n?void 0:Number(n),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===a?void 0:Number(a)}}(g,this.window.innerWidth,this.window.innerHeight,i,n,r,a);i=f.maxWidth,n=f.maxHeight,r=f.minWidth,a=f.minHeight;var m=this.calculateNewSizeFromDirection(s,l),y=m.newHeight,w=m.newWidth,b=this.calculateNewMaxFromBoundary(i,n);this.props.snap&&this.props.snap.x&&(w=B(w,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(y=B(y,this.props.snap.y,this.props.snapGap));var v=this.calculateNewSizeFromAspectRatio(w,y,{width:b.maxWidth,height:b.maxHeight},{width:r,height:a});if(w=v.newWidth,y=v.newHeight,this.props.grid){var C=j(w,this.props.grid[0]),z=j(y,this.props.grid[1]),R=this.props.snapGap||0;w=0===R||Math.abs(C-w)<=R?C:w,y=0===R||Math.abs(z-y)<=R?z:y}var S={width:w-p.width,height:y-p.height};if(u&&"string"==typeof u)if(u.endsWith("%"))w=w/g.width*100+"%";else if(u.endsWith("vw")){w=w/this.window.innerWidth*100+"vw"}else if(u.endsWith("vh")){w=w/this.window.innerHeight*100+"vh"}if(h&&"string"==typeof h)if(h.endsWith("%"))y=y/g.height*100+"%";else if(h.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}var _={width:this.createSizeForCssProperty(w,"width"),height:this.createSizeForCssProperty(y,"height")};"row"===this.flexDir?_.flexBasis=_.width:"column"===this.flexDir&&(_.flexBasis=_.height),x((function(){t.setState(_)})),this.props.onResize&&this.props.onResize(e,d,this.resizable,S)}},t.prototype.onMouseUp=function(e){var t=this.state,o=t.isResizing,i=t.direction,n=t.original;if(o&&this.resizable){var r={width:this.size.width-n.width,height:this.size.height-n.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,r),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:O(O({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,o=t.enable,i=t.handleStyles,n=t.handleClasses,r=t.handleWrapperStyle,a=t.handleWrapperClass,s=t.handleComponent;if(!o)return null;var l=Object.keys(o).map((function(t){return!1!==o[t]?p.createElement(L,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:n&&n[t]},s&&s[t]?s[t]:null):null}));return p.createElement("div",{className:a,style:r},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,o){return-1!==I.indexOf(o)||(t[o]=e.props[o]),t}),{}),o=O(O(O({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return p.createElement(i,O({ref:this.ref,style:o,className:this.props.className},t),this.state.isResizing&&p.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(p.PureComponent);function V(e){return X(e)?(e.nodeName||"").toLowerCase():"#document"}function U(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Z(e){var t;return null==(t=(X(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function X(e){return e instanceof Node||e instanceof U(e).Node}function Y(e){return e instanceof Element||e instanceof U(e).Element}function G(e){return e instanceof HTMLElement||e instanceof U(e).HTMLElement}function $(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof U(e).ShadowRoot)}function q(e){const{overflow:t,overflowX:o,overflowY:i,display:n}=te(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&!["inline","contents"].includes(n)}function J(e){return["table","td","th"].includes(V(e))}function K(e){const t=Q(),o=te(e);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((e=>(o.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(o.contain||"").includes(e)))}function Q(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function ee(e){return["html","body","#document"].includes(V(e))}function te(e){return U(e).getComputedStyle(e)}function oe(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ie(e){if("html"===V(e))return e;const t=e.assignedSlot||e.parentNode||$(e)&&e.host||Z(e);return $(t)?t.host:t}function ne(e){const t=ie(e);return ee(t)?e.ownerDocument?e.ownerDocument.body:e.body:G(t)&&q(t)?t:ne(t)}function re(e,t,o){var i;void 0===t&&(t=[]),void 0===o&&(o=!0);const n=ne(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),a=U(n);return r?t.concat(a,a.visualViewport||[],q(n)?n:[],a.frameElement&&o?re(a.frameElement):[]):t.concat(n,re(n,[],o))}const ae=Math.min,se=Math.max,le=Math.round,ce=e=>({x:e,y:e}),de={left:"right",right:"left",bottom:"top",top:"bottom"},pe={start:"end",end:"start"};function ue(e,t,o){return se(e,ae(t,o))}function he(e,t){return"function"==typeof e?e(t):e}function ge(e){return e.split("-")[0]}function fe(e){return e.split("-")[1]}function me(e){return"x"===e?"y":"x"}function ye(e){return"y"===e?"height":"width"}function we(e){return["top","bottom"].includes(ge(e))?"y":"x"}function xe(e){return me(we(e))}function be(e){return e.replace(/start|end/g,(e=>pe[e]))}function ve(e){return e.replace(/left|right|bottom|top/g,(e=>de[e]))}function Ce(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 ze(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Re(e,t,o){let{reference:i,floating:n}=e;const r=we(t),a=xe(t),s=ye(a),l=ge(t),c="y"===r,d=i.x+i.width/2-n.width/2,p=i.y+i.height/2-n.height/2,u=i[s]/2-n[s]/2;let h;switch(l){case"top":h={x:d,y:i.y-n.height};break;case"bottom":h={x:d,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:p};break;case"left":h={x:i.x-n.width,y:p};break;default:h={x:i.x,y:i.y}}switch(fe(t)){case"start":h[a]-=u*(o&&c?-1:1);break;case"end":h[a]+=u*(o&&c?-1:1)}return h}async function Se(e,t){var o;void 0===t&&(t={});const{x:i,y:n,platform:r,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:u=!1,padding:h=0}=he(t,e),g=Ce(h),f=s[u?"floating"===p?"reference":"floating":p],m=ze(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(f)))||o?f:f.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),y="floating"===p?{...a.floating,x:i,y:n}:a.reference,w=await(null==r.getOffsetParent?void 0:r.getOffsetParent(s.floating)),x=await(null==r.isElement?void 0:r.isElement(w))&&await(null==r.getScale?void 0:r.getScale(w))||{x:1,y:1},b=ze(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:w,strategy:l}):y);return{top:(m.top-b.top+g.top)/x.y,bottom:(b.bottom-m.bottom+g.bottom)/x.y,left:(m.left-b.left+g.left)/x.x,right:(b.right-m.right+g.right)/x.x}}function _e(e){const t=ae(...e.map((e=>e.left))),o=ae(...e.map((e=>e.top)));return{x:t,y:o,width:se(...e.map((e=>e.right)))-t,height:se(...e.map((e=>e.bottom)))-o}}const Ee=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,i;const{x:n,y:r,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:o,platform:i,elements:n}=e,r=await(null==i.isRTL?void 0:i.isRTL(n.floating)),a=ge(o),s=fe(o),l="y"===we(o),c=["left","top"].includes(a)?-1:1,d=r&&l?-1:1,p=he(t,e);let{mainAxis:u,crossAxis:h,alignmentAxis:g}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&"number"==typeof g&&(h="end"===s?-1*g:g),l?{x:h*d,y:u*c}:{x:u*c,y:h*d}}(t,e);return a===(null==(o=s.offset)?void 0:o.placement)&&null!=(i=s.arrow)&&i.alignmentOffset?{}:{x:n+l.x,y:r+l.y,data:{...l,placement:a}}}}};function ke(e){const t=te(e);let o=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=G(e),r=n?e.offsetWidth:o,a=n?e.offsetHeight:i,s=le(o)!==r||le(i)!==a;return s&&(o=r,i=a),{width:o,height:i,$:s}}function Le(e){return Y(e)?e:e.contextElement}function Ne(e){const t=Le(e);if(!G(t))return ce(1);const o=t.getBoundingClientRect(),{width:i,height:n,$:r}=ke(t);let a=(r?le(o.width):o.width)/i,s=(r?le(o.height):o.height)/n;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Oe=ce(0);function Me(e){const t=U(e);return Q()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Oe}function We(e,t,o,i){void 0===t&&(t=!1),void 0===o&&(o=!1);const n=e.getBoundingClientRect(),r=Le(e);let a=ce(1);t&&(i?Y(i)&&(a=Ne(i)):a=Ne(e));const s=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==U(e))&&t}(r,o,i)?Me(r):ce(0);let l=(n.left+s.x)/a.x,c=(n.top+s.y)/a.y,d=n.width/a.x,p=n.height/a.y;if(r){const e=U(r),t=i&&Y(i)?U(i):i;let o=e,n=o.frameElement;for(;n&&i&&t!==o;){const e=Ne(n),t=n.getBoundingClientRect(),i=te(n),r=t.left+(n.clientLeft+parseFloat(i.paddingLeft))*e.x,a=t.top+(n.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,p*=e.y,l+=r,c+=a,o=U(n),n=o.frameElement}}return ze({width:d,height:p,x:l,y:c})}const je=[":popover-open",":modal"];function Ae(e){return je.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Te(e){return We(Z(e)).left+oe(e).scrollLeft}function Be(e,t,o){let i;if("viewport"===t)i=function(e,t){const o=U(e),i=Z(e),n=o.visualViewport;let r=i.clientWidth,a=i.clientHeight,s=0,l=0;if(n){r=n.width,a=n.height;const e=Q();(!e||e&&"fixed"===t)&&(s=n.offsetLeft,l=n.offsetTop)}return{width:r,height:a,x:s,y:l}}(e,o);else if("document"===t)i=function(e){const t=Z(e),o=oe(e),i=e.ownerDocument.body,n=se(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=se(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let a=-o.scrollLeft+Te(e);const s=-o.scrollTop;return"rtl"===te(i).direction&&(a+=se(t.clientWidth,i.clientWidth)-n),{width:n,height:r,x:a,y:s}}(Z(e));else if(Y(t))i=function(e,t){const o=We(e,!0,"fixed"===t),i=o.top+e.clientTop,n=o.left+e.clientLeft,r=G(e)?Ne(e):ce(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:n*r.x,y:i*r.y}}(t,o);else{const o=Me(e);i={...t,x:t.x-o.x,y:t.y-o.y}}return ze(i)}function He(e,t){const o=ie(e);return!(o===t||!Y(o)||ee(o))&&("fixed"===te(o).position||He(o,t))}function Pe(e,t,o){const i=G(t),n=Z(t),r="fixed"===o,a=We(e,!0,r,t);let s={scrollLeft:0,scrollTop:0};const l=ce(0);if(i||!i&&!r)if(("body"!==V(t)||q(n))&&(s=oe(t)),i){const e=We(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&(l.x=Te(n));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Ie(e,t){return G(e)&&"fixed"!==te(e).position?t?t(e):e.offsetParent:null}function De(e,t){const o=U(e);if(!G(e)||Ae(e))return o;let i=Ie(e,t);for(;i&&J(i)&&"static"===te(i).position;)i=Ie(i,t);return i&&("html"===V(i)||"body"===V(i)&&"static"===te(i).position&&!K(i))?o:i||function(e){let t=ie(e);for(;G(t)&&!ee(t);){if(K(t))return t;t=ie(t)}return null}(e)||o}const Fe={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:i,strategy:n}=e;const r="fixed"===n,a=Z(i),s=!!t&&Ae(t.floating);if(i===a||s&&r)return o;let l={scrollLeft:0,scrollTop:0},c=ce(1);const d=ce(0),p=G(i);if((p||!p&&!r)&&(("body"!==V(i)||q(a))&&(l=oe(i)),G(i))){const e=We(i);c=Ne(i),d.x=e.x+i.clientLeft,d.y=e.y+i.clientTop}return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-l.scrollLeft*c.x+d.x,y:o.y*c.y-l.scrollTop*c.y+d.y}},getDocumentElement:Z,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:i,strategy:n}=e;const r=[..."clippingAncestors"===o?function(e,t){const o=t.get(e);if(o)return o;let i=re(e,[],!1).filter((e=>Y(e)&&"body"!==V(e))),n=null;const r="fixed"===te(e).position;let a=r?ie(e):e;for(;Y(a)&&!ee(a);){const t=te(a),o=K(a);o||"fixed"!==t.position||(n=null),(r?!o&&!n:!o&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||q(a)&&!o&&He(e,a))?i=i.filter((e=>e!==a)):n=t,a=ie(a)}return t.set(e,i),i}(t,this._c):[].concat(o),i],a=r[0],s=r.reduce(((e,o)=>{const i=Be(t,o,n);return e.top=se(i.top,e.top),e.right=ae(i.right,e.right),e.bottom=ae(i.bottom,e.bottom),e.left=se(i.left,e.left),e}),Be(t,a,n));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:De,getElementRects:async function(e){const t=this.getOffsetParent||De,o=this.getDimensions;return{reference:Pe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await o(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=ke(e);return{width:t,height:o}},getScale:Ne,isElement:Y,isRTL:function(e){return"rtl"===te(e).direction}},Ve=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:i,placement:n}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...l}=he(e,t),c={x:o,y:i},d=await Se(t,l),p=we(ge(n)),u=me(p);let h=c[u],g=c[p];if(r){const e="y"===u?"bottom":"right";h=ue(h+d["y"===u?"top":"left"],h,h-d[e])}if(a){const e="y"===p?"bottom":"right";g=ue(g+d["y"===p?"top":"left"],g,g-d[e])}const f=s.fn({...t,[u]:h,[p]:g});return{...f,data:{x:f.x-o,y:f.y-i}}}}},Ue=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,i;const{placement:n,middlewareData:r,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:u,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:f=!0,...m}=he(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const y=ge(n),w=ge(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),b=u||(w||!f?[ve(s)]:function(e){const t=ve(e);return[be(e),t,be(t)]}(s));u||"none"===g||b.push(...function(e,t,o,i){const n=fe(e);let r=function(e,t,o){const i=["left","right"],n=["right","left"],r=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return o?t?n:i:t?i:n;case"left":case"right":return t?r:a;default:return[]}}(ge(e),"start"===o,i);return n&&(r=r.map((e=>e+"-"+n)),t&&(r=r.concat(r.map(be)))),r}(s,f,g,x));const v=[s,...b],C=await Se(t,m),z=[];let R=(null==(i=r.flip)?void 0:i.overflows)||[];if(d&&z.push(C[y]),p){const e=function(e,t,o){void 0===o&&(o=!1);const i=fe(e),n=xe(e),r=ye(n);let a="x"===n?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=ve(a)),[a,ve(a)]}(n,a,x);z.push(C[e[0]],C[e[1]])}if(R=[...R,{placement:n,overflows:z}],!z.every((e=>e<=0))){var S,_;const e=((null==(S=r.flip)?void 0:S.index)||0)+1,t=v[e];if(t)return{data:{index:e,overflows:R},reset:{placement:t}};let o=null==(_=R.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:_.placement;if(!o)switch(h){case"bestFit":{var E;const e=null==(E=R.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:E[0];e&&(o=e);break}case"initialPlacement":o=s}if(n!==o)return{reset:{placement:o}}}return{}}}},Ze=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:o,elements:i,rects:n,platform:r,strategy:a}=t,{padding:s=2,x:l,y:c}=he(e,t),d=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(i.reference))||[]),p=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),o=[];let i=null;for(let e=0;e<t.length;e++){const n=t[e];!i||n.y-i.y>i.height/2?o.push([n]):o[o.length-1].push(n),i=n}return o.map((e=>ze(_e(e))))}(d),u=ze(_e(d)),h=Ce(s);const g=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===p.length&&p[0].left>p[1].right&&null!=l&&null!=c)return p.find((e=>l>e.left-h.left&&l<e.right+h.right&&c>e.top-h.top&&c<e.bottom+h.bottom))||u;if(p.length>=2){if("y"===we(o)){const e=p[0],t=p[p.length-1],i="top"===ge(o),n=e.top,r=t.bottom,a=i?e.left:t.left,s=i?e.right:t.right;return{top:n,bottom:r,left:a,right:s,width:s-a,height:r-n,x:a,y:n}}const e="left"===ge(o),t=se(...p.map((e=>e.right))),i=ae(...p.map((e=>e.left))),n=p.filter((o=>e?o.left===i:o.right===t)),r=n[0].top,a=n[n.length-1].bottom;return{top:r,bottom:a,left:i,right:t,width:t-i,height:a-r,x:i,y:r}}return u}},floating:i.floating,strategy:a});return n.reference.x!==g.reference.x||n.reference.y!==g.reference.y||n.reference.width!==g.reference.width||n.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},Xe=(e,t,o)=>{const i=new Map,n={platform:Fe,...o},r={...n.platform,_c:i};return(async(e,t,o)=>{const{placement:i="bottom",strategy:n="absolute",middleware:r=[],platform:a}=o,s=r.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:p}=Re(c,i,l),u=i,h={},g=0;for(let o=0;o<s.length;o++){const{name:r,fn:f}=s[o],{x:m,y:y,data:w,reset:x}=await f({x:d,y:p,initialPlacement:i,placement:u,strategy:n,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});d=null!=m?m:d,p=null!=y?y:p,h={...h,[r]:{...h[r],...w}},x&&g<=50&&(g++,"object"==typeof x&&(x.placement&&(u=x.placement),x.rects&&(c=!0===x.rects?await a.getElementRects({reference:e,floating:t,strategy:n}):x.rects),({x:d,y:p}=Re(c,u,l))),o=-1)}return{x:d,y:p,placement:u,strategy:n,middlewareData:h}})(e,t,{...n,platform:r})};var Ye="undefined"!=typeof document?u:h;function Ge(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 o,i,n;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(i=o;0!=i--;)if(!Ge(e[i],t[i]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(i=o;0!=i--;)if(!{}.hasOwnProperty.call(t,n[i]))return!1;for(i=o;0!=i--;){const o=n[i];if(("_owner"!==o||!e.$$typeof)&&!Ge(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function $e(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qe(e,t){const o=$e(e);return Math.round(t*o)/o}function Je(e){const t=p.useRef(e);return Ye((()=>{t.current=e})),t}
1
+ import{useYooptaEditor as e,useYooptaPluginOptions as t,UI as o,useBlockData as i,useYooptaReadOnly as n,useBlockSelected as r,YooptaPlugin as a,generateId as s}from"@yoopta/editor";import{jsx as l,jsxs as c,Fragment as d}from"react/jsx-runtime";import*as p from"react";import{useLayoutEffect as u,useEffect as h,forwardRef as g,createElement as m,useState as f,useMemo as y}from"react";import*as w from"react-dom";import{flushSync as x,createPortal as b}from"react-dom";const v=({width:e,height:t,src:o,alt:i,fit:n,bgColor:r,layout:a="intrinsic"})=>{const s={objectFit:n||"contain",backgroundColor:r||"transparent"},c="fixed"===a,d="fill"===a,p="intrinsic"===a;return"responsive"===a&&(s.width="100%",s.height="auto"),c&&(s.width="100%",s.height="100%"),d&&(s.width="100%",s.height="100%"),p&&(s.width="100%",s.height="100%"),l("div",Object.assign({className:"yoo-image-w-full","data-layout":a},{children:o&&l("img",{src:o,width:e,height:t,alt:i||"",decoding:"async",loading:"lazy",style:s})}))};var z,C=(z=function(e,t){return z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},z(e,t)},function(e,t){function o(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),S=function(){return S=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},S.apply(this,arguments)},R={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},_={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},E={width:"20px",height:"20px",position:"absolute"},k={top:S(S({},R),{top:"-5px"}),right:S(S({},_),{left:void 0,right:"-5px"}),bottom:S(S({},R),{top:void 0,bottom:"-5px"}),left:S(S({},_),{left:"-5px"}),topRight:S(S({},E),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:S(S({},E),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:S(S({},E),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:S(S({},E),{left:"-10px",top:"-10px",cursor:"nw-resize"})},L=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return C(t,e),t.prototype.render=function(){return p.createElement("div",{className:this.props.className||"",style:S(S({position:"absolute",userSelect:"none"},k[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(p.PureComponent),O=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},e(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),N=function(){return N=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},N.apply(this,arguments)},j={width:"auto",height:"auto"},M=function(e,t,o){return Math.max(Math.min(e,o),t)},W=function(e,t){return Math.round(e/t)*t},A=function(e,t){return new RegExp(e,"i").test(t)},T=function(e){return Boolean(e.touches&&e.touches.length)},B=function(e,t,o){void 0===o&&(o=0);var i=t.reduce((function(o,i,n){return Math.abs(i-e)<Math.abs(t[o]-e)?n:o}),0),n=Math.abs(t[i]-e);return 0===o||n<o?t[i]:e},P=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},F=function(e,t,o,i){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return o*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return i*(Number(e.replace("vh",""))/100)}return e},H=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],I="__resizable_base__",D=function(e){function t(t){var o=e.call(this,t)||this;return o.ratio=1,o.resizable=null,o.parentLeft=0,o.parentTop=0,o.resizableLeft=0,o.resizableRight=0,o.resizableTop=0,o.resizableBottom=0,o.targetLeft=0,o.targetTop=0,o.appendBase=function(){if(!o.resizable||!o.window)return null;var e=o.parentNode;if(!e)return null;var t=o.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(I):t.className+=I,e.appendChild(t),t},o.removeBase=function(e){var t=o.parentNode;t&&t.removeChild(e)},o.ref=function(e){e&&(o.resizable=e)},o.state={isResizing:!1,width:void 0===(o.propsSize&&o.propsSize.width)?"auto":o.propsSize&&o.propsSize.width,height:void 0===(o.propsSize&&o.propsSize.height)?"auto":o.propsSize&&o.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},o.onResizeStart=o.onResizeStart.bind(o),o.onMouseMove=o.onMouseMove.bind(o),o.onMouseUp=o.onMouseUp.bind(o),o}return O(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||j},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,i=this.resizable.offsetHeight,n=this.resizable.style.position;"relative"!==n&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:o,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=n}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,o=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var o=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/o[t]*100+"%"}return P(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?P(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?P(t.height):o("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,o=this.parentNode.style.flexWrap;"wrap"!==o&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=o),this.removeBase(e),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var o=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==o&&"auto"!==o?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var o,i,n=this.props.boundsByDirection,r=this.state.direction,a=n&&A("left",r),s=n&&A("top",r);if("parent"===this.props.bounds){var l=this.parentNode;l&&(o=a?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),i=s?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(o=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var o=this.props.scale||1,i=this.props.resizeRatio||1,n=this.state,r=n.direction,a=n.original,s=this.props,l=s.lockAspectRatio,c=s.lockAspectRatioExtraHeight,d=s.lockAspectRatioExtraWidth,p=a.width,u=a.height,h=c||0,g=d||0;return A("right",r)&&(p=a.width+(e-a.x)*i/o,l&&(u=(p-g)/this.ratio+h)),A("left",r)&&(p=a.width-(e-a.x)*i/o,l&&(u=(p-g)/this.ratio+h)),A("bottom",r)&&(u=a.height+(t-a.y)*i/o,l&&(p=(u-h)*this.ratio+g)),A("top",r)&&(u=a.height-(t-a.y)*i/o,l&&(p=(u-h)*this.ratio+g)),{newWidth:p,newHeight:u}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,o,i){var n=this.props,r=n.lockAspectRatio,a=n.lockAspectRatioExtraHeight,s=n.lockAspectRatioExtraWidth,l=void 0===i.width?10:i.width,c=void 0===o.width||o.width<0?e:o.width,d=void 0===i.height?10:i.height,p=void 0===o.height||o.height<0?t:o.height,u=a||0,h=s||0;if(r){var g=(d-u)*this.ratio+h,m=(p-u)*this.ratio+h,f=(l-h)/this.ratio+u,y=(c-h)/this.ratio+u,w=Math.max(l,g),x=Math.min(c,m),b=Math.max(d,f),v=Math.min(p,y);e=M(e,w,x),t=M(t,b,v)}else e=M(e,l,c),t=M(t,d,p);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var i=this.resizable.getBoundingClientRect(),n=i.left,r=i.top,a=i.right,s=i.bottom;this.resizableLeft=n,this.resizableRight=a,this.resizableTop=r,this.resizableBottom=s}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var o,i=0,n=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(i=e.nativeEvent.clientX,n=e.nativeEvent.clientY):e.nativeEvent&&T(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,n=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var r=this.window.getComputedStyle(this.resizable);if("auto"!==r.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",o=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:i,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:N(N({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:o};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&T(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var o=this.props,i=o.maxWidth,n=o.maxHeight,r=o.minWidth,a=o.minHeight,s=T(e)?e.touches[0].clientX:e.clientX,l=T(e)?e.touches[0].clientY:e.clientY,c=this.state,d=c.direction,p=c.original,u=c.width,h=c.height,g=this.getParentSize(),m=function(e,t,o,i,n,r,a){return i=F(i,e.width,t,o),n=F(n,e.height,t,o),r=F(r,e.width,t,o),a=F(a,e.height,t,o),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===n?void 0:Number(n),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===a?void 0:Number(a)}}(g,this.window.innerWidth,this.window.innerHeight,i,n,r,a);i=m.maxWidth,n=m.maxHeight,r=m.minWidth,a=m.minHeight;var f=this.calculateNewSizeFromDirection(s,l),y=f.newHeight,w=f.newWidth,b=this.calculateNewMaxFromBoundary(i,n);this.props.snap&&this.props.snap.x&&(w=B(w,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(y=B(y,this.props.snap.y,this.props.snapGap));var v=this.calculateNewSizeFromAspectRatio(w,y,{width:b.maxWidth,height:b.maxHeight},{width:r,height:a});if(w=v.newWidth,y=v.newHeight,this.props.grid){var z=W(w,this.props.grid[0]),C=W(y,this.props.grid[1]),S=this.props.snapGap||0;w=0===S||Math.abs(z-w)<=S?z:w,y=0===S||Math.abs(C-y)<=S?C:y}var R={width:w-p.width,height:y-p.height};if(u&&"string"==typeof u)if(u.endsWith("%"))w=w/g.width*100+"%";else if(u.endsWith("vw")){w=w/this.window.innerWidth*100+"vw"}else if(u.endsWith("vh")){w=w/this.window.innerHeight*100+"vh"}if(h&&"string"==typeof h)if(h.endsWith("%"))y=y/g.height*100+"%";else if(h.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}var _={width:this.createSizeForCssProperty(w,"width"),height:this.createSizeForCssProperty(y,"height")};"row"===this.flexDir?_.flexBasis=_.width:"column"===this.flexDir&&(_.flexBasis=_.height),x((function(){t.setState(_)})),this.props.onResize&&this.props.onResize(e,d,this.resizable,R)}},t.prototype.onMouseUp=function(e){var t=this.state,o=t.isResizing,i=t.direction,n=t.original;if(o&&this.resizable){var r={width:this.size.width-n.width,height:this.size.height-n.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,r),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:N(N({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,o=t.enable,i=t.handleStyles,n=t.handleClasses,r=t.handleWrapperStyle,a=t.handleWrapperClass,s=t.handleComponent;if(!o)return null;var l=Object.keys(o).map((function(t){return!1!==o[t]?p.createElement(L,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:n&&n[t]},s&&s[t]?s[t]:null):null}));return p.createElement("div",{className:a,style:r},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,o){return-1!==H.indexOf(o)||(t[o]=e.props[o]),t}),{}),o=N(N(N({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return p.createElement(i,N({ref:this.ref,style:o,className:this.props.className},t),this.state.isResizing&&p.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(p.PureComponent);function V(e){return X(e)?(e.nodeName||"").toLowerCase():"#document"}function U(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Z(e){var t;return null==(t=(X(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function X(e){return e instanceof Node||e instanceof U(e).Node}function Y(e){return e instanceof Element||e instanceof U(e).Element}function G(e){return e instanceof HTMLElement||e instanceof U(e).HTMLElement}function $(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof U(e).ShadowRoot)}function q(e){const{overflow:t,overflowX:o,overflowY:i,display:n}=te(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&!["inline","contents"].includes(n)}function J(e){return["table","td","th"].includes(V(e))}function K(e){const t=Q(),o=te(e);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((e=>(o.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(o.contain||"").includes(e)))}function Q(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function ee(e){return["html","body","#document"].includes(V(e))}function te(e){return U(e).getComputedStyle(e)}function oe(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ie(e){if("html"===V(e))return e;const t=e.assignedSlot||e.parentNode||$(e)&&e.host||Z(e);return $(t)?t.host:t}function ne(e){const t=ie(e);return ee(t)?e.ownerDocument?e.ownerDocument.body:e.body:G(t)&&q(t)?t:ne(t)}function re(e,t,o){var i;void 0===t&&(t=[]),void 0===o&&(o=!0);const n=ne(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),a=U(n);return r?t.concat(a,a.visualViewport||[],q(n)?n:[],a.frameElement&&o?re(a.frameElement):[]):t.concat(n,re(n,[],o))}const ae=Math.min,se=Math.max,le=Math.round,ce=e=>({x:e,y:e}),de={left:"right",right:"left",bottom:"top",top:"bottom"},pe={start:"end",end:"start"};function ue(e,t,o){return se(e,ae(t,o))}function he(e,t){return"function"==typeof e?e(t):e}function ge(e){return e.split("-")[0]}function me(e){return e.split("-")[1]}function fe(e){return"x"===e?"y":"x"}function ye(e){return"y"===e?"height":"width"}function we(e){return["top","bottom"].includes(ge(e))?"y":"x"}function xe(e){return fe(we(e))}function be(e){return e.replace(/start|end/g,(e=>pe[e]))}function ve(e){return e.replace(/left|right|bottom|top/g,(e=>de[e]))}function ze(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 Ce(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Se(e,t,o){let{reference:i,floating:n}=e;const r=we(t),a=xe(t),s=ye(a),l=ge(t),c="y"===r,d=i.x+i.width/2-n.width/2,p=i.y+i.height/2-n.height/2,u=i[s]/2-n[s]/2;let h;switch(l){case"top":h={x:d,y:i.y-n.height};break;case"bottom":h={x:d,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:p};break;case"left":h={x:i.x-n.width,y:p};break;default:h={x:i.x,y:i.y}}switch(me(t)){case"start":h[a]-=u*(o&&c?-1:1);break;case"end":h[a]+=u*(o&&c?-1:1)}return h}async function Re(e,t){var o;void 0===t&&(t={});const{x:i,y:n,platform:r,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:u=!1,padding:h=0}=he(t,e),g=ze(h),m=s[u?"floating"===p?"reference":"floating":p],f=Ce(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(m)))||o?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),y="floating"===p?{...a.floating,x:i,y:n}:a.reference,w=await(null==r.getOffsetParent?void 0:r.getOffsetParent(s.floating)),x=await(null==r.isElement?void 0:r.isElement(w))&&await(null==r.getScale?void 0:r.getScale(w))||{x:1,y:1},b=Ce(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:w,strategy:l}):y);return{top:(f.top-b.top+g.top)/x.y,bottom:(b.bottom-f.bottom+g.bottom)/x.y,left:(f.left-b.left+g.left)/x.x,right:(b.right-f.right+g.right)/x.x}}function _e(e){const t=ae(...e.map((e=>e.left))),o=ae(...e.map((e=>e.top)));return{x:t,y:o,width:se(...e.map((e=>e.right)))-t,height:se(...e.map((e=>e.bottom)))-o}}const Ee=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,i;const{x:n,y:r,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:o,platform:i,elements:n}=e,r=await(null==i.isRTL?void 0:i.isRTL(n.floating)),a=ge(o),s=me(o),l="y"===we(o),c=["left","top"].includes(a)?-1:1,d=r&&l?-1:1,p=he(t,e);let{mainAxis:u,crossAxis:h,alignmentAxis:g}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&"number"==typeof g&&(h="end"===s?-1*g:g),l?{x:h*d,y:u*c}:{x:u*c,y:h*d}}(t,e);return a===(null==(o=s.offset)?void 0:o.placement)&&null!=(i=s.arrow)&&i.alignmentOffset?{}:{x:n+l.x,y:r+l.y,data:{...l,placement:a}}}}};function ke(e){const t=te(e);let o=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=G(e),r=n?e.offsetWidth:o,a=n?e.offsetHeight:i,s=le(o)!==r||le(i)!==a;return s&&(o=r,i=a),{width:o,height:i,$:s}}function Le(e){return Y(e)?e:e.contextElement}function Oe(e){const t=Le(e);if(!G(t))return ce(1);const o=t.getBoundingClientRect(),{width:i,height:n,$:r}=ke(t);let a=(r?le(o.width):o.width)/i,s=(r?le(o.height):o.height)/n;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Ne=ce(0);function je(e){const t=U(e);return Q()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ne}function Me(e,t,o,i){void 0===t&&(t=!1),void 0===o&&(o=!1);const n=e.getBoundingClientRect(),r=Le(e);let a=ce(1);t&&(i?Y(i)&&(a=Oe(i)):a=Oe(e));const s=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==U(e))&&t}(r,o,i)?je(r):ce(0);let l=(n.left+s.x)/a.x,c=(n.top+s.y)/a.y,d=n.width/a.x,p=n.height/a.y;if(r){const e=U(r),t=i&&Y(i)?U(i):i;let o=e,n=o.frameElement;for(;n&&i&&t!==o;){const e=Oe(n),t=n.getBoundingClientRect(),i=te(n),r=t.left+(n.clientLeft+parseFloat(i.paddingLeft))*e.x,a=t.top+(n.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,p*=e.y,l+=r,c+=a,o=U(n),n=o.frameElement}}return Ce({width:d,height:p,x:l,y:c})}const We=[":popover-open",":modal"];function Ae(e){return We.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Te(e){return Me(Z(e)).left+oe(e).scrollLeft}function Be(e,t,o){let i;if("viewport"===t)i=function(e,t){const o=U(e),i=Z(e),n=o.visualViewport;let r=i.clientWidth,a=i.clientHeight,s=0,l=0;if(n){r=n.width,a=n.height;const e=Q();(!e||e&&"fixed"===t)&&(s=n.offsetLeft,l=n.offsetTop)}return{width:r,height:a,x:s,y:l}}(e,o);else if("document"===t)i=function(e){const t=Z(e),o=oe(e),i=e.ownerDocument.body,n=se(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=se(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let a=-o.scrollLeft+Te(e);const s=-o.scrollTop;return"rtl"===te(i).direction&&(a+=se(t.clientWidth,i.clientWidth)-n),{width:n,height:r,x:a,y:s}}(Z(e));else if(Y(t))i=function(e,t){const o=Me(e,!0,"fixed"===t),i=o.top+e.clientTop,n=o.left+e.clientLeft,r=G(e)?Oe(e):ce(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:n*r.x,y:i*r.y}}(t,o);else{const o=je(e);i={...t,x:t.x-o.x,y:t.y-o.y}}return Ce(i)}function Pe(e,t){const o=ie(e);return!(o===t||!Y(o)||ee(o))&&("fixed"===te(o).position||Pe(o,t))}function Fe(e,t,o){const i=G(t),n=Z(t),r="fixed"===o,a=Me(e,!0,r,t);let s={scrollLeft:0,scrollTop:0};const l=ce(0);if(i||!i&&!r)if(("body"!==V(t)||q(n))&&(s=oe(t)),i){const e=Me(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&(l.x=Te(n));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function He(e,t){return G(e)&&"fixed"!==te(e).position?t?t(e):e.offsetParent:null}function Ie(e,t){const o=U(e);if(!G(e)||Ae(e))return o;let i=He(e,t);for(;i&&J(i)&&"static"===te(i).position;)i=He(i,t);return i&&("html"===V(i)||"body"===V(i)&&"static"===te(i).position&&!K(i))?o:i||function(e){let t=ie(e);for(;G(t)&&!ee(t);){if(K(t))return t;t=ie(t)}return null}(e)||o}const De={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:i,strategy:n}=e;const r="fixed"===n,a=Z(i),s=!!t&&Ae(t.floating);if(i===a||s&&r)return o;let l={scrollLeft:0,scrollTop:0},c=ce(1);const d=ce(0),p=G(i);if((p||!p&&!r)&&(("body"!==V(i)||q(a))&&(l=oe(i)),G(i))){const e=Me(i);c=Oe(i),d.x=e.x+i.clientLeft,d.y=e.y+i.clientTop}return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-l.scrollLeft*c.x+d.x,y:o.y*c.y-l.scrollTop*c.y+d.y}},getDocumentElement:Z,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:i,strategy:n}=e;const r=[..."clippingAncestors"===o?function(e,t){const o=t.get(e);if(o)return o;let i=re(e,[],!1).filter((e=>Y(e)&&"body"!==V(e))),n=null;const r="fixed"===te(e).position;let a=r?ie(e):e;for(;Y(a)&&!ee(a);){const t=te(a),o=K(a);o||"fixed"!==t.position||(n=null),(r?!o&&!n:!o&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||q(a)&&!o&&Pe(e,a))?i=i.filter((e=>e!==a)):n=t,a=ie(a)}return t.set(e,i),i}(t,this._c):[].concat(o),i],a=r[0],s=r.reduce(((e,o)=>{const i=Be(t,o,n);return e.top=se(i.top,e.top),e.right=ae(i.right,e.right),e.bottom=ae(i.bottom,e.bottom),e.left=se(i.left,e.left),e}),Be(t,a,n));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Ie,getElementRects:async function(e){const t=this.getOffsetParent||Ie,o=this.getDimensions;return{reference:Fe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await o(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=ke(e);return{width:t,height:o}},getScale:Oe,isElement:Y,isRTL:function(e){return"rtl"===te(e).direction}},Ve=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:i,placement:n}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...l}=he(e,t),c={x:o,y:i},d=await Re(t,l),p=we(ge(n)),u=fe(p);let h=c[u],g=c[p];if(r){const e="y"===u?"bottom":"right";h=ue(h+d["y"===u?"top":"left"],h,h-d[e])}if(a){const e="y"===p?"bottom":"right";g=ue(g+d["y"===p?"top":"left"],g,g-d[e])}const m=s.fn({...t,[u]:h,[p]:g});return{...m,data:{x:m.x-o,y:m.y-i}}}}},Ue=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,i;const{placement:n,middlewareData:r,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:u,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...f}=he(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const y=ge(n),w=ge(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),b=u||(w||!m?[ve(s)]:function(e){const t=ve(e);return[be(e),t,be(t)]}(s));u||"none"===g||b.push(...function(e,t,o,i){const n=me(e);let r=function(e,t,o){const i=["left","right"],n=["right","left"],r=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return o?t?n:i:t?i:n;case"left":case"right":return t?r:a;default:return[]}}(ge(e),"start"===o,i);return n&&(r=r.map((e=>e+"-"+n)),t&&(r=r.concat(r.map(be)))),r}(s,m,g,x));const v=[s,...b],z=await Re(t,f),C=[];let S=(null==(i=r.flip)?void 0:i.overflows)||[];if(d&&C.push(z[y]),p){const e=function(e,t,o){void 0===o&&(o=!1);const i=me(e),n=xe(e),r=ye(n);let a="x"===n?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=ve(a)),[a,ve(a)]}(n,a,x);C.push(z[e[0]],z[e[1]])}if(S=[...S,{placement:n,overflows:C}],!C.every((e=>e<=0))){var R,_;const e=((null==(R=r.flip)?void 0:R.index)||0)+1,t=v[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let o=null==(_=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:_.placement;if(!o)switch(h){case"bestFit":{var E;const e=null==(E=S.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:E[0];e&&(o=e);break}case"initialPlacement":o=s}if(n!==o)return{reset:{placement:o}}}return{}}}},Ze=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:o,elements:i,rects:n,platform:r,strategy:a}=t,{padding:s=2,x:l,y:c}=he(e,t),d=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(i.reference))||[]),p=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),o=[];let i=null;for(let e=0;e<t.length;e++){const n=t[e];!i||n.y-i.y>i.height/2?o.push([n]):o[o.length-1].push(n),i=n}return o.map((e=>Ce(_e(e))))}(d),u=Ce(_e(d)),h=ze(s);const g=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===p.length&&p[0].left>p[1].right&&null!=l&&null!=c)return p.find((e=>l>e.left-h.left&&l<e.right+h.right&&c>e.top-h.top&&c<e.bottom+h.bottom))||u;if(p.length>=2){if("y"===we(o)){const e=p[0],t=p[p.length-1],i="top"===ge(o),n=e.top,r=t.bottom,a=i?e.left:t.left,s=i?e.right:t.right;return{top:n,bottom:r,left:a,right:s,width:s-a,height:r-n,x:a,y:n}}const e="left"===ge(o),t=se(...p.map((e=>e.right))),i=ae(...p.map((e=>e.left))),n=p.filter((o=>e?o.left===i:o.right===t)),r=n[0].top,a=n[n.length-1].bottom;return{top:r,bottom:a,left:i,right:t,width:t-i,height:a-r,x:i,y:r}}return u}},floating:i.floating,strategy:a});return n.reference.x!==g.reference.x||n.reference.y!==g.reference.y||n.reference.width!==g.reference.width||n.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},Xe=(e,t,o)=>{const i=new Map,n={platform:De,...o},r={...n.platform,_c:i};return(async(e,t,o)=>{const{placement:i="bottom",strategy:n="absolute",middleware:r=[],platform:a}=o,s=r.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:p}=Se(c,i,l),u=i,h={},g=0;for(let o=0;o<s.length;o++){const{name:r,fn:m}=s[o],{x:f,y:y,data:w,reset:x}=await m({x:d,y:p,initialPlacement:i,placement:u,strategy:n,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});d=null!=f?f:d,p=null!=y?y:p,h={...h,[r]:{...h[r],...w}},x&&g<=50&&(g++,"object"==typeof x&&(x.placement&&(u=x.placement),x.rects&&(c=!0===x.rects?await a.getElementRects({reference:e,floating:t,strategy:n}):x.rects),({x:d,y:p}=Se(c,u,l))),o=-1)}return{x:d,y:p,placement:u,strategy:n,middlewareData:h}})(e,t,{...n,platform:r})};var Ye="undefined"!=typeof document?u:h;function Ge(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 o,i,n;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(i=o;0!=i--;)if(!Ge(e[i],t[i]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(i=o;0!=i--;)if(!{}.hasOwnProperty.call(t,n[i]))return!1;for(i=o;0!=i--;){const o=n[i];if(("_owner"!==o||!e.$$typeof)&&!Ge(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function $e(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qe(e,t){const o=$e(e);return Math.round(t*o)/o}function Je(e){const t=p.useRef(e);return Ye((()=>{t.current=e})),t}
2
2
  /*!
3
3
  * tabbable 6.2.0
4
4
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
5
  */
6
- var Ke=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),Qe="undefined"==typeof Element,et=Qe?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,tt=!Qe&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},ot=function e(t,o){var i;void 0===o&&(o=!0);var n=null==t||null===(i=t.getAttribute)||void 0===i?void 0:i.call(t,"inert");return""===n||"true"===n||o&&t&&e(t.parentNode)},it=function e(t,o,i){for(var n=[],r=Array.from(t);r.length;){var a=r.shift();if(!ot(a,!1))if("SLOT"===a.tagName){var s=a.assignedElements(),l=e(s.length?s:a.children,!0,i);i.flatten?n.push.apply(n,l):n.push({scopeParent:a,candidates:l})}else{et.call(a,Ke)&&i.filter(a)&&(o||!t.includes(a))&&n.push(a);var c=a.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(a),d=!ot(c,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(a));if(c&&d){var p=e(!0===c?a.children:c.children,!0,i);i.flatten?n.push.apply(n,p):n.push({scopeParent:a,candidates:p})}else r.unshift.apply(r,a.children)}}return n},nt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},rt=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,o=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===o||"true"===o}(e))&&!nt(e)?0:e.tabIndex},at=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},st=function(e){return"INPUT"===e.tagName},lt=function(e){return function(e){return st(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,o=e.form||tt(e),i=function(e){return o.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var n=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]}(t,e.form);return!n||n===e}(e)},ct=function(e){var t=e.getBoundingClientRect(),o=t.width,i=t.height;return 0===o&&0===i},dt=function(e,t){var o=t.displayCheck,i=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var n=et.call(e,"details>summary:first-of-type")?e.parentElement:e;if(et.call(n,"details:not([open]) *"))return!0;if(o&&"full"!==o&&"legacy-full"!==o){if("non-zero-area"===o)return ct(e)}else{if("function"==typeof i){for(var r=e;e;){var a=e.parentElement,s=tt(e);if(a&&!a.shadowRoot&&!0===i(a))return ct(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=r}if(function(e){var t,o,i,n,r=e&&tt(e),a=null===(t=r)||void 0===t?void 0:t.host,s=!1;if(r&&r!==e)for(s=!!(null!==(o=a)&&void 0!==o&&null!==(i=o.ownerDocument)&&void 0!==i&&i.contains(a)||null!=e&&null!==(n=e.ownerDocument)&&void 0!==n&&n.contains(e));!s&&a;){var l,c,d;s=!(null===(c=a=null===(l=r=tt(a))||void 0===l?void 0:l.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==o)return!0}return!1},pt=function(e,t){return!(t.disabled||ot(t)||function(e){return st(e)&&"hidden"===e.type}(t)||dt(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var o=0;o<t.children.length;o++){var i=t.children.item(o);if("LEGEND"===i.tagName)return!!et.call(t,"fieldset[disabled] *")||!i.contains(e)}return!0}t=t.parentElement}return!1}(t))},ut=function(e,t){return!(lt(t)||rt(t)<0||!pt(e,t))},ht=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},gt=function e(t){var o=[],i=[];return t.forEach((function(t,n){var r=!!t.scopeParent,a=r?t.scopeParent:t,s=function(e,t){var o=rt(e);return o<0&&t&&!nt(e)?0:o}(a,r),l=r?e(t.candidates):a;0===s?r?o.push.apply(o,l):o.push(a):i.push({documentOrder:n,tabIndex:s,item:t,isScope:r,content:l})})),i.sort(at).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(o)},ft=function(e,t){var o;return o=(t=t||{}).getShadowRoot?it([e],t.includeContainer,{filter:ut.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:ht}):function(e,t,o){if(ot(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Ke));return t&&et.call(e,Ke)&&i.unshift(e),i.filter(o)}(e,t.includeContainer,ut.bind(null,t)),gt(o)};const mt=p["useInsertionEffect".toString()]||(e=>e());var yt="undefined"!=typeof document?u:h;function wt(){return wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},wt.apply(this,arguments)}let xt=!1,bt=0;const vt=()=>"floating-ui-"+bt++;const Ct=p["useId".toString()]||function(){const[e,t]=p.useState((()=>xt?vt():void 0));return yt((()=>{null==e&&t(vt())}),[]),p.useEffect((()=>{xt||(xt=!0)}),[]),e};const zt=p.createContext(null),Rt=p.createContext(null);function St(e){return"data-floating-ui-"+e}const _t=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Et(e,t){const o=ft(e,_t());"prev"===t&&o.reverse();const i=o.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(o=t)||null==(o=o.shadowRoot)?void 0:o.activeElement);){var o;t=t.shadowRoot.activeElement}return t}((null==(n=e)?void 0:n.ownerDocument)||document));var n;return o.slice(i+1)[0]}function kt(e,t){const o=t||e.currentTarget,i=e.relatedTarget;return!i||!function(e,t){if(!e||!t)return!1;const o=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(o&&$(o)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}(o,i)}function Lt(e){ft(e,_t()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Nt(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const Ot={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function Mt(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const Wt=p.forwardRef((function(e,t){const[o,i]=p.useState();yt((()=>(/apple/i.test(navigator.vendor)&&i("button"),document.addEventListener("keydown",Mt),()=>{document.removeEventListener("keydown",Mt)})),[]);const n={ref:t,tabIndex:0,role:o,"aria-hidden":!o||void 0,[St("focus-guard")]:"",style:Ot};return p.createElement("span",wt({},e,n))})),jt=p.createContext(null),At=St("portal");function Tt(e){let{children:t,id:o,root:i=null,preserveTabOrder:n=!0}=e;const r=function(e){let{id:t,root:o}=void 0===e?{}:e;const[i,n]=p.useState(null),r=Ct(),a=Bt(),s=p.useRef(null);return yt((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{s.current=null}))}),[i]),yt((()=>{if(s.current)return;const e=t?document.getElementById(t):null;if(!e)return;const o=document.createElement("div");o.id=r,o.setAttribute(At,""),e.appendChild(o),s.current=o,n(o)}),[t,r]),yt((()=>{if(s.current)return;let e=o||(null==a?void 0:a.portalNode);e&&!Y(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const l=document.createElement("div");l.id=r,l.setAttribute(At,""),e=i||e,e.appendChild(l),s.current=l,n(l)}),[t,o,r,a]),i}({id:o,root:i}),[a,s]=p.useState(null),l=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(null),h=!!a&&!a.modal&&a.open&&n&&!(!i&&!r);return p.useEffect((()=>{if(r&&n&&(null==a||!a.modal))return r.addEventListener("focusin",e,!0),r.addEventListener("focusout",e,!0),()=>{r.removeEventListener("focusin",e,!0),r.removeEventListener("focusout",e,!0)};function e(e){if(r&&kt(e)){("focusin"===e.type?Nt:Lt)(r)}}}),[r,n,null==a?void 0:a.modal]),p.createElement(jt.Provider,{value:p.useMemo((()=>({preserveTabOrder:n,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:r,setFocusManagerState:s})),[n,r])},h&&r&&p.createElement(Wt,{"data-type":"outside",ref:l,onFocus:e=>{if(kt(e,r)){var t;null==(t=d.current)||t.focus()}else{const e=Et(document.body,"prev")||(null==a?void 0:a.refs.domReference.current);null==e||e.focus()}}}),h&&r&&p.createElement("span",{"aria-owns":r.id,style:Ot}),r&&b(t,r),h&&r&&p.createElement(Wt,{"data-type":"outside",ref:c,onFocus:e=>{if(kt(e,r)){var t;null==(t=u.current)||t.focus()}else{const t=Et(document.body,"next")||(null==a?void 0:a.refs.domReference.current);null==t||t.focus(),(null==a?void 0:a.closeOnFocusOut)&&(null==a||a.onOpenChange(!1,e.nativeEvent))}}}))}const Bt=()=>p.useContext(jt),Ht=new Set,Pt=p.forwardRef((function(e,t){let{lockScroll:o=!1,...i}=e;const n=Ct();return yt((()=>{if(!o)return;Ht.add(n);const e=/iP(hone|ad|od)|iOS/.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}()),t=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,a=t.left?parseFloat(t.left):window.pageXOffset,s=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",r&&(t[i]=r+"px"),e){var l,c;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,o=(null==(c=window.visualViewport)?void 0:c.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(s-Math.floor(o))+"px",left:-(a-Math.floor(e))+"px",right:"0"})}return()=>{Ht.delete(n),0===Ht.size&&(Object.assign(t,{overflow:"",[i]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s)))}}),[n,o]),p.createElement("div",wt({ref:t},i,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}}))}));function It(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:i,nodeId:n}=e,[r,a]=p.useState(null),s=(null==(t=e.elements)?void 0:t.reference)||r,l=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:i=[],platform:n,elements:{reference:r,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,u]=p.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=p.useState(i);Ge(h,i)||g(i);const[f,m]=p.useState(null),[y,x]=p.useState(null),b=p.useCallback((e=>{e!==R.current&&(R.current=e,m(e))}),[]),v=p.useCallback((e=>{e!==S.current&&(S.current=e,x(e))}),[]),C=r||f,z=a||y,R=p.useRef(null),S=p.useRef(null),_=p.useRef(d),E=null!=l,k=Je(l),L=Je(n),N=p.useCallback((()=>{if(!R.current||!S.current)return;const e={placement:t,strategy:o,middleware:h};L.current&&(e.platform=L.current),Xe(R.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};O.current&&!Ge(_.current,t)&&(_.current=t,w.flushSync((()=>{u(t)})))}))}),[h,t,o,L]);Ye((()=>{!1===c&&_.current.isPositioned&&(_.current.isPositioned=!1,u((e=>({...e,isPositioned:!1}))))}),[c]);const O=p.useRef(!1);Ye((()=>(O.current=!0,()=>{O.current=!1})),[]),Ye((()=>{if(C&&(R.current=C),z&&(S.current=z),C&&z){if(k.current)return k.current(C,z,N);N()}}),[C,z,N,k,E]);const M=p.useMemo((()=>({reference:R,floating:S,setReference:b,setFloating:v})),[b,v]),W=p.useMemo((()=>({reference:C,floating:z})),[C,z]),j=p.useMemo((()=>{const e={position:o,left:0,top:0};if(!W.floating)return e;const t=qe(W.floating,d.x),i=qe(W.floating,d.y);return s?{...e,transform:"translate("+t+"px, "+i+"px)",...$e(W.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:i}}),[o,s,W.floating,d.x,d.y]);return p.useMemo((()=>({...d,update:N,refs:M,elements:W,floatingStyles:j})),[d,N,M,W,j])}(e),c=p.useContext(Rt),d=null!=((null==(u=p.useContext(zt))?void 0:u.id)||null);var u;const h=function(e){const t=p.useRef((()=>{}));return mt((()=>{t.current=e})),p.useCallback((function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return null==t.current?void 0:t.current(...o)}),[])}(((e,t,o)=>{e&&(f.current.openEvent=t),m.emit("openchange",{open:e,event:t,reason:o,nested:d}),null==i||i(e,t,o)})),g=p.useRef(null),f=p.useRef({}),m=p.useState((()=>function(){const e=new Map;return{emit(t,o){var i;null==(i=e.get(t))||i.forEach((e=>e(o)))},on(t,o){e.set(t,[...e.get(t)||[],o])},off(t,o){var i;e.set(t,(null==(i=e.get(t))?void 0:i.filter((e=>e!==o)))||[])}}}()))[0],y=Ct(),x=p.useCallback((e=>{const t=Y(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l.refs.setReference(t)}),[l.refs]),b=p.useCallback((e=>{(Y(e)||null===e)&&(g.current=e,a(e)),(Y(l.refs.reference.current)||null===l.refs.reference.current||null!==e&&!Y(e))&&l.refs.setReference(e)}),[l.refs]),v=p.useMemo((()=>({...l.refs,setReference:b,setPositionReference:x,domReference:g})),[l.refs,b,x]),C=p.useMemo((()=>({...l.elements,domReference:s})),[l.elements,s]),z=p.useMemo((()=>({...l,refs:v,elements:C,dataRef:f,nodeId:n,floatingId:y,events:m,open:o,onOpenChange:h})),[l,n,y,m,o,h,v,C]);return yt((()=>{const e=null==c?void 0:c.nodesRef.current.find((e=>e.id===n));e&&(e.context=z)})),p.useMemo((()=>({...l,context:z,refs:v,elements:C})),[l,v,C,z])}function Dt(e,t){if(null==e)return{};var o,i,n={},r=Object.keys(e);for(i=0;i<r.length;i++)o=r[i],t.indexOf(o)>=0||(n[o]=e[o]);return n}var Ft=["color"],Vt=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=Dt(e,Ft);return f("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),f("path",{d:"M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),Ut=["color"],Zt=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=Dt(e,Ut);return f("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),f("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),Xt=["color"],Yt=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=Dt(e,Xt);return f("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),f("path",{d:"M7.81832 0.68179C7.64258 0.506054 7.35766 0.506054 7.18192 0.68179L5.18192 2.68179C5.00619 2.85753 5.00619 3.14245 5.18192 3.31819C5.35766 3.49392 5.64258 3.49392 5.81832 3.31819L7.05012 2.08638L7.05012 5.50023C7.05012 5.74876 7.25159 5.95023 7.50012 5.95023C7.74865 5.95023 7.95012 5.74876 7.95012 5.50023L7.95012 2.08638L9.18192 3.31819C9.35766 3.49392 9.64258 3.49392 9.81832 3.31819C9.99406 3.14245 9.99406 2.85753 9.81832 2.68179L7.81832 0.68179ZM7.95012 12.9136V9.50023C7.95012 9.2517 7.74865 9.05023 7.50012 9.05023C7.25159 9.05023 7.05012 9.2517 7.05012 9.50023V12.9136L5.81832 11.6818C5.64258 11.5061 5.35766 11.5061 5.18192 11.6818C5.00619 11.8575 5.00619 12.1424 5.18192 12.3182L7.18192 14.3182C7.26632 14.4026 7.38077 14.45 7.50012 14.45C7.61947 14.45 7.73393 14.4026 7.81832 14.3182L9.81832 12.3182C9.99406 12.1424 9.99406 11.8575 9.81832 11.6818C9.64258 11.5061 9.35766 11.5061 9.18192 11.6818L7.95012 12.9136ZM1.49994 7.00017C1.2238 7.00017 0.999939 7.22403 0.999939 7.50017C0.999939 7.77631 1.2238 8.00017 1.49994 8.00017L13.4999 8.00017C13.7761 8.00017 13.9999 7.77631 13.9999 7.50017C13.9999 7.22403 13.7761 7.00017 13.4999 7.00017L1.49994 7.00017Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),Gt=["color"],$t=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=Dt(e,Gt);return f("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),f("path",{d:"M11.5 3.04999C11.7485 3.04999 11.95 3.25146 11.95 3.49999V7.49999C11.95 7.74852 11.7485 7.94999 11.5 7.94999C11.2515 7.94999 11.05 7.74852 11.05 7.49999V4.58639L4.58638 11.05H7.49999C7.74852 11.05 7.94999 11.2515 7.94999 11.5C7.94999 11.7485 7.74852 11.95 7.49999 11.95L3.49999 11.95C3.38064 11.95 3.26618 11.9026 3.18179 11.8182C3.0974 11.7338 3.04999 11.6193 3.04999 11.5L3.04999 7.49999C3.04999 7.25146 3.25146 7.04999 3.49999 7.04999C3.74852 7.04999 3.94999 7.25146 3.94999 7.49999L3.94999 10.4136L10.4136 3.94999L7.49999 3.94999C7.25146 3.94999 7.04999 3.74852 7.04999 3.49999C7.04999 3.25146 7.25146 3.04999 7.49999 3.04999L11.5 3.04999Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),qt=["color"],Jt=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=Dt(e,qt);return f("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),f("path",{d:"M4.81812 4.68161C4.99386 4.85734 4.99386 5.14227 4.81812 5.318L3.08632 7.0498H11.9135L10.1817 5.318C10.006 5.14227 10.006 4.85734 10.1817 4.68161C10.3575 4.50587 10.6424 4.50587 10.8181 4.68161L13.3181 7.18161C13.4939 7.35734 13.4939 7.64227 13.3181 7.818L10.8181 10.318C10.6424 10.4937 10.3575 10.4937 10.1817 10.318C10.006 10.1423 10.006 9.85734 10.1817 9.68161L11.9135 7.9498H3.08632L4.81812 9.68161C4.99386 9.85734 4.99386 10.1423 4.81812 10.318C4.64239 10.4937 4.35746 10.4937 4.18173 10.318L1.68173 7.818C1.50599 7.64227 1.50599 7.35734 1.68173 7.18161L4.18173 4.68161C4.35746 4.50587 4.64239 4.50587 4.81812 4.68161Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}));const Kt=({blockId:t,onClose:o})=>{const i=e(),[n,r]=m(""),a=0===n.length;return c("div",Object.assign({className:"yoo-image-cursor-pointer yoo-image-user-select-none yoo-image-transition-bg yoo-image-duration-20 yoo-image-ease-in yoo-image-white-space-nowrap yoo-image-w-full"},{children:[l("input",{type:"text",placeholder:"Paste image link",value:n,className:"yoo-image-items-center yoo-image-bg-[hsla(45,13%,94%,.6)] yoo-image-rounded-[4px] yoo-image-shadow-[inset_0_0_0_1px_hsla(0,0%,6%,.1)] yoo-image-cursor-text yoo-image-flex yoo-image-text-[14px] yoo-image-h-[32px] yoo-image-leading-[20px] yoo-image-px-[6px] yoo-image-relative yoo-image-w-full yoo-image-border-none",onChange:e=>r(e.target.value)}),l("button",Object.assign({type:"button",className:"yoo-image-user-select-none yoo-image-transition-bg yoo-image-duration-20 yoo-image-ease-in yoo-image-cursor-pointer yoo-image-flex yoo-image-items-center yoo-image-justify-center yoo-image-flex-shrink-0 yoo-image-white-space-nowrap yoo-image-h-[28px] yoo-image-rounded-[4px] yoo-image-shadow-[rgba(15,15,15,0.1)_0px_0px_0px_1px_inset,_rgba(15,15,15,0.1)_0px_1px_2px] yoo-image-bg-[rgb(35,131,226)] yoo-image-text-white yoo-image-fill-white yoo-image-leading-[1.2] yoo-image-px-[12px] yoo-image-text-[14px] yoo-image-font-medium yoo-image-w-full yoo-image-max-w-[300px] yoo-image-mx-auto yoo-image-m-[12px_0_6px] disabled:yoo-image-bg-[rgba(35,131,226,0.5)] disabled:yoo-image-cursor-not-allowed",disabled:a,onClick:()=>{0!==n.length&&(i.blocks.Image.updateElement(t,"image",{src:n}),o())}},{children:"Embed image"}))]}))};function Qt(e,t,o,i){return new(o||(o=Promise))((function(n,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const eo=({accept:o="image/*",onClose:i,blockId:n,onSetLoading:r})=>{const a=t("Image"),s=e();return l("div",Object.assign({className:"yoo-image-user-select-none yoo-image-transition-bg yoo-image-duration-20 yoo-image-ease-in yoo-image-white-space-nowrap yoo-image-rounded-[4px] yoo-image-h-[32px] yoo-image-px-[12px] yoo-image-border yoo-image-border-[rgba(55,53,47,0.16)] yoo-image-w-full yoo-image-cursor-pointer"},{children:c("label",Object.assign({htmlFor:"image-uploader",className:"yoo-image-text-[14px] yoo-image-leading-[1.2] yoo-image-font-medium yoo-image-cursor-pointer yoo-image-w-full yoo-image-flex yoo-image-items-center yoo-image-justify-center yoo-image-h-full"},{children:[l("input",{type:"file",id:"image-uploader",className:"yoo-image-absolute yoo-image-left-0 yoo-image-top-0 yoo-image-invisible",accept:(null==a?void 0:a.accept)||o,onChange:e=>{const t=e.target.files[0];t&&(e=>{Qt(void 0,void 0,void 0,(function*(){if(null==a?void 0:a.onUpload){i(),r(!0);try{const t=yield null==a?void 0:a.onUpload(e);s.blocks.Image.updateElement(n,"image",{src:t.src,alt:t.alt,sizes:t.sizes,bgColor:t.bgColor,fit:"contain"})}catch(e){}finally{r(!1)}}else console.warn("onUpload not provided")}))})(t)},multiple:!1}),"Upload image"]}))}))},to=({floatingStyles:e,refs:t,onClose:o,blockId:i,onSetLoading:n})=>{const[r,a]=m("upload"),s=e=>a(e),d="upload"===r,p="embed"===r,u=e=>({borderBottom:e?"2px solid #2483e2":"2px solid transparent"});return l(Tt,Object.assign({id:"yoo-image-uploader-portal",root:document.getElementById("yoopta-editor")},{children:l(Pt,Object.assign({lockScroll:!0,className:"yoo-image-z-[100]",onClick:o},{children:l("div",Object.assign({ref:t.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:c("div",Object.assign({className:"yoo-image-flex yoo-image-flex-col yoo-image-min-w-[540px] yoo-image-max-w-[calc(100vw-24px)] yoo-image-h-full yoo-image-max-h-[420px] yoo-image-bg-white yoo-image-shadow-[rgb(15_15_15_/5%)_0px_0px_0px_1px,_rgb(15_15_15_/10%)_0px_3px_6px,_rgb(15_15_15_/20%)_0px_9px_24px]"},{children:[c("div",Object.assign({className:"yoo-image-w-full yoo-image-flex yoo-image-text-[14px] yoo-image-p-[0_8px] yoo-image-shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] yoo-image-relative yoo-image-z-10 yoo-image-h-[40px]"},{children:[l("button",Object.assign({type:"button",onClick:()=>s("upload"),style:u(d),className:"yoo-image-py-[6px] yoo-image-whitespace-nowrap yoo-image-min-w-0 yoo-image-flex-shrink-0 yoo-image-text-[rgb(55,53,47)] yoo-image-relative yoo-image-cursor-pointer yoo-image-user-select-none yoo-image-bg-inherit yoo-image-transition-[height_20ms_ease-in] yoo-image-inline-flex yoo-image-items-center yoo-image-h-full yoo-image-text-[14px] yoo-image-leading-[1.2] yoo-image-px-[8px]"},{children:"Upload"})),l("button",Object.assign({type:"button",onClick:()=>s("embed"),style:u(p),className:"yoo-image-py-[6px] yoo-image-whitespace-nowrap yoo-image-min-w-0 yoo-image-flex-shrink-0 yoo-image-text-[rgb(55,53,47)] yoo-image-relative yoo-image-cursor-pointer yoo-image-user-select-none yoo-image-bg-inherit yoo-image-transition-[height_20ms_ease-in] yoo-image-inline-flex yoo-image-items-center yoo-image-h-full yoo-image-text-[14px] yoo-image-leading-[1.2] yoo-image-px-[8px]"},{children:"Image link"}))]})),c("div",Object.assign({className:"yoo-image-pt-[6px] yoo-image-pb-[6px] yoo-image-mt-[4px] yoo-image-flex yoo-image-justify-center yoo-image-mr-[12px] yoo-image-ml-[12px]"},{children:[p&&l(Kt,{onClose:o,blockId:i}),d&&l(eo,{onClose:o,blockId:i,onSetLoading:n})]}))]}))}))}))}))},oo=({className:e,width:t,height:o,children:i})=>c("div",Object.assign({className:e},{children:[i,l("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:t,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-2 yoo-image-h-4 yoo-image-w-4 yoo-image-animate-spin"},{children:l("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}))]})),io=({attributes:e,children:t,blockId:o})=>{const[i,n]=m(!1),[r,a]=m(!1),{refs:s,floatingStyles:d}=It({placement:"bottom",open:i,onOpenChange:n,middleware:[Ze(),Ue(),Ve(),Ee(10)]});return c("div",Object.assign({className:"yoo-image-w-full yoo-image-user-select-none yoo-image-m-[20px_0_10px] yoo-image-relative yoo-image-flex"},e,{contentEditable:!1},{children:[c("button",Object.assign({className:"yoo-image-p-[12px_36px_12px_12px] yoo-image-flex yoo-image-items-center yoo-image-text-left yoo-image-w-full yoo-image-overflow-hidden yoo-image-rounded-[3px] yoo-image-text-[14px] yoo-image-text-[rgba(55,53,47,0.65)] yoo-image-relative yoo-image-cursor-pointer yoo-image-border-none yoo-image-bg-[#efefef] yoo-image-transition-[background-color_100ms_ease-in] hover:yoo-image-bg-[#e3e3e3]",onClick:()=>n(!0),disabled:r,ref:s.setReference},{children:[l(r?oo:Zt,{className:"yoo-image-mr-2 yoo-image-user-select-none",width:24,height:24}),l("span",Object.assign({className:"yoo-image-font-medium"},{children:r?"Loading...":"Click to add image"})),r&&l("div",{className:"yoo-image-absolute yoo-image-top-0 yoo-image-left-0 yoo-image-h-full yoo-image-bg-[rgba(55,53,47,0.16)]",style:{width:"100%",transition:"width 100ms ease-in"}})]})),i&&l(to,{blockId:o,floatingStyles:d,refs:s,onClose:()=>n(!1),onSetLoading:e=>a(e)}),t]}))},{ExtendedBlockActions:no,BlockOptionsMenuGroup:ro,BlockOptionsMenuItem:ao,BlockOptionsSeparator:so}=o,lo=({editor:e,block:t,props:o})=>c(no,Object.assign({onClick:()=>e.setSelection([t.meta.order]),className:"yoopta-image-options"},{children:[l(so,{}),c(ro,{children:[l(ao,{children:c("button",Object.assign({type:"button",className:"yoo-image-rounded-sm hover:yoo-image-bg-[#37352f14] yoo-image-leading-[120%] yoo-image-px-2 yoo-image-py-1.5 yoo-image-mx-[4px] yoo-image-cursor-pointer yoo-image-w-full yoo-image-flex yoo-image-justify-start",onClick:()=>{e.blocks.Image.updateElement(t.id,"image",{fit:"contain"})}},{children:[l(Yt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Fit"]}))}),l(ao,{children:c("button",Object.assign({type:"button",className:"yoo-image-rounded-sm hover:yoo-image-bg-[#37352f14] yoo-image-leading-[120%] yoo-image-px-2 yoo-image-py-1.5 yoo-image-mx-[4px] yoo-image-cursor-pointer yoo-image-w-full yoo-image-flex yoo-image-justify-start",onClick:()=>{e.blocks.Image.updateElement(t.id,"image",{fit:"fill"})}},{children:[l(Jt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Fill"]}))}),l(ao,{children:c("button",Object.assign({type:"button",className:"yoo-image-rounded-sm hover:yoo-image-bg-[#37352f14] yoo-image-leading-[120%] yoo-image-px-2 yoo-image-py-1.5 yoo-image-mx-[4px] yoo-image-cursor-pointer yoo-image-w-full yoo-image-flex yoo-image-justify-start",onClick:()=>{e.blocks.Image.updateElement(t.id,"image",{fit:"cover"})}},{children:[l($t,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Cover"]}))})]}),l(so,{}),l(ro,{children:l(ao,{children:c("button",Object.assign({type:"button",className:"yoo-image-rounded-sm hover:yoo-image-bg-[#37352f14] yoo-image-leading-[120%] yoo-image-px-2 yoo-image-py-1.5 yoo-image-mx-[4px] yoo-image-cursor-pointer yoo-image-w-full yoo-image-flex yoo-image-justify-start",onClick:()=>{if(!o||!o.src)return;const e=document.createElement("a");e.href=o.src,e.download=o.alt||o.src,e.target="_blank",e.rel="noopener noreferrer",document.body.appendChild(e),e.click(),document.body.removeChild(e)}},{children:[l(Vt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Download"]}))})})]})),co=({position:e})=>l("div",Object.assign({contentEditable:!1,className:"yoo-image-absolute yoo-image-pointer-events-none yoo-image-flex yoo-image-items-center yoo-image-justify-center yoo-image-z-10 yoo-image-opacity-1 yoo-image-h-full yoo-image-w-[15px] yoo-image-cursor-col-resize yoo-image-transition-opacity yoo-image-duration-150 yoo-image-ease-in "+("left"===e?"yoo-image-left-0 yoo-image-top-0":"yoo-image-right-0 yoo-image-top-0")},{children:l("div",{className:"yoo-image-opacity-100 yoo-image-transition-opacity yoo-image-duration-300 yoo-image-ease-in yoo-image-rounded-[20px] yoo-image-bg-[rgba(15,15,15,0.6)] yoo-image-border yoo-image-border-[rgba(255,255,255,0.9)] yoo-image-w-[6px] yoo-image-h-[48px] yoo-image-max-h-[50%] yoo-image-shadow-[0_0_0_.5px_#FFF]"})})),po=new a({type:"Image",elements:{image:{render:({element:o,attributes:a,children:s,blockId:p})=>{const{src:u,alt:g,srcSet:f,bgColor:w,fit:x,sizes:b}=o.props||{},C=i(p),z=e(),R=n(),S=t("Image"),[_,E]=m({width:(null==b?void 0:b.width)||650,height:(null==b?void 0:b.height)||440});h((()=>E({width:(null==b?void 0:b.width)||650,height:(null==b?void 0:b.height)||440})),[o.props]);const k=r({blockId:p}),L=y((()=>{var e,t;return{minWidth:300,size:{width:_.width,height:_.height},maxWidth:(null===(e=null==S?void 0:S.maxSizes)||void 0===e?void 0:e.maxWidth)||800,maxHeight:(null===(t=null==S?void 0:S.maxSizes)||void 0===t?void 0:t.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!R,right:!R},handleStyles:{left:{left:0},right:{right:0}},onResize:(e,t,o)=>{R||E({width:o.offsetWidth,height:o.offsetHeight})},onResizeStop:(e,t,o)=>{R||z.blocks.Image.updateElement(p,"image",{sizes:{width:o.offsetWidth,height:o.offsetHeight}})},handleComponent:{left:R?l(d,{}):l(co,{position:"left"}),right:R?l(d,{}):l(co,{position:"right"})}}}),[_.width,_.height]);return u?l("div",Object.assign({"data-element-type":o.type,contentEditable:!1,draggable:!1,className:"yoo-image-mt-4 yoo-image-relative yoopta-image"},a,{children:c(F,Object.assign({},L,{className:"yoo-image-mx-auto yoo-image-my-0 yoo-image-flex"},{children:[k&&l("div",{className:"yoo-image-absolute yoo-image-pointer-events-none yoo-image-inset-0 yoo-image-bg-[rgba(35,131,226,0.14)] yoo-image-z-[81] yoo-image-rounded-[3px] yoo-image-opacity-100 yoo-image-transition-opacity yoo-image-duration-150 yoo-image-ease-in"}),l(v,{src:u,alt:g,srcSet:f,fit:x,width:null==_?void 0:_.width,bgColor:w,height:null==_?void 0:_.height}),!R&&l(lo,{block:C,editor:z,props:o.props}),s]}))})):R?null:l(io,Object.assign({attributes:a,blockId:p},{children:s}))},props:{src:null,alt:null,srcSet:null,bgColor:null,fit:"contain",sizes:{width:650,height:500},nodeType:"void"}}},options:{display:{title:"Image",description:"Upload from device or embed with link"},onUpload:()=>Promise.resolve({src:null,alt:null}),accept:"image/png, image/jpeg, image/gif, image/webp",maxSizes:{maxWidth:650,maxHeight:550}},parsers:{html:{deserialize:{nodeNames:["IMG"],parse:e=>{if("IMG"===e.nodeName){const t={src:e.getAttribute("src")||"",alt:e.getAttribute("alt")||"",srcSet:e.getAttribute("srcset")||"",sizes:{width:e.getAttribute("width")?parseInt(e.getAttribute("width")||"650",10):650,height:e.getAttribute("height")?parseInt(e.getAttribute("height")||"500",10):500}};return{id:s(),type:"image",children:[{text:""}],props:t}}}}}}});!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("#yoopta-editor .yoo-image-pointer-events-none{pointer-events:none}#yoopta-editor .yoo-image-invisible{visibility:hidden}#yoopta-editor .yoo-image-absolute{position:absolute}#yoopta-editor .yoo-image-relative{position:relative}#yoopta-editor .yoo-image-inset-0{inset:0}#yoopta-editor .yoo-image-left-0{left:0}#yoopta-editor .yoo-image-right-0{right:0}#yoopta-editor .yoo-image-top-0{top:0}#yoopta-editor .yoo-image-z-10{z-index:10}#yoopta-editor .yoo-image-z-\\[100\\]{z-index:100}#yoopta-editor .yoo-image-z-\\[81\\]{z-index:81}#yoopta-editor .yoo-image-m-\\[12px_0_6px\\]{margin:12px 0 6px}#yoopta-editor .yoo-image-m-\\[20px_0_10px\\]{margin:20px 0 10px}#yoopta-editor .yoo-image-mx-\\[4px\\]{margin-left:4px;margin-right:4px}#yoopta-editor .yoo-image-mx-auto{margin-left:auto;margin-right:auto}#yoopta-editor .yoo-image-my-0{margin-bottom:0;margin-top:0}#yoopta-editor .yoo-image-ml-\\[12px\\]{margin-left:12px}#yoopta-editor .yoo-image-mr-2{margin-right:.5rem}#yoopta-editor .yoo-image-mr-\\[12px\\]{margin-right:12px}#yoopta-editor .yoo-image-mt-4{margin-top:1rem}#yoopta-editor .yoo-image-mt-\\[4px\\]{margin-top:4px}#yoopta-editor .yoo-image-flex{display:flex}#yoopta-editor .yoo-image-inline-flex{display:inline-flex}#yoopta-editor .yoo-image-h-4{height:1rem}#yoopta-editor .yoo-image-h-\\[28px\\]{height:28px}#yoopta-editor .yoo-image-h-\\[32px\\]{height:32px}#yoopta-editor .yoo-image-h-\\[40px\\]{height:40px}#yoopta-editor .yoo-image-h-\\[48px\\]{height:48px}#yoopta-editor .yoo-image-h-full{height:100%}#yoopta-editor .yoo-image-max-h-\\[420px\\]{max-height:420px}#yoopta-editor .yoo-image-max-h-\\[50\\%\\]{max-height:50%}#yoopta-editor .yoo-image-w-4{width:1rem}#yoopta-editor .yoo-image-w-\\[15px\\]{width:15px}#yoopta-editor .yoo-image-w-\\[6px\\]{width:6px}#yoopta-editor .yoo-image-w-full{width:100%}#yoopta-editor .yoo-image-min-w-0{min-width:0}#yoopta-editor .yoo-image-min-w-\\[540px\\]{min-width:540px}#yoopta-editor .yoo-image-max-w-\\[300px\\]{max-width:300px}#yoopta-editor .yoo-image-max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}#yoopta-editor .yoo-image-flex-shrink-0{flex-shrink:0}@keyframes yoo-image-spin{#yoopta-editor to{transform:rotate(1turn)}}#yoopta-editor .yoo-image-animate-spin{animation:yoo-image-spin 1s linear infinite}#yoopta-editor .yoo-image-cursor-col-resize{cursor:col-resize}#yoopta-editor .yoo-image-cursor-pointer{cursor:pointer}#yoopta-editor .yoo-image-cursor-text{cursor:text}#yoopta-editor .yoo-image-flex-col{flex-direction:column}#yoopta-editor .yoo-image-items-center{align-items:center}#yoopta-editor .yoo-image-justify-start{justify-content:flex-start}#yoopta-editor .yoo-image-justify-center{justify-content:center}#yoopta-editor .yoo-image-overflow-hidden{overflow:hidden}#yoopta-editor .yoo-image-whitespace-nowrap{white-space:nowrap}#yoopta-editor .yoo-image-rounded-\\[20px\\]{border-radius:20px}#yoopta-editor .yoo-image-rounded-\\[3px\\]{border-radius:3px}#yoopta-editor .yoo-image-rounded-\\[4px\\]{border-radius:4px}#yoopta-editor .yoo-image-rounded-sm{border-radius:.125rem}#yoopta-editor .yoo-image-border{border-width:1px}#yoopta-editor .yoo-image-border-none{border-style:none}#yoopta-editor .yoo-image-border-\\[rgba\\(255\\,255\\,255\\,0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}#yoopta-editor .yoo-image-border-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{border-color:rgba(55,53,47,.16)}#yoopta-editor .yoo-image-bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}#yoopta-editor .yoo-image-bg-\\[hsla\\(45\\,13\\%\\,94\\%\\,\\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}#yoopta-editor .yoo-image-bg-\\[rgb\\(35\\,131\\,226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}#yoopta-editor .yoo-image-bg-\\[rgba\\(15\\,15\\,15\\,0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}#yoopta-editor .yoo-image-bg-\\[rgba\\(35\\,131\\,226\\,0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}#yoopta-editor .yoo-image-bg-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{background-color:rgba(55,53,47,.16)}#yoopta-editor .yoo-image-bg-inherit{background-color:inherit}#yoopta-editor .yoo-image-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}#yoopta-editor .yoo-image-fill-white{fill:#fff}#yoopta-editor .yoo-image-p-\\[0_8px\\]{padding:0 8px}#yoopta-editor .yoo-image-p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}#yoopta-editor .yoo-image-px-2{padding-left:.5rem;padding-right:.5rem}#yoopta-editor .yoo-image-px-\\[12px\\]{padding-left:12px;padding-right:12px}#yoopta-editor .yoo-image-px-\\[6px\\]{padding-left:6px;padding-right:6px}#yoopta-editor .yoo-image-px-\\[8px\\]{padding-left:8px;padding-right:8px}#yoopta-editor .yoo-image-py-1{padding-bottom:.25rem;padding-top:.25rem}#yoopta-editor .yoo-image-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}#yoopta-editor .yoo-image-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}#yoopta-editor .yoo-image-pb-\\[6px\\]{padding-bottom:6px}#yoopta-editor .yoo-image-pt-\\[6px\\]{padding-top:6px}#yoopta-editor .yoo-image-text-left{text-align:left}#yoopta-editor .yoo-image-text-\\[14px\\]{font-size:14px}#yoopta-editor .yoo-image-font-medium{font-weight:500}#yoopta-editor .yoo-image-leading-\\[1\\.2\\]{line-height:1.2}#yoopta-editor .yoo-image-leading-\\[120\\%\\]{line-height:120%}#yoopta-editor .yoo-image-leading-\\[20px\\]{line-height:20px}#yoopta-editor .yoo-image-text-\\[rgb\\(55\\,53\\,47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}#yoopta-editor .yoo-image-text-\\[rgba\\(55\\,53\\,47\\,0\\.65\\)\\]{color:rgba(55,53,47,.65)}#yoopta-editor .yoo-image-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}#yoopta-editor .yoo-image-opacity-100{opacity:1}#yoopta-editor .yoo-image-shadow-\\[0_0_0_\\.5px_\\#FFF\\]{--tw-shadow:0 0 0 .5px #fff;--tw-shadow-colored:0 0 0 .5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-image-shadow-\\[inset_0_0_0_1px_hsla\\(0\\,0\\%\\,6\\%\\,\\.1\\)\\]{--tw-shadow:inset 0 0 0 1px hsla(0,0%,6%,.1);--tw-shadow-colored:inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-image-shadow-\\[rgb\\(15_15_15_\\/5\\%\\)_0px_0px_0px_1px\\,_rgb\\(15_15_15_\\/10\\%\\)_0px_3px_6px\\,_rgb\\(15_15_15_\\/20\\%\\)_0px_9px_24px\\]{--tw-shadow:rgb(15 15 15/5%) 0px 0px 0px 1px,hsla(0,0%,6%,.1) 0px 3px 6px,hsla(0,0%,6%,.2) 0px 9px 24px;--tw-shadow-colored:0px 0px 0px 1px var(--tw-shadow-color),0px 3px 6px var(--tw-shadow-color),0px 9px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-image-shadow-\\[rgb\\(55_53_47_\\/9\\%\\)_0px_-1px_0px_inset\\]{--tw-shadow:rgb(55 53 47/9%) 0px -1px 0px inset;--tw-shadow-colored:inset 0px -1px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-image-shadow-\\[rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_0px_0px_1px_inset\\,_rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_1px_2px\\]{--tw-shadow:hsla(0,0%,6%,.1) 0px 0px 0px 1px inset,hsla(0,0%,6%,.1) 0px 1px 2px;--tw-shadow-colored:inset 0px 0px 0px 1px var(--tw-shadow-color),0px 1px 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)}#yoopta-editor .yoo-image-transition-\\[background-color_100ms_ease-in\\]{transition-duration:.15s;transition-property:background-color .1s ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}#yoopta-editor .yoo-image-transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}#yoopta-editor .yoo-image-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}#yoopta-editor .yoo-image-duration-150{transition-duration:.15s}#yoopta-editor .yoo-image-duration-300{transition-duration:.3s}#yoopta-editor .yoo-image-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}#yoopta-editor .yoopta-image .yoopta-image-options{opacity:0;transition:opacity .15s ease-in-out}#yoopta-editor .yoopta-image:hover .yoopta-image-options{opacity:1}#yoopta-editor .hover\\:yoo-image-bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}#yoopta-editor .hover\\:yoo-image-bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}#yoopta-editor .disabled\\:yoo-image-cursor-not-allowed:disabled{cursor:not-allowed}#yoopta-editor .disabled\\:yoo-image-bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}");export{po as default};
6
+ var Ke=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),Qe="undefined"==typeof Element,et=Qe?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,tt=!Qe&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},ot=function e(t,o){var i;void 0===o&&(o=!0);var n=null==t||null===(i=t.getAttribute)||void 0===i?void 0:i.call(t,"inert");return""===n||"true"===n||o&&t&&e(t.parentNode)},it=function e(t,o,i){for(var n=[],r=Array.from(t);r.length;){var a=r.shift();if(!ot(a,!1))if("SLOT"===a.tagName){var s=a.assignedElements(),l=e(s.length?s:a.children,!0,i);i.flatten?n.push.apply(n,l):n.push({scopeParent:a,candidates:l})}else{et.call(a,Ke)&&i.filter(a)&&(o||!t.includes(a))&&n.push(a);var c=a.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(a),d=!ot(c,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(a));if(c&&d){var p=e(!0===c?a.children:c.children,!0,i);i.flatten?n.push.apply(n,p):n.push({scopeParent:a,candidates:p})}else r.unshift.apply(r,a.children)}}return n},nt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},rt=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,o=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===o||"true"===o}(e))&&!nt(e)?0:e.tabIndex},at=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},st=function(e){return"INPUT"===e.tagName},lt=function(e){return function(e){return st(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,o=e.form||tt(e),i=function(e){return o.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var n=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]}(t,e.form);return!n||n===e}(e)},ct=function(e){var t=e.getBoundingClientRect(),o=t.width,i=t.height;return 0===o&&0===i},dt=function(e,t){var o=t.displayCheck,i=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var n=et.call(e,"details>summary:first-of-type")?e.parentElement:e;if(et.call(n,"details:not([open]) *"))return!0;if(o&&"full"!==o&&"legacy-full"!==o){if("non-zero-area"===o)return ct(e)}else{if("function"==typeof i){for(var r=e;e;){var a=e.parentElement,s=tt(e);if(a&&!a.shadowRoot&&!0===i(a))return ct(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=r}if(function(e){var t,o,i,n,r=e&&tt(e),a=null===(t=r)||void 0===t?void 0:t.host,s=!1;if(r&&r!==e)for(s=!!(null!==(o=a)&&void 0!==o&&null!==(i=o.ownerDocument)&&void 0!==i&&i.contains(a)||null!=e&&null!==(n=e.ownerDocument)&&void 0!==n&&n.contains(e));!s&&a;){var l,c,d;s=!(null===(c=a=null===(l=r=tt(a))||void 0===l?void 0:l.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==o)return!0}return!1},pt=function(e,t){return!(t.disabled||ot(t)||function(e){return st(e)&&"hidden"===e.type}(t)||dt(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var o=0;o<t.children.length;o++){var i=t.children.item(o);if("LEGEND"===i.tagName)return!!et.call(t,"fieldset[disabled] *")||!i.contains(e)}return!0}t=t.parentElement}return!1}(t))},ut=function(e,t){return!(lt(t)||rt(t)<0||!pt(e,t))},ht=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},gt=function e(t){var o=[],i=[];return t.forEach((function(t,n){var r=!!t.scopeParent,a=r?t.scopeParent:t,s=function(e,t){var o=rt(e);return o<0&&t&&!nt(e)?0:o}(a,r),l=r?e(t.candidates):a;0===s?r?o.push.apply(o,l):o.push(a):i.push({documentOrder:n,tabIndex:s,item:t,isScope:r,content:l})})),i.sort(at).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(o)},mt=function(e,t){var o;return o=(t=t||{}).getShadowRoot?it([e],t.includeContainer,{filter:ut.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:ht}):function(e,t,o){if(ot(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Ke));return t&&et.call(e,Ke)&&i.unshift(e),i.filter(o)}(e,t.includeContainer,ut.bind(null,t)),gt(o)};const ft=p["useInsertionEffect".toString()]||(e=>e());var yt="undefined"!=typeof document?u:h;function wt(){return wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},wt.apply(this,arguments)}let xt=!1,bt=0;const vt=()=>"floating-ui-"+bt++;const zt=p["useId".toString()]||function(){const[e,t]=p.useState((()=>xt?vt():void 0));return yt((()=>{null==e&&t(vt())}),[]),p.useEffect((()=>{xt||(xt=!0)}),[]),e};const Ct=p.createContext(null),St=p.createContext(null);function Rt(e){return"data-floating-ui-"+e}const _t=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Et(e,t){const o=mt(e,_t());"prev"===t&&o.reverse();const i=o.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(o=t)||null==(o=o.shadowRoot)?void 0:o.activeElement);){var o;t=t.shadowRoot.activeElement}return t}((null==(n=e)?void 0:n.ownerDocument)||document));var n;return o.slice(i+1)[0]}function kt(e,t){const o=t||e.currentTarget,i=e.relatedTarget;return!i||!function(e,t){if(!e||!t)return!1;const o=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(o&&$(o)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}(o,i)}function Lt(e){mt(e,_t()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Ot(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const Nt={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function jt(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const Mt=p.forwardRef((function(e,t){const[o,i]=p.useState();yt((()=>(/apple/i.test(navigator.vendor)&&i("button"),document.addEventListener("keydown",jt),()=>{document.removeEventListener("keydown",jt)})),[]);const n={ref:t,tabIndex:0,role:o,"aria-hidden":!o||void 0,[Rt("focus-guard")]:"",style:Nt};return p.createElement("span",wt({},e,n))})),Wt=p.createContext(null),At=Rt("portal");function Tt(e){let{children:t,id:o,root:i=null,preserveTabOrder:n=!0}=e;const r=function(e){let{id:t,root:o}=void 0===e?{}:e;const[i,n]=p.useState(null),r=zt(),a=Bt(),s=p.useRef(null);return yt((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{s.current=null}))}),[i]),yt((()=>{if(s.current)return;const e=t?document.getElementById(t):null;if(!e)return;const o=document.createElement("div");o.id=r,o.setAttribute(At,""),e.appendChild(o),s.current=o,n(o)}),[t,r]),yt((()=>{if(s.current)return;let e=o||(null==a?void 0:a.portalNode);e&&!Y(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const l=document.createElement("div");l.id=r,l.setAttribute(At,""),e=i||e,e.appendChild(l),s.current=l,n(l)}),[t,o,r,a]),i}({id:o,root:i}),[a,s]=p.useState(null),l=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(null),h=!!a&&!a.modal&&a.open&&n&&!(!i&&!r);return p.useEffect((()=>{if(r&&n&&(null==a||!a.modal))return r.addEventListener("focusin",e,!0),r.addEventListener("focusout",e,!0),()=>{r.removeEventListener("focusin",e,!0),r.removeEventListener("focusout",e,!0)};function e(e){if(r&&kt(e)){("focusin"===e.type?Ot:Lt)(r)}}}),[r,n,null==a?void 0:a.modal]),p.createElement(Wt.Provider,{value:p.useMemo((()=>({preserveTabOrder:n,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:r,setFocusManagerState:s})),[n,r])},h&&r&&p.createElement(Mt,{"data-type":"outside",ref:l,onFocus:e=>{if(kt(e,r)){var t;null==(t=d.current)||t.focus()}else{const e=Et(document.body,"prev")||(null==a?void 0:a.refs.domReference.current);null==e||e.focus()}}}),h&&r&&p.createElement("span",{"aria-owns":r.id,style:Nt}),r&&b(t,r),h&&r&&p.createElement(Mt,{"data-type":"outside",ref:c,onFocus:e=>{if(kt(e,r)){var t;null==(t=u.current)||t.focus()}else{const t=Et(document.body,"next")||(null==a?void 0:a.refs.domReference.current);null==t||t.focus(),(null==a?void 0:a.closeOnFocusOut)&&(null==a||a.onOpenChange(!1,e.nativeEvent))}}}))}const Bt=()=>p.useContext(Wt),Pt=new Set,Ft=p.forwardRef((function(e,t){let{lockScroll:o=!1,...i}=e;const n=zt();return yt((()=>{if(!o)return;Pt.add(n);const e=/iP(hone|ad|od)|iOS/.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}()),t=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,a=t.left?parseFloat(t.left):window.pageXOffset,s=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",r&&(t[i]=r+"px"),e){var l,c;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,o=(null==(c=window.visualViewport)?void 0:c.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(s-Math.floor(o))+"px",left:-(a-Math.floor(e))+"px",right:"0"})}return()=>{Pt.delete(n),0===Pt.size&&(Object.assign(t,{overflow:"",[i]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s)))}}),[n,o]),p.createElement("div",wt({ref:t},i,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}}))}));function Ht(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:i,nodeId:n}=e,[r,a]=p.useState(null),s=(null==(t=e.elements)?void 0:t.reference)||r,l=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:i=[],platform:n,elements:{reference:r,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,u]=p.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=p.useState(i);Ge(h,i)||g(i);const[m,f]=p.useState(null),[y,x]=p.useState(null),b=p.useCallback((e=>{e!==S.current&&(S.current=e,f(e))}),[]),v=p.useCallback((e=>{e!==R.current&&(R.current=e,x(e))}),[]),z=r||m,C=a||y,S=p.useRef(null),R=p.useRef(null),_=p.useRef(d),E=null!=l,k=Je(l),L=Je(n),O=p.useCallback((()=>{if(!S.current||!R.current)return;const e={placement:t,strategy:o,middleware:h};L.current&&(e.platform=L.current),Xe(S.current,R.current,e).then((e=>{const t={...e,isPositioned:!0};N.current&&!Ge(_.current,t)&&(_.current=t,w.flushSync((()=>{u(t)})))}))}),[h,t,o,L]);Ye((()=>{!1===c&&_.current.isPositioned&&(_.current.isPositioned=!1,u((e=>({...e,isPositioned:!1}))))}),[c]);const N=p.useRef(!1);Ye((()=>(N.current=!0,()=>{N.current=!1})),[]),Ye((()=>{if(z&&(S.current=z),C&&(R.current=C),z&&C){if(k.current)return k.current(z,C,O);O()}}),[z,C,O,k,E]);const j=p.useMemo((()=>({reference:S,floating:R,setReference:b,setFloating:v})),[b,v]),M=p.useMemo((()=>({reference:z,floating:C})),[z,C]),W=p.useMemo((()=>{const e={position:o,left:0,top:0};if(!M.floating)return e;const t=qe(M.floating,d.x),i=qe(M.floating,d.y);return s?{...e,transform:"translate("+t+"px, "+i+"px)",...$e(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:i}}),[o,s,M.floating,d.x,d.y]);return p.useMemo((()=>({...d,update:O,refs:j,elements:M,floatingStyles:W})),[d,O,j,M,W])}(e),c=p.useContext(St),d=null!=((null==(u=p.useContext(Ct))?void 0:u.id)||null);var u;const h=function(e){const t=p.useRef((()=>{}));return ft((()=>{t.current=e})),p.useCallback((function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return null==t.current?void 0:t.current(...o)}),[])}(((e,t,o)=>{e&&(m.current.openEvent=t),f.emit("openchange",{open:e,event:t,reason:o,nested:d}),null==i||i(e,t,o)})),g=p.useRef(null),m=p.useRef({}),f=p.useState((()=>function(){const e=new Map;return{emit(t,o){var i;null==(i=e.get(t))||i.forEach((e=>e(o)))},on(t,o){e.set(t,[...e.get(t)||[],o])},off(t,o){var i;e.set(t,(null==(i=e.get(t))?void 0:i.filter((e=>e!==o)))||[])}}}()))[0],y=zt(),x=p.useCallback((e=>{const t=Y(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l.refs.setReference(t)}),[l.refs]),b=p.useCallback((e=>{(Y(e)||null===e)&&(g.current=e,a(e)),(Y(l.refs.reference.current)||null===l.refs.reference.current||null!==e&&!Y(e))&&l.refs.setReference(e)}),[l.refs]),v=p.useMemo((()=>({...l.refs,setReference:b,setPositionReference:x,domReference:g})),[l.refs,b,x]),z=p.useMemo((()=>({...l.elements,domReference:s})),[l.elements,s]),C=p.useMemo((()=>({...l,refs:v,elements:z,dataRef:m,nodeId:n,floatingId:y,events:f,open:o,onOpenChange:h})),[l,n,y,f,o,h,v,z]);return yt((()=>{const e=null==c?void 0:c.nodesRef.current.find((e=>e.id===n));e&&(e.context=C)})),p.useMemo((()=>({...l,context:C,refs:v,elements:z})),[l,v,z,C])}function It(e,t){if(null==e)return{};var o,i,n={},r=Object.keys(e);for(i=0;i<r.length;i++)o=r[i],t.indexOf(o)>=0||(n[o]=e[o]);return n}var Dt=["color"],Vt=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=It(e,Dt);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),m("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),Ut=["color"],Zt=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=It(e,Ut);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),m("path",{d:"M7.81832 0.68179C7.64258 0.506054 7.35766 0.506054 7.18192 0.68179L5.18192 2.68179C5.00619 2.85753 5.00619 3.14245 5.18192 3.31819C5.35766 3.49392 5.64258 3.49392 5.81832 3.31819L7.05012 2.08638L7.05012 5.50023C7.05012 5.74876 7.25159 5.95023 7.50012 5.95023C7.74865 5.95023 7.95012 5.74876 7.95012 5.50023L7.95012 2.08638L9.18192 3.31819C9.35766 3.49392 9.64258 3.49392 9.81832 3.31819C9.99406 3.14245 9.99406 2.85753 9.81832 2.68179L7.81832 0.68179ZM7.95012 12.9136V9.50023C7.95012 9.2517 7.74865 9.05023 7.50012 9.05023C7.25159 9.05023 7.05012 9.2517 7.05012 9.50023V12.9136L5.81832 11.6818C5.64258 11.5061 5.35766 11.5061 5.18192 11.6818C5.00619 11.8575 5.00619 12.1424 5.18192 12.3182L7.18192 14.3182C7.26632 14.4026 7.38077 14.45 7.50012 14.45C7.61947 14.45 7.73393 14.4026 7.81832 14.3182L9.81832 12.3182C9.99406 12.1424 9.99406 11.8575 9.81832 11.6818C9.64258 11.5061 9.35766 11.5061 9.18192 11.6818L7.95012 12.9136ZM1.49994 7.00017C1.2238 7.00017 0.999939 7.22403 0.999939 7.50017C0.999939 7.77631 1.2238 8.00017 1.49994 8.00017L13.4999 8.00017C13.7761 8.00017 13.9999 7.77631 13.9999 7.50017C13.9999 7.22403 13.7761 7.00017 13.4999 7.00017L1.49994 7.00017Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),Xt=["color"],Yt=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=It(e,Xt);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),m("path",{d:"M11.5 3.04999C11.7485 3.04999 11.95 3.25146 11.95 3.49999V7.49999C11.95 7.74852 11.7485 7.94999 11.5 7.94999C11.2515 7.94999 11.05 7.74852 11.05 7.49999V4.58639L4.58638 11.05H7.49999C7.74852 11.05 7.94999 11.2515 7.94999 11.5C7.94999 11.7485 7.74852 11.95 7.49999 11.95L3.49999 11.95C3.38064 11.95 3.26618 11.9026 3.18179 11.8182C3.0974 11.7338 3.04999 11.6193 3.04999 11.5L3.04999 7.49999C3.04999 7.25146 3.25146 7.04999 3.49999 7.04999C3.74852 7.04999 3.94999 7.25146 3.94999 7.49999L3.94999 10.4136L10.4136 3.94999L7.49999 3.94999C7.25146 3.94999 7.04999 3.74852 7.04999 3.49999C7.04999 3.25146 7.25146 3.04999 7.49999 3.04999L11.5 3.04999Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),Gt=["color"],$t=g((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=It(e,Gt);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),m("path",{d:"M4.81812 4.68161C4.99386 4.85734 4.99386 5.14227 4.81812 5.318L3.08632 7.0498H11.9135L10.1817 5.318C10.006 5.14227 10.006 4.85734 10.1817 4.68161C10.3575 4.50587 10.6424 4.50587 10.8181 4.68161L13.3181 7.18161C13.4939 7.35734 13.4939 7.64227 13.3181 7.818L10.8181 10.318C10.6424 10.4937 10.3575 10.4937 10.1817 10.318C10.006 10.1423 10.006 9.85734 10.1817 9.68161L11.9135 7.9498H3.08632L4.81812 9.68161C4.99386 9.85734 4.99386 10.1423 4.81812 10.318C4.64239 10.4937 4.35746 10.4937 4.18173 10.318L1.68173 7.818C1.50599 7.64227 1.50599 7.35734 1.68173 7.18161L4.18173 4.68161C4.35746 4.50587 4.64239 4.50587 4.81812 4.68161Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}));const qt=({blockId:t,onClose:o})=>{const i=e(),[n,r]=f(""),a=0===n.length;return c("div",Object.assign({className:"yoo-image-cursor-pointer yoo-image-user-select-none yoo-image-transition-bg yoo-image-duration-20 yoo-image-ease-in yoo-image-white-space-nowrap yoo-image-w-full"},{children:[l("input",{type:"text",placeholder:"Paste image link",value:n,className:"yoo-image-items-center yoo-image-bg-[hsla(45,13%,94%,.6)] yoo-image-rounded-[4px] yoo-image-shadow-[inset_0_0_0_1px_hsla(0,0%,6%,.1)] yoo-image-cursor-text yoo-image-flex yoo-image-text-[14px] yoo-image-h-[32px] yoo-image-leading-[20px] yoo-image-px-[6px] yoo-image-relative yoo-image-w-full yoo-image-border-none",onChange:e=>r(e.target.value)}),l("button",Object.assign({type:"button",className:"yoo-image-user-select-none yoo-image-transition-bg yoo-image-duration-20 yoo-image-ease-in yoo-image-cursor-pointer yoo-image-flex yoo-image-items-center yoo-image-justify-center yoo-image-flex-shrink-0 yoo-image-white-space-nowrap yoo-image-h-[28px] yoo-image-rounded-[4px] yoo-image-shadow-[rgba(15,15,15,0.1)_0px_0px_0px_1px_inset,_rgba(15,15,15,0.1)_0px_1px_2px] yoo-image-bg-[rgb(35,131,226)] yoo-image-text-white yoo-image-fill-white yoo-image-leading-[1.2] yoo-image-px-[12px] yoo-image-text-[14px] yoo-image-font-medium yoo-image-w-full yoo-image-max-w-[300px] yoo-image-mx-auto yoo-image-m-[12px_0_6px] disabled:yoo-image-bg-[rgba(35,131,226,0.5)] disabled:yoo-image-cursor-not-allowed",disabled:a,onClick:()=>{0!==n.length&&(i.blocks.Image.updateElement(t,"image",{src:n}),o())}},{children:"Embed image"}))]}))};function Jt(e,t,o,i){return new(o||(o=Promise))((function(n,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const Kt=({accept:o="image/*",onClose:i,blockId:n,onSetLoading:r})=>{const a=t("Image"),s=e();return l("div",Object.assign({className:"yoo-image-user-select-none yoo-image-transition-bg yoo-image-duration-20 yoo-image-ease-in yoo-image-white-space-nowrap yoo-image-rounded-[4px] yoo-image-h-[32px] yoo-image-px-[12px] yoo-image-border yoo-image-border-solid yoo-image-border-[rgba(55,53,47,0.16)] yoo-image-w-full yoo-image-cursor-pointer"},{children:c("label",Object.assign({htmlFor:"image-uploader",className:"yoo-image-text-[14px] yoo-image-leading-[1.2] yoo-image-font-medium yoo-image-cursor-pointer yoo-image-w-full yoo-image-flex yoo-image-items-center yoo-image-justify-center yoo-image-h-full"},{children:[l("input",{type:"file",id:"image-uploader",className:"yoo-image-absolute yoo-image-left-0 yoo-image-top-0 yoo-image-invisible",accept:(null==a?void 0:a.accept)||o,onChange:e=>{const t=e.target.files[0];t&&(e=>{Jt(void 0,void 0,void 0,(function*(){if(null==a?void 0:a.onUpload){i(),r(!0);try{const t=yield null==a?void 0:a.onUpload(e);s.blocks.Image.updateElement(n,"image",{src:t.src,alt:t.alt,sizes:t.sizes,bgColor:t.bgColor,fit:"contain"})}catch(e){}finally{r(!1)}}else console.warn("onUpload not provided")}))})(t)},multiple:!1}),"Upload image"]}))}))},Qt=({floatingStyles:e,refs:t,onClose:o,blockId:i,onSetLoading:n})=>{const[r,a]=f("upload"),s=e=>a(e),d="upload"===r,p="embed"===r,u=e=>({borderBottom:e?"2px solid #2483e2":"2px solid transparent"});return l(Tt,Object.assign({id:"yoo-image-uploader-portal",root:document.getElementById("yoopta-editor")},{children:l(Ft,Object.assign({lockScroll:!0,className:"yoo-image-z-[100]",onClick:o},{children:l("div",Object.assign({ref:t.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:c("div",Object.assign({className:"yoo-image-flex yoo-image-flex-col yoo-image-min-w-[540px] yoo-image-max-w-[calc(100vw-24px)] yoo-image-h-full yoo-image-max-h-[420px] yoo-image-bg-[#FFFFFF] yoo-image-shadow-[rgb(15_15_15_/5%)_0px_0px_0px_1px,_rgb(15_15_15_/10%)_0px_3px_6px,_rgb(15_15_15_/20%)_0px_9px_24px]"},{children:[c("div",Object.assign({className:"yoo-image-w-full yoo-image-flex yoo-image-text-[14px] yoo-image-p-[0_8px] yoo-image-shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] yoo-image-relative yoo-image-z-10 yoo-image-h-[40px]"},{children:[l("button",Object.assign({type:"button",onClick:()=>s("upload"),style:u(d),className:"yoo-image-py-[6px] yoo-image-whitespace-nowrap yoo-image-min-w-0 yoo-image-flex-shrink-0 yoo-image-text-[rgb(55,53,47)] yoo-image-relative yoo-image-cursor-pointer yoo-image-user-select-none yoo-image-bg-inherit yoo-image-transition-[height_20ms_ease-in] yoo-image-inline-flex yoo-image-items-center yoo-image-h-full yoo-image-text-[14px] yoo-image-leading-[1.2] yoo-image-px-[8px]"},{children:"Upload"})),l("button",Object.assign({type:"button",onClick:()=>s("embed"),style:u(p),className:"yoo-image-py-[6px] yoo-image-whitespace-nowrap yoo-image-min-w-0 yoo-image-flex-shrink-0 yoo-image-text-[rgb(55,53,47)] yoo-image-relative yoo-image-cursor-pointer yoo-image-user-select-none yoo-image-bg-inherit yoo-image-transition-[height_20ms_ease-in] yoo-image-inline-flex yoo-image-items-center yoo-image-h-full yoo-image-text-[14px] yoo-image-leading-[1.2] yoo-image-px-[8px]"},{children:"Image link"}))]})),c("div",Object.assign({className:"yoo-image-pt-[6px] yoo-image-pb-[6px] yoo-image-mt-[4px] yoo-image-flex yoo-image-justify-center yoo-image-mr-[12px] yoo-image-ml-[12px]"},{children:[p&&l(qt,{onClose:o,blockId:i}),d&&l(Kt,{onClose:o,blockId:i,onSetLoading:n})]}))]}))}))}))}))},eo=({className:e,width:t,height:o,children:i})=>c("div",Object.assign({className:e},{children:[i,l("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:t,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-2 yoo-image-h-4 yoo-image-w-4 yoo-image-animate-spin"},{children:l("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}))]})),to=({attributes:e,children:t,blockId:o})=>{const[i,n]=f(!1),[r,a]=f(!1),{refs:s,floatingStyles:d}=Ht({placement:"bottom",open:i,onOpenChange:n,middleware:[Ze(),Ue(),Ve(),Ee(10)]});return c("div",Object.assign({className:"yoo-image-w-full yoo-image-user-select-none yoo-image-m-[20px_0_10px] yoo-image-relative yoo-image-flex"},e,{contentEditable:!1},{children:[c("button",Object.assign({className:"yoo-image-p-[12px_36px_12px_12px] yoo-image-flex yoo-image-items-center yoo-image-text-left yoo-image-w-full yoo-image-overflow-hidden yoo-image-rounded-[3px] yoo-image-text-[14px] yoo-image-text-[rgba(55,53,47,0.65)] yoo-image-relative yoo-image-cursor-pointer yoo-image-border-none yoo-image-bg-[#efefef] yoo-image-transition-[background-color_100ms_ease-in] hover:yoo-image-bg-[#e3e3e3]",onClick:()=>n(!0),disabled:r,ref:s.setReference},{children:[l(r?eo:Vt,{className:"yoo-image-mr-2 yoo-image-user-select-none",width:24,height:24}),l("span",Object.assign({className:"yoo-image-font-medium"},{children:r?"Loading...":"Click to add image"})),r&&l("div",{className:"yoo-image-absolute yoo-image-top-0 yoo-image-left-0 yoo-image-h-full yoo-image-bg-[rgba(55,53,47,0.16)]",style:{width:"100%",transition:"width 100ms ease-in"}})]})),i&&l(Qt,{blockId:o,floatingStyles:d,refs:s,onClose:()=>n(!1),onSetLoading:e=>a(e)}),t]}))};var oo;function io(){return io=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},io.apply(this,arguments)}var no,ro=function(e){return p.createElement("svg",io({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:"checkmark_svg__lucide checkmark_svg__lucide-check"},e),oo||(oo=p.createElement("path",{d:"M20 6 9 17l-5-5"})))};function ao(){return ao=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},ao.apply(this,arguments)}var so=function(e){return p.createElement("svg",ao({viewBox:"0 0 16 16",style:{width:16,height:16,display:"block",fill:"rgba(55,53,47,.85)",flexShrink:0}},e),no||(no=p.createElement("path",{d:"M8.215 15.126c3.862 0 7.061-3.192 7.061-7.062 0-3.862-3.199-7.061-7.068-7.061-3.862 0-7.055 3.2-7.055 7.061 0 3.87 3.2 7.062 7.062 7.062zm0-1.388a5.654 5.654 0 0 1-5.667-5.674 5.642 5.642 0 0 1 5.66-5.667 5.66 5.66 0 0 1 5.68 5.667 5.66 5.66 0 0 1-5.673 5.674zm0-9.174c-.342 0-.602.247-.602.588v3.234l.062 1.401-.622-.766-.766-.8a.557.557 0 0 0-.41-.177.54.54 0 0 0-.56.547c0 .164.054.3.163.41l2.256 2.283c.15.157.294.226.479.226.191 0 .335-.075.485-.226l2.256-2.283a.557.557 0 0 0 .164-.41.539.539 0 0 0-.56-.547.523.523 0 0 0-.41.178l-.766.793-.622.779.054-1.408V5.152c0-.341-.253-.588-.601-.588z"})))};const{ExtendedBlockActions:lo,BlockOptionsMenuGroup:co,BlockOptionsMenuItem:po,BlockOptionsSeparator:uo}=o,ho=({editor:e,block:t,props:o})=>c(lo,Object.assign({onClick:()=>e.setSelection([t.meta.order]),className:"yoopta-image-options"},{children:[l(uo,{}),c(co,{children:[l(po,{children:c("button",Object.assign({type:"button",className:"yoo-image-rounded-sm yoo-image-justify-between hover:yoo-image-bg-[#37352f14] yoo-image-leading-[120%] yoo-image-px-2 yoo-image-py-1.5 yoo-image-mx-[4px] yoo-image-cursor-pointer yoo-image-w-full yoo-image-flex yoo-image-justify-start",onClick:()=>{e.blocks.Image.updateElement(t.id,"image",{fit:"contain"})}},{children:[c("span",Object.assign({className:"yoo-image-flex"},{children:[l(Zt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Fit"]})),"contain"===(null==o?void 0:o.fit)&&l(ro,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4"})]}))}),l(po,{children:c("button",Object.assign({type:"button",className:"yoo-image-rounded-sm yoo-image-justify-between hover:yoo-image-bg-[#37352f14] yoo-image-leading-[120%] yoo-image-px-2 yoo-image-py-1.5 yoo-image-mx-[4px] yoo-image-cursor-pointer yoo-image-w-full yoo-image-flex yoo-image-justify-start",onClick:()=>{e.blocks.Image.updateElement(t.id,"image",{fit:"fill"})}},{children:[c("span",Object.assign({className:"yoo-image-flex"},{children:[l($t,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Fill"]})),"fill"===(null==o?void 0:o.fit)&&l(ro,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4"})]}))}),l(po,{children:c("button",Object.assign({type:"button",className:"yoo-image-rounded-sm yoo-image-justify-between hover:yoo-image-bg-[#37352f14] yoo-image-leading-[120%] yoo-image-px-2 yoo-image-py-1.5 yoo-image-mx-[4px] yoo-image-cursor-pointer yoo-image-w-full yoo-image-flex yoo-image-justify-start",onClick:()=>{e.blocks.Image.updateElement(t.id,"image",{fit:"cover"})}},{children:[c("span",Object.assign({className:"yoo-image-flex"},{children:[l(Yt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Cover"]})),"cover"===(null==o?void 0:o.fit)&&l(ro,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4"})]}))})]}),l(uo,{}),l(co,{children:l(po,{children:c("button",Object.assign({type:"button",className:"yoo-image-rounded-sm hover:yoo-image-bg-[#37352f14] yoo-image-leading-[120%] yoo-image-px-2 yoo-image-py-1.5 yoo-image-mx-[4px] yoo-image-cursor-pointer yoo-image-w-full yoo-image-flex yoo-image-justify-start",onClick:()=>{if(!o||!o.src)return;const e=document.createElement("a");e.href=o.src,e.download=o.alt||o.src,e.target="_blank",e.rel="noopener noreferrer",document.body.appendChild(e),e.click(),document.body.removeChild(e)}},{children:[l(so,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Download"]}))})})]})),go=({position:e})=>l("div",Object.assign({contentEditable:!1,className:"yoo-image-absolute yoo-image-pointer-events-none yoo-image-flex yoo-image-items-center yoo-image-justify-center yoo-image-z-10 yoo-image-opacity-1 yoo-image-h-full yoo-image-w-[15px] yoo-image-cursor-col-resize yoo-image-transition-opacity yoo-image-duration-150 yoo-image-ease-in "+("left"===e?"yoo-image-left-0 yoo-image-top-0":"yoo-image-right-0 yoo-image-top-0")},{children:l("div",{className:"yoo-image-opacity-100 yoo-image-transition-opacity yoo-image-duration-300 yoo-image-ease-in yoo-image-rounded-[20px] yoo-image-bg-[rgba(15,15,15,0.6)] yoo-image-border yoo-image-border-solid yoo-image-border-[rgba(255,255,255,0.9)] yoo-image-w-[6px] yoo-image-h-[48px] yoo-image-max-h-[50%] yoo-image-shadow-[0_0_0_.5px_#FFF]"})})),mo=new a({type:"Image",elements:{image:{render:({element:o,attributes:a,children:s,blockId:p})=>{const{src:u,alt:g,srcSet:m,bgColor:w,fit:x,sizes:b}=o.props||{},z=i(p),C=e(),S=n(),R=t("Image"),[_,E]=f({width:(null==b?void 0:b.width)||650,height:(null==b?void 0:b.height)||440});h((()=>E({width:(null==b?void 0:b.width)||650,height:(null==b?void 0:b.height)||440})),[o.props]);const k=r({blockId:p}),L=y((()=>{var e,t;return{minWidth:300,size:{width:_.width,height:_.height},maxWidth:(null===(e=null==R?void 0:R.maxSizes)||void 0===e?void 0:e.maxWidth)||800,maxHeight:(null===(t=null==R?void 0:R.maxSizes)||void 0===t?void 0:t.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!S,right:!S},handleStyles:{left:{left:0},right:{right:0}},onResize:(e,t,o)=>{S||E({width:o.offsetWidth,height:o.offsetHeight})},onResizeStop:(e,t,o)=>{S||C.blocks.Image.updateElement(p,"image",{sizes:{width:o.offsetWidth,height:o.offsetHeight}})},handleComponent:{left:S?l(d,{}):l(go,{position:"left"}),right:S?l(d,{}):l(go,{position:"right"})}}}),[_.width,_.height]);return u?l("div",Object.assign({"data-element-type":o.type,contentEditable:!1,draggable:!1,className:"yoo-image-mt-4 yoo-image-relative yoopta-image"},a,{children:c(D,Object.assign({},L,{className:"yoo-image-mx-auto yoo-image-my-0 yoo-image-flex"},{children:[k&&l("div",{className:"yoo-image-absolute yoo-image-pointer-events-none yoo-image-inset-0 yoo-image-bg-[rgba(35,131,226,0.14)] yoo-image-z-[81] yoo-image-rounded-[3px] yoo-image-opacity-100 yoo-image-transition-opacity yoo-image-duration-150 yoo-image-ease-in"}),l(v,{src:u,alt:g,srcSet:m,fit:x,width:null==_?void 0:_.width,bgColor:w,height:null==_?void 0:_.height}),!S&&l(ho,{block:z,editor:C,props:o.props}),s]}))})):S?null:l(to,Object.assign({attributes:a,blockId:p},{children:s}))},props:{src:null,alt:null,srcSet:null,bgColor:null,fit:"contain",sizes:{width:650,height:500},nodeType:"void"}}},options:{display:{title:"Image",description:"Upload from device or embed with link"},onUpload:()=>Promise.resolve({src:null,alt:null}),accept:"image/png, image/jpeg, image/gif, image/webp",maxSizes:{maxWidth:650,maxHeight:550}},parsers:{html:{deserialize:{nodeNames:["IMG"],parse:e=>{if("IMG"===e.nodeName){const t={src:e.getAttribute("src")||"",alt:e.getAttribute("alt")||"",srcSet:e.getAttribute("srcset")||"",sizes:{width:e.getAttribute("width")?parseInt(e.getAttribute("width")||"650",10):650,height:e.getAttribute("height")?parseInt(e.getAttribute("height")||"500",10):500}};return{id:s(),type:"image",children:[{text:""}],props:t}}}}}}});!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("#yoopta-editor .yoo-image-pointer-events-none{pointer-events:none}#yoopta-editor .yoo-image-invisible{visibility:hidden}#yoopta-editor .yoo-image-absolute{position:absolute}#yoopta-editor .yoo-image-relative{position:relative}#yoopta-editor .yoo-image-inset-0{inset:0}#yoopta-editor .yoo-image-left-0{left:0}#yoopta-editor .yoo-image-right-0{right:0}#yoopta-editor .yoo-image-top-0{top:0}#yoopta-editor .yoo-image-z-10{z-index:10}#yoopta-editor .yoo-image-z-\\[100\\]{z-index:100}#yoopta-editor .yoo-image-z-\\[81\\]{z-index:81}#yoopta-editor .yoo-image-m-\\[12px_0_6px\\]{margin:12px 0 6px}#yoopta-editor .yoo-image-m-\\[20px_0_10px\\]{margin:20px 0 10px}#yoopta-editor .yoo-image-mx-\\[4px\\]{margin-left:4px;margin-right:4px}#yoopta-editor .yoo-image-mx-auto{margin-left:auto;margin-right:auto}#yoopta-editor .yoo-image-my-0{margin-bottom:0;margin-top:0}#yoopta-editor .yoo-image-ml-\\[12px\\]{margin-left:12px}#yoopta-editor .yoo-image-mr-2{margin-right:.5rem}#yoopta-editor .yoo-image-mr-\\[12px\\]{margin-right:12px}#yoopta-editor .yoo-image-mt-4{margin-top:1rem}#yoopta-editor .yoo-image-mt-\\[4px\\]{margin-top:4px}#yoopta-editor .yoo-image-flex{display:flex}#yoopta-editor .yoo-image-inline-flex{display:inline-flex}#yoopta-editor .yoo-image-h-4{height:1rem}#yoopta-editor .yoo-image-h-\\[28px\\]{height:28px}#yoopta-editor .yoo-image-h-\\[32px\\]{height:32px}#yoopta-editor .yoo-image-h-\\[40px\\]{height:40px}#yoopta-editor .yoo-image-h-\\[48px\\]{height:48px}#yoopta-editor .yoo-image-h-full{height:100%}#yoopta-editor .yoo-image-max-h-\\[420px\\]{max-height:420px}#yoopta-editor .yoo-image-max-h-\\[50\\%\\]{max-height:50%}#yoopta-editor .yoo-image-w-4{width:1rem}#yoopta-editor .yoo-image-w-\\[15px\\]{width:15px}#yoopta-editor .yoo-image-w-\\[6px\\]{width:6px}#yoopta-editor .yoo-image-w-full{width:100%}#yoopta-editor .yoo-image-min-w-0{min-width:0}#yoopta-editor .yoo-image-min-w-\\[540px\\]{min-width:540px}#yoopta-editor .yoo-image-max-w-\\[300px\\]{max-width:300px}#yoopta-editor .yoo-image-max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}#yoopta-editor .yoo-image-flex-shrink-0{flex-shrink:0}@keyframes yoo-image-spin{#yoopta-editor to{transform:rotate(1turn)}}#yoopta-editor .yoo-image-animate-spin{animation:yoo-image-spin 1s linear infinite}#yoopta-editor .yoo-image-cursor-col-resize{cursor:col-resize}#yoopta-editor .yoo-image-cursor-pointer{cursor:pointer}#yoopta-editor .yoo-image-cursor-text{cursor:text}#yoopta-editor .yoo-image-flex-col{flex-direction:column}#yoopta-editor .yoo-image-items-center{align-items:center}#yoopta-editor .yoo-image-justify-start{justify-content:flex-start}#yoopta-editor .yoo-image-justify-center{justify-content:center}#yoopta-editor .yoo-image-justify-between{justify-content:space-between}#yoopta-editor .yoo-image-overflow-hidden{overflow:hidden}#yoopta-editor .yoo-image-whitespace-nowrap{white-space:nowrap}#yoopta-editor .yoo-image-rounded-\\[20px\\]{border-radius:20px}#yoopta-editor .yoo-image-rounded-\\[3px\\]{border-radius:3px}#yoopta-editor .yoo-image-rounded-\\[4px\\]{border-radius:4px}#yoopta-editor .yoo-image-rounded-sm{border-radius:.125rem}#yoopta-editor .yoo-image-border{border-width:1px}#yoopta-editor .yoo-image-border-solid{border-style:solid}#yoopta-editor .yoo-image-border-none{border-style:none}#yoopta-editor .yoo-image-border-\\[rgba\\(255\\,255\\,255\\,0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}#yoopta-editor .yoo-image-border-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{border-color:rgba(55,53,47,.16)}#yoopta-editor .yoo-image-bg-\\[\\#FFFFFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}#yoopta-editor .yoo-image-bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}#yoopta-editor .yoo-image-bg-\\[hsla\\(45\\,13\\%\\,94\\%\\,\\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}#yoopta-editor .yoo-image-bg-\\[rgb\\(35\\,131\\,226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}#yoopta-editor .yoo-image-bg-\\[rgba\\(15\\,15\\,15\\,0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}#yoopta-editor .yoo-image-bg-\\[rgba\\(35\\,131\\,226\\,0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}#yoopta-editor .yoo-image-bg-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{background-color:rgba(55,53,47,.16)}#yoopta-editor .yoo-image-bg-inherit{background-color:inherit}#yoopta-editor .yoo-image-fill-white{fill:#fff}#yoopta-editor .yoo-image-p-\\[0_8px\\]{padding:0 8px}#yoopta-editor .yoo-image-p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}#yoopta-editor .yoo-image-px-2{padding-left:.5rem;padding-right:.5rem}#yoopta-editor .yoo-image-px-\\[12px\\]{padding-left:12px;padding-right:12px}#yoopta-editor .yoo-image-px-\\[6px\\]{padding-left:6px;padding-right:6px}#yoopta-editor .yoo-image-px-\\[8px\\]{padding-left:8px;padding-right:8px}#yoopta-editor .yoo-image-py-1{padding-bottom:.25rem;padding-top:.25rem}#yoopta-editor .yoo-image-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}#yoopta-editor .yoo-image-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}#yoopta-editor .yoo-image-pb-\\[6px\\]{padding-bottom:6px}#yoopta-editor .yoo-image-pt-\\[6px\\]{padding-top:6px}#yoopta-editor .yoo-image-text-left{text-align:left}#yoopta-editor .yoo-image-text-\\[14px\\]{font-size:14px}#yoopta-editor .yoo-image-font-medium{font-weight:500}#yoopta-editor .yoo-image-leading-\\[1\\.2\\]{line-height:1.2}#yoopta-editor .yoo-image-leading-\\[120\\%\\]{line-height:120%}#yoopta-editor .yoo-image-leading-\\[20px\\]{line-height:20px}#yoopta-editor .yoo-image-text-\\[rgb\\(55\\,53\\,47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}#yoopta-editor .yoo-image-text-\\[rgba\\(55\\,53\\,47\\,0\\.65\\)\\]{color:rgba(55,53,47,.65)}#yoopta-editor .yoo-image-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}#yoopta-editor .yoo-image-opacity-100{opacity:1}#yoopta-editor .yoo-image-shadow-\\[0_0_0_\\.5px_\\#FFF\\]{--tw-shadow:0 0 0 .5px #fff;--tw-shadow-colored:0 0 0 .5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-image-shadow-\\[inset_0_0_0_1px_hsla\\(0\\,0\\%\\,6\\%\\,\\.1\\)\\]{--tw-shadow:inset 0 0 0 1px hsla(0,0%,6%,.1);--tw-shadow-colored:inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-image-shadow-\\[rgb\\(15_15_15_\\/5\\%\\)_0px_0px_0px_1px\\,_rgb\\(15_15_15_\\/10\\%\\)_0px_3px_6px\\,_rgb\\(15_15_15_\\/20\\%\\)_0px_9px_24px\\]{--tw-shadow:rgb(15 15 15/5%) 0px 0px 0px 1px,hsla(0,0%,6%,.1) 0px 3px 6px,hsla(0,0%,6%,.2) 0px 9px 24px;--tw-shadow-colored:0px 0px 0px 1px var(--tw-shadow-color),0px 3px 6px var(--tw-shadow-color),0px 9px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-image-shadow-\\[rgb\\(55_53_47_\\/9\\%\\)_0px_-1px_0px_inset\\]{--tw-shadow:rgb(55 53 47/9%) 0px -1px 0px inset;--tw-shadow-colored:inset 0px -1px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-image-shadow-\\[rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_0px_0px_1px_inset\\,_rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_1px_2px\\]{--tw-shadow:hsla(0,0%,6%,.1) 0px 0px 0px 1px inset,hsla(0,0%,6%,.1) 0px 1px 2px;--tw-shadow-colored:inset 0px 0px 0px 1px var(--tw-shadow-color),0px 1px 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)}#yoopta-editor .yoo-image-transition-\\[background-color_100ms_ease-in\\]{transition-duration:.15s;transition-property:background-color .1s ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}#yoopta-editor .yoo-image-transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}#yoopta-editor .yoo-image-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}#yoopta-editor .yoo-image-duration-150{transition-duration:.15s}#yoopta-editor .yoo-image-duration-300{transition-duration:.3s}#yoopta-editor .yoo-image-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}#yoopta-editor .yoopta-image .yoopta-image-options{opacity:0;transition:opacity .15s ease-in-out}#yoopta-editor .yoopta-image:hover .yoopta-image-options{opacity:1}#yoopta-editor .hover\\:yoo-image-bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}#yoopta-editor .hover\\:yoo-image-bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}#yoopta-editor .disabled\\:yoo-image-cursor-not-allowed:disabled{cursor:not-allowed}#yoopta-editor .disabled\\:yoo-image-bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}");export{mo as default};
@@ -1 +1 @@
1
- {"version":3,"file":"ImageBlockOptions.d.ts","sourceRoot":"","sources":["../../src/ui/ImageBlockOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAM,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAuB,MAAM,UAAU,CAAC;AAIlE,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,iBAAiB,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,iBAAiB,yCAA0C,KAAK,4CAyFrE,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"ImageBlockOptions.d.ts","sourceRoot":"","sources":["../../src/ui/ImageBlockOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAM,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAuB,MAAM,UAAU,CAAC;AAMlE,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,iBAAiB,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,iBAAiB,yCAA0C,KAAK,4CAwGrE,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yoopta/image",
3
- "version": "4.0.0-rc.14",
4
- "description": "> TODO: description",
3
+ "version": "4.0.0-rc.15",
4
+ "description": "Image plugin for Yoopta Editor",
5
5
  "author": "Darginec05 <devopsbanda@gmail.com>",
6
6
  "homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
7
7
  "license": "MIT",
@@ -39,5 +39,5 @@
39
39
  "@radix-ui/react-icons": "^1.3.0",
40
40
  "re-resizable": "^6.9.11"
41
41
  },
42
- "gitHead": "47486295e1f53b2033ef0c859d1e4c831832b1e3"
42
+ "gitHead": "9e69d54d6822b1e76f4218510f07be46bf910756"
43
43
  }