@yoopta/embed 4.0.0-rc.8 → 4.0.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 +2 -2
- package/dist/ui/Embed.d.ts +2 -1
- package/dist/ui/Embed.d.ts.map +1 -1
- package/dist/ui/Placeholder.d.ts.map +1 -1
- package/package.json +5 -5
- package/LICENSE +0 -21
- package/dist/index.es.js +0 -6
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@yoopta/editor"),e=require("react/jsx-runtime"),i=require("react"),n=require("react-dom");function o(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:function(){return t[i]}})}})),e.default=t,Object.freeze(e)}var r=o(i),s=o(n);function a(t,{threshold:e=0,root:n=null,rootMargin:o="0%",freezeOnceVisible:r=!1}={}){const[s,a]=i.useState({}),l=s.isIntersecting&&r,c=([t])=>a(t);return i.useEffect((()=>{const i=null==t?void 0:t.current;if(!window.IntersectionObserver||l||!i)return;const r=new IntersectionObserver(c,{threshold:e,root:n,rootMargin:o});return r.observe(i),()=>r.disconnect()}),[t,e,n,o,l]),s}const l={vimeo:function({provider:t,width:n,height:o,blockId:r}){const s=i.useRef(null),[l,c]=i.useState(null),[d,u]=i.useState(!1),{isIntersecting:p}=a(s,{freezeOnceVisible:!0,rootMargin:"50%"});return i.useEffect((()=>{fetch(`https://vimeo.com/api/v2/embed/${t.id}.json`).then((t=>t.json())).then((t=>c(t[0].thumbnail_medium))).catch((()=>c(null)))}),[t.id]),e.jsxs("div",Object.assign({ref:s,className:"yoo-video-relative"},{children:[e.jsx("img",{src:l||"",alt:"vimeo_embed_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:p&&d?0:1,zIndex:p&&d?-1:0}}),p&&e.jsx("iframe",{title:"Embed Player",src:`https://player.vimeo.com/embed/${t.id}?badge=0&byline=0&portrait=0&title=0`,frameBorder:0,allowFullScreen:!0,onLoad:()=>u(!0),className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0",width:n,height:o})]}))},youtube:function({provider:t,width:n,height:o,blockId:r}){const s=i.useRef(null),[l,c]=i.useState(!1),{isIntersecting:d}=a(s,{freezeOnceVisible:!0,rootMargin:"50%"});return e.jsxs("div",Object.assign({ref:s,className:"yoo-video-relative"},{children:[e.jsx("img",{src:`https://i.ytimg.com/vi/${t.id}/default.jpg`,alt:"youtube_embed_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:d&&l?0:1,zIndex:d&&l?-1:0}}),d&&e.jsx("iframe",{title:"Embed Player",src:`https://www.youtube.com/embed/${t.id}`,frameBorder:0,onLoad:()=>c(!0),allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0",width:n,height:o})]}))},dailymotion:function({provider:t,width:n,height:o,blockId:r}){const s=i.useRef(null),[l,c]=i.useState(null),[d,u]=i.useState(!1),{isIntersecting:p}=a(s,{freezeOnceVisible:!0,rootMargin:"50%"});return i.useEffect((()=>{var e;fetch((e=t.id,`https://api.dailymotion.com/embed/${e}?fields=thumbnail_url`)).then((t=>t.json())).then((t=>c(t.thumbnail_url))).catch((()=>c(null)))}),[t.id]),e.jsxs("div",Object.assign({ref:s,className:"yoo-video-relative"},{children:[e.jsx("img",{src:l||"",alt:"daylimotion_embed_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:p&&d?0:1,zIndex:p&&d?-1:0}}),p&&e.jsx("iframe",{title:"Dailymotion Embed Player",frameBorder:0,onLoad:()=>u(!0),src:`https://www.dailymotion.com/embed/embed/${t.id}`,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0",width:n,height:o})]}))},figma:({provider:t,width:n,height:o,blockId:r})=>{const s=i.useRef(null),{isIntersecting:l}=a(s,{freezeOnceVisible:!0,rootMargin:"50%"});return e.jsx("div",Object.assign({className:"yoo-video-relative",ref:s},{children:l&&e.jsx("iframe",{src:`https://www.figma.com/embed?embed_host=share&url=${encodeURIComponent(t.url)}`,frameBorder:0,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0",width:n,height:o})}))},twitter:function({provider:n,blockId:o}){const r=i.useRef(null),s=t.useYooptaEditor(),{isIntersecting:l}=a(r,{freezeOnceVisible:!0,rootMargin:"50%"}),c=`${o}-${n.id}`;return i.useEffect((()=>{var t;if(!l)return;const e=document.createElement("script");e.src="https://platform.twitter.com/widgets.js",null===(t=r.current)||void 0===t||t.appendChild(e),e.onload=()=>{window.twttr&&(window.twttr.widgets.createTweet(n.id,document.getElementById(c),{align:"center",conversation:"none",dnt:!0,theme:"dark",height:500,width:550}),s.blocks.Embed.updateElement(o,"embed",{sizes:{width:"auto",height:"auto"}}))}}),[n.id,l]),e.jsx("div",Object.assign({className:"w-full h-full",ref:r},{children:e.jsx("div",{id:c})}))}},c=({width:t,height:i,provider:n,blockId:o})=>{if(!n)return null;if(n&&n.id&&n.type&&l[n.type]){const r=l[n.type];return e.jsx(r,{provider:n,width:t,height:i,blockId:o})}return e.jsx("div",Object.assign({className:"w-full"},{children:e.jsx("iframe",{src:n.url,width:"100%",height:"100%",frameBorder:0,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"})}))};var d,u=(d=function(t,e){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},d(t,e)},function(t,e){function i(){this.constructor=t}d(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),p=function(){return p=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},p.apply(this,arguments)},h={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},f={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},g={width:"20px",height:"20px",position:"absolute"},m={top:p(p({},h),{top:"-5px"}),right:p(p({},f),{left:void 0,right:"-5px"}),bottom:p(p({},h),{top:void 0,bottom:"-5px"}),left:p(p({},f),{left:"-5px"}),topRight:p(p({},g),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:p(p({},g),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:p(p({},g),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:p(p({},g),{left:"-10px",top:"-10px",cursor:"nw-resize"})},x=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){e.props.onResizeStart(t,e.props.direction)},e.onTouchStart=function(t){e.props.onResizeStart(t,e.props.direction)},e}return u(e,t),e.prototype.render=function(){return r.createElement("div",{className:this.props.className||"",style:p(p({position:"absolute",userSelect:"none"},m[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},e}(r.PureComponent),w=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),b=function(){return b=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},b.apply(this,arguments)},v={width:"auto",height:"auto"},y=function(t,e,i){return Math.max(Math.min(t,i),e)},z=function(t,e){return Math.round(t/e)*e},R=function(t,e){return new RegExp(t,"i").test(e)},S=function(t){return Boolean(t.touches&&t.touches.length)},_=function(t,e,i){void 0===i&&(i=0);var n=e.reduce((function(i,n,o){return Math.abs(n-t)<Math.abs(e[i]-t)?o:i}),0),o=Math.abs(e[n]-t);return 0===i||o<i?e[n]:t},E=function(t){return"auto"===(t=t.toString())||t.endsWith("px")||t.endsWith("%")||t.endsWith("vh")||t.endsWith("vw")||t.endsWith("vmax")||t.endsWith("vmin")?t:t+"px"},C=function(t,e,i,n){if(t&&"string"==typeof t){if(t.endsWith("px"))return Number(t.replace("px",""));if(t.endsWith("%"))return e*(Number(t.replace("%",""))/100);if(t.endsWith("vw"))return i*(Number(t.replace("vw",""))/100);if(t.endsWith("vh"))return n*(Number(t.replace("vh",""))/100)}return t},j=["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"],k="__resizable_base__",O=function(t){function e(e){var i=t.call(this,e)||this;return i.ratio=1,i.resizable=null,i.parentLeft=0,i.parentTop=0,i.resizableLeft=0,i.resizableRight=0,i.resizableTop=0,i.resizableBottom=0,i.targetLeft=0,i.targetTop=0,i.appendBase=function(){if(!i.resizable||!i.window)return null;var t=i.parentNode;if(!t)return null;var e=i.window.document.createElement("div");return e.style.width="100%",e.style.height="100%",e.style.position="absolute",e.style.transform="scale(0, 0)",e.style.left="0",e.style.flex="0 0 100%",e.classList?e.classList.add(k):e.className+=k,t.appendChild(e),e},i.removeBase=function(t){var e=i.parentNode;e&&e.removeChild(t)},i.ref=function(t){t&&(i.resizable=t)},i.state={isResizing:!1,width:void 0===(i.propsSize&&i.propsSize.width)?"auto":i.propsSize&&i.propsSize.width,height:void 0===(i.propsSize&&i.propsSize.height)?"auto":i.propsSize&&i.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},i.onResizeStart=i.onResizeStart.bind(i),i.onMouseMove=i.onMouseMove.bind(i),i.onMouseUp=i.onMouseUp.bind(i),i}return w(e,t),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||v},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){var t=0,e=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,n=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),t="auto"!==this.resizable.style.width?this.resizable.offsetWidth:i,e="auto"!==this.resizable.style.height?this.resizable.offsetHeight:n,this.resizable.style.position=o}return{width:t,height:e}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sizeStyle",{get:function(){var t=this,e=this.props.size,i=function(e){if(void 0===t.state[e]||"auto"===t.state[e])return"auto";if(t.propsSize&&t.propsSize[e]&&t.propsSize[e].toString().endsWith("%")){if(t.state[e].toString().endsWith("%"))return t.state[e].toString();var i=t.getParentSize();return Number(t.state[e].toString().replace("px",""))/i[e]*100+"%"}return E(t.state[e])};return{width:e&&void 0!==e.width&&!this.state.isResizing?E(e.width):i("width"),height:e&&void 0!==e.height&&!this.state.isResizing?E(e.height):i("height")}},enumerable:!1,configurable:!0}),e.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var t=this.appendBase();if(!t)return{width:0,height:0};var e=!1,i=this.parentNode.style.flexWrap;"wrap"!==i&&(e=!0,this.parentNode.style.flexWrap="wrap"),t.style.position="relative",t.style.minWidth="100%",t.style.minHeight="100%";var n={width:t.offsetWidth,height:t.offsetHeight};return e&&(this.parentNode.style.flexWrap=i),this.removeBase(t),n},e.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))},e.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))},e.prototype.componentDidMount=function(){if(this.resizable&&this.window){var t=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==t.flexBasis?t.flexBasis:void 0})}},e.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},e.prototype.createSizeForCssProperty=function(t,e){var i=this.propsSize&&this.propsSize[e];return"auto"!==this.state[e]||this.state.original[e]!==t||void 0!==i&&"auto"!==i?t:"auto"},e.prototype.calculateNewMaxFromBoundary=function(t,e){var i,n,o=this.props.boundsByDirection,r=this.state.direction,s=o&&R("left",r),a=o&&R("top",r);if("parent"===this.props.bounds){var l=this.parentNode;l&&(i=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),n=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(i=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,n=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(i=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),n=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return i&&Number.isFinite(i)&&(t=t&&t<i?t:i),n&&Number.isFinite(n)&&(e=e&&e<n?e:n),{maxWidth:t,maxHeight:e}},e.prototype.calculateNewSizeFromDirection=function(t,e){var i=this.props.scale||1,n=this.props.resizeRatio||1,o=this.state,r=o.direction,s=o.original,a=this.props,l=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,d=a.lockAspectRatioExtraWidth,u=s.width,p=s.height,h=c||0,f=d||0;return R("right",r)&&(u=s.width+(t-s.x)*n/i,l&&(p=(u-f)/this.ratio+h)),R("left",r)&&(u=s.width-(t-s.x)*n/i,l&&(p=(u-f)/this.ratio+h)),R("bottom",r)&&(p=s.height+(e-s.y)*n/i,l&&(u=(p-h)*this.ratio+f)),R("top",r)&&(p=s.height-(e-s.y)*n/i,l&&(u=(p-h)*this.ratio+f)),{newWidth:u,newHeight:p}},e.prototype.calculateNewSizeFromAspectRatio=function(t,e,i,n){var o=this.props,r=o.lockAspectRatio,s=o.lockAspectRatioExtraHeight,a=o.lockAspectRatioExtraWidth,l=void 0===n.width?10:n.width,c=void 0===i.width||i.width<0?t:i.width,d=void 0===n.height?10:n.height,u=void 0===i.height||i.height<0?e:i.height,p=s||0,h=a||0;if(r){var f=(d-p)*this.ratio+h,g=(u-p)*this.ratio+h,m=(l-h)/this.ratio+p,x=(c-h)/this.ratio+p,w=Math.max(l,f),b=Math.min(c,g),v=Math.max(d,m),z=Math.min(u,x);t=y(t,w,b),e=y(e,v,z)}else t=y(t,l,c),e=y(e,d,u);return{newWidth:t,newHeight:e}},e.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var t=this.parentNode;if(t){var e=t.getBoundingClientRect();this.parentLeft=e.left,this.parentTop=e.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var n=this.resizable.getBoundingClientRect(),o=n.left,r=n.top,s=n.right,a=n.bottom;this.resizableLeft=o,this.resizableRight=s,this.resizableTop=r,this.resizableBottom=a}},e.prototype.onResizeStart=function(t,e){if(this.resizable&&this.window){var i,n=0,o=0;if(t.nativeEvent&&function(t){return Boolean((t.clientX||0===t.clientX)&&(t.clientY||0===t.clientY))}(t.nativeEvent)?(n=t.nativeEvent.clientX,o=t.nativeEvent.clientY):t.nativeEvent&&S(t.nativeEvent)&&(n=t.nativeEvent.touches[0].clientX,o=t.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(t,e,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 s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",i=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:n,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:b(b({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(t.target).cursor||"auto"}),direction:e,flexBasis:i};this.setState(l)}},e.prototype.onMouseMove=function(t){var e=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&S(t))try{t.preventDefault(),t.stopPropagation()}catch(t){}var i=this.props,o=i.maxWidth,r=i.maxHeight,s=i.minWidth,a=i.minHeight,l=S(t)?t.touches[0].clientX:t.clientX,c=S(t)?t.touches[0].clientY:t.clientY,d=this.state,u=d.direction,p=d.original,h=d.width,f=d.height,g=this.getParentSize(),m=function(t,e,i,n,o,r,s){return n=C(n,t.width,e,i),o=C(o,t.height,e,i),r=C(r,t.width,e,i),s=C(s,t.height,e,i),{maxWidth:void 0===n?void 0:Number(n),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===s?void 0:Number(s)}}(g,this.window.innerWidth,this.window.innerHeight,o,r,s,a);o=m.maxWidth,r=m.maxHeight,s=m.minWidth,a=m.minHeight;var x=this.calculateNewSizeFromDirection(l,c),w=x.newHeight,b=x.newWidth,v=this.calculateNewMaxFromBoundary(o,r);this.props.snap&&this.props.snap.x&&(b=_(b,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(w=_(w,this.props.snap.y,this.props.snapGap));var y=this.calculateNewSizeFromAspectRatio(b,w,{width:v.maxWidth,height:v.maxHeight},{width:s,height:a});if(b=y.newWidth,w=y.newHeight,this.props.grid){var R=z(b,this.props.grid[0]),E=z(w,this.props.grid[1]),j=this.props.snapGap||0;b=0===j||Math.abs(R-b)<=j?R:b,w=0===j||Math.abs(E-w)<=j?E:w}var k={width:b-p.width,height:w-p.height};if(h&&"string"==typeof h)if(h.endsWith("%"))b=b/g.width*100+"%";else if(h.endsWith("vw")){b=b/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){b=b/this.window.innerHeight*100+"vh"}if(f&&"string"==typeof f)if(f.endsWith("%"))w=w/g.height*100+"%";else if(f.endsWith("vw")){w=w/this.window.innerWidth*100+"vw"}else if(f.endsWith("vh")){w=w/this.window.innerHeight*100+"vh"}var O={width:this.createSizeForCssProperty(b,"width"),height:this.createSizeForCssProperty(w,"height")};"row"===this.flexDir?O.flexBasis=O.width:"column"===this.flexDir&&(O.flexBasis=O.height),n.flushSync((function(){e.setState(O)})),this.props.onResize&&this.props.onResize(t,u,this.resizable,k)}},e.prototype.onMouseUp=function(t){var e=this.state,i=e.isResizing,n=e.direction,o=e.original;if(i&&this.resizable){var r={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(t,n,this.resizable,r),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:b(b({},this.state.backgroundStyle),{cursor:"auto"})})}},e.prototype.updateSize=function(t){this.setState({width:t.width,height:t.height})},e.prototype.renderResizer=function(){var t=this,e=this.props,i=e.enable,n=e.handleStyles,o=e.handleClasses,s=e.handleWrapperStyle,a=e.handleWrapperClass,l=e.handleComponent;if(!i)return null;var c=Object.keys(i).map((function(e){return!1!==i[e]?r.createElement(x,{key:e,direction:e,onResizeStart:t.onResizeStart,replaceStyles:n&&n[e],className:o&&o[e]},l&&l[e]?l[e]:null):null}));return r.createElement("div",{className:a,style:s},c)},e.prototype.render=function(){var t=this,e=Object.keys(this.props).reduce((function(e,i){return-1!==j.indexOf(i)||(e[i]=t.props[i]),e}),{}),i=b(b(b({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&&(i.flexBasis=this.state.flexBasis);var n=this.props.as||"div";return r.createElement(n,b({ref:this.ref,style:i,className:this.props.className},e),this.state.isResizing&&r.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},e.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},e}(r.PureComponent);function N(t){return W(t)?(t.nodeName||"").toLowerCase():"#document"}function L(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function M(t){var e;return null==(e=(W(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function W(t){return t instanceof Node||t instanceof L(t).Node}function A(t){return t instanceof Element||t instanceof L(t).Element}function T(t){return t instanceof HTMLElement||t instanceof L(t).HTMLElement}function B(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof L(t).ShadowRoot)}function P(t){const{overflow:e,overflowX:i,overflowY:n,display:o}=V(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+i)&&!["inline","contents"].includes(o)}function I(t){return["table","td","th"].includes(N(t))}function H(t){const e=F(),i=V(t);return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some((t=>(i.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(i.contain||"").includes(t)))}function F(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function D(t){return["html","body","#document"].includes(N(t))}function V(t){return L(t).getComputedStyle(t)}function U(t){return A(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Y(t){if("html"===N(t))return t;const e=t.assignedSlot||t.parentNode||B(t)&&t.host||M(t);return B(e)?e.host:e}function $(t){const e=Y(t);return D(e)?t.ownerDocument?t.ownerDocument.body:t.body:T(e)&&P(e)?e:$(e)}function X(t,e,i){var n;void 0===e&&(e=[]),void 0===i&&(i=!0);const o=$(t),r=o===(null==(n=t.ownerDocument)?void 0:n.body),s=L(o);return r?e.concat(s,s.visualViewport||[],P(o)?o:[],s.frameElement&&i?X(s.frameElement):[]):e.concat(o,X(o,[],i))}const q=Math.min,G=Math.max,Z=Math.round,J=t=>({x:t,y:t}),K={left:"right",right:"left",bottom:"top",top:"bottom"},Q={start:"end",end:"start"};function tt(t,e,i){return G(t,q(e,i))}function et(t,e){return"function"==typeof t?t(e):t}function it(t){return t.split("-")[0]}function nt(t){return t.split("-")[1]}function ot(t){return"x"===t?"y":"x"}function rt(t){return"y"===t?"height":"width"}function st(t){return["top","bottom"].includes(it(t))?"y":"x"}function at(t){return ot(st(t))}function lt(t){return t.replace(/start|end/g,(t=>Q[t]))}function ct(t){return t.replace(/left|right|bottom|top/g,(t=>K[t]))}function dt(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function ut(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function pt(t,e,i){let{reference:n,floating:o}=t;const r=st(e),s=at(e),a=rt(s),l=it(e),c="y"===r,d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,p=n[a]/2-o[a]/2;let h;switch(l){case"top":h={x:d,y:n.y-o.height};break;case"bottom":h={x:d,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-o.width,y:u};break;default:h={x:n.x,y:n.y}}switch(nt(e)){case"start":h[s]-=p*(i&&c?-1:1);break;case"end":h[s]+=p*(i&&c?-1:1)}return h}async function ht(t,e){var i;void 0===e&&(e={});const{x:n,y:o,platform:r,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=et(e,t),f=dt(h),g=a[p?"floating"===u?"reference":"floating":u],m=ut(await r.getClippingRect({element:null==(i=await(null==r.isElement?void 0:r.isElement(g)))||i?g:g.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),x="floating"===u?{...s.floating,x:n,y:o}:s.reference,w=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),b=await(null==r.isElement?void 0:r.isElement(w))&&await(null==r.getScale?void 0:r.getScale(w))||{x:1,y:1},v=ut(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:w,strategy:l}):x);return{top:(m.top-v.top+f.top)/b.y,bottom:(v.bottom-m.bottom+f.bottom)/b.y,left:(m.left-v.left+f.left)/b.x,right:(v.right-m.right+f.right)/b.x}}function ft(t){const e=q(...t.map((t=>t.left))),i=q(...t.map((t=>t.top)));return{x:e,y:i,width:G(...t.map((t=>t.right)))-e,height:G(...t.map((t=>t.bottom)))-i}}const gt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var i,n;const{x:o,y:r,placement:s,middlewareData:a}=e,l=await async function(t,e){const{placement:i,platform:n,elements:o}=t,r=await(null==n.isRTL?void 0:n.isRTL(o.floating)),s=it(i),a=nt(i),l="y"===st(i),c=["left","top"].includes(s)?-1:1,d=r&&l?-1:1,u=et(e,t);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&"number"==typeof f&&(h="end"===a?-1*f:f),l?{x:h*d,y:p*c}:{x:p*c,y:h*d}}(e,t);return s===(null==(i=a.offset)?void 0:i.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:o+l.x,y:r+l.y,data:{...l,placement:s}}}}};function mt(t){const e=V(t);let i=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=T(t),r=o?t.offsetWidth:i,s=o?t.offsetHeight:n,a=Z(i)!==r||Z(n)!==s;return a&&(i=r,n=s),{width:i,height:n,$:a}}function xt(t){return A(t)?t:t.contextElement}function wt(t){const e=xt(t);if(!T(e))return J(1);const i=e.getBoundingClientRect(),{width:n,height:o,$:r}=mt(e);let s=(r?Z(i.width):i.width)/n,a=(r?Z(i.height):i.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const bt=J(0);function vt(t){const e=L(t);return F()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:bt}function yt(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1);const o=t.getBoundingClientRect(),r=xt(t);let s=J(1);e&&(n?A(n)&&(s=wt(n)):s=wt(t));const a=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==L(t))&&e}(r,i,n)?vt(r):J(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(r){const t=L(r),e=n&&A(n)?L(n):n;let i=t,o=i.frameElement;for(;o&&n&&e!==i;){const t=wt(o),e=o.getBoundingClientRect(),n=V(o),r=e.left+(o.clientLeft+parseFloat(n.paddingLeft))*t.x,s=e.top+(o.clientTop+parseFloat(n.paddingTop))*t.y;l*=t.x,c*=t.y,d*=t.x,u*=t.y,l+=r,c+=s,i=L(o),o=i.frameElement}}return ut({width:d,height:u,x:l,y:c})}const zt=[":popover-open",":modal"];function Rt(t){return zt.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function St(t){return yt(M(t)).left+U(t).scrollLeft}function _t(t,e,i){let n;if("viewport"===e)n=function(t,e){const i=L(t),n=M(t),o=i.visualViewport;let r=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){r=o.width,s=o.height;const t=F();(!t||t&&"fixed"===e)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:a,y:l}}(t,i);else if("document"===e)n=function(t){const e=M(t),i=U(t),n=t.ownerDocument.body,o=G(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=G(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-i.scrollLeft+St(t);const a=-i.scrollTop;return"rtl"===V(n).direction&&(s+=G(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:s,y:a}}(M(t));else if(A(e))n=function(t,e){const i=yt(t,!0,"fixed"===e),n=i.top+t.clientTop,o=i.left+t.clientLeft,r=T(t)?wt(t):J(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:n*r.y}}(e,i);else{const i=vt(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return ut(n)}function Et(t,e){const i=Y(t);return!(i===e||!A(i)||D(i))&&("fixed"===V(i).position||Et(i,e))}function Ct(t,e,i){const n=T(e),o=M(e),r="fixed"===i,s=yt(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=J(0);if(n||!n&&!r)if(("body"!==N(e)||P(o))&&(a=U(e)),n){const t=yt(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else o&&(l.x=St(o));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function jt(t,e){return T(t)&&"fixed"!==V(t).position?e?e(t):t.offsetParent:null}function kt(t,e){const i=L(t);if(!T(t)||Rt(t))return i;let n=jt(t,e);for(;n&&I(n)&&"static"===V(n).position;)n=jt(n,e);return n&&("html"===N(n)||"body"===N(n)&&"static"===V(n).position&&!H(n))?i:n||function(t){let e=Y(t);for(;T(e)&&!D(e);){if(H(e))return e;e=Y(e)}return null}(t)||i}const Ot={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:i,offsetParent:n,strategy:o}=t;const r="fixed"===o,s=M(n),a=!!e&&Rt(e.floating);if(n===s||a&&r)return i;let l={scrollLeft:0,scrollTop:0},c=J(1);const d=J(0),u=T(n);if((u||!u&&!r)&&(("body"!==N(n)||P(s))&&(l=U(n)),T(n))){const t=yt(n);c=wt(n),d.x=t.x+n.clientLeft,d.y=t.y+n.clientTop}return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-l.scrollLeft*c.x+d.x,y:i.y*c.y-l.scrollTop*c.y+d.y}},getDocumentElement:M,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:n,strategy:o}=t;const r=[..."clippingAncestors"===i?function(t,e){const i=e.get(t);if(i)return i;let n=X(t,[],!1).filter((t=>A(t)&&"body"!==N(t))),o=null;const r="fixed"===V(t).position;let s=r?Y(t):t;for(;A(s)&&!D(s);){const e=V(s),i=H(s);i||"fixed"!==e.position||(o=null),(r?!i&&!o:!i&&"static"===e.position&&o&&["absolute","fixed"].includes(o.position)||P(s)&&!i&&Et(t,s))?n=n.filter((t=>t!==s)):o=e,s=Y(s)}return e.set(t,n),n}(e,this._c):[].concat(i),n],s=r[0],a=r.reduce(((t,i)=>{const n=_t(e,i,o);return t.top=G(n.top,t.top),t.right=q(n.right,t.right),t.bottom=q(n.bottom,t.bottom),t.left=G(n.left,t.left),t}),_t(e,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:kt,getElementRects:async function(t){const e=this.getOffsetParent||kt,i=this.getDimensions;return{reference:Ct(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await i(t.floating)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:i}=mt(t);return{width:e,height:i}},getScale:wt,isElement:A,isRTL:function(t){return"rtl"===V(t).direction}},Nt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:n,placement:o}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...l}=et(t,e),c={x:i,y:n},d=await ht(e,l),u=st(it(o)),p=ot(u);let h=c[p],f=c[u];if(r){const t="y"===p?"bottom":"right";h=tt(h+d["y"===p?"top":"left"],h,h-d[t])}if(s){const t="y"===u?"bottom":"right";f=tt(f+d["y"===u?"top":"left"],f,f-d[t])}const g=a.fn({...e,[p]:h,[u]:f});return{...g,data:{x:g.x-i,y:g.y-n}}}}},Lt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i,n;const{placement:o,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...m}=et(t,e);if(null!=(i=r.arrow)&&i.alignmentOffset)return{};const x=it(o),w=it(a)===a,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),v=p||(w||!g?[ct(a)]:function(t){const e=ct(t);return[lt(t),e,lt(e)]}(a));p||"none"===f||v.push(...function(t,e,i,n){const o=nt(t);let r=function(t,e,i){const n=["left","right"],o=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return i?e?o:n:e?n:o;case"left":case"right":return e?r:s;default:return[]}}(it(t),"start"===i,n);return o&&(r=r.map((t=>t+"-"+o)),e&&(r=r.concat(r.map(lt)))),r}(a,g,f,b));const y=[a,...v],z=await ht(e,m),R=[];let S=(null==(n=r.flip)?void 0:n.overflows)||[];if(d&&R.push(z[x]),u){const t=function(t,e,i){void 0===i&&(i=!1);const n=nt(t),o=at(t),r=rt(o);let s="x"===o?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=ct(s)),[s,ct(s)]}(o,s,b);R.push(z[t[0]],z[t[1]])}if(S=[...S,{placement:o,overflows:R}],!R.every((t=>t<=0))){var _,E;const t=((null==(_=r.flip)?void 0:_.index)||0)+1,e=y[t];if(e)return{data:{index:t,overflows:S},reset:{placement:e}};let i=null==(E=S.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:E.placement;if(!i)switch(h){case"bestFit":{var C;const t=null==(C=S.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:C[0];t&&(i=t);break}case"initialPlacement":i=a}if(o!==i)return{reset:{placement:i}}}return{}}}},Mt=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:i,elements:n,rects:o,platform:r,strategy:s}=e,{padding:a=2,x:l,y:c}=et(t,e),d=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(n.reference))||[]),u=function(t){const e=t.slice().sort(((t,e)=>t.y-e.y)),i=[];let n=null;for(let t=0;t<e.length;t++){const o=e[t];!n||o.y-n.y>n.height/2?i.push([o]):i[i.length-1].push(o),n=o}return i.map((t=>ut(ft(t))))}(d),p=ut(ft(d)),h=dt(a);const f=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=l&&null!=c)return u.find((t=>l>t.left-h.left&&l<t.right+h.right&&c>t.top-h.top&&c<t.bottom+h.bottom))||p;if(u.length>=2){if("y"===st(i)){const t=u[0],e=u[u.length-1],n="top"===it(i),o=t.top,r=e.bottom,s=n?t.left:e.left,a=n?t.right:e.right;return{top:o,bottom:r,left:s,right:a,width:a-s,height:r-o,x:s,y:o}}const t="left"===it(i),e=G(...u.map((t=>t.right))),n=q(...u.map((t=>t.left))),o=u.filter((i=>t?i.left===n:i.right===e)),r=o[0].top,s=o[o.length-1].bottom;return{top:r,bottom:s,left:n,right:e,width:e-n,height:s-r,x:n,y:r}}return p}},floating:n.floating,strategy:s});return o.reference.x!==f.reference.x||o.reference.y!==f.reference.y||o.reference.width!==f.reference.width||o.reference.height!==f.reference.height?{reset:{rects:f}}:{}}}},Wt=(t,e,i)=>{const n=new Map,o={platform:Ot,...i},r={...o.platform,_c:n};return(async(t,e,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:r=[],platform:s}=i,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:d,y:u}=pt(c,n,l),p=n,h={},f=0;for(let i=0;i<a.length;i++){const{name:r,fn:g}=a[i],{x:m,y:x,data:w,reset:b}=await g({x:d,y:u,initialPlacement:n,placement:p,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:t,floating:e}});d=null!=m?m:d,u=null!=x?x:u,h={...h,[r]:{...h[r],...w}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:t,floating:e,strategy:o}):b.rects),({x:d,y:u}=pt(c,p,l))),i=-1)}return{x:d,y:u,placement:p,strategy:o,middlewareData:h}})(t,e,{...o,platform:r})};var At="undefined"!=typeof document?i.useLayoutEffect:i.useEffect;function Tt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;let i,n,o;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if(i=t.length,i!==e.length)return!1;for(n=i;0!=n--;)if(!Tt(t[n],e[n]))return!1;return!0}if(o=Object.keys(t),i=o.length,i!==Object.keys(e).length)return!1;for(n=i;0!=n--;)if(!{}.hasOwnProperty.call(e,o[n]))return!1;for(n=i;0!=n--;){const i=o[n];if(("_owner"!==i||!t.$$typeof)&&!Tt(t[i],e[i]))return!1}return!0}return t!=t&&e!=e}function Bt(t){if("undefined"==typeof window)return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Pt(t,e){const i=Bt(t);return Math.round(e*i)/i}function It(t){const e=r.useRef(t);return At((()=>{e.current=t})),e}
|
|
1
|
+
import{useYooptaEditor as e,UI as t,useBlockData as o,useYooptaPluginOptions as i,useYooptaReadOnly as n,useBlockSelected as r,YooptaPlugin as s,generateId as a}from"@yoopta/editor";import{jsxs as d,jsx as l}from"react/jsx-runtime";import*as c from"react";import{useState as p,useEffect as u,useRef as h,useLayoutEffect as f,forwardRef as m,createElement as b,useMemo as y}from"react";import*as g from"react-dom";import{flushSync as w,createPortal as x}from"react-dom";function v(e,{threshold:t=0,root:o=null,rootMargin:i="0%",freezeOnceVisible:n=!1}={}){const[r,s]=p({}),a=r.isIntersecting&&n,d=([e])=>s(e);return u((()=>{const n=null==e?void 0:e.current;if(!window.IntersectionObserver||a||!n)return;const r=new IntersectionObserver(d,{threshold:t,root:o,rootMargin:i});return r.observe(n),()=>r.disconnect()}),[e,t,o,i,a]),r}const z={vimeo:function({provider:e,width:t,height:o,blockId:i}){const n=h(null),[r,s]=p(null),[a,c]=p(!1),{isIntersecting:f}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return u((()=>{fetch(`https://vimeo.com/api/v2/embed/${e.id}.json`).then((e=>e.json())).then((e=>s(e[0].thumbnail_medium))).catch((()=>s(null)))}),[e.id]),d("div",Object.assign({ref:n,className:"yoo-embed-relative"},{children:[l("img",{src:r||"",alt:"vimeo_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:f&&a?0:1,zIndex:f&&a?-1:0}}),f&&l("iframe",{title:"Embed Player",src:`https://player.vimeo.com/embed/${e.id}?badge=0&byline=0&portrait=0&title=0`,frameBorder:0,allowFullScreen:!0,onLoad:()=>c(!0),className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})]}))},youtube:function({provider:e,width:t,height:o,blockId:i}){const n=h(null),[r,s]=p(!1),{isIntersecting:a}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return d("div",Object.assign({ref:n,className:"yoo-embed-relative"},{children:[l("img",{src:`https://i.ytimg.com/vi/${e.id}/default.jpg`,alt:"youtube_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:a&&r?0:1,zIndex:a&&r?-1:0}}),a&&l("iframe",{title:"Embed Player",src:`https://www.youtube.com/embed/${e.id}`,frameBorder:0,onLoad:()=>s(!0),allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})]}))},dailymotion:function({provider:e,width:t,height:o,blockId:i}){const n=h(null),[r,s]=p(null),[a,c]=p(!1),{isIntersecting:f}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return u((()=>{var t;fetch((t=e.id,`https://api.dailymotion.com/embed/${t}?fields=thumbnail_url`)).then((e=>e.json())).then((e=>s(e.thumbnail_url))).catch((()=>s(null)))}),[e.id]),d("div",Object.assign({ref:n,className:"yoo-embed-relative"},{children:[l("img",{src:r||"",alt:"daylimotion_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:f&&a?0:1,zIndex:f&&a?-1:0}}),f&&l("iframe",{title:"Dailymotion Embed Player",frameBorder:0,onLoad:()=>c(!0),src:`https://www.dailymotion.com/embed/embed/${e.id}`,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})]}))},figma:({provider:e,width:t,height:o,blockId:i})=>{const n=h(null),{isIntersecting:r}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return l("div",Object.assign({className:"yoo-embed-relative",ref:n},{children:r&&l("iframe",{src:`https://www.figma.com/embed?embed_host=share&url=${encodeURIComponent(e.url)}`,frameBorder:0,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})}))},twitter:function({provider:t,blockId:o}){const i=h(null),n=e(),{isIntersecting:r}=v(i,{freezeOnceVisible:!0,rootMargin:"50%"}),s=`${o}-${t.id}`;return u((()=>{var e;if(!r)return;const a=document.createElement("script");a.src="https://platform.twitter.com/widgets.js",null===(e=i.current)||void 0===e||e.appendChild(a),a.onload=()=>{window.twttr&&(window.twttr.widgets.createTweet(t.id,document.getElementById(s),{align:"center",conversation:"none",dnt:!0,theme:"dark",height:500,width:550}),n.blocks.Embed.updateElement(o,"embed",{sizes:{width:"auto",height:"auto"}}))}}),[t.id,r]),l("div",Object.assign({className:"yoo-embed-w-full yoo-embed-h-full",ref:i},{children:l("div",{id:s})}))}},R=({width:e,height:t,provider:o,blockId:i})=>{if(!o)return null;if(o&&o.id&&o.type&&z[o.type]){const n=z[o.type];return l(n,{provider:o,width:e,height:t,blockId:i})}return l("div",Object.assign({className:"yoo-embed-w-full"},{children:l("iframe",{src:o.url,width:"100%",height:"100%",frameBorder:0,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0"})}))};var S,_=(S=function(e,t){return S=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])},S(e,t)},function(e,t){function o(){this.constructor=e}S(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),E=function(){return E=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},E.apply(this,arguments)},C={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},k={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},O={width:"20px",height:"20px",position:"absolute"},N={top:E(E({},C),{top:"-5px"}),right:E(E({},k),{left:void 0,right:"-5px"}),bottom:E(E({},C),{top:void 0,bottom:"-5px"}),left:E(E({},k),{left:"-5px"}),topRight:E(E({},O),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:E(E({},O),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:E(E({},O),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:E(E({},O),{left:"-10px",top:"-10px",cursor:"nw-resize"})},L=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return _(t,e),t.prototype.render=function(){return c.createElement("div",{className:this.props.className||"",style:E(E({position:"absolute",userSelect:"none"},N[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(c.PureComponent),M=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)}}(),W=function(){return W=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},W.apply(this,arguments)},A={width:"auto",height:"auto"},T=function(e,t,o){return Math.max(Math.min(e,o),t)},j=function(e,t){return Math.round(e/t)*t},B=function(e,t){return new RegExp(e,"i").test(t)},I=function(e){return Boolean(e.touches&&e.touches.length)},F=function(e,t,o){void 0===o&&(o=0);var i=t.reduce((function(o,i,n){return Math.abs(i-e)<Math.abs(t[o]-e)?n:o}),0),n=Math.abs(t[i]-e);return 0===o||n<o?t[i]:e},P=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},H=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},D=["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__",U=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 M(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||A},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,i=this.resizable.offsetHeight,n=this.resizable.style.position;"relative"!==n&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:o,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=n}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,o=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var o=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/o[t]*100+"%"}return P(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?P(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?P(t.height):o("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,o=this.parentNode.style.flexWrap;"wrap"!==o&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=o),this.removeBase(e),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var o=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==o&&"auto"!==o?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var o,i,n=this.props.boundsByDirection,r=this.state.direction,s=n&&B("left",r),a=n&&B("top",r);if("parent"===this.props.bounds){var d=this.parentNode;d&&(o=s?this.resizableRight-this.parentLeft:d.offsetWidth+(this.parentLeft-this.resizableLeft),i=a?this.resizableBottom-this.parentTop:d.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(o=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=a?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,s=n.original,a=this.props,d=a.lockAspectRatio,l=a.lockAspectRatioExtraHeight,c=a.lockAspectRatioExtraWidth,p=s.width,u=s.height,h=l||0,f=c||0;return B("right",r)&&(p=s.width+(e-s.x)*i/o,d&&(u=(p-f)/this.ratio+h)),B("left",r)&&(p=s.width-(e-s.x)*i/o,d&&(u=(p-f)/this.ratio+h)),B("bottom",r)&&(u=s.height+(t-s.y)*i/o,d&&(p=(u-h)*this.ratio+f)),B("top",r)&&(u=s.height-(t-s.y)*i/o,d&&(p=(u-h)*this.ratio+f)),{newWidth:p,newHeight:u}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,o,i){var n=this.props,r=n.lockAspectRatio,s=n.lockAspectRatioExtraHeight,a=n.lockAspectRatioExtraWidth,d=void 0===i.width?10:i.width,l=void 0===o.width||o.width<0?e:o.width,c=void 0===i.height?10:i.height,p=void 0===o.height||o.height<0?t:o.height,u=s||0,h=a||0;if(r){var f=(c-u)*this.ratio+h,m=(p-u)*this.ratio+h,b=(d-h)/this.ratio+u,y=(l-h)/this.ratio+u,g=Math.max(d,f),w=Math.min(l,m),x=Math.max(c,b),v=Math.min(p,y);e=T(e,g,w),t=T(t,x,v)}else e=T(e,d,l),t=T(t,c,p);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var i=this.resizable.getBoundingClientRect(),n=i.left,r=i.top,s=i.right,a=i.bottom;this.resizableLeft=n,this.resizableRight=s,this.resizableTop=r,this.resizableBottom=a}},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&&I(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 s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",o=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var d={original:{x:i,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:W(W({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:o};this.setState(d)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&I(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var o=this.props,i=o.maxWidth,n=o.maxHeight,r=o.minWidth,s=o.minHeight,a=I(e)?e.touches[0].clientX:e.clientX,d=I(e)?e.touches[0].clientY:e.clientY,l=this.state,c=l.direction,p=l.original,u=l.width,h=l.height,f=this.getParentSize(),m=function(e,t,o,i,n,r,s){return i=H(i,e.width,t,o),n=H(n,e.height,t,o),r=H(r,e.width,t,o),s=H(s,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===s?void 0:Number(s)}}(f,this.window.innerWidth,this.window.innerHeight,i,n,r,s);i=m.maxWidth,n=m.maxHeight,r=m.minWidth,s=m.minHeight;var b=this.calculateNewSizeFromDirection(a,d),y=b.newHeight,g=b.newWidth,x=this.calculateNewMaxFromBoundary(i,n);this.props.snap&&this.props.snap.x&&(g=F(g,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(y=F(y,this.props.snap.y,this.props.snapGap));var v=this.calculateNewSizeFromAspectRatio(g,y,{width:x.maxWidth,height:x.maxHeight},{width:r,height:s});if(g=v.newWidth,y=v.newHeight,this.props.grid){var z=j(g,this.props.grid[0]),R=j(y,this.props.grid[1]),S=this.props.snapGap||0;g=0===S||Math.abs(z-g)<=S?z:g,y=0===S||Math.abs(R-y)<=S?R:y}var _={width:g-p.width,height:y-p.height};if(u&&"string"==typeof u)if(u.endsWith("%"))g=g/f.width*100+"%";else if(u.endsWith("vw")){g=g/this.window.innerWidth*100+"vw"}else if(u.endsWith("vh")){g=g/this.window.innerHeight*100+"vh"}if(h&&"string"==typeof h)if(h.endsWith("%"))y=y/f.height*100+"%";else if(h.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}var E={width:this.createSizeForCssProperty(g,"width"),height:this.createSizeForCssProperty(y,"height")};"row"===this.flexDir?E.flexBasis=E.width:"column"===this.flexDir&&(E.flexBasis=E.height),w((function(){t.setState(E)})),this.props.onResize&&this.props.onResize(e,c,this.resizable,_)}},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:W(W({},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,s=t.handleWrapperClass,a=t.handleComponent;if(!o)return null;var d=Object.keys(o).map((function(t){return!1!==o[t]?c.createElement(L,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:n&&n[t]},a&&a[t]?a[t]:null):null}));return c.createElement("div",{className:s,style:r},d)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,o){return-1!==D.indexOf(o)||(t[o]=e.props[o]),t}),{}),o=W(W(W({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 c.createElement(i,W({ref:this.ref,style:o,className:this.props.className},t),this.state.isResizing&&c.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}(c.PureComponent);function $(e){return G(e)?(e.nodeName||"").toLowerCase():"#document"}function X(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Y(e){var t;return null==(t=(G(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function G(e){return e instanceof Node||e instanceof X(e).Node}function Z(e){return e instanceof Element||e instanceof X(e).Element}function q(e){return e instanceof HTMLElement||e instanceof X(e).HTMLElement}function J(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof X(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($(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($(e))}function ie(e){return X(e).getComputedStyle(e)}function ne(e){return Z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function re(e){if("html"===$(e))return e;const t=e.assignedSlot||e.parentNode||J(e)&&e.host||Y(e);return J(t)?t.host:t}function se(e){const t=re(e);return oe(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&K(t)?t:se(t)}function ae(e,t,o){var i;void 0===t&&(t=[]),void 0===o&&(o=!0);const n=se(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),s=X(n);return r?t.concat(s,s.visualViewport||[],K(n)?n:[],s.frameElement&&o?ae(s.frameElement):[]):t.concat(n,ae(n,[],o))}const de=Math.min,le=Math.max,ce=Math.round,pe=e=>({x:e,y:e}),ue={left:"right",right:"left",bottom:"top",top:"bottom"},he={start:"end",end:"start"};function fe(e,t,o){return le(e,de(t,o))}function me(e,t){return"function"==typeof e?e(t):e}function be(e){return e.split("-")[0]}function ye(e){return e.split("-")[1]}function ge(e){return"x"===e?"y":"x"}function we(e){return"y"===e?"height":"width"}function xe(e){return["top","bottom"].includes(be(e))?"y":"x"}function ve(e){return ge(xe(e))}function ze(e){return e.replace(/start|end/g,(e=>he[e]))}function Re(e){return e.replace(/left|right|bottom|top/g,(e=>ue[e]))}function Se(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 _e(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Ee(e,t,o){let{reference:i,floating:n}=e;const r=xe(t),s=ve(t),a=we(s),d=be(t),l="y"===r,c=i.x+i.width/2-n.width/2,p=i.y+i.height/2-n.height/2,u=i[a]/2-n[a]/2;let h;switch(d){case"top":h={x:c,y:i.y-n.height};break;case"bottom":h={x:c,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:p};break;case"left":h={x:i.x-n.width,y:p};break;default:h={x:i.x,y:i.y}}switch(ye(t)){case"start":h[s]-=u*(o&&l?-1:1);break;case"end":h[s]+=u*(o&&l?-1:1)}return h}async function Ce(e,t){var o;void 0===t&&(t={});const{x:i,y:n,platform:r,rects:s,elements:a,strategy:d}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:p="floating",altBoundary:u=!1,padding:h=0}=me(t,e),f=Se(h),m=a[u?"floating"===p?"reference":"floating":p],b=_e(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(a.floating)),boundary:l,rootBoundary:c,strategy:d})),y="floating"===p?{...s.floating,x:i,y:n}:s.reference,g=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),w=await(null==r.isElement?void 0:r.isElement(g))&&await(null==r.getScale?void 0:r.getScale(g))||{x:1,y:1},x=_e(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:d}):y);return{top:(b.top-x.top+f.top)/w.y,bottom:(x.bottom-b.bottom+f.bottom)/w.y,left:(b.left-x.left+f.left)/w.x,right:(x.right-b.right+f.right)/w.x}}function ke(e){const t=de(...e.map((e=>e.left))),o=de(...e.map((e=>e.top)));return{x:t,y:o,width:le(...e.map((e=>e.right)))-t,height:le(...e.map((e=>e.bottom)))-o}}const Oe=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,i;const{x:n,y:r,placement:s,middlewareData:a}=t,d=await async function(e,t){const{placement:o,platform:i,elements:n}=e,r=await(null==i.isRTL?void 0:i.isRTL(n.floating)),s=be(o),a=ye(o),d="y"===xe(o),l=["left","top"].includes(s)?-1:1,c=r&&d?-1:1,p=me(t,e);let{mainAxis:u,crossAxis:h,alignmentAxis:f}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return a&&"number"==typeof f&&(h="end"===a?-1*f:f),d?{x:h*c,y:u*l}:{x:u*l,y:h*c}}(t,e);return s===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:n+d.x,y:r+d.y,data:{...d,placement:s}}}}};function Ne(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,s=n?e.offsetHeight:i,a=ce(o)!==r||ce(i)!==s;return a&&(o=r,i=s),{width:o,height:i,$:a}}function Le(e){return Z(e)?e:e.contextElement}function Me(e){const t=Le(e);if(!q(t))return pe(1);const o=t.getBoundingClientRect(),{width:i,height:n,$:r}=Ne(t);let s=(r?ce(o.width):o.width)/i,a=(r?ce(o.height):o.height)/n;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const We=pe(0);function Ae(e){const t=X(e);return te()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:We}function Te(e,t,o,i){void 0===t&&(t=!1),void 0===o&&(o=!1);const n=e.getBoundingClientRect(),r=Le(e);let s=pe(1);t&&(i?Z(i)&&(s=Me(i)):s=Me(e));const a=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==X(e))&&t}(r,o,i)?Ae(r):pe(0);let d=(n.left+a.x)/s.x,l=(n.top+a.y)/s.y,c=n.width/s.x,p=n.height/s.y;if(r){const e=X(r),t=i&&Z(i)?X(i):i;let o=e,n=o.frameElement;for(;n&&i&&t!==o;){const e=Me(n),t=n.getBoundingClientRect(),i=ie(n),r=t.left+(n.clientLeft+parseFloat(i.paddingLeft))*e.x,s=t.top+(n.clientTop+parseFloat(i.paddingTop))*e.y;d*=e.x,l*=e.y,c*=e.x,p*=e.y,d+=r,l+=s,o=X(n),n=o.frameElement}}return _e({width:c,height:p,x:d,y:l})}const je=[":popover-open",":modal"];function Be(e){return je.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Ie(e){return Te(Y(e)).left+ne(e).scrollLeft}function Fe(e,t,o){let i;if("viewport"===t)i=function(e,t){const o=X(e),i=Y(e),n=o.visualViewport;let r=i.clientWidth,s=i.clientHeight,a=0,d=0;if(n){r=n.width,s=n.height;const e=te();(!e||e&&"fixed"===t)&&(a=n.offsetLeft,d=n.offsetTop)}return{width:r,height:s,x:a,y:d}}(e,o);else if("document"===t)i=function(e){const t=Y(e),o=ne(e),i=e.ownerDocument.body,n=le(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=le(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+Ie(e);const a=-o.scrollTop;return"rtl"===ie(i).direction&&(s+=le(t.clientWidth,i.clientWidth)-n),{width:n,height:r,x:s,y:a}}(Y(e));else if(Z(t))i=function(e,t){const o=Te(e,!0,"fixed"===t),i=o.top+e.clientTop,n=o.left+e.clientLeft,r=q(e)?Me(e):pe(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=Ae(e);i={...t,x:t.x-o.x,y:t.y-o.y}}return _e(i)}function Pe(e,t){const o=re(e);return!(o===t||!Z(o)||oe(o))&&("fixed"===ie(o).position||Pe(o,t))}function He(e,t,o){const i=q(t),n=Y(t),r="fixed"===o,s=Te(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const d=pe(0);if(i||!i&&!r)if(("body"!==$(t)||K(n))&&(a=ne(t)),i){const e=Te(t,!0,r,t);d.x=e.x+t.clientLeft,d.y=e.y+t.clientTop}else n&&(d.x=Ie(n));return{x:s.left+a.scrollLeft-d.x,y:s.top+a.scrollTop-d.y,width:s.width,height:s.height}}function De(e,t){return q(e)&&"fixed"!==ie(e).position?t?t(e):e.offsetParent:null}function Ve(e,t){const o=X(e);if(!q(e)||Be(e))return o;let i=De(e,t);for(;i&&Q(i)&&"static"===ie(i).position;)i=De(i,t);return i&&("html"===$(i)||"body"===$(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 Ue={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:i,strategy:n}=e;const r="fixed"===n,s=Y(i),a=!!t&&Be(t.floating);if(i===s||a&&r)return o;let d={scrollLeft:0,scrollTop:0},l=pe(1);const c=pe(0),p=q(i);if((p||!p&&!r)&&(("body"!==$(i)||K(s))&&(d=ne(i)),q(i))){const e=Te(i);l=Me(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}return{width:o.width*l.x,height:o.height*l.y,x:o.x*l.x-d.scrollLeft*l.x+c.x,y:o.y*l.y-d.scrollTop*l.y+c.y}},getDocumentElement:Y,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=ae(e,[],!1).filter((e=>Z(e)&&"body"!==$(e))),n=null;const r="fixed"===ie(e).position;let s=r?re(e):e;for(;Z(s)&&!oe(s);){const t=ie(s),o=ee(s);o||"fixed"!==t.position||(n=null),(r?!o&&!n:!o&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||K(s)&&!o&&Pe(e,s))?i=i.filter((e=>e!==s)):n=t,s=re(s)}return t.set(e,i),i}(t,this._c):[].concat(o),i],s=r[0],a=r.reduce(((e,o)=>{const i=Fe(t,o,n);return e.top=le(i.top,e.top),e.right=de(i.right,e.right),e.bottom=de(i.bottom,e.bottom),e.left=le(i.left,e.left),e}),Fe(t,s,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Ve,getElementRects:async function(e){const t=this.getOffsetParent||Ve,o=this.getDimensions;return{reference:He(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}=Ne(e);return{width:t,height:o}},getScale:Me,isElement:Z,isRTL:function(e){return"rtl"===ie(e).direction}},$e=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:s=!1,limiter:a={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...d}=me(e,t),l={x:o,y:i},c=await Ce(t,d),p=xe(be(n)),u=ge(p);let h=l[u],f=l[p];if(r){const e="y"===u?"bottom":"right";h=fe(h+c["y"===u?"top":"left"],h,h-c[e])}if(s){const e="y"===p?"bottom":"right";f=fe(f+c["y"===p?"top":"left"],f,f-c[e])}const m=a.fn({...t,[u]:h,[p]:f});return{...m,data:{x:m.x-o,y:m.y-i}}}}},Xe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,i;const{placement:n,middlewareData:r,rects:s,initialPlacement:a,platform:d,elements:l}=t,{mainAxis:c=!0,crossAxis:p=!0,fallbackPlacements:u,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...b}=me(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const y=be(n),g=be(a)===a,w=await(null==d.isRTL?void 0:d.isRTL(l.floating)),x=u||(g||!m?[Re(a)]:function(e){const t=Re(e);return[ze(e),t,ze(t)]}(a));u||"none"===f||x.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"],s=["bottom","top"];switch(e){case"top":case"bottom":return o?t?n:i:t?i:n;case"left":case"right":return t?r:s;default:return[]}}(be(e),"start"===o,i);return n&&(r=r.map((e=>e+"-"+n)),t&&(r=r.concat(r.map(ze)))),r}(a,m,f,w));const v=[a,...x],z=await Ce(t,b),R=[];let S=(null==(i=r.flip)?void 0:i.overflows)||[];if(c&&R.push(z[y]),p){const e=function(e,t,o){void 0===o&&(o=!1);const i=ye(e),n=ve(e),r=we(n);let s="x"===n?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=Re(s)),[s,Re(s)]}(n,s,w);R.push(z[e[0]],z[e[1]])}if(S=[...S,{placement:n,overflows:R}],!R.every((e=>e<=0))){var _,E;const e=((null==(_=r.flip)?void 0:_.index)||0)+1,t=v[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let o=null==(E=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:E.placement;if(!o)switch(h){case"bestFit":{var C;const e=null==(C=S.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(o=e);break}case"initialPlacement":o=a}if(n!==o)return{reset:{placement:o}}}return{}}}},Ye=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:o,elements:i,rects:n,platform:r,strategy:s}=t,{padding:a=2,x:d,y:l}=me(e,t),c=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(i.reference))||[]),p=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),o=[];let i=null;for(let e=0;e<t.length;e++){const n=t[e];!i||n.y-i.y>i.height/2?o.push([n]):o[o.length-1].push(n),i=n}return o.map((e=>_e(ke(e))))}(c),u=_e(ke(c)),h=Se(a);const f=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===p.length&&p[0].left>p[1].right&&null!=d&&null!=l)return p.find((e=>d>e.left-h.left&&d<e.right+h.right&&l>e.top-h.top&&l<e.bottom+h.bottom))||u;if(p.length>=2){if("y"===xe(o)){const e=p[0],t=p[p.length-1],i="top"===be(o),n=e.top,r=t.bottom,s=i?e.left:t.left,a=i?e.right:t.right;return{top:n,bottom:r,left:s,right:a,width:a-s,height:r-n,x:s,y:n}}const e="left"===be(o),t=le(...p.map((e=>e.right))),i=de(...p.map((e=>e.left))),n=p.filter((o=>e?o.left===i:o.right===t)),r=n[0].top,s=n[n.length-1].bottom;return{top:r,bottom:s,left:i,right:t,width:t-i,height:s-r,x:i,y:r}}return u}},floating:i.floating,strategy:s});return n.reference.x!==f.reference.x||n.reference.y!==f.reference.y||n.reference.width!==f.reference.width||n.reference.height!==f.reference.height?{reset:{rects:f}}:{}}}},Ge=(e,t,o)=>{const i=new Map,n={platform:Ue,...o},r={...n.platform,_c:i};return(async(e,t,o)=>{const{placement:i="bottom",strategy:n="absolute",middleware:r=[],platform:s}=o,a=r.filter(Boolean),d=await(null==s.isRTL?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:p}=Ee(l,i,d),u=i,h={},f=0;for(let o=0;o<a.length;o++){const{name:r,fn:m}=a[o],{x:b,y:y,data:g,reset:w}=await m({x:c,y:p,initialPlacement:i,placement:u,strategy:n,middlewareData:h,rects:l,platform:s,elements:{reference:e,floating:t}});c=null!=b?b:c,p=null!=y?y:p,h={...h,[r]:{...h[r],...g}},w&&f<=50&&(f++,"object"==typeof w&&(w.placement&&(u=w.placement),w.rects&&(l=!0===w.rects?await s.getElementRects({reference:e,floating:t,strategy:n}):w.rects),({x:c,y:p}=Ee(l,u,d))),o=-1)}return{x:c,y:p,placement:u,strategy:n,middlewareData:h}})(e,t,{...n,platform:r})};var Ze="undefined"!=typeof document?f:u;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=c.useRef(e);return Ze((()=>{t.current=e})),t}
|
|
2
2
|
/*!
|
|
3
3
|
* tabbable 6.2.0
|
|
4
4
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
5
5
|
*/
|
|
6
|
-
var Ht=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),Ft="undefined"==typeof Element,Dt=Ft?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Vt=!Ft&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},Ut=function t(e,i){var n;void 0===i&&(i=!0);var o=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===o||"true"===o||i&&e&&t(e.parentNode)},Yt=function t(e,i,n){for(var o=[],r=Array.from(e);r.length;){var s=r.shift();if(!Ut(s,!1))if("SLOT"===s.tagName){var a=s.assignedElements(),l=t(a.length?a:s.children,!0,n);n.flatten?o.push.apply(o,l):o.push({scopeParent:s,candidates:l})}else{Dt.call(s,Ht)&&n.filter(s)&&(i||!e.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(s),d=!Ut(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(c&&d){var u=t(!0===c?s.children:c.children,!0,n);n.flatten?o.push.apply(o,u):o.push({scopeParent:s,candidates:u})}else r.unshift.apply(r,s.children)}}return o},$t=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Xt=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(t){var e,i=null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"contenteditable");return""===i||"true"===i}(t))&&!$t(t)?0:t.tabIndex},qt=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Gt=function(t){return"INPUT"===t.tagName},Zt=function(t){return function(t){return Gt(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,i=t.form||Vt(t),n=function(t){return i.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=n(window.CSS.escape(t.name));else try{e=n(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var o=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]}(e,t.form);return!o||o===t}(t)},Jt=function(t){var e=t.getBoundingClientRect(),i=e.width,n=e.height;return 0===i&&0===n},Kt=function(t,e){var i=e.displayCheck,n=e.getShadowRoot;if("hidden"===getComputedStyle(t).visibility)return!0;var o=Dt.call(t,"details>summary:first-of-type")?t.parentElement:t;if(Dt.call(o,"details:not([open]) *"))return!0;if(i&&"full"!==i&&"legacy-full"!==i){if("non-zero-area"===i)return Jt(t)}else{if("function"==typeof n){for(var r=t;t;){var s=t.parentElement,a=Vt(t);if(s&&!s.shadowRoot&&!0===n(s))return Jt(t);t=t.assignedSlot?t.assignedSlot:s||a===t.ownerDocument?s:a.host}t=r}if(function(t){var e,i,n,o,r=t&&Vt(t),s=null===(e=r)||void 0===e?void 0:e.host,a=!1;if(r&&r!==t)for(a=!!(null!==(i=s)&&void 0!==i&&null!==(n=i.ownerDocument)&&void 0!==n&&n.contains(s)||null!=t&&null!==(o=t.ownerDocument)&&void 0!==o&&o.contains(t));!a&&s;){var l,c,d;a=!(null===(c=s=null===(l=r=Vt(s))||void 0===l?void 0:l.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(s))}return a}(t))return!t.getClientRects().length;if("legacy-full"!==i)return!0}return!1},Qt=function(t,e){return!(e.disabled||Ut(e)||function(t){return Gt(t)&&"hidden"===t.type}(e)||Kt(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var i=0;i<e.children.length;i++){var n=e.children.item(i);if("LEGEND"===n.tagName)return!!Dt.call(e,"fieldset[disabled] *")||!n.contains(t)}return!0}e=e.parentElement}return!1}(e))},te=function(t,e){return!(Zt(e)||Xt(e)<0||!Qt(t,e))},ee=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},ie=function t(e){var i=[],n=[];return e.forEach((function(e,o){var r=!!e.scopeParent,s=r?e.scopeParent:e,a=function(t,e){var i=Xt(t);return i<0&&e&&!$t(t)?0:i}(s,r),l=r?t(e.candidates):s;0===a?r?i.push.apply(i,l):i.push(s):n.push({documentOrder:o,tabIndex:a,item:e,isScope:r,content:l})})),n.sort(qt).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(i)},ne=function(t,e){var i;return i=(e=e||{}).getShadowRoot?Yt([t],e.includeContainer,{filter:te.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:ee}):function(t,e,i){if(Ut(t))return[];var n=Array.prototype.slice.apply(t.querySelectorAll(Ht));return e&&Dt.call(t,Ht)&&n.unshift(t),n.filter(i)}(t,e.includeContainer,te.bind(null,e)),ie(i)};const oe=r["useInsertionEffect".toString()]||(t=>t());var re="undefined"!=typeof document?i.useLayoutEffect:i.useEffect;function se(){return se=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},se.apply(this,arguments)}let ae=!1,le=0;const ce=()=>"floating-ui-"+le++;const de=r["useId".toString()]||function(){const[t,e]=r.useState((()=>ae?ce():void 0));return re((()=>{null==t&&e(ce())}),[]),r.useEffect((()=>{ae||(ae=!0)}),[]),t};const ue=r.createContext(null),pe=r.createContext(null);function he(t){return"data-floating-ui-"+t}const fe=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ge(t,e){const i=ne(t,fe());"prev"===e&&i.reverse();const n=i.indexOf(function(t){let e=t.activeElement;for(;null!=(null==(i=e)||null==(i=i.shadowRoot)?void 0:i.activeElement);){var i;e=e.shadowRoot.activeElement}return e}((null==(o=t)?void 0:o.ownerDocument)||document));var o;return i.slice(n+1)[0]}function me(t,e){const i=e||t.currentTarget,n=t.relatedTarget;return!n||!function(t,e){if(!t||!e)return!1;const i=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(i&&B(i)){let i=e;for(;i;){if(t===i)return!0;i=i.parentNode||i.host}}return!1}(i,n)}function xe(t){ne(t,fe()).forEach((t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}))}function we(t){t.querySelectorAll("[data-tabindex]").forEach((t=>{const e=t.dataset.tabindex;delete t.dataset.tabindex,e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex")}))}const be={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function ve(t){"Tab"===t.key&&(t.target,clearTimeout(undefined))}const ye=r.forwardRef((function(t,e){const[i,n]=r.useState();re((()=>(/apple/i.test(navigator.vendor)&&n("button"),document.addEventListener("keydown",ve),()=>{document.removeEventListener("keydown",ve)})),[]);const o={ref:e,tabIndex:0,role:i,"aria-hidden":!i||void 0,[he("focus-guard")]:"",style:be};return r.createElement("span",se({},t,o))})),ze=r.createContext(null),Re=he("portal");function Se(t){let{children:e,id:i,root:o=null,preserveTabOrder:s=!0}=t;const a=function(t){let{id:e,root:i}=void 0===t?{}:t;const[n,o]=r.useState(null),s=de(),a=_e(),l=r.useRef(null);return re((()=>()=>{null==n||n.remove(),queueMicrotask((()=>{l.current=null}))}),[n]),re((()=>{if(l.current)return;const t=e?document.getElementById(e):null;if(!t)return;const i=document.createElement("div");i.id=s,i.setAttribute(Re,""),t.appendChild(i),l.current=i,o(i)}),[e,s]),re((()=>{if(l.current)return;let t=i||(null==a?void 0:a.portalNode);t&&!A(t)&&(t=t.current),t=t||document.body;let n=null;e&&(n=document.createElement("div"),n.id=e,t.appendChild(n));const r=document.createElement("div");r.id=s,r.setAttribute(Re,""),t=n||t,t.appendChild(r),l.current=r,o(r)}),[e,i,s,a]),n}({id:i,root:o}),[l,c]=r.useState(null),d=r.useRef(null),u=r.useRef(null),p=r.useRef(null),h=r.useRef(null),f=!!l&&!l.modal&&l.open&&s&&!(!o&&!a);return r.useEffect((()=>{if(a&&s&&(null==l||!l.modal))return a.addEventListener("focusin",t,!0),a.addEventListener("focusout",t,!0),()=>{a.removeEventListener("focusin",t,!0),a.removeEventListener("focusout",t,!0)};function t(t){if(a&&me(t)){("focusin"===t.type?we:xe)(a)}}}),[a,s,null==l?void 0:l.modal]),r.createElement(ze.Provider,{value:r.useMemo((()=>({preserveTabOrder:s,beforeOutsideRef:d,afterOutsideRef:u,beforeInsideRef:p,afterInsideRef:h,portalNode:a,setFocusManagerState:c})),[s,a])},f&&a&&r.createElement(ye,{"data-type":"outside",ref:d,onFocus:t=>{if(me(t,a)){var e;null==(e=p.current)||e.focus()}else{const t=ge(document.body,"prev")||(null==l?void 0:l.refs.domReference.current);null==t||t.focus()}}}),f&&a&&r.createElement("span",{"aria-owns":a.id,style:be}),a&&n.createPortal(e,a),f&&a&&r.createElement(ye,{"data-type":"outside",ref:u,onFocus:t=>{if(me(t,a)){var e;null==(e=h.current)||e.focus()}else{const e=ge(document.body,"next")||(null==l?void 0:l.refs.domReference.current);null==e||e.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,t.nativeEvent))}}}))}const _e=()=>r.useContext(ze),Ee=new Set,Ce=r.forwardRef((function(t,e){let{lockScroll:i=!1,...n}=t;const o=de();return re((()=>{if(!i)return;Ee.add(o);const t=/iP(hone|ad|od)|iOS/.test(function(){const t=navigator.userAgentData;return null!=t&&t.platform?t.platform:navigator.platform}()),e=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,s=e.left?parseFloat(e.left):window.pageXOffset,a=e.top?parseFloat(e.top):window.pageYOffset;if(e.overflow="hidden",r&&(e[n]=r+"px"),t){var l,c;const t=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,i=(null==(c=window.visualViewport)?void 0:c.offsetTop)||0;Object.assign(e,{position:"fixed",top:-(a-Math.floor(i))+"px",left:-(s-Math.floor(t))+"px",right:"0"})}return()=>{Ee.delete(o),0===Ee.size&&(Object.assign(e,{overflow:"",[n]:""}),t&&(Object.assign(e,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a)))}}),[o,i]),r.createElement("div",se({ref:e},n,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...n.style}}))}));function je(t){var e;void 0===t&&(t={});const{open:i=!1,onOpenChange:n,nodeId:o}=t,[a,l]=r.useState(null),c=(null==(e=t.elements)?void 0:e.reference)||a,d=function(t){void 0===t&&(t={});const{placement:e="bottom",strategy:i="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:d,open:u}=t,[p,h]=r.useState({x:0,y:0,strategy:i,placement:e,middlewareData:{},isPositioned:!1}),[f,g]=r.useState(n);Tt(f,n)||g(n);const[m,x]=r.useState(null),[w,b]=r.useState(null),v=r.useCallback((t=>{t!==S.current&&(S.current=t,x(t))}),[]),y=r.useCallback((t=>{t!==_.current&&(_.current=t,b(t))}),[]),z=a||m,R=l||w,S=r.useRef(null),_=r.useRef(null),E=r.useRef(p),C=null!=d,j=It(d),k=It(o),O=r.useCallback((()=>{if(!S.current||!_.current)return;const t={placement:e,strategy:i,middleware:f};k.current&&(t.platform=k.current),Wt(S.current,_.current,t).then((t=>{const e={...t,isPositioned:!0};N.current&&!Tt(E.current,e)&&(E.current=e,s.flushSync((()=>{h(e)})))}))}),[f,e,i,k]);At((()=>{!1===u&&E.current.isPositioned&&(E.current.isPositioned=!1,h((t=>({...t,isPositioned:!1}))))}),[u]);const N=r.useRef(!1);At((()=>(N.current=!0,()=>{N.current=!1})),[]),At((()=>{if(z&&(S.current=z),R&&(_.current=R),z&&R){if(j.current)return j.current(z,R,O);O()}}),[z,R,O,j,C]);const L=r.useMemo((()=>({reference:S,floating:_,setReference:v,setFloating:y})),[v,y]),M=r.useMemo((()=>({reference:z,floating:R})),[z,R]),W=r.useMemo((()=>{const t={position:i,left:0,top:0};if(!M.floating)return t;const e=Pt(M.floating,p.x),n=Pt(M.floating,p.y);return c?{...t,transform:"translate("+e+"px, "+n+"px)",...Bt(M.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:e,top:n}}),[i,c,M.floating,p.x,p.y]);return r.useMemo((()=>({...p,update:O,refs:L,elements:M,floatingStyles:W})),[p,O,L,M,W])}(t),u=r.useContext(pe),p=null!=((null==(h=r.useContext(ue))?void 0:h.id)||null);var h;const f=function(t){const e=r.useRef((()=>{}));return oe((()=>{e.current=t})),r.useCallback((function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return null==e.current?void 0:e.current(...i)}),[])}(((t,e,i)=>{t&&(m.current.openEvent=e),x.emit("openchange",{open:t,event:e,reason:i,nested:p}),null==n||n(t,e,i)})),g=r.useRef(null),m=r.useRef({}),x=r.useState((()=>function(){const t=new Map;return{emit(e,i){var n;null==(n=t.get(e))||n.forEach((t=>t(i)))},on(e,i){t.set(e,[...t.get(e)||[],i])},off(e,i){var n;t.set(e,(null==(n=t.get(e))?void 0:n.filter((t=>t!==i)))||[])}}}()))[0],w=de(),b=r.useCallback((t=>{const e=A(t)?{getBoundingClientRect:()=>t.getBoundingClientRect(),contextElement:t}:t;d.refs.setReference(e)}),[d.refs]),v=r.useCallback((t=>{(A(t)||null===t)&&(g.current=t,l(t)),(A(d.refs.reference.current)||null===d.refs.reference.current||null!==t&&!A(t))&&d.refs.setReference(t)}),[d.refs]),y=r.useMemo((()=>({...d.refs,setReference:v,setPositionReference:b,domReference:g})),[d.refs,v,b]),z=r.useMemo((()=>({...d.elements,domReference:c})),[d.elements,c]),R=r.useMemo((()=>({...d,refs:y,elements:z,dataRef:m,nodeId:o,floatingId:w,events:x,open:i,onOpenChange:f})),[d,o,w,x,i,f,y,z]);return re((()=>{const t=null==u?void 0:u.nodesRef.current.find((t=>t.id===o));t&&(t.context=R)})),r.useMemo((()=>({...d,context:R,refs:y,elements:z})),[d,y,z,R])}function ke(t,e){if(null==t)return{};var i,n,o={},r=Object.keys(t);for(n=0;n<r.length;n++)i=r[n],e.indexOf(i)>=0||(o[i]=t[i]);return o}var Oe=["color"],Ne=i.forwardRef((function(t,e){var n=t.color,o=void 0===n?"currentColor":n,r=ke(t,Oe);return i.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:e}),i.createElement("path",{d:"M9.96424 2.68571C10.0668 2.42931 9.94209 2.13833 9.6857 2.03577C9.4293 1.93322 9.13832 2.05792 9.03576 2.31432L5.03576 12.3143C4.9332 12.5707 5.05791 12.8617 5.3143 12.9642C5.5707 13.0668 5.86168 12.9421 5.96424 12.6857L9.96424 2.68571ZM3.85355 5.14646C4.04882 5.34172 4.04882 5.6583 3.85355 5.85356L2.20711 7.50001L3.85355 9.14646C4.04882 9.34172 4.04882 9.6583 3.85355 9.85356C3.65829 10.0488 3.34171 10.0488 3.14645 9.85356L1.14645 7.85356C0.951184 7.6583 0.951184 7.34172 1.14645 7.14646L3.14645 5.14646C3.34171 4.9512 3.65829 4.9512 3.85355 5.14646ZM11.1464 5.14646C11.3417 4.9512 11.6583 4.9512 11.8536 5.14646L13.8536 7.14646C14.0488 7.34172 14.0488 7.6583 13.8536 7.85356L11.8536 9.85356C11.6583 10.0488 11.3417 10.0488 11.1464 9.85356C10.9512 9.6583 10.9512 9.34172 11.1464 9.14646L12.7929 7.50001L11.1464 5.85356C10.9512 5.6583 10.9512 5.34172 11.1464 5.14646Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),Le=["color"],Me=i.forwardRef((function(t,e){var n=t.color,o=void 0===n?"currentColor":n,r=ke(t,Le);return i.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:e}),i.createElement("path",{d:"M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}));const We={youtube:t=>{const e=t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return e&&11===e[2].length?e[2]:null},vimeo:t=>new URL(t).pathname.split("/")[1],dailymotion:t=>{const e=t.match(/^.+dailymotion.com\/(embed|hub)\/([^_]+)[^#]*(#embed=([^_&]+))?/);return null!==e?void 0!==e[4]?e[4]:e[2]:null},twitter:function(t){const e=t.match(/\/status\/(\d+)/);return e?e[1]:null},figma:function(t){const e=new URL(t).searchParams,i=e.get("node-id");return e.get("node-id")?i:"unknown"}},Ae=({blockId:n,onClose:o})=>{const r=t.useYooptaEditor(),[s,a]=i.useState(""),l=0===s.length;return e.jsxs("div",Object.assign({className:"cursor-pointer user-select-none transition-bg duration-20 ease-in white-space-nowrap w-full"},{children:[e.jsx("input",{type:"text",placeholder:"Paste embed link",value:s,className:"items-center bg-[hsla(45,13%,94%,.6)] rounded-[4px] shadow-[inset_0_0_0_1px_hsla(0,0%,6%,.1)] cursor-text flex text-[14px] h-[32px] leading-[20px] px-[6px] relative w-full border-none",onChange:t=>a(t.target.value)}),e.jsx("button",Object.assign({type:"button",className:"user-select-none transition-bg duration-20 ease-in cursor-pointer flex items-center justify-center flex-shrink-0 white-space-nowrap h-[28px] rounded-[4px] shadow-[rgba(15,15,15,0.1)_0px_0px_0px_1px_inset,_rgba(15,15,15,0.1)_0px_1px_2px] bg-[rgb(35,131,226)] text-white fill-white leading-[1.2] px-[12px] text-[14px] font-medium w-full max-w-[300px] mx-auto m-[12px_0_6px] disabled:bg-[rgba(35,131,226,0.5)] disabled:cursor-not-allowed",disabled:l,onClick:()=>{var t;if(0===s.length)return;const e=(i=s).includes("youtube.com")||i.includes("youtu.be")?"youtube":i.includes("vimeo.com")?"vimeo":i.includes("dailymotion.com")||i.includes("dai.ly")?"dailymotion":i.includes("twitter")?"twitter":i.includes("figma")?"figma":null;var i;const a=e?null===(t=We[e])||void 0===t?void 0:t.call(We,s):null,l={type:e,id:a,url:s};e&&a||(l.id=s),r.blocks.Embed.updateElement(n,"embed",{provider:l}),o()}},{children:"Embed embed"}))]}))},Te=({floatingStyles:t,refs:i,onClose:n,blockId:o})=>e.jsx(Se,Object.assign({root:document.getElementById("yoopta-editor")},{children:e.jsx(Ce,Object.assign({lockScroll:!0,className:"z-[100]",onClick:n},{children:e.jsx("div",Object.assign({ref:i.setFloating,style:t,onClick:t=>t.stopPropagation()},{children:e.jsxs("div",Object.assign({className:"flex flex-col min-w-[540px] max-w-[calc(100vw-24px)] h-full max-h-[420px] bg-white 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:[e.jsx("div",Object.assign({className:"w-full flex text-[14px] p-[0_8px] shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] relative z-10 h-[40px]"},{children:e.jsx("button",Object.assign({type:"button",style:{borderBottom:"2px solid #2483e2"},className:"py-[6px] whitespace-nowrap min-w-0 flex-shrink-0 text-[rgb(55,53,47)] relative cursor-pointer user-select-none bg-inherit transition-[height_20ms_ease-in] inline-flex items-center h-full text-[14px] leading-[1.2] px-[8px]"},{children:"Embed link"}))})),e.jsx("div",Object.assign({className:"pt-[6px] pb-[6px] mt-[4px] flex justify-center mr-[12px] ml-[12px]"},{children:e.jsx(Ae,{onClose:n,blockId:o})}))]}))}))}))})),Be=({attributes:t,children:n,blockId:o})=>{const[r,s]=i.useState(!1),{refs:a,floatingStyles:l}=je({placement:"bottom",open:r,onOpenChange:s,middleware:[Mt(),Lt(),Nt(),gt(10)]});return e.jsxs("div",Object.assign({className:"w-full user-select-none m-[20px_0_10px] relative flex"},t,{contentEditable:!1},{children:[e.jsxs("button",Object.assign({className:"p-[12px_36px_12px_12px] flex items-center text-left w-full overflow-hidden rounded-[3px] text-[14px] text-[rgba(55,53,47,0.65)] relative cursor-pointer border-none bg-[#efefef] transition-[background-color_100ms_ease-in] hover:bg-[#e3e3e3]",onClick:()=>s(!0),ref:a.setReference},{children:[e.jsx(Ne,{className:"mr-2 user-select-none",width:24,height:24}),e.jsx("span",Object.assign({className:"font-medium"},{children:"Click to add embed"}))]})),r&&e.jsx(Te,{blockId:o,floatingStyles:l,refs:a,onClose:()=>s(!1)}),n]}))},{ExtendedBlockActions:Pe,BlockOptionsMenuGroup:Ie,BlockOptionsMenuItem:He,BlockOptionsSeparator:Fe}=t.UI,De=({editor:t,block:i,props:n})=>e.jsxs(Pe,Object.assign({onClick:()=>t.setSelection([i.meta.order])},{children:[e.jsx(Fe,{}),e.jsx(Ie,{children:e.jsx(He,{children:e.jsxs("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",onClick:()=>{var t;window.open(null===(t=null==n?void 0:n.provider)||void 0===t?void 0:t.url,"_blank")}},{children:[e.jsx(Me,{width:16,height:16,className:"w-4 h-4 mr-2"}),"Open"]}))})})]})),Ve=({position:t})=>e.jsx("div",Object.assign({contentEditable:!1,className:"absolute pointer-events-none flex items-center justify-center z-10 opacity-1 h-full w-[15px] cursor-col-resize transition-opacity duration-150 ease-in "+("left"===t?"left-0 top-0":"right-0 top-0")},{children:e.jsx("div",{className:"opacity-100 transition-opacity duration-300 ease-in rounded-[20px] bg-[rgba(15,15,15,0.6)] border border-[rgba(255,255,255,0.9)] w-[6px] h-[48px] max-h-[50%] shadow-[0_0_0_.5px_#FFF]"})})),Ue=new t.YooptaPlugin({type:"Embed",elements:{embed:{render:({element:n,attributes:o,children:r,blockId:s})=>{const{sizes:a,provider:l}=n.props||{},d=t.useBlockData(s),u=t.useYooptaEditor(),p=t.useYooptaPluginOptions("Embed"),h=t.useYooptaReadOnly(),[f,g]=i.useState({width:(null==a?void 0:a.width)||750,height:(null==a?void 0:a.height)||440});i.useEffect((()=>g({width:(null==a?void 0:a.width)||650,height:(null==a?void 0:a.height)||440})),[n.props]);const m=t.useBlockSelected({blockId:s}),x=i.useMemo((()=>{var t,i;return{minWidth:300,size:{width:f.width,height:f.height},maxWidth:(null===(t=null==p?void 0:p.maxSizes)||void 0===t?void 0:t.maxWidth)||800,maxHeight:(null===(i=null==p?void 0:p.maxSizes)||void 0===i?void 0:i.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!h,right:!h},handleStyles:{left:{left:0},right:{right:0}},onResize:(t,e,i)=>{g({width:i.offsetWidth,height:i.offsetHeight})},onResizeStop:(t,e,i)=>{u.blocks.Embed.updateElement(s,"embed",{sizes:{width:i.offsetWidth,height:i.offsetHeight}})},handleComponent:{left:e.jsx(Ve,{position:"left"}),right:e.jsx(Ve,{position:"right"})}}}),[f.width,f.height]);return l&&(null==l?void 0:l.id)?e.jsx("div",Object.assign({"data-element-type":n.type,contentEditable:!1,draggable:!1,className:"mt-4 relative yoopta-embed"},o,{children:e.jsxs(O,Object.assign({},x,{className:"mx-auto my-0 flex"},{children:[m&&e.jsx("div",{className:"absolute pointer-events-none inset-0 bg-[rgba(35,131,226,0.14)] z-[81] rounded-[3px] opacity-100 transition-opacity duration-150 ease-in"}),e.jsx(c,{width:null==f?void 0:f.width,height:null==f?void 0:f.height,provider:l,blockId:s}),!h&&e.jsx(De,{block:d,editor:u,props:n.props}),r]}))})):e.jsx(Be,Object.assign({attributes:o,blockId:s},{children:r}))},props:{sizes:{width:650,height:400},nodeType:"void"}}},options:{display:{title:"Embed",description:"For embed videos, google maps and more"},maxSizes:{maxWidth:650,maxHeight:550}},parsers:{html:{deserialize:{nodeNames:["IFRAME"],parse:e=>{if("IFRAME"===e.nodeName){const i=new URL(e.getAttribute("src")||"");return{id:t.generateId(),type:"embed",children:[{text:""}],props:{provider:{id:i.href,type:i.hostname,url:i.href},sizes:{width:e.getAttribute("width")?parseInt(e.getAttribute("width")||"650",10):650,height:e.getAttribute("height")?parseInt(e.getAttribute("height")||"400",10):400}}}}}}}}});!function(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}(".pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.z-\\[100\\]{z-index:100}.z-\\[81\\]{z-index:81}.m-\\[12px_0_6px\\]{margin:12px 0 6px}.m-\\[20px_0_10px\\]{margin:20px 0 10px}.mx-\\[4px\\]{margin-left:4px;margin-right:4px}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-bottom:0;margin-top:0}.ml-\\[12px\\]{margin-left:12px}.mr-2{margin-right:.5rem}.mr-\\[12px\\]{margin-right:12px}.mt-4{margin-top:1rem}.mt-\\[4px\\]{margin-top:4px}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.h-4{height:1rem}.h-\\[28px\\]{height:28px}.h-\\[32px\\]{height:32px}.h-\\[40px\\]{height:40px}.h-\\[48px\\]{height:48px}.h-full{height:100%}.max-h-\\[420px\\]{max-height:420px}.max-h-\\[50\\%\\]{max-height:50%}.w-4{width:1rem}.w-\\[15px\\]{width:15px}.w-\\[6px\\]{width:6px}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\\[540px\\]{min-width:540px}.max-w-\\[300px\\]{max-width:300px}.max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.flex-shrink-0{flex-shrink:0}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[20px\\]{border-radius:20px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[4px\\]{border-radius:4px}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-none{border-style:none}.border-\\[rgba\\(255\\2c 255\\2c 255\\2c 0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}.bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}.bg-\\[hsla\\(45\\2c 13\\%\\2c 94\\%\\2c \\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}.bg-\\[rgb\\(35\\2c 131\\2c 226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}.bg-\\[rgba\\(15\\2c 15\\2c 15\\2c 0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}.bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}.bg-inherit{background-color:inherit}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.fill-white{fill:#fff}.p-\\[0_8px\\]{padding:0 8px}.p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-\\[12px\\]{padding-left:12px;padding-right:12px}.px-\\[6px\\]{padding-left:6px;padding-right:6px}.px-\\[8px\\]{padding-left:8px;padding-right:8px}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-\\[6px\\]{padding-top:6px}.pb-\\[6px\\],.py-\\[6px\\]{padding-bottom:6px}.pt-\\[6px\\]{padding-top:6px}.text-left{text-align:left}.text-\\[14px\\]{font-size:14px}.font-medium{font-weight:500}.leading-\\[1\\.2\\]{line-height:1.2}.leading-\\[120\\%\\]{line-height:120%}.leading-\\[20px\\]{line-height:20px}.text-\\[rgb\\(55\\2c 53\\2c 47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}.text-\\[rgba\\(55\\2c 53\\2c 47\\2c 0\\.65\\)\\]{color:rgba(55,53,47,.65)}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.opacity-100{opacity:1}.shadow-\\[0_0_0_\\.5px_\\#FFF\\]{--tw-shadow:0 0 0 .5px #fff;--tw-shadow-colored:0 0 0 .5px var(--tw-shadow-color)}.shadow-\\[0_0_0_\\.5px_\\#FFF\\],.shadow-\\[inset_0_0_0_1px_hsla\\(0\\2c 0\\%\\2c 6\\%\\2c \\.1\\)\\]{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[inset_0_0_0_1px_hsla\\(0\\2c 0\\%\\2c 6\\%\\2c \\.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)}.shadow-\\[rgb\\(15_15_15_\\/5\\%\\)_0px_0px_0px_1px\\2c _rgb\\(15_15_15_\\/10\\%\\)_0px_3px_6px\\2c _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)}.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)}.shadow-\\[rgba\\(15\\2c 15\\2c 15\\2c 0\\.1\\)_0px_0px_0px_1px_inset\\2c _rgba\\(15\\2c 15\\2c 15\\2c 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)}.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)}.transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-opacity{transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.yoopta-embed .yoopta-extended-block-actions{opacity:0;transition:opacity .15s ease-in-out}.yoopta-embed:hover .yoopta-extended-block-actions{opacity:1}.hover\\:bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.hover\\:bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}"),exports.default=Ue;
|
|
6
|
+
var et=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),tt="undefined"==typeof Element,ot=tt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,it=!tt&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},nt=function e(t,o){var i;void 0===o&&(o=!0);var n=null==t||null===(i=t.getAttribute)||void 0===i?void 0:i.call(t,"inert");return""===n||"true"===n||o&&t&&e(t.parentNode)},rt=function e(t,o,i){for(var n=[],r=Array.from(t);r.length;){var s=r.shift();if(!nt(s,!1))if("SLOT"===s.tagName){var a=s.assignedElements(),d=e(a.length?a:s.children,!0,i);i.flatten?n.push.apply(n,d):n.push({scopeParent:s,candidates:d})}else{ot.call(s,et)&&i.filter(s)&&(o||!t.includes(s))&&n.push(s);var l=s.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(s),c=!nt(l,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(s));if(l&&c){var p=e(!0===l?s.children:l.children,!0,i);i.flatten?n.push.apply(n,p):n.push({scopeParent:s,candidates:p})}else r.unshift.apply(r,s.children)}}return n},st=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},at=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,o=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===o||"true"===o}(e))&&!st(e)?0:e.tabIndex},dt=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},lt=function(e){return"INPUT"===e.tagName},ct=function(e){return function(e){return lt(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,o=e.form||it(e),i=function(e){return o.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var n=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]}(t,e.form);return!n||n===e}(e)},pt=function(e){var t=e.getBoundingClientRect(),o=t.width,i=t.height;return 0===o&&0===i},ut=function(e,t){var o=t.displayCheck,i=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var n=ot.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ot.call(n,"details:not([open]) *"))return!0;if(o&&"full"!==o&&"legacy-full"!==o){if("non-zero-area"===o)return pt(e)}else{if("function"==typeof i){for(var r=e;e;){var s=e.parentElement,a=it(e);if(s&&!s.shadowRoot&&!0===i(s))return pt(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=r}if(function(e){var t,o,i,n,r=e&&it(e),s=null===(t=r)||void 0===t?void 0:t.host,a=!1;if(r&&r!==e)for(a=!!(null!==(o=s)&&void 0!==o&&null!==(i=o.ownerDocument)&&void 0!==i&&i.contains(s)||null!=e&&null!==(n=e.ownerDocument)&&void 0!==n&&n.contains(e));!a&&s;){var d,l,c;a=!(null===(l=s=null===(d=r=it(s))||void 0===d?void 0:d.host)||void 0===l||null===(c=l.ownerDocument)||void 0===c||!c.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==o)return!0}return!1},ht=function(e,t){return!(t.disabled||nt(t)||function(e){return lt(e)&&"hidden"===e.type}(t)||ut(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var o=0;o<t.children.length;o++){var i=t.children.item(o);if("LEGEND"===i.tagName)return!!ot.call(t,"fieldset[disabled] *")||!i.contains(e)}return!0}t=t.parentElement}return!1}(t))},ft=function(e,t){return!(ct(t)||at(t)<0||!ht(e,t))},mt=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},bt=function e(t){var o=[],i=[];return t.forEach((function(t,n){var r=!!t.scopeParent,s=r?t.scopeParent:t,a=function(e,t){var o=at(e);return o<0&&t&&!st(e)?0:o}(s,r),d=r?e(t.candidates):s;0===a?r?o.push.apply(o,d):o.push(s):i.push({documentOrder:n,tabIndex:a,item:t,isScope:r,content:d})})),i.sort(dt).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(o)},yt=function(e,t){var o;return o=(t=t||{}).getShadowRoot?rt([e],t.includeContainer,{filter:ft.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:mt}):function(e,t,o){if(nt(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(et));return t&&ot.call(e,et)&&i.unshift(e),i.filter(o)}(e,t.includeContainer,ft.bind(null,t)),bt(o)};const gt=c["useInsertionEffect".toString()]||(e=>e());var wt="undefined"!=typeof document?f:u;function xt(){return xt=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},xt.apply(this,arguments)}let vt=!1,zt=0;const Rt=()=>"floating-ui-"+zt++;const St=c["useId".toString()]||function(){const[e,t]=c.useState((()=>vt?Rt():void 0));return wt((()=>{null==e&&t(Rt())}),[]),c.useEffect((()=>{vt||(vt=!0)}),[]),e};const _t=c.createContext(null),Et=c.createContext(null);function Ct(e){return"data-floating-ui-"+e}const kt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ot(e,t){const o=yt(e,kt());"prev"===t&&o.reverse();const i=o.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(o=t)||null==(o=o.shadowRoot)?void 0:o.activeElement);){var o;t=t.shadowRoot.activeElement}return t}((null==(n=e)?void 0:n.ownerDocument)||document));var n;return o.slice(i+1)[0]}function Nt(e,t){const o=t||e.currentTarget,i=e.relatedTarget;return!i||!function(e,t){if(!e||!t)return!1;const o=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(o&&J(o)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}(o,i)}function Lt(e){yt(e,kt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Mt(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const Wt={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function At(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const Tt=c.forwardRef((function(e,t){const[o,i]=c.useState();wt((()=>(/apple/i.test(navigator.vendor)&&i("button"),document.addEventListener("keydown",At),()=>{document.removeEventListener("keydown",At)})),[]);const n={ref:t,tabIndex:0,role:o,"aria-hidden":!o||void 0,[Ct("focus-guard")]:"",style:Wt};return c.createElement("span",xt({},e,n))})),jt=c.createContext(null),Bt=Ct("portal");function It(e){let{children:t,id:o,root:i=null,preserveTabOrder:n=!0}=e;const r=function(e){let{id:t,root:o}=void 0===e?{}:e;const[i,n]=c.useState(null),r=St(),s=Ft(),a=c.useRef(null);return wt((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{a.current=null}))}),[i]),wt((()=>{if(a.current)return;const e=t?document.getElementById(t):null;if(!e)return;const o=document.createElement("div");o.id=r,o.setAttribute(Bt,""),e.appendChild(o),a.current=o,n(o)}),[t,r]),wt((()=>{if(a.current)return;let e=o||(null==s?void 0:s.portalNode);e&&!Z(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const d=document.createElement("div");d.id=r,d.setAttribute(Bt,""),e=i||e,e.appendChild(d),a.current=d,n(d)}),[t,o,r,s]),i}({id:o,root:i}),[s,a]=c.useState(null),d=c.useRef(null),l=c.useRef(null),p=c.useRef(null),u=c.useRef(null),h=!!s&&!s.modal&&s.open&&n&&!(!i&&!r);return c.useEffect((()=>{if(r&&n&&(null==s||!s.modal))return r.addEventListener("focusin",e,!0),r.addEventListener("focusout",e,!0),()=>{r.removeEventListener("focusin",e,!0),r.removeEventListener("focusout",e,!0)};function e(e){if(r&&Nt(e)){("focusin"===e.type?Mt:Lt)(r)}}}),[r,n,null==s?void 0:s.modal]),c.createElement(jt.Provider,{value:c.useMemo((()=>({preserveTabOrder:n,beforeOutsideRef:d,afterOutsideRef:l,beforeInsideRef:p,afterInsideRef:u,portalNode:r,setFocusManagerState:a})),[n,r])},h&&r&&c.createElement(Tt,{"data-type":"outside",ref:d,onFocus:e=>{if(Nt(e,r)){var t;null==(t=p.current)||t.focus()}else{const e=Ot(document.body,"prev")||(null==s?void 0:s.refs.domReference.current);null==e||e.focus()}}}),h&&r&&c.createElement("span",{"aria-owns":r.id,style:Wt}),r&&x(t,r),h&&r&&c.createElement(Tt,{"data-type":"outside",ref:l,onFocus:e=>{if(Nt(e,r)){var t;null==(t=u.current)||t.focus()}else{const t=Ot(document.body,"next")||(null==s?void 0:s.refs.domReference.current);null==t||t.focus(),(null==s?void 0:s.closeOnFocusOut)&&(null==s||s.onOpenChange(!1,e.nativeEvent))}}}))}const Ft=()=>c.useContext(jt),Pt=new Set,Ht=c.forwardRef((function(e,t){let{lockScroll:o=!1,...i}=e;const n=St();return wt((()=>{if(!o)return;Pt.add(n);const e=/iP(hone|ad|od)|iOS/.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}()),t=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,s=t.left?parseFloat(t.left):window.pageXOffset,a=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",r&&(t[i]=r+"px"),e){var d,l;const e=(null==(d=window.visualViewport)?void 0:d.offsetLeft)||0,o=(null==(l=window.visualViewport)?void 0:l.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(a-Math.floor(o))+"px",left:-(s-Math.floor(e))+"px",right:"0"})}return()=>{Pt.delete(n),0===Pt.size&&(Object.assign(t,{overflow:"",[i]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a)))}}),[n,o]),c.createElement("div",xt({ref:t},i,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}}))}));function Dt(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:i,nodeId:n}=e,[r,s]=c.useState(null),a=(null==(t=e.elements)?void 0:t.reference)||r,d=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:i=[],platform:n,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:d,open:l}=e,[p,u]=c.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=c.useState(i);qe(h,i)||f(i);const[m,b]=c.useState(null),[y,w]=c.useState(null),x=c.useCallback((e=>{e!==S.current&&(S.current=e,b(e))}),[]),v=c.useCallback((e=>{e!==_.current&&(_.current=e,w(e))}),[]),z=r||m,R=s||y,S=c.useRef(null),_=c.useRef(null),E=c.useRef(p),C=null!=d,k=Qe(d),O=Qe(n),N=c.useCallback((()=>{if(!S.current||!_.current)return;const e={placement:t,strategy:o,middleware:h};O.current&&(e.platform=O.current),Ge(S.current,_.current,e).then((e=>{const t={...e,isPositioned:!0};L.current&&!qe(E.current,t)&&(E.current=t,g.flushSync((()=>{u(t)})))}))}),[h,t,o,O]);Ze((()=>{!1===l&&E.current.isPositioned&&(E.current.isPositioned=!1,u((e=>({...e,isPositioned:!1}))))}),[l]);const L=c.useRef(!1);Ze((()=>(L.current=!0,()=>{L.current=!1})),[]),Ze((()=>{if(z&&(S.current=z),R&&(_.current=R),z&&R){if(k.current)return k.current(z,R,N);N()}}),[z,R,N,k,C]);const M=c.useMemo((()=>({reference:S,floating:_,setReference:x,setFloating:v})),[x,v]),W=c.useMemo((()=>({reference:z,floating:R})),[z,R]),A=c.useMemo((()=>{const e={position:o,left:0,top:0};if(!W.floating)return e;const t=Ke(W.floating,p.x),i=Ke(W.floating,p.y);return a?{...e,transform:"translate("+t+"px, "+i+"px)",...Je(W.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:i}}),[o,a,W.floating,p.x,p.y]);return c.useMemo((()=>({...p,update:N,refs:M,elements:W,floatingStyles:A})),[p,N,M,W,A])}(e),l=c.useContext(Et),p=null!=((null==(u=c.useContext(_t))?void 0:u.id)||null);var u;const h=function(e){const t=c.useRef((()=>{}));return gt((()=>{t.current=e})),c.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),b.emit("openchange",{open:e,event:t,reason:o,nested:p}),null==i||i(e,t,o)})),f=c.useRef(null),m=c.useRef({}),b=c.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=St(),w=c.useCallback((e=>{const t=Z(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;d.refs.setReference(t)}),[d.refs]),x=c.useCallback((e=>{(Z(e)||null===e)&&(f.current=e,s(e)),(Z(d.refs.reference.current)||null===d.refs.reference.current||null!==e&&!Z(e))&&d.refs.setReference(e)}),[d.refs]),v=c.useMemo((()=>({...d.refs,setReference:x,setPositionReference:w,domReference:f})),[d.refs,x,w]),z=c.useMemo((()=>({...d.elements,domReference:a})),[d.elements,a]),R=c.useMemo((()=>({...d,refs:v,elements:z,dataRef:m,nodeId:n,floatingId:y,events:b,open:o,onOpenChange:h})),[d,n,y,b,o,h,v,z]);return wt((()=>{const e=null==l?void 0:l.nodesRef.current.find((e=>e.id===n));e&&(e.context=R)})),c.useMemo((()=>({...d,context:R,refs:v,elements:z})),[d,v,z,R])}function Vt(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 Ut=["color"],$t=m((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=Vt(e,Ut);return b("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),b("path",{d:"M9.96424 2.68571C10.0668 2.42931 9.94209 2.13833 9.6857 2.03577C9.4293 1.93322 9.13832 2.05792 9.03576 2.31432L5.03576 12.3143C4.9332 12.5707 5.05791 12.8617 5.3143 12.9642C5.5707 13.0668 5.86168 12.9421 5.96424 12.6857L9.96424 2.68571ZM3.85355 5.14646C4.04882 5.34172 4.04882 5.6583 3.85355 5.85356L2.20711 7.50001L3.85355 9.14646C4.04882 9.34172 4.04882 9.6583 3.85355 9.85356C3.65829 10.0488 3.34171 10.0488 3.14645 9.85356L1.14645 7.85356C0.951184 7.6583 0.951184 7.34172 1.14645 7.14646L3.14645 5.14646C3.34171 4.9512 3.65829 4.9512 3.85355 5.14646ZM11.1464 5.14646C11.3417 4.9512 11.6583 4.9512 11.8536 5.14646L13.8536 7.14646C14.0488 7.34172 14.0488 7.6583 13.8536 7.85356L11.8536 9.85356C11.6583 10.0488 11.3417 10.0488 11.1464 9.85356C10.9512 9.6583 10.9512 9.34172 11.1464 9.14646L12.7929 7.50001L11.1464 5.85356C10.9512 5.6583 10.9512 5.34172 11.1464 5.14646Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),Xt=["color"],Yt=m((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=Vt(e,Xt);return b("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),b("path",{d:"M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}));const Gt={youtube:e=>{const t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:null},vimeo:e=>new URL(e).pathname.split("/")[1],dailymotion:e=>{const t=e.match(/^.+dailymotion.com\/(embed|hub)\/([^_]+)[^#]*(#embed=([^_&]+))?/);return null!==t?void 0!==t[4]?t[4]:t[2]:null},twitter:function(e){const t=e.match(/\/status\/(\d+)/);return t?t[1]:null},figma:function(e){const t=new URL(e).searchParams,o=t.get("node-id");return t.get("node-id")?o:"unknown"}},Zt=({blockId:t,onClose:o})=>{const i=e(),[n,r]=p(""),s=0===n.length;return d("div",Object.assign({className:"yoo-embed-cursor-pointer yoo-embed-user-select-none yoo-embed-transition-bg yoo-embed-duration-20 yoo-embed-ease-in yoo-embed-white-space-nowrap yoo-embed-w-full"},{children:[l("input",{type:"text",placeholder:"Paste embed link",value:n,className:"yoo-embed-items-center yoo-embed-bg-[hsla(45,13%,94%,.6)] yoo-embed-rounded-[4px] yoo-embed-shadow-[inset_0_0_0_1px_hsla(0,0%,6%,.1)] yoo-embed-cursor-text yoo-embed-flex yoo-embed-text-[14px] yoo-embed-h-[32px] yoo-embed-leading-[20px] yoo-embed-px-[6px] yoo-embed-relative yoo-embed-w-full yoo-embed-border-none",onChange:e=>r(e.target.value)}),l("button",Object.assign({type:"button",className:"yoo-embed-user-select-none yoo-embed-transition-bg yoo-embed-duration-20 yoo-embed-ease-in yoo-embed-cursor-pointer yoo-embed-flex yoo-embed-items-center yoo-embed-justify-center yoo-embed-flex-shrink-0 yoo-embed-white-space-nowrap yoo-embed-h-[28px] yoo-embed-rounded-[4px] yoo-embed-shadow-[rgba(15,15,15,0.1)_0px_0px_0px_1px_inset,_rgba(15,15,15,0.1)_0px_1px_2px] yoo-embed-bg-[rgb(35,131,226)] yoo-embed-text-white yoo-embed-fill-white yoo-embed-leading-[1.2] yoo-embed-px-[12px] yoo-embed-text-[14px] yoo-embed-font-medium yoo-embed-w-full yoo-embed-max-w-[300px] yoo-embed-mx-auto yoo-embed-m-[12px_0_6px] disabled:yoo-embed-bg-[rgba(35,131,226,0.5)] disabled:yoo-embed-cursor-not-allowed",disabled:s,onClick:()=>{var e;if(0===n.length)return;const r=(s=n).includes("youtube.com")||s.includes("youtu.be")?"youtube":s.includes("vimeo.com")?"vimeo":s.includes("dailymotion.com")||s.includes("dai.ly")?"dailymotion":s.includes("twitter")?"twitter":s.includes("figma")?"figma":null;var s;const a=r?null===(e=Gt[r])||void 0===e?void 0:e.call(Gt,n):null,d={type:r,id:a,url:n};r&&a||(d.id=n),i.blocks.Embed.updateElement(t,"embed",{provider:d}),o()}},{children:"Embed embed"}))]}))},qt=({floatingStyles:e,refs:t,onClose:o,blockId:i})=>l(It,Object.assign({id:"yoo-embed-uploader-portal",root:document.getElementById("yoopta-editor")},{children:l(Ht,Object.assign({lockScroll:!0,className:"yoo-embed-z-[100]",onClick:o},{children:l("div",Object.assign({ref:t.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:d("div",Object.assign({className:"yoo-embed-flex yoo-embed-flex-col yoo-embed-min-w-[540px] yoo-embed-max-w-[calc(100vw-24px)] yoo-embed-h-full yoo-embed-max-h-[420px] yoo-embed-bg-[#FFFFFF] yoo-embed-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:[l("div",Object.assign({className:"yoo-embed-w-full yoo-embed-flex yoo-embed-text-[14px] yoo-embed-p-[0_8px] yoo-embed-shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] yoo-embed-relative yoo-embed-z-10 yoo-embed-h-[40px]"},{children:l("button",Object.assign({type:"button",style:{borderBottom:"2px solid #2483e2"},className:"yoo-embed-py-[6px] yoo-embed-whitespace-nowrap yoo-embed-min-w-0 yoo-embed-flex-shrink-0 yoo-embed-text-[rgb(55,53,47)] yoo-embed-relative yoo-embed-cursor-pointer yoo-embed-user-select-none yoo-embed-bg-inherit yoo-embed-transition-[height_20ms_ease-in] yoo-embed-inline-flex yoo-embed-items-center yoo-embed-h-full yoo-embed-text-[14px] yoo-embed-leading-[1.2] yoo-embed-px-[8px]"},{children:"Embed link"}))})),l("div",Object.assign({className:"yoo-embed-pt-[6px] yoo-embed-pb-[6px] yoo-embed-mt-[4px] yoo-embed-flex yoo-embed-justify-center yoo-embed-mr-[12px] yoo-embed-ml-[12px]"},{children:l(Zt,{onClose:o,blockId:i})}))]}))}))}))})),Jt=({attributes:e,children:t,blockId:o})=>{const[i,n]=p(!1),{refs:r,floatingStyles:s}=Dt({placement:"bottom",open:i,onOpenChange:n,middleware:[Ye(),Xe(),$e(),Oe(10)]});return d("div",Object.assign({className:"yoo-embed-w-full yoo-embed-user-select-none yoo-embed-m-[20px_0_10px] yoo-embed-relative yoo-embed-flex"},e,{contentEditable:!1},{children:[d("button",Object.assign({className:"yoo-embed-p-[12px_36px_12px_12px] yoo-embed-flex yoo-embed-items-center yoo-embed-text-left yoo-embed-w-full yoo-embed-overflow-hidden yoo-embed-rounded-[3px] yoo-embed-text-[14px] yoo-embed-text-[rgba(55,53,47,0.65)] yoo-embed-relative yoo-embed-cursor-pointer yoo-embed-border-none yoo-embed-bg-[#efefef] yoo-embed-transition-[background-color_100ms_ease-in] hover:yoo-embed-bg-[#e3e3e3]",onClick:()=>n(!0),ref:r.setReference},{children:[l($t,{className:"yoo-embed-mr-2 yoo-embed-user-select-none",width:24,height:24}),l("span",Object.assign({className:"yoo-embed-font-medium"},{children:"Click to add embed"}))]})),i&&l(qt,{blockId:o,floatingStyles:s,refs:r,onClose:()=>n(!1)}),t]}))},{ExtendedBlockActions:Kt,BlockOptionsMenuGroup:Qt,BlockOptionsMenuItem:eo,BlockOptionsSeparator:to}=t,oo=({editor:e,block:t,props:o})=>d(Kt,Object.assign({onClick:()=>e.setSelection([t.meta.order])},{children:[l(to,{}),l(Qt,{children:l(eo,{children:d("button",Object.assign({type:"button",className:"yoo-embed-rounded-sm hover:yoo-embed-bg-[#37352f14] yoo-embed-leading-[120%] yoo-embed-px-2 yoo-embed-py-1.5 yoo-embed-mx-[4px] yoo-embed-cursor-pointer yoo-embed-w-full yoo-embed-flex yoo-embed-justify-start",onClick:()=>{var e;window.open(null===(e=null==o?void 0:o.provider)||void 0===e?void 0:e.url,"_blank")}},{children:[l(Yt,{width:16,height:16,className:"yoo-embed-w-4 yoo-embed-h-4 yoo-embed-mr-2"}),"Open"]}))})})]})),io=({position:e})=>l("div",Object.assign({contentEditable:!1,className:"yoo-embed-absolute yoo-embed-pointer-events-none yoo-embed-flex yoo-embed-items-center yoo-embed-justify-center yoo-embed-z-10 yoo-embed-opacity-1 yoo-embed-h-full yoo-embed-w-[15px] yoo-embed-cursor-col-resize yoo-embed-transition-opacity yoo-embed-duration-150 yoo-embed-ease-in "+("left"===e?"yoo-embed-left-0 yoo-embed-top-0":"yoo-embed-right-0 yoo-embed-top-0")},{children:l("div",{className:"yoo-embed-opacity-100 yoo-embed-transition-opacity yoo-embed-duration-300 yoo-embed-ease-in yoo-embed-rounded-[20px] yoo-embed-bg-[rgba(15,15,15,0.6)] yoo-embed-border yoo-embed-border-[rgba(255,255,255,0.9)] yoo-embed-w-[6px] yoo-embed-h-[48px] yoo-embed-max-h-[50%] yoo-embed-shadow-[0_0_0_.5px_#FFF]"})})),no=new s({type:"Embed",elements:{embed:{render:({element:t,attributes:s,children:a,blockId:c})=>{const{sizes:h,provider:f}=t.props||{},m=o(c),b=e(),g=i("Embed"),w=n(),[x,v]=p({width:(null==h?void 0:h.width)||750,height:(null==h?void 0:h.height)||440});u((()=>v({width:(null==h?void 0:h.width)||650,height:(null==h?void 0:h.height)||440})),[t.props]);const z=r({blockId:c}),S=y((()=>{var e,t;return{minWidth:300,size:{width:x.width,height:x.height},maxWidth:(null===(e=null==g?void 0:g.maxSizes)||void 0===e?void 0:e.maxWidth)||800,maxHeight:(null===(t=null==g?void 0:g.maxSizes)||void 0===t?void 0:t.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!w,right:!w},handleStyles:{left:{left:0},right:{right:0}},onResize:(e,t,o)=>{v({width:o.offsetWidth,height:o.offsetHeight})},onResizeStop:(e,t,o)=>{b.blocks.Embed.updateElement(c,"embed",{sizes:{width:o.offsetWidth,height:o.offsetHeight}})},handleComponent:{left:l(io,{position:"left"}),right:l(io,{position:"right"})}}}),[x.width,x.height]);return f&&(null==f?void 0:f.id)?l("div",Object.assign({"data-element-type":t.type,contentEditable:!1,draggable:!1,className:"yoo-embed-mt-4 yoo-embed-relative yoopta-embed"},s,{children:d(U,Object.assign({},S,{className:"yoo-embed-mx-auto yoo-embed-my-0 yoo-embed-flex"},{children:[z&&l("div",{className:"yoo-embed-absolute yoo-embed-pointer-events-none yoo-embed-inset-0 yoo-embed-bg-[rgba(35,131,226,0.14)] yoo-embed-z-[81] yoo-embed-rounded-[3px] yoo-embed-opacity-100 yoo-embed-transition-opacity yoo-embed-duration-150 yoo-embed-ease-in"}),l(R,{width:null==x?void 0:x.width,height:null==x?void 0:x.height,provider:f,blockId:c}),!w&&l(oo,{block:m,editor:b,props:t.props}),a]}))})):l(Jt,Object.assign({attributes:s,blockId:c},{children:a}))},props:{sizes:{width:650,height:400},nodeType:"void"}}},options:{display:{title:"Embed",description:"For embed videos, google maps and more"},maxSizes:{maxWidth:650,maxHeight:550}},parsers:{html:{deserialize:{nodeNames:["IFRAME"],parse:e=>{if("IFRAME"===e.nodeName){const t=new URL(e.getAttribute("src")||"");return{id:a(),type:"embed",children:[{text:""}],props:{provider:{id:t.href,type:t.hostname,url:t.href},sizes:{width:e.getAttribute("width")?parseInt(e.getAttribute("width")||"650",10):650,height:e.getAttribute("height")?parseInt(e.getAttribute("height")||"400",10):400}}}}}}}}});!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("#yoopta-editor .yoo-embed-pointer-events-none{pointer-events:none}#yoopta-editor .yoo-embed-absolute{position:absolute}#yoopta-editor .yoo-embed-relative{position:relative}#yoopta-editor .yoo-embed-inset-0{inset:0}#yoopta-editor .yoo-embed-left-0{left:0}#yoopta-editor .yoo-embed-right-0{right:0}#yoopta-editor .yoo-embed-top-0{top:0}#yoopta-editor .yoo-embed-z-10{z-index:10}#yoopta-editor .yoo-embed-z-\\[100\\]{z-index:100}#yoopta-editor .yoo-embed-z-\\[81\\]{z-index:81}#yoopta-editor .yoo-embed-m-\\[12px_0_6px\\]{margin:12px 0 6px}#yoopta-editor .yoo-embed-m-\\[20px_0_10px\\]{margin:20px 0 10px}#yoopta-editor .yoo-embed-mx-\\[4px\\]{margin-left:4px;margin-right:4px}#yoopta-editor .yoo-embed-mx-auto{margin-left:auto;margin-right:auto}#yoopta-editor .yoo-embed-my-0{margin-bottom:0;margin-top:0}#yoopta-editor .yoo-embed-ml-\\[12px\\]{margin-left:12px}#yoopta-editor .yoo-embed-mr-2{margin-right:.5rem}#yoopta-editor .yoo-embed-mr-\\[12px\\]{margin-right:12px}#yoopta-editor .yoo-embed-mt-4{margin-top:1rem}#yoopta-editor .yoo-embed-mt-\\[4px\\]{margin-top:4px}#yoopta-editor .yoo-embed-flex{display:flex}#yoopta-editor .yoo-embed-inline-flex{display:inline-flex}#yoopta-editor .yoo-embed-h-4{height:1rem}#yoopta-editor .yoo-embed-h-\\[28px\\]{height:28px}#yoopta-editor .yoo-embed-h-\\[32px\\]{height:32px}#yoopta-editor .yoo-embed-h-\\[40px\\]{height:40px}#yoopta-editor .yoo-embed-h-\\[48px\\]{height:48px}#yoopta-editor .yoo-embed-h-full{height:100%}#yoopta-editor .yoo-embed-max-h-\\[420px\\]{max-height:420px}#yoopta-editor .yoo-embed-max-h-\\[50\\%\\]{max-height:50%}#yoopta-editor .yoo-embed-w-4{width:1rem}#yoopta-editor .yoo-embed-w-\\[15px\\]{width:15px}#yoopta-editor .yoo-embed-w-\\[6px\\]{width:6px}#yoopta-editor .yoo-embed-w-full{width:100%}#yoopta-editor .yoo-embed-min-w-0{min-width:0}#yoopta-editor .yoo-embed-min-w-\\[540px\\]{min-width:540px}#yoopta-editor .yoo-embed-max-w-\\[300px\\]{max-width:300px}#yoopta-editor .yoo-embed-max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}#yoopta-editor .yoo-embed-flex-shrink-0{flex-shrink:0}#yoopta-editor .yoo-embed-cursor-col-resize{cursor:col-resize}#yoopta-editor .yoo-embed-cursor-pointer{cursor:pointer}#yoopta-editor .yoo-embed-cursor-text{cursor:text}#yoopta-editor .yoo-embed-flex-col{flex-direction:column}#yoopta-editor .yoo-embed-items-center{align-items:center}#yoopta-editor .yoo-embed-justify-start{justify-content:flex-start}#yoopta-editor .yoo-embed-justify-center{justify-content:center}#yoopta-editor .yoo-embed-overflow-hidden{overflow:hidden}#yoopta-editor .yoo-embed-whitespace-nowrap{white-space:nowrap}#yoopta-editor .yoo-embed-rounded-\\[20px\\]{border-radius:20px}#yoopta-editor .yoo-embed-rounded-\\[3px\\]{border-radius:3px}#yoopta-editor .yoo-embed-rounded-\\[4px\\]{border-radius:4px}#yoopta-editor .yoo-embed-rounded-sm{border-radius:.125rem}#yoopta-editor .yoo-embed-border{border-width:1px}#yoopta-editor .yoo-embed-border-none{border-style:none}#yoopta-editor .yoo-embed-border-\\[rgba\\(255\\,255\\,255\\,0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}#yoopta-editor .yoo-embed-bg-\\[\\#FFFFFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}#yoopta-editor .yoo-embed-bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}#yoopta-editor .yoo-embed-bg-\\[hsla\\(45\\,13\\%\\,94\\%\\,\\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}#yoopta-editor .yoo-embed-bg-\\[rgb\\(35\\,131\\,226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}#yoopta-editor .yoo-embed-bg-\\[rgba\\(15\\,15\\,15\\,0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}#yoopta-editor .yoo-embed-bg-\\[rgba\\(35\\,131\\,226\\,0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}#yoopta-editor .yoo-embed-bg-inherit{background-color:inherit}#yoopta-editor .yoo-embed-fill-white{fill:#fff}#yoopta-editor .yoo-embed-p-\\[0_8px\\]{padding:0 8px}#yoopta-editor .yoo-embed-p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}#yoopta-editor .yoo-embed-px-2{padding-left:.5rem;padding-right:.5rem}#yoopta-editor .yoo-embed-px-\\[12px\\]{padding-left:12px;padding-right:12px}#yoopta-editor .yoo-embed-px-\\[6px\\]{padding-left:6px;padding-right:6px}#yoopta-editor .yoo-embed-px-\\[8px\\]{padding-left:8px;padding-right:8px}#yoopta-editor .yoo-embed-py-1{padding-bottom:.25rem;padding-top:.25rem}#yoopta-editor .yoo-embed-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}#yoopta-editor .yoo-embed-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}#yoopta-editor .yoo-embed-pb-\\[6px\\]{padding-bottom:6px}#yoopta-editor .yoo-embed-pt-\\[6px\\]{padding-top:6px}#yoopta-editor .yoo-embed-text-left{text-align:left}#yoopta-editor .yoo-embed-text-\\[14px\\]{font-size:14px}#yoopta-editor .yoo-embed-font-medium{font-weight:500}#yoopta-editor .yoo-embed-leading-\\[1\\.2\\]{line-height:1.2}#yoopta-editor .yoo-embed-leading-\\[120\\%\\]{line-height:120%}#yoopta-editor .yoo-embed-leading-\\[20px\\]{line-height:20px}#yoopta-editor .yoo-embed-text-\\[rgb\\(55\\,53\\,47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}#yoopta-editor .yoo-embed-text-\\[rgba\\(55\\,53\\,47\\,0\\.65\\)\\]{color:rgba(55,53,47,.65)}#yoopta-editor .yoo-embed-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}#yoopta-editor .yoo-embed-opacity-100{opacity:1}#yoopta-editor .yoo-embed-shadow-\\[0_0_0_\\.5px_\\#FFF\\]{--tw-shadow:0 0 0 .5px #fff;--tw-shadow-colored:0 0 0 .5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-embed-shadow-\\[inset_0_0_0_1px_hsla\\(0\\,0\\%\\,6\\%\\,\\.1\\)\\]{--tw-shadow:inset 0 0 0 1px hsla(0,0%,6%,.1);--tw-shadow-colored:inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-embed-shadow-\\[rgb\\(15_15_15_\\/5\\%\\)_0px_0px_0px_1px\\,_rgb\\(15_15_15_\\/10\\%\\)_0px_3px_6px\\,_rgb\\(15_15_15_\\/20\\%\\)_0px_9px_24px\\]{--tw-shadow:rgb(15 15 15/5%) 0px 0px 0px 1px,hsla(0,0%,6%,.1) 0px 3px 6px,hsla(0,0%,6%,.2) 0px 9px 24px;--tw-shadow-colored:0px 0px 0px 1px var(--tw-shadow-color),0px 3px 6px var(--tw-shadow-color),0px 9px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-embed-shadow-\\[rgb\\(55_53_47_\\/9\\%\\)_0px_-1px_0px_inset\\]{--tw-shadow:rgb(55 53 47/9%) 0px -1px 0px inset;--tw-shadow-colored:inset 0px -1px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-embed-shadow-\\[rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_0px_0px_1px_inset\\,_rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_1px_2px\\]{--tw-shadow:hsla(0,0%,6%,.1) 0px 0px 0px 1px inset,hsla(0,0%,6%,.1) 0px 1px 2px;--tw-shadow-colored:inset 0px 0px 0px 1px var(--tw-shadow-color),0px 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-embed-transition-\\[background-color_100ms_ease-in\\]{transition-duration:.15s;transition-property:background-color .1s ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}#yoopta-editor .yoo-embed-transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}#yoopta-editor .yoo-embed-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}#yoopta-editor .yoo-embed-duration-150{transition-duration:.15s}#yoopta-editor .yoo-embed-duration-300{transition-duration:.3s}#yoopta-editor .yoo-embed-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}#yoopta-editor .yoopta-embed .yoopta-extended-block-actions{opacity:0;transition:opacity .15s ease-in-out}#yoopta-editor .yoopta-embed:hover .yoopta-extended-block-actions{opacity:1}#yoopta-editor .hover\\:yoo-embed-bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}#yoopta-editor .hover\\:yoo-embed-bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}#yoopta-editor .disabled\\:yoo-embed-cursor-not-allowed:disabled{cursor:not-allowed}#yoopta-editor .disabled\\:yoo-embed-bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}");export{no as default};
|
package/dist/ui/Embed.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { PluginElementRenderProps } from '@yoopta/editor';
|
|
2
|
+
declare const EmbedRender: ({ element, attributes, children, blockId }: PluginElementRenderProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
3
|
export { EmbedRender };
|
|
3
4
|
//# sourceMappingURL=Embed.d.ts.map
|
package/dist/ui/Embed.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Embed.d.ts","sourceRoot":"","sources":["../../src/ui/Embed.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Embed.d.ts","sourceRoot":"","sources":["../../src/ui/Embed.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,wBAAwB,EAKzB,MAAM,gBAAgB,CAAC;AAQxB,QAAA,MAAM,WAAW,+CAAgD,wBAAwB,4CAiFxF,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../src/ui/Placeholder.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,WAAW;;;;
|
|
1
|
+
{"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../src/ui/Placeholder.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,WAAW;;;;6CAmChB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/embed",
|
|
3
|
-
"version": "4.0.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "Embed plugin for Yoopta Editor",
|
|
5
5
|
"author": "Darginec05 <devopsbanda@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"private": false,
|
|
9
9
|
"main": "dist/index.js",
|
|
10
|
-
"
|
|
10
|
+
"type": "module",
|
|
11
|
+
"module": "dist/index.js",
|
|
11
12
|
"types": "./dist/index.d.ts",
|
|
12
13
|
"files": [
|
|
13
14
|
"dist/"
|
|
@@ -37,6 +38,5 @@
|
|
|
37
38
|
"@floating-ui/react": "^0.26.9",
|
|
38
39
|
"@radix-ui/react-icons": "^1.3.0",
|
|
39
40
|
"re-resizable": "^6.9.11"
|
|
40
|
-
}
|
|
41
|
-
"gitHead": "2ab435c70924d16a80928f05657f0f9db1ff42f0"
|
|
41
|
+
}
|
|
42
42
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023-present Akhmed Ibragimov
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/dist/index.es.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{useYooptaEditor as t,UI as e,useBlockData as i,useYooptaPluginOptions as n,useYooptaReadOnly as o,useBlockSelected as r,YooptaPlugin as s,generateId as a}from"@yoopta/editor";import{jsxs as l,jsx as c}from"react/jsx-runtime";import*as d from"react";import{useState as u,useEffect as h,useRef as p,useLayoutEffect as f,forwardRef as g,createElement as m,useMemo as w}from"react";import*as b from"react-dom";import{flushSync as x,createPortal as v}from"react-dom";function y(t,{threshold:e=0,root:i=null,rootMargin:n="0%",freezeOnceVisible:o=!1}={}){const[r,s]=u({}),a=r.isIntersecting&&o,l=([t])=>s(t);return h((()=>{const o=null==t?void 0:t.current;if(!window.IntersectionObserver||a||!o)return;const r=new IntersectionObserver(l,{threshold:e,root:i,rootMargin:n});return r.observe(o),()=>r.disconnect()}),[t,e,i,n,a]),r}const z={vimeo:function({provider:t,width:e,height:i,blockId:n}){const o=p(null),[r,s]=u(null),[a,d]=u(!1),{isIntersecting:f}=y(o,{freezeOnceVisible:!0,rootMargin:"50%"});return h((()=>{fetch(`https://vimeo.com/api/v2/embed/${t.id}.json`).then((t=>t.json())).then((t=>s(t[0].thumbnail_medium))).catch((()=>s(null)))}),[t.id]),l("div",Object.assign({ref:o,className:"yoo-video-relative"},{children:[c("img",{src:r||"",alt:"vimeo_embed_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:f&&a?0:1,zIndex:f&&a?-1:0}}),f&&c("iframe",{title:"Embed Player",src:`https://player.vimeo.com/embed/${t.id}?badge=0&byline=0&portrait=0&title=0`,frameBorder:0,allowFullScreen:!0,onLoad:()=>d(!0),className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0",width:e,height:i})]}))},youtube:function({provider:t,width:e,height:i,blockId:n}){const o=p(null),[r,s]=u(!1),{isIntersecting:a}=y(o,{freezeOnceVisible:!0,rootMargin:"50%"});return l("div",Object.assign({ref:o,className:"yoo-video-relative"},{children:[c("img",{src:`https://i.ytimg.com/vi/${t.id}/default.jpg`,alt:"youtube_embed_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:a&&r?0:1,zIndex:a&&r?-1:0}}),a&&c("iframe",{title:"Embed Player",src:`https://www.youtube.com/embed/${t.id}`,frameBorder:0,onLoad:()=>s(!0),allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0",width:e,height:i})]}))},dailymotion:function({provider:t,width:e,height:i,blockId:n}){const o=p(null),[r,s]=u(null),[a,d]=u(!1),{isIntersecting:f}=y(o,{freezeOnceVisible:!0,rootMargin:"50%"});return h((()=>{var e;fetch((e=t.id,`https://api.dailymotion.com/embed/${e}?fields=thumbnail_url`)).then((t=>t.json())).then((t=>s(t.thumbnail_url))).catch((()=>s(null)))}),[t.id]),l("div",Object.assign({ref:o,className:"yoo-video-relative"},{children:[c("img",{src:r||"",alt:"daylimotion_embed_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:f&&a?0:1,zIndex:f&&a?-1:0}}),f&&c("iframe",{title:"Dailymotion Embed Player",frameBorder:0,onLoad:()=>d(!0),src:`https://www.dailymotion.com/embed/embed/${t.id}`,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0",width:e,height:i})]}))},figma:({provider:t,width:e,height:i,blockId:n})=>{const o=p(null),{isIntersecting:r}=y(o,{freezeOnceVisible:!0,rootMargin:"50%"});return c("div",Object.assign({className:"yoo-video-relative",ref:o},{children:r&&c("iframe",{src:`https://www.figma.com/embed?embed_host=share&url=${encodeURIComponent(t.url)}`,frameBorder:0,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0",width:e,height:i})}))},twitter:function({provider:e,blockId:i}){const n=p(null),o=t(),{isIntersecting:r}=y(n,{freezeOnceVisible:!0,rootMargin:"50%"}),s=`${i}-${e.id}`;return h((()=>{var t;if(!r)return;const a=document.createElement("script");a.src="https://platform.twitter.com/widgets.js",null===(t=n.current)||void 0===t||t.appendChild(a),a.onload=()=>{window.twttr&&(window.twttr.widgets.createTweet(e.id,document.getElementById(s),{align:"center",conversation:"none",dnt:!0,theme:"dark",height:500,width:550}),o.blocks.Embed.updateElement(i,"embed",{sizes:{width:"auto",height:"auto"}}))}}),[e.id,r]),c("div",Object.assign({className:"w-full h-full",ref:n},{children:c("div",{id:s})}))}},R=({width:t,height:e,provider:i,blockId:n})=>{if(!i)return null;if(i&&i.id&&i.type&&z[i.type]){const o=z[i.type];return c(o,{provider:i,width:t,height:e,blockId:n})}return c("div",Object.assign({className:"w-full"},{children:c("iframe",{src:i.url,width:"100%",height:"100%",frameBorder:0,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"})}))};var S,_=(S=function(t,e){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},S(t,e)},function(t,e){function i(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),E=function(){return E=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},E.apply(this,arguments)},C={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},k={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},O={width:"20px",height:"20px",position:"absolute"},N={top:E(E({},C),{top:"-5px"}),right:E(E({},k),{left:void 0,right:"-5px"}),bottom:E(E({},C),{top:void 0,bottom:"-5px"}),left:E(E({},k),{left:"-5px"}),topRight:E(E({},O),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:E(E({},O),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:E(E({},O),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:E(E({},O),{left:"-10px",top:"-10px",cursor:"nw-resize"})},L=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){e.props.onResizeStart(t,e.props.direction)},e.onTouchStart=function(t){e.props.onResizeStart(t,e.props.direction)},e}return _(e,t),e.prototype.render=function(){return d.createElement("div",{className:this.props.className||"",style:E(E({position:"absolute",userSelect:"none"},N[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},e}(d.PureComponent),M=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),W=function(){return W=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},W.apply(this,arguments)},A={width:"auto",height:"auto"},T=function(t,e,i){return Math.max(Math.min(t,i),e)},j=function(t,e){return Math.round(t/e)*e},B=function(t,e){return new RegExp(t,"i").test(e)},I=function(t){return Boolean(t.touches&&t.touches.length)},P=function(t,e,i){void 0===i&&(i=0);var n=e.reduce((function(i,n,o){return Math.abs(n-t)<Math.abs(e[i]-t)?o:i}),0),o=Math.abs(e[n]-t);return 0===i||o<i?e[n]:t},H=function(t){return"auto"===(t=t.toString())||t.endsWith("px")||t.endsWith("%")||t.endsWith("vh")||t.endsWith("vw")||t.endsWith("vmax")||t.endsWith("vmin")?t:t+"px"},F=function(t,e,i,n){if(t&&"string"==typeof t){if(t.endsWith("px"))return Number(t.replace("px",""));if(t.endsWith("%"))return e*(Number(t.replace("%",""))/100);if(t.endsWith("vw"))return i*(Number(t.replace("vw",""))/100);if(t.endsWith("vh"))return n*(Number(t.replace("vh",""))/100)}return t},D=["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__",U=function(t){function e(e){var i=t.call(this,e)||this;return i.ratio=1,i.resizable=null,i.parentLeft=0,i.parentTop=0,i.resizableLeft=0,i.resizableRight=0,i.resizableTop=0,i.resizableBottom=0,i.targetLeft=0,i.targetTop=0,i.appendBase=function(){if(!i.resizable||!i.window)return null;var t=i.parentNode;if(!t)return null;var e=i.window.document.createElement("div");return e.style.width="100%",e.style.height="100%",e.style.position="absolute",e.style.transform="scale(0, 0)",e.style.left="0",e.style.flex="0 0 100%",e.classList?e.classList.add(V):e.className+=V,t.appendChild(e),e},i.removeBase=function(t){var e=i.parentNode;e&&e.removeChild(t)},i.ref=function(t){t&&(i.resizable=t)},i.state={isResizing:!1,width:void 0===(i.propsSize&&i.propsSize.width)?"auto":i.propsSize&&i.propsSize.width,height:void 0===(i.propsSize&&i.propsSize.height)?"auto":i.propsSize&&i.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},i.onResizeStart=i.onResizeStart.bind(i),i.onMouseMove=i.onMouseMove.bind(i),i.onMouseUp=i.onMouseUp.bind(i),i}return M(e,t),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||A},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){var t=0,e=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,n=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),t="auto"!==this.resizable.style.width?this.resizable.offsetWidth:i,e="auto"!==this.resizable.style.height?this.resizable.offsetHeight:n,this.resizable.style.position=o}return{width:t,height:e}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sizeStyle",{get:function(){var t=this,e=this.props.size,i=function(e){if(void 0===t.state[e]||"auto"===t.state[e])return"auto";if(t.propsSize&&t.propsSize[e]&&t.propsSize[e].toString().endsWith("%")){if(t.state[e].toString().endsWith("%"))return t.state[e].toString();var i=t.getParentSize();return Number(t.state[e].toString().replace("px",""))/i[e]*100+"%"}return H(t.state[e])};return{width:e&&void 0!==e.width&&!this.state.isResizing?H(e.width):i("width"),height:e&&void 0!==e.height&&!this.state.isResizing?H(e.height):i("height")}},enumerable:!1,configurable:!0}),e.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var t=this.appendBase();if(!t)return{width:0,height:0};var e=!1,i=this.parentNode.style.flexWrap;"wrap"!==i&&(e=!0,this.parentNode.style.flexWrap="wrap"),t.style.position="relative",t.style.minWidth="100%",t.style.minHeight="100%";var n={width:t.offsetWidth,height:t.offsetHeight};return e&&(this.parentNode.style.flexWrap=i),this.removeBase(t),n},e.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))},e.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))},e.prototype.componentDidMount=function(){if(this.resizable&&this.window){var t=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==t.flexBasis?t.flexBasis:void 0})}},e.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},e.prototype.createSizeForCssProperty=function(t,e){var i=this.propsSize&&this.propsSize[e];return"auto"!==this.state[e]||this.state.original[e]!==t||void 0!==i&&"auto"!==i?t:"auto"},e.prototype.calculateNewMaxFromBoundary=function(t,e){var i,n,o=this.props.boundsByDirection,r=this.state.direction,s=o&&B("left",r),a=o&&B("top",r);if("parent"===this.props.bounds){var l=this.parentNode;l&&(i=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),n=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(i=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,n=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(i=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),n=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return i&&Number.isFinite(i)&&(t=t&&t<i?t:i),n&&Number.isFinite(n)&&(e=e&&e<n?e:n),{maxWidth:t,maxHeight:e}},e.prototype.calculateNewSizeFromDirection=function(t,e){var i=this.props.scale||1,n=this.props.resizeRatio||1,o=this.state,r=o.direction,s=o.original,a=this.props,l=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,d=a.lockAspectRatioExtraWidth,u=s.width,h=s.height,p=c||0,f=d||0;return B("right",r)&&(u=s.width+(t-s.x)*n/i,l&&(h=(u-f)/this.ratio+p)),B("left",r)&&(u=s.width-(t-s.x)*n/i,l&&(h=(u-f)/this.ratio+p)),B("bottom",r)&&(h=s.height+(e-s.y)*n/i,l&&(u=(h-p)*this.ratio+f)),B("top",r)&&(h=s.height-(e-s.y)*n/i,l&&(u=(h-p)*this.ratio+f)),{newWidth:u,newHeight:h}},e.prototype.calculateNewSizeFromAspectRatio=function(t,e,i,n){var o=this.props,r=o.lockAspectRatio,s=o.lockAspectRatioExtraHeight,a=o.lockAspectRatioExtraWidth,l=void 0===n.width?10:n.width,c=void 0===i.width||i.width<0?t:i.width,d=void 0===n.height?10:n.height,u=void 0===i.height||i.height<0?e:i.height,h=s||0,p=a||0;if(r){var f=(d-h)*this.ratio+p,g=(u-h)*this.ratio+p,m=(l-p)/this.ratio+h,w=(c-p)/this.ratio+h,b=Math.max(l,f),x=Math.min(c,g),v=Math.max(d,m),y=Math.min(u,w);t=T(t,b,x),e=T(e,v,y)}else t=T(t,l,c),e=T(e,d,u);return{newWidth:t,newHeight:e}},e.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var t=this.parentNode;if(t){var e=t.getBoundingClientRect();this.parentLeft=e.left,this.parentTop=e.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var n=this.resizable.getBoundingClientRect(),o=n.left,r=n.top,s=n.right,a=n.bottom;this.resizableLeft=o,this.resizableRight=s,this.resizableTop=r,this.resizableBottom=a}},e.prototype.onResizeStart=function(t,e){if(this.resizable&&this.window){var i,n=0,o=0;if(t.nativeEvent&&function(t){return Boolean((t.clientX||0===t.clientX)&&(t.clientY||0===t.clientY))}(t.nativeEvent)?(n=t.nativeEvent.clientX,o=t.nativeEvent.clientY):t.nativeEvent&&I(t.nativeEvent)&&(n=t.nativeEvent.touches[0].clientX,o=t.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(t,e,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 s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",i=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:n,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:W(W({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(t.target).cursor||"auto"}),direction:e,flexBasis:i};this.setState(l)}},e.prototype.onMouseMove=function(t){var e=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&I(t))try{t.preventDefault(),t.stopPropagation()}catch(t){}var i=this.props,n=i.maxWidth,o=i.maxHeight,r=i.minWidth,s=i.minHeight,a=I(t)?t.touches[0].clientX:t.clientX,l=I(t)?t.touches[0].clientY:t.clientY,c=this.state,d=c.direction,u=c.original,h=c.width,p=c.height,f=this.getParentSize(),g=function(t,e,i,n,o,r,s){return n=F(n,t.width,e,i),o=F(o,t.height,e,i),r=F(r,t.width,e,i),s=F(s,t.height,e,i),{maxWidth:void 0===n?void 0:Number(n),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===s?void 0:Number(s)}}(f,this.window.innerWidth,this.window.innerHeight,n,o,r,s);n=g.maxWidth,o=g.maxHeight,r=g.minWidth,s=g.minHeight;var m=this.calculateNewSizeFromDirection(a,l),w=m.newHeight,b=m.newWidth,v=this.calculateNewMaxFromBoundary(n,o);this.props.snap&&this.props.snap.x&&(b=P(b,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(w=P(w,this.props.snap.y,this.props.snapGap));var y=this.calculateNewSizeFromAspectRatio(b,w,{width:v.maxWidth,height:v.maxHeight},{width:r,height:s});if(b=y.newWidth,w=y.newHeight,this.props.grid){var z=j(b,this.props.grid[0]),R=j(w,this.props.grid[1]),S=this.props.snapGap||0;b=0===S||Math.abs(z-b)<=S?z:b,w=0===S||Math.abs(R-w)<=S?R:w}var _={width:b-u.width,height:w-u.height};if(h&&"string"==typeof h)if(h.endsWith("%"))b=b/f.width*100+"%";else if(h.endsWith("vw")){b=b/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){b=b/this.window.innerHeight*100+"vh"}if(p&&"string"==typeof p)if(p.endsWith("%"))w=w/f.height*100+"%";else if(p.endsWith("vw")){w=w/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){w=w/this.window.innerHeight*100+"vh"}var E={width:this.createSizeForCssProperty(b,"width"),height:this.createSizeForCssProperty(w,"height")};"row"===this.flexDir?E.flexBasis=E.width:"column"===this.flexDir&&(E.flexBasis=E.height),x((function(){e.setState(E)})),this.props.onResize&&this.props.onResize(t,d,this.resizable,_)}},e.prototype.onMouseUp=function(t){var e=this.state,i=e.isResizing,n=e.direction,o=e.original;if(i&&this.resizable){var r={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(t,n,this.resizable,r),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:W(W({},this.state.backgroundStyle),{cursor:"auto"})})}},e.prototype.updateSize=function(t){this.setState({width:t.width,height:t.height})},e.prototype.renderResizer=function(){var t=this,e=this.props,i=e.enable,n=e.handleStyles,o=e.handleClasses,r=e.handleWrapperStyle,s=e.handleWrapperClass,a=e.handleComponent;if(!i)return null;var l=Object.keys(i).map((function(e){return!1!==i[e]?d.createElement(L,{key:e,direction:e,onResizeStart:t.onResizeStart,replaceStyles:n&&n[e],className:o&&o[e]},a&&a[e]?a[e]:null):null}));return d.createElement("div",{className:s,style:r},l)},e.prototype.render=function(){var t=this,e=Object.keys(this.props).reduce((function(e,i){return-1!==D.indexOf(i)||(e[i]=t.props[i]),e}),{}),i=W(W(W({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&&(i.flexBasis=this.state.flexBasis);var n=this.props.as||"div";return d.createElement(n,W({ref:this.ref,style:i,className:this.props.className},e),this.state.isResizing&&d.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},e.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},e}(d.PureComponent);function $(t){return G(t)?(t.nodeName||"").toLowerCase():"#document"}function X(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Y(t){var e;return null==(e=(G(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function G(t){return t instanceof Node||t instanceof X(t).Node}function Z(t){return t instanceof Element||t instanceof X(t).Element}function q(t){return t instanceof HTMLElement||t instanceof X(t).HTMLElement}function J(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof X(t).ShadowRoot)}function K(t){const{overflow:e,overflowX:i,overflowY:n,display:o}=nt(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+i)&&!["inline","contents"].includes(o)}function Q(t){return["table","td","th"].includes($(t))}function tt(t){const e=et(),i=nt(t);return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some((t=>(i.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(i.contain||"").includes(t)))}function et(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function it(t){return["html","body","#document"].includes($(t))}function nt(t){return X(t).getComputedStyle(t)}function ot(t){return Z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function rt(t){if("html"===$(t))return t;const e=t.assignedSlot||t.parentNode||J(t)&&t.host||Y(t);return J(e)?e.host:e}function st(t){const e=rt(t);return it(e)?t.ownerDocument?t.ownerDocument.body:t.body:q(e)&&K(e)?e:st(e)}function at(t,e,i){var n;void 0===e&&(e=[]),void 0===i&&(i=!0);const o=st(t),r=o===(null==(n=t.ownerDocument)?void 0:n.body),s=X(o);return r?e.concat(s,s.visualViewport||[],K(o)?o:[],s.frameElement&&i?at(s.frameElement):[]):e.concat(o,at(o,[],i))}const lt=Math.min,ct=Math.max,dt=Math.round,ut=t=>({x:t,y:t}),ht={left:"right",right:"left",bottom:"top",top:"bottom"},pt={start:"end",end:"start"};function ft(t,e,i){return ct(t,lt(e,i))}function gt(t,e){return"function"==typeof t?t(e):t}function mt(t){return t.split("-")[0]}function wt(t){return t.split("-")[1]}function bt(t){return"x"===t?"y":"x"}function xt(t){return"y"===t?"height":"width"}function vt(t){return["top","bottom"].includes(mt(t))?"y":"x"}function yt(t){return bt(vt(t))}function zt(t){return t.replace(/start|end/g,(t=>pt[t]))}function Rt(t){return t.replace(/left|right|bottom|top/g,(t=>ht[t]))}function St(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function _t(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Et(t,e,i){let{reference:n,floating:o}=t;const r=vt(e),s=yt(e),a=xt(s),l=mt(e),c="y"===r,d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,h=n[a]/2-o[a]/2;let p;switch(l){case"top":p={x:d,y:n.y-o.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:u};break;case"left":p={x:n.x-o.width,y:u};break;default:p={x:n.x,y:n.y}}switch(wt(e)){case"start":p[s]-=h*(i&&c?-1:1);break;case"end":p[s]+=h*(i&&c?-1:1)}return p}async function Ct(t,e){var i;void 0===e&&(e={});const{x:n,y:o,platform:r,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=gt(e,t),f=St(p),g=a[h?"floating"===u?"reference":"floating":u],m=_t(await r.getClippingRect({element:null==(i=await(null==r.isElement?void 0:r.isElement(g)))||i?g:g.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),w="floating"===u?{...s.floating,x:n,y:o}:s.reference,b=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),x=await(null==r.isElement?void 0:r.isElement(b))&&await(null==r.getScale?void 0:r.getScale(b))||{x:1,y:1},v=_t(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:l}):w);return{top:(m.top-v.top+f.top)/x.y,bottom:(v.bottom-m.bottom+f.bottom)/x.y,left:(m.left-v.left+f.left)/x.x,right:(v.right-m.right+f.right)/x.x}}function kt(t){const e=lt(...t.map((t=>t.left))),i=lt(...t.map((t=>t.top)));return{x:e,y:i,width:ct(...t.map((t=>t.right)))-e,height:ct(...t.map((t=>t.bottom)))-i}}const Ot=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var i,n;const{x:o,y:r,placement:s,middlewareData:a}=e,l=await async function(t,e){const{placement:i,platform:n,elements:o}=t,r=await(null==n.isRTL?void 0:n.isRTL(o.floating)),s=mt(i),a=wt(i),l="y"===vt(i),c=["left","top"].includes(s)?-1:1,d=r&&l?-1:1,u=gt(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}(e,t);return s===(null==(i=a.offset)?void 0:i.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:o+l.x,y:r+l.y,data:{...l,placement:s}}}}};function Nt(t){const e=nt(t);let i=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=q(t),r=o?t.offsetWidth:i,s=o?t.offsetHeight:n,a=dt(i)!==r||dt(n)!==s;return a&&(i=r,n=s),{width:i,height:n,$:a}}function Lt(t){return Z(t)?t:t.contextElement}function Mt(t){const e=Lt(t);if(!q(e))return ut(1);const i=e.getBoundingClientRect(),{width:n,height:o,$:r}=Nt(e);let s=(r?dt(i.width):i.width)/n,a=(r?dt(i.height):i.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Wt=ut(0);function At(t){const e=X(t);return et()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Wt}function Tt(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1);const o=t.getBoundingClientRect(),r=Lt(t);let s=ut(1);e&&(n?Z(n)&&(s=Mt(n)):s=Mt(t));const a=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==X(t))&&e}(r,i,n)?At(r):ut(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(r){const t=X(r),e=n&&Z(n)?X(n):n;let i=t,o=i.frameElement;for(;o&&n&&e!==i;){const t=Mt(o),e=o.getBoundingClientRect(),n=nt(o),r=e.left+(o.clientLeft+parseFloat(n.paddingLeft))*t.x,s=e.top+(o.clientTop+parseFloat(n.paddingTop))*t.y;l*=t.x,c*=t.y,d*=t.x,u*=t.y,l+=r,c+=s,i=X(o),o=i.frameElement}}return _t({width:d,height:u,x:l,y:c})}const jt=[":popover-open",":modal"];function Bt(t){return jt.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function It(t){return Tt(Y(t)).left+ot(t).scrollLeft}function Pt(t,e,i){let n;if("viewport"===e)n=function(t,e){const i=X(t),n=Y(t),o=i.visualViewport;let r=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){r=o.width,s=o.height;const t=et();(!t||t&&"fixed"===e)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:a,y:l}}(t,i);else if("document"===e)n=function(t){const e=Y(t),i=ot(t),n=t.ownerDocument.body,o=ct(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=ct(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-i.scrollLeft+It(t);const a=-i.scrollTop;return"rtl"===nt(n).direction&&(s+=ct(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:s,y:a}}(Y(t));else if(Z(e))n=function(t,e){const i=Tt(t,!0,"fixed"===e),n=i.top+t.clientTop,o=i.left+t.clientLeft,r=q(t)?Mt(t):ut(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:n*r.y}}(e,i);else{const i=At(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return _t(n)}function Ht(t,e){const i=rt(t);return!(i===e||!Z(i)||it(i))&&("fixed"===nt(i).position||Ht(i,e))}function Ft(t,e,i){const n=q(e),o=Y(e),r="fixed"===i,s=Tt(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=ut(0);if(n||!n&&!r)if(("body"!==$(e)||K(o))&&(a=ot(e)),n){const t=Tt(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else o&&(l.x=It(o));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Dt(t,e){return q(t)&&"fixed"!==nt(t).position?e?e(t):t.offsetParent:null}function Vt(t,e){const i=X(t);if(!q(t)||Bt(t))return i;let n=Dt(t,e);for(;n&&Q(n)&&"static"===nt(n).position;)n=Dt(n,e);return n&&("html"===$(n)||"body"===$(n)&&"static"===nt(n).position&&!tt(n))?i:n||function(t){let e=rt(t);for(;q(e)&&!it(e);){if(tt(e))return e;e=rt(e)}return null}(t)||i}const Ut={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:i,offsetParent:n,strategy:o}=t;const r="fixed"===o,s=Y(n),a=!!e&&Bt(e.floating);if(n===s||a&&r)return i;let l={scrollLeft:0,scrollTop:0},c=ut(1);const d=ut(0),u=q(n);if((u||!u&&!r)&&(("body"!==$(n)||K(s))&&(l=ot(n)),q(n))){const t=Tt(n);c=Mt(n),d.x=t.x+n.clientLeft,d.y=t.y+n.clientTop}return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-l.scrollLeft*c.x+d.x,y:i.y*c.y-l.scrollTop*c.y+d.y}},getDocumentElement:Y,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:n,strategy:o}=t;const r=[..."clippingAncestors"===i?function(t,e){const i=e.get(t);if(i)return i;let n=at(t,[],!1).filter((t=>Z(t)&&"body"!==$(t))),o=null;const r="fixed"===nt(t).position;let s=r?rt(t):t;for(;Z(s)&&!it(s);){const e=nt(s),i=tt(s);i||"fixed"!==e.position||(o=null),(r?!i&&!o:!i&&"static"===e.position&&o&&["absolute","fixed"].includes(o.position)||K(s)&&!i&&Ht(t,s))?n=n.filter((t=>t!==s)):o=e,s=rt(s)}return e.set(t,n),n}(e,this._c):[].concat(i),n],s=r[0],a=r.reduce(((t,i)=>{const n=Pt(e,i,o);return t.top=ct(n.top,t.top),t.right=lt(n.right,t.right),t.bottom=lt(n.bottom,t.bottom),t.left=ct(n.left,t.left),t}),Pt(e,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Vt,getElementRects:async function(t){const e=this.getOffsetParent||Vt,i=this.getDimensions;return{reference:Ft(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await i(t.floating)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:i}=Nt(t);return{width:e,height:i}},getScale:Mt,isElement:Z,isRTL:function(t){return"rtl"===nt(t).direction}},$t=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:n,placement:o}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...l}=gt(t,e),c={x:i,y:n},d=await Ct(e,l),u=vt(mt(o)),h=bt(u);let p=c[h],f=c[u];if(r){const t="y"===h?"bottom":"right";p=ft(p+d["y"===h?"top":"left"],p,p-d[t])}if(s){const t="y"===u?"bottom":"right";f=ft(f+d["y"===u?"top":"left"],f,f-d[t])}const g=a.fn({...e,[h]:p,[u]:f});return{...g,data:{x:g.x-i,y:g.y-n}}}}},Xt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i,n;const{placement:o,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...m}=gt(t,e);if(null!=(i=r.arrow)&&i.alignmentOffset)return{};const w=mt(o),b=mt(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),v=h||(b||!g?[Rt(a)]:function(t){const e=Rt(t);return[zt(t),e,zt(e)]}(a));h||"none"===f||v.push(...function(t,e,i,n){const o=wt(t);let r=function(t,e,i){const n=["left","right"],o=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return i?e?o:n:e?n:o;case"left":case"right":return e?r:s;default:return[]}}(mt(t),"start"===i,n);return o&&(r=r.map((t=>t+"-"+o)),e&&(r=r.concat(r.map(zt)))),r}(a,g,f,x));const y=[a,...v],z=await Ct(e,m),R=[];let S=(null==(n=r.flip)?void 0:n.overflows)||[];if(d&&R.push(z[w]),u){const t=function(t,e,i){void 0===i&&(i=!1);const n=wt(t),o=yt(t),r=xt(o);let s="x"===o?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=Rt(s)),[s,Rt(s)]}(o,s,x);R.push(z[t[0]],z[t[1]])}if(S=[...S,{placement:o,overflows:R}],!R.every((t=>t<=0))){var _,E;const t=((null==(_=r.flip)?void 0:_.index)||0)+1,e=y[t];if(e)return{data:{index:t,overflows:S},reset:{placement:e}};let i=null==(E=S.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:E.placement;if(!i)switch(p){case"bestFit":{var C;const t=null==(C=S.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:C[0];t&&(i=t);break}case"initialPlacement":i=a}if(o!==i)return{reset:{placement:i}}}return{}}}},Yt=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:i,elements:n,rects:o,platform:r,strategy:s}=e,{padding:a=2,x:l,y:c}=gt(t,e),d=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(n.reference))||[]),u=function(t){const e=t.slice().sort(((t,e)=>t.y-e.y)),i=[];let n=null;for(let t=0;t<e.length;t++){const o=e[t];!n||o.y-n.y>n.height/2?i.push([o]):i[i.length-1].push(o),n=o}return i.map((t=>_t(kt(t))))}(d),h=_t(kt(d)),p=St(a);const f=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=l&&null!=c)return u.find((t=>l>t.left-p.left&&l<t.right+p.right&&c>t.top-p.top&&c<t.bottom+p.bottom))||h;if(u.length>=2){if("y"===vt(i)){const t=u[0],e=u[u.length-1],n="top"===mt(i),o=t.top,r=e.bottom,s=n?t.left:e.left,a=n?t.right:e.right;return{top:o,bottom:r,left:s,right:a,width:a-s,height:r-o,x:s,y:o}}const t="left"===mt(i),e=ct(...u.map((t=>t.right))),n=lt(...u.map((t=>t.left))),o=u.filter((i=>t?i.left===n:i.right===e)),r=o[0].top,s=o[o.length-1].bottom;return{top:r,bottom:s,left:n,right:e,width:e-n,height:s-r,x:n,y:r}}return h}},floating:n.floating,strategy:s});return o.reference.x!==f.reference.x||o.reference.y!==f.reference.y||o.reference.width!==f.reference.width||o.reference.height!==f.reference.height?{reset:{rects:f}}:{}}}},Gt=(t,e,i)=>{const n=new Map,o={platform:Ut,...i},r={...o.platform,_c:n};return(async(t,e,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:r=[],platform:s}=i,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:d,y:u}=Et(c,n,l),h=n,p={},f=0;for(let i=0;i<a.length;i++){const{name:r,fn:g}=a[i],{x:m,y:w,data:b,reset:x}=await g({x:d,y:u,initialPlacement:n,placement:h,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:t,floating:e}});d=null!=m?m:d,u=null!=w?w:u,p={...p,[r]:{...p[r],...b}},x&&f<=50&&(f++,"object"==typeof x&&(x.placement&&(h=x.placement),x.rects&&(c=!0===x.rects?await s.getElementRects({reference:t,floating:e,strategy:o}):x.rects),({x:d,y:u}=Et(c,h,l))),i=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:p}})(t,e,{...o,platform:r})};var Zt="undefined"!=typeof document?f:h;function qt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;let i,n,o;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if(i=t.length,i!==e.length)return!1;for(n=i;0!=n--;)if(!qt(t[n],e[n]))return!1;return!0}if(o=Object.keys(t),i=o.length,i!==Object.keys(e).length)return!1;for(n=i;0!=n--;)if(!{}.hasOwnProperty.call(e,o[n]))return!1;for(n=i;0!=n--;){const i=o[n];if(("_owner"!==i||!t.$$typeof)&&!qt(t[i],e[i]))return!1}return!0}return t!=t&&e!=e}function Jt(t){if("undefined"==typeof window)return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Kt(t,e){const i=Jt(t);return Math.round(e*i)/i}function Qt(t){const e=d.useRef(t);return Zt((()=>{e.current=t})),e}
|
|
2
|
-
/*!
|
|
3
|
-
* tabbable 6.2.0
|
|
4
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
5
|
-
*/
|
|
6
|
-
var te=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),ee="undefined"==typeof Element,ie=ee?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ne=!ee&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},oe=function t(e,i){var n;void 0===i&&(i=!0);var o=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===o||"true"===o||i&&e&&t(e.parentNode)},re=function t(e,i,n){for(var o=[],r=Array.from(e);r.length;){var s=r.shift();if(!oe(s,!1))if("SLOT"===s.tagName){var a=s.assignedElements(),l=t(a.length?a:s.children,!0,n);n.flatten?o.push.apply(o,l):o.push({scopeParent:s,candidates:l})}else{ie.call(s,te)&&n.filter(s)&&(i||!e.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(s),d=!oe(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(c&&d){var u=t(!0===c?s.children:c.children,!0,n);n.flatten?o.push.apply(o,u):o.push({scopeParent:s,candidates:u})}else r.unshift.apply(r,s.children)}}return o},se=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ae=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(t){var e,i=null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"contenteditable");return""===i||"true"===i}(t))&&!se(t)?0:t.tabIndex},le=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},ce=function(t){return"INPUT"===t.tagName},de=function(t){return function(t){return ce(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,i=t.form||ne(t),n=function(t){return i.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=n(window.CSS.escape(t.name));else try{e=n(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var o=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]}(e,t.form);return!o||o===t}(t)},ue=function(t){var e=t.getBoundingClientRect(),i=e.width,n=e.height;return 0===i&&0===n},he=function(t,e){var i=e.displayCheck,n=e.getShadowRoot;if("hidden"===getComputedStyle(t).visibility)return!0;var o=ie.call(t,"details>summary:first-of-type")?t.parentElement:t;if(ie.call(o,"details:not([open]) *"))return!0;if(i&&"full"!==i&&"legacy-full"!==i){if("non-zero-area"===i)return ue(t)}else{if("function"==typeof n){for(var r=t;t;){var s=t.parentElement,a=ne(t);if(s&&!s.shadowRoot&&!0===n(s))return ue(t);t=t.assignedSlot?t.assignedSlot:s||a===t.ownerDocument?s:a.host}t=r}if(function(t){var e,i,n,o,r=t&&ne(t),s=null===(e=r)||void 0===e?void 0:e.host,a=!1;if(r&&r!==t)for(a=!!(null!==(i=s)&&void 0!==i&&null!==(n=i.ownerDocument)&&void 0!==n&&n.contains(s)||null!=t&&null!==(o=t.ownerDocument)&&void 0!==o&&o.contains(t));!a&&s;){var l,c,d;a=!(null===(c=s=null===(l=r=ne(s))||void 0===l?void 0:l.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(s))}return a}(t))return!t.getClientRects().length;if("legacy-full"!==i)return!0}return!1},pe=function(t,e){return!(e.disabled||oe(e)||function(t){return ce(t)&&"hidden"===t.type}(e)||he(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var i=0;i<e.children.length;i++){var n=e.children.item(i);if("LEGEND"===n.tagName)return!!ie.call(e,"fieldset[disabled] *")||!n.contains(t)}return!0}e=e.parentElement}return!1}(e))},fe=function(t,e){return!(de(e)||ae(e)<0||!pe(t,e))},ge=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},me=function t(e){var i=[],n=[];return e.forEach((function(e,o){var r=!!e.scopeParent,s=r?e.scopeParent:e,a=function(t,e){var i=ae(t);return i<0&&e&&!se(t)?0:i}(s,r),l=r?t(e.candidates):s;0===a?r?i.push.apply(i,l):i.push(s):n.push({documentOrder:o,tabIndex:a,item:e,isScope:r,content:l})})),n.sort(le).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(i)},we=function(t,e){var i;return i=(e=e||{}).getShadowRoot?re([t],e.includeContainer,{filter:fe.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:ge}):function(t,e,i){if(oe(t))return[];var n=Array.prototype.slice.apply(t.querySelectorAll(te));return e&&ie.call(t,te)&&n.unshift(t),n.filter(i)}(t,e.includeContainer,fe.bind(null,e)),me(i)};const be=d["useInsertionEffect".toString()]||(t=>t());var xe="undefined"!=typeof document?f:h;function ve(){return ve=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},ve.apply(this,arguments)}let ye=!1,ze=0;const Re=()=>"floating-ui-"+ze++;const Se=d["useId".toString()]||function(){const[t,e]=d.useState((()=>ye?Re():void 0));return xe((()=>{null==t&&e(Re())}),[]),d.useEffect((()=>{ye||(ye=!0)}),[]),t};const _e=d.createContext(null),Ee=d.createContext(null);function Ce(t){return"data-floating-ui-"+t}const ke=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Oe(t,e){const i=we(t,ke());"prev"===e&&i.reverse();const n=i.indexOf(function(t){let e=t.activeElement;for(;null!=(null==(i=e)||null==(i=i.shadowRoot)?void 0:i.activeElement);){var i;e=e.shadowRoot.activeElement}return e}((null==(o=t)?void 0:o.ownerDocument)||document));var o;return i.slice(n+1)[0]}function Ne(t,e){const i=e||t.currentTarget,n=t.relatedTarget;return!n||!function(t,e){if(!t||!e)return!1;const i=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(i&&J(i)){let i=e;for(;i;){if(t===i)return!0;i=i.parentNode||i.host}}return!1}(i,n)}function Le(t){we(t,ke()).forEach((t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}))}function Me(t){t.querySelectorAll("[data-tabindex]").forEach((t=>{const e=t.dataset.tabindex;delete t.dataset.tabindex,e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex")}))}const We={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function Ae(t){"Tab"===t.key&&(t.target,clearTimeout(undefined))}const Te=d.forwardRef((function(t,e){const[i,n]=d.useState();xe((()=>(/apple/i.test(navigator.vendor)&&n("button"),document.addEventListener("keydown",Ae),()=>{document.removeEventListener("keydown",Ae)})),[]);const o={ref:e,tabIndex:0,role:i,"aria-hidden":!i||void 0,[Ce("focus-guard")]:"",style:We};return d.createElement("span",ve({},t,o))})),je=d.createContext(null),Be=Ce("portal");function Ie(t){let{children:e,id:i,root:n=null,preserveTabOrder:o=!0}=t;const r=function(t){let{id:e,root:i}=void 0===t?{}:t;const[n,o]=d.useState(null),r=Se(),s=Pe(),a=d.useRef(null);return xe((()=>()=>{null==n||n.remove(),queueMicrotask((()=>{a.current=null}))}),[n]),xe((()=>{if(a.current)return;const t=e?document.getElementById(e):null;if(!t)return;const i=document.createElement("div");i.id=r,i.setAttribute(Be,""),t.appendChild(i),a.current=i,o(i)}),[e,r]),xe((()=>{if(a.current)return;let t=i||(null==s?void 0:s.portalNode);t&&!Z(t)&&(t=t.current),t=t||document.body;let n=null;e&&(n=document.createElement("div"),n.id=e,t.appendChild(n));const l=document.createElement("div");l.id=r,l.setAttribute(Be,""),t=n||t,t.appendChild(l),a.current=l,o(l)}),[e,i,r,s]),n}({id:i,root:n}),[s,a]=d.useState(null),l=d.useRef(null),c=d.useRef(null),u=d.useRef(null),h=d.useRef(null),p=!!s&&!s.modal&&s.open&&o&&!(!n&&!r);return d.useEffect((()=>{if(r&&o&&(null==s||!s.modal))return r.addEventListener("focusin",t,!0),r.addEventListener("focusout",t,!0),()=>{r.removeEventListener("focusin",t,!0),r.removeEventListener("focusout",t,!0)};function t(t){if(r&&Ne(t)){("focusin"===t.type?Me:Le)(r)}}}),[r,o,null==s?void 0:s.modal]),d.createElement(je.Provider,{value:d.useMemo((()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:h,portalNode:r,setFocusManagerState:a})),[o,r])},p&&r&&d.createElement(Te,{"data-type":"outside",ref:l,onFocus:t=>{if(Ne(t,r)){var e;null==(e=u.current)||e.focus()}else{const t=Oe(document.body,"prev")||(null==s?void 0:s.refs.domReference.current);null==t||t.focus()}}}),p&&r&&d.createElement("span",{"aria-owns":r.id,style:We}),r&&v(e,r),p&&r&&d.createElement(Te,{"data-type":"outside",ref:c,onFocus:t=>{if(Ne(t,r)){var e;null==(e=h.current)||e.focus()}else{const e=Oe(document.body,"next")||(null==s?void 0:s.refs.domReference.current);null==e||e.focus(),(null==s?void 0:s.closeOnFocusOut)&&(null==s||s.onOpenChange(!1,t.nativeEvent))}}}))}const Pe=()=>d.useContext(je),He=new Set,Fe=d.forwardRef((function(t,e){let{lockScroll:i=!1,...n}=t;const o=Se();return xe((()=>{if(!i)return;He.add(o);const t=/iP(hone|ad|od)|iOS/.test(function(){const t=navigator.userAgentData;return null!=t&&t.platform?t.platform:navigator.platform}()),e=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,s=e.left?parseFloat(e.left):window.pageXOffset,a=e.top?parseFloat(e.top):window.pageYOffset;if(e.overflow="hidden",r&&(e[n]=r+"px"),t){var l,c;const t=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,i=(null==(c=window.visualViewport)?void 0:c.offsetTop)||0;Object.assign(e,{position:"fixed",top:-(a-Math.floor(i))+"px",left:-(s-Math.floor(t))+"px",right:"0"})}return()=>{He.delete(o),0===He.size&&(Object.assign(e,{overflow:"",[n]:""}),t&&(Object.assign(e,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a)))}}),[o,i]),d.createElement("div",ve({ref:e},n,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...n.style}}))}));function De(t){var e;void 0===t&&(t={});const{open:i=!1,onOpenChange:n,nodeId:o}=t,[r,s]=d.useState(null),a=(null==(e=t.elements)?void 0:e.reference)||r,l=function(t){void 0===t&&(t={});const{placement:e="bottom",strategy:i="absolute",middleware:n=[],platform:o,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,h]=d.useState({x:0,y:0,strategy:i,placement:e,middlewareData:{},isPositioned:!1}),[p,f]=d.useState(n);qt(p,n)||f(n);const[g,m]=d.useState(null),[w,x]=d.useState(null),v=d.useCallback((t=>{t!==S.current&&(S.current=t,m(t))}),[]),y=d.useCallback((t=>{t!==_.current&&(_.current=t,x(t))}),[]),z=r||g,R=s||w,S=d.useRef(null),_=d.useRef(null),E=d.useRef(u),C=null!=l,k=Qt(l),O=Qt(o),N=d.useCallback((()=>{if(!S.current||!_.current)return;const t={placement:e,strategy:i,middleware:p};O.current&&(t.platform=O.current),Gt(S.current,_.current,t).then((t=>{const e={...t,isPositioned:!0};L.current&&!qt(E.current,e)&&(E.current=e,b.flushSync((()=>{h(e)})))}))}),[p,e,i,O]);Zt((()=>{!1===c&&E.current.isPositioned&&(E.current.isPositioned=!1,h((t=>({...t,isPositioned:!1}))))}),[c]);const L=d.useRef(!1);Zt((()=>(L.current=!0,()=>{L.current=!1})),[]),Zt((()=>{if(z&&(S.current=z),R&&(_.current=R),z&&R){if(k.current)return k.current(z,R,N);N()}}),[z,R,N,k,C]);const M=d.useMemo((()=>({reference:S,floating:_,setReference:v,setFloating:y})),[v,y]),W=d.useMemo((()=>({reference:z,floating:R})),[z,R]),A=d.useMemo((()=>{const t={position:i,left:0,top:0};if(!W.floating)return t;const e=Kt(W.floating,u.x),n=Kt(W.floating,u.y);return a?{...t,transform:"translate("+e+"px, "+n+"px)",...Jt(W.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:e,top:n}}),[i,a,W.floating,u.x,u.y]);return d.useMemo((()=>({...u,update:N,refs:M,elements:W,floatingStyles:A})),[u,N,M,W,A])}(t),c=d.useContext(Ee),u=null!=((null==(h=d.useContext(_e))?void 0:h.id)||null);var h;const p=function(t){const e=d.useRef((()=>{}));return be((()=>{e.current=t})),d.useCallback((function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return null==e.current?void 0:e.current(...i)}),[])}(((t,e,i)=>{t&&(g.current.openEvent=e),m.emit("openchange",{open:t,event:e,reason:i,nested:u}),null==n||n(t,e,i)})),f=d.useRef(null),g=d.useRef({}),m=d.useState((()=>function(){const t=new Map;return{emit(e,i){var n;null==(n=t.get(e))||n.forEach((t=>t(i)))},on(e,i){t.set(e,[...t.get(e)||[],i])},off(e,i){var n;t.set(e,(null==(n=t.get(e))?void 0:n.filter((t=>t!==i)))||[])}}}()))[0],w=Se(),x=d.useCallback((t=>{const e=Z(t)?{getBoundingClientRect:()=>t.getBoundingClientRect(),contextElement:t}:t;l.refs.setReference(e)}),[l.refs]),v=d.useCallback((t=>{(Z(t)||null===t)&&(f.current=t,s(t)),(Z(l.refs.reference.current)||null===l.refs.reference.current||null!==t&&!Z(t))&&l.refs.setReference(t)}),[l.refs]),y=d.useMemo((()=>({...l.refs,setReference:v,setPositionReference:x,domReference:f})),[l.refs,v,x]),z=d.useMemo((()=>({...l.elements,domReference:a})),[l.elements,a]),R=d.useMemo((()=>({...l,refs:y,elements:z,dataRef:g,nodeId:o,floatingId:w,events:m,open:i,onOpenChange:p})),[l,o,w,m,i,p,y,z]);return xe((()=>{const t=null==c?void 0:c.nodesRef.current.find((t=>t.id===o));t&&(t.context=R)})),d.useMemo((()=>({...l,context:R,refs:y,elements:z})),[l,y,z,R])}function Ve(t,e){if(null==t)return{};var i,n,o={},r=Object.keys(t);for(n=0;n<r.length;n++)i=r[n],e.indexOf(i)>=0||(o[i]=t[i]);return o}var Ue=["color"],$e=g((function(t,e){var i=t.color,n=void 0===i?"currentColor":i,o=Ve(t,Ue);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:e}),m("path",{d:"M9.96424 2.68571C10.0668 2.42931 9.94209 2.13833 9.6857 2.03577C9.4293 1.93322 9.13832 2.05792 9.03576 2.31432L5.03576 12.3143C4.9332 12.5707 5.05791 12.8617 5.3143 12.9642C5.5707 13.0668 5.86168 12.9421 5.96424 12.6857L9.96424 2.68571ZM3.85355 5.14646C4.04882 5.34172 4.04882 5.6583 3.85355 5.85356L2.20711 7.50001L3.85355 9.14646C4.04882 9.34172 4.04882 9.6583 3.85355 9.85356C3.65829 10.0488 3.34171 10.0488 3.14645 9.85356L1.14645 7.85356C0.951184 7.6583 0.951184 7.34172 1.14645 7.14646L3.14645 5.14646C3.34171 4.9512 3.65829 4.9512 3.85355 5.14646ZM11.1464 5.14646C11.3417 4.9512 11.6583 4.9512 11.8536 5.14646L13.8536 7.14646C14.0488 7.34172 14.0488 7.6583 13.8536 7.85356L11.8536 9.85356C11.6583 10.0488 11.3417 10.0488 11.1464 9.85356C10.9512 9.6583 10.9512 9.34172 11.1464 9.14646L12.7929 7.50001L11.1464 5.85356C10.9512 5.6583 10.9512 5.34172 11.1464 5.14646Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),Xe=["color"],Ye=g((function(t,e){var i=t.color,n=void 0===i?"currentColor":i,o=Ve(t,Xe);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:e}),m("path",{d:"M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}));const Ge={youtube:t=>{const e=t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return e&&11===e[2].length?e[2]:null},vimeo:t=>new URL(t).pathname.split("/")[1],dailymotion:t=>{const e=t.match(/^.+dailymotion.com\/(embed|hub)\/([^_]+)[^#]*(#embed=([^_&]+))?/);return null!==e?void 0!==e[4]?e[4]:e[2]:null},twitter:function(t){const e=t.match(/\/status\/(\d+)/);return e?e[1]:null},figma:function(t){const e=new URL(t).searchParams,i=e.get("node-id");return e.get("node-id")?i:"unknown"}},Ze=({blockId:e,onClose:i})=>{const n=t(),[o,r]=u(""),s=0===o.length;return l("div",Object.assign({className:"cursor-pointer user-select-none transition-bg duration-20 ease-in white-space-nowrap w-full"},{children:[c("input",{type:"text",placeholder:"Paste embed link",value:o,className:"items-center bg-[hsla(45,13%,94%,.6)] rounded-[4px] shadow-[inset_0_0_0_1px_hsla(0,0%,6%,.1)] cursor-text flex text-[14px] h-[32px] leading-[20px] px-[6px] relative w-full border-none",onChange:t=>r(t.target.value)}),c("button",Object.assign({type:"button",className:"user-select-none transition-bg duration-20 ease-in cursor-pointer flex items-center justify-center flex-shrink-0 white-space-nowrap h-[28px] rounded-[4px] shadow-[rgba(15,15,15,0.1)_0px_0px_0px_1px_inset,_rgba(15,15,15,0.1)_0px_1px_2px] bg-[rgb(35,131,226)] text-white fill-white leading-[1.2] px-[12px] text-[14px] font-medium w-full max-w-[300px] mx-auto m-[12px_0_6px] disabled:bg-[rgba(35,131,226,0.5)] disabled:cursor-not-allowed",disabled:s,onClick:()=>{var t;if(0===o.length)return;const r=(s=o).includes("youtube.com")||s.includes("youtu.be")?"youtube":s.includes("vimeo.com")?"vimeo":s.includes("dailymotion.com")||s.includes("dai.ly")?"dailymotion":s.includes("twitter")?"twitter":s.includes("figma")?"figma":null;var s;const a=r?null===(t=Ge[r])||void 0===t?void 0:t.call(Ge,o):null,l={type:r,id:a,url:o};r&&a||(l.id=o),n.blocks.Embed.updateElement(e,"embed",{provider:l}),i()}},{children:"Embed embed"}))]}))},qe=({floatingStyles:t,refs:e,onClose:i,blockId:n})=>c(Ie,Object.assign({root:document.getElementById("yoopta-editor")},{children:c(Fe,Object.assign({lockScroll:!0,className:"z-[100]",onClick:i},{children:c("div",Object.assign({ref:e.setFloating,style:t,onClick:t=>t.stopPropagation()},{children:l("div",Object.assign({className:"flex flex-col min-w-[540px] max-w-[calc(100vw-24px)] h-full max-h-[420px] bg-white shadow-[rgb(15_15_15_/5%)_0px_0px_0px_1px,_rgb(15_15_15_/10%)_0px_3px_6px,_rgb(15_15_15_/20%)_0px_9px_24px]"},{children:[c("div",Object.assign({className:"w-full flex text-[14px] p-[0_8px] shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] relative z-10 h-[40px]"},{children:c("button",Object.assign({type:"button",style:{borderBottom:"2px solid #2483e2"},className:"py-[6px] whitespace-nowrap min-w-0 flex-shrink-0 text-[rgb(55,53,47)] relative cursor-pointer user-select-none bg-inherit transition-[height_20ms_ease-in] inline-flex items-center h-full text-[14px] leading-[1.2] px-[8px]"},{children:"Embed link"}))})),c("div",Object.assign({className:"pt-[6px] pb-[6px] mt-[4px] flex justify-center mr-[12px] ml-[12px]"},{children:c(Ze,{onClose:i,blockId:n})}))]}))}))}))})),Je=({attributes:t,children:e,blockId:i})=>{const[n,o]=u(!1),{refs:r,floatingStyles:s}=De({placement:"bottom",open:n,onOpenChange:o,middleware:[Yt(),Xt(),$t(),Ot(10)]});return l("div",Object.assign({className:"w-full user-select-none m-[20px_0_10px] relative flex"},t,{contentEditable:!1},{children:[l("button",Object.assign({className:"p-[12px_36px_12px_12px] flex items-center text-left w-full overflow-hidden rounded-[3px] text-[14px] text-[rgba(55,53,47,0.65)] relative cursor-pointer border-none bg-[#efefef] transition-[background-color_100ms_ease-in] hover:bg-[#e3e3e3]",onClick:()=>o(!0),ref:r.setReference},{children:[c($e,{className:"mr-2 user-select-none",width:24,height:24}),c("span",Object.assign({className:"font-medium"},{children:"Click to add embed"}))]})),n&&c(qe,{blockId:i,floatingStyles:s,refs:r,onClose:()=>o(!1)}),e]}))},{ExtendedBlockActions:Ke,BlockOptionsMenuGroup:Qe,BlockOptionsMenuItem:ti,BlockOptionsSeparator:ei}=e,ii=({editor:t,block:e,props:i})=>l(Ke,Object.assign({onClick:()=>t.setSelection([e.meta.order])},{children:[c(ei,{}),c(Qe,{children:c(ti,{children:l("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",onClick:()=>{var t;window.open(null===(t=null==i?void 0:i.provider)||void 0===t?void 0:t.url,"_blank")}},{children:[c(Ye,{width:16,height:16,className:"w-4 h-4 mr-2"}),"Open"]}))})})]})),ni=({position:t})=>c("div",Object.assign({contentEditable:!1,className:"absolute pointer-events-none flex items-center justify-center z-10 opacity-1 h-full w-[15px] cursor-col-resize transition-opacity duration-150 ease-in "+("left"===t?"left-0 top-0":"right-0 top-0")},{children:c("div",{className:"opacity-100 transition-opacity duration-300 ease-in rounded-[20px] bg-[rgba(15,15,15,0.6)] border border-[rgba(255,255,255,0.9)] w-[6px] h-[48px] max-h-[50%] shadow-[0_0_0_.5px_#FFF]"})})),oi=new s({type:"Embed",elements:{embed:{render:({element:e,attributes:s,children:a,blockId:d})=>{const{sizes:p,provider:f}=e.props||{},g=i(d),m=t(),b=n("Embed"),x=o(),[v,y]=u({width:(null==p?void 0:p.width)||750,height:(null==p?void 0:p.height)||440});h((()=>y({width:(null==p?void 0:p.width)||650,height:(null==p?void 0:p.height)||440})),[e.props]);const z=r({blockId:d}),S=w((()=>{var t,e;return{minWidth:300,size:{width:v.width,height:v.height},maxWidth:(null===(t=null==b?void 0:b.maxSizes)||void 0===t?void 0:t.maxWidth)||800,maxHeight:(null===(e=null==b?void 0:b.maxSizes)||void 0===e?void 0:e.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!x,right:!x},handleStyles:{left:{left:0},right:{right:0}},onResize:(t,e,i)=>{y({width:i.offsetWidth,height:i.offsetHeight})},onResizeStop:(t,e,i)=>{m.blocks.Embed.updateElement(d,"embed",{sizes:{width:i.offsetWidth,height:i.offsetHeight}})},handleComponent:{left:c(ni,{position:"left"}),right:c(ni,{position:"right"})}}}),[v.width,v.height]);return f&&(null==f?void 0:f.id)?c("div",Object.assign({"data-element-type":e.type,contentEditable:!1,draggable:!1,className:"mt-4 relative yoopta-embed"},s,{children:l(U,Object.assign({},S,{className:"mx-auto my-0 flex"},{children:[z&&c("div",{className:"absolute pointer-events-none inset-0 bg-[rgba(35,131,226,0.14)] z-[81] rounded-[3px] opacity-100 transition-opacity duration-150 ease-in"}),c(R,{width:null==v?void 0:v.width,height:null==v?void 0:v.height,provider:f,blockId:d}),!x&&c(ii,{block:g,editor:m,props:e.props}),a]}))})):c(Je,Object.assign({attributes:s,blockId:d},{children:a}))},props:{sizes:{width:650,height:400},nodeType:"void"}}},options:{display:{title:"Embed",description:"For embed videos, google maps and more"},maxSizes:{maxWidth:650,maxHeight:550}},parsers:{html:{deserialize:{nodeNames:["IFRAME"],parse:t=>{if("IFRAME"===t.nodeName){const e=new URL(t.getAttribute("src")||"");return{id:a(),type:"embed",children:[{text:""}],props:{provider:{id:e.href,type:e.hostname,url:e.href},sizes:{width:t.getAttribute("width")?parseInt(t.getAttribute("width")||"650",10):650,height:t.getAttribute("height")?parseInt(t.getAttribute("height")||"400",10):400}}}}}}}}});!function(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}(".pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.z-\\[100\\]{z-index:100}.z-\\[81\\]{z-index:81}.m-\\[12px_0_6px\\]{margin:12px 0 6px}.m-\\[20px_0_10px\\]{margin:20px 0 10px}.mx-\\[4px\\]{margin-left:4px;margin-right:4px}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-bottom:0;margin-top:0}.ml-\\[12px\\]{margin-left:12px}.mr-2{margin-right:.5rem}.mr-\\[12px\\]{margin-right:12px}.mt-4{margin-top:1rem}.mt-\\[4px\\]{margin-top:4px}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.h-4{height:1rem}.h-\\[28px\\]{height:28px}.h-\\[32px\\]{height:32px}.h-\\[40px\\]{height:40px}.h-\\[48px\\]{height:48px}.h-full{height:100%}.max-h-\\[420px\\]{max-height:420px}.max-h-\\[50\\%\\]{max-height:50%}.w-4{width:1rem}.w-\\[15px\\]{width:15px}.w-\\[6px\\]{width:6px}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\\[540px\\]{min-width:540px}.max-w-\\[300px\\]{max-width:300px}.max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.flex-shrink-0{flex-shrink:0}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[20px\\]{border-radius:20px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[4px\\]{border-radius:4px}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-none{border-style:none}.border-\\[rgba\\(255\\2c 255\\2c 255\\2c 0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}.bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}.bg-\\[hsla\\(45\\2c 13\\%\\2c 94\\%\\2c \\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}.bg-\\[rgb\\(35\\2c 131\\2c 226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}.bg-\\[rgba\\(15\\2c 15\\2c 15\\2c 0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}.bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}.bg-inherit{background-color:inherit}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.fill-white{fill:#fff}.p-\\[0_8px\\]{padding:0 8px}.p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-\\[12px\\]{padding-left:12px;padding-right:12px}.px-\\[6px\\]{padding-left:6px;padding-right:6px}.px-\\[8px\\]{padding-left:8px;padding-right:8px}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-\\[6px\\]{padding-top:6px}.pb-\\[6px\\],.py-\\[6px\\]{padding-bottom:6px}.pt-\\[6px\\]{padding-top:6px}.text-left{text-align:left}.text-\\[14px\\]{font-size:14px}.font-medium{font-weight:500}.leading-\\[1\\.2\\]{line-height:1.2}.leading-\\[120\\%\\]{line-height:120%}.leading-\\[20px\\]{line-height:20px}.text-\\[rgb\\(55\\2c 53\\2c 47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}.text-\\[rgba\\(55\\2c 53\\2c 47\\2c 0\\.65\\)\\]{color:rgba(55,53,47,.65)}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.opacity-100{opacity:1}.shadow-\\[0_0_0_\\.5px_\\#FFF\\]{--tw-shadow:0 0 0 .5px #fff;--tw-shadow-colored:0 0 0 .5px var(--tw-shadow-color)}.shadow-\\[0_0_0_\\.5px_\\#FFF\\],.shadow-\\[inset_0_0_0_1px_hsla\\(0\\2c 0\\%\\2c 6\\%\\2c \\.1\\)\\]{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[inset_0_0_0_1px_hsla\\(0\\2c 0\\%\\2c 6\\%\\2c \\.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)}.shadow-\\[rgb\\(15_15_15_\\/5\\%\\)_0px_0px_0px_1px\\2c _rgb\\(15_15_15_\\/10\\%\\)_0px_3px_6px\\2c _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)}.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)}.shadow-\\[rgba\\(15\\2c 15\\2c 15\\2c 0\\.1\\)_0px_0px_0px_1px_inset\\2c _rgba\\(15\\2c 15\\2c 15\\2c 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)}.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)}.transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-opacity{transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.yoopta-embed .yoopta-extended-block-actions{opacity:0;transition:opacity .15s ease-in-out}.yoopta-embed:hover .yoopta-extended-block-actions{opacity:1}.hover\\:bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.hover\\:bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}");export{oi as default};
|