@yoopta/image 4.6.5 → 4.6.7-rc.0
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 +1 -1
- package/dist/plugin/index.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useYooptaEditor as e,Elements as t,useYooptaPluginOptions as o,UI as i,Blocks as n,useBlockData as r,useYooptaReadOnly as a,useBlockSelected as s,YooptaPlugin as l,generateId as c}from"@yoopta/editor";import{jsxs as p,jsx as h,Fragment as g}from"react/jsx-runtime";import*as d from"react";import{useLayoutEffect as u,useEffect as m,forwardRef as f,createElement as y,useState as w,useMemo as x}from"react";import*as b from"react-dom";import{flushSync as v}from"react-dom";function C(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 z=({width:e,height:t,src:o,alt:i,fit:n,bgColor:r,attributes:a,children:s,layout:l="intrinsic"})=>{const c={objectFit:n||"contain",backgroundColor:r||"transparent"},g="fixed"===l,d="fill"===l,u="intrinsic"===l;return"responsive"===l&&(c.width="100%",c.height="auto"),g&&(c.width="100%",c.height="100%"),d&&(c.width="100%",c.height="100%"),u&&(c.width="100%",c.height="100%"),p("div",Object.assign({className:"yoo-image-w-full","data-layout":l},a,{children:[o&&h("img",{src:o,width:e,height:t,alt:i||"",decoding:"async",loading:"lazy",style:c}),s]}))};var _,R=(_=function(e,t){return _=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)},function(e,t){function o(){this.constructor=e}_(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)},k={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},O={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},L={width:"20px",height:"20px",position:"absolute"},j={top:S(S({},k),{top:"-5px"}),right:S(S({},O),{left:void 0,right:"-5px"}),bottom:S(S({},k),{top:void 0,bottom:"-5px"}),left:S(S({},O),{left:"-5px"}),topRight:S(S({},L),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:S(S({},L),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:S(S({},L),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:S(S({},L),{left:"-10px",top:"-10px",cursor:"nw-resize"})},N=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 R(t,e),t.prototype.render=function(){return d.createElement("div",{className:this.props.className||"",style:S(S({position:"absolute",userSelect:"none"},j[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(d.PureComponent),E=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)}}(),M=function(){return M=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},M.apply(this,arguments)},W={width:"auto",height:"auto"},H=function(e,t,o){return Math.max(Math.min(e,o),t)},B=function(e,t){return Math.round(e/t)*t},P=function(e,t){return new RegExp(e,"i").test(t)},A=function(e){return Boolean(e.touches&&e.touches.length)},T=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},F=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"},D=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"],V="__resizable_base__",Z=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(V):t.className+=V,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 E(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||W},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 F(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?F(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?F(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&&P("left",r),s=n&&P("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,p=s.lockAspectRatioExtraWidth,h=a.width,g=a.height,d=c||0,u=p||0;return P("right",r)&&(h=a.width+(e-a.x)*i/o,l&&(g=(h-u)/this.ratio+d)),P("left",r)&&(h=a.width-(e-a.x)*i/o,l&&(g=(h-u)/this.ratio+d)),P("bottom",r)&&(g=a.height+(t-a.y)*i/o,l&&(h=(g-d)*this.ratio+u)),P("top",r)&&(g=a.height-(t-a.y)*i/o,l&&(h=(g-d)*this.ratio+u)),{newWidth:h,newHeight:g}},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,p=void 0===i.height?10:i.height,h=void 0===o.height||o.height<0?t:o.height,g=a||0,d=s||0;if(r){var u=(p-g)*this.ratio+d,m=(h-g)*this.ratio+d,f=(l-d)/this.ratio+g,y=(c-d)/this.ratio+g,w=Math.max(l,u),x=Math.min(c,m),b=Math.max(p,f),v=Math.min(h,y);e=H(e,w,x),t=H(t,b,v)}else e=H(e,l,c),t=H(t,p,h);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&&A(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:M(M({},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&&A(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=A(e)?e.touches[0].clientX:e.clientX,l=A(e)?e.touches[0].clientY:e.clientY,c=this.state,p=c.direction,h=c.original,g=c.width,d=c.height,u=this.getParentSize(),m=function(e,t,o,i,n,r,a){return i=D(i,e.width,t,o),n=D(n,e.height,t,o),r=D(r,e.width,t,o),a=D(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)}}(u,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,x=this.calculateNewMaxFromBoundary(i,n);this.props.snap&&this.props.snap.x&&(w=T(w,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(y=T(y,this.props.snap.y,this.props.snapGap));var b=this.calculateNewSizeFromAspectRatio(w,y,{width:x.maxWidth,height:x.maxHeight},{width:r,height:a});if(w=b.newWidth,y=b.newHeight,this.props.grid){var C=B(w,this.props.grid[0]),z=B(y,this.props.grid[1]),_=this.props.snapGap||0;w=0===_||Math.abs(C-w)<=_?C:w,y=0===_||Math.abs(z-y)<=_?z:y}var R={width:w-h.width,height:y-h.height};if(g&&"string"==typeof g)if(g.endsWith("%"))w=w/u.width*100+"%";else if(g.endsWith("vw")){w=w/this.window.innerWidth*100+"vw"}else if(g.endsWith("vh")){w=w/this.window.innerHeight*100+"vh"}if(d&&"string"==typeof d)if(d.endsWith("%"))y=y/u.height*100+"%";else if(d.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(d.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}var S={width:this.createSizeForCssProperty(w,"width"),height:this.createSizeForCssProperty(y,"height")};"row"===this.flexDir?S.flexBasis=S.width:"column"===this.flexDir&&(S.flexBasis=S.height),v((function(){t.setState(S)})),this.props.onResize&&this.props.onResize(e,p,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:M(M({},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]?d.createElement(N,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:n&&n[t]},s&&s[t]?s[t]:null):null}));return d.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=M(M(M({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 d.createElement(i,M({ref:this.ref,style:o,className:this.props.className},t),this.state.isResizing&&d.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}(d.PureComponent);function U(e){return X(e)?(e.nodeName||"").toLowerCase():"#document"}function $(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function G(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 $(e).Node}function Y(e){return e instanceof Element||e instanceof $(e).Element}function q(e){return e instanceof HTMLElement||e instanceof $(e).HTMLElement}function J(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof $(e).ShadowRoot)}function K(e){const{overflow:t,overflowX:o,overflowY:i,display:n}=ie(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&!["inline","contents"].includes(n)}function Q(e){return["table","td","th"].includes(U(e))}function ee(e){const t=te(),o=ie(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 te(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function oe(e){return["html","body","#document"].includes(U(e))}function ie(e){return $(e).getComputedStyle(e)}function ne(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function re(e){if("html"===U(e))return e;const t=e.assignedSlot||e.parentNode||J(e)&&e.host||G(e);return J(t)?t.host:t}function ae(e){const t=re(e);return oe(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&K(t)?t:ae(t)}function se(e,t,o){var i;void 0===t&&(t=[]),void 0===o&&(o=!0);const n=ae(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),a=$(n);return r?t.concat(a,a.visualViewport||[],K(n)?n:[],a.frameElement&&o?se(a.frameElement):[]):t.concat(n,se(n,[],o))}const le=Math.min,ce=Math.max,pe=Math.round,he=e=>({x:e,y:e}),ge={left:"right",right:"left",bottom:"top",top:"bottom"},de={start:"end",end:"start"};function ue(e,t,o){return ce(e,le(t,o))}function me(e,t){return"function"==typeof e?e(t):e}function fe(e){return e.split("-")[0]}function ye(e){return e.split("-")[1]}function we(e){return"x"===e?"y":"x"}function xe(e){return"y"===e?"height":"width"}function be(e){return["top","bottom"].includes(fe(e))?"y":"x"}function ve(e){return we(be(e))}function Ce(e){return e.replace(/start|end/g,(e=>de[e]))}function ze(e){return e.replace(/left|right|bottom|top/g,(e=>ge[e]))}function _e(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 Re(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=be(t),a=ve(t),s=xe(a),l=fe(t),c="y"===r,p=i.x+i.width/2-n.width/2,h=i.y+i.height/2-n.height/2,g=i[s]/2-n[s]/2;let d;switch(l){case"top":d={x:p,y:i.y-n.height};break;case"bottom":d={x:p,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:h};break;case"left":d={x:i.x-n.width,y:h};break;default:d={x:i.x,y:i.y}}switch(ye(t)){case"start":d[a]-=g*(o&&c?-1:1);break;case"end":d[a]+=g*(o&&c?-1:1)}return d}async function ke(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:p="viewport",elementContext:h="floating",altBoundary:g=!1,padding:d=0}=me(t,e),u=_e(d),m=s[g?"floating"===h?"reference":"floating":h],f=Re(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:p,strategy:l})),y="floating"===h?{...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=Re(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:w,strategy:l}):y);return{top:(f.top-b.top+u.top)/x.y,bottom:(b.bottom-f.bottom+u.bottom)/x.y,left:(f.left-b.left+u.left)/x.x,right:(b.right-f.right+u.right)/x.x}}function Oe(e){const t=le(...e.map((e=>e.left))),o=le(...e.map((e=>e.top)));return{x:t,y:o,width:ce(...e.map((e=>e.right)))-t,height:ce(...e.map((e=>e.bottom)))-o}}const Le=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=fe(o),s=ye(o),l="y"===be(o),c=["left","top"].includes(a)?-1:1,p=r&&l?-1:1,h=me(t,e);let{mainAxis:g,crossAxis:d,alignmentAxis:u}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return s&&"number"==typeof u&&(d="end"===s?-1*u:u),l?{x:d*p,y:g*c}:{x:g*c,y:d*p}}(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 je(e){const t=ie(e);let o=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=q(e),r=n?e.offsetWidth:o,a=n?e.offsetHeight:i,s=pe(o)!==r||pe(i)!==a;return s&&(o=r,i=a),{width:o,height:i,$:s}}function Ne(e){return Y(e)?e:e.contextElement}function Ee(e){const t=Ne(e);if(!q(t))return he(1);const o=t.getBoundingClientRect(),{width:i,height:n,$:r}=je(t);let a=(r?pe(o.width):o.width)/i,s=(r?pe(o.height):o.height)/n;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Me=he(0);function We(e){const t=$(e);return te()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Me}function He(e,t,o,i){void 0===t&&(t=!1),void 0===o&&(o=!1);const n=e.getBoundingClientRect(),r=Ne(e);let a=he(1);t&&(i?Y(i)&&(a=Ee(i)):a=Ee(e));const s=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==$(e))&&t}(r,o,i)?We(r):he(0);let l=(n.left+s.x)/a.x,c=(n.top+s.y)/a.y,p=n.width/a.x,h=n.height/a.y;if(r){const e=$(r),t=i&&Y(i)?$(i):i;let o=e,n=o.frameElement;for(;n&&i&&t!==o;){const e=Ee(n),t=n.getBoundingClientRect(),i=ie(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,p*=e.x,h*=e.y,l+=r,c+=a,o=$(n),n=o.frameElement}}return Re({width:p,height:h,x:l,y:c})}const Be=[":popover-open",":modal"];function Pe(e){return Be.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Ae(e){return He(G(e)).left+ne(e).scrollLeft}function Te(e,t,o){let i;if("viewport"===t)i=function(e,t){const o=$(e),i=G(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=te();(!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=G(e),o=ne(e),i=e.ownerDocument.body,n=ce(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=ce(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let a=-o.scrollLeft+Ae(e);const s=-o.scrollTop;return"rtl"===ie(i).direction&&(a+=ce(t.clientWidth,i.clientWidth)-n),{width:n,height:r,x:a,y:s}}(G(e));else if(Y(t))i=function(e,t){const o=He(e,!0,"fixed"===t),i=o.top+e.clientTop,n=o.left+e.clientLeft,r=q(e)?Ee(e):he(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=We(e);i={...t,x:t.x-o.x,y:t.y-o.y}}return Re(i)}function Fe(e,t){const o=re(e);return!(o===t||!Y(o)||oe(o))&&("fixed"===ie(o).position||Fe(o,t))}function De(e,t,o){const i=q(t),n=G(t),r="fixed"===o,a=He(e,!0,r,t);let s={scrollLeft:0,scrollTop:0};const l=he(0);if(i||!i&&!r)if(("body"!==U(t)||K(n))&&(s=ne(t)),i){const e=He(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&(l.x=Ae(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 q(e)&&"fixed"!==ie(e).position?t?t(e):e.offsetParent:null}function Ve(e,t){const o=$(e);if(!q(e)||Pe(e))return o;let i=Ie(e,t);for(;i&&Q(i)&&"static"===ie(i).position;)i=Ie(i,t);return i&&("html"===U(i)||"body"===U(i)&&"static"===ie(i).position&&!ee(i))?o:i||function(e){let t=re(e);for(;q(t)&&!oe(t);){if(ee(t))return t;t=re(t)}return null}(e)||o}const Ze={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:i,strategy:n}=e;const r="fixed"===n,a=G(i),s=!!t&&Pe(t.floating);if(i===a||s&&r)return o;let l={scrollLeft:0,scrollTop:0},c=he(1);const p=he(0),h=q(i);if((h||!h&&!r)&&(("body"!==U(i)||K(a))&&(l=ne(i)),q(i))){const e=He(i);c=Ee(i),p.x=e.x+i.clientLeft,p.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+p.x,y:o.y*c.y-l.scrollTop*c.y+p.y}},getDocumentElement:G,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=se(e,[],!1).filter((e=>Y(e)&&"body"!==U(e))),n=null;const r="fixed"===ie(e).position;let a=r?re(e):e;for(;Y(a)&&!oe(a);){const t=ie(a),o=ee(a);o||"fixed"!==t.position||(n=null),(r?!o&&!n:!o&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||K(a)&&!o&&Fe(e,a))?i=i.filter((e=>e!==a)):n=t,a=re(a)}return t.set(e,i),i}(t,this._c):[].concat(o),i],a=r[0],s=r.reduce(((e,o)=>{const i=Te(t,o,n);return e.top=ce(i.top,e.top),e.right=le(i.right,e.right),e.bottom=le(i.bottom,e.bottom),e.left=ce(i.left,e.left),e}),Te(t,a,n));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Ve,getElementRects:async function(e){const t=this.getOffsetParent||Ve,o=this.getDimensions;return{reference:De(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}=je(e);return{width:t,height:o}},getScale:Ee,isElement:Y,isRTL:function(e){return"rtl"===ie(e).direction}},Ue=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}=me(e,t),c={x:o,y:i},p=await ke(t,l),h=be(fe(n)),g=we(h);let d=c[g],u=c[h];if(r){const e="y"===g?"bottom":"right";d=ue(d+p["y"===g?"top":"left"],d,d-p[e])}if(a){const e="y"===h?"bottom":"right";u=ue(u+p["y"===h?"top":"left"],u,u-p[e])}const m=s.fn({...t,[g]:d,[h]:u});return{...m,data:{x:m.x-o,y:m.y-i}}}}},$e=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:p=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:m=!0,...f}=me(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const y=fe(n),w=fe(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),b=g||(w||!m?[ze(s)]:function(e){const t=ze(e);return[Ce(e),t,Ce(t)]}(s));g||"none"===u||b.push(...function(e,t,o,i){const n=ye(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[]}}(fe(e),"start"===o,i);return n&&(r=r.map((e=>e+"-"+n)),t&&(r=r.concat(r.map(Ce)))),r}(s,m,u,x));const v=[s,...b],C=await ke(t,f),z=[];let _=(null==(i=r.flip)?void 0:i.overflows)||[];if(p&&z.push(C[y]),h){const e=function(e,t,o){void 0===o&&(o=!1);const i=ye(e),n=ve(e),r=xe(n);let a="x"===n?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=ze(a)),[a,ze(a)]}(n,a,x);z.push(C[e[0]],C[e[1]])}if(_=[..._,{placement:n,overflows:z}],!z.every((e=>e<=0))){var R,S;const e=((null==(R=r.flip)?void 0:R.index)||0)+1,t=v[e];if(t)return{data:{index:e,overflows:_},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:S.placement;if(!o)switch(d){case"bestFit":{var k;const e=null==(k=_.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:k[0];e&&(o=e);break}case"initialPlacement":o=s}if(n!==o)return{reset:{placement:o}}}return{}}}},Ge=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}=me(e,t),p=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(i.reference))||[]),h=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=>Re(Oe(e))))}(p),g=Re(Oe(p)),d=_e(s);const u=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===h.length&&h[0].left>h[1].right&&null!=l&&null!=c)return h.find((e=>l>e.left-d.left&&l<e.right+d.right&&c>e.top-d.top&&c<e.bottom+d.bottom))||g;if(h.length>=2){if("y"===be(o)){const e=h[0],t=h[h.length-1],i="top"===fe(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"===fe(o),t=ce(...h.map((e=>e.right))),i=le(...h.map((e=>e.left))),n=h.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 g}},floating:i.floating,strategy:a});return n.reference.x!==u.reference.x||n.reference.y!==u.reference.y||n.reference.width!==u.reference.width||n.reference.height!==u.reference.height?{reset:{rects:u}}:{}}}},Xe=(e,t,o)=>{const i=new Map,n={platform:Ze,...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:p,y:h}=Se(c,i,l),g=i,d={},u=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:p,y:h,initialPlacement:i,placement:g,strategy:n,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});p=null!=f?f:p,h=null!=y?y:h,d={...d,[r]:{...d[r],...w}},x&&u<=50&&(u++,"object"==typeof x&&(x.placement&&(g=x.placement),x.rects&&(c=!0===x.rects?await a.getElementRects({reference:e,floating:t,strategy:n}):x.rects),({x:p,y:h}=Se(c,g,l))),o=-1)}return{x:p,y:h,placement:g,strategy:n,middlewareData:d}})(e,t,{...n,platform:r})};var Ye="undefined"!=typeof document?u:m;function qe(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(!qe(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)&&!qe(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function Je(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ke(e,t){const o=Je(e);return Math.round(t*o)/o}function Qe(e){const t=d.useRef(e);return Ye((()=>{t.current=e})),t}const et=d["useInsertionEffect".toString()]||(e=>e());var tt="undefined"!=typeof document?u:m;let ot=!1,it=0;const nt=()=>"floating-ui-"+it++;const rt=d["useId".toString()]||function(){const[e,t]=d.useState((()=>ot?nt():void 0));return tt((()=>{null==e&&t(nt())}),[]),d.useEffect((()=>{ot||(ot=!0)}),[]),e};const at=d.createContext(null),st=d.createContext(null);function lt(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:i,nodeId:n}=e,[r,a]=d.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,[p,h]=d.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[g,u]=d.useState(i);qe(g,i)||u(i);const[m,f]=d.useState(null),[y,w]=d.useState(null),x=d.useCallback((e=>{e!==_.current&&(_.current=e,f(e))}),[]),v=d.useCallback((e=>{e!==R.current&&(R.current=e,w(e))}),[]),C=r||m,z=a||y,_=d.useRef(null),R=d.useRef(null),S=d.useRef(p),k=null!=l,O=Qe(l),L=Qe(n),j=d.useCallback((()=>{if(!_.current||!R.current)return;const e={placement:t,strategy:o,middleware:g};L.current&&(e.platform=L.current),Xe(_.current,R.current,e).then((e=>{const t={...e,isPositioned:!0};N.current&&!qe(S.current,t)&&(S.current=t,b.flushSync((()=>{h(t)})))}))}),[g,t,o,L]);Ye((()=>{!1===c&&S.current.isPositioned&&(S.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[c]);const N=d.useRef(!1);Ye((()=>(N.current=!0,()=>{N.current=!1})),[]),Ye((()=>{if(C&&(_.current=C),z&&(R.current=z),C&&z){if(O.current)return O.current(C,z,j);j()}}),[C,z,j,O,k]);const E=d.useMemo((()=>({reference:_,floating:R,setReference:x,setFloating:v})),[x,v]),M=d.useMemo((()=>({reference:C,floating:z})),[C,z]),W=d.useMemo((()=>{const e={position:o,left:0,top:0};if(!M.floating)return e;const t=Ke(M.floating,p.x),i=Ke(M.floating,p.y);return s?{...e,transform:"translate("+t+"px, "+i+"px)",...Je(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:i}}),[o,s,M.floating,p.x,p.y]);return d.useMemo((()=>({...p,update:j,refs:E,elements:M,floatingStyles:W})),[p,j,E,M,W])}(e),c=d.useContext(st),p=null!=((null==(h=d.useContext(at))?void 0:h.id)||null);var h;const g=function(e){const t=d.useRef((()=>{}));return et((()=>{t.current=e})),d.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:p}),null==i||i(e,t,o)})),u=d.useRef(null),m=d.useRef({}),f=d.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=rt(),w=d.useCallback((e=>{const t=Y(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l.refs.setReference(t)}),[l.refs]),x=d.useCallback((e=>{(Y(e)||null===e)&&(u.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=d.useMemo((()=>({...l.refs,setReference:x,setPositionReference:w,domReference:u})),[l.refs,x,w]),C=d.useMemo((()=>({...l.elements,domReference:s})),[l.elements,s]),z=d.useMemo((()=>({...l,refs:v,elements:C,dataRef:m,nodeId:n,floatingId:y,events:f,open:o,onOpenChange:g})),[l,n,y,f,o,g,v,C]);return tt((()=>{const e=null==c?void 0:c.nodesRef.current.find((e=>e.id===n));e&&(e.context=z)})),d.useMemo((()=>({...l,context:z,refs:v,elements:C})),[l,v,C,z])}function ct(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 pt=["color"],ht=f((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ct(e,pt);return y("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),y("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"}))})),gt=["color"],dt=f((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ct(e,gt);return y("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),y("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"}))})),ut=["color"],mt=f((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ct(e,ut);return y("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),y("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"}))})),ft=["color"],yt=f((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ct(e,ft);return y("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),y("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H10.5C10.7761 7 11 7.22386 11 7.5C11 7.77614 10.7761 8 10.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM3 10.5C3 10.2239 3.22386 10 3.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H3.5C3.22386 11 3 10.7761 3 10.5Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),wt=["color"],xt=f((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ct(e,wt);return y("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),y("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H7.5C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H10.5C10.7761 10 11 10.2239 11 10.5C11 10.7761 10.7761 11 10.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),bt=["color"],vt=f((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ct(e,bt);return y("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),y("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM7 7.5C7 7.22386 7.22386 7 7.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H7.5C7.22386 8 7 7.77614 7 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H4.5C4.22386 11 4 10.7761 4 10.5Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),Ct=["color"],zt=f((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ct(e,Ct);return y("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),y("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 _t=({blockId:o,onClose:i})=>{const n=e(),[r,a]=w(""),s=0===r.length;return p("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:[h("input",{type:"text",placeholder:"Paste image link",value:r,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=>a(e.target.value)}),h("button",Object.assign({type:"button",className:"yoopta-button 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:s,onClick:()=>{0!==r.length&&(t.updateElement(n,o,{type:"image",props:{src:r}}),i())}},{children:"Embed image"}))]}))},Rt=({accept:i="image/*",onClose:n,blockId:r,onSetLoading:a})=>{const s=o("Image"),l=e();return h("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:p("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:[h("input",{type:"file",id:"image-uploader",className:"yoo-image-absolute yoo-image-left-0 yoo-image-top-0 yoo-image-invisible",accept:(null==s?void 0:s.accept)||i,onChange:e=>{const o=e.target.files[0];o&&(e=>{C(void 0,void 0,void 0,(function*(){if(null==s?void 0:s.onUpload){n(),a(!0);try{const o=yield null==s?void 0:s.onUpload(e);t.updateElement(l,r,{type:"image",props:{src:o.src,alt:o.alt,sizes:o.sizes,bgColor:o.bgColor,fit:o.fit||"fill"}})}catch(e){}finally{a(!1)}}else console.warn("onUpload not provided")}))})(o)},multiple:!1}),"Upload image"]}))}))},{Overlay:St,Portal:kt}=i,Ot=({floatingStyles:e,refs:t,onClose:o,blockId:i,onSetLoading:n})=>{const[r,a]=w("upload"),s=e=>a(e),l="upload"===r,c="embed"===r,g=e=>({borderBottom:e?"2px solid #2483e2":"2px solid transparent"});return h(kt,Object.assign({id:"yoo-image-uploader-portal"},{children:h(St,Object.assign({lockScroll:!0,className:"yoo-image-z-[100]",onClick:o},{children:h("div",Object.assign({ref:t.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:p("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:[p("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:[h("button",Object.assign({type:"button",onClick:()=>s("upload"),style:g(l),className:"yoopta-button 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"})),h("button",Object.assign({type:"button",onClick:()=>s("embed"),style:g(c),className:"yoopta-button 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"}))]})),p("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:[c&&h(_t,{onClose:o,blockId:i}),l&&h(Rt,{onClose:o,blockId:i,onSetLoading:n})]}))]}))}))}))}))},Lt=({className:e,width:t,height:o,children:i})=>p("div",Object.assign({className:e},{children:[i,h("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:h("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}))]})),jt=({attributes:e,children:t,blockId:o})=>{const[i,n]=w(!1),[r,a]=w(!1),{refs:s,floatingStyles:l}=lt({placement:"bottom",open:i,onOpenChange:n,middleware:[Ge(),$e(),Ue(),Le(10)]});return p("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:[p("button",Object.assign({className:"yoopta-button 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,type:"button",ref:s.setReference},{children:[h(r?Lt:ht,{className:"yoo-image-mr-2 yoo-image-user-select-none",width:24,height:24}),h("span",Object.assign({className:"yoo-image-font-medium"},{children:r?"Loading...":"Click to add image"})),r&&h("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&&h(Ot,{blockId:o,floatingStyles:l,refs:s,onClose:()=>n(!1),onSetLoading:e=>a(e)}),t]}))};var Nt;function Et(){return Et=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},Et.apply(this,arguments)}var Mt,Wt=function(e){return d.createElement("svg",Et({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),Nt||(Nt=d.createElement("path",{d:"M20 6 9 17l-5-5"})))};function Ht(){return Ht=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},Ht.apply(this,arguments)}var Bt=function(e){return d.createElement("svg",Ht({viewBox:"0 0 16 16",style:{width:16,height:16,display:"block",fill:"rgba(55,53,47,.85)",flexShrink:0}},e),Mt||(Mt=d.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 Pt={left:xt,center:yt,right:vt},{ExtendedBlockActions:At,BlockOptionsMenuGroup:Tt,BlockOptionsMenuItem:Ft,BlockOptionsSeparator:Dt}=i,It=({editor:e,block:o,props:i})=>{var r;const a=(null===(r=null==o?void 0:o.meta)||void 0===r?void 0:r.align)||"center",s=Pt[a];return p(At,Object.assign({onClick:()=>e.setSelection([o.meta.order]),className:"yoopta-image-options"},{children:[h(Dt,{}),p(Tt,{children:[h(Ft,{children:p("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-image-justify-between",onClick:()=>{t.updateElement(e,o.id,{type:"image",props:{fit:"contain"}})}},{children:[p("span",Object.assign({className:"yoo-image-flex"},{children:[h(dt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Fit"]})),"contain"===(null==i?void 0:i.fit)&&h(Wt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4"})]}))}),h(Ft,{children:p("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-image-justify-between",onClick:()=>{t.updateElement(e,o.id,{type:"image",props:{fit:"fill"}})}},{children:[p("span",Object.assign({className:"yoo-image-flex"},{children:[h(zt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Fill"]})),"fill"===(null==i?void 0:i.fit)&&h(Wt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4"})]}))}),h(Ft,{children:p("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-image-justify-between",onClick:()=>{t.updateElement(e,o.id,{type:"image",props:{fit:"cover"}})}},{children:[p("span",Object.assign({className:"yoo-image-flex"},{children:[h(mt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Cover"]})),"cover"===(null==i?void 0:i.fit)&&h(Wt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4"})]}))})]}),h(Dt,{}),p(Tt,{children:[h(Ft,{children:p("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:()=>{const t=["left","center","right"];if(!o)return;const i=t[(t.indexOf(a)+1)%t.length];n.updateBlock(e,o.id,{meta:Object.assign(Object.assign({},o.meta),{align:i})})}},{children:[h(s,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Alignment"]}))}),h(Ft,{children:p("button",Object.assign({type:"button",className:"yoopta-block-options-button",onClick:()=>{if(!i||!i.src)return;const e=document.createElement("a");e.href=i.src,e.download=i.alt||i.src,e.target="_blank",e.rel="noopener noreferrer",document.body.appendChild(e),e.click(),document.body.removeChild(e)}},{children:[h(Bt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Download"]}))})]})]}))},Vt=({position:e})=>h("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:h("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]"})})),Zt=new l({type:"Image",elements:{image:{render:i=>{var n,{extendRender:l}=i,c=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(o[i[n]]=e[i[n]])}return o}(i,["extendRender"]);const{element:d,blockId:u,children:f,attributes:y}=c,{src:b,alt:v,srcSet:C,bgColor:_,fit:R,sizes:S}=d.props||{},k=r(u),O=e(),L=a(),j=o("Image"),[N,E]=w({width:(null==S?void 0:S.width)||650,height:(null==S?void 0:S.height)||440});m((()=>E({width:(null==S?void 0:S.width)||650,height:(null==S?void 0:S.height)||440})),[d.props]);const M=s({blockId:u}),W=x((()=>{var e,o;return{minWidth:300,size:{width:N.width,height:N.height},maxWidth:(null===(e=null==j?void 0:j.maxSizes)||void 0===e?void 0:e.maxWidth)||800,maxHeight:(null===(o=null==j?void 0:j.maxSizes)||void 0===o?void 0:o.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!L,right:!L},handleStyles:{left:{left:0},right:{right:0}},onResize:(e,t,o)=>{L||E({width:o.offsetWidth,height:o.offsetHeight})},onResizeStop:(e,o,i)=>{L||t.updateElement(O,u,{type:"image",props:{sizes:{width:i.offsetWidth,height:i.offsetHeight}}})},handleComponent:{left:L?h(g,{}):h(Vt,{position:"left"}),right:L?h(g,{}):h(Vt,{position:"right"})}}}),[N.width,N.height]);if(!b)return L?h(g,{}):h(jt,Object.assign({attributes:y,blockId:u},{children:f}));const H=`yoopta-align-${(null===(n=null==k?void 0:k.meta)||void 0===n?void 0:n.align)||"center"}`;return h("div",Object.assign({contentEditable:!1,draggable:!1,className:`yoo-image-mt-4 yoo-image-relative yoo-image-flex ${H} yoopta-image`},{children:p(Z,Object.assign({},W,{className:"yoo-image-my-0 yoo-image-flex"},{children:[M&&h("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?l(c):h(z,Object.assign({src:b,alt:v,srcSet:C,fit:R,width:null==N?void 0:N.width,bgColor:_,height:null==N?void 0:N.height,attributes:y},{children:f})),!L&&h(It,{block:k,editor:O,props:d.props})]}))}))},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={nodeType:"void",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:c(),type:"image",children:[{text:""}],props:t}}}},serialize:(e,t)=>`<div style="display: flex; width: 100%; justify-content: center">\n <img src="${e.props.src}" alt="${e.props.alt}" width="${e.props.sizes.width}" height="${e.props.sizes.height}" />\n </div>`},markdown:{serialize:(e,t)=>`\n`}}});!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))}}(".yoo-image-pointer-events-none{pointer-events:none}.yoo-image-invisible{visibility:hidden}.yoo-image-absolute{position:absolute}.yoo-image-relative{position:relative}.yoo-image-inset-0{inset:0}.yoo-image-left-0{left:0}.yoo-image-right-0{right:0}.yoo-image-top-0{top:0}.yoo-image-z-10{z-index:10}.yoo-image-z-\\[100\\]{z-index:100}.yoo-image-z-\\[81\\]{z-index:81}.yoo-image-m-\\[12px_0_6px\\]{margin:12px 0 6px}.yoo-image-m-\\[20px_0_10px\\]{margin:20px 0 10px}.yoo-image-mx-\\[4px\\]{margin-left:4px;margin-right:4px}.yoo-image-mx-auto{margin-left:auto;margin-right:auto}.yoo-image-my-0{margin-bottom:0;margin-top:0}.yoo-image-ml-\\[12px\\]{margin-left:12px}.yoo-image-mr-2{margin-right:.5rem}.yoo-image-mr-\\[12px\\]{margin-right:12px}.yoo-image-mt-4{margin-top:1rem}.yoo-image-mt-\\[4px\\]{margin-top:4px}.yoo-image-flex{display:flex}.yoo-image-inline-flex{display:inline-flex}.yoo-image-h-4{height:1rem}.yoo-image-h-\\[28px\\]{height:28px}.yoo-image-h-\\[32px\\]{height:32px}.yoo-image-h-\\[40px\\]{height:40px}.yoo-image-h-\\[48px\\]{height:48px}.yoo-image-h-full{height:100%}.yoo-image-max-h-\\[420px\\]{max-height:420px}.yoo-image-max-h-\\[50\\%\\]{max-height:50%}.yoo-image-w-4{width:1rem}.yoo-image-w-\\[15px\\]{width:15px}.yoo-image-w-\\[6px\\]{width:6px}.yoo-image-w-full{width:100%}.yoo-image-min-w-0{min-width:0}.yoo-image-min-w-\\[540px\\]{min-width:540px}.yoo-image-max-w-\\[300px\\]{max-width:300px}.yoo-image-max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.yoo-image-flex-shrink-0{flex-shrink:0}@keyframes yoo-image-spin{to{transform:rotate(1turn)}}.yoo-image-animate-spin{animation:yoo-image-spin 1s linear infinite}.yoo-image-cursor-col-resize{cursor:col-resize}.yoo-image-cursor-pointer{cursor:pointer}.yoo-image-cursor-text{cursor:text}.yoo-image-flex-col{flex-direction:column}.yoo-image-items-center{align-items:center}.yoo-image-justify-start{justify-content:flex-start}.yoo-image-justify-center{justify-content:center}.yoo-image-justify-between{justify-content:space-between}.yoo-image-overflow-hidden{overflow:hidden}.yoo-image-whitespace-nowrap{white-space:nowrap}.yoo-image-rounded-\\[20px\\]{border-radius:20px}.yoo-image-rounded-\\[3px\\]{border-radius:3px}.yoo-image-rounded-\\[4px\\]{border-radius:4px}.yoo-image-rounded-sm{border-radius:.125rem}.yoo-image-border{border-width:1px}.yoo-image-border-solid{border-style:solid}.yoo-image-border-none{border-style:none}.yoo-image-border-\\[rgba\\(255\\,255\\,255\\,0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}.yoo-image-border-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{border-color:rgba(55,53,47,.16)}.yoo-image-bg-\\[\\#FFFFFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.yoo-image-bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}.yoo-image-bg-\\[hsla\\(45\\,13\\%\\,94\\%\\,\\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}.yoo-image-bg-\\[rgb\\(35\\,131\\,226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}.yoo-image-bg-\\[rgba\\(15\\,15\\,15\\,0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}.yoo-image-bg-\\[rgba\\(35\\,131\\,226\\,0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}.yoo-image-bg-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{background-color:rgba(55,53,47,.16)}.yoo-image-bg-inherit{background-color:inherit}.yoo-image-fill-white{fill:#fff}.yoo-image-p-\\[0_8px\\]{padding:0 8px}.yoo-image-p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}.yoo-image-px-2{padding-left:.5rem;padding-right:.5rem}.yoo-image-px-\\[12px\\]{padding-left:12px;padding-right:12px}.yoo-image-px-\\[6px\\]{padding-left:6px;padding-right:6px}.yoo-image-px-\\[8px\\]{padding-left:8px;padding-right:8px}.yoo-image-py-1{padding-bottom:.25rem;padding-top:.25rem}.yoo-image-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.yoo-image-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.yoo-image-pb-\\[6px\\]{padding-bottom:6px}.yoo-image-pt-\\[6px\\]{padding-top:6px}.yoo-image-text-left{text-align:left}.yoo-image-text-\\[14px\\]{font-size:14px}.yoo-image-font-medium{font-weight:500}.yoo-image-leading-\\[1\\.2\\]{line-height:1.2}.yoo-image-leading-\\[120\\%\\]{line-height:120%}.yoo-image-leading-\\[20px\\]{line-height:20px}.yoo-image-text-\\[rgb\\(55\\,53\\,47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}.yoo-image-text-\\[rgba\\(55\\,53\\,47\\,0\\.65\\)\\]{color:rgba(55,53,47,.65)}.yoo-image-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.yoo-image-opacity-100{opacity:1}.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)}.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)}.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)}.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)}.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)}.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)}.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)}.yoo-image-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-image-duration-150{transition-duration:.15s}.yoo-image-duration-300{transition-duration:.3s}.yoo-image-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.yoopta-image .yoopta-image-options{opacity:0;transition:opacity .15s ease-in-out}.yoopta-image:hover .yoopta-image-options{opacity:1}.hover\\:yoo-image-bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.hover\\:yoo-image-bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}.disabled\\:yoo-image-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:yoo-image-bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}");export{Zt as default};
|
|
1
|
+
import{useYooptaEditor as e,Elements as t,useYooptaPluginOptions as o,UI as i,Blocks as n,useBlockData as r,useYooptaReadOnly as a,useBlockSelected as s,YooptaPlugin as l,generateId as c}from"@yoopta/editor";import{jsxs as p,jsx as h,Fragment as g}from"react/jsx-runtime";import*as d from"react";import{useLayoutEffect as u,useEffect as m,forwardRef as f,createElement as y,useState as w,useMemo as x}from"react";import*as b from"react-dom";import{flushSync as v}from"react-dom";function C(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 z=({width:e,height:t,src:o,alt:i,fit:n,bgColor:r,attributes:a,children:s,layout:l="intrinsic"})=>{const c={objectFit:n||"contain",backgroundColor:r||"transparent"},g="fixed"===l,d="fill"===l,u="intrinsic"===l;return"responsive"===l&&(c.width="100%",c.height="auto"),g&&(c.width="100%",c.height="100%"),d&&(c.width="100%",c.height="100%"),u&&(c.width="100%",c.height="100%"),p("div",Object.assign({className:"yoo-image-w-full","data-layout":l},a,{children:[o&&h("img",{src:o,width:e,height:t,alt:i||"",decoding:"async",loading:"lazy",style:c}),s]}))};var _,R=(_=function(e,t){return _=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)},function(e,t){function o(){this.constructor=e}_(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)},k={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},O={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},L={width:"20px",height:"20px",position:"absolute"},j={top:S(S({},k),{top:"-5px"}),right:S(S({},O),{left:void 0,right:"-5px"}),bottom:S(S({},k),{top:void 0,bottom:"-5px"}),left:S(S({},O),{left:"-5px"}),topRight:S(S({},L),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:S(S({},L),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:S(S({},L),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:S(S({},L),{left:"-10px",top:"-10px",cursor:"nw-resize"})},N=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 R(t,e),t.prototype.render=function(){return d.createElement("div",{className:this.props.className||"",style:S(S({position:"absolute",userSelect:"none"},j[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(d.PureComponent),E=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)}}(),M=function(){return M=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},M.apply(this,arguments)},W={width:"auto",height:"auto"},H=function(e,t,o){return Math.max(Math.min(e,o),t)},B=function(e,t){return Math.round(e/t)*t},P=function(e,t){return new RegExp(e,"i").test(t)},A=function(e){return Boolean(e.touches&&e.touches.length)},T=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},F=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"},D=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"],V="__resizable_base__",Z=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(V):t.className+=V,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 E(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||W},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 F(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?F(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?F(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&&P("left",r),s=n&&P("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,p=s.lockAspectRatioExtraWidth,h=a.width,g=a.height,d=c||0,u=p||0;return P("right",r)&&(h=a.width+(e-a.x)*i/o,l&&(g=(h-u)/this.ratio+d)),P("left",r)&&(h=a.width-(e-a.x)*i/o,l&&(g=(h-u)/this.ratio+d)),P("bottom",r)&&(g=a.height+(t-a.y)*i/o,l&&(h=(g-d)*this.ratio+u)),P("top",r)&&(g=a.height-(t-a.y)*i/o,l&&(h=(g-d)*this.ratio+u)),{newWidth:h,newHeight:g}},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,p=void 0===i.height?10:i.height,h=void 0===o.height||o.height<0?t:o.height,g=a||0,d=s||0;if(r){var u=(p-g)*this.ratio+d,m=(h-g)*this.ratio+d,f=(l-d)/this.ratio+g,y=(c-d)/this.ratio+g,w=Math.max(l,u),x=Math.min(c,m),b=Math.max(p,f),v=Math.min(h,y);e=H(e,w,x),t=H(t,b,v)}else e=H(e,l,c),t=H(t,p,h);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&&A(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:M(M({},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&&A(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=A(e)?e.touches[0].clientX:e.clientX,l=A(e)?e.touches[0].clientY:e.clientY,c=this.state,p=c.direction,h=c.original,g=c.width,d=c.height,u=this.getParentSize(),m=function(e,t,o,i,n,r,a){return i=D(i,e.width,t,o),n=D(n,e.height,t,o),r=D(r,e.width,t,o),a=D(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)}}(u,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,x=this.calculateNewMaxFromBoundary(i,n);this.props.snap&&this.props.snap.x&&(w=T(w,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(y=T(y,this.props.snap.y,this.props.snapGap));var b=this.calculateNewSizeFromAspectRatio(w,y,{width:x.maxWidth,height:x.maxHeight},{width:r,height:a});if(w=b.newWidth,y=b.newHeight,this.props.grid){var C=B(w,this.props.grid[0]),z=B(y,this.props.grid[1]),_=this.props.snapGap||0;w=0===_||Math.abs(C-w)<=_?C:w,y=0===_||Math.abs(z-y)<=_?z:y}var R={width:w-h.width,height:y-h.height};if(g&&"string"==typeof g)if(g.endsWith("%"))w=w/u.width*100+"%";else if(g.endsWith("vw")){w=w/this.window.innerWidth*100+"vw"}else if(g.endsWith("vh")){w=w/this.window.innerHeight*100+"vh"}if(d&&"string"==typeof d)if(d.endsWith("%"))y=y/u.height*100+"%";else if(d.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(d.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}var S={width:this.createSizeForCssProperty(w,"width"),height:this.createSizeForCssProperty(y,"height")};"row"===this.flexDir?S.flexBasis=S.width:"column"===this.flexDir&&(S.flexBasis=S.height),v((function(){t.setState(S)})),this.props.onResize&&this.props.onResize(e,p,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:M(M({},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]?d.createElement(N,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:n&&n[t]},s&&s[t]?s[t]:null):null}));return d.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=M(M(M({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 d.createElement(i,M({ref:this.ref,style:o,className:this.props.className},t),this.state.isResizing&&d.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}(d.PureComponent);function U(e){return X(e)?(e.nodeName||"").toLowerCase():"#document"}function $(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function G(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 $(e).Node}function Y(e){return e instanceof Element||e instanceof $(e).Element}function q(e){return e instanceof HTMLElement||e instanceof $(e).HTMLElement}function J(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof $(e).ShadowRoot)}function K(e){const{overflow:t,overflowX:o,overflowY:i,display:n}=ie(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&!["inline","contents"].includes(n)}function Q(e){return["table","td","th"].includes(U(e))}function ee(e){const t=te(),o=ie(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 te(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function oe(e){return["html","body","#document"].includes(U(e))}function ie(e){return $(e).getComputedStyle(e)}function ne(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function re(e){if("html"===U(e))return e;const t=e.assignedSlot||e.parentNode||J(e)&&e.host||G(e);return J(t)?t.host:t}function ae(e){const t=re(e);return oe(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&K(t)?t:ae(t)}function se(e,t,o){var i;void 0===t&&(t=[]),void 0===o&&(o=!0);const n=ae(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),a=$(n);return r?t.concat(a,a.visualViewport||[],K(n)?n:[],a.frameElement&&o?se(a.frameElement):[]):t.concat(n,se(n,[],o))}const le=Math.min,ce=Math.max,pe=Math.round,he=e=>({x:e,y:e}),ge={left:"right",right:"left",bottom:"top",top:"bottom"},de={start:"end",end:"start"};function ue(e,t,o){return ce(e,le(t,o))}function me(e,t){return"function"==typeof e?e(t):e}function fe(e){return e.split("-")[0]}function ye(e){return e.split("-")[1]}function we(e){return"x"===e?"y":"x"}function xe(e){return"y"===e?"height":"width"}function be(e){return["top","bottom"].includes(fe(e))?"y":"x"}function ve(e){return we(be(e))}function Ce(e){return e.replace(/start|end/g,(e=>de[e]))}function ze(e){return e.replace(/left|right|bottom|top/g,(e=>ge[e]))}function _e(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 Re(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=be(t),a=ve(t),s=xe(a),l=fe(t),c="y"===r,p=i.x+i.width/2-n.width/2,h=i.y+i.height/2-n.height/2,g=i[s]/2-n[s]/2;let d;switch(l){case"top":d={x:p,y:i.y-n.height};break;case"bottom":d={x:p,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:h};break;case"left":d={x:i.x-n.width,y:h};break;default:d={x:i.x,y:i.y}}switch(ye(t)){case"start":d[a]-=g*(o&&c?-1:1);break;case"end":d[a]+=g*(o&&c?-1:1)}return d}async function ke(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:p="viewport",elementContext:h="floating",altBoundary:g=!1,padding:d=0}=me(t,e),u=_e(d),m=s[g?"floating"===h?"reference":"floating":h],f=Re(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:p,strategy:l})),y="floating"===h?{...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=Re(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:w,strategy:l}):y);return{top:(f.top-b.top+u.top)/x.y,bottom:(b.bottom-f.bottom+u.bottom)/x.y,left:(f.left-b.left+u.left)/x.x,right:(b.right-f.right+u.right)/x.x}}function Oe(e){const t=le(...e.map((e=>e.left))),o=le(...e.map((e=>e.top)));return{x:t,y:o,width:ce(...e.map((e=>e.right)))-t,height:ce(...e.map((e=>e.bottom)))-o}}const Le=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=fe(o),s=ye(o),l="y"===be(o),c=["left","top"].includes(a)?-1:1,p=r&&l?-1:1,h=me(t,e);let{mainAxis:g,crossAxis:d,alignmentAxis:u}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return s&&"number"==typeof u&&(d="end"===s?-1*u:u),l?{x:d*p,y:g*c}:{x:g*c,y:d*p}}(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 je(e){const t=ie(e);let o=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=q(e),r=n?e.offsetWidth:o,a=n?e.offsetHeight:i,s=pe(o)!==r||pe(i)!==a;return s&&(o=r,i=a),{width:o,height:i,$:s}}function Ne(e){return Y(e)?e:e.contextElement}function Ee(e){const t=Ne(e);if(!q(t))return he(1);const o=t.getBoundingClientRect(),{width:i,height:n,$:r}=je(t);let a=(r?pe(o.width):o.width)/i,s=(r?pe(o.height):o.height)/n;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Me=he(0);function We(e){const t=$(e);return te()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Me}function He(e,t,o,i){void 0===t&&(t=!1),void 0===o&&(o=!1);const n=e.getBoundingClientRect(),r=Ne(e);let a=he(1);t&&(i?Y(i)&&(a=Ee(i)):a=Ee(e));const s=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==$(e))&&t}(r,o,i)?We(r):he(0);let l=(n.left+s.x)/a.x,c=(n.top+s.y)/a.y,p=n.width/a.x,h=n.height/a.y;if(r){const e=$(r),t=i&&Y(i)?$(i):i;let o=e,n=o.frameElement;for(;n&&i&&t!==o;){const e=Ee(n),t=n.getBoundingClientRect(),i=ie(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,p*=e.x,h*=e.y,l+=r,c+=a,o=$(n),n=o.frameElement}}return Re({width:p,height:h,x:l,y:c})}const Be=[":popover-open",":modal"];function Pe(e){return Be.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Ae(e){return He(G(e)).left+ne(e).scrollLeft}function Te(e,t,o){let i;if("viewport"===t)i=function(e,t){const o=$(e),i=G(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=te();(!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=G(e),o=ne(e),i=e.ownerDocument.body,n=ce(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=ce(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let a=-o.scrollLeft+Ae(e);const s=-o.scrollTop;return"rtl"===ie(i).direction&&(a+=ce(t.clientWidth,i.clientWidth)-n),{width:n,height:r,x:a,y:s}}(G(e));else if(Y(t))i=function(e,t){const o=He(e,!0,"fixed"===t),i=o.top+e.clientTop,n=o.left+e.clientLeft,r=q(e)?Ee(e):he(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=We(e);i={...t,x:t.x-o.x,y:t.y-o.y}}return Re(i)}function Fe(e,t){const o=re(e);return!(o===t||!Y(o)||oe(o))&&("fixed"===ie(o).position||Fe(o,t))}function De(e,t,o){const i=q(t),n=G(t),r="fixed"===o,a=He(e,!0,r,t);let s={scrollLeft:0,scrollTop:0};const l=he(0);if(i||!i&&!r)if(("body"!==U(t)||K(n))&&(s=ne(t)),i){const e=He(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&(l.x=Ae(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 q(e)&&"fixed"!==ie(e).position?t?t(e):e.offsetParent:null}function Ve(e,t){const o=$(e);if(!q(e)||Pe(e))return o;let i=Ie(e,t);for(;i&&Q(i)&&"static"===ie(i).position;)i=Ie(i,t);return i&&("html"===U(i)||"body"===U(i)&&"static"===ie(i).position&&!ee(i))?o:i||function(e){let t=re(e);for(;q(t)&&!oe(t);){if(ee(t))return t;t=re(t)}return null}(e)||o}const Ze={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:i,strategy:n}=e;const r="fixed"===n,a=G(i),s=!!t&&Pe(t.floating);if(i===a||s&&r)return o;let l={scrollLeft:0,scrollTop:0},c=he(1);const p=he(0),h=q(i);if((h||!h&&!r)&&(("body"!==U(i)||K(a))&&(l=ne(i)),q(i))){const e=He(i);c=Ee(i),p.x=e.x+i.clientLeft,p.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+p.x,y:o.y*c.y-l.scrollTop*c.y+p.y}},getDocumentElement:G,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=se(e,[],!1).filter((e=>Y(e)&&"body"!==U(e))),n=null;const r="fixed"===ie(e).position;let a=r?re(e):e;for(;Y(a)&&!oe(a);){const t=ie(a),o=ee(a);o||"fixed"!==t.position||(n=null),(r?!o&&!n:!o&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||K(a)&&!o&&Fe(e,a))?i=i.filter((e=>e!==a)):n=t,a=re(a)}return t.set(e,i),i}(t,this._c):[].concat(o),i],a=r[0],s=r.reduce(((e,o)=>{const i=Te(t,o,n);return e.top=ce(i.top,e.top),e.right=le(i.right,e.right),e.bottom=le(i.bottom,e.bottom),e.left=ce(i.left,e.left),e}),Te(t,a,n));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Ve,getElementRects:async function(e){const t=this.getOffsetParent||Ve,o=this.getDimensions;return{reference:De(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}=je(e);return{width:t,height:o}},getScale:Ee,isElement:Y,isRTL:function(e){return"rtl"===ie(e).direction}},Ue=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}=me(e,t),c={x:o,y:i},p=await ke(t,l),h=be(fe(n)),g=we(h);let d=c[g],u=c[h];if(r){const e="y"===g?"bottom":"right";d=ue(d+p["y"===g?"top":"left"],d,d-p[e])}if(a){const e="y"===h?"bottom":"right";u=ue(u+p["y"===h?"top":"left"],u,u-p[e])}const m=s.fn({...t,[g]:d,[h]:u});return{...m,data:{x:m.x-o,y:m.y-i}}}}},$e=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:p=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:m=!0,...f}=me(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const y=fe(n),w=fe(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),b=g||(w||!m?[ze(s)]:function(e){const t=ze(e);return[Ce(e),t,Ce(t)]}(s));g||"none"===u||b.push(...function(e,t,o,i){const n=ye(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[]}}(fe(e),"start"===o,i);return n&&(r=r.map((e=>e+"-"+n)),t&&(r=r.concat(r.map(Ce)))),r}(s,m,u,x));const v=[s,...b],C=await ke(t,f),z=[];let _=(null==(i=r.flip)?void 0:i.overflows)||[];if(p&&z.push(C[y]),h){const e=function(e,t,o){void 0===o&&(o=!1);const i=ye(e),n=ve(e),r=xe(n);let a="x"===n?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=ze(a)),[a,ze(a)]}(n,a,x);z.push(C[e[0]],C[e[1]])}if(_=[..._,{placement:n,overflows:z}],!z.every((e=>e<=0))){var R,S;const e=((null==(R=r.flip)?void 0:R.index)||0)+1,t=v[e];if(t)return{data:{index:e,overflows:_},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:S.placement;if(!o)switch(d){case"bestFit":{var k;const e=null==(k=_.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:k[0];e&&(o=e);break}case"initialPlacement":o=s}if(n!==o)return{reset:{placement:o}}}return{}}}},Ge=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}=me(e,t),p=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(i.reference))||[]),h=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=>Re(Oe(e))))}(p),g=Re(Oe(p)),d=_e(s);const u=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===h.length&&h[0].left>h[1].right&&null!=l&&null!=c)return h.find((e=>l>e.left-d.left&&l<e.right+d.right&&c>e.top-d.top&&c<e.bottom+d.bottom))||g;if(h.length>=2){if("y"===be(o)){const e=h[0],t=h[h.length-1],i="top"===fe(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"===fe(o),t=ce(...h.map((e=>e.right))),i=le(...h.map((e=>e.left))),n=h.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 g}},floating:i.floating,strategy:a});return n.reference.x!==u.reference.x||n.reference.y!==u.reference.y||n.reference.width!==u.reference.width||n.reference.height!==u.reference.height?{reset:{rects:u}}:{}}}},Xe=(e,t,o)=>{const i=new Map,n={platform:Ze,...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:p,y:h}=Se(c,i,l),g=i,d={},u=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:p,y:h,initialPlacement:i,placement:g,strategy:n,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});p=null!=f?f:p,h=null!=y?y:h,d={...d,[r]:{...d[r],...w}},x&&u<=50&&(u++,"object"==typeof x&&(x.placement&&(g=x.placement),x.rects&&(c=!0===x.rects?await a.getElementRects({reference:e,floating:t,strategy:n}):x.rects),({x:p,y:h}=Se(c,g,l))),o=-1)}return{x:p,y:h,placement:g,strategy:n,middlewareData:d}})(e,t,{...n,platform:r})};var Ye="undefined"!=typeof document?u:m;function qe(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(!qe(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)&&!qe(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function Je(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ke(e,t){const o=Je(e);return Math.round(t*o)/o}function Qe(e){const t=d.useRef(e);return Ye((()=>{t.current=e})),t}const et=d["useInsertionEffect".toString()]||(e=>e());var tt="undefined"!=typeof document?u:m;let ot=!1,it=0;const nt=()=>"floating-ui-"+it++;const rt=d["useId".toString()]||function(){const[e,t]=d.useState((()=>ot?nt():void 0));return tt((()=>{null==e&&t(nt())}),[]),d.useEffect((()=>{ot||(ot=!0)}),[]),e};const at=d.createContext(null),st=d.createContext(null);function lt(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:i,nodeId:n}=e,[r,a]=d.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,[p,h]=d.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[g,u]=d.useState(i);qe(g,i)||u(i);const[m,f]=d.useState(null),[y,w]=d.useState(null),x=d.useCallback((e=>{e!==_.current&&(_.current=e,f(e))}),[]),v=d.useCallback((e=>{e!==R.current&&(R.current=e,w(e))}),[]),C=r||m,z=a||y,_=d.useRef(null),R=d.useRef(null),S=d.useRef(p),k=null!=l,O=Qe(l),L=Qe(n),j=d.useCallback((()=>{if(!_.current||!R.current)return;const e={placement:t,strategy:o,middleware:g};L.current&&(e.platform=L.current),Xe(_.current,R.current,e).then((e=>{const t={...e,isPositioned:!0};N.current&&!qe(S.current,t)&&(S.current=t,b.flushSync((()=>{h(t)})))}))}),[g,t,o,L]);Ye((()=>{!1===c&&S.current.isPositioned&&(S.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[c]);const N=d.useRef(!1);Ye((()=>(N.current=!0,()=>{N.current=!1})),[]),Ye((()=>{if(C&&(_.current=C),z&&(R.current=z),C&&z){if(O.current)return O.current(C,z,j);j()}}),[C,z,j,O,k]);const E=d.useMemo((()=>({reference:_,floating:R,setReference:x,setFloating:v})),[x,v]),M=d.useMemo((()=>({reference:C,floating:z})),[C,z]),W=d.useMemo((()=>{const e={position:o,left:0,top:0};if(!M.floating)return e;const t=Ke(M.floating,p.x),i=Ke(M.floating,p.y);return s?{...e,transform:"translate("+t+"px, "+i+"px)",...Je(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:i}}),[o,s,M.floating,p.x,p.y]);return d.useMemo((()=>({...p,update:j,refs:E,elements:M,floatingStyles:W})),[p,j,E,M,W])}(e),c=d.useContext(st),p=null!=((null==(h=d.useContext(at))?void 0:h.id)||null);var h;const g=function(e){const t=d.useRef((()=>{}));return et((()=>{t.current=e})),d.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:p}),null==i||i(e,t,o)})),u=d.useRef(null),m=d.useRef({}),f=d.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=rt(),w=d.useCallback((e=>{const t=Y(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l.refs.setReference(t)}),[l.refs]),x=d.useCallback((e=>{(Y(e)||null===e)&&(u.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=d.useMemo((()=>({...l.refs,setReference:x,setPositionReference:w,domReference:u})),[l.refs,x,w]),C=d.useMemo((()=>({...l.elements,domReference:s})),[l.elements,s]),z=d.useMemo((()=>({...l,refs:v,elements:C,dataRef:m,nodeId:n,floatingId:y,events:f,open:o,onOpenChange:g})),[l,n,y,f,o,g,v,C]);return tt((()=>{const e=null==c?void 0:c.nodesRef.current.find((e=>e.id===n));e&&(e.context=z)})),d.useMemo((()=>({...l,context:z,refs:v,elements:C})),[l,v,C,z])}function ct(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 pt=["color"],ht=f((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ct(e,pt);return y("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),y("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"}))})),gt=["color"],dt=f((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ct(e,gt);return y("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),y("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"}))})),ut=["color"],mt=f((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ct(e,ut);return y("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),y("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"}))})),ft=["color"],yt=f((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ct(e,ft);return y("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),y("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H10.5C10.7761 7 11 7.22386 11 7.5C11 7.77614 10.7761 8 10.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM3 10.5C3 10.2239 3.22386 10 3.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H3.5C3.22386 11 3 10.7761 3 10.5Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),wt=["color"],xt=f((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ct(e,wt);return y("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),y("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H7.5C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H10.5C10.7761 10 11 10.2239 11 10.5C11 10.7761 10.7761 11 10.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),bt=["color"],vt=f((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ct(e,bt);return y("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),y("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM7 7.5C7 7.22386 7.22386 7 7.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H7.5C7.22386 8 7 7.77614 7 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H4.5C4.22386 11 4 10.7761 4 10.5Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),Ct=["color"],zt=f((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=ct(e,Ct);return y("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),y("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 _t=({blockId:o,onClose:i})=>{const n=e(),[r,a]=w(""),s=0===r.length;return p("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:[h("input",{type:"text",placeholder:"Paste image link",value:r,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=>a(e.target.value)}),h("button",Object.assign({type:"button",className:"yoopta-button 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:s,onClick:()=>{0!==r.length&&(t.updateElement(n,o,{type:"image",props:{src:r}}),i())}},{children:"Embed image"}))]}))},Rt=({accept:i="image/*",onClose:n,blockId:r,onSetLoading:a})=>{const s=o("Image"),l=e();return h("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:p("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:[h("input",{type:"file",id:"image-uploader",className:"yoo-image-absolute yoo-image-left-0 yoo-image-top-0 yoo-image-invisible",accept:(null==s?void 0:s.accept)||i,onChange:e=>{const o=e.target.files[0];o&&(e=>{C(void 0,void 0,void 0,(function*(){if(null==s?void 0:s.onUpload){n(),a(!0);try{const o=yield null==s?void 0:s.onUpload(e);t.updateElement(l,r,{type:"image",props:{src:o.src,alt:o.alt,sizes:o.sizes,bgColor:o.bgColor,fit:o.fit||"fill"}})}catch(e){}finally{a(!1)}}else console.warn("onUpload not provided")}))})(o)},multiple:!1}),"Upload image"]}))}))},{Overlay:St,Portal:kt}=i,Ot=({floatingStyles:e,refs:t,onClose:o,blockId:i,onSetLoading:n})=>{const[r,a]=w("upload"),s=e=>a(e),l="upload"===r,c="embed"===r,g=e=>({borderBottom:e?"2px solid #2483e2":"2px solid transparent"});return h(kt,Object.assign({id:"yoo-image-uploader-portal"},{children:h(St,Object.assign({lockScroll:!0,className:"yoo-image-z-[100]",onClick:o},{children:h("div",Object.assign({ref:t.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:p("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:[p("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:[h("button",Object.assign({type:"button",onClick:()=>s("upload"),style:g(l),className:"yoopta-button 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"})),h("button",Object.assign({type:"button",onClick:()=>s("embed"),style:g(c),className:"yoopta-button 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"}))]})),p("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:[c&&h(_t,{onClose:o,blockId:i}),l&&h(Rt,{onClose:o,blockId:i,onSetLoading:n})]}))]}))}))}))}))},Lt=({className:e,width:t,height:o,children:i})=>p("div",Object.assign({className:e},{children:[i,h("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:h("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}))]})),jt=({attributes:e,children:t,blockId:o})=>{const[i,n]=w(!1),[r,a]=w(!1),{refs:s,floatingStyles:l}=lt({placement:"bottom",open:i,onOpenChange:n,middleware:[Ge(),$e(),Ue(),Le(10)]});return p("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:[p("button",Object.assign({className:"yoopta-button 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,type:"button",ref:s.setReference},{children:[h(r?Lt:ht,{className:"yoo-image-mr-2 yoo-image-user-select-none",width:24,height:24}),h("span",Object.assign({className:"yoo-image-font-medium"},{children:r?"Loading...":"Click to add image"})),r&&h("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&&h(Ot,{blockId:o,floatingStyles:l,refs:s,onClose:()=>n(!1),onSetLoading:e=>a(e)}),t]}))};var Nt;function Et(){return Et=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},Et.apply(this,arguments)}var Mt,Wt=function(e){return d.createElement("svg",Et({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),Nt||(Nt=d.createElement("path",{d:"M20 6 9 17l-5-5"})))};function Ht(){return Ht=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},Ht.apply(this,arguments)}var Bt=function(e){return d.createElement("svg",Ht({viewBox:"0 0 16 16",style:{width:16,height:16,display:"block",fill:"rgba(55,53,47,.85)",flexShrink:0}},e),Mt||(Mt=d.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 Pt={left:xt,center:yt,right:vt},{ExtendedBlockActions:At,BlockOptionsMenuGroup:Tt,BlockOptionsMenuItem:Ft,BlockOptionsSeparator:Dt}=i,It=({editor:e,block:o,props:i})=>{var r;const a=(null===(r=null==o?void 0:o.meta)||void 0===r?void 0:r.align)||"center",s=Pt[a];return p(At,Object.assign({onClick:()=>e.setSelection([o.meta.order]),className:"yoopta-image-options"},{children:[h(Dt,{}),p(Tt,{children:[h(Ft,{children:p("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-image-justify-between",onClick:()=>{t.updateElement(e,o.id,{type:"image",props:{fit:"contain"}})}},{children:[p("span",Object.assign({className:"yoo-image-flex"},{children:[h(dt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Fit"]})),"contain"===(null==i?void 0:i.fit)&&h(Wt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4"})]}))}),h(Ft,{children:p("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-image-justify-between",onClick:()=>{t.updateElement(e,o.id,{type:"image",props:{fit:"fill"}})}},{children:[p("span",Object.assign({className:"yoo-image-flex"},{children:[h(zt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Fill"]})),"fill"===(null==i?void 0:i.fit)&&h(Wt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4"})]}))}),h(Ft,{children:p("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-image-justify-between",onClick:()=>{t.updateElement(e,o.id,{type:"image",props:{fit:"cover"}})}},{children:[p("span",Object.assign({className:"yoo-image-flex"},{children:[h(mt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Cover"]})),"cover"===(null==i?void 0:i.fit)&&h(Wt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4"})]}))})]}),h(Dt,{}),p(Tt,{children:[h(Ft,{children:p("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:()=>{const t=["left","center","right"];if(!o)return;const i=t[(t.indexOf(a)+1)%t.length];n.updateBlock(e,o.id,{meta:Object.assign(Object.assign({},o.meta),{align:i})})}},{children:[h(s,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Alignment"]}))}),h(Ft,{children:p("button",Object.assign({type:"button",className:"yoopta-block-options-button",onClick:()=>{if(!i||!i.src)return;const e=document.createElement("a");e.href=i.src,e.download=i.alt||i.src,e.target="_blank",e.rel="noopener noreferrer",document.body.appendChild(e),e.click(),document.body.removeChild(e)}},{children:[h(Bt,{width:16,height:16,className:"yoo-image-w-4 yoo-image-h-4 yoo-image-mr-2"}),"Download"]}))})]})]}))},Vt=({position:e})=>h("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:h("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]"})})),Zt={left:"flex-start",center:"center",right:"flex-end"},Ut=new l({type:"Image",elements:{image:{render:i=>{var n,{extendRender:l}=i,c=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(o[i[n]]=e[i[n]])}return o}(i,["extendRender"]);const{element:d,blockId:u,children:f,attributes:y}=c,{src:b,alt:v,srcSet:C,bgColor:_,fit:R,sizes:S}=d.props||{},k=r(u),O=e(),L=a(),j=o("Image"),[N,E]=w({width:(null==S?void 0:S.width)||650,height:(null==S?void 0:S.height)||440});m((()=>E({width:(null==S?void 0:S.width)||650,height:(null==S?void 0:S.height)||440})),[d.props]);const M=s({blockId:u}),W=x((()=>{var e,o;return{minWidth:300,size:{width:N.width,height:N.height},maxWidth:(null===(e=null==j?void 0:j.maxSizes)||void 0===e?void 0:e.maxWidth)||800,maxHeight:(null===(o=null==j?void 0:j.maxSizes)||void 0===o?void 0:o.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!L,right:!L},handleStyles:{left:{left:0},right:{right:0}},onResize:(e,t,o)=>{L||E({width:o.offsetWidth,height:o.offsetHeight})},onResizeStop:(e,o,i)=>{L||t.updateElement(O,u,{type:"image",props:{sizes:{width:i.offsetWidth,height:i.offsetHeight}}})},handleComponent:{left:L?h(g,{}):h(Vt,{position:"left"}),right:L?h(g,{}):h(Vt,{position:"right"})}}}),[N.width,N.height]);if(!b)return L?h(g,{}):h(jt,Object.assign({attributes:y,blockId:u},{children:f}));const H=`yoopta-align-${(null===(n=null==k?void 0:k.meta)||void 0===n?void 0:n.align)||"center"}`;return h("div",Object.assign({contentEditable:!1,draggable:!1,className:`yoo-image-mt-4 yoo-image-relative yoo-image-flex ${H} yoopta-image`},{children:p(Z,Object.assign({},W,{className:"yoo-image-my-0 yoo-image-flex"},{children:[M&&h("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?l(c):h(z,Object.assign({src:b,alt:v,srcSet:C,fit:R,width:null==N?void 0:N.width,bgColor:_,height:null==N?void 0:N.height,attributes:y},{children:f})),!L&&h(It,{block:k,editor:O,props:d.props})]}))}))},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={nodeType:"void",src:e.getAttribute("src")||"",alt:e.getAttribute("alt")||"",srcSet:e.getAttribute("srcset")||"",fit:e.getAttribute("objectFit")||"contain",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:c(),type:"image",children:[{text:""}],props:t}}}},serialize:(e,t,o)=>{const{align:i="center",depth:n=0}=o||{};return`<div style="margin-left: ${n}px; display: flex; width: 100%; justify-content: "${Zt[i]||"center"}"">\n <img data-meta-align="${i}" data-meta-depth="${n}" src="${e.props.src}" alt="${e.props.alt}" width="${e.props.sizes.width}" height="${e.props.sizes.height}" objectFit="${e.props.fit}"></img>\n </div>`}},markdown:{serialize:(e,t)=>`\n`}}});!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))}}(".yoo-image-pointer-events-none{pointer-events:none}.yoo-image-invisible{visibility:hidden}.yoo-image-absolute{position:absolute}.yoo-image-relative{position:relative}.yoo-image-inset-0{inset:0}.yoo-image-left-0{left:0}.yoo-image-right-0{right:0}.yoo-image-top-0{top:0}.yoo-image-z-10{z-index:10}.yoo-image-z-\\[100\\]{z-index:100}.yoo-image-z-\\[81\\]{z-index:81}.yoo-image-m-\\[12px_0_6px\\]{margin:12px 0 6px}.yoo-image-m-\\[20px_0_10px\\]{margin:20px 0 10px}.yoo-image-mx-\\[4px\\]{margin-left:4px;margin-right:4px}.yoo-image-mx-auto{margin-left:auto;margin-right:auto}.yoo-image-my-0{margin-bottom:0;margin-top:0}.yoo-image-ml-\\[12px\\]{margin-left:12px}.yoo-image-mr-2{margin-right:.5rem}.yoo-image-mr-\\[12px\\]{margin-right:12px}.yoo-image-mt-4{margin-top:1rem}.yoo-image-mt-\\[4px\\]{margin-top:4px}.yoo-image-flex{display:flex}.yoo-image-inline-flex{display:inline-flex}.yoo-image-h-4{height:1rem}.yoo-image-h-\\[28px\\]{height:28px}.yoo-image-h-\\[32px\\]{height:32px}.yoo-image-h-\\[40px\\]{height:40px}.yoo-image-h-\\[48px\\]{height:48px}.yoo-image-h-full{height:100%}.yoo-image-max-h-\\[420px\\]{max-height:420px}.yoo-image-max-h-\\[50\\%\\]{max-height:50%}.yoo-image-w-4{width:1rem}.yoo-image-w-\\[15px\\]{width:15px}.yoo-image-w-\\[6px\\]{width:6px}.yoo-image-w-full{width:100%}.yoo-image-min-w-0{min-width:0}.yoo-image-min-w-\\[540px\\]{min-width:540px}.yoo-image-max-w-\\[300px\\]{max-width:300px}.yoo-image-max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.yoo-image-flex-shrink-0{flex-shrink:0}@keyframes yoo-image-spin{to{transform:rotate(1turn)}}.yoo-image-animate-spin{animation:yoo-image-spin 1s linear infinite}.yoo-image-cursor-col-resize{cursor:col-resize}.yoo-image-cursor-pointer{cursor:pointer}.yoo-image-cursor-text{cursor:text}.yoo-image-flex-col{flex-direction:column}.yoo-image-items-center{align-items:center}.yoo-image-justify-start{justify-content:flex-start}.yoo-image-justify-center{justify-content:center}.yoo-image-justify-between{justify-content:space-between}.yoo-image-overflow-hidden{overflow:hidden}.yoo-image-whitespace-nowrap{white-space:nowrap}.yoo-image-rounded-\\[20px\\]{border-radius:20px}.yoo-image-rounded-\\[3px\\]{border-radius:3px}.yoo-image-rounded-\\[4px\\]{border-radius:4px}.yoo-image-rounded-sm{border-radius:.125rem}.yoo-image-border{border-width:1px}.yoo-image-border-solid{border-style:solid}.yoo-image-border-none{border-style:none}.yoo-image-border-\\[rgba\\(255\\,255\\,255\\,0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}.yoo-image-border-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{border-color:rgba(55,53,47,.16)}.yoo-image-bg-\\[\\#FFFFFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.yoo-image-bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}.yoo-image-bg-\\[hsla\\(45\\,13\\%\\,94\\%\\,\\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}.yoo-image-bg-\\[rgb\\(35\\,131\\,226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}.yoo-image-bg-\\[rgba\\(15\\,15\\,15\\,0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}.yoo-image-bg-\\[rgba\\(35\\,131\\,226\\,0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}.yoo-image-bg-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{background-color:rgba(55,53,47,.16)}.yoo-image-bg-inherit{background-color:inherit}.yoo-image-fill-white{fill:#fff}.yoo-image-p-\\[0_8px\\]{padding:0 8px}.yoo-image-p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}.yoo-image-px-2{padding-left:.5rem;padding-right:.5rem}.yoo-image-px-\\[12px\\]{padding-left:12px;padding-right:12px}.yoo-image-px-\\[6px\\]{padding-left:6px;padding-right:6px}.yoo-image-px-\\[8px\\]{padding-left:8px;padding-right:8px}.yoo-image-py-1{padding-bottom:.25rem;padding-top:.25rem}.yoo-image-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.yoo-image-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.yoo-image-pb-\\[6px\\]{padding-bottom:6px}.yoo-image-pt-\\[6px\\]{padding-top:6px}.yoo-image-text-left{text-align:left}.yoo-image-text-\\[14px\\]{font-size:14px}.yoo-image-font-medium{font-weight:500}.yoo-image-leading-\\[1\\.2\\]{line-height:1.2}.yoo-image-leading-\\[120\\%\\]{line-height:120%}.yoo-image-leading-\\[20px\\]{line-height:20px}.yoo-image-text-\\[rgb\\(55\\,53\\,47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}.yoo-image-text-\\[rgba\\(55\\,53\\,47\\,0\\.65\\)\\]{color:rgba(55,53,47,.65)}.yoo-image-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.yoo-image-opacity-100{opacity:1}.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)}.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)}.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)}.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)}.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)}.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)}.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)}.yoo-image-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-image-duration-150{transition-duration:.15s}.yoo-image-duration-300{transition-duration:.3s}.yoo-image-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.yoopta-image .yoopta-image-options{opacity:0;transition:opacity .15s ease-in-out}.yoopta-image:hover .yoopta-image-options{opacity:1}.hover\\:yoo-image-bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.hover\\:yoo-image-bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}.disabled\\:yoo-image-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:yoo-image-bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}");export{Ut as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAuB,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAUtF,QAAA,MAAM,KAAK,8DAqET,CAAC;AAEH,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/image",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.7-rc.0",
|
|
4
4
|
"description": "Image plugin for Yoopta Editor",
|
|
5
5
|
"author": "Darginec05 <devopsbanda@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"@radix-ui/react-icons": "^1.3.0",
|
|
40
40
|
"re-resizable": "^6.9.11"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "0737ba6f3d55d313ed2c917569bd933e3a12c98b"
|
|
43
43
|
}
|