Changeset 3226624
- Timestamp:
- 01/22/2025 07:00:27 AM (6 weeks ago)
- Location:
- snow-monkey-blocks/trunk
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
snow-monkey-blocks/trunk/changelog.txt
r3211380 r3226624 1 1 *** Changelog *** 2 3 = 22.3.3 = 4 * [Tabs] Fixed a bug that the editor sometimes crashes on the editing screen of the duplicated article when duplicating an article containing a tab block using a plugin that allows duplicating articles. 2 5 3 6 = 22.3.2 = -
snow-monkey-blocks/trunk/dist/blocks/spider-contents-slider/block.json
r3129460 r3226624 65 65 }, 66 66 "sliderClientIds": { 67 "type": " string",68 "default": "[]"67 "type": "array", 68 "default": [] 69 69 }, 70 70 "border": { -
snow-monkey-blocks/trunk/dist/blocks/spider-contents-slider/index.asset.php
r3196970 r3226624 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => ' b4684b201d36345aeb05');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'd9eb7df786461f70971c'); -
snow-monkey-blocks/trunk/dist/blocks/spider-contents-slider/index.js
r3196970 r3226624 1 (()=>{var e,s={8674:(e,s, o)=>{"use strict";const t=window.wp.blocks,a=window.wp.i18n,r=JSON.parse('{"UU":"snow-monkey-blocks/spider-contents-slider","uK":{"sizeSlug":{"type":"string","default":"full"},"dots":{"type":"boolean","default":false},"arrows":{"type":"boolean","default":false},"fade":{"type":"boolean","default":false},"shuffle":{"type":"boolean","default":false},"shifted":{"type":"boolean","default":false},"gutter":{"type":"string"},"interval":{"type":"number","default":0},"autoplayButton":{"type":"boolean","default":false},"duration":{"type":"number","default":0},"lgSlidesToShow":{"type":"number","default":1},"mdSlidesToShow":{"type":"number","default":1},"smSlidesToShow":{"type":"number","default":1},"canvasPadding":{"type":"object","default":{}},"sliderClientIds":{"type":"string","default":"[]"},"border":{"type":"object","default":{"color":"","style":"","width":1,"radius":0}},"boxShadow":{"type":"object","default":{"color":"","opacity":0.1,"blur":10,"position":""}},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"align":["wide","full"],"spacing":{"margin":true}}}'),i=window.ReactJSXRuntime,l=(0,i.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,i.jsx)("path",{d:"M5,5.78V18.22a.78.78,0,0,0,.78.78H18.22a.78.78,0,0,0,.78-.78V5.78A.78.78,0,0,0,18.22,5H5.78A.78.78,0,0,0,5,5.78m12.44,12H6.56a.38.38,0,0,1-.39-.39V6.56a.38.38,0,0,1,.39-.39H17.44a.38.38,0,0,1,.39.39V17.44a.38.38,0,0,1-.39.39"}),(0,i.jsx)("path",{d:"M6.17,14.16l3.06-2.23a.22.22,0,0,1,.22,0l2.34,1.5a.21.21,0,0,0,.24,0l3-2.83a.19.19,0,0,1,.27,0l3.09,3v1.16l-3.09-3a.18.18,0,0,0-.27,0l-3,2.82a.19.19,0,0,1-.24,0L9.45,13.11a.18.18,0,0,0-.22,0L6.17,15.33Z"}),(0,i.jsx)("path",{d:"M2.22,5H0V6.17H1.44a.38.38,0,0,1,.39.39V17.44a.38.38,0,0,1-.39.39H0V19H2.22A.78.78,0,0,0,3,18.22V5.78A.78.78,0,0,0,2.22,5Z"}),(0,i.jsx)("path",{d:"M24,17.83H22.56a.38.38,0,0,1-.39-.39V6.56a.38.38,0,0,1,.39-.39H24V5H21.78a.78.78,0,0,0-.78.78V18.22a.78.78,0,0,0,.78.78H24Z"})]});var d=o(6942),n=o.n(d),c=o(3558),p=o.n(c);const u=window.wp.blockEditor,h=window.wp.components,m=window.wp.data,b=window.wp.element,v=(0,b.forwardRef)((function({icon:e,size:s=24,...o},t){return(0,b.cloneElement)(e,{width:s,height:s,...o,ref:t})})),f=window.wp.primitives,w=(0,i.jsx)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,i.jsx)(f.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"})});function x({settings:e,label:s}){const o={},t={},r=e.map(((e,s)=>{if(e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")){o.color=e.colorValue,t.color=e.onColorChange;const r=(0,u.__experimentalUseMultipleOriginColorsAndGradients)();return r.colors=r.colors.map((e=>{const s=e.colors.filter((e=>!e.color.match(/^var\(/)));return!(1>s.length)&&(e.colors=s,e)})).filter(Boolean),(0,i.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,i.jsx)(u.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,a.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,onColorChange:e.onColorChange}],__experimentalIsRenderedInSidebar:!0,...r})},s)}return e.hasOwnProperty("opacityValue")&&e.hasOwnProperty("onOpacityChange")?(o.opacity=e.opacityValue,t.opacity=e.onOpacityChange,(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Opacity","snow-monkey-blocks"),value:Number(e.opacityValue.toFixed(1)),onChange:e.onOpacityChange,min:0,max:1,step:.1},s)):e.hasOwnProperty("horizontalValue")&&e.hasOwnProperty("onHorizontalChange")?(o.horizontal=e.horizontalValue,t.horizontal=e.onHorizontalChange,(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Horizontal","snow-monkey-blocks"),value:e.horizontalValue,onChange:e.onHorizontalChange,min:null!==(r=e?.min)&&void 0!==r?r:-100,max:null!==(l=e?.max)&&void 0!==l?l:100},s)):e.hasOwnProperty("verticalValue")&&e.hasOwnProperty("onVerticalChange")?(o.vertical=e.verticalValue,t.vertical=e.onVerticalChange,(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Vertical","snow-monkey-blocks"),value:e.verticalValue,onChange:e.onVerticalChange,min:null!==(d=e?.min)&&void 0!==d?d:-100,max:null!==(n=e?.max)&&void 0!==n?n:100},s)):e.hasOwnProperty("blurValue")&&e.hasOwnProperty("onBlurChange")?(o.blur=e.blurValue,t.blur=e.onBlurChange,(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Blur","snow-monkey-blocks"),value:e.blurValue,onChange:e.onBlurChange,min:null!==(c=e?.min)&&void 0!==c?c:0,max:null!==(p=e?.max)&&void 0!==p?p:100},s)):e.hasOwnProperty("spreadValue")&&e.hasOwnProperty("onSpreadChange")?(o.spread=e.spreadValue,t.spread=e.onSpreadChange,(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Spread","snow-monkey-blocks"),value:e.spreadValue,onChange:e.onSpreadChange,min:null!==(m=e?.min)&&void 0!==m?m:-100,max:null!==(v=e?.max)&&void 0!==v?v:100},s)):e.hasOwnProperty("positionValue")&&e.hasOwnProperty("onPositionChange")?(o.position=e.positionValue,t.position=e.onPositionChange,(0,i.jsx)(h.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Position","snow-monkey-blocks"),value:e.positionValue,onChange:e.onPositionChange,options:[{value:"",label:(0,a.__)("Outline","snow-monkey-blocks")},{value:"inset",label:(0,a.__)("Inset","snow-monkey-blocks")}]},s)):(0,i.jsx)(b.Fragment,{},s);var r,l,d,n,c,p,m,v}));return(0,i.jsx)(h.__experimentalToolsPanel,{label:s||(0,a.__)("Box Shadow","snow-monkey-blocks"),className:"smb-box-shadow-tools-panel",children:(0,i.jsx)(h.__experimentalToolsPanelItem,{label:s||(0,a.__)("Box Shadow","snow-monkey-blocks"),hasValue:()=>e.some((e=>{if(e.hasOwnProperty("defaultValue")){let s;return e.hasOwnProperty("opacityValue")?s=e.opacityValue:e.hasOwnProperty("horizontalValue")?s=e.horizontalValue:e.hasOwnProperty("verticalValue")?s=e.verticalValue:e.hasOwnProperty("blurValue")?s=e.blurValue:e.hasOwnProperty("spreadValue")?s=e.spreadValue:e.hasOwnProperty("positionValue")&&(s=e.positionValue),void 0!==s&&e.defaultValue!==s}return!1})),isShownByDefault:!0,onDeselect:()=>{e.forEach((e=>{if(e.hasOwnProperty("defaultValue")){let s;e.hasOwnProperty("onOpacityChange")?s=e.onOpacityChange:e.hasOwnProperty("onHorizontalChange")?s=e.onHorizontalChange:e.hasOwnProperty("onVerticalChange")?s=e.onVerticalChange:e.hasOwnProperty("onBlurChange")?s=e.onBlurChange:e.hasOwnProperty("onSpreadChange")?s=e.onSpreadChange:e.hasOwnProperty("onPositionChange")&&(s=e.onPositionChange),void 0!==s&&s(e.defaultValue)}}))},children:r})})}function g(e){const{desktop:s,tablet:o,mobile:t}=e,a=[];return s&&a.push({name:"desktop",title:(0,i.jsx)(h.Dashicon,{icon:"desktop"})}),o&&a.push({name:"tablet",title:(0,i.jsx)(h.Dashicon,{icon:"tablet"})}),t&&a.push({name:"mobile",title:(0,i.jsx)(h.Dashicon,{icon:"smartphone"})}),(0,i.jsx)(h.TabPanel,{className:"smb-inspector-tabs",tabs:a,children:e=>{if(e.name){if("desktop"===e.name)return s();if("tablet"===e.name)return o();if("mobile"===e.name)return t()}}})}window.lodash;const _=(e,s=0,o=null)=>(e=Number(e),(isNaN(e)||e<s)&&(e=s),null!==o&&e>o&&(e=o),e),y=["snow-monkey-blocks/spider-contents-slider-item"],j=r.uK,S=r.xY,k=[{attributes:{...j},supports:{...S},save({attributes:e,className:s}){const{arrows:o,dots:t,fade:r,shuffle:l,shifted:d,gutter:c,interval:h,autoplayButton:m,duration:b,lgSlidesToShow:v,mdSlidesToShow:f,smSlidesToShow:w,canvasPadding:x,border:g,boxShadow:_,sliderClientIds:y}=e,j=JSON.parse(y),S="wide"===e.align,k="full"===e.align,N=d&&!r&&(S||k),C=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":N,[`smb-spider-slider--gutter-${c}`]:!!c}),B=String(g.width).match(/^\d+$/)?`${g.width}px`:g.width,P=String(g.radius).match(/^\d+$/)?`${g.radius}px`:g.radius,V={"--smb-spider-contents-slider--canvas-offset-top":!!x?.top&&`${x?.top}px`||void 0,"--smb-spider-contents-slider--canvas-offset-right":!!x?.right&&r&&`${x?.right}px`||void 0,"--smb-spider-contents-slider--canvas-offset-bottom":!!x?.bottom&&`${x?.bottom}px`||void 0,"--smb-spider-contents-slider--canvas-offset-left":!!x?.left&&r&&`${x?.left}px`||void 0,"--smb-spider-slider--gap":!c&&!r&&(!!x?.right||!!x?.left)&&(x?.right+x?.left)/2+"px"||void 0,"--smb-spider-contents-slider--slide-border-width":!!g.color&&0<parseInt(B)&&B||void 0,"--smb-spider-contents-slider--slide-border-color":g.color||void 0,"--smb-spider-contents-slider--slide-border-type":g.style||void 0,"--smb-spider-contents-slider--slide-border-radius":0<parseInt(P)&&P||void 0,"--smb-spider-contents-slider--slide-box-shadow":_.color?`0 0 ${_.blur}px ${p()(_.color,_.opacity)}`:void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:C,style:V}),"data-fade":r?"true":"false","data-shuffle":l?"true":"false","data-interval":0<h?1e3*h:void 0,"data-duration":0<b?1e3*b:void 0,"data-lg-slide-to-show":!r&&1<v?v:void 0,"data-md-slide-to-show":!r&&1<f?f:void 0,"data-sm-slide-to-show":!r&&1<w?w:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[N&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference"})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas"})}),o&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),(0<h&&m||t)&&(0,i.jsxs)("div",{className:"spider__dots",children:[m&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{className:"spider__stop",title:(0,a.__)("Pause autoplay","snow-monkey-blocks"),children:"⏸"}),(0,i.jsx)("button",{className:"spider__start",title:(0,a.__)("Start autoplay","snow-monkey-blocks"),children:"▶"})]}),t&&j.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))]})]})}},{attributes:{...j},supports:{...S},save({attributes:e,className:s}){const{arrows:o,dots:t,fade:a,shifted:r,gutter:l,interval:d,duration:c,lgSlidesToShow:h,mdSlidesToShow:m,smSlidesToShow:b,canvasPadding:v,border:f,boxShadow:w,sliderClientIds:x}=e,g=JSON.parse(x),_="wide"===e.align,y="full"===e.align,j=r&&!a&&(_||y),S=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":j,[`smb-spider-slider--gutter-${l}`]:!!l}),k=String(f.width).match(/^\d+$/)?`${f.width}px`:f.width,N=String(f.radius).match(/^\d+$/)?`${f.radius}px`:f.radius,C={"--smb-spider-contents-slider--canvas-offset-top":!!v?.top&&`${v?.top}px`||void 0,"--smb-spider-contents-slider--canvas-offset-right":!!v?.right&&a&&`${v?.right}px`||void 0,"--smb-spider-contents-slider--canvas-offset-bottom":!!v?.bottom&&`${v?.bottom}px`||void 0,"--smb-spider-contents-slider--canvas-offset-left":!!v?.left&&a&&`${v?.left}px`||void 0,"--smb-spider-slider--gap":!l&&!a&&(!!v?.right||!!v?.left)&&(v?.right+v?.left)/2+"px"||void 0,"--smb-spider-contents-slider--slide-border-width":!!f.color&&0<parseInt(k)&&k||void 0,"--smb-spider-contents-slider--slide-border-color":f.color||void 0,"--smb-spider-contents-slider--slide-border-type":f.style||void 0,"--smb-spider-contents-slider--slide-border-radius":0<parseInt(N)&&N||void 0,"--smb-spider-contents-slider--slide-box-shadow":w.color?`0 0 ${w.blur}px ${p()(w.color,w.opacity)}`:void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:S,style:C}),"data-fade":a?"true":"false","data-interval":0<d?1e3*d:void 0,"data-duration":0<c?1e3*c:void 0,"data-lg-slide-to-show":!a&&1<h?h:void 0,"data-md-slide-to-show":!a&&1<m?m:void 0,"data-sm-slide-to-show":!a&&1<b?b:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[j&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference"})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas"})}),o&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),t&&(0,i.jsx)("div",{className:"spider__dots",children:g.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))})]})}},{attributes:{...j},supports:{...S},save({attributes:e,className:s}){const{arrows:o,dots:t,fade:a,shifted:r,gutter:l,interval:d,duration:c,lgSlidesToShow:h,mdSlidesToShow:m,smSlidesToShow:b,canvasPadding:v,border:f,boxShadow:w,sliderClientIds:x}=e,g=JSON.parse(x),_="wide"===e.align,y="full"===e.align,j=r&&!a&&(_||y),S=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":j,[`smb-spider-slider--gutter-${l}`]:!!l}),k=String(f.width).match(/^\d+$/)?`${f.width}px`:f.width,N=String(f.radius).match(/^\d+$/)?`${f.radius}px`:f.radius,C={"--smb-spider-contents-slider--canvas-offset-top":!!v?.top&&`${v?.top}px`||void 0,"--smb-spider-contents-slider--canvas-offset-right":!!v?.right&&a&&`${v?.right}px`||void 0,"--smb-spider-contents-slider--canvas-offset-bottom":!!v?.bottom&&`${v?.bottom}px`||void 0,"--smb-spider-contents-slider--canvas-offset-left":!!v?.left&&a&&`${v?.left}px`||void 0,"--smb-spider-slider--gap":!l&&!a&&(!!v?.right||!!v?.left)&&(v?.right+v?.left)/2+"px"||void 0,"--smb-spider-contents-slider--slide-border-width":!!f.color&&0<parseInt(k)&&k||void 0,"--smb-spider-contents-slider--slide-border-color":f.color||void 0,"--smb-spider-contents-slider--slide-border-radius":0<parseInt(N)&&N||void 0,"--smb-spider-contents-slider--slide-box-shadow":w.color?`0 0 ${w.blur}px ${p()(w.color,w.opacity)}`:void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:S,style:C}),"data-fade":a?"true":"false","data-interval":0<d?1e3*d:void 0,"data-duration":0<c?1e3*c:void 0,"data-lg-slide-to-show":!a&&1<h?h:void 0,"data-md-slide-to-show":!a&&1<m?m:void 0,"data-sm-slide-to-show":!a&&1<b?b:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[j&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference"})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas"})}),o&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),t&&(0,i.jsx)("div",{className:"spider__dots",children:g.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))})]})}},{attributes:{...j},supports:{...S},save({attributes:e,className:s}){const{arrows:o,dots:t,fade:a,shifted:r,gutter:l,interval:d,duration:c,lgSlidesToShow:p,mdSlidesToShow:h,smSlidesToShow:m,canvasPadding:b,sliderClientIds:v}=e,f=JSON.parse(v),w="wide"===e.align,x="full"===e.align,g=r&&!a&&(w||x),_=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":g,[`smb-spider-slider--gutter-${l}`]:!!l}),y={"--smb-spider-contents-slider--canvas-offset-top":`${b?.top}px`||void 0,"--smb-spider-contents-slider--canvas-offset-right":a&&`${b?.right}px`||void 0,"--smb-spider-contents-slider--canvas-offset-bottom":`${b?.bottom}px`||void 0,"--smb-spider-contents-slider--canvas-offset-left":a&&`${b?.left}px`||void 0,"--smb-spider-slider--gap":!l&&!a&&(b?.right+b?.left)/2+"px"||void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:_,style:y}),"data-fade":a?"true":"false","data-interval":0<d?1e3*d:void 0,"data-duration":0<c?1e3*c:void 0,"data-lg-slide-to-show":!a&&1<p?p:void 0,"data-md-slide-to-show":!a&&1<h?h:void 0,"data-sm-slide-to-show":!a&&1<m?m:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[g&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference"})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas"})}),o&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),t&&(0,i.jsx)("div",{className:"spider__dots",children:f.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))})]})}},{attributes:{...j},supports:{...S},save({attributes:e,className:s}){const{arrows:o,dots:t,fade:a,shifted:r,gutter:l,interval:d,duration:c,lgSlidesToShow:p,mdSlidesToShow:h,smSlidesToShow:m,canvasPadding:b,sliderClientIds:v}=e,f=JSON.parse(v),w="wide"===e.align,x="full"===e.align,g=r&&!a&&(w||x),_=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":g,[`smb-spider-slider--gutter-${l}`]:!!l}),y={paddingTop:b?.top||void 0,paddingBottom:b?.bottom||void 0,paddingRight:b?.right||void 0,paddingLeft:b?.left||void 0},j={marginRight:b?.right||void 0,marginLeft:b?.left||void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:_}),"data-fade":a?"true":"false","data-interval":0<d?1e3*d:void 0,"data-duration":0<c?1e3*c:void 0,"data-lg-slide-to-show":!a&&1<p?p:void 0,"data-md-slide-to-show":!a&&1<h?h:void 0,"data-sm-slide-to-show":!a&&1<m?m:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[g&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference",style:j})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas",style:y})}),o&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),t&&(0,i.jsx)("div",{className:"spider__dots",children:f.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))})]})}},{attributes:{...j},supports:{...S},save({attributes:e,className:s}){const{arrows:o,dots:t,fade:a,shifted:r,gutter:l,interval:d,duration:c,lgSlidesToShow:p,mdSlidesToShow:h,smSlidesToShow:m,canvasPadding:b,sliderClientIds:v}=e,f=JSON.parse(v),w="wide"===e.align,x="full"===e.align,g=r&&!a&&(w||x),_=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":g,[`smb-spider-slider--gutter-${l}`]:!!l}),y={paddingTop:b?.top||void 0,paddingBottom:b?.bottom||void 0,paddingRight:b?.right||void 0,paddingLeft:b?.left||void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:_}),"data-fade":a?"true":"false","data-interval":0<d?1e3*d:void 0,"data-duration":0<c?1e3*c:void 0,"data-lg-slide-to-show":!a&&1<p?p:void 0,"data-md-slide-to-show":!a&&1<h?h:void 0,"data-sm-slide-to-show":!a&&1<m?m:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[g&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference"})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas",style:y})}),o&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),t&&(0,i.jsx)("div",{className:"spider__dots",children:f.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))})]})}},{attributes:{...j},supports:{...S},save({attributes:e,className:s}){const{arrows:o,dots:t,fade:a,shifted:r,gutter:l,interval:d,duration:c,lgSlidesToShow:p,mdSlidesToShow:h,smSlidesToShow:m,canvasPadding:b,sliderClientIds:v}=e,f=JSON.parse(v),w="wide"===e.align,x="full"===e.align,g=r&&!a&&(w||x),_=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":g,[`smb-spider-slider--gutter-${l}`]:!!l}),y={paddingTop:b?.top||void 0,paddingBottom:b?.bottom||void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:_}),"data-fade":a?"true":"false","data-interval":0<d?1e3*d:void 0,"data-duration":0<c?1e3*c:void 0,"data-lg-slide-to-show":!a&&1<p?p:void 0,"data-md-slide-to-show":!a&&1<h?h:void 0,"data-sm-slide-to-show":!a&&1<m?m:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[g&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference"})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas",style:y})}),o&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),t&&(0,i.jsx)("div",{className:"spider__dots",children:f.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))})]})}}];(0,t.registerBlockType)(r.UU,{icon:{foreground:"#cd162c",src:l},keywords:[(0,a.__)("Carousel","snow-monkey-blocks")],edit:function({attributes:e,setAttributes:s,className:o,isSelected:t,clientId:l}){const{arrows:d,dots:c,fade:f,shuffle:j,shifted:S,gutter:k,interval:N,autoplayButton:C,duration:B,lgSlidesToShow:P,mdSlidesToShow:V,smSlidesToShow:I,canvasPadding:T,border:$,boxShadow:O,sliderClientIds:D,templateLock:H}=e,K=JSON.parse(D),M="wide"===e.align,R="full"===e.align,A=!f,z=S&&A&&(M||R),L=(0,b.useRef)(),F=(0,b.useRef)(),J=(0,b.useRef)(),[E,G]=(0,b.useState)(void 0),{updateBlockAttributes:U,selectBlock:Z}=(0,m.useDispatch)("core/block-editor"),{getBlockAttributes:W,nowSliderClientIds:q,slides:Y,hasChildSelected:X}=(0,m.useSelect)((e=>{const s=e("core/block-editor").hasSelectedInnerBlock(l,!0);return{getBlockAttributes:e("core/block-editor").getBlockAttributes,nowSliderClientIds:e("core/block-editor").getBlockOrder(l),slides:e("core/block-editor").getBlock(l).innerBlocks,hasChildSelected:s}}),[l]);(0,b.useEffect)((()=>{let e;0<Y.length&&(e=Y.reduce(((e,s)=>(!!e?.attributes?.boxShadow?.color&&0<e?.attributes?.boxShadow?.blur||0)<(!!s?.attributes?.boxShadow?.color&&0<s?.attributes?.boxShadow?.blur||0)?s:e)));const o=O?.color&&0<O?.blur?O?.blur:0,t=e?.attributes?.boxShadow?.color&&0<e?.attributes?.boxShadow?.blur?e?.attributes?.boxShadow?.blur:0,a=o>t?o:t;a===T?.top&&a===T?.bottom&&a===T?.right&&a===T?.left||s({canvasPadding:{...T,top:a,bottom:a,right:a,left:a}})}),[Y.join(),O.blur]);const Q=(0,m.useSelect)((e=>{const s=Y.filter((s=>s.clientId===e("core/block-editor").getSelectedBlockClientId()));if(0<s.length)return G(s[0]),s[0]}),[Y.join()]);(0,b.useEffect)((()=>{0<q.length&&!E&&G(q[0]),K.length!==q.length&&s({sliderClientIds:JSON.stringify(q)}),q.forEach(((e,s)=>{const o=W(e);s!==parseInt(o?.sliderId)&&U(e,{sliderId:s})}))}),[q.join(),E]);const ee=!!L.current&&L.current.offsetWidth;(0,b.useEffect)((()=>{const e=!!L.current&&!!J.current&&z&&Math.floor(L.current.offsetWidth);e&&(L.current.style.setProperty("--spider--canvas-width",`${e}px`),J.current.style.width=`${e}px`);const s=!!F.current&&z&&Math.floor(F.current.offsetWidth);s&&L.current.style.setProperty("--spider--reference-width",`${s}px`)}),[ee,z]);const se=n()("smb-spider-slider","smb-spider-contents-slider",o,{"smb-spider-slider--shifted":z,[`smb-spider-slider--gutter-${k}`]:!!k}),oe=String($.width).match(/^\d+$/)?`${$.width}px`:$.width,te=String($.radius).match(/^\d+$/)?`${$.radius}px`:$.radius,ae={"--smb-spider-contents-slider--canvas-offset-top":!!T?.top&&`${T?.top}px`||void 0,"--smb-spider-contents-slider--canvas-offset-right":!!T?.right&&f&&`${T?.right}px`||void 0,"--smb-spider-contents-slider--canvas-offset-bottom":!!T?.bottom&&`${T?.bottom}px`||void 0,"--smb-spider-contents-slider--canvas-offset-left":!!T?.left&&f&&`${T?.left}px`||void 0,"--smb-spider-slider--gap":!k&&!f&&(!!T?.right||!!T?.left)&&(T?.right+T?.left)/2+"px"||void 0,"--smb-spider-contents-slider--slide-border-width":!!$.color&&0<parseInt(oe)&&oe||void 0,"--smb-spider-contents-slider--slide-border-color":$.color||void 0,"--smb-spider-contents-slider--slide-border-type":$.style||void 0,"--smb-spider-contents-slider--slide-border-radius":0<parseInt(te)&&te||void 0,"--smb-spider-contents-slider--slide-box-shadow":O.color?`0 0 ${O.blur}px ${p()(O.color,O.opacity)}`:void 0},re=[{value:"",label:(0,a.__)("None","snow-monkey-blocks")},{value:"s",label:(0,a.__)("S","snow-monkey-blocks")},{value:"m",label:(0,a.__)("M","snow-monkey-blocks")},{value:"l",label:(0,a.__)("L","snow-monkey-blocks")}],ie=(0,u.useInnerBlocksProps)({className:"spider__canvas"},{templateLock:H,allowedBlocks:y,orientation:"horizontal",renderAppender:!1});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.InspectorControls,{group:"dimensions",children:(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>k!==r.uK.gutter.default,isShownByDefault:!0,label:(0,a.__)("Gap","snow-monkey-blocks"),onDeselect:()=>s({gutter:r.uK.gutter.default}),panelId:l,children:(0,i.jsx)(h.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Gap","snow-monkey-blocks"),value:k,onChange:e=>s({gutter:e}),options:re})})}),(0,i.jsxs)(u.InspectorControls,{group:"border",children:[(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>$.color!==r.uK.border.default.color||$.style!==r.uK.border.default.style||$.width!==r.uK.border.default.width,isShownByDefault:!0,label:(0,a.__)("Border","snow-monkey-blocks"),onDeselect:()=>{s({border:{...$,color:r.uK.border.default.color,style:r.uK.border.default.style,width:r.uK.border.default.width}})},panelId:l,children:(0,i.jsx)(h.__experimentalBorderBoxControl,{...(0,u.__experimentalUseMultipleOriginColorsAndGradients)(),className:"smb-border-box-control",enableAlpha:!0,enableStyle:!0,onChange:e=>{s({border:{...$,color:e?.color,style:e?.style,width:e?.width}})},popoverOffset:40,popoverPlacement:"left-start",value:{color:$.color,style:$.style,width:$.width},__experimentalIsRenderedInSidebar:!0})}),(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>$.radius!==r.uK.border.default.radius,isShownByDefault:!0,label:(0,a.__)("Border radius","snow-monkey-blocks"),onDeselect:()=>{s({border:{...$,radius:r.uK.border.default.radius}})},panelId:l,children:(0,i.jsx)("div",{className:"smb-border-radius-control",children:(0,i.jsx)(u.__experimentalBorderRadiusControl,{values:$.radius,onChange:e=>{s({border:{...$,radius:e}})}})})})]}),(0,i.jsx)(u.InspectorControls,{group:"styles",children:(0,i.jsx)(x,{settings:[{colorValue:O.color||"",onColorChange:e=>{s({boxShadow:{...O,color:e}})}},{opacityValue:O.opacity,onOpacityChange:e=>{s({boxShadow:{...O,opacity:e}})}},{blurValue:O.blur,onBlurChange:e=>{s({boxShadow:{...O,blur:e}})},max:10}],defaultValues:{...r.uK.boxShadow.default}})}),(0,i.jsx)(u.InspectorControls,{children:(0,i.jsxs)(h.__experimentalToolsPanel,{label:(0,a.__)("Block settings","snow-monkey-blocks"),children:[(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>d!==r.uK.arrows.default,isShownByDefault:!0,label:(0,a.__)("Display arrows","snow-monkey-blocks"),onDeselect:()=>s({arrows:r.uK.arrows.default}),children:(0,i.jsx)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Display arrows","snow-monkey-blocks"),checked:d,onChange:e=>s({arrows:e})})}),(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>c!==r.uK.dots.default,isShownByDefault:!0,label:(0,a.__)("Display dots","snow-monkey-blocks"),onDeselect:()=>s({dots:r.uK.dots.default}),children:(0,i.jsx)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Display dots","snow-monkey-blocks"),checked:c,onChange:e=>s({dots:e})})}),(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>f!==r.uK.fade.default,isShownByDefault:!0,label:(0,a.__)("Fade","snow-monkey-blocks"),onDeselect:()=>s({fade:r.uK.fade.default}),children:(0,i.jsx)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Fade","snow-monkey-blocks"),checked:f,onChange:e=>s({fade:e})})}),(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>j!==r.uK.shuffle.default,isShownByDefault:!0,label:(0,a.__)("Shuffle slides","snow-monkey-blocks"),onDeselect:()=>s({shuffle:r.uK.shuffle.default}),children:(0,i.jsx)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Shuffle slides","snow-monkey-blocks"),checked:j,onChange:e=>s({shuffle:e})})}),A&&(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>S!==r.uK.shifted.default,isShownByDefault:!0,label:(0,a.__)("Shifting the slider","snow-monkey-blocks"),onDeselect:()=>s({shifted:r.uK.shifted.default}),children:(0,i.jsx)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Shifting the slider","snow-monkey-blocks"),help:S&&(!R||!M)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(v,{icon:w,style:{fill:"#d94f4f"}}),(0,a.__)("It must be full width (.alignfull) or wide width (.alignwide).","snow-monkey-blocks")]}),checked:S,onChange:e=>s({shifted:e})})}),(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>N!==r.uK.interval.default,isShownByDefault:!0,label:(0,a.__)("Autoplay Speed in seconds","snow-monkey-blocks"),onDeselect:()=>s({interval:r.uK.interval.default}),children:(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Autoplay Speed in seconds","snow-monkey-blocks"),help:(0,a.__)('If "0", no scroll.',"snow-monkey-blocks"),value:N,onChange:e=>s({interval:_(e,0,10)}),min:"0",max:"10"})}),0<N&&(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>C!==r.uK.autoplayButton.default,isShownByDefault:!0,label:(0,a.__)("Display pause button for autoplay","snow-monkey-blocks"),onDeselect:()=>s({autoplayButton:r.uK.autoplayButton.default}),children:(0,i.jsx)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Display pause button for autoplay","snow-monkey-blocks"),checked:C,onChange:e=>s({autoplayButton:e})})}),(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>B!==r.uK.duration.default,isShownByDefault:!0,label:(0,a.__)("Animation speed in seconds","snow-monkey-blocks"),onDeselect:()=>s({duration:r.uK.duration.default}),children:(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Animation speed in seconds","snow-monkey-blocks"),help:(0,a.__)('If "0", default animation speed.',"snow-monkey-blocks"),value:B,onChange:e=>s({duration:_(e,0,10)}),min:"0",max:"5",step:"0.1"})}),!f&&(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>P!==r.uK.lgSlidesToShow.default||V!==r.uK.mdSlidesToShow.default||I!==r.uK.smSlidesToShow.default,isShownByDefault:!0,label:(0,a.__)("Slides settings","snow-monkey-blocks"),onDeselect:()=>s({lgSlidesToShow:r.uK.lgSlidesToShow.default,mdSlidesToShow:r.uK.mdSlidesToShow.default,smSlidesToShow:r.uK.smSlidesToShow.default}),children:(0,i.jsx)(g,{desktop:()=>(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("# of slides to show (Large window)","snow-monkey-blocks"),value:P,onChange:e=>s({lgSlidesToShow:_(e,1,6)}),min:"1",max:6<q.length?6:q.length}),tablet:()=>(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("# of slides to show (Medium window)","snow-monkey-blocks"),value:V,onChange:e=>s({mdSlidesToShow:_(e,1,6)}),min:"1",max:6<q.length?6:q.length}),mobile:()=>(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("# of slides to show (Small window)","snow-monkey-blocks"),value:I,onChange:e=>s({smSlidesToShow:_(e,1,6)}),min:"1",max:6<q.length?6:q.length})})})]})}),(0,i.jsxs)("div",{...(0,u.useBlockProps)({className:se,style:ae,ref:L}),"data-fade":f?"true":"false","data-shuffle":j?"true":"false","data-interval":0<N?1e3*N:void 0,"data-lg-slide-to-show":!f&&1<P?P:void 0,"data-md-slide-to-show":!f&&1<V?V:void 0,"data-sm-slide-to-show":!f&&1<I?I:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[z&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference",ref:F})}),(0,i.jsx)("div",{...ie,ref:J}),d&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),(0<N&&C||c)&&(0,i.jsxs)("div",{className:"spider__dots",children:[C&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{className:"spider__stop",children:(0,i.jsxs)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,a.__)("Pause autoplay","snow-monkey-blocks"),children:[(0,i.jsx)("rect",{width:"5",height:"16",fill:"currentColor"}),(0,i.jsx)("rect",{x:"7",width:"5",height:"16",fill:"currentColor"})]})}),(0,i.jsx)("button",{className:"spider__start",children:(0,i.jsx)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,a.__)("Start autoplay","snow-monkey-blocks"),children:(0,i.jsx)("path",{d:"M12 8L-2.29967e-06 16L-2.29967e-06 0L12 8Z",fill:"currentColor"})})})]}),c&&q.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))]}),(t||X)&&(0,i.jsxs)("div",{className:"smb-slider-pagination",children:[q.map(((e,s)=>(0,i.jsx)(h.Button,{variant:E===e||Q?.clientId===e?"primary":"secondary",onClick:()=>{G(e),Z(e)},children:(0,i.jsx)("span",{children:s+1})},s))),(0,i.jsx)(u.InnerBlocks.ButtonBlockAppender,{})]})]})]})},save:function({attributes:e,className:s}){const{arrows:o,dots:t,fade:r,shuffle:l,shifted:d,gutter:c,interval:h,autoplayButton:m,duration:b,lgSlidesToShow:v,mdSlidesToShow:f,smSlidesToShow:w,canvasPadding:x,border:g,boxShadow:_,sliderClientIds:y}=e,j=JSON.parse(y),S="wide"===e.align,k="full"===e.align,N=d&&!r&&(S||k),C=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":N,[`smb-spider-slider--gutter-${c}`]:!!c}),B=String(g.width).match(/^\d+$/)?`${g.width}px`:g.width,P=String(g.radius).match(/^\d+$/)?`${g.radius}px`:g.radius,V={"--smb-spider-contents-slider--canvas-offset-top":!!x?.top&&`${x?.top}px`||void 0,"--smb-spider-contents-slider--canvas-offset-right":!!x?.right&&r&&`${x?.right}px`||void 0,"--smb-spider-contents-slider--canvas-offset-bottom":!!x?.bottom&&`${x?.bottom}px`||void 0,"--smb-spider-contents-slider--canvas-offset-left":!!x?.left&&r&&`${x?.left}px`||void 0,"--smb-spider-slider--gap":!c&&!r&&(!!x?.right||!!x?.left)&&(x?.right+x?.left)/2+"px"||void 0,"--smb-spider-contents-slider--slide-border-width":!!g.color&&0<parseInt(B)&&B||void 0,"--smb-spider-contents-slider--slide-border-color":g.color||void 0,"--smb-spider-contents-slider--slide-border-type":g.style||void 0,"--smb-spider-contents-slider--slide-border-radius":0<parseInt(P)&&P||void 0,"--smb-spider-contents-slider--slide-box-shadow":_.color?`0 0 ${_.blur}px ${p()(_.color,_.opacity)}`:void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:C,style:V}),"data-fade":r?"true":"false","data-shuffle":l?"true":"false","data-interval":0<h?1e3*h:void 0,"data-duration":0<b?1e3*b:void 0,"data-lg-slide-to-show":!r&&1<v?v:void 0,"data-md-slide-to-show":!r&&1<f?f:void 0,"data-sm-slide-to-show":!r&&1<w?w:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[N&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference"})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas"})}),o&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),(0<h&&m||t)&&(0,i.jsxs)("div",{className:"spider__dots",children:[m&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{className:"spider__stop",children:(0,i.jsxs)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,a.__)("Pause autoplay","snow-monkey-blocks"),children:[(0,i.jsx)("rect",{width:"5",height:"16",fill:"currentColor"}),(0,i.jsx)("rect",{x:"7",width:"5",height:"16",fill:"currentColor"})]})}),(0,i.jsx)("button",{className:"spider__start",children:(0,i.jsx)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,a.__)("Start autoplay","snow-monkey-blocks"),children:(0,i.jsx)("path",{d:"M12 8L-2.29967e-06 16L-2.29967e-06 0L12 8Z",fill:"currentColor"})})})]}),t&&j.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))]})]})},deprecated:k,example:{attributes:{arrows:!0,dots:!0},innerBlocks:[{name:"snow-monkey-blocks/spider-contents-slider-item",attributes:{contentPadding:"s"},innerBlocks:[{name:"core/paragraph",attributes:{content:"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."}}]},{name:"snow-monkey-blocks/spider-contents-slider-item",attributes:{contentPadding:"s"},innerBlocks:[{name:"core/paragraph",attributes:{content:"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."}}]}]}})},3558:e=>{"use strict";var s=function(e){return parseInt(e,16)};e.exports=function(e,o){var t,a,r=function(e){return"#"===e.charAt(0)?e.slice(1):e}(e),i=function(e){var o=e.g,t=e.b,a=e.a;return{r:s(e.r),g:s(o),b:s(t),a:+(s(a)/255).toFixed(2)}}({r:(a=3===(t=r).length||4===t.length)?"".concat(t.slice(0,1)).concat(t.slice(0,1)):t.slice(0,2),g:a?"".concat(t.slice(1,2)).concat(t.slice(1,2)):t.slice(2,4),b:a?"".concat(t.slice(2,3)).concat(t.slice(2,3)):t.slice(4,6),a:(a?"".concat(t.slice(3,4)).concat(t.slice(3,4)):t.slice(6,8))||"ff"});return function(e,s){var o,t=e.r,a=e.g,r=e.b,i=e.a,l=(o=s,!isNaN(parseFloat(o))&&isFinite(o)?s:i);return"rgba(".concat(t,", ").concat(a,", ").concat(r,", ").concat(l,")")}(i,o)}},6942:(e,s)=>{var o;!function(){"use strict";var t={}.hasOwnProperty;function a(){for(var e="",s=0;s<arguments.length;s++){var o=arguments[s];o&&(e=i(e,r(o)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var s="";for(var o in e)t.call(e,o)&&e[o]&&(s=i(s,o));return s}function i(e,s){return s?e?e+" "+s:e+s:e}e.exports?(a.default=a,e.exports=a):void 0===(o=function(){return a}.apply(s,[]))||(e.exports=o)}()}},o={};function t(e){var a=o[e];if(void 0!==a)return a.exports;var r=o[e]={exports:{}};return s[e](r,r.exports,t),r.exports}t.m=s,e=[],t.O=(s,o,a,r)=>{if(!o){var i=1/0;for(c=0;c<e.length;c++){o=e[c][0],a=e[c][1],r=e[c][2];for(var l=!0,d=0;d<o.length;d++)(!1&r||i>=r)&&Object.keys(t.O).every((e=>t.O[e](o[d])))?o.splice(d--,1):(l=!1,r<i&&(i=r));if(l){e.splice(c--,1);var n=a();void 0!==n&&(s=n)}}return s}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[o,a,r]},t.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},t.d=(e,s)=>{for(var o in s)t.o(s,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},t.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),(()=>{var e={9021:0,465:0};t.O.j=s=>0===e[s];var s=(s,o)=>{var a,r,i=o[0],l=o[1],d=o[2],n=0;if(i.some((s=>0!==e[s]))){for(a in l)t.o(l,a)&&(t.m[a]=l[a]);if(d)var c=d(t)}for(s&&s(o);n<i.length;n++)r=i[n],t.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return t.O(c)},o=self.webpackChunk=self.webpackChunk||[];o.forEach(s.bind(null,0)),o.push=s.bind(null,o.push.bind(o))})();var a=t.O(void 0,[465],(()=>t(8674)));a=t.O(a)})();1 (()=>{var e,s={8674:(e,s,t)=>{"use strict";const o=window.wp.blocks,a=window.wp.i18n,r=JSON.parse('{"UU":"snow-monkey-blocks/spider-contents-slider","uK":{"sizeSlug":{"type":"string","default":"full"},"dots":{"type":"boolean","default":false},"arrows":{"type":"boolean","default":false},"fade":{"type":"boolean","default":false},"shuffle":{"type":"boolean","default":false},"shifted":{"type":"boolean","default":false},"gutter":{"type":"string"},"interval":{"type":"number","default":0},"autoplayButton":{"type":"boolean","default":false},"duration":{"type":"number","default":0},"lgSlidesToShow":{"type":"number","default":1},"mdSlidesToShow":{"type":"number","default":1},"smSlidesToShow":{"type":"number","default":1},"canvasPadding":{"type":"object","default":{}},"sliderClientIds":{"type":"array","default":[]},"border":{"type":"object","default":{"color":"","style":"","width":1,"radius":0}},"boxShadow":{"type":"object","default":{"color":"","opacity":0.1,"blur":10,"position":""}},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"align":["wide","full"],"spacing":{"margin":true}}}'),i=window.ReactJSXRuntime,l=(0,i.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,i.jsx)("path",{d:"M5,5.78V18.22a.78.78,0,0,0,.78.78H18.22a.78.78,0,0,0,.78-.78V5.78A.78.78,0,0,0,18.22,5H5.78A.78.78,0,0,0,5,5.78m12.44,12H6.56a.38.38,0,0,1-.39-.39V6.56a.38.38,0,0,1,.39-.39H17.44a.38.38,0,0,1,.39.39V17.44a.38.38,0,0,1-.39.39"}),(0,i.jsx)("path",{d:"M6.17,14.16l3.06-2.23a.22.22,0,0,1,.22,0l2.34,1.5a.21.21,0,0,0,.24,0l3-2.83a.19.19,0,0,1,.27,0l3.09,3v1.16l-3.09-3a.18.18,0,0,0-.27,0l-3,2.82a.19.19,0,0,1-.24,0L9.45,13.11a.18.18,0,0,0-.22,0L6.17,15.33Z"}),(0,i.jsx)("path",{d:"M2.22,5H0V6.17H1.44a.38.38,0,0,1,.39.39V17.44a.38.38,0,0,1-.39.39H0V19H2.22A.78.78,0,0,0,3,18.22V5.78A.78.78,0,0,0,2.22,5Z"}),(0,i.jsx)("path",{d:"M24,17.83H22.56a.38.38,0,0,1-.39-.39V6.56a.38.38,0,0,1,.39-.39H24V5H21.78a.78.78,0,0,0-.78.78V18.22a.78.78,0,0,0,.78.78H24Z"})]});var d=t(6942),n=t.n(d),c=t(3558),p=t.n(c);const u=window.wp.blockEditor,h=window.wp.components,m=window.wp.data,b=window.wp.element,v=(0,b.forwardRef)((function({icon:e,size:s=24,...t},o){return(0,b.cloneElement)(e,{width:s,height:s,...t,ref:o})})),f=window.wp.primitives,w=(0,i.jsx)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,i.jsx)(f.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"})});function x({settings:e,label:s}){const t={},o={},r=e.map(((e,s)=>{if(e.hasOwnProperty("colorValue")&&e.hasOwnProperty("onColorChange")){t.color=e.colorValue,o.color=e.onColorChange;const r=(0,u.__experimentalUseMultipleOriginColorsAndGradients)();return r.colors=r.colors.map((e=>{const s=e.colors.filter((e=>!e.color.match(/^var\(/)));return!(1>s.length)&&(e.colors=s,e)})).filter(Boolean),(0,i.jsx)("div",{className:"smb-color-gradient-settings-dropdown",children:(0,i.jsx)(u.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,a.__)("Color","snow-monkey-blocks"),colorValue:e.colorValue,onColorChange:e.onColorChange}],__experimentalIsRenderedInSidebar:!0,...r})},s)}return e.hasOwnProperty("opacityValue")&&e.hasOwnProperty("onOpacityChange")?(t.opacity=e.opacityValue,o.opacity=e.onOpacityChange,(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Opacity","snow-monkey-blocks"),value:Number(e.opacityValue.toFixed(1)),onChange:e.onOpacityChange,min:0,max:1,step:.1},s)):e.hasOwnProperty("horizontalValue")&&e.hasOwnProperty("onHorizontalChange")?(t.horizontal=e.horizontalValue,o.horizontal=e.onHorizontalChange,(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Horizontal","snow-monkey-blocks"),value:e.horizontalValue,onChange:e.onHorizontalChange,min:null!==(r=e?.min)&&void 0!==r?r:-100,max:null!==(l=e?.max)&&void 0!==l?l:100},s)):e.hasOwnProperty("verticalValue")&&e.hasOwnProperty("onVerticalChange")?(t.vertical=e.verticalValue,o.vertical=e.onVerticalChange,(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Vertical","snow-monkey-blocks"),value:e.verticalValue,onChange:e.onVerticalChange,min:null!==(d=e?.min)&&void 0!==d?d:-100,max:null!==(n=e?.max)&&void 0!==n?n:100},s)):e.hasOwnProperty("blurValue")&&e.hasOwnProperty("onBlurChange")?(t.blur=e.blurValue,o.blur=e.onBlurChange,(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Blur","snow-monkey-blocks"),value:e.blurValue,onChange:e.onBlurChange,min:null!==(c=e?.min)&&void 0!==c?c:0,max:null!==(p=e?.max)&&void 0!==p?p:100},s)):e.hasOwnProperty("spreadValue")&&e.hasOwnProperty("onSpreadChange")?(t.spread=e.spreadValue,o.spread=e.onSpreadChange,(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Spread","snow-monkey-blocks"),value:e.spreadValue,onChange:e.onSpreadChange,min:null!==(m=e?.min)&&void 0!==m?m:-100,max:null!==(v=e?.max)&&void 0!==v?v:100},s)):e.hasOwnProperty("positionValue")&&e.hasOwnProperty("onPositionChange")?(t.position=e.positionValue,o.position=e.onPositionChange,(0,i.jsx)(h.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Position","snow-monkey-blocks"),value:e.positionValue,onChange:e.onPositionChange,options:[{value:"",label:(0,a.__)("Outline","snow-monkey-blocks")},{value:"inset",label:(0,a.__)("Inset","snow-monkey-blocks")}]},s)):(0,i.jsx)(b.Fragment,{},s);var r,l,d,n,c,p,m,v}));return(0,i.jsx)(h.__experimentalToolsPanel,{label:s||(0,a.__)("Box Shadow","snow-monkey-blocks"),className:"smb-box-shadow-tools-panel",children:(0,i.jsx)(h.__experimentalToolsPanelItem,{label:s||(0,a.__)("Box Shadow","snow-monkey-blocks"),hasValue:()=>e.some((e=>{if(e.hasOwnProperty("defaultValue")){let s;return e.hasOwnProperty("opacityValue")?s=e.opacityValue:e.hasOwnProperty("horizontalValue")?s=e.horizontalValue:e.hasOwnProperty("verticalValue")?s=e.verticalValue:e.hasOwnProperty("blurValue")?s=e.blurValue:e.hasOwnProperty("spreadValue")?s=e.spreadValue:e.hasOwnProperty("positionValue")&&(s=e.positionValue),void 0!==s&&e.defaultValue!==s}return!1})),isShownByDefault:!0,onDeselect:()=>{e.forEach((e=>{if(e.hasOwnProperty("defaultValue")){let s;e.hasOwnProperty("onOpacityChange")?s=e.onOpacityChange:e.hasOwnProperty("onHorizontalChange")?s=e.onHorizontalChange:e.hasOwnProperty("onVerticalChange")?s=e.onVerticalChange:e.hasOwnProperty("onBlurChange")?s=e.onBlurChange:e.hasOwnProperty("onSpreadChange")?s=e.onSpreadChange:e.hasOwnProperty("onPositionChange")&&(s=e.onPositionChange),void 0!==s&&s(e.defaultValue)}}))},children:r})})}function g(e){const{desktop:s,tablet:t,mobile:o}=e,a=[];return s&&a.push({name:"desktop",title:(0,i.jsx)(h.Dashicon,{icon:"desktop"})}),t&&a.push({name:"tablet",title:(0,i.jsx)(h.Dashicon,{icon:"tablet"})}),o&&a.push({name:"mobile",title:(0,i.jsx)(h.Dashicon,{icon:"smartphone"})}),(0,i.jsx)(h.TabPanel,{className:"smb-inspector-tabs",tabs:a,children:e=>{if(e.name){if("desktop"===e.name)return s();if("tablet"===e.name)return t();if("mobile"===e.name)return o()}}})}window.lodash;const _=(e,s=0,t=null)=>(e=Number(e),(isNaN(e)||e<s)&&(e=s),null!==t&&e>t&&(e=t),e),y=["snow-monkey-blocks/spider-contents-slider-item"],j=r.uK,S=r.xY,k=[{attributes:{...j,sliderClientIds:{type:"string",default:"[]"}},supports:{...S},save({attributes:e,className:s}){const{arrows:t,dots:o,fade:r,shuffle:l,shifted:d,gutter:c,interval:h,autoplayButton:m,duration:b,lgSlidesToShow:v,mdSlidesToShow:f,smSlidesToShow:w,canvasPadding:x,border:g,boxShadow:_,sliderClientIds:y}=e,j=JSON.parse(y),S="wide"===e.align,k="full"===e.align,N=d&&!r&&(S||k),C=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":N,[`smb-spider-slider--gutter-${c}`]:!!c}),B=String(g.width).match(/^\d+$/)?`${g.width}px`:g.width,P=String(g.radius).match(/^\d+$/)?`${g.radius}px`:g.radius,I={"--smb-spider-contents-slider--canvas-offset-top":!!x?.top&&`${x?.top}px`||void 0,"--smb-spider-contents-slider--canvas-offset-right":!!x?.right&&r&&`${x?.right}px`||void 0,"--smb-spider-contents-slider--canvas-offset-bottom":!!x?.bottom&&`${x?.bottom}px`||void 0,"--smb-spider-contents-slider--canvas-offset-left":!!x?.left&&r&&`${x?.left}px`||void 0,"--smb-spider-slider--gap":!c&&!r&&(!!x?.right||!!x?.left)&&(x?.right+x?.left)/2+"px"||void 0,"--smb-spider-contents-slider--slide-border-width":!!g.color&&0<parseInt(B)&&B||void 0,"--smb-spider-contents-slider--slide-border-color":g.color||void 0,"--smb-spider-contents-slider--slide-border-type":g.style||void 0,"--smb-spider-contents-slider--slide-border-radius":0<parseInt(P)&&P||void 0,"--smb-spider-contents-slider--slide-box-shadow":_.color?`0 0 ${_.blur}px ${p()(_.color,_.opacity)}`:void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:C,style:I}),"data-fade":r?"true":"false","data-shuffle":l?"true":"false","data-interval":0<h?1e3*h:void 0,"data-duration":0<b?1e3*b:void 0,"data-lg-slide-to-show":!r&&1<v?v:void 0,"data-md-slide-to-show":!r&&1<f?f:void 0,"data-sm-slide-to-show":!r&&1<w?w:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[N&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference"})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas"})}),t&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),(0<h&&m||o)&&(0,i.jsxs)("div",{className:"spider__dots",children:[m&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{className:"spider__stop",children:(0,i.jsxs)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,a.__)("Pause autoplay","snow-monkey-blocks"),children:[(0,i.jsx)("rect",{width:"5",height:"16",fill:"currentColor"}),(0,i.jsx)("rect",{x:"7",width:"5",height:"16",fill:"currentColor"})]})}),(0,i.jsx)("button",{className:"spider__start",children:(0,i.jsx)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,a.__)("Start autoplay","snow-monkey-blocks"),children:(0,i.jsx)("path",{d:"M12 8L-2.29967e-06 16L-2.29967e-06 0L12 8Z",fill:"currentColor"})})})]}),o&&j.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))]})]})}},{attributes:{...j,sliderClientIds:{type:"string",default:"[]"}},supports:{...S},save({attributes:e,className:s}){const{arrows:t,dots:o,fade:r,shuffle:l,shifted:d,gutter:c,interval:h,autoplayButton:m,duration:b,lgSlidesToShow:v,mdSlidesToShow:f,smSlidesToShow:w,canvasPadding:x,border:g,boxShadow:_,sliderClientIds:y}=e,j=JSON.parse(y),S="wide"===e.align,k="full"===e.align,N=d&&!r&&(S||k),C=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":N,[`smb-spider-slider--gutter-${c}`]:!!c}),B=String(g.width).match(/^\d+$/)?`${g.width}px`:g.width,P=String(g.radius).match(/^\d+$/)?`${g.radius}px`:g.radius,I={"--smb-spider-contents-slider--canvas-offset-top":!!x?.top&&`${x?.top}px`||void 0,"--smb-spider-contents-slider--canvas-offset-right":!!x?.right&&r&&`${x?.right}px`||void 0,"--smb-spider-contents-slider--canvas-offset-bottom":!!x?.bottom&&`${x?.bottom}px`||void 0,"--smb-spider-contents-slider--canvas-offset-left":!!x?.left&&r&&`${x?.left}px`||void 0,"--smb-spider-slider--gap":!c&&!r&&(!!x?.right||!!x?.left)&&(x?.right+x?.left)/2+"px"||void 0,"--smb-spider-contents-slider--slide-border-width":!!g.color&&0<parseInt(B)&&B||void 0,"--smb-spider-contents-slider--slide-border-color":g.color||void 0,"--smb-spider-contents-slider--slide-border-type":g.style||void 0,"--smb-spider-contents-slider--slide-border-radius":0<parseInt(P)&&P||void 0,"--smb-spider-contents-slider--slide-box-shadow":_.color?`0 0 ${_.blur}px ${p()(_.color,_.opacity)}`:void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:C,style:I}),"data-fade":r?"true":"false","data-shuffle":l?"true":"false","data-interval":0<h?1e3*h:void 0,"data-duration":0<b?1e3*b:void 0,"data-lg-slide-to-show":!r&&1<v?v:void 0,"data-md-slide-to-show":!r&&1<f?f:void 0,"data-sm-slide-to-show":!r&&1<w?w:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[N&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference"})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas"})}),t&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),(0<h&&m||o)&&(0,i.jsxs)("div",{className:"spider__dots",children:[m&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{className:"spider__stop",title:(0,a.__)("Pause autoplay","snow-monkey-blocks"),children:"⏸"}),(0,i.jsx)("button",{className:"spider__start",title:(0,a.__)("Start autoplay","snow-monkey-blocks"),children:"▶"})]}),o&&j.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))]})]})}},{attributes:{...j,sliderClientIds:{type:"string",default:"[]"}},supports:{...S},save({attributes:e,className:s}){const{arrows:t,dots:o,fade:a,shifted:r,gutter:l,interval:d,duration:c,lgSlidesToShow:h,mdSlidesToShow:m,smSlidesToShow:b,canvasPadding:v,border:f,boxShadow:w,sliderClientIds:x}=e,g=JSON.parse(x),_="wide"===e.align,y="full"===e.align,j=r&&!a&&(_||y),S=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":j,[`smb-spider-slider--gutter-${l}`]:!!l}),k=String(f.width).match(/^\d+$/)?`${f.width}px`:f.width,N=String(f.radius).match(/^\d+$/)?`${f.radius}px`:f.radius,C={"--smb-spider-contents-slider--canvas-offset-top":!!v?.top&&`${v?.top}px`||void 0,"--smb-spider-contents-slider--canvas-offset-right":!!v?.right&&a&&`${v?.right}px`||void 0,"--smb-spider-contents-slider--canvas-offset-bottom":!!v?.bottom&&`${v?.bottom}px`||void 0,"--smb-spider-contents-slider--canvas-offset-left":!!v?.left&&a&&`${v?.left}px`||void 0,"--smb-spider-slider--gap":!l&&!a&&(!!v?.right||!!v?.left)&&(v?.right+v?.left)/2+"px"||void 0,"--smb-spider-contents-slider--slide-border-width":!!f.color&&0<parseInt(k)&&k||void 0,"--smb-spider-contents-slider--slide-border-color":f.color||void 0,"--smb-spider-contents-slider--slide-border-type":f.style||void 0,"--smb-spider-contents-slider--slide-border-radius":0<parseInt(N)&&N||void 0,"--smb-spider-contents-slider--slide-box-shadow":w.color?`0 0 ${w.blur}px ${p()(w.color,w.opacity)}`:void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:S,style:C}),"data-fade":a?"true":"false","data-interval":0<d?1e3*d:void 0,"data-duration":0<c?1e3*c:void 0,"data-lg-slide-to-show":!a&&1<h?h:void 0,"data-md-slide-to-show":!a&&1<m?m:void 0,"data-sm-slide-to-show":!a&&1<b?b:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[j&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference"})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas"})}),t&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),o&&(0,i.jsx)("div",{className:"spider__dots",children:g.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))})]})}},{attributes:{...j,sliderClientIds:{type:"string",default:"[]"}},supports:{...S},save({attributes:e,className:s}){const{arrows:t,dots:o,fade:a,shifted:r,gutter:l,interval:d,duration:c,lgSlidesToShow:h,mdSlidesToShow:m,smSlidesToShow:b,canvasPadding:v,border:f,boxShadow:w,sliderClientIds:x}=e,g=JSON.parse(x),_="wide"===e.align,y="full"===e.align,j=r&&!a&&(_||y),S=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":j,[`smb-spider-slider--gutter-${l}`]:!!l}),k=String(f.width).match(/^\d+$/)?`${f.width}px`:f.width,N=String(f.radius).match(/^\d+$/)?`${f.radius}px`:f.radius,C={"--smb-spider-contents-slider--canvas-offset-top":!!v?.top&&`${v?.top}px`||void 0,"--smb-spider-contents-slider--canvas-offset-right":!!v?.right&&a&&`${v?.right}px`||void 0,"--smb-spider-contents-slider--canvas-offset-bottom":!!v?.bottom&&`${v?.bottom}px`||void 0,"--smb-spider-contents-slider--canvas-offset-left":!!v?.left&&a&&`${v?.left}px`||void 0,"--smb-spider-slider--gap":!l&&!a&&(!!v?.right||!!v?.left)&&(v?.right+v?.left)/2+"px"||void 0,"--smb-spider-contents-slider--slide-border-width":!!f.color&&0<parseInt(k)&&k||void 0,"--smb-spider-contents-slider--slide-border-color":f.color||void 0,"--smb-spider-contents-slider--slide-border-radius":0<parseInt(N)&&N||void 0,"--smb-spider-contents-slider--slide-box-shadow":w.color?`0 0 ${w.blur}px ${p()(w.color,w.opacity)}`:void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:S,style:C}),"data-fade":a?"true":"false","data-interval":0<d?1e3*d:void 0,"data-duration":0<c?1e3*c:void 0,"data-lg-slide-to-show":!a&&1<h?h:void 0,"data-md-slide-to-show":!a&&1<m?m:void 0,"data-sm-slide-to-show":!a&&1<b?b:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[j&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference"})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas"})}),t&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),o&&(0,i.jsx)("div",{className:"spider__dots",children:g.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))})]})}},{attributes:{...j,sliderClientIds:{type:"string",default:"[]"}},supports:{...S},save({attributes:e,className:s}){const{arrows:t,dots:o,fade:a,shifted:r,gutter:l,interval:d,duration:c,lgSlidesToShow:p,mdSlidesToShow:h,smSlidesToShow:m,canvasPadding:b,sliderClientIds:v}=e,f=JSON.parse(v),w="wide"===e.align,x="full"===e.align,g=r&&!a&&(w||x),_=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":g,[`smb-spider-slider--gutter-${l}`]:!!l}),y={"--smb-spider-contents-slider--canvas-offset-top":`${b?.top}px`||void 0,"--smb-spider-contents-slider--canvas-offset-right":a&&`${b?.right}px`||void 0,"--smb-spider-contents-slider--canvas-offset-bottom":`${b?.bottom}px`||void 0,"--smb-spider-contents-slider--canvas-offset-left":a&&`${b?.left}px`||void 0,"--smb-spider-slider--gap":!l&&!a&&(b?.right+b?.left)/2+"px"||void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:_,style:y}),"data-fade":a?"true":"false","data-interval":0<d?1e3*d:void 0,"data-duration":0<c?1e3*c:void 0,"data-lg-slide-to-show":!a&&1<p?p:void 0,"data-md-slide-to-show":!a&&1<h?h:void 0,"data-sm-slide-to-show":!a&&1<m?m:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[g&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference"})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas"})}),t&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),o&&(0,i.jsx)("div",{className:"spider__dots",children:f.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))})]})}},{attributes:{...j,sliderClientIds:{type:"string",default:"[]"}},supports:{...S},save({attributes:e,className:s}){const{arrows:t,dots:o,fade:a,shifted:r,gutter:l,interval:d,duration:c,lgSlidesToShow:p,mdSlidesToShow:h,smSlidesToShow:m,canvasPadding:b,sliderClientIds:v}=e,f=JSON.parse(v),w="wide"===e.align,x="full"===e.align,g=r&&!a&&(w||x),_=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":g,[`smb-spider-slider--gutter-${l}`]:!!l}),y={paddingTop:b?.top||void 0,paddingBottom:b?.bottom||void 0,paddingRight:b?.right||void 0,paddingLeft:b?.left||void 0},j={marginRight:b?.right||void 0,marginLeft:b?.left||void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:_}),"data-fade":a?"true":"false","data-interval":0<d?1e3*d:void 0,"data-duration":0<c?1e3*c:void 0,"data-lg-slide-to-show":!a&&1<p?p:void 0,"data-md-slide-to-show":!a&&1<h?h:void 0,"data-sm-slide-to-show":!a&&1<m?m:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[g&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference",style:j})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas",style:y})}),t&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),o&&(0,i.jsx)("div",{className:"spider__dots",children:f.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))})]})}},{attributes:{...j,sliderClientIds:{type:"string",default:"[]"}},supports:{...S},save({attributes:e,className:s}){const{arrows:t,dots:o,fade:a,shifted:r,gutter:l,interval:d,duration:c,lgSlidesToShow:p,mdSlidesToShow:h,smSlidesToShow:m,canvasPadding:b,sliderClientIds:v}=e,f=JSON.parse(v),w="wide"===e.align,x="full"===e.align,g=r&&!a&&(w||x),_=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":g,[`smb-spider-slider--gutter-${l}`]:!!l}),y={paddingTop:b?.top||void 0,paddingBottom:b?.bottom||void 0,paddingRight:b?.right||void 0,paddingLeft:b?.left||void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:_}),"data-fade":a?"true":"false","data-interval":0<d?1e3*d:void 0,"data-duration":0<c?1e3*c:void 0,"data-lg-slide-to-show":!a&&1<p?p:void 0,"data-md-slide-to-show":!a&&1<h?h:void 0,"data-sm-slide-to-show":!a&&1<m?m:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[g&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference"})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas",style:y})}),t&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),o&&(0,i.jsx)("div",{className:"spider__dots",children:f.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))})]})}},{attributes:{...j,sliderClientIds:{type:"string",default:"[]"}},supports:{...S},save({attributes:e,className:s}){const{arrows:t,dots:o,fade:a,shifted:r,gutter:l,interval:d,duration:c,lgSlidesToShow:p,mdSlidesToShow:h,smSlidesToShow:m,canvasPadding:b,sliderClientIds:v}=e,f=JSON.parse(v),w="wide"===e.align,x="full"===e.align,g=r&&!a&&(w||x),_=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":g,[`smb-spider-slider--gutter-${l}`]:!!l}),y={paddingTop:b?.top||void 0,paddingBottom:b?.bottom||void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:_}),"data-fade":a?"true":"false","data-interval":0<d?1e3*d:void 0,"data-duration":0<c?1e3*c:void 0,"data-lg-slide-to-show":!a&&1<p?p:void 0,"data-md-slide-to-show":!a&&1<h?h:void 0,"data-sm-slide-to-show":!a&&1<m?m:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[g&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference"})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas",style:y})}),t&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),o&&(0,i.jsx)("div",{className:"spider__dots",children:f.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))})]})}}];(0,o.registerBlockType)(r.UU,{icon:{foreground:"#cd162c",src:l},keywords:[(0,a.__)("Carousel","snow-monkey-blocks")],edit:function({attributes:e,setAttributes:s,className:t,isSelected:o,clientId:l}){const{arrows:d,dots:c,fade:f,shuffle:j,shifted:S,gutter:k,interval:N,autoplayButton:C,duration:B,lgSlidesToShow:P,mdSlidesToShow:I,smSlidesToShow:$,canvasPadding:V,border:T,boxShadow:O,sliderClientIds:D,templateLock:H}=e,K="wide"===e.align,M="full"===e.align,R=!f,A=S&&R&&(K||M),L=(0,b.useRef)(),z=(0,b.useRef)(),F=(0,b.useRef)(),[J,E]=(0,b.useState)(void 0),{updateBlockAttributes:G,selectBlock:U}=(0,m.useDispatch)("core/block-editor"),{getBlockAttributes:Z,nowSliderClientIds:W,slides:q,hasChildSelected:Y}=(0,m.useSelect)((e=>{const s=e("core/block-editor").hasSelectedInnerBlock(l,!0);return{getBlockAttributes:e("core/block-editor").getBlockAttributes,nowSliderClientIds:e("core/block-editor").getBlockOrder(l),slides:e("core/block-editor").getBlock(l).innerBlocks,hasChildSelected:s}}),[l]);(0,b.useEffect)((()=>{let e;0<q.length&&(e=q.reduce(((e,s)=>(!!e?.attributes?.boxShadow?.color&&0<e?.attributes?.boxShadow?.blur||0)<(!!s?.attributes?.boxShadow?.color&&0<s?.attributes?.boxShadow?.blur||0)?s:e)));const t=O?.color&&0<O?.blur?O?.blur:0,o=e?.attributes?.boxShadow?.color&&0<e?.attributes?.boxShadow?.blur?e?.attributes?.boxShadow?.blur:0,a=t>o?t:o;a===V?.top&&a===V?.bottom&&a===V?.right&&a===V?.left||s({canvasPadding:{...V,top:a,bottom:a,right:a,left:a}})}),[q.join(),O.blur]);const X=(0,m.useSelect)((e=>{const s=q.filter((s=>s.clientId===e("core/block-editor").getSelectedBlockClientId()));if(0<s.length)return E(s[0]),s[0]}),[q.join()]);(0,b.useEffect)((()=>{0<W.length&&!J&&E(W[0]),D.length!==W.length&&s({sliderClientIds:W}),W.forEach(((e,s)=>{const t=Z(e);s!==parseInt(t?.sliderId)&&G(e,{sliderId:s})}))}),[W.join(),J]);const Q=!!L.current&&L.current.offsetWidth;(0,b.useEffect)((()=>{const e=!!L.current&&!!F.current&&A&&Math.floor(L.current.offsetWidth);e&&(L.current.style.setProperty("--spider--canvas-width",`${e}px`),F.current.style.width=`${e}px`);const s=!!z.current&&A&&Math.floor(z.current.offsetWidth);s&&L.current.style.setProperty("--spider--reference-width",`${s}px`)}),[Q,A]);const ee=n()("smb-spider-slider","smb-spider-contents-slider",t,{"smb-spider-slider--shifted":A,[`smb-spider-slider--gutter-${k}`]:!!k}),se=String(T.width).match(/^\d+$/)?`${T.width}px`:T.width,te=String(T.radius).match(/^\d+$/)?`${T.radius}px`:T.radius,oe={"--smb-spider-contents-slider--canvas-offset-top":!!V?.top&&`${V?.top}px`||void 0,"--smb-spider-contents-slider--canvas-offset-right":!!V?.right&&f&&`${V?.right}px`||void 0,"--smb-spider-contents-slider--canvas-offset-bottom":!!V?.bottom&&`${V?.bottom}px`||void 0,"--smb-spider-contents-slider--canvas-offset-left":!!V?.left&&f&&`${V?.left}px`||void 0,"--smb-spider-slider--gap":!k&&!f&&(!!V?.right||!!V?.left)&&(V?.right+V?.left)/2+"px"||void 0,"--smb-spider-contents-slider--slide-border-width":!!T.color&&0<parseInt(se)&&se||void 0,"--smb-spider-contents-slider--slide-border-color":T.color||void 0,"--smb-spider-contents-slider--slide-border-type":T.style||void 0,"--smb-spider-contents-slider--slide-border-radius":0<parseInt(te)&&te||void 0,"--smb-spider-contents-slider--slide-box-shadow":O.color?`0 0 ${O.blur}px ${p()(O.color,O.opacity)}`:void 0},ae=[{value:"",label:(0,a.__)("None","snow-monkey-blocks")},{value:"s",label:(0,a.__)("S","snow-monkey-blocks")},{value:"m",label:(0,a.__)("M","snow-monkey-blocks")},{value:"l",label:(0,a.__)("L","snow-monkey-blocks")}],re=(0,u.useInnerBlocksProps)({className:"spider__canvas"},{templateLock:H,allowedBlocks:y,orientation:"horizontal",renderAppender:!1});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.InspectorControls,{group:"dimensions",children:(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>k!==r.uK.gutter.default,isShownByDefault:!0,label:(0,a.__)("Gap","snow-monkey-blocks"),onDeselect:()=>s({gutter:r.uK.gutter.default}),panelId:l,children:(0,i.jsx)(h.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Gap","snow-monkey-blocks"),value:k,onChange:e=>s({gutter:e}),options:ae})})}),(0,i.jsxs)(u.InspectorControls,{group:"border",children:[(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>T.color!==r.uK.border.default.color||T.style!==r.uK.border.default.style||T.width!==r.uK.border.default.width,isShownByDefault:!0,label:(0,a.__)("Border","snow-monkey-blocks"),onDeselect:()=>{s({border:{...T,color:r.uK.border.default.color,style:r.uK.border.default.style,width:r.uK.border.default.width}})},panelId:l,children:(0,i.jsx)(h.__experimentalBorderBoxControl,{...(0,u.__experimentalUseMultipleOriginColorsAndGradients)(),className:"smb-border-box-control",enableAlpha:!0,enableStyle:!0,onChange:e=>{s({border:{...T,color:e?.color,style:e?.style,width:e?.width}})},popoverOffset:40,popoverPlacement:"left-start",value:{color:T.color,style:T.style,width:T.width},__experimentalIsRenderedInSidebar:!0})}),(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>T.radius!==r.uK.border.default.radius,isShownByDefault:!0,label:(0,a.__)("Border radius","snow-monkey-blocks"),onDeselect:()=>{s({border:{...T,radius:r.uK.border.default.radius}})},panelId:l,children:(0,i.jsx)("div",{className:"smb-border-radius-control",children:(0,i.jsx)(u.__experimentalBorderRadiusControl,{values:T.radius,onChange:e=>{s({border:{...T,radius:e}})}})})})]}),(0,i.jsx)(u.InspectorControls,{group:"styles",children:(0,i.jsx)(x,{settings:[{colorValue:O.color||"",onColorChange:e=>{s({boxShadow:{...O,color:e}})}},{opacityValue:O.opacity,onOpacityChange:e=>{s({boxShadow:{...O,opacity:e}})}},{blurValue:O.blur,onBlurChange:e=>{s({boxShadow:{...O,blur:e}})},max:10}],defaultValues:{...r.uK.boxShadow.default}})}),(0,i.jsx)(u.InspectorControls,{children:(0,i.jsxs)(h.__experimentalToolsPanel,{label:(0,a.__)("Block settings","snow-monkey-blocks"),children:[(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>d!==r.uK.arrows.default,isShownByDefault:!0,label:(0,a.__)("Display arrows","snow-monkey-blocks"),onDeselect:()=>s({arrows:r.uK.arrows.default}),children:(0,i.jsx)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Display arrows","snow-monkey-blocks"),checked:d,onChange:e=>s({arrows:e})})}),(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>c!==r.uK.dots.default,isShownByDefault:!0,label:(0,a.__)("Display dots","snow-monkey-blocks"),onDeselect:()=>s({dots:r.uK.dots.default}),children:(0,i.jsx)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Display dots","snow-monkey-blocks"),checked:c,onChange:e=>s({dots:e})})}),(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>f!==r.uK.fade.default,isShownByDefault:!0,label:(0,a.__)("Fade","snow-monkey-blocks"),onDeselect:()=>s({fade:r.uK.fade.default}),children:(0,i.jsx)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Fade","snow-monkey-blocks"),checked:f,onChange:e=>s({fade:e})})}),(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>j!==r.uK.shuffle.default,isShownByDefault:!0,label:(0,a.__)("Shuffle slides","snow-monkey-blocks"),onDeselect:()=>s({shuffle:r.uK.shuffle.default}),children:(0,i.jsx)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Shuffle slides","snow-monkey-blocks"),checked:j,onChange:e=>s({shuffle:e})})}),R&&(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>S!==r.uK.shifted.default,isShownByDefault:!0,label:(0,a.__)("Shifting the slider","snow-monkey-blocks"),onDeselect:()=>s({shifted:r.uK.shifted.default}),children:(0,i.jsx)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Shifting the slider","snow-monkey-blocks"),help:S&&(!M||!K)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(v,{icon:w,style:{fill:"#d94f4f"}}),(0,a.__)("It must be full width (.alignfull) or wide width (.alignwide).","snow-monkey-blocks")]}),checked:S,onChange:e=>s({shifted:e})})}),(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>N!==r.uK.interval.default,isShownByDefault:!0,label:(0,a.__)("Autoplay Speed in seconds","snow-monkey-blocks"),onDeselect:()=>s({interval:r.uK.interval.default}),children:(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Autoplay Speed in seconds","snow-monkey-blocks"),help:(0,a.__)('If "0", no scroll.',"snow-monkey-blocks"),value:N,onChange:e=>s({interval:_(e,0,10)}),min:"0",max:"10"})}),0<N&&(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>C!==r.uK.autoplayButton.default,isShownByDefault:!0,label:(0,a.__)("Display pause button for autoplay","snow-monkey-blocks"),onDeselect:()=>s({autoplayButton:r.uK.autoplayButton.default}),children:(0,i.jsx)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Display pause button for autoplay","snow-monkey-blocks"),checked:C,onChange:e=>s({autoplayButton:e})})}),(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>B!==r.uK.duration.default,isShownByDefault:!0,label:(0,a.__)("Animation speed in seconds","snow-monkey-blocks"),onDeselect:()=>s({duration:r.uK.duration.default}),children:(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Animation speed in seconds","snow-monkey-blocks"),help:(0,a.__)('If "0", default animation speed.',"snow-monkey-blocks"),value:B,onChange:e=>s({duration:_(e,0,10)}),min:"0",max:"5",step:"0.1"})}),!f&&(0,i.jsx)(h.__experimentalToolsPanelItem,{hasValue:()=>P!==r.uK.lgSlidesToShow.default||I!==r.uK.mdSlidesToShow.default||$!==r.uK.smSlidesToShow.default,isShownByDefault:!0,label:(0,a.__)("Slides settings","snow-monkey-blocks"),onDeselect:()=>s({lgSlidesToShow:r.uK.lgSlidesToShow.default,mdSlidesToShow:r.uK.mdSlidesToShow.default,smSlidesToShow:r.uK.smSlidesToShow.default}),children:(0,i.jsx)(g,{desktop:()=>(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("# of slides to show (Large window)","snow-monkey-blocks"),value:P,onChange:e=>s({lgSlidesToShow:_(e,1,6)}),min:"1",max:6<W.length?6:W.length}),tablet:()=>(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("# of slides to show (Medium window)","snow-monkey-blocks"),value:I,onChange:e=>s({mdSlidesToShow:_(e,1,6)}),min:"1",max:6<W.length?6:W.length}),mobile:()=>(0,i.jsx)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("# of slides to show (Small window)","snow-monkey-blocks"),value:$,onChange:e=>s({smSlidesToShow:_(e,1,6)}),min:"1",max:6<W.length?6:W.length})})})]})}),(0,i.jsxs)("div",{...(0,u.useBlockProps)({className:ee,style:oe,ref:L}),"data-fade":f?"true":"false","data-shuffle":j?"true":"false","data-interval":0<N?1e3*N:void 0,"data-lg-slide-to-show":!f&&1<P?P:void 0,"data-md-slide-to-show":!f&&1<I?I:void 0,"data-sm-slide-to-show":!f&&1<$?$:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[A&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference",ref:z})}),(0,i.jsx)("div",{...re,ref:F}),d&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),(0<N&&C||c)&&(0,i.jsxs)("div",{className:"spider__dots",children:[C&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{className:"spider__stop",children:(0,i.jsxs)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,a.__)("Pause autoplay","snow-monkey-blocks"),children:[(0,i.jsx)("rect",{width:"5",height:"16",fill:"currentColor"}),(0,i.jsx)("rect",{x:"7",width:"5",height:"16",fill:"currentColor"})]})}),(0,i.jsx)("button",{className:"spider__start",children:(0,i.jsx)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,a.__)("Start autoplay","snow-monkey-blocks"),children:(0,i.jsx)("path",{d:"M12 8L-2.29967e-06 16L-2.29967e-06 0L12 8Z",fill:"currentColor"})})})]}),c&&W.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))]}),(o||Y)&&(0,i.jsxs)("div",{className:"smb-slider-pagination",children:[W.map(((e,s)=>(0,i.jsx)(h.Button,{variant:J===e||X?.clientId===e?"primary":"secondary",onClick:()=>{E(e),U(e)},children:(0,i.jsx)("span",{children:s+1})},s))),(0,i.jsx)(u.InnerBlocks.ButtonBlockAppender,{})]})]})]})},save:function({attributes:e,className:s}){const{arrows:t,dots:o,fade:r,shuffle:l,shifted:d,gutter:c,interval:h,autoplayButton:m,duration:b,lgSlidesToShow:v,mdSlidesToShow:f,smSlidesToShow:w,canvasPadding:x,border:g,boxShadow:_,sliderClientIds:y}=e,j="wide"===e.align,S="full"===e.align,k=d&&!r&&(j||S),N=n()("smb-spider-slider","smb-spider-contents-slider",s,{"smb-spider-slider--shifted":k,[`smb-spider-slider--gutter-${c}`]:!!c}),C=String(g.width).match(/^\d+$/)?`${g.width}px`:g.width,B=String(g.radius).match(/^\d+$/)?`${g.radius}px`:g.radius,P={"--smb-spider-contents-slider--canvas-offset-top":!!x?.top&&`${x?.top}px`||void 0,"--smb-spider-contents-slider--canvas-offset-right":!!x?.right&&r&&`${x?.right}px`||void 0,"--smb-spider-contents-slider--canvas-offset-bottom":!!x?.bottom&&`${x?.bottom}px`||void 0,"--smb-spider-contents-slider--canvas-offset-left":!!x?.left&&r&&`${x?.left}px`||void 0,"--smb-spider-slider--gap":!c&&!r&&(!!x?.right||!!x?.left)&&(x?.right+x?.left)/2+"px"||void 0,"--smb-spider-contents-slider--slide-border-width":!!g.color&&0<parseInt(C)&&C||void 0,"--smb-spider-contents-slider--slide-border-color":g.color||void 0,"--smb-spider-contents-slider--slide-border-type":g.style||void 0,"--smb-spider-contents-slider--slide-border-radius":0<parseInt(B)&&B||void 0,"--smb-spider-contents-slider--slide-box-shadow":_.color?`0 0 ${_.blur}px ${p()(_.color,_.opacity)}`:void 0};return(0,i.jsxs)("div",{...u.useBlockProps.save({className:N,style:P}),"data-fade":r?"true":"false","data-shuffle":l?"true":"false","data-interval":0<h?1e3*h:void 0,"data-duration":0<b?1e3*b:void 0,"data-lg-slide-to-show":!r&&1<v?v:void 0,"data-md-slide-to-show":!r&&1<f?f:void 0,"data-sm-slide-to-show":!r&&1<w?w:void 0,children:[(0,i.jsxs)("div",{className:"spider",children:[k&&(0,i.jsx)("div",{className:"c-container",children:(0,i.jsx)("div",{className:"spider__reference"})}),(0,i.jsx)("div",{...u.useInnerBlocksProps.save({className:"spider__canvas"})}),t&&(0,i.jsxs)("div",{className:"spider__arrows",children:[(0,i.jsx)("button",{className:"spider__arrow","data-direction":"prev",children:"Prev"}),(0,i.jsx)("button",{className:"spider__arrow","data-direction":"next",children:"Next"})]})]}),(0<h&&m||o)&&(0,i.jsxs)("div",{className:"spider__dots",children:[m&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{className:"spider__stop",children:(0,i.jsxs)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,a.__)("Pause autoplay","snow-monkey-blocks"),children:[(0,i.jsx)("rect",{width:"5",height:"16",fill:"currentColor"}),(0,i.jsx)("rect",{x:"7",width:"5",height:"16",fill:"currentColor"})]})}),(0,i.jsx)("button",{className:"spider__start",children:(0,i.jsx)("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:(0,a.__)("Start autoplay","snow-monkey-blocks"),children:(0,i.jsx)("path",{d:"M12 8L-2.29967e-06 16L-2.29967e-06 0L12 8Z",fill:"currentColor"})})})]}),o&&y.map(((e,s)=>(0,i.jsx)("button",{className:"spider__dot","data-id":s,children:s},s)))]})]})},deprecated:k,example:{attributes:{arrows:!0,dots:!0},innerBlocks:[{name:"snow-monkey-blocks/spider-contents-slider-item",attributes:{contentPadding:"s"},innerBlocks:[{name:"core/paragraph",attributes:{content:"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."}}]},{name:"snow-monkey-blocks/spider-contents-slider-item",attributes:{contentPadding:"s"},innerBlocks:[{name:"core/paragraph",attributes:{content:"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."}}]}]}})},3558:e=>{"use strict";var s=function(e){return parseInt(e,16)};e.exports=function(e,t){var o,a,r=function(e){return"#"===e.charAt(0)?e.slice(1):e}(e),i=function(e){var t=e.g,o=e.b,a=e.a;return{r:s(e.r),g:s(t),b:s(o),a:+(s(a)/255).toFixed(2)}}({r:(a=3===(o=r).length||4===o.length)?"".concat(o.slice(0,1)).concat(o.slice(0,1)):o.slice(0,2),g:a?"".concat(o.slice(1,2)).concat(o.slice(1,2)):o.slice(2,4),b:a?"".concat(o.slice(2,3)).concat(o.slice(2,3)):o.slice(4,6),a:(a?"".concat(o.slice(3,4)).concat(o.slice(3,4)):o.slice(6,8))||"ff"});return function(e,s){var t,o=e.r,a=e.g,r=e.b,i=e.a,l=(t=s,!isNaN(parseFloat(t))&&isFinite(t)?s:i);return"rgba(".concat(o,", ").concat(a,", ").concat(r,", ").concat(l,")")}(i,t)}},6942:(e,s)=>{var t;!function(){"use strict";var o={}.hasOwnProperty;function a(){for(var e="",s=0;s<arguments.length;s++){var t=arguments[s];t&&(e=i(e,r(t)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var s="";for(var t in e)o.call(e,t)&&e[t]&&(s=i(s,t));return s}function i(e,s){return s?e?e+" "+s:e+s:e}e.exports?(a.default=a,e.exports=a):void 0===(t=function(){return a}.apply(s,[]))||(e.exports=t)}()}},t={};function o(e){var a=t[e];if(void 0!==a)return a.exports;var r=t[e]={exports:{}};return s[e](r,r.exports,o),r.exports}o.m=s,e=[],o.O=(s,t,a,r)=>{if(!t){var i=1/0;for(c=0;c<e.length;c++){t=e[c][0],a=e[c][1],r=e[c][2];for(var l=!0,d=0;d<t.length;d++)(!1&r||i>=r)&&Object.keys(o.O).every((e=>o.O[e](t[d])))?t.splice(d--,1):(l=!1,r<i&&(i=r));if(l){e.splice(c--,1);var n=a();void 0!==n&&(s=n)}}return s}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[t,a,r]},o.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return o.d(s,{a:s}),s},o.d=(e,s)=>{for(var t in s)o.o(s,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:s[t]})},o.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),(()=>{var e={9021:0,465:0};o.O.j=s=>0===e[s];var s=(s,t)=>{var a,r,i=t[0],l=t[1],d=t[2],n=0;if(i.some((s=>0!==e[s]))){for(a in l)o.o(l,a)&&(o.m[a]=l[a]);if(d)var c=d(o)}for(s&&s(t);n<i.length;n++)r=i[n],o.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return o.O(c)},t=self.webpackChunk=self.webpackChunk||[];t.forEach(s.bind(null,0)),t.push=s.bind(null,t.push.bind(t))})();var a=o.O(void 0,[465],(()=>o(8674)));a=o.O(a)})(); -
snow-monkey-blocks/trunk/dist/blocks/tabs/block.json
r3187459 r3226624 10 10 "attributes": { 11 11 "tabs": { 12 "type": " string",13 "default": "[]"12 "type": "array", 13 "default": [] 14 14 }, 15 15 "matchHeight": { -
snow-monkey-blocks/trunk/dist/blocks/tabs/index.asset.php
r3211380 r3226624 1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => ' a94e7ca71749bd445826');1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '547d3ebbde992afe4b08'); -
snow-monkey-blocks/trunk/dist/blocks/tabs/index.js
r3211380 r3226624 1 (()=>{var t, e={7931:(t,e,a)=>{"use strict";const s=window.wp.blocks,o=window.wp.i18n,n=window.ReactJSXRuntime,l=(0,n.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{cx:"6.5",cy:"8",r:"1"}),(0,n.jsx)("path",{d:"M20,8H13.75a.25.25,0,0,1-.25-.25V5.5a1,1,0,0,0-1-1H4a1,1,0,0,0-1,1v13a1,1,0,0,0,1,1H20a1,1,0,0,0,1-1V9A1,1,0,0,0,20,8Zm0,10a.54.54,0,0,1-.53.54H4.53A.54.54,0,0,1,4,18V6a.54.54,0,0,1,.53-.54H12A.54.54,0,0,1,12.5,6V8.25a.54.54,0,0,0,.53.54h6.44a.54.54,0,0,1,.53.54Z"})]}),i=JSON.parse('{"UU":"snow-monkey-blocks/tabs","uK":{"tabs":{"type":"string","default":"[]"},"matchHeight":{"type":"string","source":"attribute","selector":".smb-tabs","attribute":"data-match-height","default":"false"},"tabsJustification":{"type":"string","source":"attribute","selector":".smb-tabs","attribute":"data-tabs-justification","default":"flex-start"},"tabsId":{"type":"string","source":"attribute","selector":".smb-tabs","attribute":"data-tabs-id","default":""},"orientation":{"type":"string","source":"attribute","selector":".smb-tabs","attribute":"data-orientation","default":"horizontal"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"html":false,"spacing":{"margin":true},"snowmonkeyeditor":{"blockPresets":{"ignore":["tabs","tabsId"]}}}}');var r=a(6942),c=a.n(r);const b=window.wp.blockEditor,d=window.wp.components,h=window.wp.element,m=(0,h.forwardRef)((function({icon:t,size:e=24,...a},s){return(0,h.cloneElement)(t,{width:e,height:e,...a,ref:s})})),u=window.wp.primitives,p=(0,n.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(u.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})}),_=(0,n.jsx)(u.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)(u.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),f=(0,n.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(u.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})}),v=(0,n.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(u.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),x=(0,n.jsx)(u.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)(u.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),w=(0,n.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(u.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),k=window.wp.data,g=["snow-monkey-blocks/tab-panel"],y=i.uK,j=i.xY,N=[{attributes:{...y},supports:{...j},save({attributes:t,className:e}){const{tabs:a,matchHeight:s,tabsJustification:o,tabsId:l,orientation:i}=t,r=JSON.parse(a),d="vertical"===i||"horizontal"===i&&"true"===s,h=c()("smb-tabs",e);return(0,n.jsxs)("div",{...b.useBlockProps.save({className:h}),"data-tabs-id":l,"data-orientation":i,"data-match-height":d?"true":s,"data-tabs-justification":"horizontal"===i?o:void 0,children:[0<r.length&&(0,n.jsx)("div",{className:"smb-tabs__tabs",role:"tablist",children:r.map(((t,e)=>{const a=(0,b.__experimentalGetColorClassesAndStyles)(t);return(0,n.jsx)("div",{className:"smb-tabs__tab-wrapper",children:(0,n.jsx)(b.RichText.Content,{tagName:"button",value:t.title,className:c()("smb-tabs__tab",a?.className),style:a?.style,role:"tab","aria-controls":t.tabPanelId,"aria-selected":0===e?"true":"false"})},e)}))}),(0,n.jsx)("div",{...b.useInnerBlocksProps.save({className:"smb-tabs__body"})}),d&&(0,n.jsx)("style",{children:r.map(((t,e)=>`[data-tabs-id="${l}"] > .smb-tabs__body > .smb-tab-panel:nth-child(${e+1}) {left: ${-100*e}%}`))})]})}},{attributes:{...y},supports:{...j},save({attributes:t,className:e}){const{tabs:a,matchHeight:s,tabsJustification:o,tabsId:l,orientation:i}=t,r=JSON.parse(a),d="vertical"===i||"horizontal"===i&&"true"===s,h=c()("smb-tabs",e);return(0,n.jsxs)("div",{...b.useBlockProps.save({className:h}),"data-tabs-id":l,"data-orientation":i,"data-match-height":d?"true":s,"data-tabs-justification":"horizontal"===i?o:void 0,children:[0<r.length&&(0,n.jsx)("div",{className:"smb-tabs__tabs",children:r.map(((t,e)=>(0,n.jsx)("div",{className:"smb-tabs__tab-wrapper",children:(0,n.jsx)(b.RichText.Content,{tagName:"button",value:t.title,className:"smb-tabs__tab",role:"tab","aria-controls":t.tabPanelId,"aria-selected":0===e?"true":"false"})},e)))}),(0,n.jsx)("div",{...b.useInnerBlocksProps.save({className:"smb-tabs__body"})}),d&&(0,n.jsx)("style",{children:r.map(((t,e)=>`[data-tabs-id="${l}"] > .smb-tabs__body > .smb-tab-panel:nth-child(${e+1}) {left: ${-100*e}%}`))})]})}}];(0,s.registerBlockType)(i.UU,{icon:{foreground:"#cd162c",src:l},edit:function({attributes:t,setAttributes:e,className:a,clientId:l}){const{tabs:r,matchHeight:u,tabsJustification:y,tabsId:j,orientation:N,templateLock:S}=t,B=JSON.parse(r),{removeBlocks:P,insertBlocks:I,moveBlocksUp:C,moveBlocksDown:H,updateBlockAttributes:O,selectBlock:z}=(0,k.useDispatch)("core/block-editor"),{getBlockOrder:J,getBlock:V}=(0,k.useSelect)("core/block-editor"),[$,L]=(0,h.useState)(void 0),[M,T]=(0,h.useState)(void 0);(0,h.useEffect)((()=>{if(j!==l&&e({tabsId:l}),1>B.length)return;L(B[0]?.tabPanelId),T(B[0]?.anchor);const t=J(l);if(!M){const e=V(t[0]);L(e.attributes.tabPanelId),T(e.attributes.anchor)}t.forEach(((t,e)=>{const a=V(t);a.attributes.tabPanelId===$&&T(a.attributes.anchor),O(t,{ariaHidden:0===e?"false":"true"})}))}),[l,r]);const A="vertical"===N||"horizontal"===N&&"true"===u,D=c()("smb-tabs",a),G=(0,b.useBlockProps)({className:D}),R=(0,b.useInnerBlocksProps)({className:"smb-tabs__body"},{allowedBlocks:g,templateLock:S,renderAppender:!1});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(b.InspectorControls,{children:(0,n.jsxs)(d.__experimentalToolsPanel,{label:(0,o.__)("Block settings","snow-monkey-blocks"),children:[(0,n.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>N!==i.uK.orientation.default,isShownByDefault:!0,label:(0,o.__)("Tabs orientation","snow-monkey-blocks"),onDeselect:()=>e({orientation:i.uK.orientation.default}),children:(0,n.jsx)(d.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,o.__)("Tabs orientation","snow-monkey-blocks"),value:N,onChange:t=>e({orientation:t}),options:[{value:"horizontal",label:(0,o.__)("Horizontal","snow-monkey-blocks")},{value:"vertical",label:(0,o.__)("Vertical","snow-monkey-blocks")}]})}),"horizontal"===N&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>u!==i.uK.matchHeight.default,isShownByDefault:!0,label:(0,o.__)("Align the height of each tab panels","snow-monkey-blocks"),onDeselect:()=>e({matchHeight:i.uK.matchHeight.default}),children:(0,n.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,o.__)("Align the height of each tab panels","snow-monkey-blocks"),checked:"true"===u,onChange:t=>e({matchHeight:t?"true":"false"})})}),(0,n.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>y!==i.uK.tabsJustification.default,isShownByDefault:!0,label:(0,o.__)("Tabs justification","snow-monkey-blocks"),onDeselect:()=>e({tabsJustification:i.uK.tabsJustification.default}),children:(0,n.jsx)(d.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,o.__)("Tabs justification","snow-monkey-blocks"),value:y,onChange:t=>e({tabsJustification:t}),options:[{label:(0,o.__)("Left","snow-monkey-blocks"),value:"flex-start"},{label:(0,o.__)("Center","snow-monkey-blocks"),value:"center"},{label:(0,o.__)("Right","snow-monkey-blocks"),value:"flex-end"},{label:(0,o.__)("Stretch","snow-monkey-blocks"),value:"stretch"}]})})]})]})}),(0,n.jsxs)("div",{...G,"data-tabs-id":j,"data-orientation":N,"data-match-height":A?"true":u,"data-tabs-justification":"horizontal"===N?y:void 0,children:[(0,n.jsxs)("div",{className:"smb-tabs__tabs","data-has-tabs":1<B.length?"true":"false",children:[B.map(((t,a)=>{const s=J(l)[a],i=(0,b.__experimentalGetColorClassesAndStyles)(t);return(0,n.jsxs)("div",{className:"smb-tabs__tab-wrapper","aria-selected":M===t?.anchor?"true":"false",children:[0<a&&(0,n.jsx)("button",{className:"smb-tabs__up-tab",onClick:()=>{C(s?[s]:[],l);const t=B[a];B.splice(a,1),B.splice(a-1,0,t),e({tabs:JSON.stringify(B)}),L(B[a-1]?.tabPanelId),T(B[a-1]?.anchor)},"aria-label":"horizontal"===N?(0,o.__)("Move to left","snow-monkey-blocks"):(0,o.__)("Move to up","snow-monkey-blocks"),children:(0,n.jsx)(m,{icon:"horizontal"===N?p:_})}),1<B.length&&(0,n.jsx)("button",{className:"smb-tabs__remove-tab",onClick:()=>{P(s?[s]:[],!1),B.splice(a,1),e({tabs:JSON.stringify(B)}),L(B[0]?.tabPanelId),T(B[0]?.anchor)},"aria-label":(0,o.__)("Remove this tab","snow-monkey-blocks"),children:(0,n.jsx)(m,{icon:f})}),B.length-1>a&&(0,n.jsx)("button",{className:"smb-tabs__down-tab",onClick:()=>{H(s?[s]:[],l);const t=B[a];B.splice(a,1),B.splice(a+1,0,t),e({tabs:JSON.stringify(B)}),L(B[a+1]?.tabPanelId),T(B[a+1]?.anchor)},"aria-label":"horizontal"===N?(0,o.__)("Move to right","snow-monkey-blocks"):(0,o.__)("Move to down","snow-monkey-blocks"),children:(0,n.jsx)(m,{icon:"horizontal"===N?v:x})}),(0,n.jsx)("button",{className:c()("smb-tabs__tab",i?.className),style:i?.style,role:"tab","aria-controls":t?.anchor,"aria-selected":M===t?.anchor?"true":"false",onClick:e=>{L(t?.tabPanelId),T(t?.anchor),e.target.classList.contains("smb-tabs__tab")&&0!==e.clientX&&0!==e.clientY&&0!==e.pageX&&0!==e.pageY&&z(s)},children:(0,n.jsx)(b.RichText,{value:t.title,onChange:t=>{B[a].title=t,e({tabs:JSON.stringify(B)})},placeholder:(0,o.__)("Tab","snow-monkey-blocks")})})]},`${l}-${a}`)})),(0,n.jsx)("div",{className:"smb-tabs__tab-wrapper",children:(0,n.jsx)("button",{className:"smb-tabs__tab smb-tabs__add-tab",onClick:()=>{const t=(0,s.createBlock)("snow-monkey-blocks/tab-panel"),a=`block-${t.clientId}`;t.attributes.tabPanelId=a,t.attributes.anchor=a,I(t,B.length,l,!1),B.push({tabPanelId:a,anchor:a}),e({tabs:JSON.stringify(B)}),L(a),T(a)},children:(0,n.jsx)(m,{icon:w})})})]}),(0,n.jsx)("div",{...R}),!!M&&!A&&(0,n.jsx)("style",{children:`[data-tabs-id="${j}"] > .smb-tabs__body > .smb-tab-panel:not(#${M}) {display: none !important}`}),!!M&&A&&(0,n.jsxs)("style",{children:[B.map(((t,e)=>`[data-tabs-id="${j}"] > .smb-tabs__body > .smb-tab-panel:nth-child(${e+1}) {left: ${-100*e}%}`)),`[data-tabs-id="${j}"] > .smb-tabs__body > .smb-tab-panel:not(#${M}) {visibility: hidden !important}`]})]})]})},save:function({attributes:t,className:e}){const{tabs:a,matchHeight:s,tabsJustification:o,tabsId:l,orientation:i}=t,r=JSON.parse(a),d="vertical"===i||"horizontal"===i&&"true"===s,h=c()("smb-tabs",e);return(0,n.jsxs)("div",{...b.useBlockProps.save({className:h}),"data-tabs-id":l,"data-orientation":i,"data-match-height":d?"true":s,"data-tabs-justification":"horizontal"===i?o:void 0,children:[0<r.length&&(0,n.jsx)("div",{className:"smb-tabs__tabs",role:"tablist",children:r.map(((t,e)=>{const a=(0,b.__experimentalGetColorClassesAndStyles)(t);return(0,n.jsx)("div",{className:"smb-tabs__tab-wrapper",id:`smb-tab-for-${t?.anchor}`,children:(0,n.jsx)(b.RichText.Content,{tagName:"button",value:t.title,className:c()("smb-tabs__tab",a?.className),style:a?.style,role:"tab","aria-controls":t?.anchor,"aria-selected":0===e?"true":"false"})},e)}))}),(0,n.jsx)("div",{...b.useInnerBlocksProps.save({className:"smb-tabs__body"})}),d&&(0,n.jsx)("style",{children:r.map(((t,e)=>`[data-tabs-id="${l}"] > .smb-tabs__body > .smb-tab-panel:nth-child(${e+1}) {left: ${-100*e}%}`))})]})},deprecated:N,styles:[{name:"default",label:(0,o.__)("Default","snow-monkey-blocks"),isDefault:!0},{name:"simple",label:(0,o.__)("Simple","snow-monkey-blocks")},{name:"line",label:(0,o.__)("Line","snow-monkey-blocks")}]})},6942:(t,e)=>{var a;!function(){"use strict";var s={}.hasOwnProperty;function o(){for(var t="",e=0;e<arguments.length;e++){var a=arguments[e];a&&(t=l(t,n(a)))}return t}function n(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return o.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var a in t)s.call(t,a)&&t[a]&&(e=l(e,a));return e}function l(t,e){return e?t?t+" "+e:t+e:t}t.exports?(o.default=o,t.exports=o):void 0===(a=function(){return o}.apply(e,[]))||(t.exports=a)}()}},a={};function s(t){var o=a[t];if(void 0!==o)return o.exports;var n=a[t]={exports:{}};return e[t](n,n.exports,s),n.exports}s.m=e,t=[],s.O=(e,a,o,n)=>{if(!a){var l=1/0;for(b=0;b<t.length;b++){a=t[b][0],o=t[b][1],n=t[b][2];for(var i=!0,r=0;r<a.length;r++)(!1&n||l>=n)&&Object.keys(s.O).every((t=>s.O[t](a[r])))?a.splice(r--,1):(i=!1,n<l&&(l=n));if(i){t.splice(b--,1);var c=o();void 0!==c&&(e=c)}}return e}n=n||0;for(var b=t.length;b>0&&t[b-1][2]>n;b--)t[b]=t[b-1];t[b]=[a,o,n]},s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var a in e)s.o(e,a)&&!s.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t={1881:0,3293:0};s.O.j=e=>0===t[e];var e=(e,a)=>{var o,n,l=a[0],i=a[1],r=a[2],c=0;if(l.some((e=>0!==t[e]))){for(o in i)s.o(i,o)&&(s.m[o]=i[o]);if(r)var b=r(s)}for(e&&e(a);c<l.length;c++)n=l[c],s.o(t,n)&&t[n]&&t[n][0](),t[n]=0;return s.O(b)},a=self.webpackChunk=self.webpackChunk||[];a.forEach(e.bind(null,0)),a.push=e.bind(null,a.push.bind(a))})();var o=s.O(void 0,[3293],(()=>s(7931)));o=s.O(o)})();1 (()=>{var t,a={7931:(t,a,e)=>{"use strict";const s=window.wp.blocks,o=window.wp.i18n,n=window.ReactJSXRuntime,l=(0,n.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{cx:"6.5",cy:"8",r:"1"}),(0,n.jsx)("path",{d:"M20,8H13.75a.25.25,0,0,1-.25-.25V5.5a1,1,0,0,0-1-1H4a1,1,0,0,0-1,1v13a1,1,0,0,0,1,1H20a1,1,0,0,0,1-1V9A1,1,0,0,0,20,8Zm0,10a.54.54,0,0,1-.53.54H4.53A.54.54,0,0,1,4,18V6a.54.54,0,0,1,.53-.54H12A.54.54,0,0,1,12.5,6V8.25a.54.54,0,0,0,.53.54h6.44a.54.54,0,0,1,.53.54Z"})]}),i=JSON.parse('{"UU":"snow-monkey-blocks/tabs","uK":{"tabs":{"type":"array","default":[]},"matchHeight":{"type":"string","source":"attribute","selector":".smb-tabs","attribute":"data-match-height","default":"false"},"tabsJustification":{"type":"string","source":"attribute","selector":".smb-tabs","attribute":"data-tabs-justification","default":"flex-start"},"tabsId":{"type":"string","source":"attribute","selector":".smb-tabs","attribute":"data-tabs-id","default":""},"orientation":{"type":"string","source":"attribute","selector":".smb-tabs","attribute":"data-orientation","default":"horizontal"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"html":false,"spacing":{"margin":true},"snowmonkeyeditor":{"blockPresets":{"ignore":["tabs","tabsId"]}}}}');var r=e(6942),c=e.n(r);const b=window.wp.blockEditor,d=window.wp.components,m=window.wp.element,h=(0,m.forwardRef)((function({icon:t,size:a=24,...e},s){return(0,m.cloneElement)(t,{width:a,height:a,...e,ref:s})})),u=window.wp.primitives,p=(0,n.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(u.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})}),_=(0,n.jsx)(u.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)(u.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),v=(0,n.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(u.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})}),f=(0,n.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(u.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),x=(0,n.jsx)(u.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)(u.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),w=(0,n.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(u.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),k=window.wp.data,g=["snow-monkey-blocks/tab-panel"],y=i.uK,j=i.xY,N=[{attributes:{...y,tabs:{type:"string",default:"[]"}},supports:{...j},migrate(t){const{tabs:a}=t;return{...t,tabs:JSON.parse(a)}},save({attributes:t,className:a}){const{tabs:e,matchHeight:s,tabsJustification:o,tabsId:l,orientation:i}=t,r=JSON.parse(e),d="vertical"===i||"horizontal"===i&&"true"===s,m=c()("smb-tabs",a);return(0,n.jsxs)("div",{...b.useBlockProps.save({className:m}),"data-tabs-id":l,"data-orientation":i,"data-match-height":d?"true":s,"data-tabs-justification":"horizontal"===i?o:void 0,children:[0<r.length&&(0,n.jsx)("div",{className:"smb-tabs__tabs",role:"tablist",children:r.map(((t,a)=>{const e=(0,b.__experimentalGetColorClassesAndStyles)(t);return(0,n.jsx)("div",{className:"smb-tabs__tab-wrapper",id:`smb-tab-for-${t?.anchor}`,children:(0,n.jsx)(b.RichText.Content,{tagName:"button",value:t.title,className:c()("smb-tabs__tab",e?.className),style:e?.style,role:"tab","aria-controls":t?.anchor,"aria-selected":0===a?"true":"false"})},a)}))}),(0,n.jsx)("div",{...b.useInnerBlocksProps.save({className:"smb-tabs__body"})}),d&&(0,n.jsx)("style",{children:r.map(((t,a)=>`[data-tabs-id="${l}"] > .smb-tabs__body > .smb-tab-panel:nth-child(${a+1}) {left: ${-100*a}%}`))})]})}},{attributes:{...y,tabs:{type:"string",default:"[]"}},supports:{...j},save({attributes:t,className:a}){const{tabs:e,matchHeight:s,tabsJustification:o,tabsId:l,orientation:i}=t,r=JSON.parse(e),d="vertical"===i||"horizontal"===i&&"true"===s,m=c()("smb-tabs",a);return(0,n.jsxs)("div",{...b.useBlockProps.save({className:m}),"data-tabs-id":l,"data-orientation":i,"data-match-height":d?"true":s,"data-tabs-justification":"horizontal"===i?o:void 0,children:[0<r.length&&(0,n.jsx)("div",{className:"smb-tabs__tabs",role:"tablist",children:r.map(((t,a)=>{const e=(0,b.__experimentalGetColorClassesAndStyles)(t);return(0,n.jsx)("div",{className:"smb-tabs__tab-wrapper",children:(0,n.jsx)(b.RichText.Content,{tagName:"button",value:t.title,className:c()("smb-tabs__tab",e?.className),style:e?.style,role:"tab","aria-controls":t.tabPanelId,"aria-selected":0===a?"true":"false"})},a)}))}),(0,n.jsx)("div",{...b.useInnerBlocksProps.save({className:"smb-tabs__body"})}),d&&(0,n.jsx)("style",{children:r.map(((t,a)=>`[data-tabs-id="${l}"] > .smb-tabs__body > .smb-tab-panel:nth-child(${a+1}) {left: ${-100*a}%}`))})]})}},{attributes:{...y,tabs:{type:"string",default:"[]"}},supports:{...j},save({attributes:t,className:a}){const{tabs:e,matchHeight:s,tabsJustification:o,tabsId:l,orientation:i}=t,r=JSON.parse(e),d="vertical"===i||"horizontal"===i&&"true"===s,m=c()("smb-tabs",a);return(0,n.jsxs)("div",{...b.useBlockProps.save({className:m}),"data-tabs-id":l,"data-orientation":i,"data-match-height":d?"true":s,"data-tabs-justification":"horizontal"===i?o:void 0,children:[0<r.length&&(0,n.jsx)("div",{className:"smb-tabs__tabs",children:r.map(((t,a)=>(0,n.jsx)("div",{className:"smb-tabs__tab-wrapper",children:(0,n.jsx)(b.RichText.Content,{tagName:"button",value:t.title,className:"smb-tabs__tab",role:"tab","aria-controls":t.tabPanelId,"aria-selected":0===a?"true":"false"})},a)))}),(0,n.jsx)("div",{...b.useInnerBlocksProps.save({className:"smb-tabs__body"})}),d&&(0,n.jsx)("style",{children:r.map(((t,a)=>`[data-tabs-id="${l}"] > .smb-tabs__body > .smb-tab-panel:nth-child(${a+1}) {left: ${-100*a}%}`))})]})}}];(0,s.registerBlockType)(i.UU,{icon:{foreground:"#cd162c",src:l},edit:function({attributes:t,setAttributes:a,className:e,clientId:l}){const{tabs:r,matchHeight:u,tabsJustification:y,tabsId:j,orientation:N,templateLock:B}=t,{removeBlocks:P,insertBlocks:S,moveBlocksUp:I,moveBlocksDown:C,updateBlockAttributes:H,selectBlock:z}=(0,k.useDispatch)("core/block-editor"),{getBlockOrder:$,getBlock:O}=(0,k.useSelect)("core/block-editor"),[V,J]=(0,m.useState)(void 0),[L,T]=(0,m.useState)(void 0);(0,m.useEffect)((()=>{if(j!==l&&a({tabsId:l}),1>r.length)return;J(r[0]?.tabPanelId),T(r[0]?.anchor);const t=$(l);if(!L){const a=O(t[0]);J(a.attributes.tabPanelId),T(a.attributes.anchor)}t.forEach(((t,a)=>{const e=O(t);e.attributes.tabPanelId===V&&T(e.attributes.anchor),H(t,{ariaHidden:0===a?"false":"true"})}))}),[l,r]);const M="vertical"===N||"horizontal"===N&&"true"===u,A=c()("smb-tabs",e),D=(0,b.useBlockProps)({className:A}),G=(0,b.useInnerBlocksProps)({className:"smb-tabs__body"},{allowedBlocks:g,templateLock:B,renderAppender:!1});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(b.InspectorControls,{children:(0,n.jsxs)(d.__experimentalToolsPanel,{label:(0,o.__)("Block settings","snow-monkey-blocks"),children:[(0,n.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>N!==i.uK.orientation.default,isShownByDefault:!0,label:(0,o.__)("Tabs orientation","snow-monkey-blocks"),onDeselect:()=>a({orientation:i.uK.orientation.default}),children:(0,n.jsx)(d.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,o.__)("Tabs orientation","snow-monkey-blocks"),value:N,onChange:t=>a({orientation:t}),options:[{value:"horizontal",label:(0,o.__)("Horizontal","snow-monkey-blocks")},{value:"vertical",label:(0,o.__)("Vertical","snow-monkey-blocks")}]})}),"horizontal"===N&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>u!==i.uK.matchHeight.default,isShownByDefault:!0,label:(0,o.__)("Align the height of each tab panels","snow-monkey-blocks"),onDeselect:()=>a({matchHeight:i.uK.matchHeight.default}),children:(0,n.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,o.__)("Align the height of each tab panels","snow-monkey-blocks"),checked:"true"===u,onChange:t=>a({matchHeight:t?"true":"false"})})}),(0,n.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>y!==i.uK.tabsJustification.default,isShownByDefault:!0,label:(0,o.__)("Tabs justification","snow-monkey-blocks"),onDeselect:()=>a({tabsJustification:i.uK.tabsJustification.default}),children:(0,n.jsx)(d.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,o.__)("Tabs justification","snow-monkey-blocks"),value:y,onChange:t=>a({tabsJustification:t}),options:[{label:(0,o.__)("Left","snow-monkey-blocks"),value:"flex-start"},{label:(0,o.__)("Center","snow-monkey-blocks"),value:"center"},{label:(0,o.__)("Right","snow-monkey-blocks"),value:"flex-end"},{label:(0,o.__)("Stretch","snow-monkey-blocks"),value:"stretch"}]})})]})]})}),(0,n.jsxs)("div",{...D,"data-tabs-id":j,"data-orientation":N,"data-match-height":M?"true":u,"data-tabs-justification":"horizontal"===N?y:void 0,children:[(0,n.jsxs)("div",{className:"smb-tabs__tabs","data-has-tabs":1<r.length?"true":"false",children:[r.map(((t,e)=>{const s=$(l)[e],i=(0,b.__experimentalGetColorClassesAndStyles)(t);return(0,n.jsxs)("div",{className:"smb-tabs__tab-wrapper","aria-selected":L===t?.anchor?"true":"false",children:[0<e&&(0,n.jsx)("button",{className:"smb-tabs__up-tab",onClick:()=>{I(s?[s]:[],l);const t=r[e];r.splice(e,1),r.splice(e-1,0,t),a({tabs:[...r]}),J(r[e-1]?.tabPanelId),T(r[e-1]?.anchor)},"aria-label":"horizontal"===N?(0,o.__)("Move to left","snow-monkey-blocks"):(0,o.__)("Move to up","snow-monkey-blocks"),children:(0,n.jsx)(h,{icon:"horizontal"===N?p:_})}),1<r.length&&(0,n.jsx)("button",{className:"smb-tabs__remove-tab",onClick:()=>{P(s?[s]:[],!1),r.splice(e,1),a({tabs:[...r]}),J(r[0]?.tabPanelId),T(r[0]?.anchor)},"aria-label":(0,o.__)("Remove this tab","snow-monkey-blocks"),children:(0,n.jsx)(h,{icon:v})}),r.length-1>e&&(0,n.jsx)("button",{className:"smb-tabs__down-tab",onClick:()=>{C(s?[s]:[],l);const t=r[e];r.splice(e,1),r.splice(e+1,0,t),a({tabs:[...r]}),J(r[e+1]?.tabPanelId),T(r[e+1]?.anchor)},"aria-label":"horizontal"===N?(0,o.__)("Move to right","snow-monkey-blocks"):(0,o.__)("Move to down","snow-monkey-blocks"),children:(0,n.jsx)(h,{icon:"horizontal"===N?f:x})}),(0,n.jsx)("button",{className:c()("smb-tabs__tab",i?.className),style:i?.style,role:"tab","aria-controls":t?.anchor,"aria-selected":L===t?.anchor?"true":"false",onClick:a=>{J(t?.tabPanelId),T(t?.anchor),a.target.classList.contains("smb-tabs__tab")&&0!==a.clientX&&0!==a.clientY&&0!==a.pageX&&0!==a.pageY&&z(s)},children:(0,n.jsx)(b.RichText,{value:t.title,onChange:t=>{r[e].title=t,a({tabs:[...r]})},placeholder:(0,o.__)("Tab","snow-monkey-blocks")})})]},`${l}-${e}`)})),(0,n.jsx)("div",{className:"smb-tabs__tab-wrapper",children:(0,n.jsx)("button",{className:"smb-tabs__tab smb-tabs__add-tab",onClick:()=>{const t=(0,s.createBlock)("snow-monkey-blocks/tab-panel"),e=`block-${t.clientId}`;t.attributes.tabPanelId=e,t.attributes.anchor=e,S(t,r.length,l,!1),r.push({tabPanelId:e,anchor:e}),a({tabs:r}),J(e),T(e)},children:(0,n.jsx)(h,{icon:w})})})]}),(0,n.jsx)("div",{...G}),!!L&&!M&&(0,n.jsx)("style",{children:`[data-tabs-id="${j}"] > .smb-tabs__body > .smb-tab-panel:not(#${L}) {display: none !important}`}),!!L&&M&&(0,n.jsxs)("style",{children:[r.map(((t,a)=>`[data-tabs-id="${j}"] > .smb-tabs__body > .smb-tab-panel:nth-child(${a+1}) {left: ${-100*a}%}`)),`[data-tabs-id="${j}"] > .smb-tabs__body > .smb-tab-panel:not(#${L}) {visibility: hidden !important}`]})]})]})},save:function({attributes:t,className:a}){const{tabs:e,matchHeight:s,tabsJustification:o,tabsId:l,orientation:i}=t,r="vertical"===i||"horizontal"===i&&"true"===s,d=c()("smb-tabs",a);return(0,n.jsxs)("div",{...b.useBlockProps.save({className:d}),"data-tabs-id":l,"data-orientation":i,"data-match-height":r?"true":s,"data-tabs-justification":"horizontal"===i?o:void 0,children:[0<e.length&&(0,n.jsx)("div",{className:"smb-tabs__tabs",role:"tablist",children:e.map(((t,a)=>{const e=(0,b.__experimentalGetColorClassesAndStyles)(t);return(0,n.jsx)("div",{className:"smb-tabs__tab-wrapper",id:`smb-tab-for-${t?.anchor}`,children:(0,n.jsx)(b.RichText.Content,{tagName:"button",value:t.title,className:c()("smb-tabs__tab",e?.className),style:e?.style,role:"tab","aria-controls":t?.anchor,"aria-selected":0===a?"true":"false"})},a)}))}),(0,n.jsx)("div",{...b.useInnerBlocksProps.save({className:"smb-tabs__body"})}),r&&(0,n.jsx)("style",{children:e.map(((t,a)=>`[data-tabs-id="${l}"] > .smb-tabs__body > .smb-tab-panel:nth-child(${a+1}) {left: ${-100*a}%}`))})]})},deprecated:N,styles:[{name:"default",label:(0,o.__)("Default","snow-monkey-blocks"),isDefault:!0},{name:"simple",label:(0,o.__)("Simple","snow-monkey-blocks")},{name:"line",label:(0,o.__)("Line","snow-monkey-blocks")}]})},6942:(t,a)=>{var e;!function(){"use strict";var s={}.hasOwnProperty;function o(){for(var t="",a=0;a<arguments.length;a++){var e=arguments[a];e&&(t=l(t,n(e)))}return t}function n(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return o.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var a="";for(var e in t)s.call(t,e)&&t[e]&&(a=l(a,e));return a}function l(t,a){return a?t?t+" "+a:t+a:t}t.exports?(o.default=o,t.exports=o):void 0===(e=function(){return o}.apply(a,[]))||(t.exports=e)}()}},e={};function s(t){var o=e[t];if(void 0!==o)return o.exports;var n=e[t]={exports:{}};return a[t](n,n.exports,s),n.exports}s.m=a,t=[],s.O=(a,e,o,n)=>{if(!e){var l=1/0;for(b=0;b<t.length;b++){e=t[b][0],o=t[b][1],n=t[b][2];for(var i=!0,r=0;r<e.length;r++)(!1&n||l>=n)&&Object.keys(s.O).every((t=>s.O[t](e[r])))?e.splice(r--,1):(i=!1,n<l&&(l=n));if(i){t.splice(b--,1);var c=o();void 0!==c&&(a=c)}}return a}n=n||0;for(var b=t.length;b>0&&t[b-1][2]>n;b--)t[b]=t[b-1];t[b]=[e,o,n]},s.n=t=>{var a=t&&t.__esModule?()=>t.default:()=>t;return s.d(a,{a}),a},s.d=(t,a)=>{for(var e in a)s.o(a,e)&&!s.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:a[e]})},s.o=(t,a)=>Object.prototype.hasOwnProperty.call(t,a),(()=>{var t={1881:0,3293:0};s.O.j=a=>0===t[a];var a=(a,e)=>{var o,n,l=e[0],i=e[1],r=e[2],c=0;if(l.some((a=>0!==t[a]))){for(o in i)s.o(i,o)&&(s.m[o]=i[o]);if(r)var b=r(s)}for(a&&a(e);c<l.length;c++)n=l[c],s.o(t,n)&&t[n]&&t[n][0](),t[n]=0;return s.O(b)},e=self.webpackChunk=self.webpackChunk||[];e.forEach(a.bind(null,0)),e.push=a.bind(null,e.push.bind(e))})();var o=s.O(void 0,[3293],(()=>s(7931)));o=s.O(o)})(); -
snow-monkey-blocks/trunk/dist/blocks/tabs/tab-panel/index.asset.php
r3158860 r3226624 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-data', 'wp-element'), 'version' => ' bc98ee192e0314800ec1');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-data', 'wp-element'), 'version' => '6f7787014f787e24a5a0'); -
snow-monkey-blocks/trunk/dist/blocks/tabs/tab-panel/index.js
r3158860 r3226624 1 (()=>{var e={6942:(e,t)=>{var r;!function(){"use strict";var a={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=s(e,n(r)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)a.call(e,r)&&e[r]&&(t=s(t,r));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()}},t={};function r(a){var o=t[a];if(void 0!==o)return o.exports;var n=t[a]={exports:{}};return e[a](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/tab-panel","uK":{"tabPanelId":{"type":"string","default":""},"ariaHidden":{"type":"string","source":"attribute","selector":".smb-tab-panel","attribute":"aria-hidden","default":"true"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"customClassName":false,"reusable":false,"html":false,"anchor":true,"__experimentalToolbar":false,"inserter":false,"color":{"background":true,"text":true,"link":true},"layout":{"allowSwitching":false,"allowEditing":false,"allowInheriting":false,"default":{"type":"constrained"}}}}'),a=window.ReactJSXRuntime,o=(0,a.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{cx:"6.5",cy:"8",r:"1"}),(0,a.jsx)("path",{d:"M20,8H13.75a.25.25,0,0,1-.25-.25V5.5a1,1,0,0,0-1-1H4a1,1,0,0,0-1,1v13a1,1,0,0,0,1,1H20a1,1,0,0,0,1-1V9A1,1,0,0,0,20,8Zm0,10a.54.54,0,0,1-.53.54H4.53A.54.54,0,0,1,4,18V6a.54.54,0,0,1,.53-.54H12A.54.54,0,0,1,12.5,6V8.25a.54.54,0,0,0,.53.54h6.44a.54.54,0,0,1,.53.54Z"})]});var n=r(6942),s=r.n(n);const l=window.wp.blockEditor,c=window.wp.data,i=window.wp.element;window.lodash;const d=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.entries(e).map((([e,t])=>[e,d(t)])).filter((([,e])=>null!=e&&""!==e));return t.length?Object.fromEntries(t):void 0},u=[{attributes:{...t.uK,tabPanelId:{type:"string",source:"attribute",selector:".smb-tab-panel",attribute:"id",default:""}},supports:{...t.xY,anchor:!1},migrate(e){const t={...e};return!t?.anchor&&t.tabPanelId&&(t.anchor=t?.tabPanelId),t},save({attributes:e,className:t}){const{tabPanelId:r,ariaHidden:o}=e,n=s()("smb-tab-panel",t);return(0,a.jsx)("div",{...l.useBlockProps.save({className:n}),id:r,"aria-hidden":o,role:"tabpanel",children:(0,a.jsx)("div",{...l.useInnerBlocksProps.save({className:"smb-tab-panel__body"})})})}}];(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:o},edit:function({attributes:e,setAttributes:t,className:r,clientId:o}){const{tabPanelId:n,backgroundColor:u,textColor:b,anchor:p,style:f,templateLock:m}=e,{updateBlockAttributes:k}=(0,c.useDispatch)("core/block-editor"),{getBlockParents:v,getBlockAttributes:g,getBlockOrder:y}=(0,c.useSelect)("core/block-editor"),h=v(o,!0)[0];(0,i.useEffect)((()=>{const e=g(h)?.tabs;if(!e)return;const r= JSON.parse(e),a=y(h).map(((e,a)=>{const s=r[a];if(e===o){const e=`block-${o}`,r=n!==e?e:n;n!==r&&t({tabPanelId:r});const a=p?.match(/^block(-([\da-z]+?)){5}$/)&&p!==r?r:p||r;return p!==a&&t({anchor:a}),d({...s,anchor:a,tabPanelId:r,backgroundColor:u||void 0,textColor:b||void 0,style:{...s?.style,color:{...s?.style?.color,background:f?.color?.background||void 0,text:f?.color?.text||void 0}}})}return s}));k(h,{tabs:JSON.stringify(a)})}),[u,b,f?.color?.background,f?.color?.text,p,o]);const x=(0,c.useSelect)((e=>!!e("core/block-editor").getBlock(o)?.innerBlocks?.length),[o]),w=s()("smb-tab-panel",r),B=(0,l.useBlockProps)({className:w}),P=(0,l.useInnerBlocksProps)({className:"smb-tab-panel__body"},{templateLock:m,renderAppender:x?l.InnerBlocks.DefaultBlockAppender:l.InnerBlocks.ButtonBlockAppender});return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{...B,role:"tabpanel",id:p,children:(0,a.jsx)("div",{...P})})})},save:function({attributes:e,className:t}){const{ariaHidden:r}=e,o=s()("smb-tab-panel",t);return(0,a.jsx)("div",{...l.useBlockProps.save({className:o}),"aria-hidden":r,role:"tabpanel",children:(0,a.jsx)("div",{...l.useInnerBlocksProps.save({className:"smb-tab-panel__body"})})})},deprecated:u})})()})();1 (()=>{var e={6942:(e,t)=>{var r;!function(){"use strict";var a={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=s(e,n(r)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)a.call(e,r)&&e[r]&&(t=s(t,r));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()}},t={};function r(a){var o=t[a];if(void 0!==o)return o.exports;var n=t[a]={exports:{}};return e[a](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"snow-monkey-blocks/tab-panel","uK":{"tabPanelId":{"type":"string","default":""},"ariaHidden":{"type":"string","source":"attribute","selector":".smb-tab-panel","attribute":"aria-hidden","default":"true"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"xY":{"customClassName":false,"reusable":false,"html":false,"anchor":true,"__experimentalToolbar":false,"inserter":false,"color":{"background":true,"text":true,"link":true},"layout":{"allowSwitching":false,"allowEditing":false,"allowInheriting":false,"default":{"type":"constrained"}}}}'),a=window.ReactJSXRuntime,o=(0,a.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{cx:"6.5",cy:"8",r:"1"}),(0,a.jsx)("path",{d:"M20,8H13.75a.25.25,0,0,1-.25-.25V5.5a1,1,0,0,0-1-1H4a1,1,0,0,0-1,1v13a1,1,0,0,0,1,1H20a1,1,0,0,0,1-1V9A1,1,0,0,0,20,8Zm0,10a.54.54,0,0,1-.53.54H4.53A.54.54,0,0,1,4,18V6a.54.54,0,0,1,.53-.54H12A.54.54,0,0,1,12.5,6V8.25a.54.54,0,0,0,.53.54h6.44a.54.54,0,0,1,.53.54Z"})]});var n=r(6942),s=r.n(n);const l=window.wp.blockEditor,c=window.wp.data,i=window.wp.element;window.lodash;const d=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.entries(e).map((([e,t])=>[e,d(t)])).filter((([,e])=>null!=e&&""!==e));return t.length?Object.fromEntries(t):void 0},u=[{attributes:{...t.uK,tabPanelId:{type:"string",source:"attribute",selector:".smb-tab-panel",attribute:"id",default:""}},supports:{...t.xY,anchor:!1},migrate(e){const t={...e};return!t?.anchor&&t.tabPanelId&&(t.anchor=t?.tabPanelId),t},save({attributes:e,className:t}){const{tabPanelId:r,ariaHidden:o}=e,n=s()("smb-tab-panel",t);return(0,a.jsx)("div",{...l.useBlockProps.save({className:n}),id:r,"aria-hidden":o,role:"tabpanel",children:(0,a.jsx)("div",{...l.useInnerBlocksProps.save({className:"smb-tab-panel__body"})})})}}];(0,e.registerBlockType)(t.UU,{icon:{foreground:"#cd162c",src:o},edit:function({attributes:e,setAttributes:t,className:r,clientId:o}){const{tabPanelId:n,backgroundColor:u,textColor:b,anchor:p,style:f,templateLock:m}=e,{updateBlockAttributes:k}=(0,c.useDispatch)("core/block-editor"),{getBlockParents:v,getBlockAttributes:g,getBlockOrder:y}=(0,c.useSelect)("core/block-editor"),h=v(o,!0)[0];(0,i.useEffect)((()=>{const e=g(h)?.tabs;if(!e)return;const r=y(h).map(((r,a)=>{const s=e[a];if(r===o){const e=`block-${o}`,r=n!==e?e:n;n!==r&&t({tabPanelId:r});const a=p?.match(/^block(-([\da-z]+?)){5}$/)&&p!==r?r:p||r;return p!==a&&t({anchor:a}),d({...s,anchor:a,tabPanelId:r,backgroundColor:u||void 0,textColor:b||void 0,style:{...s?.style,color:{...s?.style?.color,background:f?.color?.background||void 0,text:f?.color?.text||void 0}}})}return s}));k(h,{tabs:r})}),[u,b,f?.color?.background,f?.color?.text,p,o]);const x=(0,c.useSelect)((e=>!!e("core/block-editor").getBlock(o)?.innerBlocks?.length),[o]),w=s()("smb-tab-panel",r),B=(0,l.useBlockProps)({className:w}),P=(0,l.useInnerBlocksProps)({className:"smb-tab-panel__body"},{templateLock:m,renderAppender:x?l.InnerBlocks.DefaultBlockAppender:l.InnerBlocks.ButtonBlockAppender});return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{...B,role:"tabpanel",id:p,children:(0,a.jsx)("div",{...P})})})},save:function({attributes:e,className:t}){const{ariaHidden:r}=e,o=s()("smb-tab-panel",t);return(0,a.jsx)("div",{...l.useBlockProps.save({className:o}),"aria-hidden":r,role:"tabpanel",children:(0,a.jsx)("div",{...l.useInnerBlocksProps.save({className:"smb-tab-panel__body"})})})},deprecated:u})})()})(); -
snow-monkey-blocks/trunk/readme.txt
r3211380 r3226624 3 3 Donate link: https://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40 4 4 Tags: gutenberg, block, blocks, editor, gutenberg blocks 5 Stable tag: 22.3. 25 Stable tag: 22.3.3 6 6 Requires at least: 6.7 7 7 Tested up to: 6.7 -
snow-monkey-blocks/trunk/snow-monkey-blocks.php
r3211380 r3226624 2 2 /** 3 3 * Plugin name: Snow Monkey Blocks 4 * Version: 22.3. 24 * Version: 22.3.3 5 5 * Description: Gutenberg blocks collection made by MonkeyWrench. 6 6 * Author: inc2734 -
snow-monkey-blocks/trunk/src/blocks/spider-contents-slider/block.json
r3129460 r3226624 65 65 }, 66 66 "sliderClientIds": { 67 "type": " string",68 "default": "[]"67 "type": "array", 68 "default": [] 69 69 }, 70 70 "border": { -
snow-monkey-blocks/trunk/src/blocks/spider-contents-slider/deprecated.js
r3030085 r3226624 14 14 attributes: { 15 15 ...blockAttributes, 16 sliderClientIds: { 17 type: 'string', 18 default: '[]', 19 }, 16 20 }, 17 21 … … 172 176 { autoplayButton && ( 173 177 <> 174 <button 175 className="spider__stop" 176 title={ __( 177 'Pause autoplay', 178 'snow-monkey-blocks' 179 ) } 180 > 181 ⏸ 178 <button className="spider__stop"> 179 <svg 180 width="12" 181 height="16" 182 viewBox="0 0 12 16" 183 fill="none" 184 xmlns="http://www.w3.org/2000/svg" 185 title={ __( 186 'Pause autoplay', 187 'snow-monkey-blocks' 188 ) } 189 > 190 <rect 191 width="5" 192 height="16" 193 fill="currentColor" 194 ></rect> 195 <rect 196 x="7" 197 width="5" 198 height="16" 199 fill="currentColor" 200 ></rect> 201 </svg> 182 202 </button> 183 184 <button 185 className="spider__start" 186 title={ __( 187 'Start autoplay', 188 'snow-monkey-blocks' 189 ) } 190 > 191 ▶ 203 <button className="spider__start"> 204 <svg 205 width="12" 206 height="16" 207 viewBox="0 0 12 16" 208 fill="none" 209 xmlns="http://www.w3.org/2000/svg" 210 title={ __( 211 'Start autoplay', 212 'snow-monkey-blocks' 213 ) } 214 > 215 <path 216 d="M12 8L-2.29967e-06 16L-2.29967e-06 0L12 8Z" 217 fill="currentColor" 218 ></path> 219 </svg> 192 220 </button> 193 221 </> … … 217 245 attributes: { 218 246 ...blockAttributes, 247 sliderClientIds: { 248 type: 'string', 249 default: '[]', 250 }, 251 }, 252 253 supports: { 254 ...blockSupports, 255 }, 256 257 save( { attributes, className } ) { 258 const { 259 arrows, 260 dots, 261 fade, 262 shuffle, 263 shifted, 264 gutter, 265 interval, 266 autoplayButton, 267 duration, 268 lgSlidesToShow, 269 mdSlidesToShow, 270 smSlidesToShow, 271 canvasPadding, 272 border, 273 boxShadow, 274 sliderClientIds: _sliderClientIds, 275 } = attributes; 276 const sliderClientIds = JSON.parse( _sliderClientIds ); 277 278 const isAlignwide = 'wide' === attributes.align; 279 const isAlignfull = 'full' === attributes.align; 280 const isShiftable = ! fade; 281 const isShifted = 282 shifted && isShiftable && ( isAlignwide || isAlignfull ); 283 284 const classes = classnames( 285 'smb-spider-slider', 286 'smb-spider-contents-slider', 287 className, 288 { 289 'smb-spider-slider--shifted': isShifted, 290 [ `smb-spider-slider--gutter-${ gutter }` ]: !! gutter, 291 } 292 ); 293 294 const borderWidth = String( border.width ).match( /^\d+$/ ) 295 ? `${ border.width }px` 296 : border.width; 297 298 const borderRadius = String( border.radius ).match( /^\d+$/ ) 299 ? `${ border.radius }px` 300 : border.radius; 301 302 const styles = { 303 '--smb-spider-contents-slider--canvas-offset-top': 304 ( !! canvasPadding?.top && `${ canvasPadding?.top }px` ) || 305 undefined, 306 '--smb-spider-contents-slider--canvas-offset-right': 307 ( !! canvasPadding?.right && 308 fade && 309 `${ canvasPadding?.right }px` ) || 310 undefined, 311 '--smb-spider-contents-slider--canvas-offset-bottom': 312 ( !! canvasPadding?.bottom && 313 `${ canvasPadding?.bottom }px` ) || 314 undefined, 315 '--smb-spider-contents-slider--canvas-offset-left': 316 ( !! canvasPadding?.left && 317 fade && 318 `${ canvasPadding?.left }px` ) || 319 undefined, 320 '--smb-spider-slider--gap': 321 ( ! gutter && 322 ! fade && 323 ( !! canvasPadding?.right || !! canvasPadding?.left ) && 324 `${ 325 ( canvasPadding?.right + canvasPadding?.left ) / 2 326 }px` ) || 327 undefined, 328 '--smb-spider-contents-slider--slide-border-width': 329 ( !! border.color && 330 0 < parseInt( borderWidth ) && 331 borderWidth ) || 332 undefined, 333 '--smb-spider-contents-slider--slide-border-color': 334 border.color || undefined, 335 '--smb-spider-contents-slider--slide-border-type': 336 border.style || undefined, 337 '--smb-spider-contents-slider--slide-border-radius': 338 ( 0 < parseInt( borderRadius ) && borderRadius ) || 339 undefined, 340 '--smb-spider-contents-slider--slide-box-shadow': 341 !! boxShadow.color 342 ? `0 0 ${ boxShadow.blur }px ${ hexToRgba( 343 boxShadow.color, 344 boxShadow.opacity 345 ) }` 346 : undefined, 347 }; 348 349 return ( 350 <div 351 { ...useBlockProps.save( { 352 className: classes, 353 style: styles, 354 } ) } 355 data-fade={ fade ? 'true' : 'false' } 356 data-shuffle={ shuffle ? 'true' : 'false' } 357 data-interval={ 0 < interval ? interval * 1000 : undefined } 358 data-duration={ 0 < duration ? duration * 1000 : undefined } 359 data-lg-slide-to-show={ 360 ! fade && 1 < lgSlidesToShow 361 ? lgSlidesToShow 362 : undefined 363 } 364 data-md-slide-to-show={ 365 ! fade && 1 < mdSlidesToShow 366 ? mdSlidesToShow 367 : undefined 368 } 369 data-sm-slide-to-show={ 370 ! fade && 1 < smSlidesToShow 371 ? smSlidesToShow 372 : undefined 373 } 374 > 375 <div className="spider"> 376 { isShifted && ( 377 <div className="c-container"> 378 <div className="spider__reference" /> 379 </div> 380 ) } 381 <div 382 { ...useInnerBlocksProps.save( { 383 className: 'spider__canvas', 384 } ) } 385 /> 386 387 { arrows && ( 388 <div className="spider__arrows"> 389 <button 390 className="spider__arrow" 391 data-direction="prev" 392 > 393 Prev 394 </button> 395 <button 396 className="spider__arrow" 397 data-direction="next" 398 > 399 Next 400 </button> 401 </div> 402 ) } 403 </div> 404 405 { ( ( 0 < interval && autoplayButton ) || dots ) && ( 406 <div className="spider__dots"> 407 { autoplayButton && ( 408 <> 409 <button 410 className="spider__stop" 411 title={ __( 412 'Pause autoplay', 413 'snow-monkey-blocks' 414 ) } 415 > 416 ⏸ 417 </button> 418 419 <button 420 className="spider__start" 421 title={ __( 422 'Start autoplay', 423 'snow-monkey-blocks' 424 ) } 425 > 426 ▶ 427 </button> 428 </> 429 ) } 430 431 { dots && 432 sliderClientIds.map( 433 ( sliderClientId, index ) => { 434 return ( 435 <button 436 className="spider__dot" 437 data-id={ index } 438 key={ index } 439 > 440 { index } 441 </button> 442 ); 443 } 444 ) } 445 </div> 446 ) } 447 </div> 448 ); 449 }, 450 }, 451 { 452 attributes: { 453 ...blockAttributes, 454 sliderClientIds: { 455 type: 'string', 456 default: '[]', 457 }, 219 458 }, 220 459 … … 392 631 attributes: { 393 632 ...blockAttributes, 633 sliderClientIds: { 634 type: 'string', 635 default: '[]', 636 }, 394 637 }, 395 638 … … 565 808 attributes: { 566 809 ...blockAttributes, 810 sliderClientIds: { 811 type: 'string', 812 default: '[]', 813 }, 567 814 }, 568 815 … … 701 948 attributes: { 702 949 ...blockAttributes, 950 sliderClientIds: { 951 type: 'string', 952 default: '[]', 953 }, 703 954 }, 704 955 … … 832 1083 attributes: { 833 1084 ...blockAttributes, 1085 sliderClientIds: { 1086 type: 'string', 1087 default: '[]', 1088 }, 834 1089 }, 835 1090 … … 955 1210 attributes: { 956 1211 ...blockAttributes, 1212 sliderClientIds: { 1213 type: 'string', 1214 default: '[]', 1215 }, 957 1216 }, 958 1217 -
snow-monkey-blocks/trunk/src/blocks/spider-contents-slider/edit.js
r3196970 r3226624 57 57 border, 58 58 boxShadow, 59 sliderClientIds : _sliderClientIds,59 sliderClientIds, 60 60 templateLock, 61 61 } = attributes; 62 63 const sliderClientIds = JSON.parse( _sliderClientIds );64 62 65 63 const isAlignwide = 'wide' === attributes.align; … … 169 167 if ( sliderClientIds.length !== nowSliderClientIds.length ) { 170 168 setAttributes( { 171 sliderClientIds: JSON.stringify( nowSliderClientIds ),169 sliderClientIds: nowSliderClientIds, 172 170 } ); 173 171 } -
snow-monkey-blocks/trunk/src/blocks/spider-contents-slider/save.js
r3030085 r3226624 22 22 border, 23 23 boxShadow, 24 sliderClientIds : _sliderClientIds,24 sliderClientIds, 25 25 } = attributes; 26 const sliderClientIds = JSON.parse( _sliderClientIds );27 26 28 27 const isAlignwide = 'wide' === attributes.align; -
snow-monkey-blocks/trunk/src/blocks/tabs/block.json
r3187459 r3226624 10 10 "attributes": { 11 11 "tabs": { 12 "type": " string",13 "default": "[]"12 "type": "array", 13 "default": [] 14 14 }, 15 15 "matchHeight": { -
snow-monkey-blocks/trunk/src/blocks/tabs/deprecated.js
r3158860 r3226624 16 16 attributes: { 17 17 ...blockAttributes, 18 tabs: { 19 type: 'string', 20 default: '[]', 21 }, 22 }, 23 24 supports: { 25 ...blockSupports, 26 }, 27 28 migrate( attributes ) { 29 const { tabs } = attributes; 30 31 return { 32 ...attributes, 33 tabs: JSON.parse( tabs ), 34 }; 35 }, 36 37 save( { attributes, className } ) { 38 const { 39 tabs: _tabs, 40 matchHeight, 41 tabsJustification, 42 tabsId, 43 orientation, 44 } = attributes; 45 const tabs = JSON.parse( _tabs ); 46 47 const dataMatchHeightBoolean = 48 'vertical' === orientation || 49 ( 'horizontal' === orientation && 'true' === matchHeight ); 50 51 const classes = classnames( 'smb-tabs', className ); 52 53 return ( 54 <div 55 { ...useBlockProps.save( { className: classes } ) } 56 data-tabs-id={ tabsId } 57 data-orientation={ orientation } 58 data-match-height={ 59 dataMatchHeightBoolean ? 'true' : matchHeight 60 } 61 data-tabs-justification={ 62 'horizontal' === orientation 63 ? tabsJustification 64 : undefined 65 } 66 > 67 { 0 < tabs.length && ( 68 <div className="smb-tabs__tabs" role="tablist"> 69 { tabs.map( ( tab, index ) => { 70 const colorProps = 71 getColorClassesAndStyles( tab ); 72 73 return ( 74 <div 75 className="smb-tabs__tab-wrapper" 76 key={ index } 77 id={ `smb-tab-for-${ tab?.anchor }` } 78 > 79 <RichText.Content 80 tagName="button" 81 value={ tab.title } 82 className={ classnames( 83 'smb-tabs__tab', 84 colorProps?.className 85 ) } 86 style={ colorProps?.style } 87 role="tab" 88 aria-controls={ tab?.anchor } 89 aria-selected={ 90 0 === index ? 'true' : 'false' 91 } 92 /> 93 </div> 94 ); 95 } ) } 96 </div> 97 ) } 98 99 <div 100 { ...useInnerBlocksProps.save( { 101 className: 'smb-tabs__body', 102 } ) } 103 /> 104 105 { dataMatchHeightBoolean && ( 106 <style> 107 { tabs.map( 108 ( tab, index ) => 109 `[data-tabs-id="${ tabsId }"] > .smb-tabs__body > .smb-tab-panel:nth-child(${ 110 index + 1 111 }) {left: ${ -100 * index }%}` 112 ) } 113 </style> 114 ) } 115 </div> 116 ); 117 }, 118 }, 119 { 120 attributes: { 121 ...blockAttributes, 122 tabs: { 123 type: 'string', 124 default: '[]', 125 }, 18 126 }, 19 127 … … 106 214 attributes: { 107 215 ...blockAttributes, 216 tabs: { 217 type: 'string', 218 default: '[]', 219 }, 108 220 }, 109 221 -
snow-monkey-blocks/trunk/src/blocks/tabs/edit.js
r3211380 r3226624 37 37 export default function ( { attributes, setAttributes, className, clientId } ) { 38 38 const { 39 tabs : _tabs,39 tabs, 40 40 matchHeight, 41 41 tabsJustification, … … 44 44 templateLock, 45 45 } = attributes; 46 const tabs = JSON.parse( _tabs );47 46 48 47 const { … … 96 95 // Temporarily disabling exhaustive-deps to avoid introducing unexpected side effecst. 97 96 // eslint-disable-next-line react-hooks/exhaustive-deps 98 }, [ clientId, _tabs ] );97 }, [ clientId, tabs ] ); 99 98 100 99 const dataMatchHeightBoolean = … … 313 312 const onChangeTitle = ( value ) => { 314 313 tabs[ index ].title = value; 315 setAttributes( { tabs: JSON.stringify( tabs )} );314 setAttributes( { tabs: [ ...tabs ] } ); 316 315 }; 317 316 … … 323 322 324 323 tabs.splice( index, 1 ); 325 setAttributes( { tabs: JSON.stringify( tabs )} );324 setAttributes( { tabs: [ ...tabs ] } ); 326 325 327 326 setCurrentTabPanelId( tabs[ 0 ]?.tabPanelId ); … … 338 337 tabs.splice( index, 1 ); 339 338 tabs.splice( index - 1, 0, targetTab ); 340 setAttributes( { tabs: JSON.stringify( tabs )} );339 setAttributes( { tabs: [ ...tabs ] } ); 341 340 342 341 setCurrentTabPanelId( … … 357 356 tabs.splice( index, 1 ); 358 357 tabs.splice( index + 1, 0, targetTab ); 359 setAttributes( { tabs: JSON.stringify( tabs )} );358 setAttributes( { tabs: [ ...tabs ] } ); 360 359 361 360 setCurrentTabPanelId( … … 494 493 } ); 495 494 setAttributes( { 496 tabs : JSON.stringify( tabs ),495 tabs, 497 496 } ); 498 497 -
snow-monkey-blocks/trunk/src/blocks/tabs/save.js
r3158860 r3226624 9 9 10 10 export default function ( { attributes, className } ) { 11 const { 12 tabs: _tabs, 13 matchHeight, 14 tabsJustification, 15 tabsId, 16 orientation, 17 } = attributes; 18 const tabs = JSON.parse( _tabs ); 11 const { tabs, matchHeight, tabsJustification, tabsId, orientation } = 12 attributes; 19 13 20 14 const dataMatchHeightBoolean = -
snow-monkey-blocks/trunk/src/blocks/tabs/tab-panel/edit.js
r3158860 r3226624 30 30 31 31 useEffect( () => { 32 const _tabs = getBlockAttributes( parentId )?.tabs;33 if ( ! _tabs ) {32 const tabs = getBlockAttributes( parentId )?.tabs; 33 if ( ! tabs ) { 34 34 return; 35 35 } 36 36 37 const tabs = JSON.parse( _tabs );38 37 const newTabs = getBlockOrder( parentId ).map( 39 38 ( tabPanelClientId, index ) => { … … 88 87 89 88 updateBlockAttributes( parentId, { 90 tabs: JSON.stringify( newTabs ),89 tabs: newTabs, 91 90 } ); 92 91 }, [ -
snow-monkey-blocks/trunk/vendor/composer/InstalledVersions.php
r3211380 r3226624 32 32 */ 33 33 private static $installed; 34 35 /** 36 * @var bool 37 */ 38 private static $installedIsLocalDir; 34 39 35 40 /** … … 310 315 self::$installed = $data; 311 316 self::$installedByVendor = array(); 317 318 // when using reload, we disable the duplicate protection to ensure that self::$installed data is 319 // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, 320 // so we have to assume it does not, and that may result in duplicate data being returned when listing 321 // all installed packages for example 322 self::$installedIsLocalDir = false; 312 323 } 313 324 … … 326 337 327 338 if (self::$canGetVendors) { 339 $selfDir = strtr(__DIR__, '\\', '/'); 328 340 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 341 $vendorDir = strtr($vendorDir, '\\', '/'); 329 342 if (isset(self::$installedByVendor[$vendorDir])) { 330 343 $installed[] = self::$installedByVendor[$vendorDir]; … … 334 347 self::$installedByVendor[$vendorDir] = $required; 335 348 $installed[] = $required; 336 if (s trtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {349 if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { 337 350 self::$installed = $required; 338 $copiedLocalDir = true;351 self::$installedIsLocalDir = true; 339 352 } 353 } 354 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { 355 $copiedLocalDir = true; 340 356 } 341 357 }
Note: See TracChangeset
for help on using the changeset viewer.