(()=>{"use strict";const e=window.ReactJSXRuntime,n=window.wp.blocks,t=window.wp.blockEditor,o=window.wp.i18n,s=window.wp.element,r=window.wp.data,i=window.wp.components,l=n=>(0,e.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:Object.assign(Object.assign({},n.style),{fill:"none"}),children:[(0,e.jsx)("path",{d:"M22 16.4009V7.5991C21.9996 7.21322 21.8967 6.83423 21.7017 6.50015C21.5067 6.16607 21.2264 5.88865 20.8889 5.69571L13.1111 1.2948C12.7733 1.10167 12.3901 1 12 1C11.6099 1 11.2267 1.10167 10.8889 1.2948L3.11111 5.69571C2.77363 5.88865 2.49331 6.16607 2.29829 6.50015C2.10327 6.83423 2.0004 7.21322 2 7.5991V16.4009C2.0004 16.7868 2.10327 17.1658 2.29829 17.4998C2.49331 17.8339 2.77363 18.1114 3.11111 18.3043L10.8889 22.7052C11.2267 22.8983 11.6099 23 12 23C12.3901 23 12.7733 22.8983 13.1111 22.7052L20.8889 18.3043C21.2264 18.1114 21.5067 17.8339 21.7017 17.4998C21.8967 17.1658 21.9996 16.7868 22 16.4009Z",fill:"url(#paint0_linear_4_53)"}),(0,e.jsx)("path",{d:"M16 9C16.5523 9 17 8.55228 17 8C17 7.44772 16.5523 7 16 7C15.4477 7 15 7.44772 15 8C15 8.55228 15.4477 9 16 9Z",stroke:"#CFDFDA",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.jsx)("path",{d:"M8 17C8.55228 17 9 16.5523 9 16C9 15.4477 8.55228 15 8 15C7.44772 15 7 15.4477 7 16C7 16.5523 7.44772 17 8 17Z",stroke:"#CFDFDA",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.jsx)("path",{d:"M8 15C8 13.1435 8.7375 11.363 10.0503 10.0503C11.363 8.7375 13.1435 8 15 8",stroke:"#CFDFDA",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.jsx)("defs",{children:(0,e.jsxs)("linearGradient",{id:"paint0_linear_4_53",x1:"12",y1:"12",x2:"-4",y2:"23",gradientUnits:"userSpaceOnUse",children:[(0,e.jsx)("stop",{stopColor:"#173042"}),(0,e.jsx)("stop",{offset:"1",stopColor:"#236E77"})]})})]});function c(e){if(!e)return;const{ownerDocument:n}=e,{defaultView:t}=n;return t&&t.ScrollsequenceManager?t.ScrollsequenceManager:void 0}const{applyFilters:d}=wp.hooks,a=JSON.parse('{"UU":"scroll-sequence/v2-canvas1d"}');(0,n.registerBlockType)(a.UU,{icon:l,edit:function(n){const{clientId:d,attributes:a,setAttributes:u,attributes:{height:p,heightUnit:w,lottieUrl:C},onRemove:v,onReplace:h}=n,j=((0,r.useSelect)((e=>e("core/blocks").getBlockType("scroll-sequence/v2-canvas2d").attributes),[]),p&&w?`${p}${w}`:p),k=(0,s.useRef)(null),f=(0,t.useBlockProps)({style:{height:j||void 0,width:"100%"},ref:k});return(0,s.useEffect)((()=>{var e,n,t;return console.log("canvas2d useEffect[attributes] elRef.current.id",null===(e=k.current)||void 0===e?void 0:e.id),null===(n=c(k.current))||void 0===n||n.createBlock(k.current),null===(t=c(k.current))||void 0===t||t.preloadAll(),()=>{var e,n;console.log("canvas2d useEffect[attributes] CLEANUP elRef.current.id",null===(e=k.current)||void 0===e?void 0:e.id),null===(n=c(k.current))||void 0===n||n.destroyBlock(k.current)}}),[a]),(0,e.jsx)(e.Fragment,{children:C?(0,e.jsx)("div",Object.assign({},f,{"data-ssq-canvas3d":JSON.stringify(a),children:(0,e.jsx)("canvas",{})})):(0,e.jsx)("div",Object.assign({},f,{children:(0,e.jsx)(i.Placeholder,{icon:l,instructions:(0,o.__)("Enter Spline code URL","scrollsequence"),label:(0,o.__)("Canvas 3D ","scrollsequence"),children:"TODO: a lottie url input field here (wp component)"})}))})},save:n=>(0,e.jsx)(t.InnerBlocks.Content,{})})})();